blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
721
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
5
91
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
321 values
visit_date
timestamp[ns]date
2016-08-12 09:31:09
2023-09-06 10:45:07
revision_date
timestamp[ns]date
2010-09-28 14:01:40
2023-09-06 06:22:19
committer_date
timestamp[ns]date
2010-09-28 14:01:40
2023-09-06 06:22:19
github_id
int64
426
681M
star_events_count
int64
101
243k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[ns]date
2012-06-28 18:51:49
2023-09-14 21:59:16
gha_created_at
timestamp[ns]date
2008-02-11 22:55:26
2023-08-10 11:14:58
gha_language
stringclasses
147 values
src_encoding
stringclasses
26 values
language
stringclasses
2 values
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10.2M
extension
stringclasses
115 values
filename
stringlengths
3
113
content
stringlengths
6
10.2M
248a4acd54746a7eba989d3df6ad26e3f04d49ff
35266a567d1f4e389bb234e72e2d8e4af06bb707
/external/dyncall/dyncall_callvm_arm32_arm_armhf.c
dd106cb0230ef3fec60b6f4c6dc3190c61413574
[ "MIT", "ISC" ]
permissive
WheretIB/nullc
6c6ec4a0f53a28c1ede2c0e3e4a9d0af5437d96d
bac1a2b2c35676a61392c094b142b50b92952fc8
refs/heads/master
2022-11-11T03:38:03.706686
2022-11-06T01:55:45
2022-11-06T01:55:45
32,209,998
161
13
MIT
2022-11-06T01:55:46
2015-03-14T12:15:38
C++
UTF-8
C
false
false
5,759
c
dyncall_callvm_arm32_arm_armhf.c
/* Package: dyncall Library: dyncall File: dyncall/dyncall_callvm_arm32_arm_armhf.c Description: ARM 'armhf' ABI implementation License: Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "dyncall_callvm_arm32_arm_armhf.h" #include "dyncall_alloc.h" static void deinit(DCCallVM* in_self) { dcFreeMem(in_self); } static void reset(DCCallVM* in_p) { DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_p; p->i = 0; p->s = 0; p->d = 0; dcVecResize(&p->mVecHead, 16); } static void a_int(DCCallVM* in_self, DCint x) { DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_self; if (p->i < 16) { * (DCint*) dcVecAt(&p->mVecHead, p->i) = x; p->i += 4; } else { dcVecAppend(&p->mVecHead, &x, sizeof(DCint)); } } static void a_bool (DCCallVM* in_self, DCbool x) { a_int(in_self, (DCint)x); } static void a_char (DCCallVM* in_self, DCchar x) { a_int(in_self, x); } static void a_short (DCCallVM* in_self, DCshort x) { a_int(in_self, x); } static void a_long (DCCallVM* in_self, DClong x) { a_int(in_self, x); } static void a_longlong(DCCallVM* in_self, DClonglong x) { DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_self; p->i = (p->i+4) & -8; if (p->i < 16) { * (DClonglong*) dcVecAt(&p->mVecHead, p->i) = x; p->i += 8; } else { /* 64 bit values need to be aligned on 8 byte boundaries */ dcVecSkip(&p->mVecHead, dcVecSize(&p->mVecHead) & 4); dcVecAppend(&p->mVecHead, &x, sizeof(DClonglong)); } } static void a_pointer(DCCallVM* in_p, DCpointer x) { a_int(in_p, (DCint) x ); } static void a_float(DCCallVM* in_p, DCfloat x) { DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_p; if (p->s < 16) { p->S[p->s++] = x; if (p->d < p->s) { p->d = (p->s+1) & ~(1U); } else { p->s = p->d; } } else { dcVecAppend(&p->mVecHead, &x, sizeof(DCfloat)); } } static void a_double(DCCallVM* in_p, DCdouble x) { union { DCdouble d; DCchar b[8]; } v; DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_p; if (p->d < 16) { * (DCdouble*) &p->S[p->d] = x; p->d += 2; if (!(p->s & 1)) { /* if s is even it always equals d. otherwise, s points to an odd float register. */ p->s = p->d; } } else { p->s = 16; /* fp registers all full - need to use stack now: stop filling gaps for single precision, also */ v.d = x; /* 64 bit values need to be aligned on 8 byte boundaries */ dcVecSkip(&p->mVecHead, dcVecSize(&p->mVecHead) & 4); dcVecAppend(&p->mVecHead, &v.b[0], sizeof(DCdouble)); } } static void a_float_ellipsis(DCCallVM* in_p, DCfloat x) { a_int(in_p, *(DCint*)&x); } static void a_double_ellipsis(DCCallVM* in_p, DCdouble x) { a_longlong(in_p, *(DClonglong*)&x); } void call(DCCallVM* in_p, DCpointer target) { DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)in_p; dcCall_arm32_armhf(target, dcVecData(&p->mVecHead), dcVecSize(&p->mVecHead), &p->S[0]); } static void mode(DCCallVM* in_self,DCint mode); DCCallVM_vt vt_armhf = { &deinit , &reset , &mode , &a_bool , &a_char , &a_short , &a_int , &a_long , &a_longlong , &a_float , &a_double , &a_pointer , NULL /* argStruct */ , (DCvoidvmfunc*) &call , (DCboolvmfunc*) &call , (DCcharvmfunc*) &call , (DCshortvmfunc*) &call , (DCintvmfunc*) &call , (DClongvmfunc*) &call , (DClonglongvmfunc*) &call , (DCfloatvmfunc*) &call , (DCdoublevmfunc*) &call , (DCpointervmfunc*) &call , NULL /* callStruct */ }; DCCallVM_vt vt_armhf_ellipsis = { &deinit , &reset , &mode , &a_bool , &a_char , &a_short , &a_int , &a_long , &a_longlong , &a_float_ellipsis , &a_double_ellipsis , &a_pointer , NULL /* argStruct */ , (DCvoidvmfunc*) &call , (DCboolvmfunc*) &call , (DCcharvmfunc*) &call , (DCshortvmfunc*) &call , (DCintvmfunc*) &call , (DClongvmfunc*) &call , (DClonglongvmfunc*) &call , (DCfloatvmfunc*) &call , (DCdoublevmfunc*) &call , (DCpointervmfunc*) &call , NULL /* callStruct */ }; static void mode(DCCallVM* in_self, DCint mode) { DCCallVM_arm32_armhf* self = (DCCallVM_arm32_armhf*)in_self; DCCallVM_vt* vt; switch(mode) { case DC_CALL_C_DEFAULT: case DC_CALL_C_ARM_ARMHF: vt = &vt_armhf; break; case DC_CALL_C_ELLIPSIS: case DC_CALL_C_ELLIPSIS_VARARGS: vt = &vt_armhf_ellipsis; break; default: self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; return; } dc_callvm_base_init(&self->mInterface, vt); } /* Public API. */ DCCallVM* dcNewCallVM(DCsize size) { /* Store at least 16 bytes (4 words for first 4 int args) for internal spill area. Assembly code depends on it. */ DCCallVM_arm32_armhf* p = (DCCallVM_arm32_armhf*)dcAllocMem(sizeof(DCCallVM_arm32_armhf)+size+16); mode((DCCallVM*)p, DC_CALL_C_DEFAULT); dcVecInit(&p->mVecHead, size); reset((DCCallVM*)p); return (DCCallVM*)p; }
fc354c6e125988fce63df67b1cb50489862d19ed
76f7459a09acb9be2d52407132f5ff8955627da2
/frame/compat/cblas/src/cblas_f77.h
acb354aaf464c83cf62b9e468488b9618ee6a1d8
[ "BSD-3-Clause" ]
permissive
flame/blis
448bc0ad139b726188129c5627c304274b41c3c1
6dcf7666eff14348e82fbc2750be4b199321e1b9
refs/heads/master
2023-09-01T14:56:11.920485
2023-08-27T19:18:57
2023-08-27T19:18:57
16,143,904
1,696
361
NOASSERTION
2023-08-27T19:18:58
2014-01-22T15:58:24
C
UTF-8
C
false
false
6,368
h
cblas_f77.h
/* cblas_f77.h Written by Keita Teranishi Updated by Jeff Horner Merged cblas_f77.h and cblas_fortran_header.h (Heavily hacked down from the original) */ /* BLIS An object-based framework for developing high-performance BLAS-like libraries. Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name(s) of the copyright holder(s) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CBLAS_F77_H #define CBLAS_F77_H /* * Level 1 BLAS */ #define F77_xerbla xerbla_ #define F77_srotg srotg_ #define F77_srotmg srotmg_ #define F77_srot srot_ #define F77_srotm srotm_ #define F77_drotg drotg_ #define F77_drotmg drotmg_ #define F77_drot drot_ #define F77_drotm drotm_ #define F77_sswap sswap_ #define F77_scopy scopy_ #define F77_saxpy saxpy_ #define F77_isamax_sub isamaxsub_ #define F77_dswap dswap_ #define F77_dcopy dcopy_ #define F77_daxpy daxpy_ #define F77_idamax_sub idamaxsub_ #define F77_cswap cswap_ #define F77_ccopy ccopy_ #define F77_caxpy caxpy_ #define F77_icamax_sub icamaxsub_ #define F77_zswap zswap_ #define F77_zcopy zcopy_ #define F77_zaxpy zaxpy_ #define F77_izamax_sub izamaxsub_ #define F77_sdot_sub sdotsub_ #define F77_ddot_sub ddotsub_ #define F77_dsdot_sub dsdotsub_ #define F77_sscal sscal_ #define F77_dscal dscal_ #define F77_cscal cscal_ #define F77_zscal zscal_ #define F77_csscal csscal_ #define F77_zdscal zdscal_ #define F77_cdotu_sub cdotusub_ #define F77_cdotc_sub cdotcsub_ #define F77_zdotu_sub zdotusub_ #define F77_zdotc_sub zdotcsub_ #define F77_snrm2_sub snrm2sub_ #define F77_sasum_sub sasumsub_ #define F77_dnrm2_sub dnrm2sub_ #define F77_dasum_sub dasumsub_ #define F77_scnrm2_sub scnrm2sub_ #define F77_scasum_sub scasumsub_ #define F77_dznrm2_sub dznrm2sub_ #define F77_dzasum_sub dzasumsub_ #define F77_sdsdot_sub sdsdotsub_ /* * Level 2 BLAS */ #define F77_ssymv ssymv_ #define F77_ssbmv ssbmv_ #define F77_sspmv sspmv_ #define F77_sger sger_ #define F77_ssyr ssyr_ #define F77_sspr sspr_ #define F77_ssyr2 ssyr2_ #define F77_sspr2 sspr2_ #define F77_dsymv dsymv_ #define F77_dsbmv dsbmv_ #define F77_dspmv dspmv_ #define F77_dger dger_ #define F77_dsyr dsyr_ #define F77_dspr dspr_ #define F77_dsyr2 dsyr2_ #define F77_dspr2 dspr2_ #define F77_chemv chemv_ #define F77_chbmv chbmv_ #define F77_chpmv chpmv_ #define F77_cgeru cgeru_ #define F77_cgerc cgerc_ #define F77_cher cher_ #define F77_chpr chpr_ #define F77_cher2 cher2_ #define F77_chpr2 chpr2_ #define F77_zhemv zhemv_ #define F77_zhbmv zhbmv_ #define F77_zhpmv zhpmv_ #define F77_zgeru zgeru_ #define F77_zgerc zgerc_ #define F77_zher zher_ #define F77_zhpr zhpr_ #define F77_zher2 zher2_ #define F77_zhpr2 zhpr2_ #define F77_sgemv sgemv_ #define F77_sgbmv sgbmv_ #define F77_strmv strmv_ #define F77_stbmv stbmv_ #define F77_stpmv stpmv_ #define F77_strsv strsv_ #define F77_stbsv stbsv_ #define F77_stpsv stpsv_ #define F77_dgemv dgemv_ #define F77_dgbmv dgbmv_ #define F77_dtrmv dtrmv_ #define F77_dtbmv dtbmv_ #define F77_dtpmv dtpmv_ #define F77_dtrsv dtrsv_ #define F77_dtbsv dtbsv_ #define F77_dtpsv dtpsv_ #define F77_cgemv cgemv_ #define F77_cgbmv cgbmv_ #define F77_ctrmv ctrmv_ #define F77_ctbmv ctbmv_ #define F77_ctpmv ctpmv_ #define F77_ctrsv ctrsv_ #define F77_ctbsv ctbsv_ #define F77_ctpsv ctpsv_ #define F77_zgemv zgemv_ #define F77_zgbmv zgbmv_ #define F77_ztrmv ztrmv_ #define F77_ztbmv ztbmv_ #define F77_ztpmv ztpmv_ #define F77_ztrsv ztrsv_ #define F77_ztbsv ztbsv_ #define F77_ztpsv ztpsv_ /* * Level 3 BLAS */ #define F77_chemm chemm_ #define F77_cherk cherk_ #define F77_cher2k cher2k_ #define F77_zhemm zhemm_ #define F77_zherk zherk_ #define F77_zher2k zher2k_ #define F77_sgemm sgemm_ #define F77_ssymm ssymm_ #define F77_ssyrk ssyrk_ #define F77_ssyr2k ssyr2k_ #define F77_strmm strmm_ #define F77_strsm strsm_ #define F77_dgemm dgemm_ #define F77_dsymm dsymm_ #define F77_dsyrk dsyrk_ #define F77_dsyr2k dsyr2k_ #define F77_dtrmm dtrmm_ #define F77_dtrsm dtrsm_ #define F77_cgemm cgemm_ #define F77_csymm csymm_ #define F77_csyrk csyrk_ #define F77_csyr2k csyr2k_ #define F77_ctrmm ctrmm_ #define F77_ctrsm ctrsm_ #define F77_zgemm zgemm_ #define F77_zsymm zsymm_ #define F77_zsyrk zsyrk_ #define F77_zsyr2k zsyr2k_ #define F77_ztrmm ztrmm_ #define F77_ztrsm ztrsm_ /* * BLAS extensions */ #define F77_saxpby saxpby_ #define F77_daxpby daxpby_ #define F77_caxpby caxpby_ #define F77_zaxpby zaxpby_ #define F77_sgemmt sgemmt_ #define F77_dgemmt dgemmt_ #define F77_cgemmt cgemmt_ #define F77_zgemmt zgemmt_ #define F77_sgemm_batch sgemm_batch_ #define F77_dgemm_batch dgemm_batch_ #define F77_cgemm_batch cgemm_batch_ #define F77_zgemm_batch zgemm_batch_ #define F77_cgemm3m cgemm3m_ #define F77_zgemm3m zgemm3m_ #endif /* CBLAS_F77_H */
09dfecfd4244fcd24f350e8360b259f20497df57
9a5bda0ccefc0b4ffe14408d896a1496e530c511
/labs/malloclab/mm.c
a482a434b3be609eb08685001c269be200d9055c
[ "MIT" ]
permissive
XieGuochao/csapp
bd8cbf8abec04009755b42bb0e6b219dce264180
2c217f3a7219f5e784ada45cb18374dd41a15667
refs/heads/main
2023-07-20T13:16:54.877827
2023-07-05T19:47:33
2023-07-05T19:47:33
371,640,614
111
54
MIT
2021-06-06T00:40:40
2021-05-28T08:57:22
C
UTF-8
C
false
false
2,396
c
mm.c
/* * mm-naive.c - The fastest, least memory-efficient malloc package. * * In this naive approach, a block is allocated by simply incrementing * the brk pointer. A block is pure payload. There are no headers or * footers. Blocks are never coalesced or reused. Realloc is * implemented directly using mm_malloc and mm_free. * * NOTE TO STUDENTS: Replace this header comment with your own header * comment that gives a high level description of your solution. */ #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <unistd.h> #include <string.h> #include "mm.h" #include "memlib.h" /********************************************************* * NOTE TO STUDENTS: Before you do anything else, please * provide your team information in the following struct. ********************************************************/ team_t team = { /* Team name */ "ateam", /* First member's full name */ "Harry Bovik", /* First member's email address */ "bovik@cs.cmu.edu", /* Second member's full name (leave blank if none) */ "", /* Second member's email address (leave blank if none) */ "" }; /* single word (4) or double word (8) alignment */ #define ALIGNMENT 8 /* rounds up to the nearest multiple of ALIGNMENT */ #define ALIGN(size) (((size) + (ALIGNMENT-1)) & ~0x7) #define SIZE_T_SIZE (ALIGN(sizeof(size_t))) /* * mm_init - initialize the malloc package. */ int mm_init(void) { return 0; } /* * mm_malloc - Allocate a block by incrementing the brk pointer. * Always allocate a block whose size is a multiple of the alignment. */ void *mm_malloc(size_t size) { int newsize = ALIGN(size + SIZE_T_SIZE); void *p = mem_sbrk(newsize); if (p == (void *)-1) return NULL; else { *(size_t *)p = size; return (void *)((char *)p + SIZE_T_SIZE); } } /* * mm_free - Freeing a block does nothing. */ void mm_free(void *ptr) { } /* * mm_realloc - Implemented simply in terms of mm_malloc and mm_free */ void *mm_realloc(void *ptr, size_t size) { void *oldptr = ptr; void *newptr; size_t copySize; newptr = mm_malloc(size); if (newptr == NULL) return NULL; copySize = *(size_t *)((char *)oldptr - SIZE_T_SIZE); if (size < copySize) copySize = size; memcpy(newptr, oldptr, copySize); mm_free(oldptr); return newptr; }
58f890f89889588f4f42961648ea167deba84845
6e8226bff5369d52885ab75c95f78e155d6afb48
/src/util/morn_time.c
888323a0b3fbdfbff8195e93bc5602d1caa83908
[ "Apache-2.0" ]
permissive
jingweizhanghuai/Morn
a26fc8747fd82c10a94003759a9adc44a60a8353
b9ee92c26190dec03a6726b9ac9d18fb570b7a70
refs/heads/master
2023-03-03T12:02:06.835741
2023-02-17T14:16:34
2023-02-17T14:16:34
187,427,750
257
64
null
null
null
null
UTF-8
C
false
false
20,809
c
morn_time.c
/* Copyright (C) 2019-2022 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifdef __linux__ #include <sys/time.h> #endif #ifdef _MSC_VER #include <windows.h> #endif #include "morn_util.h" #ifdef __MINGW32__ #define gettimeofday mingw_gettimeofday #endif #ifdef __GNUC__ #define stricmp strcasecmp #endif uint64_t morn_t0=0; double mTime() { #ifdef _MSC_VER int cv = clock(); if(morn_t0==0) morn_t0=cv; return (double)(cv-morn_t0)*1000.0/(double)(CLOCKS_PER_SEC); #else struct timeval tv;gettimeofday(&tv,NULL); if(morn_t0==0) {morn_t0=tv.tv_sec;} return (double)((tv.tv_sec-morn_t0)*1000000+tv.tv_usec+500)/1000.0; #endif } struct ChronoData { double t; int mode; int cycle; int ID; }; struct HandleChrono { MChain *chain; int num; int defalt_cycle; int ID_order; }; void endChrono(struct HandleChrono *handle) { if(handle->chain!=NULL) mChainRelease(handle->chain); } #define HASH_Chrono 0x86cdabb2 int m_ChronoTask(int delay,int mode) { double t = mTime()+(double)delay; mException((delay<0)||(mode<-1),EXIT,"invalid input"); MHandle *hdl = mHandle("Chrono",Chrono); struct HandleChrono *handle = (struct HandleChrono *)(hdl->handle); if(hdl->valid == 0) { handle->defalt_cycle=100; mPropertyVariate("Chrono","defalt_cycle",&(handle->defalt_cycle),sizeof(int)); if(handle->chain==NULL) handle->chain = mChainCreate(); hdl->valid = 1; } MChainNode *node;struct ChronoData *data; if(handle->num==1) { node = handle->chain->chainnode; data = node->data; if(data->ID == DFLT) { data->ID = handle->ID_order++; data->mode = mode; data->t = t; data->cycle= delay; return data->ID; } } int ID= handle->ID_order++;handle->num++; node= mChainNode(handle->chain,NULL,sizeof(struct ChronoData)); data = node->data; data->ID = ID; data->mode = mode; data->t = t; data->cycle=delay; if(handle->num==1) {handle->chain->chainnode = node;return ID;} MChainNode *p = handle->chain->chainnode; struct ChronoData *pdata = p->data; if(t<pdata->t) {mChainNodeInsert(NULL,node,p);handle->chain->chainnode=node;return ID;} p=p->next; while(p!=handle->chain->chainnode) { pdata = p->data; if(t<pdata->t) break; p=p->next; } mChainNodeInsert(NULL,node,p); return ID; } void mChronoDelete(int ID) { mException(ID<0,EXIT,"Chrono %d can not be delete",ID); MHandle *hdl = mHandle("Chrono",Chrono); struct HandleChrono *handle = (struct HandleChrono *)(hdl->handle); MChain *chain = handle->chain; MChainNode *node=chain->chainnode; struct ChronoData *data; if(handle->num==1) { data = chain->chainnode->data; if((data->ID == ID)||(data->ID== -2-ID)) { data->ID = DFLT; data->mode = DFLT; data->cycle= handle->defalt_cycle; } return; } do { data = node->data; if((data->ID == ID)||(data->ID== -2-ID)) { handle->num--; mChainNodeDelete(chain,node); return; } node = node->next; }while(node!=chain->chainnode); } int mChrono() { MChainNode *node;struct ChronoData *data; MHandle *hdl = mHandle("Chrono",Chrono); struct HandleChrono *handle = (struct HandleChrono *)(hdl->handle); if(handle->num==0) { handle->defalt_cycle=100; mPropertyVariate("Chrono","defalt_cycle",&(handle->defalt_cycle),sizeof(int)); if(handle->chain==NULL) handle->chain = mChainCreate(); node= mChainNode(handle->chain,NULL,sizeof(struct ChronoData)); data = node->data; data->ID = DFLT; data->mode = DFLT; data->t = mTime(); data->cycle= handle->defalt_cycle; handle->chain->chainnode = node; handle->num = 1; hdl->valid = 1; } MChain *chain = handle->chain; node = chain->chainnode; data = node->data; int ID = data->ID; if(ID<0) { data->ID=-2-ID; data->mode--; if(data->mode==0) {mChronoDelete(data->ID);} else { data->t=data->t+data->cycle; if(handle->num > 1) { MChainNode *p = node->next; struct ChronoData *pdata = p->data; if(data->t>pdata->t) { node->prev->next = p; p->prev = node->prev; chain->chainnode=p; p=p->next; while(p!=chain->chainnode) { pdata = p->data; if(data->t<pdata->t) break; p=p->next; } mChainNodeInsert(NULL,node,p); } } } node=chain->chainnode;data=node->data; ID = data->ID; } data->ID=-2-ID; double t = mTime(); int d = (int)(data->t-t); if(d>20) mSleep(d-15); while(data->t-t>0.5) { t=mTime(); // printf("t=%f,data->t=%f\n",t,data->t); } return ID; } struct HandleTimer { MList *timer_list; }; #define HASH_Timer 0x88df05ba __thread MList *morn_timer_list=NULL; void endTimer(struct HandleTimer *handle) { if(handle->timer_list!=NULL) mListRelease(handle->timer_list); morn_timer_list=NULL; } void _mTimerBegin(const char *name) { #ifdef _MSC_VER int offset = sizeof(LARGE_INTEGER); #else int offset = sizeof(struct timeval); #endif if(morn_timer_list==NULL) { MHandle *hdl = mHandle(mMornObject(NULL,DFLT),Timer); struct HandleTimer *handle = (struct HandleTimer *)(hdl->handle); if(handle->timer_list!=NULL) mListRelease(handle->timer_list); handle->timer_list = mListCreate(); morn_timer_list = handle->timer_list; hdl->valid = 1; mListWrite(morn_timer_list,0,NULL,offset+1); *(((char *)(morn_timer_list->data[0]))+offset)=0; } int n=-1; if(name==NULL) n=0; else { for(int i=morn_timer_list->num-1;i>0;i--) if(strcmp(name,((char *)(morn_timer_list->data[i]))+offset)==0) {n=i;break;} } if(n<0) { n=morn_timer_list->num; int l = strlen(name); mListWrite(morn_timer_list,DFLT,NULL,offset+l+1); memcpy(((char *)(morn_timer_list->data[n]))+offset,name,l+1); } #ifdef _MSC_VER QueryPerformanceCounter((LARGE_INTEGER *)(morn_timer_list->data[n])); #else struct timeval *tv=(struct timeval *)(morn_timer_list->data[n]); gettimeofday(tv,NULL); #endif } float _mTimerEnd(const char *name,const char *file,int line,const char *function) { #ifdef _MSC_VER LARGE_INTEGER cv1; QueryPerformanceCounter(&cv1); int offset = sizeof(LARGE_INTEGER); #else struct timeval tv1;gettimeofday(&tv1,NULL); int offset = sizeof(struct timeval); #endif int n=-1; if(name==NULL) {name="";n=0;} else { for(int i=morn_timer_list->num-1;i>0;i--) if(strcmp(name,((char *)(morn_timer_list->data[i]))+offset)==0) {n=i;break;} } mException(n<0,EXIT,"invalid timer name %s",name); #ifdef _MSC_VER LARGE_INTEGER cv0 = *(LARGE_INTEGER *)(morn_timer_list->data[n]); LARGE_INTEGER freq; QueryPerformanceFrequency(&freq); float Use = (cv1.QuadPart - cv0.QuadPart) *1000.0f/freq.QuadPart; #else struct timeval *tv0=(struct timeval *)(morn_timer_list->data[n]); float Use = (tv1.tv_sec - tv0->tv_sec)*1000.0f + (tv1.tv_usec - tv0->tv_usec)/1000.0f; #endif printf("[%s,line %d,function %s]Timer: %s time use %fms\n",file,line,function,name,Use); return Use; } char morn_time_now_string[128]; static int64_t morn_time_now=0; const char *mTimeNowString() { int64_t tv=(int64_t)time(NULL); if(tv==morn_time_now) return morn_time_now_string; morn_time_now = tv; struct tm *t=localtime(&tv); snprintf(morn_time_now_string,128,"%04d.%02d.%02d %02d:%02d:%02d",t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); return morn_time_now_string; } char *CHNYearString(int num) { #if defined(__linux__) int s=3; int dic[10]={0x008780e3,0x0080b8e4,0x008cbae4,0x0089b8e4,0x009b9be5,0x0094bae4,0x00ad85e5,0x0083b8e4,0x00ab85e5,0x009db9e4}; #elif defined(_WIN64)||defined(_WIN32) int s=2; int dic[10]={0x000096a9,0x0000bbd2,0x0000feb6,0x0000fdc8,0x0000c4cb,0x0000e5ce,0x0000f9c1,0x0000dfc6,0x0000cbb0,0x0000c5be}; #else int s=0; int dic[10]={0,0,0,0,0,0,0,0,0,0}; #endif int n;int flag=0; char *p=morn_shu; n=num/1000;if (n>0) {flag=1;memcpy(p,dic+n,s);p=p+s;num=num-n*1000;} n=num/100 ;if((n>0)||(flag==1)) {flag=1;memcpy(p,dic+n,s);p=p+s;num=num-n*100 ;} n=num/10 ;if((n>0)||(flag==1)) {flag=1;memcpy(p,dic+n,s);p=p+s;num=num-n*10 ;} n=num ;if((n>0)||(flag==1)) {flag=1;memcpy(p,dic+n,s);p=p+s;} p[0]=0; return morn_shu; } char morn_time_string[128]; const char *m_TimeString(int64_t time_value,const char *format) { int64_t tv=(time_value==DFLT)?(int64_t)time(NULL):time_value; int ty = 0; if(tv<0) { ty=(0-tv)/((366+365*3)*7*24*3600)+1; tv+=ty*(366+365*3)*7*24*3600; ty=ty*28; } struct tm *t=localtime(&tv); if(format==NULL) format = "%Y.%02M.%02D %02H:%02m:%02S"; char *wday[7]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}; char *month[12]={"January","February","March","April","May","June","July","August","September","October","November","December"}; char *awday[7]={"Sun","Mon","Tues","Wed","Thur","Fri","Sat"}; char *amonth[12]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"}; #if defined(__linux__) int cwday[7]={0x00a597e6,0x0080b8e4,0x008cbae4,0x0089b8e4,0x009b9be5,0x0094bae4,0x00ad85e5}; #elif defined(_WIN64)||defined(_WIN32) int cwday[7]={0x0000d5c8,0x0000bbd2,0x0000feb6,0x0000fdc8,0x0000c4cb,0x0000e5ce,0x0000f9c1}; #else int cwday[7]={0,0,0,0,0,0,0}; #endif char cy[16],cM[16],cd[8 ],ch[16],cm[16],cs[16]; char str[256];strcpy(str,format); intptr_t d[16];int n=0; char *p,*q; for(p=str;*p!=0;p++) { if(n>=16)break; if(*p=='/') {p++;continue;} if(*p=='%') { for(q=p+1;*q!=0;q++) { if((*q>='0')&&(*q<='9')) continue; // if(*q=='.') continue; if(*q=='Y') {d[n++]=t->tm_year+1900-ty; *q='d';} else if(*q=='M') {d[n++]=t->tm_mon+1;*q='d';} else if(*q=='W') {d[n++]=t->tm_wday; *q='d';} else if(*q=='D') {d[n++]=t->tm_mday; *q='d';} else if(*q=='H') {d[n++]=t->tm_hour; *q='d';} else if(*q=='m') {d[n++]=t->tm_min ; *q='d';} else if(*q=='S') {d[n++]=t->tm_sec ; *q='d';} else if((q[0]=='s')&&(q[1]=='M')) {d[n++]=(intptr_t)( month[t->tm_mon ]);q[0]='h';q[1]='s';q++;} else if((q[0]=='a')&&(q[1]=='M')) {d[n++]=(intptr_t)(amonth[t->tm_mon ]);q[0]='h';q[1]='s';q++;} else if((q[0]=='s')&&(q[1]=='W')) {d[n++]=(intptr_t)( wday[t->tm_wday]);q[0]='h';q[1]='s';q++;} else if((q[0]=='a')&&(q[1]=='W')) {d[n++]=(intptr_t)( awday[t->tm_wday]);q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='W')) {d[n++]=(intptr_t)(&cwday[t->tm_wday]);q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='Y')) {strcpy(cy,CHNYearString(t->tm_year+1900-ty));d[n++]=(intptr_t)cy;q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='M')) {strcpy(cM,mShu((double)(t->tm_mon+1)));d[n++]=(intptr_t)cM;q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='D')) {strcpy(cd,mShu((double)(t->tm_mday )));d[n++]=(intptr_t)cd;q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='H')) {strcpy(ch,mShu((double)(t->tm_hour )));d[n++]=(intptr_t)ch;q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='m')) {strcpy(cm,mShu((double)(t->tm_min )));d[n++]=(intptr_t)cm;q[0]='h';q[1]='s';q++;} else if((q[0]=='C')&&(q[1]=='S')) {strcpy(cs,mShu((double)(t->tm_sec )));d[n++]=(intptr_t)cs;q[0]='h';q[1]='s';q++;} else mException(1,EXIT,"invalid format"); break; } p=q; } } sprintf(morn_time_string,str,d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]); return morn_time_string; } int CHNNum(char *str) { #if defined(__linux__) int s=3; int dic[11]={0x00b69be9,0x0080b8e4,0x008cbae4,0x0089b8e4,0x009b9be5,0x0094bae4,0x00ad85e5,0x0083b8e4,0x00ab85e5,0x009db9e4,0x00818de5}; #elif defined(_WIN64)||defined(_WIN32) int s=2; int dic[11]={0x0000e3c1,0x0000bbd2,0x0000feb6,0x0000fdc8,0x0000c4cb,0x0000e5ce,0x0000f9c1,0x0000dfc6,0x0000cbb0,0x0000c5be,0x0000aeca}; #else int s=0; int dic[11]={0,0,0,0,0,0,0,0,0,0,0}; #endif int num = 0; for(int i=0;str[i]!=0;i+=s) { if(memcmp(str+i,dic+10,s)==0) {if(num==0) {num=1;}num=num*10;continue;} if(memcmp(str+i,dic+ 0,s)==0) continue; int j;for(j=1;j<10;j++) { if(memcmp(str+i,dic+j,s)==0) {num+=j;break;} } if(j==10) break; } return num; } int CHNYear(char *str) { #if defined(__linux__) int s=3; int dic[11]={0x00b69be9,0x0080b8e4,0x008cbae4,0x0089b8e4,0x009b9be5,0x0094bae4,0x00ad85e5,0x0083b8e4,0x00ab85e5,0x009db9e4,0x008780e3}; #elif defined(_WIN64)||defined(_WIN32) int s=2; int dic[11]={0x0000e3c1,0x0000bbd2,0x0000feb6,0x0000fdc8,0x0000c4cb,0x0000e5ce,0x0000f9c1,0x0000dfc6,0x0000cbb0,0x0000c5be,0x000096a9}; #else int s=0; int dic[11]={0,0,0,0,0,0,0,0,0,0,0}; #endif int num = 0; for(int i=0;str[i]!=0;i+=s) { int j;for(j=0;j<11;j++) { if(memcmp(str+i,dic+j,s)==0){num=num*10+j%10;break;} } if(j==11) break; } return num; } void _CString(const char *in,char *out) { #if defined(__linux__) int s=3; int dic[13]={0x0080b8e4,0x008cbae4,0x008780e3,0x0089b8e4,0x00b69be9,0x009b9be5,0x0094bae4,0x00ad85e5,0x0083b8e4,0x00ab85e5,0x009db9e4,0x00818de5,0x00a597e6}; #elif defined(_WIN64)||defined(_WIN32) int s=2; int dic[13]={0x0000bbd2,0x0000feb6,0x000096a9,0x0000fdc8,0x0000e3c1,0x0000c4cb,0x0000e5ce,0x0000f9c1,0x0000dfc6,0x0000cbb0,0x0000c5be,0x0000aeca,0x0000d5c8}; #else int s=0; int dic[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; #endif int8_t *p;int n; for(p=(int8_t *)in,n=0;*p!=0;p++) { // printf("p[%d]=%d,%c\n",n,p[0],p[0]); if(p[0]<0) { int i;for(i=0;i<13;i++) if(memcmp(p,dic+i,s)==0) {memcpy(out+n,p,s);n+=s;p+=s-1;break;} if(i==13) out[n++]=' '; } else out[n++]=p[0]; } out[n++]=' ';out[n++]=0; } int64_t m_StringTime(char *string,const char *fmt) { if(string == NULL) return time(NULL); const char *p,*q; int n=0,m=0; char in[128]; _CString(string ,in); char format[128]; if(fmt==NULL) strcpy(format,"%Y.%02M.%02D %02H:%02m:%02S "); else _CString(fmt,format); int day=DFLT,month=DFLT,year=DFLT,week=DFLT,hour=0,minute=0,second=0; char C_year[32],C_week[32],C_month[32],C_day[32],C_hour[32],C_minute[32],C_second[32]; char s_week[16],s_month[16]; int C_year_valid=0,C_month_valid=0,C_day_valid=0,C_hour_valid=0,C_minute_valid=0,C_second_valid=0,s_month_valid=0; char *amonth[12]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; void *ptr[16]; char str[128];memset(str,0,128); n=0,m=0; for(p=format;*p!=0;p++) { if((n>=16)||(m>=128))break; str[m]=*p;m++; if(*p=='/') {p++;continue;} if(*p=='%') { for(q=p+1;*q!=0;q++) { if((*q>='0')&&(*q<='9')) continue; if(*q=='Y') {ptr[n++]=&year ;str[m++]='d';} else if(*q=='M') {ptr[n++]=&month ;str[m++]='d';} else if(*q=='W') {ptr[n++]=&week ;str[m++]='d';} else if(*q=='D') {ptr[n++]=&day ;str[m++]='d';} else if(*q=='H') {ptr[n++]=&hour ;str[m++]='d';} else if(*q=='m') {ptr[n++]=&minute;str[m++]='d';} else if(*q=='S') {ptr[n++]=&second;str[m++]='d';} else if((q[0]=='s')||(q[0]=='a')||(q[0]=='C'))//&&((q[1]=='M')||(q[1]=='W')))) { if((q[0]=='s')||(q[0]=='a')) { if(q[1]=='M') {ptr[n++]=s_month;s_month_valid=1;} else {ptr[n++]=s_week;} } else if(q[0]=='C') { if(q[1]=='Y') {ptr[n++]=C_year; C_year_valid =1;} else if(q[1]=='M') {ptr[n++]=C_month; C_month_valid =1;} else if(q[1]=='D') {ptr[n++]=C_day; C_day_valid =1;} else if(q[1]=='H') {ptr[n++]=C_hour; C_hour_valid =1;} else if(q[1]=='m') {ptr[n++]=C_minute; C_minute_valid=1;} else if(q[1]=='S') {ptr[n++]=C_second; C_second_valid=1;} else {ptr[n++]=C_week;} } str[m++]='['; str[m++]='^';str[m++]=q[2]; str[m++]=']'; q++; } else mException(1,EXIT,"invalid format"); break; } p=q; } } // printf("%s\n",str); sscanf(in,str,ptr[0],ptr[1],ptr[2],ptr[3],ptr[4],ptr[5],ptr[6],ptr[7],ptr[8],ptr[9],ptr[10],ptr[11],ptr[12],ptr[13],ptr[14],ptr[15]); // printf("C_year=%s,C_month=%s,C_day=%s,C_hour=%s,C_minute=%s\n",C_year,C_month,C_day,C_hour,C_minute); if(s_month_valid ) {s_month[3]=0; for(int i=0;i<12;i++) {if(stricmp(s_month,amonth[i])==0) {month=i+1;break;}}} if(C_year_valid ) year = CHNYear(C_year );// printf("year =%d\n",year ); if(C_month_valid ) month = CHNNum(C_month );// printf("month =%d\n",month ); if(C_day_valid ) day = CHNNum(C_day );// printf("day =%d\n",day ); if(C_hour_valid ) hour = CHNNum(C_hour );// printf("hour =%d\n",hour ); if(C_minute_valid ) minute= CHNNum(C_minute);// printf("minute=%d\n",minute); if(C_second_valid ) second= CHNNum(C_second);// printf("second=%d\n",second); if((month<0)||(day<0)) return DFLT; int64_t td=0; if(year<1972) {td=((1972-year)*365+(1972-year)/4+(((1972-year)%4!=0)&&(month>2)))*24*3600;year=1972;} struct tm t;t.tm_year=year-1900; t.tm_mon=month-1;t.tm_mday=day;t.tm_hour=hour;t.tm_min=minute;t.tm_sec=second; return (int64_t)mktime(&t)-td; } void mCalendar(int year) { printf("%47d\n",year); int md[14]={31,(year%4)?28:29,31,30,31,30,31,31,30,31,30,31,0,0}; struct tm t;memset(&t,0,sizeof(struct tm));t.tm_year=year-1900; int w1 = (mktime(&t)/3600/24+6)%7,w2=(w1+md[0])%7,w3=(w2+md[1])%7; for(int m=0;m<12;m+=3) { int d1=1-w1,d2=1-w2,d3=1-w3; printf("\n%16d%30d%30d\n",m+1,m+2,m+3); printf(" Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat\n"); while((d1<=md[m])||(d2<=md[m+1])||(d3<=md[m+2])) { for(int i=0;i<7;i++,d1++) {printf(((d1>0)&&(d1<=md[m ]))?"%4d":" ",d1);}printf(" "); for(int i=0;i<7;i++,d2++) {printf(((d2>0)&&(d2<=md[m+1]))?"%4d":" ",d2);}printf(" "); for(int i=0;i<7;i++,d3++) {printf(((d3>0)&&(d3<=md[m+1]))?"%4d":" ",d3);}printf("\n"); } w1=(w3+md[m+2])%7; w2=(w1+md[m+3])%7; w3=(w2+md[m+4])%7; } }
709137542d90a983d7e3208e4e114c88c59d72e7
930e24019ec42ad7633eebfa974a05773167f210
/limbo/thirdparty/Csdp/include/index.h
6d99512ba15d030d91745f1d350ae5452525a695
[ "LicenseRef-scancode-unknown-license-reference", "MIT", "CPL-1.0" ]
permissive
limbo018/Limbo
ab3d75ff13d57042acb5b14e3f97c643bbd7f0c9
f66d910cc1ce589185bad3da1d26a10710036302
refs/heads/master
2023-08-21T16:20:39.651170
2023-07-21T08:36:24
2023-07-21T08:36:24
106,957,057
116
48
MIT
2023-07-21T08:36:25
2017-10-14T19:35:04
C++
UTF-8
C
false
false
842
h
index.h
/* Declarations needed to handle indexing into Fortran arrays and packed arrays. */ #ifndef BIT64 /* First, to convert fortran i,j indices into a C vector index. */ #define ijtok(iiii,jjjj,lda) ((jjjj-1)*lda+iiii-1) /* Packed indexing. */ #define ijtokp(iii,jjj,lda) ((iii+jjj*(jjj-1)/2)-1) /* Next, to convert C vector index into Fortran i,j indices. */ #define ktoi(k,lda) ((k % lda)+1) #define ktoj(k,lda) ((k/lda)+1) #else /* First, to convert fortran i,j indices into a C vector index. */ #define ijtok(iiii,jjjj,lda) ((jjjj-1L)*lda+iiii-1L) /* Packed indexing. */ #define ijtokp(iii,jjj,lda) (((long int)iii+(long int)jjj*(jjj-1L)/2-1L)) /* Next, to convert C vector index into Fortran i,j indices. */ #define ktoi(k,lda) (((long int)k % lda)+1L) #define ktoj(k,lda) (((long int)k/lda)+1L) #endif
33b9e6a4e9c3a4315f1f9a392048a5e5891ea93e
21c92afbd7fd022a206fb31294c523aebb770104
/SuiteSparse/GraphBLAS/Source/GB_free_memory.c
20c0a44c20ca5b12c43b6dc1940194d2d70a88e5
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-unknown-license-reference", "GPL-2.0-or-later", "GPL-3.0-only", "LGPL-2.1-or-later", "LGPL-2.0-or-later", "GPL-1.0-or-later", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
jlblancoc/suitesparse-metis-for-windows
70e6bcab2b525afb41758d61f823efa0618f67cf
5ee2eb4bc7bfd6d27af2f7fb027b1545cfc0fa3f
refs/heads/master
2023-08-30T21:15:39.624300
2023-03-09T10:16:48
2023-03-09T10:16:48
16,236,582
423
251
BSD-3-Clause
2023-03-09T10:18:08
2014-01-25T18:06:21
C
UTF-8
C
false
false
1,654
c
GB_free_memory.c
//------------------------------------------------------------------------------ // GB_free_memory: wrapper for free //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved. // http://suitesparse.com See GraphBLAS/Doc/License.txt for license. //------------------------------------------------------------------------------ // A wrapper for free. If p is NULL on input, it is not freed. // By default, GB_FREE is defined in GB.h as free. For a MATLAB mexFunction, // it is mxFree. It can also be defined at compile time with // -DGB_FREE=myfreefunc. #include "GB.h" void GB_free_memory ( void *p // pointer to allocated block of memory to free #ifdef GB_MALLOC_TRACKING , size_t nitems // number of items to free , size_t size_of_item // sizeof each item #endif ) { if (p != NULL) { #ifdef GB_MALLOC_TRACKING { // at least one item is always allocated nitems = GB_IMAX (1, nitems) ; int nmalloc = --GB_Global.nmalloc ; GB_Global.inuse -= nitems * size_of_item ; #ifdef GB_PRINT_MALLOC printf ("free: %14p %3d %1d n "GBd" size "GBd"\n", p, nmalloc, GB_Global.malloc_debug, (int64_t) nitems, (int64_t) size_of_item) ; if (nmalloc < 0) { printf ("%d free %p negative mallocs!\n", nmalloc, p) ; } #endif ASSERT (nmalloc >= 0) ; } #endif GB_FREE (p) ; } }
7dc137fb4a5f970503ee98508eb9388c7b809ddc
64e25c9d67db2ce4b5abe1a980a070fb59a2f938
/clang/lib/Headers/cm/include/cm/cm_vme.h
7ba511f9dfb264bd2d6ad09d5ab73d3f46769302
[ "NCSA", "MIT" ]
permissive
intel/cm-compiler
22d8b56baefc26d5576572f5aab6b3ecb3033300
9b2e628b788344088d8fcfd97d406db576f608af
refs/heads/cmc_monorepo_80
2023-08-28T13:09:41.523730
2023-08-04T23:23:23
2023-08-04T23:23:23
111,158,121
141
60
null
2023-05-01T21:17:30
2017-11-17T22:50:46
C++
UTF-8
C
false
false
810
h
cm_vme.h
/*========================== begin_copyright_notice ============================ Copyright (C) 2015-2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ #if (__INCLUDE_LEVEL__ == 1) static_assert(0, "CM:w:cm_vme.h should not be included explicitly - only " "<cm/cm.h> is required"); #endif #ifndef _CLANG_CM_VME_H_ #define _CLANG_CM_VME_H_ #if defined(CM_GEN7_5) #include "gen7_5_vme.h" #elif defined(CM_GEN8) || defined(CM_GEN8_5) #include "gen8_vme.h" #elif defined(CM_GEN9) || defined(CM_GEN9_5) #include "gen9_vme.h" #elif defined(CM_GEN10) #include "gen10_vme.h" #elif defined(CM_GEN11) #include "gen11_vme.h" #elif defined(CM_GEN12) #include "gen12_vme.h" #else #endif #endif /* _CLANG_CM_VME_H_ */
2ffe123e6fc329f8dbea8229ca3a88972587e21c
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/loongson/ls1cdev/drivers/board.c
390e9971b2274a0826c1b357b343ea0661059d1c
[ "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
1,409
c
board.c
/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2010-06-25 Bernard first version * 2011-08-08 lgnq modified for Loongson LS1B * 2015-07-06 chinesebear modified for Loongson LS1C * 2019-12-04 Jiaxun Yang Adapt new generic MIPS code */ #include <rtthread.h> #include <rthw.h> #include <mips.h> #include "board.h" #include "drv_uart.h" #include "ls1c.h" extern unsigned char __bss_end; #define RT_HW_HEAP_END (0x80000000 + MEM_SIZE) /** * This function will initial sam7s64 board. */ void rt_hw_board_init(void) { /* init hardware interrupt */ rt_hw_exception_init(); /* init hardware interrupt */ rt_hw_interrupt_init(); #ifdef RT_USING_HEAP rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END); #endif #ifdef RT_USING_SERIAL /* init hardware UART device */ rt_hw_uart_init(); #endif #if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE) /* set console device */ rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif /* init operating system timer */ rt_hw_timer_init(); #ifdef RT_USING_FPU /* init hardware fpu */ rt_hw_fpu_init(); #endif #ifdef RT_USING_COMPONENTS_INIT rt_components_board_init(); #endif rt_kprintf("current sr: 0x%08x\n", read_c0_status()); } /*@}*/
466044b4254443631e1f9304841735b2754108fb
05819963250c2ae0ba59ffef48d7c99a5b6b7cfd
/examples/usart_iso7816/main.c
5606ab5f9a0d2cafb4ec99970d0c8348a3907412
[ "LicenseRef-scancode-bsd-atmel" ]
permissive
atmelcorp/atmel-software-package
cefa3213069995d453d3b47b8b3aa7a7aca683ac
e0428c7c8175a42a2460cff27bb0501db0bbe160
refs/heads/master
2023-04-13T16:34:56.181081
2023-04-06T17:30:10
2023-04-11T06:05:12
47,840,424
117
94
NOASSERTION
2022-10-20T03:07:15
2015-12-11T17:18:56
C
UTF-8
C
false
false
13,130
c
main.c
/* ---------------------------------------------------------------------------- * SAM Software Package License * ---------------------------------------------------------------------------- * Copyright (c) 2015, Atmel Corporation * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the disclaimer below. * * Atmel's name may not be used to endorse or promote products derived from * this software without specific prior written permission. * * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ---------------------------------------------------------------------------- */ /** * \page usart_iso7816 USART ISO7816 Example * * \section Purpose * This example sends ISO 7816 commands to a smartcard connected to the * Xplained board on samA5D4x. * * \section Requirements * This example can be used on SAMA5D2x Xplained board * PB28 IO smartcard * PB30 CLK smartcard * ** with a Fieldbus shield. * PB29 MODE_VCC * PB31 STOP * PC0 RST * \section Description * The iso7816 software provide in this examples is use to transform APDU * commands to TPDU commands for the smart card. * The iso7816 provide here is for the protocol T=0 only. * The send and the receive of a character is made under polling. * In the file ISO7816_Init is defined all pins of the card. User must have to * change this pins according to his environment. * The driver is compliant with CASE 1, 2, 3 of the ISO7816-4 specification. * * \section Usage * -# Build the program and download it inside the evaluation board. Please * refer to the <a href="http://www.atmel.com/dyn/resources/prod_documents/6421B.pdf">SAM-BA User Guide</a>, * the <a href="http://www.atmel.com/dyn/resources/prod_documents/doc6310.pdf">GNU-Based Software Development</a> * application note or to the <a href="http://www.iar.com/website1/1.0.1.0/78/1/">IAR EWARM User and reference guides</a>, * depending on your chosen solution. * -# On the computer, open and configure a terminal application (e.g. * HyperTerminal on Microsoft Windows) with these settings: * - 115200 bauds * - 8 data bits * - No parity * - 1 stop bit * - No flow control * -# Connect the card reader to SAMA5D2 Xplained board: * <table border="1" cellpadding="2" cellspacing="0"> * <tr><td> C1: Vcc: 7816_3V5V </td><td> C5: Gnd</td> <td> C4: RFU</td></tr> * <tr><td> C2: Reset: 7816_RST</td> <td> C6: Vpp</td> <td> C8: RFU</td></tr> * <tr><td> C3: Clock: 7816_CLK</td> <td> C7: 7816_IO</td> </tr> * </table> * The push button on board (BP1) is used to simulate the smartcard insertion or removal. * -# Start the application. The following traces shall appear on the terminal: * \code * -- USART ISO7816 Example xxx -- * -- SAMxxxxx-xx * -- Compiled: xxx xx xxxx xx:xx:xx -- * Display the ATR * \endcode * * \section References * - usart_iso7816/main.c * - iso7816_4.c * - pio.h * - usart.h * */ /** \file * * This file contains all the specific code for the usart_iso7816 example. * */ /*------------------------------------------------------------------------------ * Headers *------------------------------------------------------------------------------*/ #include "board.h" #include "chip.h" #include "trace.h" #include "compiler.h" #include "timer.h" #include "peripherals/pmc.h" #include "gpio/pio.h" #include "peripherals/pit.h" #include "serial/usart_iso7816_4.h" #include "led/led.h" #include "serial/console.h" #include <stdbool.h> #include <stdio.h> #include <string.h> /*------------------------------------------------------------------------------ * Internal definitions *------------------------------------------------------------------------------*/ /** Delay for pushbutton debouncing (in milliseconds). */ #define DEBOUNCE_TIME 500 /** Num lock LED index. */ #define LED_NUMLOCK 0 /** Maximum uc_size in bytes of the smartcard answer to a uc_command. */ #define MAX_ANSWER_SIZE 10 /** Maximum ATR uc_size in bytes. */ #define MAX_ATR_SIZE 55 /** Define the baudrate of ISO7816 mode. */ #define ISO7816_BAUDRATE 9600 /** Define the FI_DI_RATIO filed value. */ #define ISO7816_FI_DI 372 #if defined(CONFIG_BOARD_SAMA5D2_PTC_EK) #include "config_sama5d2-ptc-ek.h" #elif defined(CONFIG_BOARD_SAMA5D2_XPLAINED) #include "config_sama5d2-xplained.h" #elif defined(CONFIG_BOARD_SAMA5D27_SOM1_EK) #include "config_sama5d27-som1-ek.h" #elif defined(CONFIG_BOARD_SAMA5D3_EK) #include "config_sama5d3-ek.h" #elif defined(CONFIG_BOARD_SAMA5D3_XPLAINED) #include "config_sama5d3-xplained.h" #elif defined(CONFIG_BOARD_SAMA5D4_EK) #include "config_sama5d4-ek.h" #elif defined(CONFIG_BOARD_SAMA5D4_XPLAINED) #include "config_sama5d4-xplained.h" #elif defined(CONFIG_BOARD_SAM9G15_EK) #include "config_sam9xx5-ek.h" #elif defined(CONFIG_BOARD_SAM9G25_EK) #include "config_sam9xx5-ek.h" #elif defined(CONFIG_BOARD_SAM9G35_EK) #include "config_sam9xx5-ek.h" #elif defined(CONFIG_BOARD_SAM9X25_EK) #include "config_sam9xx5-ek.h" #elif defined(CONFIG_BOARD_SAM9X35_EK) #include "config_sam9xx5-ek.h" #elif defined(CONFIG_BOARD_SAMV71_XPLAINED) #include "config_samv71-xplained.h" #elif defined(CONFIG_BOARD_SAMU70_XPLAINED) #include "config_samu70-xplained.h" #elif defined(CONFIG_BOARD_SAMV72_XPLAINED) #include "config_samv72-xplained.h" #elif defined(CONFIG_BOARD_SAM9X60_EK) #include "config_sam9x60-ek.h" #elif defined(CONFIG_BOARD_SAM9X60_CURIOSITY) #include "config_sam9x60-curiosity.h" #else #error Unsupported board! #endif /*------------------------------------------------------------------------------ * Internal variables *------------------------------------------------------------------------------*/ #ifdef PINS_PUSHBUTTONS /** Pushbutton \#1 pin instance. */ static const struct _pin button_pins[] = PINS_PUSHBUTTONS; #endif /*------------------------------------------------------------------------------ * Internal variables ISO7816 *------------------------------------------------------------------------------*/ /** Test command #1.*/ static const uint8_t testCommand1[] = {0x00, 0x10, 0x00, 0x00}; /** Test command #2.*/ static const uint8_t testCommand2[] = {0x00, 0x20, 0x00, 0x00, 0x02}; /** Test command #3.*/ static const uint8_t testCommand3[] = {0x00, 0x30, 0x00, 0x00, 0x02, 0x0A, 0x0B}; struct _iso7816_desc iso7816_desc = { .pin_stop = PIN_STOP_ISO7816, .pin_mod_vcc = PIN_MODE_VCC_ISO7816, .pin_rst = PIN_RST_ISO7816, .addr = USART_ADDR, .id = ID_USART, }; struct _iso7816_opt iso7816_opt = { .protocol_type = US_MR_USART_MODE_IS07816_T_0, .clock_sel = US_MR_USCLKS_MCK, .char_length = US_MR_CHRL_8_BIT, .sync = 0, .parity_type = US_MR_PAR_EVEN, .num_stop_bits = US_MR_NBSTOP_2_BIT, .bit_order = 0, .inhibit_nack = 0, .dis_suc_nack = 0, .max_iterations = 3, .iso7816_hz = ISO7816_BAUDRATE * ISO7816_FI_DI, .fidi_ratio = ISO7816_FI_DI, .time_guard = 5, }; static const struct _pin pins_com2[] = PIN_COM2_ISO7816; uint8_t smartcard = 0; /*------------------------------------------------------------------------------ * Internal functions *------------------------------------------------------------------------------*/ #ifdef PINS_PUSHBUTTONS /** * \brief Process Buttons Events * */ static void process_button_evt(uint8_t bt) { if ( smartcard == 0) { printf( "-I- Smartcard inserted\n\r" ) ; } else { printf( "-I- Smartcard removed\n\r" ) ; } smartcard = ~smartcard; } /** * \brief Handler for Buttons rising edge interrupt. * */ static void push_button_handler(uint32_t mask, uint32_t status, void* user_arg) { int i = 0; (void)user_arg; for (i = 0; i < ARRAY_SIZE(button_pins); ++i) { if (status & button_pins[i].mask) process_button_evt(i); } } /** * \brief Configure the Pushbuttons * * Configure the PIO as inputs and generate corresponding interrupt when * pressed or released. */ static void _configure_buttons(void) { int i; /* Adjust pio debounce filter parameters, uses 10 Hz filter. */ pio_set_debounce_filter(10); for (i = 0; i < ARRAY_SIZE(button_pins); ++i) { /* Configure pios as inputs. */ pio_configure(&button_pins[i], 1); /* Initialize pios interrupt with its handlers */ pio_add_handler_to_group(button_pins[i].group, button_pins[i].mask, push_button_handler, NULL); pio_enable_it(button_pins); } } #endif /* PINS_PUSHBUTTONS */ /*------------------------------------------------------------------------------ * Optional smartcard detection *------------------------------------------------------------------------------*/ /** * Displays a menu which enables the user to send several commands to the * smartcard and check its answers. */ static void _send_receive_commands( const struct _iso7816_desc* iso7816 ) { uint8_t pMessage[MAX_ANSWER_SIZE]; uint8_t ucSize ; uint8_t ucKey ; uint8_t command; uint8_t i; /* Clear message buffer */ memset( pMessage, 0, sizeof( pMessage ) ) ; /* Display menu */ printf( "-I- Choose the command to send:\n\r" ) ; printf( " 1. " ) ; for ( i=0 ; i < sizeof( testCommand1 ) ; i++ ) { printf( "0x%X ", testCommand1[i] ) ; } printf( "\n\r 2. " ) ; for ( i=0 ; i < sizeof( testCommand2 ) ; i++ ) { printf( "0x%X ", testCommand2[i] ) ; } printf( "\n\r 3. " ) ; for ( i=0 ; i < sizeof( testCommand3 ) ; i++ ) { printf( "0x%X ", testCommand3[i] ) ; } printf( "\n\r" ) ; /* Get user input */ ucKey = 0 ; while ( ucKey != 'q' ) { printf( "\r " ) ; printf( "\rChoice ? (q to quit): " ) ; ucKey = console_get_char() ; printf( "%c", ucKey ) ; command = ucKey - '0'; /* Check user input */ ucSize = 0 ; if ( command == 1 ) { printf( "\n\r-I- Sending command " ) ; for ( i=0 ; i < sizeof( testCommand1 ) ; i++ ) { printf( "0x%02X ", testCommand1[i] ) ; } printf( "...\n\r" ) ; ucSize = iso7816_xfr_block_TPDU_T0(iso7816, testCommand1, pMessage, sizeof( testCommand1 ) ) ; } else { if ( command == 2 ) { printf( "\n\r-I- Sending command " ) ; for ( i=0 ; i < sizeof( testCommand2 ) ; i++ ) { printf("0x%02X ", testCommand2[i] ) ; } printf( "...\n\r" ) ; ucSize = iso7816_xfr_block_TPDU_T0(iso7816, testCommand2, pMessage, sizeof( testCommand2 ) ) ; } else { if ( command == 3 ) { printf( "\n\r-I- Sending command " ) ; for ( i=0 ; i < sizeof( testCommand3 ) ; i++ ) { printf( "0x%02X ", testCommand3[i] ) ; } printf( "...\n\r" ) ; ucSize = iso7816_xfr_block_TPDU_T0(iso7816, testCommand3, pMessage, sizeof( testCommand3 ) ) ; } } } /* Output smartcard answer */ if ( ucSize > 0 ) { printf( "\n\rAnswer: " ) ; for ( i=0 ; i < ucSize ; i++ ) { printf( "0x%02X ", pMessage[i] ) ; } printf( "\n\r" ) ; } } printf( "Exit ...\n\r" ) ; } /*------------------------------------------------------------------------------ * Exported functions *------------------------------------------------------------------------------*/ /** * Initializes the DBGU and ISO7816 driver, and starts some tests. * \return Unused (ANSI-C compatibility) */ extern int main( void ) { uint8_t Atr[MAX_ATR_SIZE] ; uint8_t size ; /* Output example information */ console_example_info("USART ISO7816 Example"); led_set(LED_NUMLOCK); msleep(500); led_clear(LED_NUMLOCK); #ifdef PINS_PUSHBUTTONS /* PIO configuration for Button, use to simulate card detection. */ printf("Configure buttons with debouncing.\n\r"); _configure_buttons(); #endif /* Configure Pios usart*/ pio_configure(&pins_com2[0], ARRAY_SIZE(pins_com2)); /* Init ISO7816 interface */ iso7816_init(&iso7816_desc, &iso7816_opt); /* Warm reset */ iso7816_warm_reset(&iso7816_desc); /* Read ATR */ memset( Atr, 0, sizeof(Atr) ) ; iso7816_get_data_block_ATR(&iso7816_desc, Atr, &size ); /* Decode ATR */ iso7816_decode_ATR(Atr); /* Allow user to send some commands */ _send_receive_commands(&iso7816_desc); printf("\n\r Exit App \n\r"); while (1) ; }
e836fc2d7d4d0a02dcce3f0c77c361b9ddd298e1
3225f903ab65e9e242f250a02b3b74fc7e34b098
/software/pcie/kernel/main.c
dc22b3306dbde137115ba2a20ea1aa3fce0c6e28
[ "MIT", "BSD-2-Clause" ]
permissive
timvideos/litex-buildenv
6f7657a0d2836f66bbc8ad29f89f1f975eda7832
fafb0f1c645a0d36ff4947686b4d2d8e3433f686
refs/heads/master
2022-06-04T18:02:22.567089
2022-05-21T15:21:25
2022-05-21T15:21:25
115,785,208
217
88
BSD-2-Clause
2022-05-21T15:21:26
2017-12-30T08:50:22
Python
UTF-8
C
false
false
18,543
c
main.c
/* * LitePCIe driver * */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/types.h> #include <linux/ioctl.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/fs.h> #include <linux/mmtimer.h> #include <linux/miscdevice.h> #include <linux/posix-timers.h> #include <linux/interrupt.h> #include <linux/time.h> #include <linux/math64.h> #include <linux/mutex.h> #include <linux/slab.h> #include <linux/pci.h> #include <linux/pci_regs.h> #include <linux/delay.h> #include <linux/wait.h> #include "litepcie.h" #include "config.h" #include "csr.h" #include "flags.h" #define LITEPCIE_NAME "litepcie" #define LITEPCIE_MINOR_COUNT 4 #define DMA_BUFFER_SIZE PAGE_ALIGN(32768) #define DMA_BUFFER_MAP_SIZE (DMA_BUFFER_SIZE * DMA_BUFFER_COUNT) #define IRQ_MASK_DMA_READER (1 << DMA_READER_INTERRUPT) #define IRQ_MASK_DMA_WRITER (1 << DMA_WRITER_INTERRUPT) typedef struct { int minor; struct pci_dev *dev; phys_addr_t bar0_phys_addr; uint8_t *bar0_addr; /* virtual address of BAR0 */ uint8_t *dma_tx_bufs[DMA_BUFFER_COUNT]; unsigned long dma_tx_bufs_addr[DMA_BUFFER_COUNT]; uint8_t *dma_rx_bufs[DMA_BUFFER_COUNT]; unsigned long dma_rx_bufs_addr[DMA_BUFFER_COUNT]; uint8_t tx_dma_started; uint8_t rx_dma_started; wait_queue_head_t dma_waitqueue; } LitePCIeState; static dev_t litepcie_cdev; static struct cdev litepcie_cdev_struct; static LitePCIeState *litepcie_minor_table[LITEPCIE_MINOR_COUNT]; static void litepcie_end(struct pci_dev *dev, LitePCIeState *s); static int litepcie_dma_stop(LitePCIeState *s); static inline uint32_t litepcie_readl(LitePCIeState *s, uint32_t addr) { return readl(s->bar0_addr + addr); } static inline void litepcie_writel(LitePCIeState *s, uint32_t addr, uint32_t val) { return writel(val, s->bar0_addr + addr); } static void litepcie_enable_interrupt(LitePCIeState *s, int irq_num) { uint32_t v; v = litepcie_readl(s, CSR_MSI_ENABLE_ADDR); v |= (1 << irq_num); litepcie_writel(s, CSR_MSI_ENABLE_ADDR, v); } static void litepcie_disable_interrupt(LitePCIeState *s, int irq_num) { uint32_t v; v = litepcie_readl(s, CSR_MSI_ENABLE_ADDR); v &= ~(1 << irq_num); litepcie_writel(s, CSR_MSI_ENABLE_ADDR, v); } static int litepcie_open(struct inode *inode, struct file *file) { LitePCIeState *s; int minor; /* find PCI device */ minor = iminor(inode); if (minor < 0 || minor >= LITEPCIE_MINOR_COUNT) return -ENODEV; s = litepcie_minor_table[minor]; if (!s) return -ENODEV; file->private_data = s; return 0; } /* mmap the DMA buffers and registers to user space */ static int litepcie_mmap(struct file *file, struct vm_area_struct *vma) { LitePCIeState *s = file->private_data; unsigned long pfn; int is_tx, i; if (vma->vm_pgoff == 0) { if (vma->vm_end - vma->vm_start != DMA_BUFFER_MAP_SIZE) return -EINVAL; is_tx = 1; goto remap_ram; } else if (vma->vm_pgoff == (DMA_BUFFER_MAP_SIZE >> PAGE_SHIFT)) { if (vma->vm_end - vma->vm_start != DMA_BUFFER_MAP_SIZE) return -EINVAL; is_tx = 0; remap_ram: for(i = 0; i < DMA_BUFFER_COUNT; i++) { if (is_tx) pfn = __pa(s->dma_tx_bufs[i]) >> PAGE_SHIFT; else pfn = __pa(s->dma_rx_bufs[i]) >> PAGE_SHIFT; /* Note: the memory is cached, so the user must explicitly flush the CPU caches on architectures which require it. */ if (remap_pfn_range(vma, vma->vm_start + i * DMA_BUFFER_SIZE, pfn, DMA_BUFFER_SIZE, vma->vm_page_prot)) { printk(KERN_ERR LITEPCIE_NAME " remap_pfn_range failed\n"); return -EAGAIN; } } } else if (vma->vm_pgoff == ((2 * DMA_BUFFER_MAP_SIZE) >> PAGE_SHIFT)) { if (vma->vm_end - vma->vm_start != PCI_FPGA_BAR0_SIZE) return -EINVAL; pfn = s->bar0_phys_addr >> PAGE_SHIFT; /* not cached */ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); vma->vm_flags |= VM_IO; if (io_remap_pfn_range(vma, vma->vm_start, pfn, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { printk(KERN_ERR LITEPCIE_NAME " io_remap_pfn_range failed\n"); return -EAGAIN; } } else { return -EINVAL; } return 0; } static int litepcie_release(struct inode *inode, struct file *file) { LitePCIeState *s = file->private_data; litepcie_dma_stop(s); /* just in case: stop the DMA */ return 0; } static irqreturn_t litepcie_interrupt(int irq, void *data) { LitePCIeState *s = data; uint32_t clear_mask, irq_vector; irq_vector = litepcie_readl(s, CSR_MSI_VECTOR_ADDR); clear_mask = 0; if (irq_vector & (IRQ_MASK_DMA_READER | IRQ_MASK_DMA_WRITER)) { /* wake up processes waiting on dma_wait() */ wake_up_interruptible(&s->dma_waitqueue); clear_mask |= (IRQ_MASK_DMA_READER | IRQ_MASK_DMA_WRITER); } litepcie_writel(s, CSR_MSI_CLEAR_ADDR, clear_mask); return IRQ_HANDLED; } static int litepcie_dma_start(LitePCIeState *s, struct litepcie_ioctl_dma_start *m) { int i, val; if (s->tx_dma_started || s->rx_dma_started) return -EIO; if (m->tx_buf_size == 0 && m->rx_buf_size == 0) return -EINVAL; /* check alignment (XXX: what is the exact constraint ?) */ if ((m->tx_buf_size & 7) != 0 || (m->rx_buf_size & 7) != 0 || m->tx_buf_size > DMA_BUFFER_SIZE || m->rx_buf_size > DMA_BUFFER_SIZE) return -EINVAL; /* check buffer count */ if (m->tx_buf_count > DMA_BUFFER_COUNT) return -EINVAL; if (m->rx_buf_count > DMA_BUFFER_COUNT) return -EINVAL; val = ((m->dma_flags & DMA_LOOPBACK_ENABLE) != 0); litepcie_writel(s, CSR_DMA_LOOPBACK_ENABLE_ADDR, val); /* init DMA write */ if (m->rx_buf_size != 0) { litepcie_writel(s, CSR_DMA_WRITER_ENABLE_ADDR, 0); litepcie_writel(s, CSR_DMA_WRITER_TABLE_FLUSH_ADDR, 1); litepcie_writel(s, CSR_DMA_WRITER_TABLE_LOOP_PROG_N_ADDR, 0); for(i = 0; i < m->rx_buf_count; i++) { litepcie_writel(s, CSR_DMA_WRITER_TABLE_VALUE_ADDR, m->rx_buf_size); litepcie_writel(s, CSR_DMA_WRITER_TABLE_VALUE_ADDR + 4, s->dma_rx_bufs_addr[i]); litepcie_writel(s, CSR_DMA_WRITER_TABLE_WE_ADDR, 1); } litepcie_writel(s, CSR_DMA_WRITER_TABLE_LOOP_PROG_N_ADDR, 1); } /* init DMA read */ if (m->tx_buf_size != 0) { litepcie_writel(s, CSR_DMA_READER_ENABLE_ADDR, 0); litepcie_writel(s, CSR_DMA_READER_TABLE_FLUSH_ADDR, 1); litepcie_writel(s, CSR_DMA_READER_TABLE_LOOP_PROG_N_ADDR, 0); for(i = 0; i < m->tx_buf_count; i++) { litepcie_writel(s, CSR_DMA_READER_TABLE_VALUE_ADDR, m->tx_buf_size); litepcie_writel(s, CSR_DMA_READER_TABLE_VALUE_ADDR + 4, s->dma_tx_bufs_addr[i]); litepcie_writel(s, CSR_DMA_READER_TABLE_WE_ADDR, 1); } litepcie_writel(s, CSR_DMA_READER_TABLE_LOOP_PROG_N_ADDR, 1); } /* start DMA */ if (m->rx_buf_size != 0) { litepcie_writel(s, CSR_DMA_WRITER_ENABLE_ADDR, 1); s->rx_dma_started = 1; } if (m->tx_buf_size != 0) { litepcie_writel(s, CSR_DMA_READER_ENABLE_ADDR, 1); s->tx_dma_started = 1; } return 0; } static int litepcie_dma_wait(LitePCIeState *s, struct litepcie_ioctl_dma_wait *m) { unsigned long timeout; int ret, last_buf_num; DECLARE_WAITQUEUE(wait, current); if (m->tx_wait) { if (!s->tx_dma_started) return -EIO; last_buf_num = m->tx_buf_num; litepcie_enable_interrupt(s, DMA_READER_INTERRUPT); } else { if (!s->rx_dma_started) return -EIO; last_buf_num = m->rx_buf_num; litepcie_enable_interrupt(s, DMA_WRITER_INTERRUPT); } add_wait_queue(&s->dma_waitqueue, &wait); timeout = jiffies + msecs_to_jiffies(m->timeout); for (;;) { /* set current buffer */ if (s->tx_dma_started) { m->tx_buf_num = (litepcie_readl(s, CSR_DMA_READER_TABLE_LOOP_STATUS_ADDR) & 0xffff); } else { m->tx_buf_num = 0; } if (s->rx_dma_started) { m->rx_buf_num = (litepcie_readl(s, CSR_DMA_WRITER_TABLE_LOOP_STATUS_ADDR) & 0xffff); } else { m->rx_buf_num = 0; } if (m->tx_wait) { if (m->tx_buf_num != last_buf_num) break; } else { if (m->rx_buf_num != last_buf_num) break; } if ((long)(jiffies - timeout) > 0) { ret = -EAGAIN; goto done; } set_current_state(TASK_INTERRUPTIBLE); if (signal_pending(current)) { ret = -EINTR; goto done; } schedule(); } ret = 0; done: if (m->tx_wait) { litepcie_disable_interrupt(s, DMA_READER_INTERRUPT); } else { litepcie_disable_interrupt(s, DMA_WRITER_INTERRUPT); } __set_current_state(TASK_RUNNING); remove_wait_queue(&s->dma_waitqueue, &wait); return ret; } static int litepcie_dma_stop(LitePCIeState *s) { /* just to be sure, we disable the interrupts */ litepcie_disable_interrupt(s, DMA_READER_INTERRUPT); litepcie_disable_interrupt(s, DMA_WRITER_INTERRUPT); s->tx_dma_started = 0; litepcie_writel(s, CSR_DMA_READER_TABLE_LOOP_PROG_N_ADDR, 0); litepcie_writel(s, CSR_DMA_READER_TABLE_FLUSH_ADDR, 1); udelay(100); litepcie_writel(s, CSR_DMA_READER_ENABLE_ADDR, 0); s->rx_dma_started = 0; litepcie_writel(s, CSR_DMA_WRITER_TABLE_LOOP_PROG_N_ADDR, 0); litepcie_writel(s, CSR_DMA_WRITER_TABLE_FLUSH_ADDR, 1); udelay(100); litepcie_writel(s, CSR_DMA_WRITER_ENABLE_ADDR, 0); return 0; } static long litepcie_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { LitePCIeState *s = file->private_data; long ret; switch(cmd) { case LITEPCIE_IOCTL_GET_MMAP_INFO: { struct litepcie_ioctl_mmap_info m; m.dma_tx_buf_offset = 0; m.dma_tx_buf_size = DMA_BUFFER_SIZE; m.dma_tx_buf_count = DMA_BUFFER_COUNT; m.dma_rx_buf_offset = DMA_BUFFER_MAP_SIZE; m.dma_rx_buf_size = DMA_BUFFER_SIZE; m.dma_rx_buf_count = DMA_BUFFER_COUNT; m.reg_offset = 2 * DMA_BUFFER_MAP_SIZE; m.reg_size = PCI_FPGA_BAR0_SIZE; if (copy_to_user((void *)arg, &m, sizeof(m))) { ret = -EFAULT; break; } ret = 0; } break; case LITEPCIE_IOCTL_DMA_START: { struct litepcie_ioctl_dma_start m; if (copy_from_user(&m, (void *)arg, sizeof(m))) { ret = -EFAULT; break; } ret = litepcie_dma_start(s, &m); } break; case LITEPCIE_IOCTL_DMA_STOP: { ret = litepcie_dma_stop(s); } break; case LITEPCIE_IOCTL_DMA_WAIT: { struct litepcie_ioctl_dma_wait m; if (copy_from_user(&m, (void *)arg, sizeof(m))) { ret = -EFAULT; break; } ret = litepcie_dma_wait(s, &m); if (ret == 0) { if (copy_to_user((void *)arg, &m, sizeof(m))) { ret = -EFAULT; break; } } } break; default: ret = -ENOIOCTLCMD; break; } return ret; } static const struct file_operations litepcie_fops = { .owner = THIS_MODULE, .unlocked_ioctl = litepcie_ioctl, .open = litepcie_open, .release = litepcie_release, .mmap = litepcie_mmap, .llseek = no_llseek, }; static int litepcie_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { LitePCIeState *s = NULL; uint8_t rev_id; int ret, minor, i; printk(KERN_INFO LITEPCIE_NAME " Probing device\n"); /* find available minor */ for(minor = 0; minor < LITEPCIE_MINOR_COUNT; minor++) { if (!litepcie_minor_table[minor]) break; } if (minor == LITEPCIE_MINOR_COUNT) { printk(KERN_ERR LITEPCIE_NAME " Cannot allocate a minor\n"); ret = -ENODEV; goto fail1; } s = kzalloc(sizeof(LitePCIeState), GFP_KERNEL); if (!s) { printk(KERN_ERR LITEPCIE_NAME " Cannot allocate memory\n"); ret = -ENOMEM; goto fail1; } s->minor = minor; s->dev = dev; pci_set_drvdata(dev, s); ret = pci_enable_device(dev); if (ret != 0) { printk(KERN_ERR LITEPCIE_NAME " Cannot enable device\n"); goto fail1; } /* check device version */ pci_read_config_byte(dev, PCI_REVISION_ID, &rev_id); if (rev_id != 1) { printk(KERN_ERR LITEPCIE_NAME " Unsupported device version %d\n", rev_id); goto fail2; } if (pci_request_regions(dev, LITEPCIE_NAME) < 0) { printk(KERN_ERR LITEPCIE_NAME " Could not request regions\n"); goto fail2; } /* check BAR0 config */ if (!(pci_resource_flags(dev, 0) & IORESOURCE_MEM)) { printk(KERN_ERR LITEPCIE_NAME " Invalid BAR0 config\n"); goto fail3; } s->bar0_phys_addr = pci_resource_start(dev, 0); s->bar0_addr = pci_ioremap_bar(dev, 0); if (!s->bar0_addr) { printk(KERN_ERR LITEPCIE_NAME " Could not map BAR0\n"); goto fail3; } pci_set_master(dev); ret = pci_set_dma_mask(dev, DMA_BIT_MASK(32)); if (ret) { printk(KERN_ERR LITEPCIE_NAME " Failed to set DMA mask\n"); goto fail4; }; ret = pci_enable_msi(dev); if (ret) { printk(KERN_ERR LITEPCIE_NAME " Failed to enable MSI\n"); goto fail4; } if (request_irq(dev->irq, litepcie_interrupt, IRQF_SHARED, LITEPCIE_NAME, s) < 0) { printk(KERN_ERR LITEPCIE_NAME " Failed to allocate irq %d\n", dev->irq); goto fail5; } /* allocate DMA buffers */ for(i = 0; i < DMA_BUFFER_COUNT; i++) { s->dma_tx_bufs[i] = kzalloc(DMA_BUFFER_SIZE, GFP_KERNEL | GFP_DMA32); if (!s->dma_tx_bufs[i]) { printk(KERN_ERR LITEPCIE_NAME " Failed to allocate dma_tx_buf\n"); goto fail6; } s->dma_tx_bufs_addr[i] = pci_map_single(dev, s->dma_tx_bufs[i], DMA_BUFFER_SIZE, DMA_TO_DEVICE); if (!s->dma_tx_bufs_addr[i]) { ret = -ENOMEM; goto fail6; } } for(i = 0; i < DMA_BUFFER_COUNT; i++) { s->dma_rx_bufs[i] = kzalloc(DMA_BUFFER_SIZE, GFP_KERNEL | GFP_DMA32); if (!s->dma_rx_bufs[i]) { printk(KERN_ERR LITEPCIE_NAME " Failed to allocate dma_rx_buf\n"); goto fail6; } s->dma_rx_bufs_addr[i] = pci_map_single(dev, s->dma_rx_bufs[i], DMA_BUFFER_SIZE, DMA_FROM_DEVICE); if (!s->dma_rx_bufs_addr[i]) { ret = -ENOMEM; goto fail6; } } init_waitqueue_head(&s->dma_waitqueue); litepcie_minor_table[minor] = s; printk(KERN_INFO LITEPCIE_NAME " Assigned to minor %d\n", minor); return 0; fail6: litepcie_end(dev, s); free_irq(dev->irq, s); fail5: pci_disable_msi(dev); fail4: pci_iounmap(dev, s->bar0_addr); fail3: pci_release_regions(dev); fail2: pci_disable_device(dev); ret = -EIO; fail1: kfree(s); printk(KERN_ERR LITEPCIE_NAME " Error while probing device\n"); return ret; } static void litepcie_end(struct pci_dev *dev, LitePCIeState *s) { int i; for(i = 0; i < DMA_BUFFER_COUNT; i++) { if (s->dma_tx_bufs_addr[i]) { dma_unmap_single(&dev->dev, s->dma_tx_bufs_addr[i], DMA_BUFFER_SIZE, DMA_TO_DEVICE); } kfree(s->dma_tx_bufs[i]); } for(i = 0; i < DMA_BUFFER_COUNT; i++) { if (s->dma_rx_bufs_addr[i]) { dma_unmap_single(&dev->dev, s->dma_rx_bufs_addr[i], DMA_BUFFER_SIZE, DMA_FROM_DEVICE); } kfree(s->dma_rx_bufs[i]); } } static void litepcie_pci_remove(struct pci_dev *dev) { LitePCIeState *s = pci_get_drvdata(dev); printk(KERN_INFO LITEPCIE_NAME " Removing device\n"); litepcie_minor_table[s->minor] = NULL; litepcie_end(dev, s); free_irq(dev->irq, s); pci_disable_msi(dev); pci_iounmap(dev, s->bar0_addr); pci_disable_device(dev); pci_release_regions(dev); kfree(s); }; static const struct pci_device_id litepcie_pci_ids[] = { { PCI_DEVICE(PCI_FPGA_VENDOR_ID, PCI_FPGA_DEVICE_ID), }, { 0, } }; MODULE_DEVICE_TABLE(pci, litepcie_pci_ids); static struct pci_driver litepcie_pci_driver = { .name = LITEPCIE_NAME, .id_table = litepcie_pci_ids, .probe = litepcie_pci_probe, .remove = litepcie_pci_remove, }; static int __init litepcie_module_init(void) { int ret; ret = pci_register_driver(&litepcie_pci_driver); if (ret < 0) { printk(KERN_ERR LITEPCIE_NAME " Error while registering PCI driver\n"); goto fail1; } ret = alloc_chrdev_region(&litepcie_cdev, 0, LITEPCIE_MINOR_COUNT, LITEPCIE_NAME); if (ret < 0) { printk(KERN_ERR LITEPCIE_NAME " Could not allocate char device\n"); goto fail2; } cdev_init(&litepcie_cdev_struct, &litepcie_fops); ret = cdev_add(&litepcie_cdev_struct, litepcie_cdev, LITEPCIE_MINOR_COUNT); if (ret < 0) { printk(KERN_ERR LITEPCIE_NAME " Could not register char device\n"); goto fail3; } return 0; fail3: unregister_chrdev_region(litepcie_cdev, LITEPCIE_MINOR_COUNT); fail2: pci_unregister_driver(&litepcie_pci_driver); fail1: return ret; } static void __exit litepcie_module_exit(void) { cdev_del(&litepcie_cdev_struct); unregister_chrdev_region(litepcie_cdev, LITEPCIE_MINOR_COUNT); pci_unregister_driver(&litepcie_pci_driver); } module_init(litepcie_module_init); module_exit(litepcie_module_exit); MODULE_LICENSE("GPL");
88a846794d1c1403164c29e97cdc35eabdd6d40c
c26d7b0ed875357278e61627da2da0650da77986
/src/cmd/ccom/arch-mips/table.c
f70de8fdee85177d82af43d1a8361acb91c387df
[ "BSD-3-Clause" ]
permissive
RetroBSD/retrobsd
5343d9e3c424637fc3ad5b03fe720b2744490025
486f81f6abff01c7dcc207235cd2979b226a95ff
refs/heads/master
2023-09-02T23:12:05.110883
2023-07-07T18:41:40
2023-07-07T18:41:40
18,598,087
282
59
BSD-3-Clause
2023-07-18T07:35:36
2014-04-09T13:25:46
C
UTF-8
C
false
false
34,867
c
table.c
/* $Id: table.c,v 1.14 2010/09/19 13:54:41 ragge Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * MIPS port by Jan Enoksson (janeno-1@student.ltu.se) and * Simon Olsson (simols-1@student.ltu.se) 2005. * * It appears that the target machine was big endian. The original * code contained many endian aspects which are now handled in * machine-independent code. * * On MIPS, the assembler does an amazing amount of work for us. * We don't have to worry about PIC, nor about finding the address * of SNAMES. Whenever possible, we defer the work to the assembler. */ #include "pass2.h" #define TUWORD TUNSIGNED|TULONG #define TSWORD TINT|TLONG #define TWORD TUWORD|TSWORD struct optab table[] = { /* First entry must be an empty entry */ { -1, FOREFF, SANY, TANY, SANY, TANY, 0, 0, "", }, /* PCONVs are usually not necessary */ { PCONV, INAREG, SAREG, TWORD|TPOINT, SAREG, TWORD|TPOINT, 0, RLEFT, " # convert between word and pointer", }, /* * Conversions of integral<->integral types */ { SCONV, INAREG, SOREG, TCHAR, SAREG, TSWORD|TSHORT, NAREG, RESC1, " lb A1,AL # convert oreg char to short/int\n" " nop\n", }, { SCONV, INAREG, SOREG, TCHAR, SAREG, TUWORD|TUSHORT|TUCHAR, NAREG, RESC1, " lbu A1,AL # convert oreg char to uchar/ushort/uint\n" " nop\n", }, { SCONV, INAREG, SOREG, TUCHAR, SAREG, TWORD|TSHORT|TUSHORT, NAREG, RESC1, " lbu A1,AL # convert oreg uchar to (u)short/(u)int\n" " nop\n", }, { SCONV, INBREG, SOREG, TCHAR, SBREG, TLONGLONG, NBREG, RESC1, " lb A1,AL # convert oreg char to longlong\n" " nop\n" " sra U1,A1,31\n", }, /* chor -> ulonglong handled later */ { SCONV, INBREG, SOREG, TUCHAR, SBREG, TLONGLONG|TULONGLONG, NBREG, RESC1, " lbu A1,AL # convert oreg uchar to (u)longlong\n" " move U1,$zero\n", }, { SCONV, INAREG, SOREG, TSHORT|TUSHORT, SAREG, TCHAR, NAREG, RESC1, " lb A1,AL # convert oreg (u)short to char (endianness problem?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TSHORT|TUSHORT, SAREG, TUCHAR, NAREG, RESC1, " lbu A1,AL # convert oreg (u)short to uchar (endianness problem?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TSHORT, SAREG, TSWORD, NAREG, RESC1, " lh A1,AL # convert oreg short to int\n" " nop\n", }, { SCONV, INAREG, SOREG, TSHORT, SAREG, TUWORD, NAREG, RESC1, " lhu A1,AL # convert oreg short to uint\n" " nop\n", }, { SCONV, INAREG, SOREG, TUSHORT, SAREG, TWORD, NAREG, RESC1, " lhu A1,AL # convert oreg ushort to (u)int\n" " nop\n", }, { SCONV, INBREG, SOREG, TSHORT, SBREG, TLONGLONG, NBREG, RESC1, " lh A1,AL # convert oreg short to longlong\n" " nop\n" " sra U1,A1,31\n", }, { SCONV, INBREG, SOREG, TSHORT, SBREG, TULONGLONG, NBREG, RESC1, " lhu A1,AL # convert oreg short to ulonglong\n" " nop\n" " move U1,$zero\n", }, { SCONV, INBREG, SOREG, TUSHORT, SBREG, TLONGLONG|TULONGLONG, NBREG, RESC1, " lhu A1,AL # convert oreg ushort to (u)longlong\n" " move U1,$zero\n", }, { SCONV, INAREG, SOREG, TWORD, SAREG, TCHAR, NAREG, RESC1, " lb A1,AL # convert oreg word to char (endianness problem here?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TWORD, SAREG, TUCHAR, NAREG, RESC1, " lbu A1,AL # convert oreg word to uchar (endianness problem here?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TWORD, SAREG, TSHORT, NAREG, RESC1, " lh A1,AL # convert oreg word to short (endianness problem here?)\n" " nop\n", }, /* convert (u)long to ushort */ { SCONV, INAREG, SOREG, TWORD, SAREG, TUSHORT, NAREG, RESC1, " lhu A1,AL # convert oreg word to ushort (endianness problem here?)\n" " nop\n", }, { SCONV, INBREG, SOREG, TSWORD, SBREG, TLONGLONG|TULONGLONG, NBREG, RESC1, " lw A1,AL # convert oreg int/long to (u)llong (endianness problem here?)\n" " nop\n" " sra U1,A1,31\n" }, { SCONV, INBREG, SOREG, TUWORD, SBREG, TLONGLONG|TULONGLONG, NBREG, RESC1, " lw A1,AL # convert oreg (u)int to (u)llong (endianness problem here?)\n" " move U1,$zero\n", }, { SCONV, INAREG, SOREG, TLONGLONG|TULONGLONG, SAREG, TCHAR, NAREG, RESC1, " lb A1,AL # convert oreg (u)llong to char (endianness problem here?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TLONGLONG|TULONGLONG, SAREG, TUCHAR, NAREG, RESC1, " lbu A1,AL # convert oreg (u)llong to uchar (endianness problem?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TLONGLONG|TULONGLONG, SAREG, TSHORT, NAREG, RESC1, " lh A1,AL # convert oreg (u)llong to short (endianness problem?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TLONGLONG|TULONGLONG, SAREG, TUSHORT, NAREG, RESC1, " lhu A1,AL # convert oreg (u)llong to ushort (endianness problem here?)\n" " nop\n", }, { SCONV, INAREG, SOREG, TLONGLONG|TULONGLONG, SAREG, TWORD, NAREG, RESC1, " lw A1,AL # convert oreg (u)llong to (u)int (endianness problem here?)\n" " nop\n", }, /* * Conversions of integral types (register-register) * * For each deunsigned type, they look something like this: * * signed -> bigger signed - nothing to do * signed -> bigger unsigned - clear the top bits (of source type) * * signed -> smaller signed - sign-extend the bits (to dest type) * signed -> smaller unsigned - clear the top bits (of dest type) * unsigned -> smaller signed - sign-extend top bits (to dest type) * unsigned -> smaller unsigned - clear the top bits (of dest type) * * unsigned -> bigger - nothing to do */ { SCONV, INAREG, SAREG, TPOINT|TWORD, SAREG, TPOINT|TWORD, 0, RLEFT, " # convert int to int\n", }, { SCONV, INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, 0, RLEFT, " # convert (u)longlong to (u)longlong", }, { SCONV, INAREG, SAREG, TCHAR, SAREG, TSWORD|TSHORT, 0, RLEFT, " # convert char to short/int\n", }, { SCONV, INAREG, SAREG, TCHAR, SAREG, TUWORD|TUSHORT|TUCHAR, NAREG|NASL, RESC1, " andi A1,AL,255 # convert char to uchar/ushort/uint\n", }, { SCONV, INAREG, SAREG, TUCHAR, SAREG, TCHAR, NAREG|NASL, RESC1, " sll A1,AL,24 # convert uchar to char\n" " sra A1,A1,24\n", }, { SCONV, INAREG, SAREG, TUCHAR, SAREG, TWORD|TSHORT|TUSHORT, 0, RLEFT, " # convert uchar to (u)short/(u)int\n", }, { SCONV, INAREG, SAREG, TSHORT, SAREG, TCHAR, NAREG|NASL, RESC1, " sll A1,AL,24 # convert short to char\n" " sra A1,A1,24\n", }, { SCONV, INAREG, SAREG, TSHORT, SAREG, TUCHAR, NAREG|NASL, RESC1, " andi A1,AL,255 # convert short to uchar\n", }, { SCONV, INAREG, SAREG, TSHORT, SAREG, TUWORD|TUSHORT, NAREG|NASL, RESC1, " andi A1,AL,65535 # convert short to ushort\n", }, { SCONV, INAREG, SAREG, TSHORT, SAREG, TSWORD, NAREG|NASL, RESC1, " sll A1,AL,16 # convert short to ushort\n" " sra A1,A1,16\n", }, { SCONV, INAREG, SAREG, TUSHORT, SAREG, TCHAR, NAREG|NASL, RESC1, " sll A1,AL,24 # convert short to char\n" " sra A1,A1,24\n", }, { SCONV, INAREG, SAREG, TUSHORT, SAREG, TUCHAR, NAREG|NASL, RESC1, " andi A1,AL,255 # convert ushort to char\n", }, { SCONV, INAREG, SAREG, TUSHORT, SAREG, TSHORT, NAREG|NASL, RESC1, " sll A1,AL,16 # convert short to ushort\n" " sra A1,A1,16\n", }, { SCONV, INAREG, SAREG, TUSHORT, SAREG, TWORD, 0, RDEST, " # convert ushort to (u)int\n", }, { SCONV, INAREG, SAREG, TSWORD, SAREG, TCHAR, NAREG|NASL, RESC1, " sll A1,AL,8 # convert int to char\n" " sra A1,A1,8\n", }, { SCONV, INAREG, SAREG, TSWORD, SAREG, TUCHAR, NAREG|NASL, RESC1, " andi A1,AL,255 # convert int to uchar\n", }, { SCONV, INAREG, SAREG, TSWORD, SAREG, TSHORT, NAREG|NASL, RESC1, " sll A1,AL,16 # convert int to short\n" " sra A1,A1,16\n", }, { SCONV, INAREG, SAREG, TSWORD, SAREG, TUSHORT, NAREG|NASL, RESC1, " andi A1,AL,65535 # convert int to ushort\n", }, { SCONV, INAREG, SAREG, TUWORD, SAREG, TCHAR, NAREG|NASL, RESC1, " sll A1,AL,24 # convert int to char\n" " sra A1,A1,24\n", }, { SCONV, INAREG, SAREG, TUWORD, SAREG, TUCHAR, NAREG|NASL, RESC1, " andi A1,AL,255 # convert int to uchar\n", }, { SCONV, INAREG, SAREG, TUWORD, SAREG, TSHORT, NAREG|NASL, RESC1, " sll A1,AL,16 # convert int to short\n" " sra A1,A1,16\n", }, { SCONV, INAREG, SAREG, TUWORD, SAREG, TUSHORT, NAREG|NASL, RESC1, " andi A1,AL,65535 # convert int to ushort\n", }, { SCONV, INBREG, SAREG, TSWORD|TSHORT|TCHAR, SBREG, TLONGLONG, NBREG, RESC1, " move A1,AL # convert int/short/char to longlong\n" " sra U1,AL,31\n", }, { SCONV, INBREG, SAREG, TSWORD|TSHORT|TCHAR, SBREG, TULONGLONG, NBREG, RESC1, " move A1,AL # convert int/short/char to ulonglong\n" " move U1,$zero\n", }, { SCONV, INBREG, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, SBREG, TLONGLONG|TULONGLONG, NBREG, RESC1, " move A1,AL # convert (u)int/(u)short/(u)char to ulonglong\n" " move U1,$zero\n", }, { SCONV, INAREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TWORD, NAREG, RESC1, " move A1,AL # convert (u)longlong to int\n", }, { SCONV, INAREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TSHORT, NAREG, RESC1, " sll A1,AL,16 # convert (u)longlong to short\n" " sra A1,A1,16\n", }, { SCONV, INAREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TCHAR, NAREG, RESC1, " sll A1,AL,24 # convert (u)longlong to char\n" " sra A1,A1,24\n", }, { SCONV, INAREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TUSHORT, NAREG, RESC1, " andi A1,AL,65535 # convert (u)longlong to ushort\n", }, { SCONV, INAREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TUCHAR, NAREG, RESC1, " andi A1,AL,255 # convert (u)longlong to uchar\n", }, { SCONV, INCREG, SCREG, TFLOAT, SCREG, TDOUBLE|TLDOUBLE, NCREG, RESC1, " cvt.d.s A1,AL # convert float to (l)double\n", }, { SCONV, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TFLOAT, NCREG, RESC1, " cvt.s.d A1,AL # convert (l)double to float\n", }, { SCONV, INCREG, SAREG, TWORD, SCREG, TFLOAT, NCREG, RESC1, " mtc1 AL,A1 # convert (u)int to float\n" " nop\n" " cvt.s.w A1,A1\n", }, { SCONV, INCREG, SOREG, TWORD, SCREG, TFLOAT, NCREG, RESC1, " l.s A1,AL # convert (u)int to float\n" " nop\n" " cvt.s.w A1,A1\n", }, { SCONV, INCREG, SAREG, TWORD, SCREG, TDOUBLE|TLDOUBLE, NCREG, RESC1, " mtc1 AL,A1 # convert (u)int to (l)double\n" " nop\n" " cvt.d.w A1,A1\n", }, { SCONV, INCREG, SOREG, TWORD, SCREG, TDOUBLE|TLDOUBLE, NCREG, RESC1, " l.d A1,AL # convert (u)int to (l)double\n" " nop\n" " cvt.d.w A1,A1\n", }, { SCONV, INAREG, SCREG, TFLOAT, SAREG, TWORD, NCREG|NAREG, RESC1, " cvt.w.s A2,AL # convert float to (u)int\n" " mfc1 A1,A2\n" " nop\n", }, { SCONV, FOREFF, SCREG, TFLOAT, SOREG, TWORD, NCREG, RDEST, " cvt.w.s A1,AL # convert float to (u)int\n" " s.s A1,AR\n" " nop\n", }, { SCONV, INAREG, SCREG, TDOUBLE|TLDOUBLE, SAREG, TWORD, NCREG|NAREG, RESC1, " cvt.w.d A2,AL # convert (l)double to (u)int\n" " mfc1 A1,A2\n" " nop\n", }, { SCONV, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, 0, RLEFT, " # convert between double and ldouble\n", }, { SCONV, INCREG, SBREG, TLONGLONG|TULONGLONG, SCREG, TFLOAT, NSPECIAL|NCREG, RESC1, "ZF", }, { SCONV, INCREG, SBREG, TLONGLONG|TULONGLONG, SCREG, TDOUBLE|TLDOUBLE, NSPECIAL|NCREG, RESC1, "ZF", }, { SCONV, INBREG, SCREG, TDOUBLE|TLDOUBLE, SBREG, TLONGLONG|TULONGLONG, NSPECIAL|NBREG, RESC1, "ZF", }, { SCONV, INBREG, SCREG, TFLOAT, SBREG, TLONGLONG|TULONGLONG, NSPECIAL|NBREG, RESC1, "ZF", }, /* * Multiplication and division */ { MUL, INAREG, SAREG, TUWORD|TUSHORT|TUCHAR, SAREG, TUWORD|TUSHORT|TUCHAR, NAREG|NASR|NASL, RESC1, " multu AL,AR # unsigned multiply\n" " mflo A1\n" " nop\n" " nop\n", }, /* this previous will match on unsigned/unsigned multiplication first */ { MUL, INAREG, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, NAREG|NASR|NASL, RESC1, " mult AL,AR # signed multiply\n" " mflo A1\n" " nop\n" " nop\n", }, { MUL, INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, 2*NBREG, RESC1, " multu AL,AR\n" " mfhi U1\n" " mflo A1\n" " mult AL,UR\n" " mflo A2\n" " nop\n" " nop\n" " addu A2,U1,A2\n" " mult UL,AR\n" " mflo U2\n" " nop\n" " nop\n" " addu U1,A2,U2\n", }, { MUL, INCREG, SCREG, TFLOAT, SCREG, TFLOAT, NCREG, RESC1, " mul.s A1,AL,AR # floating-point multiply\n", }, { MUL, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, NCREG, RESC1, " mul.d A1,AL,AR # double-floating-point multiply\n", }, { DIV, INAREG, SAREG, TUWORD|TUSHORT|TUCHAR, SAREG, TUWORD|TUSHORT|TUCHAR, NAREG|NASR|NASL, RESC1, " divu AL,AR # unsigned division\n" " mflo A1\n" " nop\n" " nop\n", }, /* the previous rule will match unsigned/unsigned first */ { DIV, INAREG, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, NAREG|NASR|NASL, RESC1, " div AL,AR # signed division\n" " mflo A1\n" " nop\n" " nop\n", }, { DIV, INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, NSPECIAL|NBREG, RESC1, "ZE", }, { DIV, INCREG, SCREG, TFLOAT, SCREG, TFLOAT, NCREG, RESC1, " div.s A1,AL,AR # floating-point division\n", }, { DIV, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, NCREG, RESC1, " div.d A1,AL,AR # double-floating-point division\n", }, { MOD, INAREG, SAREG, TUWORD|TUSHORT|TUCHAR, SAREG, TUWORD|TUSHORT|TUCHAR, NAREG, RESC1, " divu AL,AR # signed modulo\n" " mfhi A1\n" " nop\n" " nop\n", }, /* the previous rule will match unsigned%unsigned first */ { MOD, INAREG, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, SAREG, TWORD|TUSHORT|TSHORT|TUCHAR|TCHAR, NAREG, RESC1, " div AL,AR # signed modulo\n" " mfhi A1\n" " nop\n" " nop\n", }, { MOD, INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, NSPECIAL|NBREG, RESC1, "ZE", }, /* * Templates for unsigned values needs to come before OPSIMP */ { PLUS, INBREG, SBREG, TULONGLONG|TLONGLONG, SBREG, TULONGLONG|TLONGLONG, 2*NBREG, RESC1, " addu A1,AL,AR # 64-bit addition\n" " sltu A2,A1,AR\n" " addu U1,UL,UR\n" " addu U1,U1,A2\n", }, { PLUS, INAREG, SAREG, TSWORD|TSHORT|TCHAR, SSCON, TANY, NAREG|NASL, RESC1, " addi A1,AL,AR\n", }, { PLUS, INAREG, SAREG, TUWORD|TPOINT|TUSHORT|TUCHAR, SSCON, TANY, NAREG|NASL, RESC1, " addiu A1,AL,AR\n", }, { PLUS, INAREG, SAREG, TUWORD|TPOINT|TUSHORT|TUCHAR, SAREG, TUWORD|TUSHORT|TUCHAR, NAREG|NASL, RESC1, " addu A1,AL,AR\n", }, { PLUS, INAREG, SAREG, TSWORD|TSHORT|TCHAR, SAREG, TSWORD|TSHORT|TCHAR, NAREG|NASL, RESC1, " add A1,AL,AR\n", }, { PLUS, INCREG, SCREG, TFLOAT, SCREG, TFLOAT, NCREG|NCSL, RESC1, " add.s A1,AL,AR\n", }, { PLUS, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, NCREG|NCSL, RESC1, " add.d A1,AL,AR\n", }, { MINUS, INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, 2*NBREG, RESC1, " sltu A2,AL,AR # 64-bit subtraction\n" " subu A1,AL,AR\n" " subu U1,UL,UR\n" " subu U1,U1,A2\n", }, { MINUS, INAREG, SAREG, TUWORD|TPOINT|TUSHORT|TUCHAR, SSCON, TANY, NAREG|NASL, RESC1, " subu A1,AL,AR\n", }, { MINUS, INAREG, SAREG, TSWORD|TSHORT|TCHAR, SSCON, TANY, NAREG|NASL, RESC1, " sub A1,AL,AR\n", }, { MINUS, INAREG, SAREG, TSWORD|TSHORT|TCHAR, SAREG, TSWORD|TSHORT|TCHAR, NAREG|NASL, RESC1, " sub A1,AL,AR\n", }, { MINUS, INCREG, SCREG, TFLOAT, SCREG, TFLOAT, NCREG|NCSL, RESC1, " sub.s A1,AL,AR\n", }, { MINUS, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, NCREG|NCSL, RESC1, " sub.d A1,AL,AR\n", }, { UMINUS, INAREG, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, SANY, TANY, NAREG|NASL, RESC1, " neg A1,AL\n", }, { UMINUS, INBREG, SBREG, TLONGLONG|TULONGLONG, SANY, TANY, NBREG|NAREG|NBSL, RESC2, " subu A1,$zero,AL\n" " subu U1,$zero,UL\n" " sltu A2,$zero,A1\n" " subu U1,U1,A2\n", }, { UMINUS, INCREG, SCREG, TFLOAT, SCREG, TFLOAT, NCREG|NCSL, RESC1, " neg.s A1,AL\n", }, { UMINUS, INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, NCREG|NCSL, RESC1, " neg.d A1,AL\n", }, /* Simple 'op rd, rs, rt' or 'op rt, rs, imm' operations */ { OPSIMP, INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, NBREG|NBSR|NBSL, RESC1, " O A1,AL,AR\n" " O U1,UL,UR\n", }, { OPSIMP, INAREG, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TUCHAR|TCHAR, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TUCHAR|TCHAR, NAREG|NASR|NASL, RESC1, " O A1,AL,AR\n", }, { OPSIMP, INAREG, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TUCHAR|TCHAR, SPCON, TANY, NAREG|NASL, RESC1, " Oi A1,AL,AR\n", }, /* * Shift instructions */ { RS, INAREG, SAREG, TSWORD|TSHORT|TCHAR, SCON, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESC1, " sra A1,AL,AR # shift right by constant\n", }, { RS, INAREG, SAREG, TUWORD|TUSHORT|TUCHAR, SCON, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESC1, " srl A1,AL,AR # shift right by constant\n", }, { LS, INAREG, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, SCON, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESC1, " sll A1,AL,AR # shift left by constant\n", }, { RS, INAREG, SAREG, TSWORD|TSHORT|TCHAR, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESC1, " srav A1,AL,AR # shift right by register\n", }, { RS, INAREG, SAREG, TUWORD|TUSHORT|TUCHAR, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESC1, " srlv A1,AL,AR # shift right by register\n", }, { LS, INAREG, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESC1, " sllv A1,AL,AR # shift left by register\n", }, { RS, INBREG, SBREG, TLONGLONG|TULONGLONG, SCON, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NBREG, RESC1, "ZO", }, { LS, INBREG, SBREG, TLONGLONG|TULONGLONG, SCON, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NBREG, RESC1, "ZO", }, { RS, INBREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NSPECIAL|NBREG, RESC1, "ZE", }, { LS, INBREG, SBREG, TLONGLONG|TULONGLONG, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NSPECIAL|NBREG, RESC1, "ZE", }, /* * Rule for unary one's complement */ { COMPL, INAREG, SAREG, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, SANY, TANY, NAREG|NASL, RESC1, " nor A1,$zero,AL # complement\n", }, { COMPL, INBREG, SBREG, TLONGLONG|TULONGLONG, SANY, TANY, NBREG|NBSL, RESC1, " nor A1,$zero,AL # complement\n" " nor U1,$zero,UL\n", }, /* * The next rules takes care of assignments. "=". */ { ASSIGN, FOREFF|INAREG, SOREG|SNAME, TWORD|TPOINT, SAREG, TWORD|TPOINT, 0, RDEST, " sw AR,AL # store (u)int/(u)long\n" " nop\n", }, { ASSIGN, FOREFF|INAREG, SOREG|SNAME, TSHORT|TUSHORT, SAREG, TSHORT|TUSHORT, 0, RDEST, " sh AR,AL # store (u)short\n" " nop\n", }, { ASSIGN, FOREFF|INAREG, SOREG|SNAME, TCHAR|TUCHAR, SAREG, TCHAR|TUCHAR, 0, RDEST, " sb AR,AL # store (u)char\n" " nop\n", }, { ASSIGN, FOREFF|INBREG, SOREG|SNAME, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, 0, RDEST, " sw UR,UL # store (u)longlong\n" " nop\n" " sw AR,AL\n" " nop\n", }, { ASSIGN, FOREFF|INBREG, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, 0, RDEST, " move UL,UR # register move\n" " move AL,AR\n", }, { ASSIGN, FOREFF|INAREG, SAREG, TANY, SAREG, TANY, 0, RDEST, " move AL,AR # register move\n", }, { ASSIGN, FOREFF|INCREG, SCREG, TFLOAT, SCREG, TFLOAT, 0, RDEST, " mov.s AL,AR # register move\n", }, { ASSIGN, FOREFF|INCREG, SCREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, 0, RDEST, " mov.d AL,AR # register move\n", }, { ASSIGN, FOREFF|INCREG, SNAME|SOREG, TFLOAT, SCREG, TFLOAT, 0, RDEST, " s.s AR,AL # store floating-point reg to oreg/sname\n" " nop\n", }, { ASSIGN, FOREFF|INCREG, SNAME|SOREG, TDOUBLE|TLDOUBLE, SCREG, TDOUBLE|TLDOUBLE, 0, RDEST, " s.d AR,AL # store double floating-point reg to oreg/sname\n" " nop\n", }, { ASSIGN, FOREFF|INAREG, SFLD, TANY, SOREG|SNAME, TANY, 3*NAREG, RDEST, " lw A1,AR # bit-field assignment\n" " li A3,M\n" " lw A2,AL\n" " sll A1,A1,H\n" " and A1,A1,A3\n" " nor A3,$zero,A3\n" " and A2,A2,A3\n" " or A2,A2,A1\n" " sw A2,AL\n" "F lw AD,AR\n" "F nop\n" "F sll AD,AD,32-S\n" "F sra AD,AD,32-S\n", }, /* XXX we can optimise this away */ { ASSIGN, FOREFF|INAREG, SFLD, TANY, SCON, TANY, 3*NAREG, RDEST, " li A1,AR # bit-field assignment\n" " lw A2,AL\n" " li A3,M\n" " sll A1,A1,H\n" " and A1,A1,A3\n" " nor A3,$zero,A3\n" " and A2,A2,A3\n" " or A2,A2,A1\n" " sw A2,AL\n" "F li AD,AR\n" "F sll AD,AD,32-S\n" "F sra AD,AD,32-S\n", }, { ASSIGN, FOREFF|INAREG, SFLD, TANY, SAREG, TANY, 3*NAREG, RDEST, " move A1,AR # bit-field assignment\n" " lw A2,AL\n" " li A3,M\n" " sll A1,A1,H\n" " and A1,A1,A3\n" " nor A3,$zero,A3\n" " and A2,A2,A3\n" " or A2,A2,A1\n" " sw A2,AL\n" "F move AR,AD\n" "F sll AD,AD,32-S\n" "F sra AD,AD,32-S\n", }, { STASG, INAREG|FOREFF, SOREG|SNAME, TANY, SAREG, TPTRTO|TANY, NSPECIAL, RDEST, "ZQ", }, /* * Compare instructions */ { EQ, FORCC, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, 0, RESCC, " beq AL,AR,LC\n" " nop\n", }, { NE, FORCC, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, 0, RESCC, " bne AL,AR,LC\n" " nop\n", }, { OPLOG, FORCC, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, SZERO, TANY, 0, RESCC, " O AL,LC\n" " nop\n", }, { OPLOG, FORCC, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESCC, " sub A1,AL,AR\n" " O A1,LC\n" " nop\n", }, { OPLOG, FORCC, SAREG, TWORD|TPOINT|TSHORT|TUSHORT|TCHAR|TUCHAR, SSCON, TWORD|TSHORT|TUSHORT|TCHAR|TUCHAR, NAREG|NASL, RESCC, " sub A1,AL,AR\n" " O A1,LC\n" " nop\n", }, { OPLOG, FORCC, SBREG, TLONGLONG|TULONGLONG, SBREG, TLONGLONG|TULONGLONG, NAREG, RESCC, "ZD", }, { OPLOG, FORCC, SCREG, TFLOAT|TDOUBLE|TLDOUBLE, SCREG, TFLOAT|TDOUBLE|TLDOUBLE, 0, RESCC, "ZG", }, /* * Convert LTYPE to reg. */ { OPLTYPE, INAREG, SANY, TANY, SOREG|SNAME, TCHAR, NAREG, RESC1, " lb A1,AL # load char to reg\n" " nop\n", }, { OPLTYPE, INAREG, SANY, TANY, SOREG|SNAME, TUCHAR, NAREG, RESC1, " lbu A1,AL # load uchar to reg\n" " nop\n", }, { OPLTYPE, INAREG, SANY, TANY, SOREG|SNAME, TSHORT, NAREG, RESC1, " lh A1,AL # load short to reg\n" " nop\n", }, { OPLTYPE, INAREG, SANY, TANY, SOREG|SNAME, TUSHORT, NAREG, RESC1, " lhu A1,AL # load ushort to reg\n" " nop\n", }, { OPLTYPE, INAREG, SANY, TANY, SOREG|SNAME, TWORD|TPOINT, NAREG, RESC1, " lw A1,AL # load (u)int/(u)long to reg\n" " nop\n", }, { OPLTYPE, INBREG, SANY, TANY, SOREG|SNAME, TLONGLONG|TULONGLONG, NBREG, RESC1, " lw U1,UL # load (u)longlong to reg\n" " nop\n" " lw A1,AL\n" " nop\n", }, { OPLTYPE, INAREG, SANY, TANY, SCON, TPOINT, NAREG, RESC1, " la A1,AL # load constant address to reg\n", }, { OPLTYPE, INAREG, SANY, TANY, SZERO, TANY, NAREG, RESC1, " move A1,$zero # load 0 to reg\n", }, { OPLTYPE, INAREG, SANY, TANY, SCON, TANY, NAREG, RESC1, " li A1,AL # load constant to reg\n", }, { OPLTYPE, INBREG, SANY, TANY, SZERO, TANY, NBREG, RESC1, " move A1,$zero # load 0 to reg\n" " move U1,$zero\n", }, { OPLTYPE, INBREG, SANY, TANY, SCON, TANY, NBREG, RESC1, " li A1,AL # load constant to reg\n" " li U1,UL\n", }, { OPLTYPE, INAREG, SANY, TANY, SANY, TANY, NAREG, RESC1, " move A1,AL\n", }, { OPLTYPE, INCREG, SANY, TANY, SZERO, TFLOAT, NCREG, RESC1, " mtc1 $zero,A1 # load 0 to float reg\n" " nop\n", }, { OPLTYPE, INCREG, SANY, TANY, SZERO, TDOUBLE|TLDOUBLE, NCREG, RESC1, " mtc1 $zero,A1 # load 0 to (l)double reg\n" " mtc1 $zero,U1\n" " nop\n", }, { OPLTYPE, INCREG, SANY, TANY, SOREG|SNAME, TFLOAT, NCREG, RESC1, " l.s A1,AL # load into floating-point reg\n" " nop\n", }, { OPLTYPE, INCREG, SANY, TANY, OREG|SNAME, TDOUBLE|TLDOUBLE, NCREG, RESC1, " l.d A1,AL # load into double floating-point reg\n" " nop\n", }, /* * Jumps. */ { GOTO, FOREFF, SCON, TANY, SANY, TANY, 0, RNOP, " j LL # goto label\n" " nop\n" " nop\n", }, /* * Subroutine calls. */ { CALL, FOREFF, SCON, TANY, SANY, TANY, 0, 0, " subu $sp,$sp,16 # call (args, no result) to scon/sname\n" " jal CL\n" " nop\n" "ZC", }, { UCALL, FOREFF, SCON, TANY, SANY, TANY, 0, 0, " jal CL # call (no args, no result) to scon/sname\n" " nop\n", }, { CALL, INAREG, SCON, TANY, SAREG, TANY, NAREG, RESC1, /* should be 0 */ " subu $sp,$sp,16 # call (args, result in v0) to scon/sname\n" " jal CL\n" " nop\n" "ZC", }, { UCALL, INAREG, SCON, TANY, SAREG, TANY, NAREG, RESC1, /* should be 0 */ " jal CL # call (no args, result in v0) to scon/sname\n" " nop\n", }, { CALL, INBREG, SCON, TANY, SBREG, TANY, NBREG, RESC1, /* should be 0 */ " subu $sp,$sp,16 # call (args, result in v0:v1) to scon/sname\n" " jal CL\n" " nop\n" "ZC", }, { UCALL, INBREG, SCON, TANY, SBREG, TANY, NBREG, RESC1, /* should be 0 */ " jal CL # call (no args, result in v0:v1) to scon/sname\n" " nop\n", }, { CALL, INCREG, SCON, TANY, SCREG, TANY, NCREG, RESC1, /* should be 0 */ " subu $sp,$sp,16 # call (args, result in f0:f1) to scon/sname\n" " jal CL\n" " nop\n" "ZC", }, { UCALL, INCREG, SCON, TANY, SCREG, TANY, NCREG, RESC1, /* should be 0 */ " jal CL # call (no args, result in v0:v1) to scon/sname\n" " nop\n", }, { CALL, FOREFF, SAREG, TANY, SANY, TANY, 0, 0, " subu $sp,$sp,16 # call (args, no result) to reg\n" " move $25,AL\n" " jal $25\n" " nop\n" "ZC", }, { UCALL, FOREFF, SAREG, TANY, SANY, TANY, 0, 0, " move $25,AL\n" " jal $25 # call (no args, no result) to reg\n" " nop\n", }, { CALL, INAREG, SAREG, TANY, SAREG, TANY, NAREG, RESC1, /* should be 0 */ " subu $sp,$sp,16 # call (args, result) to reg\n" " move $25,AL\n" " jal $25\n" " nop\n" "ZC", }, { UCALL, INAREG, SAREG, TANY, SAREG, TANY, NAREG, RESC1, /* should be 0 */ " move $25,AL\n" " jal $25 # call (no args, result) to reg\n" " nop\n", }, { CALL, INBREG, SAREG, TANY, SBREG, TANY, NBREG, RESC1, /* should be 0 */ " subu $sp,$sp,16 # call (args, result) to reg\n" " move $25,AL\n" " jal $25\n" " nop\n" "ZC", }, { UCALL, INBREG, SAREG, TANY, SBREG, TANY, NBREG, RESC1, /* should be 0 */ " move $25,AL\n" " jal $25 # call (no args, result) to reg\n" " nop\n", }, { CALL, INCREG, SAREG, TANY, SCREG, TANY, NCREG, RESC1, /* should be 0 */ " subu $sp,$sp,16 # call (args, result) to reg\n" " move $25,AL\n" " jal $25\n" " nop\n" "ZC", }, { UCALL, INCREG, SCREG, TANY, SCREG, TANY, NCREG, RESC1, /* should be 0 */ " move $25,AL\n" " jal $25 # call (no args, result) to reg\n" " nop\n", }, /* struct return */ { USTCALL, FOREFF, SCON|SNAME, TANY, SANY, TANY, 0, 0, " jal CL\n" " nop\n", }, { USTCALL, FOREFF, SAREG, TANY, SANY, TANY, 0, 0, " move $25,AL\n" " jal $25\n" " nop\n", }, { USTCALL, INAREG, SCON|SNAME, TANY, SANY, TANY, NAREG|NASL, RESC1, " jal CL\n" " nop\n", }, { USTCALL, INAREG, SAREG, TANY, SANY, TANY, NAREG|NASL, RESC1, " move $25,AL\n" " jal $25\n" " nop\n", }, { STCALL, FOREFF, SCON|SNAME, TANY, SANY, TANY, 0, 0, " subu $sp,$sp,16\n" " jal CL\n" " nop\n" "ZC", }, { STCALL, FOREFF, SAREG, TANY, SANY, TANY, 0, 0, " subu $sp,$sp,16\n" " move $25,AL\n" " jal $25\n" " nop\n" "ZC", }, { STCALL, INAREG, SCON|SNAME, TANY, SANY, TANY, NAREG|NASL, RESC1, " subu $sp,$sp,16\n" " jal CL\n" " nop\n" "ZC", }, { STCALL, INAREG, SAREG, TANY, SANY, TANY, 0, 0, " subu $sp,$sp,16\n" " move $25,AL\n" " jal $25\n" " nop\n" "ZC", }, /* * Function arguments */ #if 0 /* intentionally write out the register for (u)short/(u)char */ { FUNARG, FOREFF, SAREG, TWORD|TPOINT|TUSHORT|TSHORT|TUCHAR|TCHAR, SANY, TWORD|TPOINT|TUSHORT|TSHORT|TUCHAR|TCHAR, 0, 0, " subu $sp,$sp,4 # save function arg to stack\n" " sw AL,($sp)\n" " #nop\n", }, { FUNARG, FOREFF, SBREG, TLONGLONG|TULONGLONG, SANY, TLONGLONG|TULONGLONG, 0, 0, " addi $sp,$sp,-8 # save function arg to stack (endian problem here?\n" " sw UL,4($sp)\n" " sw AL,($sp)\n" " #nop\n", }, { FUNARG, FOREFF, SCREG, TFLOAT, SANY, TFLOAT, 0, 0, " addi $sp,$sp,-4 # save function arg to stack\n" " s.s AL,($sp)\n" " #nop\n", }, { FUNARG, FOREFF, SCREG, TDOUBLE|TLDOUBLE, SANY, TDOUBLE|TLDOUBLE, 0, 0, " addi $sp,$sp,-8 # save function arg to stack\n" " s.d AL,($sp)\n" " #nop\n", }, #endif { STARG, FOREFF, SAREG, TANY, SANY, TSTRUCT, NSPECIAL, 0, "ZH", }, /* * Indirection operators. */ { UMUL, INAREG, SANY, TPOINT|TWORD, SOREG, TPOINT|TWORD, NAREG, RESC1, " lw A1,AL # word load\n" " nop\n", }, { UMUL, INAREG, SANY, TSHORT|TUSHORT, SOREG, TSHORT|TUSHORT, NAREG, RESC1, " lh A1,AL # (u)short load\n" " nop\n", }, { UMUL, INAREG, SANY, TCHAR|TUCHAR, SOREG, TCHAR|TUCHAR, NAREG, RESC1, " lb A1,AL # (u)char load\n" " nop\n", }, { UMUL, INBREG, SANY, TLONGLONG|TULONGLONG, SOREG, TLONGLONG|TULONGLONG, NBREG, RESC1, " lw A1,AL # (u)longlong load - endian problem here?\n" " nop\n" " lw U1,UL\n" " nop\n", }, { UMUL, INCREG, SANY, TFLOAT, SOREG, TFLOAT, NCREG, RESC1, " l.s A1,AL # float load\n" " nop\n", }, { UMUL, INCREG, SANY, TDOUBLE|TLDOUBLE, SOREG, TDOUBLE|TLDOUBLE, NCREG, RESC1, " l.d A1,AL # float load\n" " nop\n", }, #if 0 { UMUL, INCREG, SANY, TDOUBLE|TLDOUBLE, SAREG, TPOINT, NCREG, RESC1, " l.d A1,(AL)\n" " nop\n", }, { UMUL, INAREG, SANY, TPOINT|TWORD, SNAME, TPOINT|TWORD, NAREG, RESC1, " la A1,AL # sname word load\n" " lw A1,(A1)\n" " nop\n", }, { UMUL, INAREG, SANY, TSHORT|TUSHORT, SNAME, TSHORT|TUSHORT, NAREG, RESC1, " la A1,AL # sname (u)short load\n" " lh A1,(A1)\n" " nop\n", }, { UMUL, INAREG, SANY, TCHAR|TUCHAR, SNAME, TCHAR|TUCHAR, NAREG, RESC1, " la A1,AL # sname (u)char load\n" " lb A1,(A1)\n" " nop\n", }, { UMUL, INBREG, SANY, TLONGLONG|TULONGLONG, SNAME, TLONGLONG|TULONGLONG, NBREG|NAREG, RESC1, " la A2,AL # sname (u)long long load - endian problems here?\n" " lw A1,(A1)\n" " nop\n" " lw U1,4(A1)\n" " nop\n", }, #endif { UMUL, INAREG, SANY, TPOINT|TWORD, SAREG, TPOINT|TWORD, NAREG, RESC1, " lw A1,(AL) # word load\n" " nop\n", }, #if 0 { UMUL, INAREG, SANY, TSHORT|TUSHORT, SAREG, TPTRTO|TSHORT|TUSHORT, NAREG, RESC1, " lh A1,(AL) # (u)short load\n" " nop\n", }, { UMUL, INAREG, SANY, TCHAR|TUCHAR, SAREG, TPTRTO|TCHAR|TUCHAR, NAREG|NASL, RESC1, " lb A1,(AL) # (u)char load\n" " nop\n", }, { UMUL, INBREG, SANY, TLONGLONG|TULONGLONG, SAREG, TPTRTO|TLONGLONG|TULONGLONG, NBREG, RESC1, " lw A1,(AL) # (u)long long load - endianness problems?\n" " nop\n" " lw U1,4(AL)" " nop\n", }, #endif #define DF(x) FORREW,SANY,TANY,SANY,TANY,REWRITE,x,"" { FLD, DF(FLD), }, { FREE, FREE, FREE, FREE, FREE, FREE, FREE, FREE, "help; I'm in trouble\n" }, }; int tablesize = sizeof(table)/sizeof(table[0]);
1a0e1565301189effb00fc778354e87f30d51883
ae31542273a142210a1ff30fb76ed9d45d38eba9
/src/include/utils/sampling.h
29b98d7166912e0f2a2e32b4d9f031dd0c824134
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "OpenSSL", "LicenseRef-scancode-stream-benchmark", "ISC", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-ssleay-windows", "BSD-2-Clause", "Python-2.0" ]
permissive
greenplum-db/gpdb
8334837bceb2d5d51a684500793d11b190117c6a
2c0f8f0fb24a2d7a7da114dc80f5f5a2712fca50
refs/heads/main
2023-08-22T02:03:03.806269
2023-08-21T22:59:53
2023-08-22T01:17:10
44,781,140
6,417
2,082
Apache-2.0
2023-09-14T20:33:42
2015-10-23T00:25:17
C
UTF-8
C
false
false
2,625
h
sampling.h
/*------------------------------------------------------------------------- * * sampling.h * definitions for sampling functions * * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/utils/sampling.h * *------------------------------------------------------------------------- */ #ifndef SAMPLING_H #define SAMPLING_H #include "storage/block.h" /* for typedef BlockNumber */ /* Random generator for sampling code */ typedef unsigned short SamplerRandomState[3]; extern void sampler_random_init_state(long seed, SamplerRandomState randstate); extern double sampler_random_fract(SamplerRandomState randstate); /* Block sampling methods */ /* Data structure for Algorithm S from Knuth 3.4.2 */ typedef struct { BlockNumber N; /* number of blocks, known in advance */ int n; /* desired sample size */ BlockNumber t; /* current block number */ int m; /* blocks selected so far */ SamplerRandomState randstate; /* random generator state */ } BlockSamplerData; typedef BlockSamplerData *BlockSampler; extern BlockNumber BlockSampler_Init(BlockSampler bs, BlockNumber nblocks, int samplesize, long randseed); extern bool BlockSampler_HasMore(BlockSampler bs); extern BlockNumber BlockSampler_Next(BlockSampler bs); /* 64 bit version of BlockSampler (used for sampling AO/CO table rows) */ typedef struct { int64 N; /* number of objects, known in advance */ int64 n; /* desired sample size */ int64 t; /* current object number */ int64 m; /* objects selected so far */ SamplerRandomState randstate; /* random generator state */ } RowSamplerData; typedef RowSamplerData *RowSampler; extern void RowSampler_Init(RowSampler rs, int64 nobjects, int64 samplesize, long randseed); extern bool RowSampler_HasMore(RowSampler rs); extern int64 RowSampler_Next(RowSampler rs); /* Reservoir sampling methods */ typedef struct { double W; SamplerRandomState randstate; /* random generator state */ } ReservoirStateData; typedef ReservoirStateData *ReservoirState; extern void reservoir_init_selection_state(ReservoirState rs, int n); extern double reservoir_get_next_S(ReservoirState rs, double t, int n); /* Old API, still in use by assorted FDWs */ /* For backwards compatibility, these declarations are duplicated in vacuum.h */ extern double anl_random_fract(void); extern double anl_init_selection_state(int n); extern double anl_get_next_S(double t, int n, double *stateptr); #endif /* SAMPLING_H */
c96ea0596cbfa541759b4dae18e86ff1d5323efc
290c96ec464bc49084696b1df71c088ddcc9ffff
/modules/network/smap-ingame/irx_imports.h
45f41eee663b6b3bf513071d2bf11ac2936646ac
[ "AFL-3.0" ]
permissive
ps2homebrew/Open-PS2-Loader
c23cce4e8b6d08bdc4b229da9bcb7c9bd31fc255
9e12706ef5ac0f4a3b72fe5860c1e38d2e94e151
refs/heads/master
2023-08-14T21:37:43.222099
2023-08-14T18:18:19
2023-08-14T18:18:19
70,989,832
1,378
262
AFL-3.0
2023-08-19T21:20:14
2016-10-15T13:37:16
C
UTF-8
C
false
false
294
h
irx_imports.h
#ifndef IOP_IRX_IMPORTS_H #define IOP_IRX_IMPORTS_H #include <irx.h> /* Please keep these in alphabetical order! */ #include <dmacman.h> #include <dev9.h> #include "smstcpip.h" #include "smsutils.h" #include <stdio.h> #include <sysclib.h> #include <thbase.h> #endif /* IOP_IRX_IMPORTS_H */
5c18eb9ea885abfd636b6a85e30277d29ce96be1
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/third_party/brotli/enc/encoder_dict.c
0c93e009a5ffba3114b5f59d6c28b5d034d111dd
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "GPL-1.0-or-later", "LGPL-2.0-or-later", "Apache-2.0" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
C
false
false
23,147
c
encoder_dict.c
/* Copyright 2017 Google Inc. All Rights Reserved. Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ #include "encoder_dict.h" #include <stdlib.h> /* malloc, free */ #include "../common/dictionary.h" #include "../common/platform.h" #include "../common/shared_dictionary_internal.h" #include "../common/transform.h" #include "compound_dictionary.h" #include "dictionary_hash.h" #include "memory.h" #include "quality.h" #include "hash.h" #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif #define NUM_HASH_BITS 15u #define NUM_HASH_BUCKETS (1u << NUM_HASH_BITS) static void BrotliTrieInit(BrotliTrie* trie) { trie->pool_capacity = 0; trie->pool_size = 0; trie->pool = 0; /* Set up the root node */ trie->root.single = 0; trie->root.len_ = 0; trie->root.idx_ = 0; trie->root.sub = 0; } static void BrotliTrieFree(MemoryManager* m, BrotliTrie* trie) { BrotliFree(m, trie->pool); } /* Initializes to RFC 7932 static dictionary / transforms. */ static void InitEncoderDictionary(BrotliEncoderDictionary* dict) { dict->words = BrotliGetDictionary(); dict->num_transforms = (uint32_t)BrotliGetTransforms()->num_transforms; dict->hash_table_words = kStaticDictionaryHashWords; dict->hash_table_lengths = kStaticDictionaryHashLengths; dict->buckets = kStaticDictionaryBuckets; dict->dict_words = kStaticDictionaryWords; dict->cutoffTransformsCount = kCutoffTransformsCount; dict->cutoffTransforms = kCutoffTransforms; dict->parent = 0; dict->hash_table_data_words_ = 0; dict->hash_table_data_lengths_ = 0; dict->buckets_alloc_size_ = 0; dict->buckets_data_ = 0; dict->dict_words_alloc_size_ = 0; dict->dict_words_data_ = 0; dict->words_instance_ = 0; dict->has_words_heavy = BROTLI_FALSE; BrotliTrieInit(&dict->trie); } static void BrotliDestroyEncoderDictionary(MemoryManager* m, BrotliEncoderDictionary* dict) { BrotliFree(m, dict->hash_table_data_words_); BrotliFree(m, dict->hash_table_data_lengths_); BrotliFree(m, dict->buckets_data_); BrotliFree(m, dict->dict_words_data_); BrotliFree(m, dict->words_instance_); BrotliTrieFree(m, &dict->trie); } /* Word length must be at least 4 bytes */ static uint32_t Hash(const uint8_t* data, int bits) { uint32_t h = BROTLI_UNALIGNED_LOAD32LE(data) * kHashMul32; /* The higher bits contain more mixture from the multiplication, so we take our results from there. */ return h >> (32 - bits); } /* Theoretical max possible word size after transform */ #define kTransformedBufferSize \ (256 + 256 + SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH) /* To be safe buffer must have at least kTransformedBufferSize */ static void TransformedDictionaryWord(uint32_t word_idx, int len, int transform, const BrotliTransforms* transforms, const BrotliEncoderDictionary* dict, uint8_t* buffer, size_t* size) { const uint8_t* dict_word = &dict->words->data[ dict->words->offsets_by_length[len] + (uint32_t)len * word_idx]; *size = (size_t)BrotliTransformDictionaryWord(buffer, dict_word, len, transforms, transform); } static DictWord MakeDictWord(uint8_t len, uint8_t transform, uint16_t idx) { DictWord result; result.len = len; result.transform = transform; result.idx = idx; return result; } static uint32_t BrotliTrieAlloc(MemoryManager* m, size_t num, BrotliTrie* trie, BrotliTrieNode** keep) { uint32_t result; uint32_t keep_index = 0; if (keep && *keep != &trie->root) { /* Optional node to keep, since address may change after re-allocating */ keep_index = (uint32_t)(*keep - trie->pool); } if (trie->pool_size == 0) { /* Have a dummy node in the front. We do not want the result to be 0, it must be at least 1, 0 represents "null pointer" */ trie->pool_size = 1; } BROTLI_ENSURE_CAPACITY(m, BrotliTrieNode, trie->pool, trie->pool_capacity, trie->pool_size + num); if (BROTLI_IS_OOM(m)) return 0; /* Init the new nodes to empty */ memset(trie->pool + trie->pool_size, 0, sizeof(*trie->pool) * num); result = (uint32_t)trie->pool_size; trie->pool_size += num; if (keep && *keep != &trie->root) { *keep = trie->pool + keep_index; } return result; } /** * len and idx: payload for last node * word, size: the string * index: position in the string */ static BROTLI_BOOL BrotliTrieNodeAdd(MemoryManager* m, uint8_t len, uint32_t idx, const uint8_t* word, size_t size, int index, BrotliTrieNode* node, BrotliTrie* trie) { BrotliTrieNode* child = 0; uint8_t c; if ((size_t)index == size) { if (!node->len_ || idx < node->idx_) { node->len_ = len; node->idx_ = idx; } return BROTLI_TRUE; } c = word[index]; if (node->single && c != node->c) { BrotliTrieNode old = trie->pool[node->sub]; uint32_t new_nodes = BrotliTrieAlloc(m, 32, trie, &node); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; node->single = 0; node->sub = new_nodes; trie->pool[node->sub + (node->c >> 4)].sub = new_nodes + 16; trie->pool[trie->pool[node->sub + (node->c >> 4)].sub + (node->c & 15)] = old; } if (!node->sub) { uint32_t new_node = BrotliTrieAlloc(m, 1, trie, &node); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; node->single = 1; node->c = c; node->sub = new_node; } if (node->single) { child = &trie->pool[node->sub]; } else { if (!trie->pool[node->sub + (c >> 4)].sub) { uint32_t new_nodes = BrotliTrieAlloc(m, 16, trie, &node); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; trie->pool[node->sub + (c >> 4)].sub = new_nodes; } child = &trie->pool[trie->pool[node->sub + (c >> 4)].sub + (c & 15)]; } return BrotliTrieNodeAdd(m, len, idx, word, size, index + 1, child, trie); } static BROTLI_BOOL BrotliTrieAdd(MemoryManager* m, uint8_t len, uint32_t idx, const uint8_t* word, size_t size, BrotliTrie* trie) { return BrotliTrieNodeAdd(m, len, idx, word, size, 0, &trie->root, trie); } const BrotliTrieNode* BrotliTrieSub(const BrotliTrie* trie, const BrotliTrieNode* node, uint8_t c) { BrotliTrieNode* temp_node; if (node->single) { if (node->c == c) return &trie->pool[node->sub]; return 0; } if (!node->sub) return 0; temp_node = &trie->pool[node->sub + (c >> 4)]; if (!temp_node->sub) return 0; return &trie->pool[temp_node->sub + (c & 15)]; } static const BrotliTrieNode* BrotliTrieFind(const BrotliTrie* trie, const uint8_t* word, size_t size) { const BrotliTrieNode* node = &trie->root; size_t i; for (i = 0; i < size; i++) { node = BrotliTrieSub(trie, node, word[i]); if (!node) return 0; } return node; } static BROTLI_BOOL BuildDictionaryLut(MemoryManager* m, const BrotliTransforms* transforms, BrotliEncoderDictionary* dict) { uint32_t i; DictWord* dict_words; uint16_t* buckets; DictWord** words_by_hash; size_t* words_by_hash_size; size_t* words_by_hash_capacity; BrotliTrie dedup; uint8_t word[kTransformedBufferSize]; size_t word_size; size_t total = 0; uint8_t l; uint16_t idx; BrotliTrieInit(&dedup); words_by_hash = (DictWord**)BrotliAllocate(m, sizeof(*words_by_hash) * NUM_HASH_BUCKETS); words_by_hash_size = (size_t*)BrotliAllocate(m, sizeof(*words_by_hash_size) * NUM_HASH_BUCKETS); words_by_hash_capacity = (size_t*)BrotliAllocate(m, sizeof(*words_by_hash_capacity) * NUM_HASH_BUCKETS); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; memset(words_by_hash, 0, sizeof(*words_by_hash) * NUM_HASH_BUCKETS); memset(words_by_hash_size, 0, sizeof(*words_by_hash_size) * NUM_HASH_BUCKETS); memset(words_by_hash_capacity, 0, sizeof(*words_by_hash_capacity) * NUM_HASH_BUCKETS); if (transforms->num_transforms > 0) { for (l = SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH; l <= SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH; ++l) { uint16_t n = dict->words->size_bits_by_length[l] ? (uint16_t)(1 << dict->words->size_bits_by_length[l]) : 0u; for (idx = 0; idx < n; ++idx) { uint32_t key; /* First transform (usually identity) */ TransformedDictionaryWord(idx, l, 0, transforms, dict, word, &word_size); /* Cannot hash words smaller than 4 bytes */ if (word_size < 4) { /* Break instead of continue, all next words of this length will have same length after transform */ break; } if (!BrotliTrieAdd(m, 0, idx, word, word_size, &dedup)) { return BROTLI_FALSE; } key = Hash(word, NUM_HASH_BITS); BROTLI_ENSURE_CAPACITY_APPEND(m, DictWord, words_by_hash[key], words_by_hash_capacity[key], words_by_hash_size[key], MakeDictWord(l, 0, idx)); ++total; } } } /* These LUT transforms only supported if no custom transforms. This is ok, we will use the heavy trie instead. */ if (transforms == BrotliGetTransforms()) { for (l = SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH; l <= SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH; ++l) { uint16_t n = dict->words->size_bits_by_length[l] ? (uint16_t)(1 << dict->words->size_bits_by_length[l]) : 0u; for (idx = 0; idx < n; ++idx) { int k; BROTLI_BOOL is_ascii = BROTLI_TRUE; size_t offset = dict->words->offsets_by_length[l] + (size_t)l * idx; const uint8_t* data = &dict->words->data[offset]; for (k = 0; k < l; ++k) { if (data[k] >= 128) is_ascii = BROTLI_FALSE; } if (data[0] < 128) { int transform = 9; /* {empty, uppercase first, empty} */ uint32_t ix = idx + (uint32_t)transform * n; const BrotliTrieNode* it; TransformedDictionaryWord(idx, l, transform, transforms, dict, word, &word_size); it = BrotliTrieFind(&dedup, word, word_size); if (!it || it->idx_ > ix) { uint32_t key = Hash(word, NUM_HASH_BITS); if (!BrotliTrieAdd(m, 0, ix, word, word_size, &dedup)) { return BROTLI_FALSE; } BROTLI_ENSURE_CAPACITY_APPEND(m, DictWord, words_by_hash[key], words_by_hash_capacity[key], words_by_hash_size[key], MakeDictWord(l, BROTLI_TRANSFORM_UPPERCASE_FIRST, idx)); ++total; } } if (is_ascii) { int transform = 44; /* {empty, uppercase all, empty} */ uint32_t ix = idx + (uint32_t)transform * n; const BrotliTrieNode* it; TransformedDictionaryWord(idx, l, transform, transforms, dict, word, &word_size); it = BrotliTrieFind(&dedup, word, word_size); if (!it || it->idx_ > ix) { uint32_t key = Hash(word, NUM_HASH_BITS); if (!BrotliTrieAdd(m, 0, ix, word, word_size, &dedup)) { return BROTLI_FALSE; } BROTLI_ENSURE_CAPACITY_APPEND(m, DictWord, words_by_hash[key], words_by_hash_capacity[key], words_by_hash_size[key], MakeDictWord(l, BROTLI_TRANSFORM_UPPERCASE_ALL, idx)); ++total; } } } } } dict_words = (DictWord*)BrotliAllocate(m, sizeof(*dict->dict_words) * (total + 1)); buckets = (uint16_t*)BrotliAllocate(m, sizeof(*dict->buckets) * NUM_HASH_BUCKETS); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; dict->dict_words_alloc_size_ = total + 1; dict->dict_words = dict->dict_words_data_ = dict_words; dict->buckets_alloc_size_ = NUM_HASH_BUCKETS; dict->buckets = dict->buckets_data_ = buckets; /* Unused; makes offsets start from 1. */ dict_words[0] = MakeDictWord(0, 0, 0); total = 1; for (i = 0; i < NUM_HASH_BUCKETS; ++i) { size_t num_words = words_by_hash_size[i]; if (num_words > 0) { buckets[i] = (uint16_t)(total); memcpy(&dict_words[total], &words_by_hash[i][0], sizeof(dict_words[0]) * num_words); total += num_words; dict_words[total - 1].len |= 0x80; } else { buckets[i] = 0; } } for (i = 0; i < NUM_HASH_BUCKETS; ++i) { BrotliFree(m, words_by_hash[i]); } BrotliFree(m, words_by_hash); BrotliFree(m, words_by_hash_size); BrotliFree(m, words_by_hash_capacity); BrotliTrieFree(m, &dedup); return BROTLI_TRUE; } static void BuildDictionaryHashTable(uint16_t* hash_table_words, uint8_t* hash_table_lengths, const BrotliDictionary* dict) { int j, len; /* The order of the loops is such that in case of collision, words with shorter length are preferred, and in case of same length, words with smaller index. There is only a single word per bucket. */ /* TODO(lode): consider adding optional user-supplied frequency_map to use for preferred words instead, this can make the encoder better for quality 9 and below without affecting the decoder */ memset(hash_table_words, 0, sizeof(kStaticDictionaryHashWords)); memset(hash_table_lengths, 0, sizeof(kStaticDictionaryHashLengths)); for (len = SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH; len >= SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH; --len) { const size_t num_words = dict->size_bits_by_length[len] ? (1u << dict->size_bits_by_length[len]) : 0; for (j = (int)num_words - 1; j >= 0; --j) { size_t offset = dict->offsets_by_length[len] + (size_t)len * (size_t)j; const uint8_t* word = &dict->data[offset]; const uint32_t key = Hash(word, 14); int idx = (int)(key << 1) + (len < 8 ? 1 : 0); BROTLI_DCHECK(idx < (int)NUM_HASH_BUCKETS); hash_table_words[idx] = (uint16_t)j; hash_table_lengths[idx] = (uint8_t)len; } } } static BROTLI_BOOL GenerateWordsHeavy(MemoryManager* m, const BrotliTransforms* transforms, BrotliEncoderDictionary* dict) { int i, j, l; for (j = (int)transforms->num_transforms - 1; j >= 0 ; --j) { for (l = 0; l < 32; l++) { int num = (int)((1u << dict->words->size_bits_by_length[l]) & ~1u); for (i = 0; i < num; i++) { uint8_t transformed[kTransformedBufferSize]; size_t size; TransformedDictionaryWord( (uint32_t)i, l, j, transforms, dict, transformed, &size); if (size < 4) continue; if (!BrotliTrieAdd(m, (uint8_t)l, (uint32_t)(i + num * j), transformed, size, &dict->trie)) { return BROTLI_FALSE; } } } } return BROTLI_TRUE; } /* Computes cutoffTransformsCount (in count) and cutoffTransforms (in data) for the custom transforms, where possible within the limits of the cutoffTransforms encoding. The fast encoder uses this to do fast lookup for transforms that remove the N last characters (OmitLast). */ static void ComputeCutoffTransforms( const BrotliTransforms* transforms, uint32_t* count, uint64_t* data) { int i; /* The encoding in a 64-bit integer of transform N in the data is: (N << 2) + ((cutoffTransforms >> (N * 6)) & 0x3F), so for example the identity transform code must be 0-63, for N=1 the transform code must be 4-67, ..., for N=9 it must be 36-99. TODO(lode): consider a simple flexible uint8_t[10] instead of the uint64_t for the cutoff transforms, so that shared dictionaries can have the OmitLast transforms anywhere without loss. */ *count = 0; *data = 0; for (i = 0; i < BROTLI_TRANSFORMS_MAX_CUT_OFF + 1; i++) { int idx = transforms->cutOffTransforms[i]; if (idx == -1) break; /* Not found */ if (idx < (i << 2)) break; /* Too small for the encoding */ if (idx >= (i << 2) + 64) break; /* Too large for the encoding */ (*count)++; *data |= (uint64_t)(((uint64_t)idx - ((uint64_t)i << 2u)) << ((uint64_t)i * 6u)); } } static BROTLI_BOOL ComputeDictionary(MemoryManager* m, int quality, const BrotliTransforms* transforms, BrotliEncoderDictionary* current) { int default_words = current->words == BrotliGetDictionary(); int default_transforms = transforms == BrotliGetTransforms(); if (default_words && default_transforms) { /* hashes are already set to Brotli defaults */ return BROTLI_TRUE; } current->hash_table_data_words_ = (uint16_t*)BrotliAllocate( m, sizeof(kStaticDictionaryHashWords)); current->hash_table_data_lengths_ = (uint8_t*)BrotliAllocate( m, sizeof(kStaticDictionaryHashLengths)); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; current->hash_table_words = current->hash_table_data_words_; current->hash_table_lengths = current->hash_table_data_lengths_; BuildDictionaryHashTable(current->hash_table_data_words_, current->hash_table_data_lengths_, current->words); ComputeCutoffTransforms(transforms, &current->cutoffTransformsCount, &current->cutoffTransforms); /* Only compute the data for slow encoder if the requested quality is high enough to need it */ if (quality >= ZOPFLIFICATION_QUALITY) { if (!BuildDictionaryLut(m, transforms, current)) return BROTLI_FALSE; /* For the built-in Brotli transforms, there is a hard-coded function to handle all transforms, but for custom transforms, we use the following large hammer instead */ current->has_words_heavy = !default_transforms; if (current->has_words_heavy) { if (!GenerateWordsHeavy(m, transforms, current)) return BROTLI_FALSE; } } return BROTLI_TRUE; } void BrotliInitSharedEncoderDictionary(SharedEncoderDictionary* dict) { dict->magic = kSharedDictionaryMagic; dict->compound.num_chunks = 0; dict->compound.total_size = 0; dict->compound.chunk_offsets[0] = 0; dict->compound.num_prepared_instances_ = 0; dict->contextual.context_based = 0; dict->contextual.num_dictionaries = 1; dict->contextual.instances_ = 0; dict->contextual.num_instances_ = 1; /* The instance_ field */ dict->contextual.dict[0] = &dict->contextual.instance_; InitEncoderDictionary(&dict->contextual.instance_); dict->contextual.instance_.parent = &dict->contextual; dict->max_quality = BROTLI_MAX_QUALITY; } /* TODO(eustas): make sure that tooling will warn user if not all the cutoff transforms are available (for low-quality encoder). */ static BROTLI_BOOL InitCustomSharedEncoderDictionary( MemoryManager* m, const BrotliSharedDictionary* decoded_dict, int quality, SharedEncoderDictionary* dict) { ContextualEncoderDictionary* contextual; CompoundDictionary* compound; BrotliEncoderDictionary* instances; int i; BrotliInitSharedEncoderDictionary(dict); contextual = &dict->contextual; compound = &dict->compound; for (i = 0; i < (int)decoded_dict->num_prefix; i++) { PreparedDictionary* prepared = CreatePreparedDictionary(m, decoded_dict->prefix[i], decoded_dict->prefix_size[i]); AttachPreparedDictionary(compound, prepared); /* remember for cleanup */ compound->prepared_instances_[ compound->num_prepared_instances_++] = prepared; } dict->max_quality = quality; contextual->context_based = decoded_dict->context_based; if (decoded_dict->context_based) { memcpy(contextual->context_map, decoded_dict->context_map, SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS); } contextual->num_dictionaries = decoded_dict->num_dictionaries; contextual->num_instances_ = decoded_dict->num_dictionaries; if (contextual->num_instances_ == 1) { instances = &contextual->instance_; } else { contextual->instances_ = (BrotliEncoderDictionary*) BrotliAllocate(m, sizeof(*contextual->instances_) * contextual->num_instances_); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; instances = contextual->instances_; } for (i = 0; i < (int)contextual->num_instances_; i++) { BrotliEncoderDictionary* current = &instances[i]; InitEncoderDictionary(current); current->parent = &dict->contextual; if (decoded_dict->words[i] == BrotliGetDictionary()) { current->words = BrotliGetDictionary(); } else { current->words_instance_ = (BrotliDictionary*)BrotliAllocate( m, sizeof(BrotliDictionary)); if (BROTLI_IS_OOM(m)) return BROTLI_FALSE; *current->words_instance_ = *decoded_dict->words[i]; current->words = current->words_instance_; } current->num_transforms = (uint32_t)decoded_dict->transforms[i]->num_transforms; if (!ComputeDictionary( m, quality, decoded_dict->transforms[i], current)) { return BROTLI_FALSE; } contextual->dict[i] = current; } return BROTLI_TRUE; /* success */ } BROTLI_BOOL BrotliInitCustomSharedEncoderDictionary( MemoryManager* m, const uint8_t* encoded_dict, size_t size, int quality, SharedEncoderDictionary* dict) { BROTLI_BOOL success = BROTLI_FALSE; BrotliSharedDictionary* decoded_dict = BrotliSharedDictionaryCreateInstance( m->alloc_func, m->free_func, m->opaque); if (!decoded_dict) { /* OOM */ return BROTLI_FALSE; } success = BrotliSharedDictionaryAttach( decoded_dict, BROTLI_SHARED_DICTIONARY_SERIALIZED, size, encoded_dict); if (success) { success = InitCustomSharedEncoderDictionary(m, decoded_dict, quality, dict); } BrotliSharedDictionaryDestroyInstance(decoded_dict); return success; } void BrotliCleanupSharedEncoderDictionary(MemoryManager* m, SharedEncoderDictionary* dict) { size_t i; for (i = 0; i < dict->compound.num_prepared_instances_; i++) { DestroyPreparedDictionary(m, (PreparedDictionary*)dict->compound.prepared_instances_[i]); } if (dict->contextual.num_instances_ == 1) { BrotliDestroyEncoderDictionary(m, &dict->contextual.instance_); } else if (dict->contextual.num_instances_ > 1) { for (i = 0; i < dict->contextual.num_instances_; i++) { BrotliDestroyEncoderDictionary(m, &dict->contextual.instances_[i]); } BrotliFree(m, dict->contextual.instances_); } } ManagedDictionary* BrotliCreateManagedDictionary( brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque) { ManagedDictionary* result = (ManagedDictionary*)BrotliBootstrapAlloc( sizeof(ManagedDictionary), alloc_func, free_func, opaque); if (result == NULL) return NULL; result->magic = kManagedDictionaryMagic; BrotliInitMemoryManager( &result->memory_manager_, alloc_func, free_func, opaque); result->dictionary = NULL; return result; } void BrotliDestroyManagedDictionary(ManagedDictionary* dictionary) { if (!dictionary) return; BrotliBootstrapFree(dictionary, &dictionary->memory_manager_); } /* Escalate internal functions visibility; for testing purposes only. */ #if defined(BROTLI_TEST) void InitEncoderDictionaryForTest(BrotliEncoderDictionary*); void InitEncoderDictionaryForTest(BrotliEncoderDictionary* d) { InitEncoderDictionary(d); } #endif #if defined(__cplusplus) || defined(c_plusplus) } /* extern "C" */ #endif
8290b368debbc882b94b04a1c10b3b199c07c2dc
aa3befea459382dc5c01c925653d54f435b3fb0f
/sched/environ/env_findvar.c
e52988430060d53555e307e9793db194217a3648
[ "MIT-open-group", "BSD-3-Clause", "HPND-sell-variant", "BSD-4-Clause-UC", "LicenseRef-scancode-warranty-disclaimer", "MIT-0", "LicenseRef-scancode-bsd-atmel", "LicenseRef-scancode-gary-s-brown", "LicenseRef-scancode-proprietary-license", "SunPro", "MIT", "LicenseRef-scancode-public-domain-disclaimer", "LicenseRef-scancode-other-permissive", "HPND", "ISC", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "GPL-1.0-or-later", "CC-BY-2.0", "CC-BY-4.0" ]
permissive
apache/nuttx
14519a7bff4a87935d94fb8fb2b19edb501c7cec
606b6d9310fb25c7d92c6f95bf61737e3c79fa0f
refs/heads/master
2023-08-25T06:55:45.822534
2023-08-23T16:03:31
2023-08-24T21:25:47
228,103,273
407
241
Apache-2.0
2023-09-14T18:26:05
2019-12-14T23:27:55
C
UTF-8
C
false
false
3,348
c
env_findvar.c
/**************************************************************************** * sched/environ/env_findvar.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The * ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #ifndef CONFIG_DISABLE_ENVIRON #include <stdbool.h> #include <string.h> #include <sched.h> #include <assert.h> #include "environ/environ.h" /**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** * Name: env_cmpname ****************************************************************************/ static bool env_cmpname(const char *pszname, const char *peqname) { /* Search until we find anything different in the two names */ for (; *pszname == *peqname; pszname++, peqname++) { } /* On success, pszname will end with '\0' and peqname with '=' */ if (*pszname == '\0' && *peqname == '=') { return true; } return false; } /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: env_findvar * * Description: * Search the provided environment structure for the variable of the * specified name. * * Input Parameters: * group - The task group containing environment array to be searched. * pname - The variable name to find * * Returned Value: * A index to the name=value string in the environment * * Assumptions: * - Not called from an interrupt handler * - Pre-emption is disabled by caller * ****************************************************************************/ ssize_t env_findvar(FAR struct task_group_s *group, FAR const char *pname) { ssize_t i; /* Verify input parameters */ DEBUGASSERT(group != NULL && pname != NULL); if (group->tg_envp == NULL) { return -ENOENT; } /* Search for a name=value string with matching name */ for (i = 0; group->tg_envp[i] != NULL; i++) { if (env_cmpname(pname, group->tg_envp[i])) { return i; } } return -ENOENT; } #endif /* CONFIG_DISABLE_ENVIRON */
b20af93fb3bc2b4e1f0fe7660377e6cb0907fca6
fbe68d84e97262d6d26dd65c704a7b50af2b3943
/third_party/virtualbox/include/iprt/fsisomaker.h
33051bafa8863244b76d344da9e84ce4601c297d
[ "GPL-2.0-only", "LicenseRef-scancode-unknown-license-reference", "CDDL-1.0", "LicenseRef-scancode-warranty-disclaimer", "GPL-1.0-or-later", "LGPL-2.1-or-later", "GPL-2.0-or-later", "MPL-1.0", "LicenseRef-scancode-generic-exception", "Apache-2.0", "OpenSSL", "MIT" ]
permissive
thalium/icebox
c4e6573f2b4f0973b6c7bb0bf068fe9e795fdcfb
6f78952d58da52ea4f0e55b2ab297f28e80c1160
refs/heads/master
2022-08-14T00:19:36.984579
2022-02-22T13:10:31
2022-02-22T13:10:31
190,019,914
585
109
MIT
2022-01-13T20:58:15
2019-06-03T14:18:12
C++
UTF-8
C
false
false
34,065
h
fsisomaker.h
/** @file * IPRT - ISO Image Maker. */ /* * Copyright (C) 2017 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. * * The contents of this file may alternatively be used under the terms * of the Common Development and Distribution License Version 1.0 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the * VirtualBox OSE distribution, in which case the provisions of the * CDDL are applicable instead of those of the GPL. * * You may elect to license modified versions of this file under the * terms and conditions of either the GPL or the CDDL or both. */ #ifndef ___iprt_fsisomaker_h #define ___iprt_fsisomaker_h #include <iprt/cdefs.h> #include <iprt/types.h> #include <iprt/time.h> #include <iprt/fs.h> RT_C_DECLS_BEGIN /** @defgroup grp_rt_fsisomaker RTFsIsoMaker - ISO Image Maker * @ingroup grp_rt_fs * @{ */ /** @name RTFSISOMAKER_NAMESPACE_XXX - Namespace selector. * @{ */ #define RTFSISOMAKER_NAMESPACE_ISO_9660 RT_BIT_32(0) /**< The primary ISO-9660 namespace. */ #define RTFSISOMAKER_NAMESPACE_JOLIET RT_BIT_32(1) /**< The joliet namespace. */ #define RTFSISOMAKER_NAMESPACE_UDF RT_BIT_32(2) /**< The UDF namespace. */ #define RTFSISOMAKER_NAMESPACE_HFS RT_BIT_32(3) /**< The HFS namespace */ #define RTFSISOMAKER_NAMESPACE_ALL UINT32_C(0x0000000f) /**< All namespaces. */ #define RTFSISOMAKER_NAMESPACE_VALID_MASK UINT32_C(0x0000000f) /**< Valid namespace bits. */ /** @} */ /** Root directory configuration index. */ #define RTFSISOMAKER_CFG_IDX_ROOT UINT32_C(0) /** * Creates an ISO maker instance. * * @returns IPRT status code. * @param phIsoMaker Where to return the handle to the new ISO maker. */ RTDECL(int) RTFsIsoMakerCreate(PRTFSISOMAKER phIsoMaker); /** * Retains a references to an ISO maker instance. * * @returns New reference count on success, UINT32_MAX if invalid handle. * @param hIsoMaker The ISO maker handle. */ RTDECL(uint32_t) RTFsIsoMakerRetain(RTFSISOMAKER hIsoMaker); /** * Releases a references to an ISO maker instance. * * @returns New reference count on success, UINT32_MAX if invalid handle. * @param hIsoMaker The ISO maker handle. NIL is ignored. */ RTDECL(uint32_t) RTFsIsoMakerRelease(RTFSISOMAKER hIsoMaker); /** * Sets the ISO-9660 level. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param uIsoLevel The level, 1-3. */ RTDECL(int) RTFsIsoMakerSetIso9660Level(RTFSISOMAKER hIsoMaker, uint8_t uIsoLevel); /** * Gets the ISO-9660 level. * * @returns The level, UINT8_MAX if invalid handle. * @param hIsoMaker The ISO maker handle. */ RTDECL(uint8_t) RTFsIsoMakerGetIso9660Level(RTFSISOMAKER hIsoMaker); /** * Sets the joliet level. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param uJolietLevel The joliet UCS-2 level 1-3, or 0 to disable * joliet. */ RTDECL(int) RTFsIsoMakerSetJolietUcs2Level(RTFSISOMAKER hIsoMaker, uint8_t uJolietLevel); /** * Sets the rock ridge support level (on the primary ISO-9660 namespace). * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param uLevel 0 if disabled, 1 to just enable, 2 to enable and * write the ER tag. */ RTDECL(int) RTFsIsoMakerSetRockRidgeLevel(RTFSISOMAKER hIsoMaker, uint8_t uLevel); /** * Sets the rock ridge support level on the joliet namespace (experimental). * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param uLevel 0 if disabled, 1 to just enable, 2 to enable and * write the ER tag. */ RTDECL(int) RTFsIsoMakerSetJolietRockRidgeLevel(RTFSISOMAKER hIsoMaker, uint8_t uLevel); /** * Changes the file attribute (mode, owner, group) inherit style (from source). * * The strict style will use the exact attributes from the source, where as the * non-strict (aka rational and default) style will use 0 for the owner and * group IDs and normalize the mode bits along the lines of 'chmod a=rX', * stripping set-uid/gid bitson files but preserving sticky ones on directories. * * When disabling strict style, the default dir and file modes will be restored * to default values. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param fStrict Indicates strict (true) or non-strict (false) * style. */ RTDECL(int) RTFsIsoMakerSetAttribInheritStyle(RTFSISOMAKER hIsoMaker, bool fStrict); /** * Sets the default file mode settings. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param fMode The default file mode. */ RTDECL(int) RTFsIsoMakerSetDefaultFileMode(RTFSISOMAKER hIsoMaker, RTFMODE fMode); /** * Sets the default dir mode settings. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param fMode The default dir mode. */ RTDECL(int) RTFsIsoMakerSetDefaultDirMode(RTFSISOMAKER hIsoMaker, RTFMODE fMode); /** * Sets the forced file mode, if @a fForce is true also the default mode is set. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param fMode The file mode. * @param fForce Indicate whether forced mode is active or not. */ RTDECL(int) RTFsIsoMakerSetForcedFileMode(RTFSISOMAKER hIsoMaker, RTFMODE fMode, bool fForce); /** * Sets the forced dir mode, if @a fForce is true also the default mode is set. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param fMode The dir mode. * @param fForce Indicate whether forced mode is active or not. */ RTDECL(int) RTFsIsoMakerSetForcedDirMode(RTFSISOMAKER hIsoMaker, RTFMODE fMode, bool fForce); /** * Sets the content of the system area, i.e. the first 32KB of the image. * * This can be used to put generic boot related stuff. * * @note Other settings may overwrite parts of the content (yet to be * determined which). * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pvContent The content to put in the system area. * @param cbContent The size of the content. * @param off The offset into the system area. */ RTDECL(int) RTFsIsoMakerSetSysAreaContent(RTFSISOMAKER hIsoMaker, void const *pvContent, size_t cbContent, uint32_t off); /** * String properties settable thru RTFsIsoMakerSetStringProp. */ typedef enum RTFSISOMAKERSTRINGPROP { /** The customary invalid zero value. */ RTFSISOMAKERSTRINGPROP_INVALID = 0, /** The system identifier. */ RTFSISOMAKERSTRINGPROP_SYSTEM_ID, /** The volume identifier(label). */ RTFSISOMAKERSTRINGPROP_VOLUME_ID, /** The volume set identifier. */ RTFSISOMAKERSTRINGPROP_VOLUME_SET_ID, /** The publisher ID (root file reference if it starts with '_'). */ RTFSISOMAKERSTRINGPROP_PUBLISHER_ID, /** The data preparer ID (root file reference if it starts with '_'). */ RTFSISOMAKERSTRINGPROP_DATA_PREPARER_ID, /** The application ID (root file reference if it starts with '_'). */ RTFSISOMAKERSTRINGPROP_APPLICATION_ID, /** The copyright file ID. */ RTFSISOMAKERSTRINGPROP_COPYRIGHT_FILE_ID, /** The abstract file ID. */ RTFSISOMAKERSTRINGPROP_ABSTRACT_FILE_ID, /** The bibliographic file ID. */ RTFSISOMAKERSTRINGPROP_BIBLIOGRAPHIC_FILE_ID, /** End of valid string property values. */ RTFSISOMAKERSTRINGPROP_END, /** Make sure it's a 32-bit type. */ RTFSISOMAKERSTRINGPROP_32BIT_HACK = 0x7fffffff } RTFSISOMAKERSTRINGPROP; /** * Sets a string property in one or more namespaces. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param enmStringProp The string property to set. * @param fNamespaces The namespaces to set it in. * @param pszValue The value to set it to. NULL is treated like an * empty string. The value will be silently truncated * to fit the available space. */ RTDECL(int) RTFsIsoMakerSetStringProp(RTFSISOMAKER hIsoMaker, RTFSISOMAKERSTRINGPROP enmStringProp, uint32_t fNamespaces, const char *pszValue); /** * Specifies image padding. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param cSectors Number of sectors to pad the image with. */ RTDECL(int) RTFsIsoMakerSetImagePadding(RTFSISOMAKER hIsoMaker, uint32_t cSectors); /** * Resolves a path into a object ID. * * This will be doing the looking up using the specified object names rather * than the version adjusted and mangled according to the namespace setup. * * @returns The object ID corresponding to @a pszPath, or UINT32_MAX if not * found or invalid parameters. * @param hIsoMaker The ISO maker instance. * @param fNamespaces The namespace to resolve @a pszPath in. It's * possible to specify multiple namespaces here, of * course, but that's inefficient. * @param pszPath The path to the object. */ RTDECL(uint32_t) RTFsIsoMakerGetObjIdxForPath(RTFSISOMAKER hIsoMaker, uint32_t fNamespaces, const char *pszPath); /** * Queries the configuration index of the boot catalog file object. * * The boot catalog file is created as necessary, thus this have to be a query * rather than a getter since object creation may fail. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param pidxObj Where to return the configuration index. */ RTDECL(int) RTFsIsoMakerQueryObjIdxForBootCatalog(RTFSISOMAKER hIsoMaker, uint32_t *pidxObj); /** * Removes the specified object from the image. * * @returns IPRT status code. * @param hIsoMaker The ISO maker instance. * @param idxObj The index of the object to remove. */ RTDECL(int) RTFsIsoMakerObjRemove(RTFSISOMAKER hIsoMaker, uint32_t idxObj); /** * Sets the path (name) of an object in the selected namespaces. * * The name will be transformed as necessary. * * The initial implementation does not allow this function to be called more * than once on an object. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxObj The configuration index of to name. * @param fNamespaces The namespaces to apply the path to * (RTFSISOMAKER_NAMESPACE_XXX). * @param pszPath The path. */ RTDECL(int) RTFsIsoMakerObjSetPath(RTFSISOMAKER hIsoMaker, uint32_t idxObj, uint32_t fNamespaces, const char *pszPath); /** * Sets the name of an object in the selected namespaces, placing it under the * given directory. * * The name will be transformed as necessary. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxObj The configuration index of to name. * @param idxParentObj The parent directory object. * @param fNamespaces The namespaces to apply the path to * (RTFSISOMAKER_NAMESPACE_XXX). * @param pszName The name. * @param fNoNormalize Don't normalize the name (imported or such). */ RTDECL(int) RTFsIsoMakerObjSetNameAndParent(RTFSISOMAKER hIsoMaker, uint32_t idxObj, uint32_t idxParentObj, uint32_t fNamespaces, const char *pszName, bool fNoNormalize); /** * Changes the rock ridge name for the object in the selected namespaces. * * The object must already be enetered into the namespaces by * RTFsIsoMakerObjSetNameAndParent, RTFsIsoMakerObjSetPath or similar. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxObj The configuration index of to name. * @param fNamespaces The namespaces to apply the path to * (RTFSISOMAKER_NAMESPACE_XXX). * @param pszRockName The rock ridge name. Passing NULL or an empty * string will restore the specified name. */ RTDECL(int) RTFsIsoMakerObjSetRockName(RTFSISOMAKER hIsoMaker, uint32_t idxObj, uint32_t fNamespaces, const char *pszRockName); /** * Enables or disable syslinux boot info table patching of a file. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxObj The configuration index. * @param fEnable Whether to enable or disable patching. */ RTDECL(int) RTFsIsoMakerObjEnableBootInfoTablePatching(RTFSISOMAKER hIsoMaker, uint32_t idxObj, bool fEnable); /** * Gets the data size of an object. * * Currently only supported on file objects. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxObj The configuration index. * @param pcbData Where to return the size. */ RTDECL(int) RTFsIsoMakerObjQueryDataSize(RTFSISOMAKER hIsoMaker, uint32_t idxObj, uint64_t *pcbData); /** * Adds an unnamed directory to the image. * * The directory must explictly be entered into the desired namespaces. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pObjInfo Pointer to object attributes, must be set to * UNIX. The size and hardlink counts are ignored. * Optional. * @param pidxObj Where to return the configuration index of the * directory. * @sa RTFsIsoMakerAddDir, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddUnnamedDir(RTFSISOMAKER hIsoMaker, PCRTFSOBJINFO pObjInfo, uint32_t *pidxObj); /** * Adds a directory to the image in all namespaces and default attributes. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pszDir The path (UTF-8) to the directory in the ISO. * * @param pidxObj Where to return the configuration index of the * directory. Optional. * @sa RTFsIsoMakerAddUnnamedDir, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddDir(RTFSISOMAKER hIsoMaker, const char *pszDir, uint32_t *pidxObj); /** * Adds an unnamed file to the image that's backed by a host file. * * The file must explictly be entered into the desired namespaces. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pszSrcFile The source file path. VFS chain spec allowed. * @param pidxObj Where to return the configuration index of the * directory. * @sa RTFsIsoMakerAddFile, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddUnnamedFileWithSrcPath(RTFSISOMAKER hIsoMaker, const char *pszSrcFile, uint32_t *pidxObj); /** * Adds an unnamed file to the image that's backed by a VFS file. * * The file must explictly be entered into the desired namespaces. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param hVfsFileSrc The source file handle. * @param pidxObj Where to return the configuration index of the * directory. * @sa RTFsIsoMakerAddUnnamedFileWithSrcPath, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddUnnamedFileWithVfsFile(RTFSISOMAKER hIsoMaker, RTVFSFILE hVfsFileSrc, uint32_t *pidxObj); /** * Adds an unnamed file to the image that's backed by a portion of a common * source file. * * The file must explictly be entered into the desired namespaces. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param idxCommonSrc The common source file index. * @param offData The offset of the data in the source file. * @param cbData The file size. * @param pObjInfo Pointer to file info. Optional. * @param pidxObj Where to return the configuration index of the * directory. * @sa RTFsIsoMakerAddUnnamedFileWithSrcPath, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddUnnamedFileWithCommonSrc(RTFSISOMAKER hIsoMaker, uint32_t idxCommonSrc, uint64_t offData, uint64_t cbData, PCRTFSOBJINFO pObjInfo, uint32_t *pidxObj); /** * Adds a common source file. * * Using RTFsIsoMakerAddUnnamedFileWithCommonSrc a sections common source file * can be referenced to make up other files. The typical use case is when * importing data from an existing ISO. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param hVfsFile VFS handle of the common source. (A reference * is added, none consumed.) * @param pidxCommonSrc Where to return the assigned common source * index. This is used to reference the file. * @sa RTFsIsoMakerAddUnnamedFileWithCommonSrc */ RTDECL(int) RTFsIsoMakerAddCommonSourceFile(RTFSISOMAKER hIsoMaker, RTVFSFILE hVfsFile, uint32_t *pidxCommonSrc); /** * Adds a file that's backed by a host file to the image in all namespaces and * with attributes taken from the source file. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pszFile The path to the file in the image. * @param pszSrcFile The source file path. VFS chain spec allowed. * @param pidxObj Where to return the configuration index of the file. * Optional * @sa RTFsIsoMakerAddFileWithVfsFile, * RTFsIsoMakerAddUnnamedFileWithSrcPath */ RTDECL(int) RTFsIsoMakerAddFileWithSrcPath(RTFSISOMAKER hIsoMaker, const char *pszFile, const char *pszSrcFile, uint32_t *pidxObj); /** * Adds a file that's backed by a VFS file to the image in all namespaces and * with attributes taken from the source file. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pszFile The path to the file in the image. * @param hVfsFileSrc The source file handle. * @param pidxObj Where to return the configuration index of the file. * Optional. * @sa RTFsIsoMakerAddUnnamedFileWithVfsFile, * RTFsIsoMakerAddFileWithSrcPath */ RTDECL(int) RTFsIsoMakerAddFileWithVfsFile(RTFSISOMAKER hIsoMaker, const char *pszFile, RTVFSFILE hVfsFileSrc, uint32_t *pidxObj); /** * Adds an unnamed symbolic link to the image. * * The symlink must explictly be entered into the desired namespaces. Please * note that it is not possible to enter a symbolic link into an ISO 9660 * namespace where rock ridge extensions are disabled, since symbolic links * depend on rock ridge. For HFS and UDF there is no such requirement. * * Will fail if no namespace is configured that supports symlinks. * * @returns IPRT status code * @retval VERR_ISOMK_SYMLINK_SUPPORT_DISABLED if not supported. * @param hIsoMaker The ISO maker handle. * @param pObjInfo Pointer to object attributes, must be set to * UNIX. The size and hardlink counts are ignored. * Optional. * @param pszTarget The symbolic link target (UTF-8). * @param pidxObj Where to return the configuration index of the * directory. * @sa RTFsIsoMakerAddSymlink, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddUnnamedSymlink(RTFSISOMAKER hIsoMaker, PCRTFSOBJINFO pObjInfo, const char *pszTarget, uint32_t *pidxObj); /** * Adds a directory to the image in all namespaces and default attributes. * * Will fail if no namespace is configured that supports symlinks. * * @returns IPRT status code * @param hIsoMaker The ISO maker handle. * @param pszSymlink The path (UTF-8) to the symlink in the ISO. * @param pszTarget The symlink target (UTF-8). * @param pidxObj Where to return the configuration index of the * directory. Optional. * @sa RTFsIsoMakerAddUnnamedSymlink, RTFsIsoMakerObjSetPath */ RTDECL(int) RTFsIsoMakerAddSymlink(RTFSISOMAKER hIsoMaker, const char *pszSymlink, const char *pszTarget, uint32_t *pidxObj); /** * Modifies the mode mask for a given path in one or more namespaces. * * The mode mask is used by rock ridge, UDF and HFS. * * @returns IPRT status code. * @retval VWRN_NOT_FOUND if the path wasn't found in any of the specified * namespaces. * * @param hIsoMaker The ISO maker handler. * @param pszPath The path which mode mask should be modified. * @param fNamespaces The namespaces to set it in. * @param fSet The mode bits to set. * @param fUnset The mode bits to clear (applied first). * @param fFlags Reserved, MBZ. * @param pcHits Where to return number of paths found. Optional. */ RTDECL(int) RTFsIsoMakerSetPathMode(RTFSISOMAKER hIsoMaker, const char *pszPath, uint32_t fNamespaces, RTFMODE fSet, RTFMODE fUnset, uint32_t fFlags, uint32_t *pcHits); /** * Modifies the owner ID for a given path in one or more namespaces. * * The owner ID is used by rock ridge, UDF and HFS. * * @returns IPRT status code. * @retval VWRN_NOT_FOUND if the path wasn't found in any of the specified * namespaces. * * @param hIsoMaker The ISO maker handler. * @param pszPath The path which mode mask should be modified. * @param fNamespaces The namespaces to set it in. * @param idOwner The new owner ID to set. * @param pcHits Where to return number of paths found. Optional. */ RTDECL(int) RTFsIsoMakerSetPathOwnerId(RTFSISOMAKER hIsoMaker, const char *pszPath, uint32_t fNamespaces, RTUID idOwner, uint32_t *pcHits); /** * Modifies the group ID for a given path in one or more namespaces. * * The group ID is used by rock ridge, UDF and HFS. * * @returns IPRT status code. * @retval VWRN_NOT_FOUND if the path wasn't found in any of the specified * namespaces. * * @param hIsoMaker The ISO maker handler. * @param pszPath The path which mode mask should be modified. * @param fNamespaces The namespaces to set it in. * @param idGroup The new group ID to set. * @param pcHits Where to return number of paths found. Optional. */ RTDECL(int) RTFsIsoMakerSetPathGroupId(RTFSISOMAKER hIsoMaker, const char *pszPath, uint32_t fNamespaces, RTGID idGroup, uint32_t *pcHits); /** * Set the validation entry of the boot catalog (this is the first entry). * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idPlatform The platform ID * (ISO9660_ELTORITO_PLATFORM_ID_XXX). * @param pszString CD/DVD-ROM identifier. Optional. */ RTDECL(int) RTFsIsoMakerBootCatSetValidationEntry(RTFSISOMAKER hIsoMaker, uint8_t idPlatform, const char *pszString); /** * Set the validation entry of the boot catalog (this is the first entry). * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxBootCat The boot catalog entry. Zero and two are * invalid. Must be less than 63. * @param idxImageObj The configuration index of the boot image. * @param bBootMediaType The media type and flag (not for entry 1) * (ISO9660_ELTORITO_BOOT_MEDIA_TYPE_XXX, * ISO9660_ELTORITO_BOOT_MEDIA_F_XXX). * @param bSystemType The partitiona table system ID. * @param fBootable Whether it's a bootable entry or if we just want * the BIOS to setup the emulation without booting * it. * @param uLoadSeg The load address divided by 0x10 (i.e. the real * mode segment number). * @param cSectorsToLoad Number of emulated sectors to load. * @param bSelCritType The selection criteria type, if none pass * ISO9660_ELTORITO_SEL_CRIT_TYPE_NONE. * @param pvSelCritData Pointer to the selection criteria data. * @param cbSelCritData Size of the selection criteria data. */ RTDECL(int) RTFsIsoMakerBootCatSetSectionEntry(RTFSISOMAKER hIsoMaker, uint32_t idxBootCat, uint32_t idxImageObj, uint8_t bBootMediaType, uint8_t bSystemType, bool fBootable, uint16_t uLoadSeg, uint16_t cSectorsToLoad, uint8_t bSelCritType, void const *pvSelCritData, size_t cbSelCritData); /** * Set the validation entry of the boot catalog (this is the first entry). * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxBootCat The boot catalog entry. * @param cEntries Number of entries in the section. * @param idPlatform The platform ID * (ISO9660_ELTORITO_PLATFORM_ID_XXX). * @param pszString Section identifier or something. Optional. */ RTDECL(int) RTFsIsoMakerBootCatSetSectionHeaderEntry(RTFSISOMAKER hIsoMaker, uint32_t idxBootCat, uint32_t cEntries, uint8_t idPlatform, const char *pszString); /** * Sets the boot catalog backing file. * * The content of the given file will be discarded and replaced with the boot * catalog, the naming and file attributes (other than size) will be retained. * * This API exists mainly to assist when importing ISOs. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. * @param idxObj The configuration index of the file. */ RTDECL(int) RTFsIsoMakerBootCatSetFile(RTFSISOMAKER hIsoMaker, uint32_t idxObj); /** * ISO maker import results (RTFsIsoMakerImport). */ typedef struct RTFSISOMAKERIMPORTRESULTS { /** Number of names added. */ uint32_t cAddedNames; /** Number of directories added. */ uint32_t cAddedDirs; /** Amount of added data blocks, files only. */ uint64_t cbAddedDataBlocks; /** Number of unique files added (unique in terms of data location). */ uint32_t cAddedFiles; /** Number of symbolic links added. */ uint32_t cAddedSymlinks; /** Number of imported boot catalog entries. */ uint32_t cBootCatEntries; /** Number of system area bytes imported (from offset zero). */ uint32_t cbSysArea; /** Number of import errors. */ uint32_t cErrors; /** Where to return the offset of the failing path element. * Set to UINT32_MAX if not a VFS chaining error. */ uint32_t offError; } RTFSISOMAKERIMPORTRESULTS; /** Pointer to ISO maker import results. */ typedef RTFSISOMAKERIMPORTRESULTS *PRTFSISOMAKERIMPORTRESULTS; /** * Imports an existing ISO. * * Just like other source files, the existing image must remain present and * unmodified till the ISO maker is done with it. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param pszIso Path to the existing image to import / clone. * This is fed to RTVfsChainOpenFile. * @param fFlags Reserved for the future, MBZ. * @param pResults Where to return import results. * @param pErrInfo Where to return additional error information. * Optional. */ RTDECL(int) RTFsIsoMakerImport(RTFSISOMAKER hIsoMaker, const char *pszIso, uint32_t fFlags, PRTFSISOMAKERIMPORTRESULTS pResults, PRTERRINFO pErrInfo); /** @name RTFSISOMK_IMPORT_F_XXX - Flags for RTFsIsoMakerImport. * @{ */ #define RTFSISOMK_IMPORT_F_NO_PRIMARY_ISO RT_BIT_32(0) /**< Skip the primary ISO-9660 namespace (rock ridge included). */ #define RTFSISOMK_IMPORT_F_NO_JOLIET RT_BIT_32(1) /**< Skip the joliet namespace. */ #define RTFSISOMK_IMPORT_F_NO_ROCK_RIDGE RT_BIT_32(2) /**< Skip rock ridge (both primary and joliet). */ #define RTFSISOMK_IMPORT_F_NO_UDF RT_BIT_32(3) /**< Skip the UDF namespace. */ #define RTFSISOMK_IMPORT_F_NO_HFS RT_BIT_32(4) /**< Skip the HFS namespace. */ #define RTFSISOMK_IMPORT_F_NO_BOOT RT_BIT_32(5) /**< Skip importing El Torito boot stuff. */ #define RTFSISOMK_IMPORT_F_NO_SYS_AREA RT_BIT_32(6) /**< Skip importing the system area (first 32KB). */ #define RTFSISOMK_IMPORT_F_NO_SYSTEM_ID RT_BIT_32(7) /**< Don't import the system ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_VOLUME_ID RT_BIT_32(8) /**< Don't import the volume ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_VOLUME_SET_ID RT_BIT_32(9) /**< Don't import the volume set ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_PUBLISHER_ID RT_BIT_32(10) /**< Don't import the publisher ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_DATA_PREPARER_ID RT_BIT_32(11) /**< Do import the data preparer ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_APPLICATION_ID RT_BIT_32(12) /**< Do import the application ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_COPYRIGHT_FID RT_BIT_32(13) /**< Don't import the copyright file ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_ABSTRACT_FID RT_BIT_32(14) /**< Don't import the abstract file ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_BIBLIO_FID RT_BIT_32(15) /**< Don't import the bibliographic file ID primary descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_SYSTEM_ID RT_BIT_32(16) /**< Don't import the system ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_VOLUME_ID RT_BIT_32(17) /**< Don't import the volume ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_VOLUME_SET_ID RT_BIT_32(18) /**< Don't import the volume set ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_PUBLISHER_ID RT_BIT_32(19) /**< Don't import the publisher ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_J_DATA_PREPARER_ID RT_BIT_32(20) /**< Do import the data preparer ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_J_APPLICATION_ID RT_BIT_32(21) /**< Do import the application ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_COPYRIGHT_FID RT_BIT_32(22) /**< Don't import the copyright file ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_ABSTRACT_FID RT_BIT_32(23) /**< Don't import the abstract file ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_NO_J_BIBLIO_FID RT_BIT_32(24) /**< Don't import the bibliographic file ID joliet descriptor field. */ #define RTFSISOMK_IMPORT_F_VALID_MASK UINT32_C(0x01ffffff) /** @} */ /** * Finalizes the image. * * @returns IPRT status code. * @param hIsoMaker The ISO maker handle. */ RTDECL(int) RTFsIsoMakerFinalize(RTFSISOMAKER hIsoMaker); /** * Creates a VFS file for a finalized ISO maker instanced. * * The file can be used to access the image. Both sequential and random access * are supported, so that this could in theory be hooked up to a CD/DVD-ROM * drive emulation and used as a virtual ISO image. * * @returns IRPT status code. * @param hIsoMaker The ISO maker handle. * @param phVfsFile Where to return the handle. */ RTDECL(int) RTFsIsoMakerCreateVfsOutputFile(RTFSISOMAKER hIsoMaker, PRTVFSFILE phVfsFile); /** * ISO maker command (creates image file on disk). * * @returns IPRT status code * @param cArgs Number of arguments. * @param papszArgs Pointer to argument array. */ RTDECL(RTEXITCODE) RTFsIsoMakerCmd(unsigned cArgs, char **papszArgs); /** * Extended ISO maker command. * * This can be used as a ISO maker command that produces a image file, or * alternatively for setting up a virtual ISO in memory. * * @returns IPRT status code * @param cArgs Number of arguments. * @param papszArgs Pointer to argument array. * @param phVfsFile Where to return the virtual ISO. Pass NULL to * for normal operation (creates file on disk). * @param pErrInfo Where to return extended error information in * the virtual ISO mode. */ RTDECL(int) RTFsIsoMakerCmdEx(unsigned cArgs, char **papszArgs, PRTVFSFILE phVfsFile, PRTERRINFO pErrInfo); /** @} */ RT_C_DECLS_END #endif
1c3cbf07831dbd7c9790eb91c11ac95de5dfcc76
88ae8695987ada722184307301e221e1ba3cc2fa
/third_party/ffmpeg/libavformat/argo_asf.h
948459d0b73115f65971db7dbe080d00b0cd4e8f
[ "Apache-2.0", "LGPL-2.0-or-later", "MIT", "GPL-1.0-or-later", "BSD-3-Clause", "LGPL-2.1-only", "LGPL-3.0-only", "GPL-2.0-only", "LGPL-2.1-or-later", "GPL-3.0-or-later", "LGPL-3.0-or-later", "IJG", "LicenseRef-scancode-other-permissive", "GPL-2.0-or-later", "GPL-3.0-only", "BSD-2-Clause" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
C
false
false
3,101
h
argo_asf.h
/* * Argonaut Games ASF (de)muxer * * Copyright (C) 2020 Zane van Iperen (zane@zanevaniperen.com) * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVFORMAT_ARGO_ASF_H #define AVFORMAT_ARGO_ASF_H #include <stdint.h> #include "libavutil/macros.h" #include "avformat.h" #define ASF_TAG MKTAG('A', 'S', 'F', '\0') #define ASF_FILE_HEADER_SIZE 24 #define ASF_CHUNK_HEADER_SIZE 20 #define ASF_SAMPLE_COUNT 32 #define ASF_MIN_BUFFER_SIZE FFMAX(ASF_FILE_HEADER_SIZE, ASF_CHUNK_HEADER_SIZE) #define ASF_NAME_SIZE 8 typedef struct ArgoASFFileHeader { uint32_t magic; /*< Magic Number, {'A', 'S', 'F', '\0'} */ uint16_t version_major; /*< File Major Version. */ uint16_t version_minor; /*< File Minor Version. */ uint32_t num_chunks; /*< No. chunks in the file. */ uint32_t chunk_offset; /*< Offset to the first chunk from the start of the file. */ char name[ASF_NAME_SIZE + 1]; /*< Name, +1 for NULL-terminator. */ } ArgoASFFileHeader; typedef struct ArgoASFChunkHeader { uint32_t num_blocks; /*< No. blocks in the chunk. */ uint32_t num_samples; /*< No. samples per channel in a block. Always 32. */ uint32_t unk1; /*< Unknown */ uint16_t sample_rate; /*< Sample rate. */ uint16_t unk2; /*< Unknown. */ uint32_t flags; /*< Stream flags. */ } ArgoASFChunkHeader; enum { ASF_CF_BITS_PER_SAMPLE = (1 << 0), /*< 16-bit if set, 8 otherwise. */ ASF_CF_STEREO = (1 << 1), /*< Stereo if set, mono otherwise. */ ASF_CF_ALWAYS1_1 = (1 << 2), /*< Unknown, always seems to be set. */ ASF_CF_ALWAYS1_2 = (1 << 3), /*< Unknown, always seems to be set. */ ASF_CF_ALWAYS1 = ASF_CF_ALWAYS1_1 | ASF_CF_ALWAYS1_2, ASF_CF_ALWAYS0 = ~(ASF_CF_BITS_PER_SAMPLE | ASF_CF_STEREO | ASF_CF_ALWAYS1) }; void ff_argo_asf_parse_file_header(ArgoASFFileHeader *hdr, const uint8_t *buf); int ff_argo_asf_validate_file_header(AVFormatContext *s, const ArgoASFFileHeader *hdr); void ff_argo_asf_parse_chunk_header(ArgoASFChunkHeader *hdr, const uint8_t *buf); int ff_argo_asf_fill_stream(AVFormatContext *s, AVStream *st, const ArgoASFFileHeader *fhdr, const ArgoASFChunkHeader *ckhdr); #endif /* AVFORMAT_ARGO_ASF_H */
67b4d97ce8d0eb4ee9294167ef47ca8f8cdfaa0f
cff4428975e403e4ef02d75498b78cd1a610a01a
/src/box/sql/pragma.c
5e5f2b5b43fb5860e578374bc923df66b00774f9
[ "BSD-2-Clause" ]
permissive
tarantool/tarantool
c1f252b642d223af62485dc21165c7f7c3354e7e
f58cc96f2798ddc5f492223897d0b77e4f902128
refs/heads/master
2023-09-03T15:16:29.144171
2023-08-31T11:39:28
2023-09-01T12:39:29
911,980
3,205
490
NOASSERTION
2023-09-14T17:58:17
2010-09-15T07:59:26
Lua
UTF-8
C
false
false
10,376
c
pragma.c
/* * Copyright 2010-2017, Tarantool AUTHORS, please see AUTHORS file. * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * This file contains code used to implement the PRAGMA command. */ #include "box/index.h" #include "box/tuple.h" #include "box/schema.h" #include "box/coll_id_cache.h" #include "sqlInt.h" #include "tarantoolInt.h" #include "mem.h" #include "vdbeInt.h" #include "box/schema.h" #include "box/session.h" #include "pragma.h" /** Set result column names and types for a pragma. */ static void vdbe_set_pragma_result_columns(struct Vdbe *v, const struct PragmaName *pragma) { int n = pragma->nPragCName; assert(n > 0); sqlVdbeSetNumCols(v, n); for (int i = 0, j = pragma->iPragCName; i < n; ++i) { vdbe_metadata_set_col_name(v, i, pragCName[j++]); vdbe_metadata_set_col_type(v, i, pragCName[j++]); } } /* * Locate a pragma in the aPragmaName[] array. */ static const struct PragmaName * pragmaLocate(const char *zName) { int upr, lwr, mid, rc; lwr = 0; upr = ArraySize(aPragmaName) - 1; while (lwr <= upr) { mid = (lwr + upr) / 2; rc = sql_stricmp(zName, aPragmaName[mid].zName); if (rc == 0) break; if (rc < 0) { upr = mid - 1; } else { lwr = mid + 1; } } return lwr > upr ? 0 : &aPragmaName[mid]; } /** * This function handles PRAGMA TABLE_INFO(<table>). * * Return a single row for each column of the named table. * The columns of the returned data set are: * * - cid: Column id (numbered from left to right, starting at 0); * - name: Column name; * - type: Column declaration type; * - notnull: True if 'NOT NULL' is part of column declaration; * - dflt_value: The default value for the column, if any. * * @param parse Current parsing context. * @param tbl_name Name of table to be examined. */ static void sql_pragma_table_info(struct Parse *parse, const char *tbl_name) { if (tbl_name == NULL) return; struct space *space = space_by_name0(tbl_name); if (space == NULL) return; struct index *pk = space_index(space, 0); parse->nMem = 6; if (space->def->opts.is_view) sql_view_assign_cursors(parse, space->def->opts.sql); struct Vdbe *v = sqlGetVdbe(parse); struct field_def *field = space->def->fields; for (uint32_t i = 0, k; i < space->def->field_count; ++i, ++field) { if (pk == NULL) { k = 1; } else if (!sql_space_column_is_in_pk(space, i)) { k = 0; } else { struct key_def *kdef = pk->def->key_def; k = key_def_find_by_fieldno(kdef, i) - kdef->parts + 1; } sqlVdbeMultiLoad(v, 1, "issisi", i, field->name, field_type_strs[field->type], !field->is_nullable, field->sql_default_value, k); sqlVdbeAddOp2(v, OP_ResultRow, 1, 6); } } /** * This function handles PRAGMA stats. * It displays estimate (log) number of tuples in space and * average size of tuple in each index. * * @param space Space to be examined. * @param data Parsing context passed as callback argument. */ static int sql_pragma_table_stats(struct space *space, void *data) { if (space->def->opts.is_view) return 0; struct Parse *parse = (struct Parse *) data; struct index *pk = space_index(space, 0); if (pk == NULL) return 0; struct Vdbe *v = sqlGetVdbe(parse); LogEst tuple_count_est = sqlLogEst(index_size(pk)); size_t avg_tuple_size_pk = sql_index_tuple_size(space, pk); parse->nMem = 4; sqlVdbeMultiLoad(v, 1, "ssii", space->def->name, 0, avg_tuple_size_pk, tuple_count_est); sqlVdbeAddOp2(v, OP_ResultRow, 1, 4); for (uint32_t i = 0; i < space->index_count; ++i) { struct index *idx = space->index[i]; assert(idx != NULL); size_t avg_tuple_size_idx = sql_index_tuple_size(space, idx); sqlVdbeMultiLoad(v, 2, "sii", idx->def->name, avg_tuple_size_idx, index_field_tuple_est(idx->def, 0)); sqlVdbeAddOp2(v, OP_ResultRow, 1, 4); } return 0; } /** * This function handles PRAGMA INDEX_INFO(<table>.<index>). * * Return a single row for each column of the index. * The columns of the returned data set are: * * - seqno: Zero-based column id within the index. * - cid: Zero-based column id within the table. * - name: Table column name. * - desc: Whether sorting by the column is descending (1 or 0). * - coll: Collation name. * - type: Type of a column value. * * @param parse Current parsing content. * @param pragma Definition of index_info pragma. * @param tbl_name Name of table index belongs to. * @param idx_name Name of index to display info about. */ static void sql_pragma_index_info(struct Parse *parse, MAYBE_UNUSED const struct PragmaName *pragma, const char *tbl_name, const char *idx_name) { if (idx_name == NULL || tbl_name == NULL) return; struct space *space = space_by_name0(tbl_name); if (space == NULL) return; struct index *idx = space_index_by_name0(space, idx_name); if (idx == NULL) return; parse->nMem = 6; struct Vdbe *v = sqlGetVdbe(parse); assert(v != NULL); uint32_t part_count = idx->def->key_def->part_count; assert(parse->nMem <= pragma->nPragCName); struct key_part *part = idx->def->key_def->parts; for (uint32_t i = 0; i < part_count; i++, part++) { const char *c_n; uint32_t id = part->coll_id; struct coll *coll = part->coll; if (coll != NULL) c_n = coll_by_id(id)->name; else c_n = "BINARY"; uint32_t fieldno = part->fieldno; enum field_type type = space->def->fields[fieldno].type; sqlVdbeMultiLoad(v, 1, "iisiss", i, fieldno, space->def->fields[fieldno].name, part->sort_order, c_n, field_type_strs[type]); sqlVdbeAddOp2(v, OP_ResultRow, 1, parse->nMem); } } /** * This function handles PRAGMA collation_list. * * Return a list of available collations. * * - seqno: Zero-based column id within the index. * - name: Collation name. * * @param parse_context Current parsing content. */ static void sql_pragma_collation_list(struct Parse *parse_context) { struct Vdbe *v = sqlGetVdbe(parse_context); assert(v != NULL); /* 16 is enough to encode 0 len array */ char key_buf[16]; char *key_end = mp_encode_array(key_buf, 0); box_tuple_t *tuple; box_iterator_t *it = box_index_iterator(BOX_VCOLLATION_ID, 0, ITER_ALL, key_buf, key_end); if (it == NULL) { parse_context->is_aborted = true; return; } int rc = box_iterator_next(it, &tuple); assert(rc == 0); (void) rc; for (int i = 0; tuple != NULL; i++, box_iterator_next(it, &tuple)) { const char *str = tuple_field_cstr(tuple, BOX_COLLATION_FIELD_NAME); assert(str != NULL); /* this procedure should reallocate and copy str */ sqlVdbeMultiLoad(v, 1, "is", i, str); sqlVdbeAddOp2(v, OP_ResultRow, 1, 2); } box_iterator_free(it); } /** * This function handles PRAGMA INDEX_LIST statement. * * @param parse Current parsing content. * @param table_name Name of table to display list of indexes. */ static void sql_pragma_index_list(struct Parse *parse, const char *tbl_name) { if (tbl_name == NULL) return; struct space *space = space_by_name0(tbl_name); if (space == NULL) return; parse->nMem = 3; struct Vdbe *v = sqlGetVdbe(parse); for (uint32_t i = 0; i < space->index_count; ++i) { struct index *idx = space->index[i]; sqlVdbeMultiLoad(v, 1, "isi", i, idx->def->name, idx->def->opts.is_unique); sqlVdbeAddOp2(v, OP_ResultRow, 1, 3); } } /** * This function handles PRAGMA foreign_key_list(<table>). * * @param parse_context Current parsing content. * @param table_name Name of table to display list of FK. */ static void sql_pragma_foreign_key_list(struct Parse *parse_context, const char *table_name) { (void)parse_context; (void)table_name; return; } void sqlPragma(struct Parse *pParse, struct Token *pragma, struct Token *table, struct Token *index) { char *table_name = NULL; char *index_name = NULL; struct Vdbe *v = sqlGetVdbe(pParse); sqlVdbeRunOnlyOnce(v); pParse->nMem = 2; char *pragma_name = sql_name_from_token(pragma); if (table != NULL) table_name = sql_name_from_token(table); if (index != NULL) index_name = sql_name_from_token(index); /* Locate the pragma in the lookup table */ const struct PragmaName *pPragma = pragmaLocate(pragma_name); if (pPragma == 0) { diag_set(ClientError, ER_SQL_NO_SUCH_PRAGMA, pragma_name); pParse->is_aborted = true; goto pragma_out; } /* Register the result column names for pragmas that return results */ vdbe_set_pragma_result_columns(v, pPragma); /* Jump to the appropriate pragma handler */ switch (pPragma->ePragTyp) { case PRAGMA_TABLE_INFO: sql_pragma_table_info(pParse, table_name); break; case PRAGMA_STATS: space_foreach(sql_pragma_table_stats, (void *) pParse); break; case PRAGMA_INDEX_INFO: sql_pragma_index_info(pParse, pPragma, index_name, table_name); break; case PRAGMA_INDEX_LIST: sql_pragma_index_list(pParse, table_name); break; case PRAGMA_COLLATION_LIST: sql_pragma_collation_list(pParse); break; case PRAGMA_FOREIGN_KEY_LIST: sql_pragma_foreign_key_list(pParse, table_name); break; default: unreachable(); } pragma_out: sql_xfree(pragma_name); sql_xfree(table_name); sql_xfree(index_name); }
e7ea24390cfeb79d12f562572be973953f8eca11
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/third_party/libxml/src/SAX2.c
474ea372b3562ddf2c4dcb0a0d039da467c890cd
[ "MIT", "GPL-1.0-or-later", "LGPL-2.0-or-later", "Apache-2.0", "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
C
false
false
85,649
c
SAX2.c
/* * SAX2.c : Default SAX2 handler to build a tree. * * See Copyright for the status of this software. * * Daniel Veillard <daniel@veillard.com> */ #define IN_LIBXML #include "libxml.h" #include <stdlib.h> #include <string.h> #include <limits.h> #include <stddef.h> #include <libxml/xmlmemory.h> #include <libxml/tree.h> #include <libxml/parser.h> #include <libxml/parserInternals.h> #include <libxml/valid.h> #include <libxml/entities.h> #include <libxml/xmlerror.h> #include <libxml/debugXML.h> #include <libxml/xmlIO.h> #include <libxml/SAX.h> #include <libxml/uri.h> #include <libxml/valid.h> #include <libxml/HTMLtree.h> #include <libxml/globals.h> #include "private/error.h" #include "private/parser.h" #include "private/tree.h" /* #define DEBUG_SAX2 */ /* #define DEBUG_SAX2_TREE */ /** * TODO: * * macro to flag unimplemented blocks * XML_CATALOG_PREFER user env to select between system/public preferred * option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk> *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with *> values "system" and "public". I have made the default be "system" to *> match yours. */ #define TODO \ xmlGenericError(xmlGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); /* * xmlSAX2ErrMemory: * @ctxt: an XML validation parser context * @msg: a string to accompany the error message */ static void LIBXML_ATTR_FORMAT(2,0) xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) { xmlStructuredErrorFunc schannel = NULL; const char *str1 = "out of memory\n"; if (ctxt != NULL) { ctxt->errNo = XML_ERR_NO_MEMORY; if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) schannel = ctxt->sax->serror; __xmlRaiseError(schannel, ctxt->vctxt.error, ctxt->vctxt.userData, ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, (const char *) str1, NULL, NULL, 0, 0, msg, (const char *) str1, NULL); ctxt->errNo = XML_ERR_NO_MEMORY; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; } else { __xmlRaiseError(schannel, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, (const char *) str1, NULL, NULL, 0, 0, msg, (const char *) str1, NULL); } } /** * xmlValidError: * @ctxt: an XML validation parser context * @error: the error number * @msg: the error message * @str1: extra data * @str2: extra data * * Handle a validation error */ static void LIBXML_ATTR_FORMAT(3,0) xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const char *str1, const char *str2) { xmlStructuredErrorFunc schannel = NULL; if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) { ctxt->errNo = error; if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC)) schannel = ctxt->sax->serror; __xmlRaiseError(schannel, ctxt->vctxt.error, ctxt->vctxt.userData, ctxt, NULL, XML_FROM_DTD, error, XML_ERR_ERROR, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, (const char *) str1, (const char *) str2); ctxt->valid = 0; } else { __xmlRaiseError(schannel, NULL, NULL, ctxt, NULL, XML_FROM_DTD, error, XML_ERR_ERROR, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, (const char *) str1, (const char *) str2); } } /** * xmlFatalErrMsg: * @ctxt: an XML parser context * @error: the error number * @msg: the error message * @str1: an error string * @str2: an error string * * Handle a fatal parser error, i.e. violating Well-Formedness constraints */ static void LIBXML_ATTR_FORMAT(3,0) xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const xmlChar *str1, const xmlChar *str2) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_FATAL, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, str1, str2); if (ctxt != NULL) { ctxt->wellFormed = 0; ctxt->valid = 0; if (ctxt->recovery == 0) ctxt->disableSAX = 1; } } /** * xmlWarnMsg: * @ctxt: an XML parser context * @error: the error number * @msg: the error message * @str1: an error string * @str2: an error string * * Handle a parser warning */ static void LIBXML_ATTR_FORMAT(3,0) xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const xmlChar *str1) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_WARNING, NULL, 0, (const char *) str1, NULL, NULL, 0, 0, msg, str1); } /** * xmlNsWarnMsg: * @ctxt: an XML parser context * @error: the error number * @msg: the error message * @str1: an error string * * Handle a namespace warning */ static void LIBXML_ATTR_FORMAT(3,0) xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const xmlChar *str1, const xmlChar *str2) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, XML_ERR_WARNING, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, str1, str2); } /** * xmlSAX2GetPublicId: * @ctx: the user data (XML parser context) * * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" * * Returns a xmlChar * */ const xmlChar * xmlSAX2GetPublicId(void *ctx ATTRIBUTE_UNUSED) { /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ return(NULL); } /** * xmlSAX2GetSystemId: * @ctx: the user data (XML parser context) * * Provides the system ID, basically URL or filename e.g. * http://www.sgmlsource.com/dtds/memo.dtd * * Returns a xmlChar * */ const xmlChar * xmlSAX2GetSystemId(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL); return((const xmlChar *) ctxt->input->filename); } /** * xmlSAX2GetLineNumber: * @ctx: the user data (XML parser context) * * Provide the line number of the current parsing point. * * Returns an int */ int xmlSAX2GetLineNumber(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctx == NULL) || (ctxt->input == NULL)) return(0); return(ctxt->input->line); } /** * xmlSAX2GetColumnNumber: * @ctx: the user data (XML parser context) * * Provide the column number of the current parsing point. * * Returns an int */ int xmlSAX2GetColumnNumber(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctx == NULL) || (ctxt->input == NULL)) return(0); return(ctxt->input->col); } /** * xmlSAX2IsStandalone: * @ctx: the user data (XML parser context) * * Is this document tagged standalone ? * * Returns 1 if true */ int xmlSAX2IsStandalone(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctx == NULL) || (ctxt->myDoc == NULL)) return(0); return(ctxt->myDoc->standalone == 1); } /** * xmlSAX2HasInternalSubset: * @ctx: the user data (XML parser context) * * Does this document has an internal subset * * Returns 1 if true */ int xmlSAX2HasInternalSubset(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); return(ctxt->myDoc->intSubset != NULL); } /** * xmlSAX2HasExternalSubset: * @ctx: the user data (XML parser context) * * Does this document has an external subset * * Returns 1 if true */ int xmlSAX2HasExternalSubset(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); return(ctxt->myDoc->extSubset != NULL); } /** * xmlSAX2InternalSubset: * @ctx: the user data (XML parser context) * @name: the root element name * @ExternalID: the external ID * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on internal subset declaration. */ void xmlSAX2InternalSubset(void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlDtdPtr dtd; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2InternalSubset(%s, %s, %s)\n", name, ExternalID, SystemID); #endif if (ctxt->myDoc == NULL) return; dtd = xmlGetIntSubset(ctxt->myDoc); if (dtd != NULL) { if (ctxt->html) return; xmlUnlinkNode((xmlNodePtr) dtd); xmlFreeDtd(dtd); ctxt->myDoc->intSubset = NULL; } ctxt->myDoc->intSubset = xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID); if (ctxt->myDoc->intSubset == NULL) xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset"); } /** * xmlSAX2ExternalSubset: * @ctx: the user data (XML parser context) * @name: the root element name * @ExternalID: the external ID * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on external subset declaration. */ void xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2ExternalSubset(%s, %s, %s)\n", name, ExternalID, SystemID); #endif if (((ExternalID != NULL) || (SystemID != NULL)) && (((ctxt->validate) || (ctxt->loadsubset != 0)) && (ctxt->wellFormed && ctxt->myDoc))) { /* * Try to fetch and parse the external subset. */ xmlParserInputPtr oldinput; int oldinputNr; int oldinputMax; xmlParserInputPtr *oldinputTab; xmlParserInputPtr input = NULL; xmlCharEncoding enc; int oldcharset; const xmlChar *oldencoding; int oldprogressive; unsigned long consumed; size_t buffered; /* * Ask the Entity resolver to load the damn thing */ if ((ctxt->sax != NULL) && (ctxt->sax->resolveEntity != NULL)) input = ctxt->sax->resolveEntity(ctxt->userData, ExternalID, SystemID); if (input == NULL) { return; } xmlNewDtd(ctxt->myDoc, name, ExternalID, SystemID); /* * make sure we won't destroy the main document context */ oldinput = ctxt->input; oldinputNr = ctxt->inputNr; oldinputMax = ctxt->inputMax; oldinputTab = ctxt->inputTab; oldcharset = ctxt->charset; oldencoding = ctxt->encoding; oldprogressive = ctxt->progressive; ctxt->encoding = NULL; ctxt->progressive = 0; ctxt->inputTab = (xmlParserInputPtr *) xmlMalloc(5 * sizeof(xmlParserInputPtr)); if (ctxt->inputTab == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset"); xmlFreeInputStream(input); ctxt->input = oldinput; ctxt->inputNr = oldinputNr; ctxt->inputMax = oldinputMax; ctxt->inputTab = oldinputTab; ctxt->charset = oldcharset; ctxt->encoding = oldencoding; ctxt->progressive = oldprogressive; return; } ctxt->inputNr = 0; ctxt->inputMax = 5; ctxt->input = NULL; xmlPushInput(ctxt, input); /* * On the fly encoding conversion if needed */ if (ctxt->input->length >= 4) { enc = xmlDetectCharEncoding(ctxt->input->cur, 4); xmlSwitchEncoding(ctxt, enc); } if (input->filename == NULL) input->filename = (char *) xmlCanonicPath(SystemID); input->line = 1; input->col = 1; input->base = ctxt->input->cur; input->cur = ctxt->input->cur; input->free = NULL; /* * let's parse that entity knowing it's an external subset. */ xmlParseExternalSubset(ctxt, ExternalID, SystemID); /* * Free up the external entities */ while (ctxt->inputNr > 1) xmlPopInput(ctxt); consumed = ctxt->input->consumed; buffered = ctxt->input->cur - ctxt->input->base; if (buffered > ULONG_MAX - consumed) consumed = ULONG_MAX; else consumed += buffered; if (consumed > ULONG_MAX - ctxt->sizeentities) ctxt->sizeentities = ULONG_MAX; else ctxt->sizeentities += consumed; xmlFreeInputStream(ctxt->input); xmlFree(ctxt->inputTab); /* * Restore the parsing context of the main entity */ ctxt->input = oldinput; ctxt->inputNr = oldinputNr; ctxt->inputMax = oldinputMax; ctxt->inputTab = oldinputTab; ctxt->charset = oldcharset; if ((ctxt->encoding != NULL) && ((ctxt->dict == NULL) || (!xmlDictOwns(ctxt->dict, ctxt->encoding)))) xmlFree((xmlChar *) ctxt->encoding); ctxt->encoding = oldencoding; ctxt->progressive = oldprogressive; /* ctxt->wellFormed = oldwellFormed; */ } } /** * xmlSAX2ResolveEntity: * @ctx: the user data (XML parser context) * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * The entity loader, to control the loading of external entities, * the application can either: * - override this xmlSAX2ResolveEntity() callback in the SAX block * - or better use the xmlSetExternalEntityLoader() function to * set up it's own entity resolution routine * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ xmlParserInputPtr xmlSAX2ResolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserInputPtr ret; xmlChar *URI; const char *base = NULL; if (ctx == NULL) return(NULL); if (ctxt->input != NULL) base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; URI = xmlBuildURI(systemId, (const xmlChar *) base); #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2ResolveEntity(%s, %s)\n", publicId, systemId); #endif ret = xmlLoadExternalEntity((const char *) URI, (const char *) publicId, ctxt); if (URI != NULL) xmlFree(URI); return(ret); } /** * xmlSAX2GetEntity: * @ctx: the user data (XML parser context) * @name: The entity name * * Get an entity by name * * Returns the xmlEntityPtr if found. */ xmlEntityPtr xmlSAX2GetEntity(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlEntityPtr ret = NULL; if (ctx == NULL) return(NULL); #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2GetEntity(%s)\n", name); #endif if (ctxt->inSubset == 0) { ret = xmlGetPredefinedEntity(name); if (ret != NULL) return(ret); } if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) { if (ctxt->inSubset == 2) { ctxt->myDoc->standalone = 0; ret = xmlGetDocEntity(ctxt->myDoc, name); ctxt->myDoc->standalone = 1; } else { ret = xmlGetDocEntity(ctxt->myDoc, name); if (ret == NULL) { ctxt->myDoc->standalone = 0; ret = xmlGetDocEntity(ctxt->myDoc, name); if (ret != NULL) { xmlFatalErrMsg(ctxt, XML_ERR_NOT_STANDALONE, "Entity(%s) document marked standalone but requires external subset\n", name, NULL); } ctxt->myDoc->standalone = 1; } } } else { ret = xmlGetDocEntity(ctxt->myDoc, name); } return(ret); } /** * xmlSAX2GetParameterEntity: * @ctx: the user data (XML parser context) * @name: The entity name * * Get a parameter entity by name * * Returns the xmlEntityPtr if found. */ xmlEntityPtr xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlEntityPtr ret; if (ctx == NULL) return(NULL); #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2GetParameterEntity(%s)\n", name); #endif ret = xmlGetParameterEntity(ctxt->myDoc, name); return(ret); } /** * xmlSAX2EntityDecl: * @ctx: the user data (XML parser context) * @name: the entity name * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). * * An entity definition has been parsed */ void xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { xmlEntityPtr ent; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EntityDecl(%s, %d, %s, %s, %s)\n", name, type, publicId, systemId, content); #endif if (ctxt->inSubset == 1) { ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId, systemId, content); if ((ent == NULL) && (ctxt->pedantic)) xmlWarnMsg(ctxt, XML_WAR_ENTITY_REDEFINED, "Entity(%s) already defined in the internal subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; const char *base = NULL; if (ctxt->input != NULL) base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } } else if (ctxt->inSubset == 2) { ent = xmlAddDtdEntity(ctxt->myDoc, name, type, publicId, systemId, content); if ((ent == NULL) && (ctxt->pedantic) && (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "Entity(%s) already defined in the external subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; const char *base = NULL; if (ctxt->input != NULL) base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } } else { xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING, "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", name, NULL); } } /** * xmlSAX2AttributeDecl: * @ctx: the user data (XML parser context) * @elem: the name of the element * @fullname: the attribute name * @type: the attribute type * @def: the type of default value * @defaultValue: the attribute default value * @tree: the tree of enumerated value set * * An attribute definition has been parsed */ void xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlAttributePtr attr; xmlChar *name = NULL, *prefix = NULL; /* Avoid unused variable warning if features are disabled. */ (void) attr; if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n", elem, fullname, type, def, defaultValue); #endif if ((xmlStrEqual(fullname, BAD_CAST "xml:id")) && (type != XML_ATTRIBUTE_ID)) { /* * Raise the error but keep the validity flag */ int tmp = ctxt->valid; xmlErrValid(ctxt, XML_DTD_XMLID_TYPE, "xml:id : attribute type should be ID\n", NULL, NULL); ctxt->valid = tmp; } /* TODO: optimize name/prefix allocation */ name = xmlSplitQName(ctxt, fullname, &prefix); ctxt->vctxt.valid = 1; if (ctxt->inSubset == 1) attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, elem, name, prefix, (xmlAttributeType) type, (xmlAttributeDefault) def, defaultValue, tree); else if (ctxt->inSubset == 2) attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem, name, prefix, (xmlAttributeType) type, (xmlAttributeDefault) def, defaultValue, tree); else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n", name, NULL); xmlFree(name); xmlFreeEnumeration(tree); return; } #ifdef LIBXML_VALID_ENABLED if (ctxt->vctxt.valid == 0) ctxt->valid = 0; if ((attr != NULL) && (ctxt->validate) && (ctxt->wellFormed) && (ctxt->myDoc->intSubset != NULL)) ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc, attr); #endif /* LIBXML_VALID_ENABLED */ if (prefix != NULL) xmlFree(prefix); if (name != NULL) xmlFree(name); } /** * xmlSAX2ElementDecl: * @ctx: the user data (XML parser context) * @name: the element name * @type: the element type * @content: the element value tree * * An element definition has been parsed */ void xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type, xmlElementContentPtr content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlElementPtr elem = NULL; /* Avoid unused variable warning if features are disabled. */ (void) elem; if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type); #endif if (ctxt->inSubset == 1) elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, (xmlElementTypeVal) type, content); else if (ctxt->inSubset == 2) elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name, (xmlElementTypeVal) type, content); else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "SAX.xmlSAX2ElementDecl(%s) called while not in subset\n", name, NULL); return; } #ifdef LIBXML_VALID_ENABLED if (elem == NULL) ctxt->valid = 0; if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); #endif /* LIBXML_VALID_ENABLED */ } /** * xmlSAX2NotationDecl: * @ctx: the user data (XML parser context) * @name: The name of the notation * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * What to do when a notation declaration has been parsed. */ void xmlSAX2NotationDecl(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNotationPtr nota = NULL; /* Avoid unused variable warning if features are disabled. */ (void) nota; if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId); #endif if ((publicId == NULL) && (systemId == NULL)) { xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING, "SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n", name, NULL); return; } else if (ctxt->inSubset == 1) nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, publicId, systemId); else if (ctxt->inSubset == 2) nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name, publicId, systemId); else { xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING, "SAX.xmlSAX2NotationDecl(%s) called while not in subset\n", name, NULL); return; } #ifdef LIBXML_VALID_ENABLED if (nota == NULL) ctxt->valid = 0; if ((ctxt->validate) && (ctxt->wellFormed) && (ctxt->myDoc->intSubset != NULL)) ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc, nota); #endif /* LIBXML_VALID_ENABLED */ } /** * xmlSAX2UnparsedEntityDecl: * @ctx: the user data (XML parser context) * @name: The name of the entity * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @notationName: the name of the notation * * What to do when an unparsed entity declaration is parsed */ void xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) { xmlEntityPtr ent; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2UnparsedEntityDecl(%s, %s, %s, %s)\n", name, publicId, systemId, notationName); #endif if (ctxt->inSubset == 1) { ent = xmlAddDocEntity(ctxt->myDoc, name, XML_EXTERNAL_GENERAL_UNPARSED_ENTITY, publicId, systemId, notationName); if ((ent == NULL) && (ctxt->pedantic) && (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "Entity(%s) already defined in the internal subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; const char *base = NULL; if (ctxt->input != NULL) base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } } else if (ctxt->inSubset == 2) { ent = xmlAddDtdEntity(ctxt->myDoc, name, XML_EXTERNAL_GENERAL_UNPARSED_ENTITY, publicId, systemId, notationName); if ((ent == NULL) && (ctxt->pedantic) && (ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "Entity(%s) already defined in the external subset\n", name); if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) { xmlChar *URI; const char *base = NULL; if (ctxt->input != NULL) base = ctxt->input->filename; if (base == NULL) base = ctxt->directory; URI = xmlBuildURI(systemId, (const xmlChar *) base); ent->URI = URI; } } else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", name, NULL); } } /** * xmlSAX2SetDocumentLocator: * @ctx: the user data (XML parser context) * @loc: A SAX Locator * * Receive the document locator at startup, actually xmlDefaultSAXLocator * Everything is available on the context, so this is useless in our case. */ void xmlSAX2SetDocumentLocator(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) { /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2SetDocumentLocator()\n"); #endif } /** * xmlSAX2StartDocument: * @ctx: the user data (XML parser context) * * called when the document start being processed. */ void xmlSAX2StartDocument(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlDocPtr doc; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2StartDocument()\n"); #endif if (ctxt->html) { #ifdef LIBXML_HTML_ENABLED if (ctxt->myDoc == NULL) ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL); if (ctxt->myDoc == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument"); return; } ctxt->myDoc->properties = XML_DOC_HTML; ctxt->myDoc->parseFlags = ctxt->options; #else xmlGenericError(xmlGenericErrorContext, "libxml2 built without HTML support\n"); ctxt->errNo = XML_ERR_INTERNAL_ERROR; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; return; #endif } else { doc = ctxt->myDoc = xmlNewDoc(ctxt->version); if (doc != NULL) { doc->properties = 0; if (ctxt->options & XML_PARSE_OLD10) doc->properties |= XML_DOC_OLD10; doc->parseFlags = ctxt->options; if (ctxt->encoding != NULL) doc->encoding = xmlStrdup(ctxt->encoding); else doc->encoding = NULL; doc->standalone = ctxt->standalone; } else { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument"); return; } if ((ctxt->dictNames) && (doc != NULL)) { doc->dict = ctxt->dict; xmlDictReference(doc->dict); } } if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) && (ctxt->input != NULL) && (ctxt->input->filename != NULL)) { ctxt->myDoc->URL = xmlPathToURI((const xmlChar *)ctxt->input->filename); if (ctxt->myDoc->URL == NULL) xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument"); } } /** * xmlSAX2EndDocument: * @ctx: the user data (XML parser context) * * called when the document end has been detected. */ void xmlSAX2EndDocument(void *ctx) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndDocument()\n"); #endif if (ctx == NULL) return; #ifdef LIBXML_VALID_ENABLED if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc); #endif /* LIBXML_VALID_ENABLED */ /* * Grab the encoding if it was added on-the-fly */ if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) && (ctxt->myDoc->encoding == NULL)) { ctxt->myDoc->encoding = ctxt->encoding; ctxt->encoding = NULL; } if ((ctxt->inputTab != NULL) && (ctxt->inputNr > 0) && (ctxt->inputTab[0] != NULL) && (ctxt->inputTab[0]->encoding != NULL) && (ctxt->myDoc != NULL) && (ctxt->myDoc->encoding == NULL)) { ctxt->myDoc->encoding = xmlStrdup(ctxt->inputTab[0]->encoding); } if ((ctxt->charset != XML_CHAR_ENCODING_NONE) && (ctxt->myDoc != NULL) && (ctxt->myDoc->charset == XML_CHAR_ENCODING_NONE)) { ctxt->myDoc->charset = ctxt->charset; } } #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) /** * xmlNsErrMsg: * @ctxt: an XML parser context * @error: the error number * @msg: the error message * @str1: an error string * @str2: an error string * * Handle a namespace error */ static void LIBXML_ATTR_FORMAT(3,0) xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const xmlChar *str1, const xmlChar *str2) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error, XML_ERR_ERROR, NULL, 0, (const char *) str1, (const char *) str2, NULL, 0, 0, msg, str1, str2); } /** * xmlSAX2AttributeInternal: * @ctx: the user data (XML parser context) * @fullname: The attribute name, including namespace prefix * @value: The attribute value * @prefix: the prefix on the element node * * Handle an attribute that has been read by the parser. * The default handling is to convert the attribute into an * DOM subtree and past it in a new xmlAttr element added to * the element. */ static void xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, const xmlChar *value, const xmlChar *prefix ATTRIBUTE_UNUSED) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlAttrPtr ret; xmlChar *name; xmlChar *ns; xmlChar *nval; xmlNsPtr namespace; if (ctxt->html) { name = xmlStrdup(fullname); ns = NULL; namespace = NULL; } else { /* * Split the full name into a namespace prefix and the tag name */ name = xmlSplitQName(ctxt, fullname, &ns); if ((name != NULL) && (name[0] == 0)) { if (xmlStrEqual(ns, BAD_CAST "xmlns")) { xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR, "invalid namespace declaration '%s'\n", fullname, NULL); } else { xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN, "Avoid attribute ending with ':' like '%s'\n", fullname, NULL); } if (ns != NULL) xmlFree(ns); ns = NULL; xmlFree(name); name = xmlStrdup(fullname); } } if (name == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); if (ns != NULL) xmlFree(ns); return; } #ifdef LIBXML_HTML_ENABLED if ((ctxt->html) && (value == NULL) && (htmlIsBooleanAttr(fullname))) { nval = xmlStrdup(fullname); value = (const xmlChar *) nval; } else #endif { #ifdef LIBXML_VALID_ENABLED /* * Do the last stage of the attribute normalization * Needed for HTML too: * http://www.w3.org/TR/html4/types.html#h-6.2 */ ctxt->vctxt.valid = 1; nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt, ctxt->myDoc, ctxt->node, fullname, value); if (ctxt->vctxt.valid != 1) { ctxt->valid = 0; } if (nval != NULL) value = nval; #else nval = NULL; #endif /* LIBXML_VALID_ENABLED */ } /* * Check whether it's a namespace definition */ if ((!ctxt->html) && (ns == NULL) && (name[0] == 'x') && (name[1] == 'm') && (name[2] == 'l') && (name[3] == 'n') && (name[4] == 's') && (name[5] == 0)) { xmlNsPtr nsret; xmlChar *val; /* Avoid unused variable warning if features are disabled. */ (void) nsret; if (!ctxt->replaceEntities) { ctxt->depth++; val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, 0,0,0); ctxt->depth--; if (val == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); if (name != NULL) xmlFree(name); if (nval != NULL) xmlFree(nval); return; } } else { val = (xmlChar *) value; } if (val[0] != 0) { xmlURIPtr uri; uri = xmlParseURI((const char *)val); if (uri == NULL) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "xmlns: %s not a valid URI\n", val); } else { if (uri->scheme == NULL) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "xmlns: URI %s is not absolute\n", val); } xmlFreeURI(uri); } } /* a default namespace definition */ nsret = xmlNewNs(ctxt->node, val, NULL); #ifdef LIBXML_VALID_ENABLED /* * Validate also for namespace decls, they are attributes from * an XML-1.0 perspective */ if (nsret != NULL && ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, ctxt->node, prefix, nsret, val); #endif /* LIBXML_VALID_ENABLED */ if (name != NULL) xmlFree(name); if (nval != NULL) xmlFree(nval); if (val != value) xmlFree(val); return; } if ((!ctxt->html) && (ns != NULL) && (ns[0] == 'x') && (ns[1] == 'm') && (ns[2] == 'l') && (ns[3] == 'n') && (ns[4] == 's') && (ns[5] == 0)) { xmlNsPtr nsret; xmlChar *val; /* Avoid unused variable warning if features are disabled. */ (void) nsret; if (!ctxt->replaceEntities) { ctxt->depth++; val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, 0,0,0); ctxt->depth--; if (val == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); xmlFree(ns); if (name != NULL) xmlFree(name); if (nval != NULL) xmlFree(nval); return; } } else { val = (xmlChar *) value; } if (val[0] == 0) { xmlNsErrMsg(ctxt, XML_NS_ERR_EMPTY, "Empty namespace name for prefix %s\n", name, NULL); } if ((ctxt->pedantic != 0) && (val[0] != 0)) { xmlURIPtr uri; uri = xmlParseURI((const char *)val); if (uri == NULL) { xmlNsWarnMsg(ctxt, XML_WAR_NS_URI, "xmlns:%s: %s not a valid URI\n", name, value); } else { if (uri->scheme == NULL) { xmlNsWarnMsg(ctxt, XML_WAR_NS_URI_RELATIVE, "xmlns:%s: URI %s is not absolute\n", name, value); } xmlFreeURI(uri); } } /* a standard namespace definition */ nsret = xmlNewNs(ctxt->node, val, name); xmlFree(ns); #ifdef LIBXML_VALID_ENABLED /* * Validate also for namespace decls, they are attributes from * an XML-1.0 perspective */ if (nsret != NULL && ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, ctxt->node, prefix, nsret, value); #endif /* LIBXML_VALID_ENABLED */ if (name != NULL) xmlFree(name); if (nval != NULL) xmlFree(nval); if (val != value) xmlFree(val); return; } if (ns != NULL) { namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns); if (namespace == NULL) { xmlNsErrMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, "Namespace prefix %s of attribute %s is not defined\n", ns, name); } else { xmlAttrPtr prop; prop = ctxt->node->properties; while (prop != NULL) { if (prop->ns != NULL) { if ((xmlStrEqual(name, prop->name)) && ((namespace == prop->ns) || (xmlStrEqual(namespace->href, prop->ns->href)))) { xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED, "Attribute %s in %s redefined\n", name, namespace->href); ctxt->wellFormed = 0; if (ctxt->recovery == 0) ctxt->disableSAX = 1; if (name != NULL) xmlFree(name); goto error; } } prop = prop->next; } } } else { namespace = NULL; } /* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */ ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL); if (ret == NULL) goto error; if ((ctxt->replaceEntities == 0) && (!ctxt->html)) { xmlNodePtr tmp; ret->children = xmlStringGetNodeList(ctxt->myDoc, value); tmp = ret->children; while (tmp != NULL) { tmp->parent = (xmlNodePtr) ret; if (tmp->next == NULL) ret->last = tmp; tmp = tmp->next; } } else if (value != NULL) { ret->children = xmlNewDocText(ctxt->myDoc, value); ret->last = ret->children; if (ret->children != NULL) ret->children->parent = (xmlNodePtr) ret; } #ifdef LIBXML_VALID_ENABLED if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) { /* * If we don't substitute entities, the validation should be * done on a value with replaced entities anyway. */ if (!ctxt->replaceEntities) { xmlChar *val; ctxt->depth++; val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, 0,0,0); ctxt->depth--; if (val == NULL) ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, value); else { xmlChar *nvalnorm; /* * Do the last stage of the attribute normalization * It need to be done twice ... it's an extra burden related * to the ability to keep xmlSAX2References in attributes */ nvalnorm = xmlValidNormalizeAttributeValue(ctxt->myDoc, ctxt->node, fullname, val); if (nvalnorm != NULL) { xmlFree(val); val = nvalnorm; } ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, val); xmlFree(val); } } else { ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, value); } } else #endif /* LIBXML_VALID_ENABLED */ if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) && (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) || ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0))) && /* Don't create IDs containing entity references */ (ret->children != NULL) && (ret->children->type == XML_TEXT_NODE) && (ret->children->next == NULL)) { xmlChar *content = ret->children->content; /* * when validating, the ID registration is done at the attribute * validation level. Otherwise we have to do specific handling here. */ if (xmlStrEqual(fullname, BAD_CAST "xml:id")) { /* * Add the xml:id value * * Open issue: normalization of the value. */ if (xmlValidateNCName(content, 1) != 0) { xmlErrValid(ctxt, XML_DTD_XMLID_VALUE, "xml:id : attribute value %s is not an NCName\n", (const char *) content, NULL); } xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret); } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret); else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) xmlAddRef(&ctxt->vctxt, ctxt->myDoc, content, ret); } error: if (nval != NULL) xmlFree(nval); if (ns != NULL) xmlFree(ns); } /* * xmlCheckDefaultedAttributes: * * Check defaulted attributes from the DTD */ static void xmlCheckDefaultedAttributes(xmlParserCtxtPtr ctxt, const xmlChar *name, const xmlChar *prefix, const xmlChar **atts) { xmlElementPtr elemDecl; const xmlChar *att; int internal = 1; int i; elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->intSubset, name, prefix); if (elemDecl == NULL) { elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, name, prefix); internal = 0; } process_external_subset: if (elemDecl != NULL) { xmlAttributePtr attr = elemDecl->attributes; /* * Check against defaulted attributes from the external subset * if the document is stamped as standalone */ if ((ctxt->myDoc->standalone == 1) && (ctxt->myDoc->extSubset != NULL) && (ctxt->validate)) { while (attr != NULL) { if ((attr->defaultValue != NULL) && (xmlGetDtdQAttrDesc(ctxt->myDoc->extSubset, attr->elem, attr->name, attr->prefix) == attr) && (xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset, attr->elem, attr->name, attr->prefix) == NULL)) { xmlChar *fulln; if (attr->prefix != NULL) { fulln = xmlStrdup(attr->prefix); fulln = xmlStrcat(fulln, BAD_CAST ":"); fulln = xmlStrcat(fulln, attr->name); } else { fulln = xmlStrdup(attr->name); } if (fulln == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); break; } /* * Check that the attribute is not declared in the * serialization */ att = NULL; if (atts != NULL) { i = 0; att = atts[i]; while (att != NULL) { if (xmlStrEqual(att, fulln)) break; i += 2; att = atts[i]; } } if (att == NULL) { xmlErrValid(ctxt, XML_DTD_STANDALONE_DEFAULTED, "standalone: attribute %s on %s defaulted from external subset\n", (const char *)fulln, (const char *)attr->elem); } xmlFree(fulln); } attr = attr->nexth; } } /* * Actually insert defaulted values when needed */ attr = elemDecl->attributes; while (attr != NULL) { /* * Make sure that attributes redefinition occurring in the * internal subset are not overridden by definitions in the * external subset. */ if (attr->defaultValue != NULL) { /* * the element should be instantiated in the tree if: * - this is a namespace prefix * - the user required for completion in the tree * like XSLT * - there isn't already an attribute definition * in the internal subset overriding it. */ if (((attr->prefix != NULL) && (xmlStrEqual(attr->prefix, BAD_CAST "xmlns"))) || ((attr->prefix == NULL) && (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) || (ctxt->loadsubset & XML_COMPLETE_ATTRS)) { xmlAttributePtr tst; tst = xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset, attr->elem, attr->name, attr->prefix); if ((tst == attr) || (tst == NULL)) { xmlChar fn[50]; xmlChar *fulln; fulln = xmlBuildQName(attr->name, attr->prefix, fn, 50); if (fulln == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); return; } /* * Check that the attribute is not declared in the * serialization */ att = NULL; if (atts != NULL) { i = 0; att = atts[i]; while (att != NULL) { if (xmlStrEqual(att, fulln)) break; i += 2; att = atts[i]; } } if (att == NULL) { xmlSAX2AttributeInternal(ctxt, fulln, attr->defaultValue, prefix); } if ((fulln != fn) && (fulln != attr->name)) xmlFree(fulln); } } } attr = attr->nexth; } if (internal == 1) { elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, name, prefix); internal = 0; goto process_external_subset; } } } /** * xmlSAX2StartElement: * @ctx: the user data (XML parser context) * @fullname: The element name, including namespace prefix * @atts: An array of name/value attributes pairs, NULL terminated * * called when an opening tag has been processed. */ void xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; xmlNodePtr parent; xmlNsPtr ns; xmlChar *name; xmlChar *prefix; const xmlChar *att; const xmlChar *value; int i; if ((ctx == NULL) || (fullname == NULL) || (ctxt->myDoc == NULL)) return; parent = ctxt->node; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2StartElement(%s)\n", fullname); #endif /* * First check on validity: */ if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && ((ctxt->myDoc->intSubset == NULL) || ((ctxt->myDoc->intSubset->notations == NULL) && (ctxt->myDoc->intSubset->elements == NULL) && (ctxt->myDoc->intSubset->attributes == NULL) && (ctxt->myDoc->intSubset->entities == NULL)))) { xmlErrValid(ctxt, XML_ERR_NO_DTD, "Validation failed: no DTD found !", NULL, NULL); ctxt->validate = 0; } if (ctxt->html) { prefix = NULL; name = xmlStrdup(fullname); } else { /* * Split the full name into a namespace prefix and the tag name */ name = xmlSplitQName(ctxt, fullname, &prefix); } /* * Note : the namespace resolution is deferred until the end of the * attributes parsing, since local namespace can be defined as * an attribute at this level. */ ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, name, NULL); if (ret == NULL) { if (prefix != NULL) xmlFree(prefix); xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement"); return; } if (ctxt->myDoc->children == NULL) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "Setting %s as root\n", name); #endif xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); } else if (parent == NULL) { parent = ctxt->myDoc->children; } ctxt->nodemem = -1; if (ctxt->linenumbers) { if (ctxt->input != NULL) { if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX) ret->line = ctxt->input->line; else ret->line = USHRT_MAX; } } /* * We are parsing a new node. */ #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "pushing(%s)\n", name); #endif if (nodePush(ctxt, ret) < 0) { xmlUnlinkNode(ret); xmlFreeNode(ret); if (prefix != NULL) xmlFree(prefix); return; } /* * Link the child element */ if (parent != NULL) { if (parent->type == XML_ELEMENT_NODE) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "adding child %s to %s\n", name, parent->name); #endif xmlAddChild(parent, ret); } else { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "adding sibling %s to ", name); xmlDebugDumpOneNode(stderr, parent, 0); #endif xmlAddSibling(parent, ret); } } if (!ctxt->html) { /* * Insert all the defaulted attributes from the DTD especially * namespaces */ if ((ctxt->myDoc->intSubset != NULL) || (ctxt->myDoc->extSubset != NULL)) { xmlCheckDefaultedAttributes(ctxt, name, prefix, atts); } /* * process all the attributes whose name start with "xmlns" */ if (atts != NULL) { i = 0; att = atts[i++]; value = atts[i++]; while ((att != NULL) && (value != NULL)) { if ((att[0] == 'x') && (att[1] == 'm') && (att[2] == 'l') && (att[3] == 'n') && (att[4] == 's')) xmlSAX2AttributeInternal(ctxt, att, value, prefix); att = atts[i++]; value = atts[i++]; } } /* * Search the namespace, note that since the attributes have been * processed, the local namespaces are available. */ ns = xmlSearchNs(ctxt->myDoc, ret, prefix); if ((ns == NULL) && (parent != NULL)) ns = xmlSearchNs(ctxt->myDoc, parent, prefix); if ((prefix != NULL) && (ns == NULL)) { ns = xmlNewNs(ret, NULL, prefix); xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, "Namespace prefix %s is not defined\n", prefix, NULL); } /* * set the namespace node, making sure that if the default namespace * is unbound on a parent we simply keep it NULL */ if ((ns != NULL) && (ns->href != NULL) && ((ns->href[0] != 0) || (ns->prefix != NULL))) xmlSetNs(ret, ns); } /* * process all the other attributes */ if (atts != NULL) { i = 0; att = atts[i++]; value = atts[i++]; if (ctxt->html) { while (att != NULL) { xmlSAX2AttributeInternal(ctxt, att, value, NULL); att = atts[i++]; value = atts[i++]; } } else { while ((att != NULL) && (value != NULL)) { if ((att[0] != 'x') || (att[1] != 'm') || (att[2] != 'l') || (att[3] != 'n') || (att[4] != 's')) xmlSAX2AttributeInternal(ctxt, att, value, NULL); /* * Next ones */ att = atts[i++]; value = atts[i++]; } } } #ifdef LIBXML_VALID_ENABLED /* * If it's the Document root, finish the DTD validation and * check the document root element for validity */ if ((ctxt->validate) && ((ctxt->vctxt.flags & XML_VCTXT_DTD_VALIDATED) == 0)) { int chk; chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); if (chk <= 0) ctxt->valid = 0; if (chk < 0) ctxt->wellFormed = 0; ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); ctxt->vctxt.flags |= XML_VCTXT_DTD_VALIDATED; } #endif /* LIBXML_VALID_ENABLED */ if (prefix != NULL) xmlFree(prefix); } /** * xmlSAX2EndElement: * @ctx: the user data (XML parser context) * @name: The element name * * called when the end of an element has been detected. */ void xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr cur; if (ctx == NULL) return; cur = ctxt->node; #ifdef DEBUG_SAX if (name == NULL) xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(NULL)\n"); else xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name); #endif ctxt->nodemem = -1; #ifdef LIBXML_VALID_ENABLED if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, cur); #endif /* LIBXML_VALID_ENABLED */ /* * end of parsing of this node. */ #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "popping(%s)\n", cur->name); #endif nodePop(ctxt); } #endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */ /* * xmlSAX2TextNode: * @ctxt: the parser context * @str: the input string * @len: the string length * * Callback for a text node * * Returns the newly allocated string or NULL if not needed or error */ static xmlNodePtr xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { xmlNodePtr ret; const xmlChar *intern = NULL; /* * Allocate */ if (ctxt->freeElems != NULL) { ret = ctxt->freeElems; ctxt->freeElems = ret->next; ctxt->freeElemsNr--; } else { ret = (xmlNodePtr) xmlMalloc(sizeof(xmlNode)); } if (ret == NULL) { xmlErrMemory(ctxt, "xmlSAX2Characters"); return(NULL); } memset(ret, 0, sizeof(xmlNode)); /* * intern the formatting blanks found between tags, or the * very short strings */ if (ctxt->dictNames) { xmlChar cur = str[len]; if ((len < (int) (2 * sizeof(void *))) && (ctxt->options & XML_PARSE_COMPACT)) { /* store the string in the node overriding properties and nsDef */ xmlChar *tmp = (xmlChar *) &(ret->properties); memcpy(tmp, str, len); tmp[len] = 0; intern = tmp; } else if ((len <= 3) && ((cur == '"') || (cur == '\'') || ((cur == '<') && (str[len + 1] != '!')))) { intern = xmlDictLookup(ctxt->dict, str, len); } else if (IS_BLANK_CH(*str) && (len < 60) && (cur == '<') && (str[len + 1] != '!')) { int i; for (i = 1;i < len;i++) { if (!IS_BLANK_CH(str[i])) goto skip; } intern = xmlDictLookup(ctxt->dict, str, len); } } skip: ret->type = XML_TEXT_NODE; ret->name = xmlStringText; if (intern == NULL) { ret->content = xmlStrndup(str, len); if (ret->content == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2TextNode"); xmlFree(ret); return(NULL); } } else ret->content = (xmlChar *) intern; if (ctxt->linenumbers) { if (ctxt->input != NULL) { if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX) ret->line = ctxt->input->line; else { ret->line = USHRT_MAX; if (ctxt->options & XML_PARSE_BIG_LINES) ret->psvi = (void *) (ptrdiff_t) ctxt->input->line; } } } if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) xmlRegisterNodeDefaultValue(ret); return(ret); } #ifdef LIBXML_VALID_ENABLED /* * xmlSAX2DecodeAttrEntities: * @ctxt: the parser context * @str: the input string * @len: the string length * * Remove the entities from an attribute value * * Returns the newly allocated string or NULL if not needed or error */ static xmlChar * xmlSAX2DecodeAttrEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, const xmlChar *end) { const xmlChar *in; xmlChar *ret; in = str; while (in < end) if (*in++ == '&') goto decode; return(NULL); decode: ctxt->depth++; ret = xmlStringLenDecodeEntities(ctxt, str, end - str, XML_SUBSTITUTE_REF, 0,0,0); ctxt->depth--; return(ret); } #endif /* LIBXML_VALID_ENABLED */ /** * xmlSAX2AttributeNs: * @ctx: the user data (XML parser context) * @localname: the local name of the attribute * @prefix: the attribute namespace prefix if available * @URI: the attribute namespace name if available * @value: Start of the attribute value * @valueend: end of the attribute value * * Handle an attribute that has been read by the parser. * The default handling is to convert the attribute into an * DOM subtree and past it in a new xmlAttr element added to * the element. */ static void xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, const xmlChar * localname, const xmlChar * prefix, const xmlChar * value, const xmlChar * valueend) { xmlAttrPtr ret; xmlNsPtr namespace = NULL; xmlChar *dup = NULL; /* * Note: if prefix == NULL, the attribute is not in the default namespace */ if (prefix != NULL) namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, prefix); /* * allocate the node */ if (ctxt->freeAttrs != NULL) { ret = ctxt->freeAttrs; ctxt->freeAttrs = ret->next; ctxt->freeAttrsNr--; memset(ret, 0, sizeof(xmlAttr)); ret->type = XML_ATTRIBUTE_NODE; ret->parent = ctxt->node; ret->doc = ctxt->myDoc; ret->ns = namespace; if (ctxt->dictNames) ret->name = localname; else ret->name = xmlStrdup(localname); /* link at the end to preserve order, TODO speed up with a last */ if (ctxt->node->properties == NULL) { ctxt->node->properties = ret; } else { xmlAttrPtr prev = ctxt->node->properties; while (prev->next != NULL) prev = prev->next; prev->next = ret; ret->prev = prev; } if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) xmlRegisterNodeDefaultValue((xmlNodePtr)ret); } else { if (ctxt->dictNames) ret = xmlNewNsPropEatName(ctxt->node, namespace, (xmlChar *) localname, NULL); else ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL); if (ret == NULL) { xmlErrMemory(ctxt, "xmlSAX2AttributeNs"); return; } } if ((ctxt->replaceEntities == 0) && (!ctxt->html)) { xmlNodePtr tmp; /* * We know that if there is an entity reference, then * the string has been dup'ed and terminates with 0 * otherwise with ' or " */ if (*valueend != 0) { tmp = xmlSAX2TextNode(ctxt, value, valueend - value); ret->children = tmp; ret->last = tmp; if (tmp != NULL) { tmp->doc = ret->doc; tmp->parent = (xmlNodePtr) ret; } } else { ret->children = xmlStringLenGetNodeList(ctxt->myDoc, value, valueend - value); tmp = ret->children; while (tmp != NULL) { tmp->doc = ret->doc; tmp->parent = (xmlNodePtr) ret; if (tmp->next == NULL) ret->last = tmp; tmp = tmp->next; } } } else if (value != NULL) { xmlNodePtr tmp; tmp = xmlSAX2TextNode(ctxt, value, valueend - value); ret->children = tmp; ret->last = tmp; if (tmp != NULL) { tmp->doc = ret->doc; tmp->parent = (xmlNodePtr) ret; } } #ifdef LIBXML_VALID_ENABLED if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) { /* * If we don't substitute entities, the validation should be * done on a value with replaced entities anyway. */ if (!ctxt->replaceEntities) { dup = xmlSAX2DecodeAttrEntities(ctxt, value, valueend); if (dup == NULL) { if (*valueend == 0) { ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, value); } else { /* * That should already be normalized. * cheaper to finally allocate here than duplicate * entry points in the full validation code */ dup = xmlStrndup(value, valueend - value); ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, dup); } } else { /* * dup now contains a string of the flattened attribute * content with entities substituted. Check if we need to * apply an extra layer of normalization. * It need to be done twice ... it's an extra burden related * to the ability to keep references in attributes */ if (ctxt->attsSpecial != NULL) { xmlChar *nvalnorm; xmlChar fn[50]; xmlChar *fullname; fullname = xmlBuildQName(localname, prefix, fn, 50); if (fullname != NULL) { ctxt->vctxt.valid = 1; nvalnorm = xmlValidCtxtNormalizeAttributeValue( &ctxt->vctxt, ctxt->myDoc, ctxt->node, fullname, dup); if (ctxt->vctxt.valid != 1) ctxt->valid = 0; if ((fullname != fn) && (fullname != localname)) xmlFree(fullname); if (nvalnorm != NULL) { xmlFree(dup); dup = nvalnorm; } } } ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, dup); } } else { /* * if entities already have been substituted, then * the attribute as passed is already normalized */ dup = xmlStrndup(value, valueend - value); ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, dup); } } else #endif /* LIBXML_VALID_ENABLED */ if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) && (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) || ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0))) && /* Don't create IDs containing entity references */ (ret->children != NULL) && (ret->children->type == XML_TEXT_NODE) && (ret->children->next == NULL)) { xmlChar *content = ret->children->content; /* * when validating, the ID registration is done at the attribute * validation level. Otherwise we have to do specific handling here. */ if ((prefix == ctxt->str_xml) && (localname[0] == 'i') && (localname[1] == 'd') && (localname[2] == 0)) { /* * Add the xml:id value * * Open issue: normalization of the value. */ if (xmlValidateNCName(content, 1) != 0) { xmlErrValid(ctxt, XML_DTD_XMLID_VALUE, "xml:id : attribute value %s is not an NCName\n", (const char *) content, NULL); } xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret); } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) { xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret); } else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) { xmlAddRef(&ctxt->vctxt, ctxt->myDoc, content, ret); } } if (dup != NULL) xmlFree(dup); } /** * xmlSAX2StartElementNs: * @ctx: the user data (XML parser context) * @localname: the local name of the element * @prefix: the element namespace prefix if available * @URI: the element namespace name if available * @nb_namespaces: number of namespace definitions on that node * @namespaces: pointer to the array of prefix/URI pairs namespace definitions * @nb_attributes: the number of attributes on that node * @nb_defaulted: the number of defaulted attributes. * @attributes: pointer to the array of (localname/prefix/URI/value/end) * attribute values. * * SAX2 callback when an element start has been detected by the parser. * It provides the namespace information for the element, as well as * the new namespace declarations on the element. */ void xmlSAX2StartElementNs(void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; xmlNodePtr parent; xmlNsPtr last = NULL, ns; const xmlChar *uri, *pref; xmlChar *lname = NULL; int i, j; if (ctx == NULL) return; parent = ctxt->node; /* * First check on validity: */ if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && ((ctxt->myDoc->intSubset == NULL) || ((ctxt->myDoc->intSubset->notations == NULL) && (ctxt->myDoc->intSubset->elements == NULL) && (ctxt->myDoc->intSubset->attributes == NULL) && (ctxt->myDoc->intSubset->entities == NULL)))) { xmlErrValid(ctxt, XML_DTD_NO_DTD, "Validation failed: no DTD found !", NULL, NULL); ctxt->validate = 0; } /* * Take care of the rare case of an undefined namespace prefix */ if ((prefix != NULL) && (URI == NULL)) { if (ctxt->dictNames) { const xmlChar *fullname; fullname = xmlDictQLookup(ctxt->dict, prefix, localname); if (fullname != NULL) localname = fullname; } else { lname = xmlBuildQName(localname, prefix, NULL, 0); } } /* * allocate the node */ if (ctxt->freeElems != NULL) { ret = ctxt->freeElems; ctxt->freeElems = ret->next; ctxt->freeElemsNr--; memset(ret, 0, sizeof(xmlNode)); ret->doc = ctxt->myDoc; ret->type = XML_ELEMENT_NODE; if (ctxt->dictNames) ret->name = localname; else { if (lname == NULL) ret->name = xmlStrdup(localname); else ret->name = lname; if (ret->name == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); xmlFree(ret); return; } } if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) xmlRegisterNodeDefaultValue(ret); } else { if (ctxt->dictNames) ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, (xmlChar *) localname, NULL); else if (lname == NULL) ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL); else ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, (xmlChar *) lname, NULL); if (ret == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; } } if (ctxt->linenumbers) { if (ctxt->input != NULL) { if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX) ret->line = ctxt->input->line; else ret->line = USHRT_MAX; } } if (parent == NULL) { xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); } /* * Build the namespace list */ for (i = 0,j = 0;j < nb_namespaces;j++) { pref = namespaces[i++]; uri = namespaces[i++]; ns = xmlNewNs(NULL, uri, pref); if (ns != NULL) { if (last == NULL) { ret->nsDef = last = ns; } else { last->next = ns; last = ns; } if ((URI != NULL) && (prefix == pref)) ret->ns = ns; } else { /* * any out of memory error would already have been raised * but we can't be guaranteed it's the actual error due to the * API, best is to skip in this case */ continue; } #ifdef LIBXML_VALID_ENABLED if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) { ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, ret, prefix, ns, uri); } #endif /* LIBXML_VALID_ENABLED */ } ctxt->nodemem = -1; /* * We are parsing a new node. */ if (nodePush(ctxt, ret) < 0) { xmlUnlinkNode(ret); xmlFreeNode(ret); return; } /* * Link the child element */ if (parent != NULL) { if (parent->type == XML_ELEMENT_NODE) { xmlAddChild(parent, ret); } else { xmlAddSibling(parent, ret); } } /* * Insert the defaulted attributes from the DTD only if requested: */ if ((nb_defaulted != 0) && ((ctxt->loadsubset & XML_COMPLETE_ATTRS) == 0)) nb_attributes -= nb_defaulted; /* * Search the namespace if it wasn't already found * Note that, if prefix is NULL, this searches for the default Ns */ if ((URI != NULL) && (ret->ns == NULL)) { ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix); if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) { ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix); } if (ret->ns == NULL) { ns = xmlNewNs(ret, NULL, prefix); if (ns == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; } if (prefix != NULL) xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, "Namespace prefix %s was not found\n", prefix, NULL); else xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE, "Namespace default prefix was not found\n", NULL, NULL); } } /* * process all the other attributes */ if (nb_attributes > 0) { for (j = 0,i = 0;i < nb_attributes;i++,j+=5) { /* * Handle the rare case of an undefined attribute prefix */ if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) { if (ctxt->dictNames) { const xmlChar *fullname; fullname = xmlDictQLookup(ctxt->dict, attributes[j+1], attributes[j]); if (fullname != NULL) { xmlSAX2AttributeNs(ctxt, fullname, NULL, attributes[j+3], attributes[j+4]); continue; } } else { lname = xmlBuildQName(attributes[j], attributes[j+1], NULL, 0); if (lname != NULL) { xmlSAX2AttributeNs(ctxt, lname, NULL, attributes[j+3], attributes[j+4]); xmlFree(lname); continue; } } } xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1], attributes[j+3], attributes[j+4]); } } #ifdef LIBXML_VALID_ENABLED /* * If it's the Document root, finish the DTD validation and * check the document root element for validity */ if ((ctxt->validate) && ((ctxt->vctxt.flags & XML_VCTXT_DTD_VALIDATED) == 0)) { int chk; chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); if (chk <= 0) ctxt->valid = 0; if (chk < 0) ctxt->wellFormed = 0; ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); ctxt->vctxt.flags |= XML_VCTXT_DTD_VALIDATED; } #endif /* LIBXML_VALID_ENABLED */ } /** * xmlSAX2EndElementNs: * @ctx: the user data (XML parser context) * @localname: the local name of the element * @prefix: the element namespace prefix if available * @URI: the element namespace name if available * * SAX2 callback when an element end has been detected by the parser. * It provides the namespace information for the element. */ void xmlSAX2EndElementNs(void *ctx, const xmlChar * localname ATTRIBUTE_UNUSED, const xmlChar * prefix ATTRIBUTE_UNUSED, const xmlChar * URI ATTRIBUTE_UNUSED) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; if (ctx == NULL) return; ctxt->nodemem = -1; #ifdef LIBXML_VALID_ENABLED if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, ctxt->node); #endif /* LIBXML_VALID_ENABLED */ /* * end of parsing of this node. */ nodePop(ctxt); } /** * xmlSAX2Reference: * @ctx: the user data (XML parser context) * @name: The entity name * * called when an entity xmlSAX2Reference is detected. */ void xmlSAX2Reference(void *ctx, const xmlChar *name) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; if (ctx == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Reference(%s)\n", name); #endif if (name[0] == '#') ret = xmlNewCharRef(ctxt->myDoc, name); else ret = xmlNewReference(ctxt->myDoc, name); #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "add xmlSAX2Reference %s to %s \n", name, ctxt->node->name); #endif if (xmlAddChild(ctxt->node, ret) == NULL) { xmlFreeNode(ret); } } /** * xmlSAX2Text: * @ctx: the user data (XML parser context) * @ch: a xmlChar string * @len: the number of xmlChar * @type: text or cdata * * Append characters. */ static void xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len, xmlElementType type) { xmlNodePtr lastChild; if (ctxt == NULL) return; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Characters(%.30s, %d)\n", ch, len); #endif /* * Handle the data if any. If there is no child * add it as content, otherwise if the last child is text, * concatenate it, else create a new node of type text. */ if (ctxt->node == NULL) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "add chars: ctxt->node == NULL !\n"); #endif return; } lastChild = ctxt->node->last; #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "add chars to %s \n", ctxt->node->name); #endif /* * Here we needed an accelerator mechanism in case of very large * elements. Use an attribute in the structure !!! */ if (lastChild == NULL) { if (type == XML_TEXT_NODE) lastChild = xmlSAX2TextNode(ctxt, ch, len); else lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len); if (lastChild != NULL) { ctxt->node->children = lastChild; ctxt->node->last = lastChild; lastChild->parent = ctxt->node; lastChild->doc = ctxt->node->doc; ctxt->nodelen = len; ctxt->nodemem = len + 1; } else { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters"); return; } } else { int coalesceText = (lastChild != NULL) && (lastChild->type == type) && ((type != XML_TEXT_NODE) || (lastChild->name == xmlStringText)); if ((coalesceText) && (ctxt->nodemem != 0)) { /* * The whole point of maintaining nodelen and nodemem, * xmlTextConcat is too costly, i.e. compute length, * reallocate a new buffer, move data, append ch. Here * We try to minimize realloc() uses and avoid copying * and recomputing length over and over. */ if (lastChild->content == (xmlChar *)&(lastChild->properties)) { lastChild->content = xmlStrdup(lastChild->content); lastChild->properties = NULL; } else if ((ctxt->nodemem == ctxt->nodelen + 1) && (xmlDictOwns(ctxt->dict, lastChild->content))) { lastChild->content = xmlStrdup(lastChild->content); } if (lastChild->content == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: xmlStrdup returned NULL"); return; } if (ctxt->nodelen > INT_MAX - len) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented"); return; } if ((ctxt->nodelen + len > XML_MAX_TEXT_LENGTH) && ((ctxt->options & XML_PARSE_HUGE) == 0)) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node"); return; } if (ctxt->nodelen + len >= ctxt->nodemem) { xmlChar *newbuf; int size; size = ctxt->nodemem > INT_MAX - len ? INT_MAX : ctxt->nodemem + len; size = size > INT_MAX / 2 ? INT_MAX : size * 2; newbuf = (xmlChar *) xmlRealloc(lastChild->content,size); if (newbuf == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters"); return; } ctxt->nodemem = size; lastChild->content = newbuf; } memcpy(&lastChild->content[ctxt->nodelen], ch, len); ctxt->nodelen += len; lastChild->content[ctxt->nodelen] = 0; } else if (coalesceText) { if (xmlTextConcat(lastChild, ch, len)) { xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters"); } if (ctxt->node->children != NULL) { ctxt->nodelen = xmlStrlen(lastChild->content); ctxt->nodemem = ctxt->nodelen + 1; } } else { /* Mixed content, first time */ if (type == XML_TEXT_NODE) { lastChild = xmlSAX2TextNode(ctxt, ch, len); if (lastChild != NULL) lastChild->doc = ctxt->myDoc; } else lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len); if (lastChild != NULL) { xmlAddChild(ctxt->node, lastChild); if (ctxt->node->children != NULL) { ctxt->nodelen = len; ctxt->nodemem = len + 1; } } } } } /** * xmlSAX2Characters: * @ctx: the user data (XML parser context) * @ch: a xmlChar string * @len: the number of xmlChar * * receiving some chars from the parser. */ void xmlSAX2Characters(void *ctx, const xmlChar *ch, int len) { xmlSAX2Text((xmlParserCtxtPtr) ctx, ch, len, XML_TEXT_NODE); } /** * xmlSAX2IgnorableWhitespace: * @ctx: the user data (XML parser context) * @ch: a xmlChar string * @len: the number of xmlChar * * receiving some ignorable whitespaces from the parser. * UNUSED: by default the DOM building will use xmlSAX2Characters */ void xmlSAX2IgnorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED) { /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2IgnorableWhitespace(%.30s, %d)\n", ch, len); #endif } /** * xmlSAX2ProcessingInstruction: * @ctx: the user data (XML parser context) * @target: the target name * @data: the PI data's * * A processing instruction has been parsed. */ void xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target, const xmlChar *data) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; xmlNodePtr parent; if (ctx == NULL) return; parent = ctxt->node; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2ProcessingInstruction(%s, %s)\n", target, data); #endif ret = xmlNewDocPI(ctxt->myDoc, target, data); if (ret == NULL) return; if (ctxt->linenumbers) { if (ctxt->input != NULL) { if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX) ret->line = ctxt->input->line; else ret->line = USHRT_MAX; } } if (ctxt->inSubset == 1) { xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); return; } else if (ctxt->inSubset == 2) { xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); return; } if (parent == NULL) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "Setting PI %s as root\n", target); #endif xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); return; } if (parent->type == XML_ELEMENT_NODE) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "adding PI %s child to %s\n", target, parent->name); #endif xmlAddChild(parent, ret); } else { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "adding PI %s sibling to ", target); xmlDebugDumpOneNode(stderr, parent, 0); #endif xmlAddSibling(parent, ret); } } /** * xmlSAX2Comment: * @ctx: the user data (XML parser context) * @value: the xmlSAX2Comment content * * A xmlSAX2Comment has been parsed. */ void xmlSAX2Comment(void *ctx, const xmlChar *value) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlNodePtr ret; xmlNodePtr parent; if (ctx == NULL) return; parent = ctxt->node; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Comment(%s)\n", value); #endif ret = xmlNewDocComment(ctxt->myDoc, value); if (ret == NULL) return; if (ctxt->linenumbers) { if (ctxt->input != NULL) { if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX) ret->line = ctxt->input->line; else ret->line = USHRT_MAX; } } if (ctxt->inSubset == 1) { xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); return; } else if (ctxt->inSubset == 2) { xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); return; } if (parent == NULL) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "Setting xmlSAX2Comment as root\n"); #endif xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); return; } if (parent->type == XML_ELEMENT_NODE) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "adding xmlSAX2Comment child to %s\n", parent->name); #endif xmlAddChild(parent, ret); } else { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "adding xmlSAX2Comment sibling to "); xmlDebugDumpOneNode(stderr, parent, 0); #endif xmlAddSibling(parent, ret); } } /** * xmlSAX2CDataBlock: * @ctx: the user data (XML parser context) * @value: The pcdata content * @len: the block length * * called when a pcdata block has been parsed */ void xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len) { xmlSAX2Text((xmlParserCtxtPtr) ctx, value, len, XML_CDATA_SECTION_NODE); } static int xmlSAX2DefaultVersionValue = 2; #ifdef LIBXML_SAX1_ENABLED /** * xmlSAXDefaultVersion: * @version: the version, 1 or 2 * * DEPRECATED: Use parser option XML_PARSE_SAX1. * * Set the default version of SAX used globally by the library. * By default, during initialization the default is set to 2. * Note that it is generally a better coding style to use * xmlSAXVersion() to set up the version explicitly for a given * parsing context. * * Returns the previous value in case of success and -1 in case of error. */ int xmlSAXDefaultVersion(int version) { int ret = xmlSAX2DefaultVersionValue; if ((version != 1) && (version != 2)) return(-1); xmlSAX2DefaultVersionValue = version; return(ret); } #endif /* LIBXML_SAX1_ENABLED */ /** * xmlSAXVersion: * @hdlr: the SAX handler * @version: the version, 1 or 2 * * Initialize the default XML SAX handler according to the version * * Returns 0 in case of success and -1 in case of error. */ int xmlSAXVersion(xmlSAXHandler *hdlr, int version) { if (hdlr == NULL) return(-1); if (version == 2) { hdlr->startElementNs = xmlSAX2StartElementNs; hdlr->endElementNs = xmlSAX2EndElementNs; hdlr->serror = NULL; hdlr->initialized = XML_SAX2_MAGIC; #ifdef LIBXML_SAX1_ENABLED } else if (version == 1) { hdlr->initialized = 1; #endif /* LIBXML_SAX1_ENABLED */ } else return(-1); #ifdef LIBXML_SAX1_ENABLED hdlr->startElement = xmlSAX2StartElement; hdlr->endElement = xmlSAX2EndElement; #else hdlr->startElement = NULL; hdlr->endElement = NULL; #endif /* LIBXML_SAX1_ENABLED */ hdlr->internalSubset = xmlSAX2InternalSubset; hdlr->externalSubset = xmlSAX2ExternalSubset; hdlr->isStandalone = xmlSAX2IsStandalone; hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; hdlr->resolveEntity = xmlSAX2ResolveEntity; hdlr->getEntity = xmlSAX2GetEntity; hdlr->getParameterEntity = xmlSAX2GetParameterEntity; hdlr->entityDecl = xmlSAX2EntityDecl; hdlr->attributeDecl = xmlSAX2AttributeDecl; hdlr->elementDecl = xmlSAX2ElementDecl; hdlr->notationDecl = xmlSAX2NotationDecl; hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl; hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; hdlr->startDocument = xmlSAX2StartDocument; hdlr->endDocument = xmlSAX2EndDocument; hdlr->reference = xmlSAX2Reference; hdlr->characters = xmlSAX2Characters; hdlr->cdataBlock = xmlSAX2CDataBlock; hdlr->ignorableWhitespace = xmlSAX2Characters; hdlr->processingInstruction = xmlSAX2ProcessingInstruction; hdlr->comment = xmlSAX2Comment; hdlr->warning = xmlParserWarning; hdlr->error = xmlParserError; hdlr->fatalError = xmlParserError; return(0); } /** * xmlSAX2InitDefaultSAXHandler: * @hdlr: the SAX handler * @warning: flag if non-zero sets the handler warning procedure * * Initialize the default XML SAX2 handler */ void xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning) { if ((hdlr == NULL) || (hdlr->initialized != 0)) return; xmlSAXVersion(hdlr, xmlSAX2DefaultVersionValue); if (warning == 0) hdlr->warning = NULL; else hdlr->warning = xmlParserWarning; } /** * xmlDefaultSAXHandlerInit: * * DEPRECATED: This function is a no-op. Call xmlInitParser to * initialize the library. * * Initialize the default SAX2 handler */ void xmlDefaultSAXHandlerInit(void) { } #ifdef LIBXML_HTML_ENABLED /** * xmlSAX2InitHtmlDefaultSAXHandler: * @hdlr: the SAX handler * * Initialize the default HTML SAX2 handler */ void xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr) { if ((hdlr == NULL) || (hdlr->initialized != 0)) return; hdlr->internalSubset = xmlSAX2InternalSubset; hdlr->externalSubset = NULL; hdlr->isStandalone = NULL; hdlr->hasInternalSubset = NULL; hdlr->hasExternalSubset = NULL; hdlr->resolveEntity = NULL; hdlr->getEntity = xmlSAX2GetEntity; hdlr->getParameterEntity = NULL; hdlr->entityDecl = NULL; hdlr->attributeDecl = NULL; hdlr->elementDecl = NULL; hdlr->notationDecl = NULL; hdlr->unparsedEntityDecl = NULL; hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; hdlr->startDocument = xmlSAX2StartDocument; hdlr->endDocument = xmlSAX2EndDocument; hdlr->startElement = xmlSAX2StartElement; hdlr->endElement = xmlSAX2EndElement; hdlr->reference = NULL; hdlr->characters = xmlSAX2Characters; hdlr->cdataBlock = xmlSAX2CDataBlock; hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; hdlr->processingInstruction = xmlSAX2ProcessingInstruction; hdlr->comment = xmlSAX2Comment; hdlr->warning = xmlParserWarning; hdlr->error = xmlParserError; hdlr->fatalError = xmlParserError; hdlr->initialized = 1; } /** * htmlDefaultSAXHandlerInit: * * DEPRECATED: This function is a no-op. Call xmlInitParser to * initialize the library. */ void htmlDefaultSAXHandlerInit(void) { } #endif /* LIBXML_HTML_ENABLED */
50a471044bb7038decd3f0b175b230a6639763f2
ae31542273a142210a1ff30fb76ed9d45d38eba9
/src/backend/utils/adt/version.c
9360a9371ed21973a1dcd0ab16d59405cc715674
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "OpenSSL", "LicenseRef-scancode-stream-benchmark", "ISC", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-ssleay-windows", "BSD-2-Clause", "Python-2.0" ]
permissive
greenplum-db/gpdb
8334837bceb2d5d51a684500793d11b190117c6a
2c0f8f0fb24a2d7a7da114dc80f5f5a2712fca50
refs/heads/main
2023-08-22T02:03:03.806269
2023-08-21T22:59:53
2023-08-22T01:17:10
44,781,140
6,417
2,082
Apache-2.0
2023-09-14T20:33:42
2015-10-23T00:25:17
C
UTF-8
C
false
false
717
c
version.c
/*------------------------------------------------------------------------- * * version.c * Returns the PostgreSQL version string * * Copyright (c) 1998-2019, PostgreSQL Global Development Group * * IDENTIFICATION * * src/backend/utils/adt/version.c * *------------------------------------------------------------------------- */ #include "postgres.h" #include "utils/builtins.h" Datum pgsql_version(PG_FUNCTION_ARGS pg_attribute_unused() ) { char version[512]; strcpy(version, PG_VERSION_STR " compiled on " __DATE__ " " __TIME__); #ifdef USE_ASSERT_CHECKING strcat(version, " (with assert checking)"); #endif strcat(version, " Bhuvnesh C."); PG_RETURN_TEXT_P(cstring_to_text(version)); }
ea4ac2a2fc01b0dc3ae105a4c1fc274f8a8c89c1
f367e4b66a1ee42e85830b31df88f63723c36a47
/lib/librdkafka-2.1.0/src/rdkafka_cgrp.h
4fa51e548970ff628c6305755563e0d8b2b4aa63
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause", "Zlib", "LicenseRef-scancode-public-domain", "ISC", "LicenseRef-scancode-public-domain-disclaimer" ]
permissive
fluent/fluent-bit
06873e441162b92941024e9a7e9e8fc934150bf7
1a41f49dc2f3ae31a780caa9ffd6137b1d703065
refs/heads/master
2023-09-05T13:44:55.347372
2023-09-05T10:14:33
2023-09-05T10:14:33
29,933,948
4,907
1,565
Apache-2.0
2023-09-14T10:17:02
2015-01-27T20:41:52
C
UTF-8
C
false
false
17,584
h
rdkafka_cgrp.h
/* * librdkafka - Apache Kafka C library * * Copyright (c) 2012-2015, Magnus Edenhill * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _RDKAFKA_CGRP_H_ #define _RDKAFKA_CGRP_H_ #include "rdinterval.h" #include "rdkafka_assignor.h" /** * Client groups implementation * * Client groups handling for a single cgrp is assigned to a single * rd_kafka_broker_t object at any given time. * The main thread will call cgrp_serve() to serve its cgrps. * * This means that the cgrp itself does not need to be locked since it * is only ever used from the main thread. * */ extern const char *rd_kafka_cgrp_join_state_names[]; /** * Client group */ typedef struct rd_kafka_cgrp_s { const rd_kafkap_str_t *rkcg_group_id; rd_kafkap_str_t *rkcg_member_id; /* Last assigned MemberId */ rd_kafkap_str_t *rkcg_group_instance_id; const rd_kafkap_str_t *rkcg_client_id; enum { /* Init state */ RD_KAFKA_CGRP_STATE_INIT, /* Cgrp has been stopped. This is a final state */ RD_KAFKA_CGRP_STATE_TERM, /* Query for group coordinator */ RD_KAFKA_CGRP_STATE_QUERY_COORD, /* Outstanding query, awaiting response */ RD_KAFKA_CGRP_STATE_WAIT_COORD, /* Wait ack from assigned cgrp manager broker thread */ RD_KAFKA_CGRP_STATE_WAIT_BROKER, /* Wait for manager broker thread to connect to broker */ RD_KAFKA_CGRP_STATE_WAIT_BROKER_TRANSPORT, /* Coordinator is up and manager is assigned. */ RD_KAFKA_CGRP_STATE_UP, } rkcg_state; rd_ts_t rkcg_ts_statechange; /* Timestamp of last * state change. */ enum { /* all: join or rejoin, possibly with an existing assignment. */ RD_KAFKA_CGRP_JOIN_STATE_INIT, /* all: JoinGroupRequest sent, awaiting response. */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_JOIN, /* all: MetadataRequest sent, awaiting response. * While metadata requests may be issued at any time, * this state is only set upon a proper (re)join. */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_METADATA, /* Follower: SyncGroupRequest sent, awaiting response. */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_SYNC, /* all: waiting for application to call *_assign() */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_ASSIGN_CALL, /* all: waiting for application to call *_unassign() */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_UNASSIGN_CALL, /* all: waiting for full assignment to decommission */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_UNASSIGN_TO_COMPLETE, /* all: waiting for partial assignment to decommission */ RD_KAFKA_CGRP_JOIN_STATE_WAIT_INCR_UNASSIGN_TO_COMPLETE, /* all: synchronized and assigned * may be an empty assignment. */ RD_KAFKA_CGRP_JOIN_STATE_STEADY, } rkcg_join_state; /* State when group leader */ struct { rd_kafka_group_member_t *members; int member_cnt; } rkcg_group_leader; rd_kafka_q_t *rkcg_q; /* Application poll queue */ rd_kafka_q_t *rkcg_ops; /* Manager ops queue */ rd_kafka_q_t *rkcg_wait_coord_q; /* Ops awaiting coord */ int rkcg_flags; #define RD_KAFKA_CGRP_F_TERMINATE 0x1 /* Terminate cgrp (async) */ #define RD_KAFKA_CGRP_F_LEAVE_ON_UNASSIGN_DONE \ 0x8 /* Send LeaveGroup when \ * unassign is done */ #define RD_KAFKA_CGRP_F_SUBSCRIPTION \ 0x10 /* If set: \ * subscription \ * else: \ * static assignment */ #define RD_KAFKA_CGRP_F_HEARTBEAT_IN_TRANSIT \ 0x20 /* A Heartbeat request \ * is in transit, dont \ * send a new one. */ #define RD_KAFKA_CGRP_F_WILDCARD_SUBSCRIPTION \ 0x40 /* Subscription contains \ * wildcards. */ #define RD_KAFKA_CGRP_F_WAIT_LEAVE \ 0x80 /* Wait for LeaveGroup \ * to be sent. \ * This is used to stall \ * termination until \ * the LeaveGroupRequest \ * is responded to, \ * otherwise it risks \ * being dropped in the \ * output queue when \ * the broker is destroyed. \ */ #define RD_KAFKA_CGRP_F_MAX_POLL_EXCEEDED \ 0x100 /**< max.poll.interval.ms \ * was exceeded and we \ * left the group. \ * Do not rejoin until \ * the application has \ * polled again. */ rd_interval_t rkcg_coord_query_intvl; /* Coordinator query intvl*/ rd_interval_t rkcg_heartbeat_intvl; /* Heartbeat intvl */ rd_interval_t rkcg_join_intvl; /* JoinGroup interval */ rd_interval_t rkcg_timeout_scan_intvl; /* Timeout scanner */ rd_ts_t rkcg_ts_session_timeout; /**< Absolute session * timeout enforced by * the consumer, this * value is updated on * Heartbeat success, * etc. */ rd_kafka_resp_err_t rkcg_last_heartbeat_err; /**< Last Heartbeat error, * used for logging. */ TAILQ_HEAD(, rd_kafka_topic_s) rkcg_topics; /* Topics subscribed to */ rd_list_t rkcg_toppars; /* Toppars subscribed to*/ int32_t rkcg_generation_id; /* Current generation id */ rd_kafka_assignor_t *rkcg_assignor; /**< The current partition * assignor. used by both * leader and members. */ void *rkcg_assignor_state; /**< current partition * assignor state */ int32_t rkcg_coord_id; /**< Current coordinator id, * or -1 if not known. */ rd_kafka_broker_t *rkcg_curr_coord; /**< Current coordinator * broker handle, or NULL. * rkcg_coord's nodename is * updated to this broker's * nodename when there is a * coordinator change. */ rd_kafka_broker_t *rkcg_coord; /**< The dedicated coordinator * broker handle. * Will be updated when the * coordinator changes. */ int16_t rkcg_wait_resp; /**< Awaiting response for this * ApiKey. * Makes sure only one * JoinGroup or SyncGroup * request is outstanding. * Unset value is -1. */ /** Current subscription */ rd_kafka_topic_partition_list_t *rkcg_subscription; /** The actual topics subscribed (after metadata+wildcard matching). * Sorted. */ rd_list_t *rkcg_subscribed_topics; /**< (rd_kafka_topic_info_t *) */ /** Subscribed topics that are errored/not available. */ rd_kafka_topic_partition_list_t *rkcg_errored_topics; /** If a SUBSCRIBE op is received during a COOPERATIVE rebalance, * actioning this will be postponed until after the rebalance * completes. The waiting subscription is stored here. * Mutually exclusive with rkcg_next_subscription. */ rd_kafka_topic_partition_list_t *rkcg_next_subscription; /** If a (un)SUBSCRIBE op is received during a COOPERATIVE rebalance, * actioning this will be posponed until after the rebalance * completes. This flag is used to signal a waiting unsubscribe * operation. Mutually exclusive with rkcg_next_subscription. */ rd_bool_t rkcg_next_unsubscribe; /** Assignment considered lost */ rd_atomic32_t rkcg_assignment_lost; /** Current assignment of partitions from last SyncGroup response. * NULL means no assignment, else empty or non-empty assignment. * * This group assignment is the actual set of partitions that were * assigned to our consumer by the consumer group leader and should * not be confused with the rk_consumer.assignment which is the * partitions assigned by the application using assign(), et.al. * * The group assignment and the consumer assignment are typically * identical, but not necessarily since an application is free to * assign() any partition, not just the partitions it is handed * through the rebalance callback. * * Yes, this nomenclature is ambigious but has historical reasons, * so for now just try to remember that: * - group assignment == consumer group assignment. * - assignment == actual used assignment, i.e., fetched partitions. * * @remark This list is always sorted. */ rd_kafka_topic_partition_list_t *rkcg_group_assignment; /** The partitions to incrementally assign following a * currently in-progress incremental unassign. */ rd_kafka_topic_partition_list_t *rkcg_rebalance_incr_assignment; /** Rejoin the group following a currently in-progress * incremental unassign. */ rd_bool_t rkcg_rebalance_rejoin; rd_kafka_resp_err_t rkcg_last_err; /* Last error propagated to * application. * This is for silencing * same errors. */ rd_kafka_timer_t rkcg_offset_commit_tmr; /* Offset commit timer */ rd_kafka_timer_t rkcg_max_poll_interval_tmr; /**< Enforce the max * poll interval. */ rd_kafka_t *rkcg_rk; rd_kafka_op_t *rkcg_reply_rko; /* Send reply for op * (OP_TERMINATE) * to this rko's queue. */ rd_ts_t rkcg_ts_terminate; /* Timestamp of when * cgrp termination was * initiated. */ rd_atomic32_t rkcg_terminated; /**< Consumer has been closed */ /* Protected by rd_kafka_*lock() */ struct { rd_ts_t ts_rebalance; /* Timestamp of * last rebalance */ int rebalance_cnt; /* Number of rebalances */ char rebalance_reason[256]; /**< Last rebalance * reason */ int assignment_size; /* Partition count * of last rebalance * assignment */ } rkcg_c; } rd_kafka_cgrp_t; /* Check if broker is the coordinator */ #define RD_KAFKA_CGRP_BROKER_IS_COORD(rkcg, rkb) \ ((rkcg)->rkcg_coord_id != -1 && \ (rkcg)->rkcg_coord_id == (rkb)->rkb_nodeid) /** * @returns true if cgrp is using static group membership */ #define RD_KAFKA_CGRP_IS_STATIC_MEMBER(rkcg) \ !RD_KAFKAP_STR_IS_NULL((rkcg)->rkcg_group_instance_id) extern const char *rd_kafka_cgrp_state_names[]; extern const char *rd_kafka_cgrp_join_state_names[]; void rd_kafka_cgrp_destroy_final(rd_kafka_cgrp_t *rkcg); rd_kafka_cgrp_t *rd_kafka_cgrp_new(rd_kafka_t *rk, const rd_kafkap_str_t *group_id, const rd_kafkap_str_t *client_id); void rd_kafka_cgrp_serve(rd_kafka_cgrp_t *rkcg); void rd_kafka_cgrp_op(rd_kafka_cgrp_t *rkcg, rd_kafka_toppar_t *rktp, rd_kafka_replyq_t replyq, rd_kafka_op_type_t type, rd_kafka_resp_err_t err); void rd_kafka_cgrp_terminate0(rd_kafka_cgrp_t *rkcg, rd_kafka_op_t *rko); void rd_kafka_cgrp_terminate(rd_kafka_cgrp_t *rkcg, rd_kafka_replyq_t replyq); rd_kafka_resp_err_t rd_kafka_cgrp_topic_pattern_del(rd_kafka_cgrp_t *rkcg, const char *pattern); rd_kafka_resp_err_t rd_kafka_cgrp_topic_pattern_add(rd_kafka_cgrp_t *rkcg, const char *pattern); int rd_kafka_cgrp_topic_check(rd_kafka_cgrp_t *rkcg, const char *topic); void rd_kafka_cgrp_set_member_id(rd_kafka_cgrp_t *rkcg, const char *member_id); void rd_kafka_cgrp_set_join_state(rd_kafka_cgrp_t *rkcg, int join_state); rd_kafka_broker_t *rd_kafka_cgrp_get_coord(rd_kafka_cgrp_t *rkcg); void rd_kafka_cgrp_coord_query(rd_kafka_cgrp_t *rkcg, const char *reason); void rd_kafka_cgrp_coord_dead(rd_kafka_cgrp_t *rkcg, rd_kafka_resp_err_t err, const char *reason); void rd_kafka_cgrp_metadata_update_check(rd_kafka_cgrp_t *rkcg, rd_bool_t do_join); #define rd_kafka_cgrp_get(rk) ((rk)->rk_cgrp) void rd_kafka_cgrp_assigned_offsets_commit( rd_kafka_cgrp_t *rkcg, const rd_kafka_topic_partition_list_t *offsets, rd_bool_t set_offsets, const char *reason); void rd_kafka_cgrp_assignment_done(rd_kafka_cgrp_t *rkcg); rd_bool_t rd_kafka_cgrp_assignment_is_lost(rd_kafka_cgrp_t *rkcg); struct rd_kafka_consumer_group_metadata_s { char *group_id; int32_t generation_id; char *member_id; char *group_instance_id; /**< Optional (NULL) */ }; rd_kafka_consumer_group_metadata_t *rd_kafka_consumer_group_metadata_dup( const rd_kafka_consumer_group_metadata_t *cgmetadata); static RD_UNUSED const char * rd_kafka_rebalance_protocol2str(rd_kafka_rebalance_protocol_t protocol) { switch (protocol) { case RD_KAFKA_REBALANCE_PROTOCOL_EAGER: return "EAGER"; case RD_KAFKA_REBALANCE_PROTOCOL_COOPERATIVE: return "COOPERATIVE"; default: return "NONE"; } } #endif /* _RDKAFKA_CGRP_H_ */
12d1f106667a37c040ed0b68cc688c4d084a4b76
2587f9d1652102e2e1e679659c70fb160f5d9e0c
/content/strings/SuffixArray.h
ed2a4c7dce9c638cf1a1cb1141827deeb791dfbc
[]
no_license
kth-competitive-programming/kactl
47bdff5a76ebcb410f5f57fd61d640aef25857f6
49172d14a4d3e439b7f7e323d8c5e217846bc122
refs/heads/main
2023-08-29T15:00:33.382947
2023-06-11T17:13:42
2023-06-11T17:13:42
92,687,870
2,422
720
null
2023-08-29T20:32:18
2017-05-28T21:22:20
C++
UTF-8
C
false
false
1,493
h
SuffixArray.h
/** * Author: 罗穗骞, chilli * Date: 2019-04-11 * License: Unknown * Source: Suffix array - a powerful tool for dealing with strings * (Chinese IOI National team training paper, 2009) * Description: Builds suffix array for a string. * \texttt{sa[i]} is the starting index of the suffix which * is $i$'th in the sorted suffix array. * The returned vector is of size $n+1$, and \texttt{sa[0] = n}. * The \texttt{lcp} array contains longest common prefixes for * neighbouring strings in the suffix array: * \texttt{lcp[i] = lcp(sa[i], sa[i-1])}, \texttt{lcp[0] = 0}. * The input string must not contain any zero bytes. * Time: O(n \log n) * Status: stress-tested */ #pragma once struct SuffixArray { vi sa, lcp; SuffixArray(string& s, int lim=256) { // or basic_string<int> int n = sz(s) + 1, k = 0, a, b; vi x(all(s)+1), y(n), ws(max(n, lim)), rank(n); sa = lcp = y, iota(all(sa), 0); for (int j = 0, p = 0; p < n; j = max(1, j * 2), lim = p) { p = j, iota(all(y), n - j); rep(i,0,n) if (sa[i] >= j) y[p++] = sa[i] - j; fill(all(ws), 0); rep(i,0,n) ws[x[i]]++; rep(i,1,lim) ws[i] += ws[i - 1]; for (int i = n; i--;) sa[--ws[x[y[i]]]] = y[i]; swap(x, y), p = 1, x[sa[0]] = 0; rep(i,1,n) a = sa[i - 1], b = sa[i], x[b] = (y[a] == y[b] && y[a + j] == y[b + j]) ? p - 1 : p++; } rep(i,1,n) rank[sa[i]] = i; for (int i = 0, j; i < n - 1; lcp[rank[i++]] = k) for (k && k--, j = sa[rank[i] - 1]; s[i + k] == s[j + k]; k++); } };
e486748054dfa8339286023bdc527e3be532c30d
1005f450818900b923e345b73d77628f20d1875e
/thirdparty/msgpack-c/include/msgpack/predef/compiler/palm.h
0134cd29399c196a22ac9f338b2b82b02c87d449
[ "MIT" ]
permissive
qicosmos/rest_rpc
c7ad37547a9dcb616832b32bc110a237977b8c74
93088a7e0f0ddb3786de40ed7b6311852644edbf
refs/heads/master
2023-08-23T06:56:42.464323
2023-07-04T02:57:13
2023-07-04T02:57:13
162,215,656
1,504
354
MIT
2023-07-05T03:37:24
2018-12-18T02:01:52
C++
UTF-8
C
false
false
1,459
h
palm.h
/* Copyright Rene Rivera 2008-2015 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef MSGPACK_PREDEF_COMPILER_PALM_H #define MSGPACK_PREDEF_COMPILER_PALM_H #include <msgpack/predef/version_number.h> #include <msgpack/predef/make.h> /*` [heading `MSGPACK_COMP_PALM`] Palm C/C++ compiler. Version number available as major, minor, and patch. [table [[__predef_symbol__] [__predef_version__]] [[`_PACC_VER`] [__predef_detection__]] [[`_PACC_VER`] [V.R.P]] ] */ #define MSGPACK_COMP_PALM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE #if defined(_PACC_VER) # define MSGPACK_COMP_PALM_DETECTION MSGPACK_PREDEF_MAKE_0X_VRRPP000(_PACC_VER) #endif #ifdef MSGPACK_COMP_PALM_DETECTION # if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED) # define MSGPACK_COMP_PALM_EMULATED MSGPACK_COMP_PALM_DETECTION # else # undef MSGPACK_COMP_PALM # define MSGPACK_COMP_PALM MSGPACK_COMP_PALM_DETECTION # endif # define MSGPACK_COMP_PALM_AVAILABLE # include <msgpack/predef/detail/comp_detected.h> #endif #define MSGPACK_COMP_PALM_NAME "Palm C/C++" #endif #include <msgpack/predef/detail/test.h> MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PALM,MSGPACK_COMP_PALM_NAME) #ifdef MSGPACK_COMP_PALM_EMULATED #include <msgpack/predef/detail/test.h> MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PALM_EMULATED,MSGPACK_COMP_PALM_NAME) #endif
2e558aa63dbc198e5263621e75b942d27ac37160
e73547787354afd9b717ea57fe8dd0695d161821
/src/world/area_pra/pra_16/pra_16.h
30d0ff593ee69d8ddceec87417b99d0e3b1de108
[]
no_license
pmret/papermario
8b514b19653cef8d6145e47499b3636b8c474a37
9774b26d93f1045dd2a67e502b6efc9599fb6c31
refs/heads/main
2023-08-31T07:09:48.951514
2023-08-21T18:07:08
2023-08-21T18:07:08
287,151,133
904
139
null
2023-09-14T02:44:23
2020-08-13T01:22:57
C
UTF-8
C
false
false
302
h
pra_16.h
/// @file pra_16.h /// @brief Crystal Palace - Red Mirror Hall #include "common.h" #include "message_ids.h" #include "map.h" #include "../pra.h" #include "mapfs/pra_16_shape.h" #include "mapfs/pra_16_hit.h" #define NAMESPACE pra_16 extern EvtScript N(EVS_Main); extern EvtScript N(EVS_SetupMusic);
3dfc310fa21d62bea3bf3db111d31214c9b24b98
1cfc3b598004cef0ce33c46df69583a5985e0f22
/source/misc/servant/servant.c
85364016afba03f90a3e1e696bb37aed4cee9d52
[ "MIT" ]
permissive
Cycling74/max-sdk
0ba736b9c5a97490f46d1580ab794ab7fa1067d6
d6d5e5fafe6f1cd74c5b79e88c0c45a9ed953d0e
refs/heads/main
2023-05-14T07:04:39.215102
2022-09-14T14:08:50
2022-09-14T14:08:50
34,391,228
233
64
NOASSERTION
2023-05-07T06:53:13
2015-04-22T13:15:25
HTML
UTF-8
C
false
false
3,098
c
servant.c
/** @file servant - demonstrates object subscription, registration and notification, use with 'master' jeremy bernstein - jeremy@cycling74.com @ingroup examples */ #include "ext.h" #include "ext_obex.h" #include "jpatcher_api.h" ////////////////////////// object struct typedef struct _servant { t_object ob; // the object itself (must be first) t_symbol *name; void *out; } t_servant; ///////////////////////// function prototypes void *servant_new(t_symbol *s); void servant_free(t_servant *x); void servant_assist(t_servant *x, void *b, long m, long a, char *s); void servant_notify(t_servant *x, t_symbol *s, t_symbol *msg, void *sender, void *data); //////////////////////// global class pointer variable t_class *servant_class; static t_symbol *ps_nothing; static t_symbol *ps_conduit; void ext_main(void *r) { t_class *c; c = class_new("servant", (method)servant_new, (method)servant_free, sizeof(t_servant), 0L, A_DEFSYM, 0); class_addmethod(c, (method)servant_notify, "notify", A_CANT, 0); class_addmethod(c, (method)servant_assist, "assist", A_CANT, 0); // the servant has no inlet // adding a 'set' message is left as an exercise for the reader c->c_noinlet = true; class_register(CLASS_BOX, c); servant_class = c; ps_nothing = gensym(""); ps_conduit = gensym("conduit"); } void servant_notify(t_servant *x, t_symbol *s, t_symbol *msg, void *sender, void *data) { object_post((t_object *)x, "servant_notify: %s", msg->s_name); if (msg == gensym("free")) { // the conduit is disappearing, no more servers // but we remain subscribed, so there's nothing to do here // if a new master appears, we will be called with 'subscribe_attach' // and automatically be attached. } else if (msg == gensym("sendmessage")) { // the conduit is calling with a message from 'master' t_atomarray *aa = (t_atomarray *)data; outlet_anything(x->out, atom_getsym(aa->av), aa->ac - 1, aa->av + 1); } } void servant_assist(t_servant *x, void *b, long m, long a, char *s) { if (m == ASSIST_INLET) { // inlets, of which we have none... sprintf(s, "I am inlet %ld", a); } else { // outlet sprintf(s, "Messages received from my dark master %s", x->name->s_name); } } void servant_free(t_servant *x) { // be neat and unsubscribe object_unsubscribe(ps_conduit, x->name, ps_conduit, x); } void *servant_new(t_symbol *s) { t_servant *x = NULL; if (s && s != ps_nothing) { x = (t_servant *)object_alloc(servant_class); if (x) { // subscribe to this name in the conduit namespace // we will be automatically notified and attached when the server appears // (or simply attached if it's already there) // the third arg to object_subscribe limits the classes I want to hear from // in this example, it's not really necessary, because we're using a custom // namespace ("conduit"), but if you're listening for things like buffers in // Max's box namespace, you'd want to create such a filter. object_subscribe(ps_conduit, s, ps_conduit, x); x->name = s; x->out = outlet_new(x, NULL); } } return (x); }
cac03dd30891f70bb1f0dddac979e808df8a4418
25e99a0af5751865bce1702ee85cc5c080b0715c
/ds_algo/src/零基礎學數據結構/例题代码/02/例2_8/例2_8.c
a7df853300572352ae87999f2400eb28a9a6a7a1
[]
no_license
jasonblog/note
215837f6a08d07abe3e3d2be2e1f183e14aa4a30
4471f95736c60969a718d854cab929f06726280a
refs/heads/master
2023-05-31T13:02:27.451743
2022-04-04T11:28:06
2022-04-04T11:28:06
35,311,001
130
67
null
2023-02-10T21:26:36
2015-05-09T02:04:40
C
UTF-8
C
false
false
2,451
c
例2_8.c
#include<stdio.h> /*包含输入输出函数*/ #define N 10 /*数组元素个数*/ int Ascending(int a, int b); /*是否进行升序排列*/ int Descending(int a, int b); /*是否进行降序排列*/ void swap(int*, int*); /*交换数据*/ void BubbleSort(int a[], int n, int (*compare)(int, int)); /*排序,通过函数指针作为参数调用*/ void Display(int a[], int n); /*输出数组元素*/ void main() { int a[N] = {12, 34, 21, 46, 89, 54, 26, 8, 6, 17}; int flag; while (1) { printf("输入1:从小到大排序.\n请输入2:从大到小排列.\n输入3:退出!\n"); scanf("%d", &flag); switch (flag) { case 1: printf("排序前的数据为:"); Display(a, N); BubbleSort(a, N, Ascending); /*从小到大排序,将函数作为参数传递*/ printf("从小到大排列后的数据为:"); Display(a, N); break; case 2: printf("排序前的数据为:"); Display(a, N); BubbleSort(a, N, Descending); /*从大到小排序,将函数作为参数传递*/ printf("从大到小排列后的数据为:"); Display(a, N); break; case 3: return; break; default: printf("输入数据不合法,请重新输入.\n"); break; } } } /*冒泡排序,将函数作为参数传递,判断是从小到大还是从大到小排序*/ void BubbleSort(int a[], int n, int(*compare)(int, int)) { int i, j; for (i = 0; i < n; i++) for (j = 0; j < n - 1; j++) if ((*compare)(a[j], a[j + 1])) { swap(&a[j], &a[j + 1]); } } /*交换数组的元素*/ void swap(int* a, int* b) { int t; t = *a; *a = *b; *b = t; } /*判断相邻数据大小,如果前者大,升序排列需要交换*/ int Ascending(int a, int b) { if (a > b) { return 1; } else { return 0; } } /*判断相邻数据大小,如果前者大,降序排列需要交换*/ int Descending(int a, int b) { if (a < b) { return 1; } else { return 0; } } /*输出数组元素*/ void Display(int a[], int n) { int i; for (i = 0; i < n; i++) { printf("%4d", a[i]); } printf("\n"); }
815450bafc148e209f9fff3dc69ce0497a5e8af8
1231e1bf4117cfaaa54bd4752cca1bdb71290cec
/ext/stub/internalinterfaces.zep.h
3084946afb3e1b91302a6df710a59153167cb005
[ "MIT" ]
permissive
zephir-lang/zephir
ac53ec68e35d19860a4d80224d94f38a6a5e04b5
6773f19d9b272cafee96b9a30f9b152c28e982ea
refs/heads/development
2023-08-31T10:33:38.621586
2023-02-28T10:27:43
2023-02-28T10:27:43
11,478,636
291
47
MIT
2023-08-28T22:07:11
2013-07-17T14:49:27
PHP
UTF-8
C
false
true
432
h
internalinterfaces.zep.h
extern zend_class_entry *stub_internalinterfaces_ce; ZEPHIR_INIT_CLASS(Stub_InternalInterfaces); PHP_METHOD(Stub_InternalInterfaces, count); ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_internalinterfaces_count, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(stub_internalinterfaces_method_entry) { PHP_ME(Stub_InternalInterfaces, count, arginfo_stub_internalinterfaces_count, ZEND_ACC_PUBLIC) PHP_FE_END };
fcbc77b3550ac67971cea55af53f060e3c5ccaa0
d38ed5f31d74a79a054ed55dd9123a8d615283b9
/third_party/libgit2/src/hash/hash_mbedtls.h
7f3decd7d2efa8f2a9bbcb77c4276d077479e89d
[ "GPL-2.0-only", "LicenseRef-scancode-public-domain", "GCC-exception-2.0", "LGPL-2.0-or-later", "Zlib", "LGPL-2.1-or-later", "LGPL-2.1-only", "ISC", "MIT", "Apache-2.0" ]
permissive
chigraph/chigraph
8ff76a14337da29fa2b2a84d5c35f2eac4156c6e
6981bdd6763db54edfe284c1f7d223193584c69a
refs/heads/master
2022-12-21T13:46:57.273039
2022-12-17T18:41:19
2022-12-17T18:41:19
60,776,831
364
65
Apache-2.0
2019-12-13T14:46:43
2016-06-09T13:27:37
C++
UTF-8
C
false
false
512
h
hash_mbedtls.h
/* * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ #ifndef INCLUDE_hash_mbedtld_h__ #define INCLUDE_hash_mbedtld_h__ #include <mbedtls/sha1.h> struct git_hash_ctx { mbedtls_sha1_context c; }; #define git_hash_ctx_init(ctx) git_hash_init(ctx) GIT_INLINE(int) git_hash_global_init(void) { return 0; } #endif /* INCLUDE_hash_mbedtld_h__ */
75c697dfb985e567e31efd8207b729cd773ee713
c96d977f04aea598150170ea3e8c0d5caed626ca
/testfixture-f280049c/device_support_f28004x/headers/include/f28004x_ecap.h
a6e3605dcc61ef74db887c5b8d646098626e5c01
[ "MIT" ]
permissive
clough42/electronic-leadscrew
1c1a698ee5988b39917b5d783dcfd48316c1173f
509486bbb70cb2e231f60167699536f8d9833824
refs/heads/master
2023-09-01T03:42:32.597667
2022-11-29T17:36:07
2022-11-29T17:36:07
177,055,809
302
114
MIT
2023-08-27T21:59:08
2019-03-22T02:11:06
C
UTF-8
C
false
false
14,727
h
f28004x_ecap.h
//########################################################################### // // FILE: f28004x_ecap.h // // TITLE: ECAP Register Definitions. // //########################################################################### // $TI Release: F28004x Support Library v1.05.00.00 $ // $Release Date: Thu Oct 18 15:43:57 CDT 2018 $ // $Copyright: // Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the // distribution. // // Neither the name of Texas Instruments Incorporated nor the names of // its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // $ //########################################################################### #ifndef __F28004X_ECAP_H__ #define __F28004X_ECAP_H__ #ifdef __cplusplus extern "C" { #endif //--------------------------------------------------------------------------- // ECAP Individual Register Bit Definitions: struct ECCTL0_BITS { // bits description Uint16 INPUTSEL:7; // 6:0 INPUT source select Uint16 rsvd1:9; // 15:7 Reserved Uint16 rsvd2:16; // 31:16 Reserved }; union ECCTL0_REG { Uint32 all; struct ECCTL0_BITS bit; }; struct ECCTL1_BITS { // bits description Uint16 CAP1POL:1; // 0 Capture Event 1 Polarity select Uint16 CTRRST1:1; // 1 Counter Reset on Capture Event 1 Uint16 CAP2POL:1; // 2 Capture Event 2 Polarity select Uint16 CTRRST2:1; // 3 Counter Reset on Capture Event 2 Uint16 CAP3POL:1; // 4 Capture Event 3 Polarity select Uint16 CTRRST3:1; // 5 Counter Reset on Capture Event 3 Uint16 CAP4POL:1; // 6 Capture Event 4 Polarity select Uint16 CTRRST4:1; // 7 Counter Reset on Capture Event 4 Uint16 CAPLDEN:1; // 8 Enable Loading CAP1-4 regs on a Cap Event Uint16 PRESCALE:5; // 13:9 Event Filter prescale select Uint16 FREE_SOFT:2; // 15:14 Emulation mode }; union ECCTL1_REG { Uint16 all; struct ECCTL1_BITS bit; }; struct ECCTL2_BITS { // bits description Uint16 CONT_ONESHT:1; // 0 Continuous or one-shot Uint16 STOP_WRAP:2; // 2:1 Stop value for one-shot, Wrap for continuous Uint16 REARM:1; // 3 One-shot re-arm Uint16 TSCTRSTOP:1; // 4 TSCNT counter stop Uint16 SYNCI_EN:1; // 5 Counter sync-in select Uint16 SYNCO_SEL:2; // 7:6 Sync-out mode Uint16 SWSYNC:1; // 8 SW forced counter sync Uint16 CAP_APWM:1; // 9 CAP/APWM operating mode select Uint16 APWMPOL:1; // 10 APWM output polarity select Uint16 CTRFILTRESET:1; // 11 Reset event filter, modulus counter, and interrupt flags. Uint16 DMAEVTSEL:2; // 13:12 DMA event select Uint16 MODCNTRSTS:2; // 15:14 modulo counter status }; union ECCTL2_REG { Uint16 all; struct ECCTL2_BITS bit; }; struct ECEINT_BITS { // bits description Uint16 rsvd1:1; // 0 Reserved Uint16 CEVT1:1; // 1 Capture Event 1 Interrupt Enable Uint16 CEVT2:1; // 2 Capture Event 2 Interrupt Enable Uint16 CEVT3:1; // 3 Capture Event 3 Interrupt Enable Uint16 CEVT4:1; // 4 Capture Event 4 Interrupt Enable Uint16 CTROVF:1; // 5 Counter Overflow Interrupt Enable Uint16 CTR_EQ_PRD:1; // 6 Period Equal Interrupt Enable Uint16 CTR_EQ_CMP:1; // 7 Compare Equal Interrupt Enable Uint16 rsvd2:1; // 8 Reserved Uint16 rsvd3:7; // 15:9 Reserved }; union ECEINT_REG { Uint16 all; struct ECEINT_BITS bit; }; struct ECFLG_BITS { // bits description Uint16 INT:1; // 0 Global Flag Uint16 CEVT1:1; // 1 Capture Event 1 Interrupt Flag Uint16 CEVT2:1; // 2 Capture Event 2 Interrupt Flag Uint16 CEVT3:1; // 3 Capture Event 3 Interrupt Flag Uint16 CEVT4:1; // 4 Capture Event 4 Interrupt Flag Uint16 CTROVF:1; // 5 Counter Overflow Interrupt Flag Uint16 CTR_PRD:1; // 6 Period Equal Interrupt Flag Uint16 CTR_CMP:1; // 7 Compare Equal Interrupt Flag Uint16 rsvd1:1; // 8 Reserved Uint16 rsvd2:7; // 15:9 Reserved }; union ECFLG_REG { Uint16 all; struct ECFLG_BITS bit; }; struct ECCLR_BITS { // bits description Uint16 INT:1; // 0 ECAP Global Interrupt Status Clear Uint16 CEVT1:1; // 1 Capture Event 1 Status Clear Uint16 CEVT2:1; // 2 Capture Event 2 Status Clear Uint16 CEVT3:1; // 3 Capture Event 3 Status Clear Uint16 CEVT4:1; // 4 Capture Event 4 Status Clear Uint16 CTROVF:1; // 5 Counter Overflow Status Clear Uint16 CTR_PRD:1; // 6 Period Equal Status Clear Uint16 CTR_CMP:1; // 7 Compare Equal Status Clear Uint16 rsvd1:1; // 8 Reserved Uint16 rsvd2:7; // 15:9 Reserved }; union ECCLR_REG { Uint16 all; struct ECCLR_BITS bit; }; struct ECFRC_BITS { // bits description Uint16 rsvd1:1; // 0 Reserved Uint16 CEVT1:1; // 1 Capture Event 1 Force Interrupt Uint16 CEVT2:1; // 2 Capture Event 2 Force Interrupt Uint16 CEVT3:1; // 3 Capture Event 3 Force Interrupt Uint16 CEVT4:1; // 4 Capture Event 4 Force Interrupt Uint16 CTROVF:1; // 5 Counter Overflow Force Interrupt Uint16 CTR_PRD:1; // 6 Period Equal Force Interrupt Uint16 CTR_CMP:1; // 7 Compare Equal Force Interrupt Uint16 rsvd2:1; // 8 Reserved Uint16 rsvd3:7; // 15:9 Reserved }; union ECFRC_REG { Uint16 all; struct ECFRC_BITS bit; }; struct ECAPSYNCINSEL_BITS { // bits description Uint16 SEL:5; // 4:0 SYNCIN source select Uint16 rsvd1:11; // 15:5 Reserved Uint16 rsvd2:16; // 31:16 Reserved }; union ECAPSYNCINSEL_REG { Uint32 all; struct ECAPSYNCINSEL_BITS bit; }; struct ECAP_REGS { Uint32 TSCTR; // Time-Stamp Counter Uint32 CTRPHS; // Counter Phase Offset Value Register Uint32 CAP1; // Capture 1 Register Uint32 CAP2; // Capture 2 Register Uint32 CAP3; // Capture 3 Register Uint32 CAP4; // Capture 4 Register Uint16 rsvd1[6]; // Reserved union ECCTL0_REG ECCTL0; // Capture Control Register 0 union ECCTL1_REG ECCTL1; // Capture Control Register 1 union ECCTL2_REG ECCTL2; // Capture Control Register 2 union ECEINT_REG ECEINT; // Capture Interrupt Enable Register union ECFLG_REG ECFLG; // Capture Interrupt Flag Register union ECCLR_REG ECCLR; // Capture Interrupt Clear Register union ECFRC_REG ECFRC; // Capture Interrupt Force Register Uint16 rsvd2[4]; // Reserved union ECAPSYNCINSEL_REG ECAPSYNCINSEL; // SYNC source select register }; struct HRCTL_BITS { // bits description Uint16 HRE:1; // 0 High Resolution Enable Uint16 HRCLKE:1; // 1 High Resolution Clock Enable Uint16 PRDSEL:1; // 2 Calibration Period Match Uint16 CALIBSTART:1; // 3 Calibration start Uint16 CALIBSTS:1; // 4 Calibration status Uint16 CALIBCONT:1; // 5 Continuous mode Calibration Select Uint16 rsvd1:10; // 15:6 Reserved Uint16 rsvd2:16; // 31:16 Reserved }; union HRCTL_REG { Uint32 all; struct HRCTL_BITS bit; }; struct HRINTEN_BITS { // bits description Uint16 rsvd1:1; // 0 Reserved Uint16 CALIBDONE:1; // 1 Calibration doe interrupt enable Uint16 CALPRDCHKSTS:1; // 2 Calibration period check status enable Uint16 rsvd2:13; // 15:3 Reserved Uint16 rsvd3:16; // 31:16 Reserved }; union HRINTEN_REG { Uint32 all; struct HRINTEN_BITS bit; }; struct HRFLG_BITS { // bits description Uint16 CALIBINT:1; // 0 Global calibration Interrupt Status Flag Uint16 CALIBDONE:1; // 1 Calibration Done Interrupt Flag Bit Uint16 CALPRDCHKSTS:1; // 2 Calibration period check status Flag Bi Uint16 rsvd1:13; // 15:3 Reserved Uint16 rsvd2:16; // 31:16 Reserved }; union HRFLG_REG { Uint32 all; struct HRFLG_BITS bit; }; struct HRCLR_BITS { // bits description Uint16 CALIBINT:1; // 0 Clear Global calibration Interrupt Flag Uint16 CALIBDONE:1; // 1 Clear Calibration Done Interrupt Flag Bit Uint16 CALPRDCHKSTS:1; // 2 Clear Calibration period check status Flag Bit: Uint16 rsvd1:13; // 15:3 Reserved Uint16 rsvd2:16; // 31:16 Reserved }; union HRCLR_REG { Uint32 all; struct HRCLR_BITS bit; }; struct HRFRC_BITS { // bits description Uint16 rsvd1:1; // 0 Reserved Uint16 CALIBDONE:1; // 1 Force Calibration Done Interrupt Flag Bit Uint16 CALPRDCHKSTS:1; // 2 Force Calibration period check status Flag Bit: Uint16 rsvd2:13; // 15:3 Reserved Uint16 rsvd3:16; // 31:16 Reserved }; union HRFRC_REG { Uint32 all; struct HRFRC_BITS bit; }; struct HRCAP_REGS { union HRCTL_REG HRCTL; // High-Res Control Register Uint16 rsvd1[2]; // Reserved union HRINTEN_REG HRINTEN; // High-Res Calibration Interrupt Enable Register union HRFLG_REG HRFLG; // High-Res Calibration Interrupt Flag Register union HRCLR_REG HRCLR; // High-Res Calibration Interrupt Clear Register union HRFRC_REG HRFRC; // High-Res Calibration Interrupt Force Register Uint32 HRCALPRD; // High-Res Calibration Period Register Uint32 HRSYSCLKCTR; // High-Res Calibration SYSCLK Counter Register Uint32 HRSYSCLKCAP; // High-Res Calibration SYSCLK Capture Register Uint32 HRCLKCTR; // High-Res Calibration HRCLK Counter Register Uint32 HRCLKCAP; // High-Res Calibration HRCLK Capture Register Uint16 rsvd2[10]; // Reserved }; //--------------------------------------------------------------------------- // ECAP External References & Function Declarations: // extern volatile struct ECAP_REGS ECap1Regs; extern volatile struct ECAP_REGS ECap2Regs; extern volatile struct ECAP_REGS ECap3Regs; extern volatile struct ECAP_REGS ECap4Regs; extern volatile struct ECAP_REGS ECap5Regs; extern volatile struct ECAP_REGS ECap6Regs; extern volatile struct ECAP_REGS ECap7Regs; extern volatile struct HRCAP_REGS HRCap6Regs; extern volatile struct HRCAP_REGS HRCap7Regs; #ifdef __cplusplus } #endif /* extern "C" */ #endif //=========================================================================== // End of file. //===========================================================================
16f6641d85133badb6307cba9335611315842be1
d986748d2f5fe1fc3d17ac7de7e9de3fd9478c24
/pyedflib/_extensions/c/edflib.h
f45f92e8d2c4e6800c39a9b672d4a1edcdb9510a
[ "BSD-2-Clause", "LicenseRef-scancode-free-unknown", "BSD-3-Clause" ]
permissive
holgern/pyedflib
5465afc70f507d9831e96250e9a52cc62351b269
1af9ced84921b304fecdc994e7e8b9a4c1674245
refs/heads/master
2023-08-16T19:49:26.799665
2023-07-20T12:39:07
2023-07-20T12:39:07
42,585,968
206
136
BSD-3-Clause
2023-09-04T15:17:39
2015-09-16T12:33:42
Python
UTF-8
C
false
false
38,101
h
edflib.h
/* ***************************************************************************** * * Copyright (c) 2009 - 2020 Teunis van Beelen * All rights reserved. * * Email: teuniz@protonmail.com * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ***************************************************************************** */ /* compile with options "-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE" */ #ifndef EDFLIB_INCLUDED #define EDFLIB_INCLUDED #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define EDFLIB_TIME_DIMENSION (10000000LL) #define EDFLIB_MAXSIGNALS (640) #define EDFLIB_MAX_ANNOTATION_LEN (512) #define EDFSEEK_SET (0) #define EDFSEEK_CUR (1) #define EDFSEEK_END (2) /* the following defines are used in the member "filetype" of the edf_hdr_struct */ /* and as return value for the function edfopen_file_readonly() */ #define EDFLIB_FILETYPE_EDF (0) #define EDFLIB_FILETYPE_EDFPLUS (1) #define EDFLIB_FILETYPE_BDF (2) #define EDFLIB_FILETYPE_BDFPLUS (3) #define EDFLIB_MALLOC_ERROR (-1) #define EDFLIB_NO_SUCH_FILE_OR_DIRECTORY (-2) /* when this error occurs, try to open the file with EDFbrowser, it will give you full details about the cause of the error. */ #define EDFLIB_FILE_CONTAINS_FORMAT_ERRORS (-3) #define EDFLIB_MAXFILES_REACHED (-4) #define EDFLIB_FILE_READ_ERROR (-5) #define EDFLIB_FILE_ALREADY_OPENED (-6) #define EDFLIB_FILETYPE_ERROR (-7) #define EDFLIB_FILE_WRITE_ERROR (-8) #define EDFLIB_NUMBER_OF_SIGNALS_INVALID (-9) #define EDFLIB_FILE_IS_DISCONTINUOUS (-10) #define EDFLIB_INVALID_READ_ANNOTS_VALUE (-11) #define EDFLIB_INVALID_CHECK_SIZE_VALUE (-12) /* values for annotations */ #define EDFLIB_DO_NOT_READ_ANNOTATIONS (0) #define EDFLIB_READ_ANNOTATIONS (1) #define EDFLIB_READ_ALL_ANNOTATIONS (2) /* values for size check on edfopen_file_readonly */ #define EDFLIB_CHECK_FILE_SIZE (0) #define EDFLIB_DO_NOT_CHECK_FILE_SIZE (1) #define EDFLIB_REPAIR_FILE_SIZE_IF_WRONG (2) /* the following defines are possible errors returned by the first sample write action */ #define EDFLIB_NO_SIGNALS (-20) #define EDFLIB_TOO_MANY_SIGNALS (-21) #define EDFLIB_NO_SAMPLES_IN_RECORD (-22) #define EDFLIB_DIGMIN_IS_DIGMAX (-23) #define EDFLIB_DIGMAX_LOWER_THAN_DIGMIN (-24) #define EDFLIB_PHYSMIN_IS_PHYSMAX (-25) #define EDFLIB_DATARECORD_SIZE_TOO_BIG (-26) /* added for pyedflib */ #define EDFLIB_FILE_ERRORS_STARTDATE (-30) #define EDFLIB_FILE_ERRORS_STARTTIME (-31) #define EDFLIB_FILE_ERRORS_NUMBER_SIGNALS (-32) #define EDFLIB_FILE_ERRORS_BYTES_HEADER (-33) #define EDFLIB_FILE_ERRORS_RESERVED_FIELD (-34) #define EDFLIB_FILE_ERRORS_NUMBER_DATARECORDS (-35) #define EDFLIB_FILE_ERRORS_DURATION (-36) #define EDFLIB_FILE_ERRORS_LABEL (-37) #define EDFLIB_FILE_ERRORS_TRANSDUCER (-38) #define EDFLIB_FILE_ERRORS_PHYS_DIMENSION (-39) #define EDFLIB_FILE_ERRORS_PHYS_MAX (-40) #define EDFLIB_FILE_ERRORS_PHYS_MIN (-41) #define EDFLIB_FILE_ERRORS_DIG_MAX (-42) #define EDFLIB_FILE_ERRORS_DIG_MIN (-43) #define EDFLIB_FILE_ERRORS_PREFILTER (-44) #define EDFLIB_FILE_ERRORS_SAMPLES_DATARECORD (-45) #define EDFLIB_FILE_ERRORS_FILESIZE (-46) #define EDFLIB_FILE_ERRORS_RECORDINGFIELD (-47) #define EDFLIB_FILE_ERRORS_PATIENTNAME (-48) #ifdef __cplusplus extern "C" { #endif /* For more info about the EDF and EDF+ format, visit: https://edfplus.info/specs/ */ /* For more info about the BDF and BDF+ format, visit: https://www.teuniz.net/edfbrowser/bdfplus%20format%20description.html */ /* * note: In EDF, the sensitivity (e.g. uV/bit) and offset are stored using four parameters: * digital maximum and minimum, and physical maximum and minimum. * Here, digital means the raw data coming from a sensor or ADC. Physical means the units like uV. * The sensitivity in units/bit is calculated as follows: * * units per bit = (physical max - physical min) / (digital max - digital min) * * The digital offset is calculated as follows: * * offset = (physical max / units per bit) - digital max * * For a better explanation about the relation between digital data and physical data, * read the document "Coding Schemes Used with Data Converters" (PDF): * * https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sbaa042 * * note: An EDF file usually contains multiple so-called datarecords. One datarecord usually has a duration of one second (this is the default but it is not mandatory!). * In that case a file with a duration of five minutes contains 300 datarecords. The duration of a datarecord can be freely choosen but, if possible, use values from * 0.1 to 1 second for easier handling. Just make sure that the total size of one datarecord, expressed in bytes, does not exceed 10MByte (15MBytes for BDF(+)). * * The RECOMMENDATION of a maximum datarecordsize of 61440 bytes in the EDF and EDF+ specification was usefull in the time people were still using DOS as their main operating system. * Using DOS and fast (near) pointers (16-bit pointers), the maximum allocatable block of memory was 64KByte. * This is not a concern anymore so the maximum datarecord size now is limited to 10MByte for EDF(+) and 15MByte for BDF(+). This helps to accommodate for higher samplingrates * used by modern Analog to Digital Converters. * * EDF header character encoding: The EDF specification says that only ASCII characters are allowed. * EDFlib will automatically convert characters with accents, umlauts, tilde, etc. to their "normal" equivalent without the accent/umlaut/tilde/etc. * * The description/name of an EDF+ annotation on the other hand, is encoded in UTF-8. * */ struct edf_param_struct{ /* this structure contains all the relevant EDF-signal parameters of one signal */ char label[17]; /* label (name) of the signal, null-terminated string */ long long smp_in_file; /* number of samples of this signal in the file */ double phys_max; /* physical maximum, usually the maximum input of the ADC */ double phys_min; /* physical minimum, usually the minimum input of the ADC */ int dig_max; /* digital maximum, usually the maximum output of the ADC, can not not be higher than 32767 for EDF or 8388607 for BDF */ int dig_min; /* digital minimum, usually the minimum output of the ADC, can not not be lower than -32768 for EDF or -8388608 for BDF */ int smp_in_datarecord; /* number of samples of this signal in a datarecord, if the datarecord has a duration of one second (default), then it equals the samplerate */ char physdimension[9]; /* physical dimension (uV, bpm, mA, etc.), null-terminated string */ char prefilter[81]; /* null-terminated string */ char transducer[81]; /* null-terminated string */ }; struct edf_annotation_struct{ /* this structure is used for annotations */ long long onset; /* onset time of the event, expressed in units of 100 nanoSeconds and relative to the start of the file */ char duration[16]; /* duration time, this is a null-terminated ASCII text-string */ char annotation[EDFLIB_MAX_ANNOTATION_LEN + 1]; /* description of the event in UTF-8, this is a null terminated string */ }; struct edf_hdr_struct{ /* this structure contains all the relevant EDF header info and will be filled when calling the function edf_open_file_readonly() */ int handle; /* a handle (identifier) used to distinguish the different files */ int filetype; /* 0: EDF, 1: EDFplus, 2: BDF, 3: BDFplus, a negative number means an error */ int edfsignals; /* number of EDF signals in the file, annotation channels are NOT included */ long long file_duration; /* duration of the file expressed in units of 100 nanoSeconds */ int startdate_day; int startdate_month; int startdate_year; long long starttime_subsecond; /* starttime offset expressed in units of 100 nanoSeconds. Is always less than 10000000 (one second). Only used by EDFplus and BDFplus */ int starttime_second; int starttime_minute; int starttime_hour; char patient[81]; /* null-terminated string, contains patientfield of header, is always empty when filetype is EDFPLUS or BDFPLUS */ char recording[81]; /* null-terminated string, contains recordingfield of header, is always empty when filetype is EDFPLUS or BDFPLUS */ char patientcode[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char gender[16]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char birthdate[16]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char patient_name[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char patient_additional[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char admincode[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char technician[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char equipment[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ char recording_additional[81]; /* null-terminated string, is always empty when filetype is EDF or BDF */ long long datarecord_duration; /* duration of a datarecord expressed in units of 100 nanoSeconds */ long long datarecords_in_file; /* number of datarecords in the file */ long long annotations_in_file; /* number of annotations in the file */ struct edf_param_struct signalparam[EDFLIB_MAXSIGNALS]; /* array of structs which contain the relevant signal parameters */ }; /***************** the following functions are used to read files **************************/ int edfopen_file_readonly(const char *path, struct edf_hdr_struct *edfhdr, int read_annotations, int check_file_size); /* opens an existing file for reading */ /* path is a null-terminated string containing the path to the file */ /* hdr is a pointer to an edf_hdr_struct, all fields in this struct will be overwritten */ /* the edf_hdr_struct will be filled with all the relevant header- and signalinfo/parameters */ /* read_annotations must have one of the following values: */ /* EDFLIB_DO_NOT_READ_ANNOTATIONS annotations will not be read (this saves time when opening a very large EDFplus or BDFplus file */ /* EDFLIB_READ_ANNOTATIONS annotations will be read immediately, stops when an annotation has */ /* been found which contains the description "Recording ends" */ /* EDFLIB_READ_ALL_ANNOTATIONS all annotations will be read immediately */ /* check_file_size must have one of the following values: */ /* EDFLIB_CHECK_FILE_SIZE file size is checked and if wrong, the file will not be opened*/ /* EDFLIB_DO_NOT_CHECK_FILE_SIZE the file will alsways be opened and the file size is not checked*/ /* EDFLIB_REPAIR_FILE_SIZE_IF_WRONG the file size is checked and if it is wrong it will be fixed*/ /* returns 0 on success, in case of an error it returns -1 and an errorcode will be set in the member "filetype" of struct edf_hdr_struct */ /* This function is required if you want to read a file */ int edfread_physical_samples(int handle, int edfsignal, int n, double *buf); /* reads n samples from edfsignal, starting from the current sample position indicator, into buf (edfsignal starts at 0) */ /* the values are converted to their physical values e.g. microVolts, beats per minute, etc. */ /* bufsize should be equal to or bigger than sizeof(double[n]) */ /* the sample position indicator will be increased with the amount of samples read */ /* returns the amount of samples read (this can be less than n or zero!) */ /* or -1 in case of an error */ int edfread_digital_samples(int handle, int edfsignal, int n, int *buf); /* reads n samples from edfsignal, starting from the current sample position indicator, into buf (edfsignal starts at 0) */ /* the values are the "raw" digital values */ /* bufsize should be equal to or bigger than sizeof(int[n]) */ /* the sample position indicator will be increased with the amount of samples read */ /* returns the amount of samples read (this can be less than n or zero!) */ /* or -1 in case of an error */ long long edfseek(int handle, int edfsignal, long long offset, int whence); /* The edfseek() function sets the sample position indicator for the edfsignal pointed to by edfsignal. */ /* The new position, measured in samples, is obtained by adding offset samples to the position specified by whence. */ /* If whence is set to EDFSEEK_SET, EDFSEEK_CUR, or EDFSEEK_END, the offset is relative to the start of the file, */ /* the current position indicator, or end-of-file, respectively. */ /* Returns the current offset. Otherwise, -1 is returned. */ /* note that every signal has it's own independent sample position indicator and edfseek() affects only one of them */ long long edftell(int handle, int edfsignal); /* The edftell() function obtains the current value of the sample position indicator for the edfsignal pointed to by edfsignal. */ /* Returns the current offset. Otherwise, -1 is returned */ /* note that every signal has it's own independent sample position indicator and edftell() affects only one of them */ void edfrewind(int handle, int edfsignal); /* The edfrewind() function sets the sample position indicator for the edfsignal pointed to by edfsignal to the beginning of the file. */ /* It is equivalent to: (void) edfseek(int handle, int edfsignal, 0LL, EDFSEEK_SET) */ /* note that every signal has it's own independent sample position indicator and edfrewind() affects only one of them */ int edf_get_annotation(int handle, int n, struct edf_annotation_struct *annot); /* Fills the edf_annotation_struct with the annotation n, returns 0 on success, otherwise -1 */ /* The string that describes the annotation/event is encoded in UTF-8 */ /* To obtain the number of annotations in a file, check edf_hdr_struct -> annotations_in_file. */ /* returns 0 on success or -1 in case of an error */ /* Notes: Annotationsignals ================= EDFplus and BDFplus store the annotations in one or more signals (in order to be backwards compatibel with EDF and BDF). The counting of the signals in the file starts at 0. Signals used for annotations are skipped by EDFlib. This means that the annotationsignal(s) in the file are hided. Use the function edf_get_annotation() to get the annotations. So, when a file contains 5 signals and the third signal is used to store the annotations, the library will report that there are only 4 signals in the file. The library will "map" the signalnumbers as follows: 0->0, 1->1, 2->3, 3->4. This way you don't need to worry about which signals are annotationsignals, the library will take care of it. How the library stores time-values ================================== To avoid rounding errors, the library stores some timevalues in variables of type long long int. In order not to loose the subsecond precision, all timevalues have been multiplied by 10000000. This will limit the timeresolution to 100 nanoSeconds. To calculate the amount of seconds, divide the timevalue by 10000000 or use the macro EDFLIB_TIME_DIMENSION which is declared in edflib.h. The following variables do use this when you open a file in read mode: "file_duration", "starttime_subsecond" and "onset". */ /***************** the following functions are used to read or write files **************************/ int edfclose_file(int handle); /* closes (and in case of writing, finalizes) the file */ /* returns -1 in case of an error, 0 on success */ /* this function MUST be called when you are finished reading or writing */ /* This function is required after reading or writing. Failing to do so will cause */ /* unnessecary memory usage and in case of writing it will cause a corrupted and incomplete file */ int edflib_version(void); /* Returns the version number of this library, multiplied by hundred. if version is "1.00" than it will return 100 */ int edflib_is_file_used(const char *path); /* returns 1 if the file is used, either for reading or writing */ /* otherwise returns 0 */ int edflib_get_number_of_open_files(void); /* returns the number of open files, either for reading or writing */ int edflib_get_handle(int file_number); /* returns the handle of an opened file, either for reading or writing */ /* file_number starts with 0 */ /* returns -1 if the file is not opened */ /***************** the following functions are used to write files **************************/ int edfopen_file_writeonly(const char *path, int filetype, int number_of_signals); /* opens an new file for writing. warning, an already existing file with the same name will be silently overwritten without advance warning!! */ /* path is a null-terminated string containing the path and name of the file */ /* filetype must be EDFLIB_FILETYPE_EDFPLUS or EDFLIB_FILETYPE_BDFPLUS */ /* returns a handle on success, you need this handle for the other functions */ /* in case of an error it returns a negative number corresponding to one of the following values: */ /* EDFLIB_MALLOC_ERROR */ /* EDFLIB_NO_SUCH_FILE_OR_DIRECTORY */ /* EDFLIB_MAXFILES_REACHED */ /* EDFLIB_FILE_ALREADY_OPENED */ /* EDFLIB_NUMBER_OF_SIGNALS_INVALID */ /* This function is required if you want to write a file */ int edf_set_samplefrequency(int handle, int edfsignal, int samplefrequency); /* Sets the samplefrequency of signal edfsignal. (In reallity, it sets the number of samples in a datarecord.) */ /* Returns 0 on success, otherwise -1 */ /* This function is required for every signal and can be called only after opening a */ /* file in writemode and before the first sample write action */ int edf_set_physical_maximum(int handle, int edfsignal, double phys_max); /* Sets the maximum physical value of signal edfsignal. (the value of the input of the ADC when the output equals the value of "digital maximum") */ /* Returns 0 on success, otherwise -1 */ /* This function is required for every signal and can be called only after opening a */ /* file in writemode and before the first sample write action */ int edf_set_physical_minimum(int handle, int edfsignal, double phys_min); /* Sets the minimum physical value of signal edfsignal. (the value of the input of the ADC when the output equals the value of "digital minimum") */ /* Usually this will be (-(phys_max)) */ /* Returns 0 on success, otherwise -1 */ /* This function is required for every signal and can be called only after opening a */ /* file in writemode and before the first sample write action */ int edf_set_digital_maximum(int handle, int edfsignal, int dig_max); /* Sets the maximum digital value of signal edfsignal. The maximum value is 32767 for EDF+ and 8388607 for BDF+ */ /* Usually it's the extreme output of the ADC */ /* Returns 0 on success, otherwise -1 */ /* This function is required for every signal and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_digital_minimum(int handle, int edfsignal, int dig_min); /* Sets the minimum digital value of signal edfsignal. The minimum value is -32768 for EDF+ and -8388608 for BDF+ */ /* Usually it's the extreme output of the ADC */ /* Usually this will be (-(dig_max + 1)) */ /* Returns 0 on success, otherwise -1 */ /* This function is required for every signal and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_label(int handle, int edfsignal, const char *label); /* Sets the label (name) of signal edfsignal. ("FP1", "SaO2", etc.) */ /* label is a pointer to a NULL-terminated ASCII-string containing the label (name) of the signal edfsignal */ /* Returns 0 on success, otherwise -1 */ /* This function is recommended for every signal when you want to write a file */ /* and can be called only after opening a file in writemode and before the first sample write action */ int edf_set_prefilter(int handle, int edfsignal, const char *prefilter); /* Sets the prefilter of signal edfsignal ("HP:0.1Hz", "LP:75Hz N:50Hz", etc.). */ /* prefilter is a pointer to a NULL-terminated ASCII-string containing the prefilter text of the signal edfsignal */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode and before */ /* the first sample write action */ int edf_set_transducer(int handle, int edfsignal, const char *transducer); /* Sets the transducer of signal edfsignal ("AgAgCl cup electrodes", etc.). */ /* transducer is a pointer to a NULL-terminated ASCII-string containing the transducer text of the signal edfsignal */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode and before */ /* the first sample write action */ int edf_set_physical_dimension(int handle, int edfsignal, const char *phys_dim); /* Sets the physical dimension (unit) of signal edfsignal. ("uV", "BPM", "mA", "Degr.", etc.) */ /* phys_dim is a pointer to a NULL-terminated ASCII-string containing the physical dimension of the signal edfsignal */ /* Returns 0 on success, otherwise -1 */ /* This function is recommended for every signal when you want to write a file */ /* and can be called only after opening a file in writemode and before the first sample write action */ int edf_set_startdatetime(int handle, int startdate_year, int startdate_month, int startdate_day, int starttime_hour, int starttime_minute, int starttime_second); /* Sets the startdate and starttime. */ /* year: 1970 - 3000, month: 1 - 12, day: 1 - 31 */ /* hour: 0 - 23, minute: 0 - 59, second: 0 - 59 */ /* If not called, the library will use the system date and time at runtime */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_patientname(int handle, const char *patientname); /* Sets the patientname. patientname is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_patientcode(int handle, const char *patientcode); /* Sets the patientcode. patientcode is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_gender(int handle, int gender); /* Sets the gender. 1 is male, 0 is female. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_birthdate(int handle, int birthdate_year, int birthdate_month, int birthdate_day); /* Sets the birthdate. */ /* year: 1800 - 3000, month: 1 - 12, day: 1 - 31 */ /* This function is optional */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_patient_additional(int handle, const char *patient_additional); /* Sets the additional patientinfo. patient_additional is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_admincode(int handle, const char *admincode); /* Sets the admincode. admincode is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_technician(int handle, const char *technician); /* Sets the technicians name. technician is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_equipment(int handle, const char *equipment); /* Sets the name of the equipment used during the aquisition. equipment is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edf_set_recording_additional(int handle, const char *recording_additional); /* Sets the additional recordinginfo. recording_additional is a pointer to a null-terminated ASCII-string. */ /* Returns 0 on success, otherwise -1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ int edfwrite_physical_samples(int handle, double *buf); /* Writes n physical samples (uV, mA, Ohm) from *buf belonging to one signal */ /* where n is the samplefrequency of that signal. */ /* The physical samples will be converted to digital samples using the */ /* values of physical maximum, physical minimum, digital maximum and digital minimum */ /* The number of samples written is equal to the samplefrequency of the signal */ /* Size of buf should be equal to or bigger than sizeof(double[samplefrequency]) */ /* Call this function for every signal in the file. The order is important! */ /* When there are 4 signals in the file, the order of calling this function */ /* must be: signal 0, signal 1, signal 2, signal 3, signal 0, signal 1, signal 2, etc. */ /* Returns 0 on success, otherwise -1 */ int edf_blockwrite_physical_samples(int handle, double *buf); /* Writes physical samples (uV, mA, Ohm) from *buf */ /* buf must be filled with samples from all signals, starting with n samples of signal 0, n samples of signal 1, n samples of signal 2, etc. */ /* where n is the samplefrequency of that signal. */ /* buf must be filled with samples from all signals, starting with signal 0, 1, 2, etc. */ /* one block equals one second */ /* The physical samples will be converted to digital samples using the */ /* values of physical maximum, physical minimum, digital maximum and digital minimum */ /* The number of samples written is equal to the sum of the samplefrequencies of all signals */ /* Size of buf should be equal to or bigger than sizeof(double) multiplied by the sum of the samplefrequencies of all signals */ /* Returns 0 on success, otherwise -1 */ int edfwrite_digital_short_samples(int handle, short *buf); /* Writes n "raw" digital samples from *buf belonging to one signal */ /* where n is the samplefrequency of that signal. */ /* The samples will be written to the file without any conversion. */ /* Because the size of a short is 16-bit, do not use this function with BDF (24-bit) */ /* The number of samples written is equal to the samplefrequency of the signal */ /* Size of buf should be equal to or bigger than sizeof(short[samplefrequency]) */ /* Call this function for every signal in the file. The order is important! */ /* When there are 4 signals in the file, the order of calling this function */ /* must be: signal 0, signal 1, signal 2, signal 3, signal 0, signal 1, signal 2, etc. */ /* Returns 0 on success, otherwise -1 */ int edfwrite_digital_samples(int handle, int *buf); /* Writes n "raw" digital samples from *buf belonging to one signal */ /* where n is the samplefrequency of that signal. */ /* The 16 (or 24 in case of BDF) least significant bits of the sample will be written to the */ /* file without any conversion. */ /* The number of samples written is equal to the samplefrequency of the signal */ /* Size of buf should be equal to or bigger than sizeof(int[samplefrequency]) */ /* Call this function for every signal in the file. The order is important! */ /* When there are 4 signals in the file, the order of calling this function */ /* must be: signal 0, signal 1, signal 2, signal 3, signal 0, signal 1, signal 2, etc. */ /* Returns 0 on success, otherwise -1 */ int edf_blockwrite_digital_3byte_samples(int handle, void *buf); /* Writes "raw" digital samples from *buf. */ /* buf must be filled with samples from all signals, starting with n samples of signal 0, n samples of signal 1, n samples of signal 2, etc. */ /* where n is the samplefrequency of that signal. */ /* One block equals one second. One sample equals 3 bytes, order is little endian (least significant byte first) */ /* Encoding is second's complement, most significant bit of most significant byte is the sign-bit */ /* The samples will be written to the file without any conversion. */ /* Because the size of a 3-byte sample is 24-bit, this function can only be used when writing a BDF file */ /* The number of samples written is equal to the sum of the samplefrequencies of all signals. */ /* Size of buf should be equal to or bigger than: the sum of the samplefrequencies of all signals x 3 bytes */ /* Returns 0 on success, otherwise -1 */ int edf_blockwrite_digital_short_samples(int handle, short *buf); /* Writes "raw" digital samples from *buf. */ /* buf must be filled with samples from all signals, starting with n samples of signal 0, n samples of signal 1, n samples of signal 2, etc. */ /* where n is the samplefrequency of that signal. */ /* One block equals one second. */ /* The samples will be written to the file without any conversion. */ /* Because the size of a short is 16-bit, do not use this function with BDF (24-bit) */ /* The number of samples written is equal to the sum of the samplefrequencies of all signals. */ /* Size of buf should be equal to or bigger than sizeof(short) multiplied by the sum of the samplefrequencies of all signals */ /* Returns 0 on success, otherwise -1 */ int edf_blockwrite_digital_samples(int handle, int *buf); /* Writes "raw" digital samples from *buf. */ /* buf must be filled with samples from all signals, starting with n samples of signal 0, n samples of signal 1, n samples of signal 2, etc. */ /* where n is the samplefrequency of that signal. */ /* One block equals one second. */ /* The 16 (or 24 in case of BDF) least significant bits of the sample will be written to the */ /* file without any conversion. */ /* The number of samples written is equal to the sum of the samplefrequencies of all signals. */ /* Size of buf should be equal to or bigger than sizeof(int) multiplied by the sum of the samplefrequencies of all signals */ /* Returns 0 on success, otherwise -1 */ int edfwrite_annotation_utf8(int handle, long long onset, long long duration, const char *description); /* writes an annotation/event to the file */ /* onset is relative to the start of the file */ /* onset and duration are in units of 100 microSeconds! resolution is 0.0001 second! */ /* for example: 34.071 seconds must be written as 340710 */ /* if duration is unknown or not applicable: set a negative number (-1) */ /* description is a null-terminated UTF8-string containing the text that describes the event */ /* This function is optional and can be called only after opening a file in writemode */ /* and before closing the file */ int edfwrite_annotation_latin1(int handle, long long onset, long long duration, const char *description); /* writes an annotation/event to the file */ /* onset is relative to the start of the file */ /* onset and duration are in units of 100 microSeconds! resolution is 0.0001 second! */ /* for example: 34.071 seconds must be written as 340710 */ /* if duration is unknown or not applicable: set a negative number (-1) */ /* description is a null-terminated Latin1-string containing the text that describes the event */ /* This function is optional and can be called only after opening a file in writemode */ /* and before closing the file */ int edf_set_datarecord_duration(int handle, int duration); /* Sets the datarecord duration. The default value is 1 second. */ /* ATTENTION: the argument "duration" is expressed in units of 10 microSeconds! */ /* So, if you want to set the datarecord duration to 0.1 second, you must give */ /* the argument "duration" a value of "10000". */ /* This function is optional, normally you don't need to change the default value. */ /* The datarecord duration must be in the range 0.001 to 60 seconds. */ /* Returns 0 on success, otherwise -1 */ /* This function is NOT REQUIRED but can be called after opening a */ /* file in writemode and before the first sample write action. */ /* This function can be used when you want to use a samplerate */ /* which is not an integer. For example, if you want to use a samplerate of 0.5 Hz, */ /* set the samplefrequency to 5 Hz and the datarecord duration to 10 seconds, */ /* or set the samplefrequency to 1 Hz and the datarecord duration to 2 seconds. */ /* Do not use this function if not necessary. */ int edf_set_micro_datarecord_duration(int handle, int duration); /* Sets the datarecord duration to a very small value. */ /* ATTENTION: the argument "duration" is expressed in units of 1 microSecond! */ /* This function is optional, normally you don't need to change the default value. */ /* The datarecord duration must be in the range 1 to 9999 micro-seconds. */ /* Returns 0 on success, otherwise -1 */ /* This function is NOT REQUIRED but can be called after opening a */ /* file in writemode and before the first sample write action. */ /* This function can be used when you want to use a very high samplerate. */ /* For example, if you want to use a samplerate of 5 GHz, */ /* set the samplefrequency to 5000 Hz and the datarecord duration to 1 micro-second. */ /* Do not use this function if not necessary. */ /* This function was added to accommodate for high speed ADC's e.g. Digital Sampling Oscilloscopes */ int edf_set_number_of_annotation_signals(int handle, int annot_signals); /* Sets the number of annotation signals. The default value is 1 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ /* Normally you don't need to change the default value. Only when the number of annotations */ /* you want to write is higher than the number of datarecords in the recording, you can use */ /* this function to increase the storage space for annotations */ /* Minimum is 1, maximum is 64 */ /* Returns 0 on success, otherwise -1 */ int edf_set_subsecond_starttime(int handle, int subsecond); /* Sets the subsecond starttime expressed in units of 100 nanoSeconds */ /* Valid range is 0 to 9999999 inclusive. Default is 0 */ /* This function is optional and can be called only after opening a file in writemode */ /* and before the first sample write action */ /* Returns 0 on success, otherwise -1 */ /* It is strongly recommended to use a maximum resolution of no more than 100 micro-Seconds. */ /* e.g. use 1234000 to set a starttime offset of 0.1234 seconds (instead of 1234567) */ /* in other words, leave the last 3 digits at zero */ #ifdef __cplusplus } /* extern "C" */ #endif #endif
983e33e94b9c27be8ad629ccb1d6d77f7f2dcfd8
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/allwinner/libraries/sunxi-hal/hal/source/gpio/sun8iw18/platform-gpio.h
a56a348f5be3994c2add91e53cf056fce0c54450
[ "Apache-2.0", "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
5,449
h
platform-gpio.h
/* * Copyright (c) 2019-2025 Allwinner Technology Co., Ltd. ALL rights reserved. * * Allwinner is a trademark of Allwinner Technology Co.,Ltd., registered in * the the People's Republic of China and other countries. * All Allwinner Technology Co.,Ltd. trademarks are used with permission. * * DISCLAIMER * THIRD PARTY LICENCES MAY BE REQUIRED TO IMPLEMENT THE SOLUTION/PRODUCT. * IF YOU NEED TO INTEGRATE THIRD PARTY’S TECHNOLOGY (SONY, DTS, DOLBY, AVS OR MPEGLA, ETC.) * IN ALLWINNERS’SDK OR PRODUCTS, YOU SHALL BE SOLELY RESPONSIBLE TO OBTAIN * ALL APPROPRIATELY REQUIRED THIRD PARTY LICENCES. * ALLWINNER SHALL HAVE NO WARRANTY, INDEMNITY OR OTHER OBLIGATIONS WITH RESPECT TO MATTERS * COVERED UNDER ANY REQUIRED THIRD PARTY LICENSE. * YOU ARE SOLELY RESPONSIBLE FOR YOUR USAGE OF THIRD PARTY’S TECHNOLOGY. * * * THIS SOFTWARE IS PROVIDED BY ALLWINNER"AS IS" AND TO THE MAXIMUM EXTENT * PERMITTED BY LAW, ALLWINNER EXPRESSLY DISCLAIMS ALL WARRANTIES OF ANY KIND, * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION REGARDING * THE TITLE, NON-INFRINGEMENT, ACCURACY, CONDITION, COMPLETENESS, PERFORMANCE * OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * IN NO EVENT SHALL ALLWINNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS, OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __PLATFORM_GPIO_H__ #define __PLATFORM_GPIO_H__ #ifdef __cplusplus extern "C" { #endif #define GPIO_MAX_BANK PL_BASE #define BANK_BOUNDARY PL_BASE #define SUNXI_GPIO_PBASE 0x0300B000 /* sunxi gpio irq*/ #define SUNXI_GIC_START 32 #define SUNXI_IRQ_GPIOB (SUNXI_GIC_START + 43) /* 75 gpiob interrupt */ #define SUNXI_IRQ_GPIOE (SUNXI_GIC_START + 44) /* 76 gpioe interrupt */ #define SUNXI_IRQ_GPIOG (SUNXI_GIC_START + 46) /* 78 gpiog interrupt */ #define SUNXI_IRQ_GPIOH (SUNXI_GIC_START + 47) /* 79 gpioh interrupt */ typedef enum { GPIO_PB0 = GPIOB(0), GPIO_PB1 = GPIOB(1), GPIO_PB2 = GPIOB(2), GPIO_PB3 = GPIOB(3), GPIO_PB4 = GPIOB(4), GPIO_PB5 = GPIOB(5), GPIO_PB6 = GPIOB(6), GPIO_PB7 = GPIOB(7), GPIO_PB8 = GPIOB(8), GPIO_PB9 = GPIOB(9), GPIO_PB10 = GPIOB(10), GPIO_PB11 = GPIOB(11), GPIO_PB12 = GPIOB(12), GPIO_PB13 = GPIOB(13), GPIO_PC0 = GPIOC(0), GPIO_PC1 = GPIOC(1), GPIO_PC2 = GPIOC(2), GPIO_PC3 = GPIOC(3), GPIO_PC4 = GPIOC(4), GPIO_PC5 = GPIOC(5), GPIO_PC6 = GPIOC(6), GPIO_PC7 = GPIOC(7), GPIO_PC8 = GPIOC(8), GPIO_PC9 = GPIOC(9), GPIO_PC10 = GPIOC(10), GPIO_PC11 = GPIOC(11), GPIO_PC12 = GPIOC(12), GPIO_PC13 = GPIOC(13), GPIO_PC14 = GPIOC(14), GPIO_PC15 = GPIOC(15), GPIO_PC16 = GPIOC(16), GPIO_PD0 = GPIOD(0), GPIO_PD1 = GPIOD(1), GPIO_PD2 = GPIOD(2), GPIO_PD3 = GPIOD(3), GPIO_PD4 = GPIOD(4), GPIO_PD5 = GPIOD(5), GPIO_PD6 = GPIOD(6), GPIO_PD7 = GPIOD(7), GPIO_PD8 = GPIOD(8), GPIO_PD9 = GPIOD(9), GPIO_PD10 = GPIOD(10), GPIO_PD11 = GPIOD(11), GPIO_PD12 = GPIOD(12), GPIO_PD13 = GPIOD(13), GPIO_PD14 = GPIOD(14), GPIO_PD15 = GPIOD(15), GPIO_PD16 = GPIOD(16), GPIO_PD17 = GPIOD(17), GPIO_PD18 = GPIOD(18), GPIO_PD19 = GPIOD(19), GPIO_PD20 = GPIOD(20), GPIO_PD21 = GPIOD(21), GPIO_PD22 = GPIOD(22), GPIO_PE0 = GPIOE(0), GPIO_PE1 = GPIOE(1), GPIO_PE2 = GPIOE(2), GPIO_PE3 = GPIOE(3), GPIO_PE4 = GPIOE(4), GPIO_PE5 = GPIOE(5), GPIO_PE6 = GPIOE(6), GPIO_PE7 = GPIOE(7), GPIO_PE8 = GPIOE(8), GPIO_PE9 = GPIOE(9), GPIO_PE10 = GPIOE(10), GPIO_PE11 = GPIOE(11), GPIO_PE12 = GPIOE(12), GPIO_PE13 = GPIOE(13), GPIO_PE14 = GPIOE(14), GPIO_PE15 = GPIOE(15), GPIO_PE16 = GPIOE(16), GPIO_PE17 = GPIOE(17), GPIO_PE18 = GPIOE(18), GPIO_PE19 = GPIOE(19), GPIO_PE20 = GPIOE(20), GPIO_PE21 = GPIOE(21), GPIO_PF0 = GPIOF(0), GPIO_PF1 = GPIOF(1), GPIO_PF2 = GPIOF(2), GPIO_PF3 = GPIOF(3), GPIO_PF4 = GPIOF(4), GPIO_PF5 = GPIOF(5), GPIO_PF6 = GPIOF(6), GPIO_PG0 = GPIOG(0), GPIO_PG1 = GPIOG(1), GPIO_PG2 = GPIOG(2), GPIO_PG3 = GPIOG(3), GPIO_PG4 = GPIOG(4), GPIO_PG5 = GPIOG(5), GPIO_PG6 = GPIOG(6), GPIO_PG7 = GPIOG(7), GPIO_PH0 = GPIOH(0), GPIO_PH1 = GPIOH(1), GPIO_PH2 = GPIOH(2), GPIO_PH3 = GPIOH(3), GPIO_PH4 = GPIOH(4), GPIO_PH5 = GPIOH(5), GPIO_PH6 = GPIOH(6), GPIO_PH7 = GPIOH(7), GPIO_PH8 = GPIOH(8), GPIO_PH9 = GPIOH(9), GPIO_PH10 = GPIOH(10), GPIO_PH11 = GPIOH(11), GPIO_PH12 = GPIOH(12), GPIO_PH13 = GPIOH(13), GPIO_PH14 = GPIOH(14), GPIO_PH15 = GPIOH(15), GPIO_PI0 = GPIOI(0), GPIO_PI1 = GPIOI(1), GPIO_PI2 = GPIOI(2), GPIO_PI3 = GPIOI(3), GPIO_PI4 = GPIOI(4), GPIO_PI5 = GPIOI(5), GPIO_PL0 = GPIOL(0), GPIO_PL1 = GPIOL(1), GPIO_PL2 = GPIOL(2), GPIO_PL3 = GPIOL(3), GPIO_PL4 = GPIOL(4), GPIO_PL5 = GPIOL(5), } gpio_pin_t; #ifdef __cplusplus } #endif #endif /* __PLATFORM_GPIO_H__ */
9fe38e347c386391800ad45b1e3fcdc99d22c9a6
c3bbdbbbc5f47577e332a280f81bd905617423c9
/Source/Depends/SDKTweaks/mountdev.h
f660ca68bdf45b5466c185764205781c4d4265aa
[ "MIT" ]
permissive
DeanRoddey/CIDLib
65850f56cb60b16a63bbe7d6d67e4fddd3ecce57
82014e064eef51cad998bf2c694ed9c1c8cceac6
refs/heads/develop
2023-03-11T03:08:59.207530
2021-11-06T16:40:44
2021-11-06T16:40:44
174,652,391
227
33
MIT
2020-09-16T11:33:26
2019-03-09T05:26:26
C++
UTF-8
C
false
false
1,473
h
mountdev.h
#ifndef __MOUNTDEV_H #define __MOUNTDEV_H #if __GNUC__ >=3 #pragma GCC system_header #endif #ifdef __cplusplus extern "C" { #endif //#include "ntddk.h" #include "mountmgr.h" #define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \ CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID \ CTL_CODE(MOUNTDEVCONTROLTYPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY \ CTL_CODE(MOUNTDEVCONTROLTYPE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME \ CTL_CODE(MOUNTDEVCONTROLTYPE, 3, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_MOUNTDEV_LINK_CREATED \ CTL_CODE(MOUNTDEVCONTROLTYPE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_MOUNTDEV_LINK_DELETED \ CTL_CODE(MOUNTDEVCONTROLTYPE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS) typedef struct _MOUNTDEV_SUGGESTED_LINK_NAME { BOOLEAN UseOnlyIfThereAreNoOtherLinks; USHORT NameLength; WCHAR Name[1]; } MOUNTDEV_SUGGESTED_LINK_NAME, *PMOUNTDEV_SUGGESTED_LINK_NAME; typedef struct _MOUNTDEV_UNIQUE_ID { USHORT UniqueIdLength; UCHAR UniqueId[1]; } MOUNTDEV_UNIQUE_ID, *PMOUNTDEV_UNIQUE_ID; typedef struct _MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT { ULONG Size; USHORT OldUniqueIdOffset; USHORT OldUniqueIdLength; USHORT NewUniqueIdOffset; USHORT NewUniqueIdLength; } MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT; #ifdef __cplusplus } #endif #endif /* __MOUNTDEV_H */
3ae89e66e125aa722de7a800752ef8edff2692b4
7c857119fe1505b1d80d6e62969661c06dc1a2f4
/MdePkg/Include/Protocol/DevicePathFromText.h
5698020c444b31fd51a6057c620ce8a898f5ae93
[ "BSD-2-Clause" ]
permissive
CloverHackyColor/CloverBootloader
7042ca7dd6b513d22be591a295e49071ae1482ee
2711170df4f60b2ae5aa20add3e00f35cf57b7e5
refs/heads/master
2023-08-30T22:14:34.590134
2023-08-27T19:14:02
2023-08-27T19:14:02
205,810,121
4,734
770
BSD-2-Clause
2023-09-03T12:41:33
2019-09-02T08:22:14
C
UTF-8
C
false
false
2,119
h
DevicePathFromText.h
/** @file EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0. This protocol provides service to convert text to device paths and device nodes. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__ #define __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__ /// /// Device Path From Text protocol /// #define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \ { \ 0x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } \ } /** Convert text to the binary representation of a device node. @param TextDeviceNode TextDeviceNode points to the text representation of a device node. Conversion starts with the first character and continues until the first non-device node character. @retval a_pointer Pointer to the EFI device node. @retval NULL if TextDeviceNode is NULL or there was insufficient memory. **/ typedef EFI_DEVICE_PATH_PROTOCOL* (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE)( IN CONST CHAR16 *TextDeviceNode ); /** Convert text to the binary representation of a device node. @param TextDeviceNode TextDevicePath points to the text representation of a device path. Conversion starts with the first character and continues until the first non-device path character. @retval a_pointer Pointer to the allocated device path. @retval NULL if TextDeviceNode is NULL or there was insufficient memory. **/ typedef EFI_DEVICE_PATH_PROTOCOL* (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH)( IN CONST CHAR16 *TextDevicePath ); /// /// This protocol converts text to device paths and device nodes. /// typedef struct { EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode; EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath; } EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL; extern EFI_GUID gEfiDevicePathFromTextProtocolGuid; #endif
3eed747d146fa8b0c8bf8e6e11379acad10c8e5c
192f6a4c9d934be58bca0e610ec1a75e7777fcd1
/src/runcore/main.c
05c60256a6ea5a8f60148d37eec67b000f164274
[ "Artistic-2.0" ]
permissive
parrot/parrot
39a74fbb015829cef901211d6d173b71eea475ea
f89a111c06ad0367817c52fda6ff5c24165c005b
refs/heads/master
2023-07-20T07:41:40.386067
2021-08-25T17:59:15
2021-08-25T17:59:15
1,071,734
450
134
null
2016-11-09T10:57:41
2010-11-11T15:14:10
C
UTF-8
C
false
false
10,701
c
main.c
/* Copyright (C) 2001-2015, Parrot Foundation. =head1 NAME src/runcore/main.c - main functions for Parrot runcores =head1 DESCRIPTION The runcore API handles running the operations. =head2 Functions =over 4 =cut */ #include "parrot/parrot.h" #include "parrot/runcore_api.h" #include "parrot/runcore_profiling.h" #include "parrot/runcore_subprof.h" #include "parrot/oplib/core_ops.h" #include "parrot/oplib/ops.h" #include "main.str" #include "parrot/dynext.h" #include "pmc/pmc_parrotlibrary.h" #include "pmc/pmc_callcontext.h" /* HEADERIZER HFILE: include/parrot/runcore_api.h */ /* XXX Needs to get done at the same time as the other interpreter files */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static oplib_init_f get_dynamic_op_lib_init(PARROT_INTERP, ARGIN(const PMC *lib)) __attribute__nonnull__(2); #define ASSERT_ARGS_get_dynamic_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(lib)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ /* =item C<void Parrot_runcore_init(PARROT_INTERP)> Initializes the runcores. =cut */ void Parrot_runcore_init(PARROT_INTERP) { ASSERT_ARGS(Parrot_runcore_init) STRING * const default_core = CONST_STRING(interp, "fast"); interp->cores = NULL; interp->num_cores = 0; Parrot_runcore_slow_init(interp); Parrot_runcore_fast_init(interp); Parrot_runcore_subprof_init(interp); /* Parrot_runcore_exec_init(interp); */ Parrot_runcore_gc_debug_init(interp); Parrot_runcore_debugger_init(interp); Parrot_runcore_profiling_init(interp); /* set the default runcore */ Parrot_runcore_switch(interp, default_core); } /* =item C<INTVAL Parrot_runcore_register(PARROT_INTERP, Parrot_runcore_t *coredata)> Registers a new runcore with Parrot. Returns 1 on success, 0 on failure. =cut */ PARROT_EXPORT INTVAL Parrot_runcore_register(PARROT_INTERP, ARGIN(Parrot_runcore_t *coredata)) { ASSERT_ARGS(Parrot_runcore_register) size_t i = interp->num_cores++; interp->cores = mem_gc_realloc_n_typed_zeroed(interp, interp->cores, interp->num_cores, i, Parrot_runcore_t *); interp->cores[i] = coredata; return 1; } /* =item C<void Parrot_runcore_switch(PARROT_INTERP, STRING *name)> Switches to a named runcore. Throws an exception on an unknown runcore. =cut */ PARROT_EXPORT void Parrot_runcore_switch(PARROT_INTERP, ARGIN(STRING *name)) { ASSERT_ARGS(Parrot_runcore_switch) size_t num_cores = interp->num_cores; size_t i; if (interp->run_core && STRING_equal(interp, name, interp->run_core->name)) return; for (i = 0; i < num_cores; ++i) { if (STRING_equal(interp, name, interp->cores[i]->name)) { interp->run_core = interp->cores[i]; return; } } /* XXX This might end in an endless exception cycle. Better panic here? */ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, "Invalid runcore %Ss requested", name); } /* =item C<static oplib_init_f get_dynamic_op_lib_init(PARROT_INTERP, const PMC *lib)> Returns an dynamic oplib's opcode's library C<op_lib> init function. C<lib> will be a C<ParrotLibrary> PMC. =cut */ PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static oplib_init_f get_dynamic_op_lib_init(SHIM_INTERP, ARGIN(const PMC *lib)) { ASSERT_ARGS(get_dynamic_op_lib_init) return (oplib_init_f)D2FPTR( ((Parrot_ParrotLibrary_attributes *)PMC_data(lib))->oplib_init); } /* =item C<void prepare_for_run(PARROT_INTERP)> Prepares to run the interpreter's run core. =cut */ void prepare_for_run(PARROT_INTERP) { ASSERT_ARGS(prepare_for_run) const runcore_prepare_fn_type prepare_run = interp->run_core->prepare_run; if (prepare_run) (*prepare_run)(interp, interp->run_core); } /* =item C<void runops_int(PARROT_INTERP, size_t offset)> Run Parrot operations of loaded code segment until an end opcode is reached. Run core is selected depending on the C<Interp_flags>. When a C<restart> opcode is encountered, a different core may be selected and evaluation of opcode continues. =cut */ void runops_int(PARROT_INTERP, size_t offset) { ASSERT_ARGS(runops_int) interp->resume_offset = offset; interp->resume_flag |= RESUME_RESTART; while (interp->resume_flag & RESUME_RESTART) { opcode_t * const pc = interp->code->base.data + interp->resume_offset; const runcore_runops_fn_type core = interp->run_core->runops; interp->resume_offset = 0; interp->resume_flag &= ~(RESUME_RESTART | RESUME_INITIAL); (*core)(interp, interp->run_core, pc); /* if we have fallen out with resume and we were running CGOTO, set * the stacktop again to a sane value, so that restarting the runloop * is ok. */ if (interp->resume_flag & RESUME_RESTART) { if ((int)interp->resume_offset < 0) Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INTERNAL_PANIC, "branch_cs: illegal resume offset"); } } } /* =item C<void Parrot_runcore_destroy(PARROT_INTERP)> Shuts down the runcores and deallocates any dynops memory. =cut */ void Parrot_runcore_destroy(PARROT_INTERP) { ASSERT_ARGS(Parrot_runcore_destroy) size_t num_cores = interp->num_cores; size_t i; for (i = 0; i < num_cores; ++i) { Parrot_runcore_t * const core = interp->cores[i]; const runcore_destroy_fn_type destroy = core->destroy; if (destroy) (*destroy)(interp, core); mem_gc_free(interp, core); } if (interp->cores) mem_gc_free(interp, interp->cores); interp->cores = NULL; interp->run_core = NULL; if (interp->all_op_libs) mem_gc_free(interp, interp->all_op_libs); interp->all_op_libs = NULL; } /* =back =head2 Dynamic Loading Functions =over 4 =item C<void Parrot_dynop_register(PARROT_INTERP, PMC *lib_pmc)> Register a dynamic oplib. =cut */ PARROT_EXPORT void Parrot_dynop_register(PARROT_INTERP, ARGIN(PMC *lib_pmc)) { ASSERT_ARGS(Parrot_dynop_register) op_lib_t *lib; oplib_init_f init_func; if (!interp->all_op_libs) interp->all_op_libs = mem_gc_allocate_n_zeroed_typed(interp, interp->n_libs + 1, op_lib_t*); else interp->all_op_libs = mem_gc_realloc_n_typed_zeroed(interp, interp->all_op_libs, interp->n_libs + 1, interp->n_libs, op_lib_t *); init_func = get_dynamic_op_lib_init(interp, lib_pmc); lib = init_func(interp, 1); interp->all_op_libs[interp->n_libs++] = lib; /* if we are registering an op_lib variant, called from below the base * names of this lib and the previous one are the same */ if (interp->n_libs >= 2 && (STREQ(interp->all_op_libs[interp->n_libs-2]->name, lib->name))) return; parrot_hash_oplib(interp, lib); } /* =item C<void dynop_register(PARROT_INTERP, PMC *lib_pmc)> This function is deprecated, use C<Parrot_dynop_register> instead. =cut */ PARROT_EXPORT PARROT_DEPRECATED void dynop_register(PARROT_INTERP, ARGIN(PMC *lib_pmc)) { ASSERT_ARGS(dynop_register) Parrot_dynop_register(interp, lib_pmc); } /* =item C<void parrot_hash_oplib(PARROT_INTERP, op_lib_t *lib)> Add the ops in C<lib> to the global name => op_info hash. =cut */ void parrot_hash_oplib(PARROT_INTERP, ARGIN(op_lib_t *lib)) { ASSERT_ARGS(parrot_hash_oplib) int i; DECL_CONST_CAST; for (i = 0; i < lib->op_count; i++) { op_info_t *op = &lib->op_info_table[i]; Parrot_hash_put(interp, interp->op_hash, PARROT_const_cast(char *, op->full_name), (void *)op); if (!Parrot_hash_exists(interp, interp->op_hash, PARROT_const_cast(char *, op->name))) Parrot_hash_put(interp, interp->op_hash, PARROT_const_cast(char *, op->name), (void *)op); } } /* =item C<void Parrot_runcore_disable_event_checking(PARROT_INTERP)> Restore old function table. XXX This is only implemented for the function core at present. =cut */ PARROT_EXPORT void Parrot_runcore_disable_event_checking(PARROT_INTERP) { ASSERT_ARGS(Parrot_runcore_disable_event_checking) PackFile_ByteCode *cs = interp->code; /* restore func table */ PARROT_ASSERT(cs->save_func_table); cs->op_func_table = cs->save_func_table; cs->save_func_table = NULL; } /* =item C<void Parrot_runcore_enable_event_checking(PARROT_INTERP)> Replace func table with one that does event checking for all opcodes. NOTE: C<enable_event_checking()> is called async by the event handler thread. All action done from here has to be async safe. XXX This is only implemented for the function core at present. =cut */ PARROT_EXPORT void Parrot_runcore_enable_event_checking(PARROT_INTERP) { ASSERT_ARGS(Parrot_runcore_enable_event_checking) PackFile_ByteCode *cs = interp->code; /* only save if we're not already event checking */ if (cs->save_func_table == NULL) cs->save_func_table = cs->op_func_table; /* ensure event checking table is big enough */ if (interp->evc_func_table_size < cs->op_count) { size_t i; op_lib_t *core_lib = get_core_op_lib_init(interp, interp->run_core)(interp, 1); interp->evc_func_table = interp->evc_func_table ? mem_gc_realloc_n_typed_zeroed(interp, interp->evc_func_table, cs->op_count, interp->evc_func_table_size, op_func_t) : mem_gc_allocate_n_zeroed_typed(interp, cs->op_count, op_func_t); for (i = interp->evc_func_table_size; i < cs->op_count; i++) interp->evc_func_table[i] = core_lib->op_func_table[PARROT_OP_check_events__]; interp->evc_func_table_size = cs->op_count; } /* put evc table in place */ cs->op_func_table = interp->evc_func_table; } /* =back =head1 SEE ALSO F<include/parrot/interpreter.h>, F<src/interp/inter_cb.c>, F<src/interp/inter_create.c>, F<src/interp/inter_misc.c>, F<src/call/ops.c>. =cut */ /* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : */
3d35a480580bb0e1d410151c9a13fff5adee45e7
e814383d36a10839104efaa4df277996ab220fa3
/ompi/mca/coll/demo/coll_demo_module.c
5c66c98059fd6b3c20f7f400f40e3c37fab71efc
[ "mpich2", "BSD-3-Clause-Open-MPI" ]
permissive
open-mpi/ompi
a1d7483ae1d83dd8fd8ae3ee95e832e0a0ee04e3
1edfdb025c4450f694600083ad871cf06c8d45cd
refs/heads/main
2023-09-01T01:30:02.040705
2023-08-29T17:32:18
2023-08-29T17:32:18
24,107,001
2,008
973
NOASSERTION
2023-09-14T20:59:26
2014-09-16T16:08:30
C
UTF-8
C
false
false
7,522
c
coll_demo_module.c
/* * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2017 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #include "ompi_config.h" #include "coll_demo.h" #include <stdio.h> #include "mpi.h" #include "ompi/communicator/communicator.h" #include "ompi/mca/coll/coll.h" #include "ompi/mca/coll/base/base.h" #include "coll_demo.h" #if 0 /* * Linear set of collective algorithms */ static const mca_coll_base_module_1_0_0_t intra = { /* Initialization / finalization functions */ mca_coll_demo_module_init, mca_coll_demo_module_finalize, /* Collective function pointers */ mca_coll_demo_allgather_intra, mca_coll_demo_allgatherv_intra, mca_coll_demo_allreduce_intra, mca_coll_demo_alltoall_intra, mca_coll_demo_alltoallv_intra, mca_coll_demo_alltoallw_intra, mca_coll_demo_barrier_intra, mca_coll_demo_bcast_intra, NULL, /* Leave exscan blank just to force basic to be used */ mca_coll_demo_gather_intra, mca_coll_demo_gatherv_intra, mca_coll_demo_reduce_intra, mca_coll_demo_reduce_scatter_intra, mca_coll_demo_scan_intra, mca_coll_demo_scatter_intra, mca_coll_demo_scatterv_intra }; /* * Linear set of collective algorithms for intercommunicators */ static const mca_coll_base_module_1_0_0_t inter = { /* Initialization / finalization functions */ mca_coll_demo_module_init, mca_coll_demo_module_finalize, /* Collective function pointers */ mca_coll_demo_allgather_inter, mca_coll_demo_allgatherv_inter, mca_coll_demo_allreduce_inter, mca_coll_demo_alltoall_inter, mca_coll_demo_alltoallv_inter, mca_coll_demo_alltoallw_inter, mca_coll_demo_barrier_inter, mca_coll_demo_bcast_inter, mca_coll_demo_exscan_inter, mca_coll_demo_gather_inter, mca_coll_demo_gatherv_inter, mca_coll_demo_reduce_inter, mca_coll_demo_reduce_scatter_inter, NULL, mca_coll_demo_scatter_inter, mca_coll_demo_scatterv_inter }; #endif /* * Initial query function that is invoked during MPI_INIT, allowing * this component to disqualify itself if it doesn't support the * required level of thread support. */ int mca_coll_demo_init_query(bool enable_progress_threads, bool enable_mpi_threads) { /* Nothing to do */ return OMPI_SUCCESS; } /* * Invoked when there's a new communicator that has been created. * Look at the communicator and decide which set of functions and * priority we want to return. */ mca_coll_base_module_t * mca_coll_demo_comm_query(struct ompi_communicator_t *comm, int *priority) { mca_coll_demo_module_t *demo_module; demo_module = OBJ_NEW(mca_coll_demo_module_t); if (NULL == demo_module) return NULL; *priority = mca_coll_demo_priority; demo_module->super.coll_module_enable = mca_coll_demo_module_enable; if (OMPI_COMM_IS_INTRA(comm)) { demo_module->super.coll_allgather = mca_coll_demo_allgather_intra; demo_module->super.coll_allgatherv = mca_coll_demo_allgatherv_intra; demo_module->super.coll_allreduce = mca_coll_demo_allreduce_intra; demo_module->super.coll_alltoall = mca_coll_demo_alltoall_intra; demo_module->super.coll_alltoallv = mca_coll_demo_alltoallv_intra; demo_module->super.coll_alltoallw = mca_coll_demo_alltoallw_intra; demo_module->super.coll_barrier = mca_coll_demo_barrier_intra; demo_module->super.coll_bcast = mca_coll_demo_bcast_intra; demo_module->super.coll_exscan = mca_coll_demo_exscan_intra; demo_module->super.coll_gather = mca_coll_demo_gather_intra; demo_module->super.coll_gatherv = mca_coll_demo_gatherv_intra; demo_module->super.coll_reduce = mca_coll_demo_reduce_intra; demo_module->super.coll_reduce_scatter = mca_coll_demo_reduce_scatter_intra; demo_module->super.coll_scan = mca_coll_demo_scan_intra; demo_module->super.coll_scatter = mca_coll_demo_scatter_intra; demo_module->super.coll_scatterv = mca_coll_demo_scatterv_intra; } else { demo_module->super.coll_allgather = mca_coll_demo_allgather_inter; demo_module->super.coll_allgatherv = mca_coll_demo_allgatherv_inter; demo_module->super.coll_allreduce = mca_coll_demo_allreduce_inter; demo_module->super.coll_alltoall = mca_coll_demo_alltoall_inter; demo_module->super.coll_alltoallv = mca_coll_demo_alltoallv_inter; demo_module->super.coll_alltoallw = mca_coll_demo_alltoallw_inter; demo_module->super.coll_barrier = mca_coll_demo_barrier_inter; demo_module->super.coll_bcast = mca_coll_demo_bcast_inter; demo_module->super.coll_exscan = NULL; demo_module->super.coll_gather = mca_coll_demo_gather_inter; demo_module->super.coll_gatherv = mca_coll_demo_gatherv_inter; demo_module->super.coll_reduce = mca_coll_demo_reduce_inter; demo_module->super.coll_reduce_scatter = mca_coll_demo_reduce_scatter_inter; demo_module->super.coll_scan = NULL; demo_module->super.coll_scatter = mca_coll_demo_scatter_inter; demo_module->super.coll_scatterv = mca_coll_demo_scatterv_inter; } return &(demo_module->super); } #define COPY(comm, module, func) \ do { \ module->underlying.coll_ ## func = comm->c_coll->coll_ ## func; \ module->underlying.coll_ ## func = comm->c_coll->coll_ ## func; \ if (NULL != module->underlying.coll_ ## func ## _module) { \ OBJ_RETAIN(module->underlying.coll_ ## func ## _module); \ } \ } while (0) int mca_coll_demo_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm) { mca_coll_demo_module_t *demo_module = (mca_coll_demo_module_t*) module; if (mca_coll_demo_verbose > 0) { printf("Hello! This is the \"demo\" coll component. I'll be your coll component\ntoday. Please tip your waitresses well.\n"); } /* save the old pointers */ COPY(comm, demo_module, allgather); COPY(comm, demo_module, allgatherv); COPY(comm, demo_module, allreduce); COPY(comm, demo_module, alltoall); COPY(comm, demo_module, alltoallv); COPY(comm, demo_module, alltoallw); COPY(comm, demo_module, barrier); COPY(comm, demo_module, bcast); COPY(comm, demo_module, exscan); COPY(comm, demo_module, gather); COPY(comm, demo_module, gatherv); COPY(comm, demo_module, reduce); COPY(comm, demo_module, reduce_scatter); COPY(comm, demo_module, scan); COPY(comm, demo_module, scatter); COPY(comm, demo_module, scatterv); return OMPI_SUCCESS; }
3aca4072799ddbd4170425b75d253e995e3741f7
e65a4dbfbfb0e54e59787ba7741efee12f7687f3
/finance/libstocks/files/patch-lib_http.c
994c6a391a48aa19d61a1bc47875a6783e887ab2
[ "BSD-2-Clause" ]
permissive
freebsd/freebsd-ports
86f2e89d43913412c4f6b2be3e255bc0945eac12
605a2983f245ac63f5420e023e7dce56898ad801
refs/heads/main
2023-08-30T21:46:28.720924
2023-08-30T19:33:44
2023-08-30T19:33:44
1,803,961
916
918
NOASSERTION
2023-09-08T04:06:26
2011-05-26T11:15:35
null
UTF-8
C
false
false
306
c
patch-lib_http.c
--- lib/http.c Tue Sep 5 10:42:34 2000 +++ lib/http.c Tue Jan 8 00:09:06 2002 @@ -21,5 +21,7 @@ #define __HTTP_C__ #ifdef __UNIX__ +#include <sys/types.h> + #include <sys/socket.h> #include <netinet/in.h> @@ -32,5 +34,4 @@ #endif -#include <sys/types.h> #include <ctype.h> #include <string.h>
12fbdeb79f8ca56f863693916e91b0fb58f7d87d
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
/SOFTWARE/A64-TERES/linux-a64/lib/decompress_inflate.c
d619b28c456fc282d7d4c0c24db0ada6922601f6
[ "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
OLIMEX/DIY-LAPTOP
ae82f4ee79c641d9aee444db9a75f3f6709afa92
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
refs/heads/rel3
2023-08-04T01:54:19.483792
2023-04-03T07:18:12
2023-04-03T07:18:12
80,094,055
507
92
Apache-2.0
2023-04-03T07:05:59
2017-01-26T07:25:50
C
UTF-8
C
false
false
3,831
c
decompress_inflate.c
#ifdef STATIC /* Pre-boot environment: included */ /* prevent inclusion of _LINUX_KERNEL_H in pre-boot environment: lots * errors about console_printk etc... on ARM */ #define _LINUX_KERNEL_H #include "zlib_inflate/inftrees.c" #include "zlib_inflate/inffast.c" #include "zlib_inflate/inflate.c" #else /* STATIC */ /* initramfs et al: linked */ #include <linux/zutil.h> #include "zlib_inflate/inftrees.h" #include "zlib_inflate/inffast.h" #include "zlib_inflate/inflate.h" #include "zlib_inflate/infutil.h" #endif /* STATIC */ #include <linux/decompress/mm.h> #define GZIP_IOBUF_SIZE (16*1024) static int INIT nofill(void *buffer, unsigned int len) { return -1; } /* Included from initramfs et al code */ STATIC int INIT gunzip(unsigned char *buf, int len, int(*fill)(void*, unsigned int), int(*flush)(void*, unsigned int), unsigned char *out_buf, int *pos, void(*error)(char *x)) { u8 *zbuf; struct z_stream_s *strm; int rc; size_t out_len; rc = -1; if (flush) { out_len = 0x8000; /* 32 K */ out_buf = malloc(out_len); } else { out_len = ((size_t)~0) - (size_t)out_buf; /* no limit */ } if (!out_buf) { error("Out of memory while allocating output buffer"); goto gunzip_nomem1; } if (buf) zbuf = buf; else { zbuf = malloc(GZIP_IOBUF_SIZE); len = 0; } if (!zbuf) { error("Out of memory while allocating input buffer"); goto gunzip_nomem2; } strm = malloc(sizeof(*strm)); if (strm == NULL) { error("Out of memory while allocating z_stream"); goto gunzip_nomem3; } strm->workspace = malloc(flush ? zlib_inflate_workspacesize() : sizeof(struct inflate_state)); if (strm->workspace == NULL) { error("Out of memory while allocating workspace"); goto gunzip_nomem4; } if (!fill) fill = nofill; if (len == 0) len = fill(zbuf, GZIP_IOBUF_SIZE); /* verify the gzip header */ if (len < 10 || zbuf[0] != 0x1f || zbuf[1] != 0x8b || zbuf[2] != 0x08) { if (pos) *pos = 0; error("Not a gzip file"); goto gunzip_5; } /* skip over gzip header (1f,8b,08... 10 bytes total + * possible asciz filename) */ strm->next_in = zbuf + 10; strm->avail_in = len - 10; /* skip over asciz filename */ if (zbuf[3] & 0x8) { do { /* * If the filename doesn't fit into the buffer, * the file is very probably corrupt. Don't try * to read more data. */ if (strm->avail_in == 0) { error("header error"); goto gunzip_5; } --strm->avail_in; } while (*strm->next_in++); } strm->next_out = out_buf; strm->avail_out = out_len; rc = zlib_inflateInit2(strm, -MAX_WBITS); if (!flush) { WS(strm)->inflate_state.wsize = 0; WS(strm)->inflate_state.window = NULL; } while (rc == Z_OK) { if (strm->avail_in == 0) { /* TODO: handle case where both pos and fill are set */ len = fill(zbuf, GZIP_IOBUF_SIZE); if (len < 0) { rc = -1; error("read error"); break; } strm->next_in = zbuf; strm->avail_in = len; } rc = zlib_inflate(strm, 0); /* Write any data generated */ if (flush && strm->next_out > out_buf) { int l = strm->next_out - out_buf; if (l != flush(out_buf, l)) { rc = -1; error("write error"); break; } strm->next_out = out_buf; strm->avail_out = out_len; } /* after Z_FINISH, only Z_STREAM_END is "we unpacked it all" */ if (rc == Z_STREAM_END) { rc = 0; break; } else if (rc != Z_OK) { error("uncompression error"); rc = -1; } } zlib_inflateEnd(strm); if (pos) /* add + 8 to skip over trailer */ *pos = strm->next_in - zbuf+8; gunzip_5: free(strm->workspace); gunzip_nomem4: free(strm); gunzip_nomem3: if (!buf) free(zbuf); gunzip_nomem2: if (flush) free(out_buf); gunzip_nomem1: return rc; /* returns Z_OK (0) if successful */ } #define decompress gunzip
963da1ef88be1c52fbf7b2c992fa76ff2b5492b0
f7dc806f341ef5dbb0e11252a4693003a66853d5
/thirdparty/mbedtls/library/pkwrite.c
88e685503bc7d8760a6f08c38f262eca40422f5b
[ "LicenseRef-scancode-free-unknown", "MIT", "CC-BY-4.0", "OFL-1.1", "Bison-exception-2.2", "CC0-1.0", "LicenseRef-scancode-nvidia-2002", "LicenseRef-scancode-other-permissive", "GPL-3.0-only", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unicode", "BSD-2-Clause", "FTL", "GPL-3.0-or-later", "Bitstream-Vera", "Zlib", "MPL-2.0", "MIT-Modern-Variant", "JSON", "Libpng" ]
permissive
godotengine/godot
8a2419750f4851d1426a8f3bcb52cac5c86f23c2
970be7afdc111ccc7459d7ef3560de70e6d08c80
refs/heads/master
2023-08-21T14:37:00.262883
2023-08-21T06:26:15
2023-08-21T06:26:15
15,634,981
68,852
18,388
MIT
2023-09-14T21:42:16
2014-01-04T16:05:36
C++
UTF-8
C
false
false
20,476
c
pkwrite.c
/* * Public Key layer for writing key files and structures * * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "common.h" #if defined(MBEDTLS_PK_WRITE_C) #include "mbedtls/pk.h" #include "mbedtls/asn1write.h" #include "mbedtls/oid.h" #include "mbedtls/platform_util.h" #include "mbedtls/error.h" #include <string.h> #if defined(MBEDTLS_RSA_C) #include "mbedtls/rsa.h" #endif #if defined(MBEDTLS_ECP_C) #include "mbedtls/bignum.h" #include "mbedtls/ecp.h" #include "mbedtls/platform_util.h" #endif #if defined(MBEDTLS_ECDSA_C) #include "mbedtls/ecdsa.h" #endif #if defined(MBEDTLS_PEM_WRITE_C) #include "mbedtls/pem.h" #endif #if defined(MBEDTLS_USE_PSA_CRYPTO) #include "psa/crypto.h" #include "mbedtls/psa_util.h" #endif #include "mbedtls/platform.h" /* Parameter validation macros based on platform_util.h */ #define PK_VALIDATE_RET(cond) \ MBEDTLS_INTERNAL_VALIDATE_RET(cond, MBEDTLS_ERR_PK_BAD_INPUT_DATA) #define PK_VALIDATE(cond) \ MBEDTLS_INTERNAL_VALIDATE(cond) #if defined(MBEDTLS_RSA_C) /* * RSAPublicKey ::= SEQUENCE { * modulus INTEGER, -- n * publicExponent INTEGER -- e * } */ static int pk_write_rsa_pubkey(unsigned char **p, unsigned char *start, mbedtls_rsa_context *rsa) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len = 0; mbedtls_mpi T; mbedtls_mpi_init(&T); /* Export E */ if ((ret = mbedtls_rsa_export(rsa, NULL, NULL, NULL, NULL, &T)) != 0 || (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { goto end_of_export; } len += ret; /* Export N */ if ((ret = mbedtls_rsa_export(rsa, &T, NULL, NULL, NULL, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { goto end_of_export; } len += ret; end_of_export: mbedtls_mpi_free(&T); if (ret < 0) { return ret; } MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(p, start, len)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(p, start, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)); return (int) len; } #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) /* * EC public key is an EC point */ static int pk_write_ec_pubkey(unsigned char **p, unsigned char *start, mbedtls_ecp_keypair *ec) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len = 0; unsigned char buf[MBEDTLS_ECP_MAX_PT_LEN]; if ((ret = mbedtls_ecp_point_write_binary(&ec->grp, &ec->Q, MBEDTLS_ECP_PF_UNCOMPRESSED, &len, buf, sizeof(buf))) != 0) { return ret; } if (*p < start || (size_t) (*p - start) < len) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *p -= len; memcpy(*p, buf, len); return (int) len; } /* * ECParameters ::= CHOICE { * namedCurve OBJECT IDENTIFIER * } */ static int pk_write_ec_param(unsigned char **p, unsigned char *start, mbedtls_ecp_keypair *ec) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len = 0; const char *oid; size_t oid_len; if ((ret = mbedtls_oid_get_oid_by_ec_grp(ec->grp.id, &oid, &oid_len)) != 0) { return ret; } MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_oid(p, start, oid, oid_len)); return (int) len; } /* * privateKey OCTET STRING -- always of length ceil(log2(n)/8) */ static int pk_write_ec_private(unsigned char **p, unsigned char *start, mbedtls_ecp_keypair *ec) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t byte_length = (ec->grp.pbits + 7) / 8; unsigned char tmp[MBEDTLS_ECP_MAX_BYTES]; ret = mbedtls_ecp_write_key(ec, tmp, byte_length); if (ret != 0) { goto exit; } ret = mbedtls_asn1_write_octet_string(p, start, tmp, byte_length); exit: mbedtls_platform_zeroize(tmp, byte_length); return ret; } #endif /* MBEDTLS_ECP_C */ int mbedtls_pk_write_pubkey(unsigned char **p, unsigned char *start, const mbedtls_pk_context *key) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len = 0; (void) p; (void) start; (void) key; (void) ret; PK_VALIDATE_RET(p != NULL); PK_VALIDATE_RET(*p != NULL); PK_VALIDATE_RET(start != NULL); PK_VALIDATE_RET(key != NULL); #if defined(MBEDTLS_RSA_C) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_RSA) { MBEDTLS_ASN1_CHK_ADD(len, pk_write_rsa_pubkey(p, start, mbedtls_pk_rsa(*key))); } else #endif #if defined(MBEDTLS_ECP_C) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_ECKEY) { MBEDTLS_ASN1_CHK_ADD(len, pk_write_ec_pubkey(p, start, mbedtls_pk_ec(*key))); } else #endif #if defined(MBEDTLS_USE_PSA_CRYPTO) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_OPAQUE) { size_t buffer_size; psa_key_id_t *key_id = (psa_key_id_t *) key->pk_ctx; if (*p < start) { return MBEDTLS_ERR_PK_BAD_INPUT_DATA; } buffer_size = (size_t) (*p - start); if (psa_export_public_key(*key_id, start, buffer_size, &len) != PSA_SUCCESS) { return MBEDTLS_ERR_PK_BAD_INPUT_DATA; } else { *p -= len; memmove(*p, start, len); } } else #endif /* MBEDTLS_USE_PSA_CRYPTO */ return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE; return (int) len; } int mbedtls_pk_write_pubkey_der(mbedtls_pk_context *key, unsigned char *buf, size_t size) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char *c; size_t len = 0, par_len = 0, oid_len; mbedtls_pk_type_t pk_type; const char *oid; PK_VALIDATE_RET(key != NULL); if (size == 0) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } PK_VALIDATE_RET(buf != NULL); c = buf + size; MBEDTLS_ASN1_CHK_ADD(len, mbedtls_pk_write_pubkey(&c, buf, key)); if (c - buf < 1) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } /* * SubjectPublicKeyInfo ::= SEQUENCE { * algorithm AlgorithmIdentifier, * subjectPublicKey BIT STRING } */ *--c = 0; len += 1; MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_BIT_STRING)); pk_type = mbedtls_pk_get_type(key); #if defined(MBEDTLS_ECP_C) if (pk_type == MBEDTLS_PK_ECKEY) { MBEDTLS_ASN1_CHK_ADD(par_len, pk_write_ec_param(&c, buf, mbedtls_pk_ec(*key))); } #endif #if defined(MBEDTLS_USE_PSA_CRYPTO) if (pk_type == MBEDTLS_PK_OPAQUE) { psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; psa_key_type_t key_type; psa_key_id_t key_id; psa_ecc_family_t curve; size_t bits; key_id = *((psa_key_id_t *) key->pk_ctx); if (PSA_SUCCESS != psa_get_key_attributes(key_id, &attributes)) { return MBEDTLS_ERR_PK_HW_ACCEL_FAILED; } key_type = psa_get_key_type(&attributes); bits = psa_get_key_bits(&attributes); psa_reset_key_attributes(&attributes); curve = PSA_KEY_TYPE_ECC_GET_FAMILY(key_type); if (curve == 0) { return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE; } ret = mbedtls_psa_get_ecc_oid_from_id(curve, bits, &oid, &oid_len); if (ret != 0) { return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE; } /* Write EC algorithm parameters; that's akin * to pk_write_ec_param() above. */ MBEDTLS_ASN1_CHK_ADD(par_len, mbedtls_asn1_write_oid(&c, buf, oid, oid_len)); /* The rest of the function works as for legacy EC contexts. */ pk_type = MBEDTLS_PK_ECKEY; } #endif /* MBEDTLS_USE_PSA_CRYPTO */ if ((ret = mbedtls_oid_get_oid_by_pk_alg(pk_type, &oid, &oid_len)) != 0) { return ret; } MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_algorithm_identifier(&c, buf, oid, oid_len, par_len)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)); return (int) len; } int mbedtls_pk_write_key_der(mbedtls_pk_context *key, unsigned char *buf, size_t size) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char *c; size_t len = 0; (void) ret; (void) c; (void) key; PK_VALIDATE_RET(key != NULL); if (size == 0) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } PK_VALIDATE_RET(buf != NULL); c = buf + size; #if defined(MBEDTLS_RSA_C) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_RSA) { mbedtls_mpi T; /* Temporary holding the exported parameters */ mbedtls_rsa_context *rsa = mbedtls_pk_rsa(*key); /* * Export the parameters one after another to avoid simultaneous copies. */ mbedtls_mpi_init(&T); /* Export QP */ if ((ret = mbedtls_rsa_export_crt(rsa, NULL, NULL, &T)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export DQ */ if ((ret = mbedtls_rsa_export_crt(rsa, NULL, &T, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export DP */ if ((ret = mbedtls_rsa_export_crt(rsa, &T, NULL, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export Q */ if ((ret = mbedtls_rsa_export(rsa, NULL, NULL, &T, NULL, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export P */ if ((ret = mbedtls_rsa_export(rsa, NULL, &T, NULL, NULL, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export D */ if ((ret = mbedtls_rsa_export(rsa, NULL, NULL, NULL, &T, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export E */ if ((ret = mbedtls_rsa_export(rsa, NULL, NULL, NULL, NULL, &T)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; /* Export N */ if ((ret = mbedtls_rsa_export(rsa, &T, NULL, NULL, NULL, NULL)) != 0 || (ret = mbedtls_asn1_write_mpi(&c, buf, &T)) < 0) { goto end_of_export; } len += ret; end_of_export: mbedtls_mpi_free(&T); if (ret < 0) { return ret; } MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_int(&c, buf, 0)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)); } else #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_ECKEY) { mbedtls_ecp_keypair *ec = mbedtls_pk_ec(*key); size_t pub_len = 0, par_len = 0; /* * RFC 5915, or SEC1 Appendix C.4 * * ECPrivateKey ::= SEQUENCE { * version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), * privateKey OCTET STRING, * parameters [0] ECParameters {{ NamedCurve }} OPTIONAL, * publicKey [1] BIT STRING OPTIONAL * } */ /* publicKey */ MBEDTLS_ASN1_CHK_ADD(pub_len, pk_write_ec_pubkey(&c, buf, ec)); if (c - buf < 1) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *--c = 0; pub_len += 1; MBEDTLS_ASN1_CHK_ADD(pub_len, mbedtls_asn1_write_len(&c, buf, pub_len)); MBEDTLS_ASN1_CHK_ADD(pub_len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_BIT_STRING)); MBEDTLS_ASN1_CHK_ADD(pub_len, mbedtls_asn1_write_len(&c, buf, pub_len)); MBEDTLS_ASN1_CHK_ADD(pub_len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 1)); len += pub_len; /* parameters */ MBEDTLS_ASN1_CHK_ADD(par_len, pk_write_ec_param(&c, buf, ec)); MBEDTLS_ASN1_CHK_ADD(par_len, mbedtls_asn1_write_len(&c, buf, par_len)); MBEDTLS_ASN1_CHK_ADD(par_len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0)); len += par_len; /* privateKey */ MBEDTLS_ASN1_CHK_ADD(len, pk_write_ec_private(&c, buf, ec)); /* version */ MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_int(&c, buf, 1)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)); } else #endif /* MBEDTLS_ECP_C */ return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE; return (int) len; } #if defined(MBEDTLS_PEM_WRITE_C) #define PEM_BEGIN_PUBLIC_KEY "-----BEGIN PUBLIC KEY-----\n" #define PEM_END_PUBLIC_KEY "-----END PUBLIC KEY-----\n" #define PEM_BEGIN_PRIVATE_KEY_RSA "-----BEGIN RSA PRIVATE KEY-----\n" #define PEM_END_PRIVATE_KEY_RSA "-----END RSA PRIVATE KEY-----\n" #define PEM_BEGIN_PRIVATE_KEY_EC "-----BEGIN EC PRIVATE KEY-----\n" #define PEM_END_PRIVATE_KEY_EC "-----END EC PRIVATE KEY-----\n" /* * Max sizes of key per types. Shown as tag + len (+ content). */ #if defined(MBEDTLS_RSA_C) /* * RSA public keys: * SubjectPublicKeyInfo ::= SEQUENCE { 1 + 3 * algorithm AlgorithmIdentifier, 1 + 1 (sequence) * + 1 + 1 + 9 (rsa oid) * + 1 + 1 (params null) * subjectPublicKey BIT STRING } 1 + 3 + (1 + below) * RSAPublicKey ::= SEQUENCE { 1 + 3 * modulus INTEGER, -- n 1 + 3 + MPI_MAX + 1 * publicExponent INTEGER -- e 1 + 3 + MPI_MAX + 1 * } */ #define RSA_PUB_DER_MAX_BYTES (38 + 2 * MBEDTLS_MPI_MAX_SIZE) /* * RSA private keys: * RSAPrivateKey ::= SEQUENCE { 1 + 3 * version Version, 1 + 1 + 1 * modulus INTEGER, 1 + 3 + MPI_MAX + 1 * publicExponent INTEGER, 1 + 3 + MPI_MAX + 1 * privateExponent INTEGER, 1 + 3 + MPI_MAX + 1 * prime1 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 * prime2 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 * exponent1 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 * exponent2 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 * coefficient INTEGER, 1 + 3 + MPI_MAX / 2 + 1 * otherPrimeInfos OtherPrimeInfos OPTIONAL 0 (not supported) * } */ #define MPI_MAX_SIZE_2 (MBEDTLS_MPI_MAX_SIZE / 2 + \ MBEDTLS_MPI_MAX_SIZE % 2) #define RSA_PRV_DER_MAX_BYTES (47 + 3 * MBEDTLS_MPI_MAX_SIZE \ + 5 * MPI_MAX_SIZE_2) #else /* MBEDTLS_RSA_C */ #define RSA_PUB_DER_MAX_BYTES 0 #define RSA_PRV_DER_MAX_BYTES 0 #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) /* * EC public keys: * SubjectPublicKeyInfo ::= SEQUENCE { 1 + 2 * algorithm AlgorithmIdentifier, 1 + 1 (sequence) * + 1 + 1 + 7 (ec oid) * + 1 + 1 + 9 (namedCurve oid) * subjectPublicKey BIT STRING 1 + 2 + 1 [1] * + 1 (point format) [1] * + 2 * ECP_MAX (coords) [1] * } */ #define ECP_PUB_DER_MAX_BYTES (30 + 2 * MBEDTLS_ECP_MAX_BYTES) /* * EC private keys: * ECPrivateKey ::= SEQUENCE { 1 + 2 * version INTEGER , 1 + 1 + 1 * privateKey OCTET STRING, 1 + 1 + ECP_MAX * parameters [0] ECParameters OPTIONAL, 1 + 1 + (1 + 1 + 9) * publicKey [1] BIT STRING OPTIONAL 1 + 2 + [1] above * } */ #define ECP_PRV_DER_MAX_BYTES (29 + 3 * MBEDTLS_ECP_MAX_BYTES) #else /* MBEDTLS_ECP_C */ #define ECP_PUB_DER_MAX_BYTES 0 #define ECP_PRV_DER_MAX_BYTES 0 #endif /* MBEDTLS_ECP_C */ #define PUB_DER_MAX_BYTES (RSA_PUB_DER_MAX_BYTES > ECP_PUB_DER_MAX_BYTES ? \ RSA_PUB_DER_MAX_BYTES : ECP_PUB_DER_MAX_BYTES) #define PRV_DER_MAX_BYTES (RSA_PRV_DER_MAX_BYTES > ECP_PRV_DER_MAX_BYTES ? \ RSA_PRV_DER_MAX_BYTES : ECP_PRV_DER_MAX_BYTES) int mbedtls_pk_write_pubkey_pem(mbedtls_pk_context *key, unsigned char *buf, size_t size) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char output_buf[PUB_DER_MAX_BYTES]; size_t olen = 0; PK_VALIDATE_RET(key != NULL); PK_VALIDATE_RET(buf != NULL || size == 0); if ((ret = mbedtls_pk_write_pubkey_der(key, output_buf, sizeof(output_buf))) < 0) { return ret; } if ((ret = mbedtls_pem_write_buffer(PEM_BEGIN_PUBLIC_KEY, PEM_END_PUBLIC_KEY, output_buf + sizeof(output_buf) - ret, ret, buf, size, &olen)) != 0) { return ret; } return 0; } int mbedtls_pk_write_key_pem(mbedtls_pk_context *key, unsigned char *buf, size_t size) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char output_buf[PRV_DER_MAX_BYTES]; const char *begin, *end; size_t olen = 0; PK_VALIDATE_RET(key != NULL); PK_VALIDATE_RET(buf != NULL || size == 0); if ((ret = mbedtls_pk_write_key_der(key, output_buf, sizeof(output_buf))) < 0) { return ret; } #if defined(MBEDTLS_RSA_C) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_RSA) { begin = PEM_BEGIN_PRIVATE_KEY_RSA; end = PEM_END_PRIVATE_KEY_RSA; } else #endif #if defined(MBEDTLS_ECP_C) if (mbedtls_pk_get_type(key) == MBEDTLS_PK_ECKEY) { begin = PEM_BEGIN_PRIVATE_KEY_EC; end = PEM_END_PRIVATE_KEY_EC; } else #endif return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE; if ((ret = mbedtls_pem_write_buffer(begin, end, output_buf + sizeof(output_buf) - ret, ret, buf, size, &olen)) != 0) { return ret; } return 0; } #endif /* MBEDTLS_PEM_WRITE_C */ #endif /* MBEDTLS_PK_WRITE_C */
900b8a9725fbd356c40a30c8ed240b518233e4e5
ea8fc70c7dbf49059431fa45a940742736c68fb8
/ext/annotations/reader.c
6bd20aab894b1d91e996558f40066de46519a337
[ "BSD-3-Clause" ]
permissive
dreamsxin/cphalcon7
1bd2194a251657b48857326927db69fef617ab91
1b8c6b04b4ca237a5ead87d4752df0d2e85c7a9d
refs/heads/master
2023-03-08T04:53:08.829432
2022-07-07T07:48:59
2022-07-07T07:48:59
47,245,335
298
73
null
2021-06-22T11:53:25
2015-12-02T07:44:43
C
UTF-8
C
false
false
6,613
c
reader.c
/* +------------------------------------------------------------------------+ | Phalcon Framework | +------------------------------------------------------------------------+ | Copyright (c) 2011-2014 Phalcon Team (http://www.phalconphp.com) | +------------------------------------------------------------------------+ | This source file is subject to the New BSD License that is bundled | | with this package in the file docs/LICENSE.txt. | | | | If you did not receive a copy of the license and are unable to | | obtain it through the world-wide-web, please send an email | | to license@phalconphp.com so we can send you a copy immediately. | +------------------------------------------------------------------------+ | Authors: Andres Gutierrez <andres@phalconphp.com> | | Eduar Carvajal <eduar@phalconphp.com> | +------------------------------------------------------------------------+ */ #include "annotations/reader.h" #include "annotations/readerinterface.h" #include "annotations/annot.h" #include "annotations/exception.h" #include "annotations/scanner.h" #include "kernel/main.h" #include "kernel/memory.h" #include "kernel/exception.h" #include "kernel/object.h" #include "kernel/fcall.h" #include "kernel/array.h" #include "kernel/file.h" #include "kernel/reflection.h" /** * Phalcon\Annotations\Reader * * Parses docblocks returning an array with the found annotations */ zend_class_entry *phalcon_annotations_reader_ce; PHP_METHOD(Phalcon_Annotations_Reader, parse); PHP_METHOD(Phalcon_Annotations_Reader, parseDocBlock); static const zend_function_entry phalcon_annotations_reader_method_entry[] = { PHP_ME(Phalcon_Annotations_Reader, parse, arginfo_phalcon_annotations_readerinterface_parse, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Annotations_Reader, parseDocBlock, arginfo_phalcon_annotations_readerinterface_parsedocblock, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_FE_END }; /** * Phalcon\Annotations\Reader initializer */ PHALCON_INIT_CLASS(Phalcon_Annotations_Reader){ PHALCON_REGISTER_CLASS(Phalcon\\Annotations, Reader, annotations_reader, phalcon_annotations_reader_method_entry, 0); zend_class_implements(phalcon_annotations_reader_ce, 1, phalcon_annotations_readerinterface_ce); return SUCCESS; } /** * Reads annotations from the class dockblocks, its methods and/or properties * * @param string $className * @return array */ PHP_METHOD(Phalcon_Annotations_Reader, parse){ zval *class_name, class_annotations = {}, annotations_properties = {}, annotations_methods = {}; zend_property_info *property; zend_class_entry *class_ce; zend_function *method; zend_string *cmt; HashTable *props, *methods; const char *file; uint32_t line; phalcon_fetch_params(1, 1, 0, &class_name); if (unlikely(Z_TYPE_P(class_name) != IS_STRING)) { PHALCON_MM_THROW_EXCEPTION_STR(phalcon_annotations_exception_ce, "The class name must be a string"); return; } class_ce = zend_fetch_class(Z_STR_P(class_name), ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT); if (!class_ce) { PHALCON_MM_THROW_EXCEPTION_FORMAT(phalcon_annotations_exception_ce, "Class %s does not exist", Z_STRVAL_P(class_name)); return; } array_init(return_value); if (class_ce->type != ZEND_USER_CLASS) { RETURN_MM(); } file = ZSTR_VAL(phalcon_get_class_filename(class_ce)); if (!file) { file = "(unknown)"; } /* Class info */ if ((cmt = phalcon_get_class_doc_comment(class_ce)) != NULL) { line = phalcon_get_class_startline(class_ce); RETURN_MM_ON_FAILURE(phannot_parse_annotations(&class_annotations, cmt, file, line)); PHALCON_MM_ADD_ENTRY(&class_annotations); if (Z_TYPE(class_annotations) == IS_ARRAY) { phalcon_array_update_str(return_value, SL("class"), &class_annotations, PH_COPY); } } /* Get class properties */ props = &class_ce->properties_info; if (zend_hash_num_elements(props) > 0) { array_init_size(&annotations_properties, zend_hash_num_elements(props)); PHALCON_MM_ADD_ENTRY(&annotations_properties); ZEND_HASH_FOREACH_PTR(props, property) { zval property_annotations = {}; zend_string *cmt; const char *prop_name, *class_name; if ((cmt = phalcon_get_property_doc_comment(property)) != NULL) { if (FAILURE == phannot_parse_annotations(&property_annotations, cmt, file, 0)) { return; } PHALCON_MM_ADD_ENTRY(&property_annotations); if (Z_TYPE(property_annotations) == IS_ARRAY) { if (zend_unmangle_property_name(property->name, &class_name, &prop_name) == SUCCESS) { phalcon_array_update_str(&annotations_properties, prop_name, strlen(prop_name), &property_annotations, PH_COPY); continue; } } } } ZEND_HASH_FOREACH_END(); if (zend_hash_num_elements(Z_ARRVAL(annotations_properties))) { phalcon_array_update_str(return_value, SL("properties"), &annotations_properties, PH_COPY); } } /* Get class methods */ methods = &class_ce->function_table; if (zend_hash_num_elements(methods) > 0) { array_init_size(&annotations_methods, zend_hash_num_elements(methods)); PHALCON_MM_ADD_ENTRY(&annotations_methods); ZEND_HASH_FOREACH_PTR(methods, method) { zval method_annotations = {}; zend_string *cmt; if ((cmt = phalcon_get_function_doc_comment(method)) != NULL) { line = phalcon_get_function_startline(method); if (FAILURE == phannot_parse_annotations(&method_annotations, cmt, file, line)) { return; } PHALCON_MM_ADD_ENTRY(&method_annotations); if (Z_TYPE(method_annotations) == IS_ARRAY) { phalcon_array_update_string(&annotations_methods, method->common.function_name, &method_annotations, PH_COPY); } } } ZEND_HASH_FOREACH_END(); if (zend_hash_num_elements(Z_ARRVAL(annotations_methods))) { phalcon_array_update_str(return_value, SL("methods"), &annotations_methods, PH_COPY); } } RETURN_MM(); } /** * Parses a raw doc block returning the annotations found * * @param string $docBlock * @param string $file * @param int $line * @return array */ PHP_METHOD(Phalcon_Annotations_Reader, parseDocBlock) { zval *doc_block, *file = NULL, *line = NULL; phalcon_fetch_params(0, 3, 0, &doc_block, &file, &line); PHALCON_ENSURE_IS_STRING(doc_block); PHALCON_ENSURE_IS_STRING(file); PHALCON_ENSURE_IS_LONG(line); RETURN_ON_FAILURE(phannot_parse_annotations(return_value, Z_STR_P(doc_block), Z_STRVAL_P(file), Z_LVAL_P(line))); }
a156839bcc32d5e23ed0bf7c15967fb75dc857d3
f7f043523dcacb348f7a387430ae5b7b2932b56a
/vendor/github.com/coreswitch/openconfigd/cli/lib/sh/rename.c
e410b5e8d64b3b09925ba71f3437e21b1b9885ad
[ "Apache-2.0", "FSFAP", "GPL-3.0-or-later", "GPL-3.0-only", "LGPL-2.0-or-later" ]
permissive
coreswitch/zebra
2f3dcbb0f1aa0350fe63d664e5533d6895030e85
1931dde592c81398707a07d90d00f90321dc9b46
refs/heads/master
2021-12-15T02:26:03.510038
2019-05-19T12:00:34
2019-05-19T12:00:34
107,520,729
105
22
Apache-2.0
2019-05-17T01:23:34
2017-10-19T08:42:40
Go
UTF-8
C
false
false
1,599
c
rename.c
/* * rename - rename a file */ /* Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #if !defined (HAVE_RENAME) #include <bashtypes.h> #include <posixstat.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif #include <errno.h> #include <stdc.h> #ifndef errno extern int errno; #endif int rename (from, to) const char *from, *to; { struct stat fb, tb; if (stat (from, &fb) < 0) return -1; if (stat (to, &tb) < 0) { if (errno != ENOENT) return -1; } else { if (fb.st_dev == tb.st_dev && fb.st_ino == tb.st_ino) return 0; /* same file */ if (unlink (to) < 0 && errno != ENOENT) return -1; } if (link (from, to) < 0) return (-1); if (unlink (from) < 0 && errno != ENOENT) { int e = errno; unlink (to); errno = e; return (-1); } return (0); } #endif /* !HAVE_RENAME */
2ae08750d93d30771cd9e6cee9d7d6145bf20ed0
5ff4b6986e6799bc0e143e060bafc14369030d8b
/toolchain/riscv-isa-sim/riscv/insns/vmulhu_vx.h
672ad32df2e8d65110420514313d74a83f792269
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "GPL-1.0-or-later", "LLVM-exception", "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-bsd-3-clause-jtag", "GPL-3.0-or-later" ]
permissive
pulp-platform/mempool
7583204b2436cfc12ed95599463e51ad4df51557
c98fb3ada4f255623eaf9b09861f397a60c3d96b
refs/heads/main
2023-08-08T09:07:56.696580
2023-07-27T17:24:38
2023-07-27T17:24:38
223,218,149
178
28
Apache-2.0
2023-07-27T17:24:39
2019-11-21T16:34:37
C
UTF-8
C
false
false
79
h
vmulhu_vx.h
// vmulhu vd ,vs2, rs1 VI_VX_ULOOP ({ vd = ((uint128_t)vs2 * rs1) >> sew; })
58d3a734c866d39093f45f1348a64e93c26382f2
bbed308c9ee9b2123b691592419db011a35b9e5e
/src/otfcc/table/fvar.c
fbba03cd92f43d543bd2bc3f12278469286efdb6
[ "MIT" ]
permissive
nowar-fonts/Warcraft-Font-Merger
f42cec645c29ec8736a4f66ca04c0aa416c6ca6b
7462fbab32afeb7bb94506aa88d899240d6066e9
refs/heads/master
2023-07-07T05:23:17.852003
2023-07-02T04:48:29
2023-07-02T04:48:29
161,875,032
455
38
MIT
2023-07-02T04:48:30
2018-12-15T05:58:34
C
UTF-8
C
false
false
11,370
c
fvar.c
#include "fvar.h" #include "support/util.h" // fvar instance tuple // fvar instance static INLINE void initFvarInstance(fvar_Instance *inst) { memset(inst, 0, sizeof(*inst)); iVV.init(&inst->coordinates); } static INLINE void disposeFvarInstance(fvar_Instance *inst) { iVV.dispose(&inst->coordinates); } caryll_standardType(fvar_Instance, fvar_iInstance, initFvarInstance, disposeFvarInstance); caryll_standardVectorImpl(fvar_InstanceList, fvar_Instance, fvar_iInstance, fvar_iInstanceList); // table fvar static INLINE void disposeFvarMaster(fvar_Master *m) { sdsfree(m->name); vq_deleteRegion(m->region); } static INLINE void initFvar(table_fvar *fvar) { memset(fvar, 0, sizeof(*fvar)); vf_iAxes.init(&fvar->axes); fvar_iInstanceList.init(&fvar->instances); } static INLINE void disposeFvar(table_fvar *fvar) { vf_iAxes.dispose(&fvar->axes); fvar_iInstanceList.dispose(&fvar->instances); fvar_Master *current, *tmp; HASH_ITER(hh, fvar->masters, current, tmp) { HASH_DEL(fvar->masters, current); disposeFvarMaster(current); FREE(current); } } static const vq_Region *fvar_registerRegion(table_fvar *fvar, MOVE vq_Region *region) { fvar_Master *m = NULL; HASH_FIND(hh, fvar->masters, region, VQ_REGION_SIZE(region->dimensions), m); if (m) { vq_deleteRegion(region); return m->region; } else { NEW_CLEAN_1(m); sds sMasterID = sdsfromlonglong(1 + HASH_CNT(hh, fvar->masters)); m->name = sdscatsds(sdsnew("m"), sMasterID); sdsfree(sMasterID); m->region = region; HASH_ADD_KEYPTR(hh, fvar->masters, m->region, VQ_REGION_SIZE(region->dimensions), m); return m->region; } } static const fvar_Master *fvar_findMasterByRegion(const table_fvar *fvar, const vq_Region *region) { fvar_Master *m = NULL; HASH_FIND(hh, fvar->masters, region, VQ_REGION_SIZE(region->dimensions), m); return m; } caryll_standardRefTypeFn(table_fvar, initFvar, disposeFvar); caryll_ElementInterfaceOf(table_fvar) table_iFvar = {caryll_standardRefTypeMethods(table_fvar), .registerRegion = fvar_registerRegion, .findMasterByRegion = fvar_findMasterByRegion}; // Local typedefs for parsing axis record #pragma pack(1) struct FVARHeader { uint16_t majorVersion; uint16_t minorVersion; uint16_t axesArrayOffset; uint16_t reserved1; uint16_t axisCount; uint16_t axisSize; uint16_t instanceCount; uint16_t instanceSize; }; struct VariationAxisRecord { uint32_t axisTag; f16dot16 minValue; f16dot16 defaultValue; f16dot16 maxValue; uint16_t flags; uint16_t axisNameID; }; struct InstanceRecord { uint16_t subfamilyNameID; uint16_t flags; f16dot16 coordinates[]; }; #pragma pack() table_fvar *otfcc_readFvar(const otfcc_Packet packet, const otfcc_Options *options) { table_fvar *fvar = NULL; FOR_TABLE('fvar', table) { font_file_pointer data = table.data; if (table.length < sizeof(struct FVARHeader)) goto FAIL; struct FVARHeader *header = (struct FVARHeader *)data; if (be16(header->majorVersion) != 1) goto FAIL; if (be16(header->minorVersion) != 0) goto FAIL; if (be16(header->axesArrayOffset) == 0) goto FAIL; if (be16(header->axisCount) == 0) goto FAIL; if (be16(header->axisSize) != sizeof(struct VariationAxisRecord)) goto FAIL; uint16_t nAxes = be16(header->axisCount); uint16_t instanceSizeWithoutPSNID = 4 + nAxes * sizeof(f16dot16); uint16_t instanceSizeWithPSNID = 2 + instanceSizeWithoutPSNID; if (be16(header->instanceSize) != instanceSizeWithoutPSNID && be16(header->instanceSize) != instanceSizeWithPSNID) goto FAIL; if (table.length < be16(header->axesArrayOffset) + sizeof(struct VariationAxisRecord) * nAxes + be16(header->instanceSize) * be16(header->instanceCount)) goto FAIL; fvar = table_iFvar.create(); // parse axes struct VariationAxisRecord *axisRecord = (struct VariationAxisRecord *)(data + be16(header->axesArrayOffset)); for (uint16_t j = 0; j < nAxes; j++) { vf_Axis axis = {.tag = be32(axisRecord->axisTag), .minValue = otfcc_from_fixed(be32(axisRecord->minValue)), .defaultValue = otfcc_from_fixed(be32(axisRecord->defaultValue)), .maxValue = otfcc_from_fixed(be32(axisRecord->maxValue)), .flags = be16(axisRecord->flags), .axisNameID = be16(axisRecord->axisNameID)}; vf_iAxes.push(&fvar->axes, axis); axisRecord++; } // parse instances uint16_t nInstances = be16(header->instanceCount); bool hasPostscriptNameID = be16(header->instanceSize) == instanceSizeWithPSNID; struct InstanceRecord *instance = (struct InstanceRecord *)axisRecord; for (uint16_t j = 0; j < nInstances; j++) { fvar_Instance inst; fvar_iInstance.init(&inst); inst.subfamilyNameID = be16(instance->subfamilyNameID); inst.flags = be16(instance->flags); for (uint16_t k = 0; k < nAxes; k++) { iVV.push(&inst.coordinates, otfcc_from_fixed(be32(instance->coordinates[k]))); } iVV.shrinkToFit(&inst.coordinates); if (hasPostscriptNameID) { inst.postScriptNameID = be16(*(uint16_t *)(((font_file_pointer)instance) + instanceSizeWithoutPSNID)); } fvar_iInstanceList.push(&fvar->instances, inst); instance = (struct InstanceRecord *)(((font_file_pointer)instance) + be16(header->instanceSize)); } vf_iAxes.shrinkToFit(&fvar->axes); fvar_iInstanceList.shrinkToFit(&fvar->instances); return fvar; FAIL: logWarning("table 'fvar' corrupted.\n"); table_iFvar.free(fvar); fvar = NULL; } return NULL; } void otfcc_dumpFvar(const table_fvar *table, json_value *root, const otfcc_Options *options) { if (!table) return; loggedStep("fvar") { json_value *t = json_object_new(2); // dump axes json_value *_axes = json_object_new(table->axes.length); foreach (vf_Axis *axis, table->axes) { json_value *_axis = json_object_new(5); json_object_push(_axis, "minValue", json_double_new(axis->minValue)); json_object_push(_axis, "defaultValue", json_double_new(axis->defaultValue)); json_object_push(_axis, "maxValue", json_double_new(axis->maxValue)); json_object_push(_axis, "flags", json_integer_new(axis->flags)); json_object_push(_axis, "axisNameID", json_integer_new(axis->axisNameID)); json_object_push_tag(_axes, axis->tag, _axis); } json_object_push(t, "axes", _axes); // dump instances json_value *_instances = json_array_new(table->instances.length); foreach (fvar_Instance *instance, table->instances) { json_value *_instance = json_object_new(4); json_object_push(_instance, "subfamilyNameID", json_integer_new(instance->subfamilyNameID)); if (instance->postScriptNameID) { json_object_push(_instance, "postScriptNameID", json_integer_new(instance->postScriptNameID)); } json_object_push(_instance, "flags", json_integer_new(instance->flags)); json_object_push(_instance, "coordinates", json_new_VVp(&instance->coordinates, table)); json_array_push(_instances, _instance); } json_object_push(t, "instances", _instances); // dump masters json_value *_masters = json_object_new(HASH_COUNT(table->masters)); fvar_Master *current, *tmp; HASH_ITER(hh, table->masters, current, tmp) { json_object_push(_masters, current->name, preserialize(json_new_VQRegion_Explicit(current->region, table))); } json_object_push(t, "masters", _masters); json_object_push(root, "fvar", t); } } // JSON conversion functions // dump json_value *json_new_VQSegment(const vq_Segment *s, const table_fvar *fvar) { switch (s->type) { case VQ_STILL:; return json_new_position(s->val.still); case VQ_DELTA:; json_value *d = json_object_new(3); json_object_push(d, "delta", json_new_position(s->val.delta.quantity)); if (!s->val.delta.touched) { json_object_push(d, "implicit", json_boolean_new(!s->val.delta.touched)); } json_object_push(d, "on", json_new_VQRegion(s->val.delta.region, fvar)); return d; default:; return json_integer_new(0); } } json_value *json_new_VQ(const VQ z, const table_fvar *fvar) { if (!z.shift.length) { return preserialize(json_new_position(iVQ.getStill(z))); } else { json_value *a = json_array_new(z.shift.length + 1); json_array_push(a, json_new_position(z.kernel)); for (size_t j = 0; j < z.shift.length; j++) { json_array_push(a, json_new_VQSegment(&z.shift.items[j], fvar)); } return preserialize(a); } } json_value *json_new_VV(const VV x, const table_fvar *fvar) { const vf_Axes *axes = &fvar->axes; if (axes && axes->length == x.length) { json_value *_coord = json_object_new(axes->length); for (size_t m = 0; m < x.length; m++) { vf_Axis *axis = &axes->items[m]; char tag[4] = {(axis->tag & 0xff000000) >> 24, (axis->tag & 0xff0000) >> 16, (axis->tag & 0xff00) >> 8, (axis->tag & 0xff)}; json_object_push_length(_coord, 4, tag, json_new_position(x.items[m])); } return preserialize(_coord); } else { json_value *_coord = json_array_new(x.length); for (size_t m = 0; m < x.length; m++) { json_array_push(_coord, json_new_position(x.items[m])); } return preserialize(_coord); } } json_value *json_new_VVp(const VV *x, const table_fvar *fvar) { const vf_Axes *axes = &fvar->axes; if (axes && axes->length == x->length) { json_value *_coord = json_object_new(axes->length); for (size_t m = 0; m < x->length; m++) { vf_Axis *axis = &axes->items[m]; char tag[4] = {(axis->tag & 0xff000000) >> 24, (axis->tag & 0xff0000) >> 16, (axis->tag & 0xff00) >> 8, (axis->tag & 0xff)}; json_object_push_length(_coord, 4, tag, json_new_position(x->items[m])); } return preserialize(_coord); } else { json_value *_coord = json_array_new(x->length); for (size_t m = 0; m < x->length; m++) { json_array_push(_coord, json_new_position(x->items[m])); } return preserialize(_coord); } } // parse VQ json_vqOf(const json_value *cv, const table_fvar *fvar) { return iVQ.createStill(json_numof(cv)); } json_value *json_new_VQAxisSpan(const vq_AxisSpan *s) { if (vq_AxisSpanIsOne(s)) { return json_string_new("*"); } else { json_value *a = json_object_new(3); json_object_push(a, "start", json_new_position(s->start)); json_object_push(a, "peak", json_new_position(s->peak)); json_object_push(a, "end", json_new_position(s->end)); return a; } } json_value *json_new_VQRegion_Explicit(const vq_Region *rs, const table_fvar *fvar) { const vf_Axes *axes = &fvar->axes; if (axes && axes->length == rs->dimensions) { json_value *r = json_object_new(rs->dimensions); for (size_t j = 0; j < rs->dimensions; j++) { json_object_push_tag(r, axes->items[j].tag, json_new_VQAxisSpan(&rs->spans[j])); } return r; } else { json_value *r = json_array_new(rs->dimensions); for (size_t j = 0; j < rs->dimensions; j++) { json_array_push(r, json_new_VQAxisSpan(&rs->spans[j])); } return r; } } json_value *json_new_VQRegion(const vq_Region *rs, const table_fvar *fvar) { const fvar_Master *m = table_iFvar.findMasterByRegion(fvar, rs); if (m && m->name) { return json_string_new_length((unsigned int)sdslen(m->name), m->name); } else { return json_new_VQRegion_Explicit(rs, fvar); } }
e763043eed9615e2d45fe902a867103f98997db8
d9ea45dbc964799991b9191ae620d2f150652a3d
/Backends/Graphics5/WebGPU/Sources/kinc/backend/graphics5/texture.h
d835069cd78af300fb7986a602c0d2fc3e9cdf3b
[ "Zlib" ]
permissive
Kode/Kinc
6ebb1cfa11c6e9ed0e153c486f573f1d7dca5664
d90b7478b192c8270e0ee32c0c3ee18977becd7a
refs/heads/main
2023-08-08T16:50:01.534587
2023-08-07T20:22:46
2023-08-07T20:22:46
10,254,751
283
249
Zlib
2023-08-26T12:27:36
2013-05-23T22:22:58
C
UTF-8
C
false
false
166
h
texture.h
#pragma once #include <webgpu/webgpu.h> #ifdef __cplusplus extern "C" { #endif typedef struct { WGPUTexture texture; } Texture5Impl; #ifdef __cplusplus } #endif
f55fc0ceeeac4111d7d812f1ec1f7b72dd096c2d
2d11442aa09b51e10c245ee2b64231aeb051744f
/processors/ARM/gdb-8.3.1/sim/common/sim-hload.c
5f85abdbcf4607ddcbf3de5af0ba33d21557ea06
[ "MIT" ]
permissive
OpenSmalltalk/opensmalltalk-vm
622b01c10017a93fdff4f1ef2188c45342384c78
330d6779ad2ecbce1f07131f53d75cd168165f0b
refs/heads/Cog
2023-09-04T05:36:54.320281
2023-08-17T11:32:52
2023-08-31T12:26:44
59,481,716
556
153
NOASSERTION
2023-06-19T19:58:13
2016-05-23T12:40:27
C
UTF-8
C
false
false
1,913
c
sim-hload.c
/* Generic load for hardware simulator models. Copyright (C) 1997-2019 Free Software Foundation, Inc. Contributed by Cygnus Support. This file is part of GDB, the GNU debugger. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-main.h" #include "bfd.h" #include "sim-utils.h" #include "sim-assert.h" /* Generic implementation of sim_load that works with simulators modeling a hardware platform. */ SIM_RC sim_load (SIM_DESC sd, const char *prog_name, struct bfd *prog_bfd, int from_tty) { bfd *result_bfd; SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); if (sim_analyze_program (sd, prog_name, prog_bfd) != SIM_RC_OK) return SIM_RC_FAIL; SIM_ASSERT (STATE_PROG_BFD (sd) != NULL); /* NOTE: For historical reasons, older hardware simulators incorrectly write the program sections at LMA interpreted as a virtual address. This is still accommodated for backward compatibility reasons. */ result_bfd = sim_load_file (sd, STATE_MY_NAME (sd), STATE_CALLBACK (sd), prog_name, STATE_PROG_BFD (sd), STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG, STATE_LOAD_AT_LMA_P (sd), sim_write); if (result_bfd == NULL) { bfd_close (STATE_PROG_BFD (sd)); STATE_PROG_BFD (sd) = NULL; return SIM_RC_FAIL; } return SIM_RC_OK; }
9c347db1b20ab5fbe4b559224e7a14891f9d9ba8
73b0f9c30d07993ad74f7f2bcbc0fe61f1d1a3ce
/native/iosTest/Pods/Headers/Private/RCT-Folly/folly/detail/FileUtilVectorDetail.h
cf278a4e83db68df71b2266e365c7c47d682b858
[ "MIT" ]
permissive
Nozbe/WatermelonDB
84771a637e2c93474220fadee442e5c4ade40f7e
fd41fe279e229e9b5013b1dddf777cd7919e1d2d
refs/heads/master
2023-08-16T18:24:04.893973
2023-08-11T11:44:46
2023-08-11T11:44:46
146,468,829
9,358
670
MIT
2023-09-10T08:04:55
2018-08-28T15:32:05
JavaScript
UTF-8
C
false
false
60
h
FileUtilVectorDetail.h
../../../../../RCT-Folly/folly/detail/FileUtilVectorDetail.h
bc0e7821610db90f40eb10464ef9fc47d9987ece
691aa16e8b7eacd9689de973cbbf57679d32773e
/src/widgets/desktops_i3.c
4aa8100db5eb6eea053f3dfa31502700a810ece9
[ "MIT" ]
permissive
Lokaltog/candybar
f956dddd565f8a558c6ecc15c4fbe041fc00d303
e81b66abe3c2ad96d31c670fcf8b3717c96fe4a2
refs/heads/develop
2020-06-01T08:34:15.871662
2015-09-28T07:26:42
2015-09-28T07:26:42
17,035,247
147
22
null
2015-04-20T07:23:35
2014-02-20T20:53:23
C
UTF-8
C
false
false
2,558
c
desktops_i3.c
#include "widgets.h" #include "desktops_i3.h" char* widget_type () { return "desktops"; } gint workspace_comparator (gconstpointer pointer_a, gconstpointer pointer_b) { i3ipcWorkspaceReply *a = (i3ipcWorkspaceReply*)pointer_a; i3ipcWorkspaceReply *b = (i3ipcWorkspaceReply*)pointer_b; if (a->num < b->num) { return -1; } else if (a->num > b->num) { return 1; } else { return 0; } } json_t* format_workspaces (i3ipcConnection *conn) { json_t *json_data_object = json_object(); json_t *json_desktops_array = json_array(); json_object_set_new(json_data_object, "desktops", json_desktops_array); GSList *workspaces = i3ipc_connection_get_workspaces(conn, NULL); workspaces = g_slist_sort(workspaces, (GCompareFunc)workspace_comparator); for (unsigned char i = 0; i < g_slist_length(workspaces); i++) { GSList *workspace = g_slist_nth(workspaces, i); i3ipcWorkspaceReply *data = workspace->data; json_t *json_desktop = json_object(); json_object_set_new(json_desktop, "name", json_string(data->name)); json_object_set_new(json_desktop, "clients_len", json_integer(i)); json_object_set_new(json_desktop, "is_urgent", json_boolean(data->urgent)); json_array_append_new(json_desktops_array, json_desktop); if (data->focused) { json_object_set_new(json_data_object, "current_desktop", json_integer(i)); } } return json_data_object; } void workspace_callback (i3ipcConnection *conn, i3ipcWorkspaceEvent *event, gpointer user_data) { struct widget *widget = (struct widget*)user_data; json_t *json_data_object = format_workspaces(conn); char *json_str = strdup(json_dumps(json_data_object, 0)); struct js_callback_arg arg = widget_data_arg_string(json_str); struct js_callback_data data = { .widget = widget, .args = &arg, 1 }; web_view_callback(&data); free(json_str); } void* widget_main (struct widget *widget) { i3ipcConnection *conn = i3ipc_connection_new(NULL, NULL); json_t *json_data_object = format_workspaces(conn); char *json_str = strdup(json_dumps(json_data_object, 0)); widget_data_callback(widget, widget_data_arg_string(json_str)); free(json_str); void (*callback)(i3ipcConnection*, i3ipcWorkspaceEvent*, gpointer); callback = workspace_callback; GClosure *closure = g_cclosure_new(G_CALLBACK(callback), widget, NULL); i3ipc_connection_on(conn, (const gchar*)"workspace", closure, NULL); widget_epoll_init(widget); while (true) { widget_epoll_wait_goto(widget, 1000, cleanup); } cleanup: g_object_unref(conn); widget_epoll_cleanup(widget); widget_clean_exit(widget); }
9a9eda1bab672a4ffd34b993d9b65fe354b1523d
f9e7d65cb784c01a0200145ba8d289afe41d4a56
/chip/stm32/trng.c
48d5335c53f12d7cdbf97142e060da0574cbf4c8
[ "BSD-3-Clause" ]
permissive
FrameworkComputer/EmbeddedController
ad7086769e87d0a4179eae96a7c9ff5e383ff54e
f6d6b927eed71550d3475411cfc3e59abe5cef2a
refs/heads/hx20-hx30
2023-08-08T20:45:10.621169
2023-05-26T07:03:59
2023-05-26T07:03:59
447,021,040
846
48
BSD-3-Clause
2023-05-26T07:04:59
2022-01-12T00:11:14
C
UTF-8
C
false
false
3,802
c
trng.c
/* Copyright 2017 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* Hardware Random Number Generator */ #include "common.h" #include "console.h" #include "host_command.h" #include "panic.h" #include "registers.h" #include "system.h" #include "task.h" #include "trng.h" #include "util.h" uint32_t rand(void) { int tries = 300; /* Wait for a valid random number */ while (!(STM32_RNG_SR & STM32_RNG_SR_DRDY) && --tries) ; /* we cannot afford to feed the caller with an arbitrary number */ if (!tries) software_panic(PANIC_SW_BAD_RNG, task_get_current()); /* Finally the 32-bit of entropy */ return STM32_RNG_DR; } test_mockable void rand_bytes(void *buffer, size_t len) { while (len) { uint32_t number = rand(); size_t cnt = 4; /* deal with the lack of alignment guarantee in the API */ uintptr_t align = (uintptr_t)buffer & 3; if (len < 4 || align) { cnt = MIN(4 - align, len); memcpy(buffer, &number, cnt); } else { *(uint32_t *)buffer = number; } len -= cnt; buffer += cnt; } } test_mockable void init_trng(void) { #ifdef CHIP_FAMILY_STM32L4 /* Enable the 48Mhz internal RC oscillator */ STM32_RCC_CRRCR |= STM32_RCC_CRRCR_HSI48ON; /* no timeout: we watchdog if the oscillator doesn't start */ while (!(STM32_RCC_CRRCR & STM32_RCC_CRRCR_HSI48RDY)) ; /* Clock the TRNG using the HSI48 */ STM32_RCC_CCIPR = (STM32_RCC_CCIPR & ~STM32_RCC_CCIPR_CLK48SEL_MASK) | (0 << STM32_RCC_CCIPR_CLK48SEL_SHIFT); #elif defined(CHIP_FAMILY_STM32H7) /* Enable the 48Mhz internal RC oscillator */ STM32_RCC_CR |= STM32_RCC_CR_HSI48ON; /* no timeout: we watchdog if the oscillator doesn't start */ while (!(STM32_RCC_CR & STM32_RCC_CR_HSI48RDY)) ; /* Clock the TRNG using the HSI48 */ STM32_RCC_D2CCIP2R = (STM32_RCC_D2CCIP2R & ~STM32_RCC_D2CCIP2_RNGSEL_MASK) | STM32_RCC_D2CCIP2_RNGSEL_HSI48; #elif defined(CHIP_FAMILY_STM32F4) /* * The RNG clock is the same as the SDIO/USB OTG clock, already set at * 48 MHz during clock initialisation. Nothing to do. */ #else #error "Please add support for CONFIG_RNG on this chip family." #endif /* Enable the RNG logic */ STM32_RCC_AHB2ENR |= STM32_RCC_AHB2ENR_RNGEN; /* Start the random number generation */ STM32_RNG_CR |= STM32_RNG_CR_RNGEN; } test_mockable void exit_trng(void) { STM32_RNG_CR &= ~STM32_RNG_CR_RNGEN; STM32_RCC_AHB2ENR &= ~STM32_RCC_AHB2ENR_RNGEN; #ifdef CHIP_FAMILY_STM32L4 STM32_RCC_CRRCR &= ~STM32_RCC_CRRCR_HSI48ON; #elif defined(CHIP_FAMILY_STM32H7) STM32_RCC_CR &= ~STM32_RCC_CR_HSI48ON; #elif defined(CHIP_FAMILY_STM32F4) /* Nothing to do */ #endif } #if defined(CONFIG_CMD_RAND) /* * We want to avoid accidentally exposing debug commands in RO since we can't * update RO once in production. */ #if defined(SECTION_IS_RW) static int command_rand(int argc, char **argv) { uint8_t data[32]; init_trng(); rand_bytes(data, sizeof(data)); exit_trng(); ccprintf("rand %ph\n", HEX_BUF(data, sizeof(data))); return EC_SUCCESS; } DECLARE_CONSOLE_COMMAND(rand, command_rand, NULL, "Output random bytes to console."); static enum ec_status host_command_rand(struct host_cmd_handler_args *args) { const struct ec_params_rand_num *p = args->params; struct ec_response_rand_num *r = args->response; uint16_t num_rand_bytes = p->num_rand_bytes; if (system_is_locked()) return EC_RES_ACCESS_DENIED; if (num_rand_bytes > args->response_max) return EC_RES_OVERFLOW; init_trng(); rand_bytes(r->rand, num_rand_bytes); exit_trng(); args->response_size = num_rand_bytes; return EC_SUCCESS; } DECLARE_HOST_COMMAND(EC_CMD_RAND_NUM, host_command_rand, EC_VER_MASK(EC_VER_RAND_NUM)); #endif /* SECTION_IS_RW */ #endif /* CONFIG_CMD_RAND */
1469555fcaa7b962121ac5d3c53538784a353483
f4ac42a3316e8815cdd307fbe11229438d0cb951
/Kernels/ARM-Optimized/DSP/Source/TransformFunctions/transform_functions_mve.h
e75ec77e40d2cf30ce272bf25ce6c4ebe4a846fe
[ "Apache-2.0" ]
permissive
ARM-software/EndpointAI
6879c160645c741d217421050cc824bb06eb6471
b18e7ddc6e14229a724f2d7ae1f6c721013cbb68
refs/heads/master
2023-07-31T22:20:37.023081
2023-05-18T15:25:11
2023-05-18T15:25:11
292,621,053
231
96
Apache-2.0
2021-07-31T23:18:44
2020-09-03T16:19:43
C
UTF-8
C
false
false
2,558
h
transform_functions_mve.h
/* ---------------------------------------------------------------------- * Project: CMSIS DSP Library * Title: transform_functions_mve.h * Description: MVE transform function headers. * * $Date: 06. Mar 2023 * $Revision: V1.0.0 * * Target Processor: Cortex-M cores * -------------------------------------------------------------------- */ /* * Copyright (C) 2023 ARM Limited or its affiliates. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _TRANSFORM_FUNCTIONS_MVE_H_ #define _TRANSFORM_FUNCTIONS_MVE_H_ #include "arm_math.h" #ifdef __cplusplus extern "C" { #endif #if defined(ARM_MATH_MVEI) void arm_cfft_q31_mve(const arm_cfft_instance_q31 * S, q31_t * pSrc, uint8_t ifftFlag, uint8_t bitReverseFlag); void arm_cfft_q15_mve(const arm_cfft_instance_q15 * S, q15_t * pSrc, uint8_t ifftFlag, uint8_t bitReverseFlag); void arm_rfft_q31_mve(const arm_rfft_instance_q31 * S, q31_t * pSrc, q31_t * pDst); void arm_rfft_q15_mve(const arm_rfft_instance_q15 * S, q15_t * pSrc, q15_t * pDst); #endif #if defined(ARM_MATH_MVEF) void arm_cfft_f32_mve(const arm_cfft_instance_f32 * S, float32_t * pSrc, uint8_t ifftFlag, uint8_t bitReverseFlag); void arm_rfft_fast_f32_mve(const arm_rfft_fast_instance_f32 * S, float32_t * p, float32_t * pOut, uint8_t ifftFlag); #endif #if defined(ARM_MATH_MVE_FLOAT16) #include "arm_math_f16.h" void arm_cfft_f16_mve(const arm_cfft_instance_f16 * S, float16_t * pSrc, uint8_t ifftFlag, uint8_t bitReverseFlag); void arm_rfft_fast_f16_mve(const arm_rfft_fast_instance_f16 * S, float16_t * p, float16_t * pOut, uint8_t ifftFlag); #endif #ifdef __cplusplus } #endif #endif /* ifndef _TRANSFORM_FUNCTIONS_MVE_H_ */
eb94c5a1e78ec05c58a9cf3b187ed38ff6dfa47f
eb47bf8011f957e95a84ac64aab29598c59081a1
/src/GLSceneRenderer/glcore.h
a41292701b26668a40c5cbc3cbcd01c7b27dbb47
[ "Zlib", "MIT" ]
permissive
choreonoid/choreonoid
fd776aaab99d9ec544e5ceec04fbc283b8a3aee3
94b353722d5b9ff10e9c0ca8982e549f85b5f59f
refs/heads/master
2023-09-01T12:27:17.849641
2023-08-04T13:54:12
2023-08-04T13:54:12
274,977,786
117
30
NOASSERTION
2023-05-23T08:25:33
2020-06-25T17:36:56
C++
UTF-8
C
false
false
580
h
glcore.h
/** The following header and the corresponding .c file were generated by OpenGL Loader Generator (glLoadGen) with the command: lua LoadGen.lua -style=pointer_c -spec=gl -version=3.3 -profile=core core_3_3 or lua LoadGen.lua -style=pointer_c -spec=gl -version=4.0 -profile=core core_4_0. lua LoadGen.lua -style=pointer_c -spec=gl -version=4.4 -profile=core core_4_4. */ #include "gl_core_3_3.h" #define CNOID_GL_CORE_3_3 //#include "gl_core_4_0.h" //#define CNOID_GL_CORE_4_0 //#include "gl_core_4_4.h" //#define CNOID_GL_CORE_4_4
0987478cf17c308fc2f917e8d6dd2e9c70cb110d
9e0c8c8d8bafa73d133e41f201badc756c92978a
/kernel/arch/x86_64/fake_impl.c
d6b2ddef3ac0a5fefaba19eccf44b3683852e3b9
[ "BSD-2-Clause", "MIT", "CC0-1.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain", "BSD-2-Clause-Views" ]
permissive
vvaltchev/tilck
ccf8d9933be1269b85388e5b21645b831ecf5412
e9c27da4dd15f5f8a927b11f31484aec3f1429f0
refs/heads/master
2023-08-16T00:07:42.593483
2023-07-04T21:00:31
2023-07-19T23:25:42
53,845,595
2,142
115
BSD-2-Clause
2023-09-03T05:36:46
2016-03-14T10:02:41
C
UTF-8
C
false
false
307
c
fake_impl.c
/* SPDX-License-Identifier: BSD-2-Clause */ #include <tilck/common/basic_defs.h> #include <tilck/kernel/hal.h> #include <tilck/kernel/sched.h> ulong vdso_begin = 0; /* fake value */ void copy_main_tss_on_regs(regs_t *ctx) { NOT_IMPLEMENTED(); } void init_segmentation(void) { NOT_IMPLEMENTED(); }
c8b66bf32a186db5a2f4cb595ffac30edbc275c8
436623ee85c9d9444d700b56f2729b12b9f2c659
/src/modules/physics/include/eepp/thirdparty/chipmunk/cpArbiter.h
489194818417c642d4efc3878e64fe25d7c1222b
[ "MIT" ]
permissive
SpartanJ/eepp
0bd271b33058ef119f5c34460ed94e44df882a25
9f64a2149f3a0842ced34b8b981ffe3a8efc6d13
refs/heads/develop
2023-09-01T01:17:30.155540
2023-08-27T20:58:19
2023-08-27T20:58:19
125,767,856
341
27
MIT
2023-04-01T20:10:26
2018-03-18T21:11:21
C++
UTF-8
C
false
false
8,786
h
cpArbiter.h
/* Copyright (c) 2007 Scott Lembcke * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /// @defgroup cpArbiter cpArbiter /// The cpArbiter struct controls pairs of colliding shapes. /// They are also used in conjuction with collision handler callbacks /// allowing you to retrieve information on the collision and control it. /// @{ /// Collision begin event function callback type. /// Returning false from a begin callback causes the collision to be ignored until /// the the separate callback is called when the objects stop colliding. typedef cpBool (*cpCollisionBeginFunc)(cpArbiter *arb, cpSpace *space, void *data); /// Collision pre-solve event function callback type. /// Returning false from a pre-step callback causes the collision to be ignored until the next step. typedef cpBool (*cpCollisionPreSolveFunc)(cpArbiter *arb, cpSpace *space, void *data); /// Collision post-solve event function callback type. typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, cpSpace *space, void *data); /// Collision separate event function callback type. typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, cpSpace *space, void *data); /// @private struct cpCollisionHandler { cpCollisionType a; cpCollisionType b; cpCollisionBeginFunc begin; cpCollisionPreSolveFunc preSolve; cpCollisionPostSolveFunc postSolve; cpCollisionSeparateFunc separate; void *data; }; typedef struct cpContact cpContact; #define CP_MAX_CONTACTS_PER_ARBITER 4 /// @private typedef enum cpArbiterState { // Arbiter is active and its the first collision. cpArbiterStateFirstColl, // Arbiter is active and its not the first collision. cpArbiterStateNormal, // Collision has been explicitly ignored. // Either by returning false from a begin collision handler or calling cpArbiterIgnore(). cpArbiterStateIgnore, // Collison is no longer active. A space will cache an arbiter for up to cpSpace.collisionPersistence more steps. cpArbiterStateCached, } cpArbiterState; /// @private struct cpArbiterThread { // Links to next and previous arbiters in the contact graph. struct cpArbiter *next, *prev; }; /// A colliding pair of shapes. struct cpArbiter { /// Calculated value to use for the elasticity coefficient. /// Override in a pre-solve collision handler for custom behavior. cpFloat e; /// Calculated value to use for the friction coefficient. /// Override in a pre-solve collision handler for custom behavior. cpFloat u; /// Calculated value to use for applying surface velocities. /// Override in a pre-solve collision handler for custom behavior. cpVect surface_vr; /// User definable data pointer. /// The value will persist for the pair of shapes until the separate() callback is called. /// NOTE: If you need to clean up this pointer, you should implement the separate() callback to do it. cpDataPointer data; CP_PRIVATE(cpShape *a); CP_PRIVATE(cpShape *b); CP_PRIVATE(cpBody *body_a); CP_PRIVATE(cpBody *body_b); CP_PRIVATE(struct cpArbiterThread thread_a); CP_PRIVATE(struct cpArbiterThread thread_b); CP_PRIVATE(int numContacts); CP_PRIVATE(cpContact *contacts); CP_PRIVATE(cpTimestamp stamp); CP_PRIVATE(cpCollisionHandler *handler); CP_PRIVATE(cpBool swappedColl); CP_PRIVATE(cpArbiterState state); }; #define CP_DefineArbiterStructGetter(type, member, name) \ static inline type cpArbiterGet##name(const cpArbiter *arb){return arb->member;} #define CP_DefineArbiterStructSetter(type, member, name) \ static inline void cpArbiterSet##name(cpArbiter *arb, type value){arb->member = value;} #define CP_DefineArbiterStructProperty(type, member, name) \ CP_DefineArbiterStructGetter(type, member, name) \ CP_DefineArbiterStructSetter(type, member, name) CP_DefineArbiterStructProperty(cpFloat, e, Elasticity) CP_DefineArbiterStructProperty(cpFloat, u, Friction) // Get the relative surface velocity of the two shapes in contact. cpVect cpArbiterGetSurfaceVelocity(cpArbiter *arb); // Override the relative surface velocity of the two shapes in contact. // By default this is calculated to be the difference of the two // surface velocities clamped to the tangent plane. void cpArbiterSetSurfaceVelocity(cpArbiter *arb, cpVect vr); CP_DefineArbiterStructProperty(cpDataPointer, data, UserData) /// Calculate the total impulse that was applied by this arbiter. /// This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback. cpVect cpArbiterTotalImpulse(const cpArbiter *arb); /// Calculate the total impulse including the friction that was applied by this arbiter. /// This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback. cpVect cpArbiterTotalImpulseWithFriction(const cpArbiter *arb); /// Calculate the amount of energy lost in a collision including static, but not dynamic friction. /// This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback. cpFloat cpArbiterTotalKE(const cpArbiter *arb); /// Causes a collision pair to be ignored as if you returned false from a begin callback. /// If called from a pre-step callback, you will still need to return false /// if you want it to be ignored in the current step. void cpArbiterIgnore(cpArbiter *arb); /// Return the colliding shapes involved for this arbiter. /// The order of their cpSpace.collision_type values will match /// the order set when the collision handler was registered. static inline void cpArbiterGetShapes(const cpArbiter *arb, cpShape **a, cpShape **b) { if(arb->CP_PRIVATE(swappedColl)){ (*a) = arb->CP_PRIVATE(b), (*b) = arb->CP_PRIVATE(a); } else { (*a) = arb->CP_PRIVATE(a), (*b) = arb->CP_PRIVATE(b); } } /// A macro shortcut for defining and retrieving the shapes from an arbiter. #define CP_ARBITER_GET_SHAPES(__arb__, __a__, __b__) cpShape *__a__, *__b__; cpArbiterGetShapes(__arb__, &__a__, &__b__); /// Return the colliding bodies involved for this arbiter. /// The order of the cpSpace.collision_type the bodies are associated with values will match /// the order set when the collision handler was registered. static inline void cpArbiterGetBodies(const cpArbiter *arb, cpBody **a, cpBody **b) { CP_ARBITER_GET_SHAPES(arb, shape_a, shape_b); (*a) = shape_a->body; (*b) = shape_b->body; } /// A macro shortcut for defining and retrieving the bodies from an arbiter. #define CP_ARBITER_GET_BODIES(__arb__, __a__, __b__) cpBody *__a__, *__b__; cpArbiterGetBodies(__arb__, &__a__, &__b__); /// A struct that wraps up the important collision data for an arbiter. typedef struct cpContactPointSet { /// The number of contact points in the set. int count; /// The array of contact points. struct { /// The position of the contact point. cpVect point; /// The normal of the contact point. cpVect normal; /// The depth of the contact point. cpFloat dist; } points[CP_MAX_CONTACTS_PER_ARBITER]; } cpContactPointSet; /// Return a contact set from an arbiter. cpContactPointSet cpArbiterGetContactPointSet(const cpArbiter *arb); /// Replace the contact point set for an arbiter. /// This can be a very powerful feature, but use it with caution! void cpArbiterSetContactPointSet(cpArbiter *arb, cpContactPointSet *set); /// Returns true if this is the first step a pair of objects started colliding. cpBool cpArbiterIsFirstContact(const cpArbiter *arb); /// Get the number of contact points for this arbiter. int cpArbiterGetCount(const cpArbiter *arb); /// Get the normal of the @c ith contact point. cpVect cpArbiterGetNormal(const cpArbiter *arb, int i); /// Get the position of the @c ith contact point. cpVect cpArbiterGetPoint(const cpArbiter *arb, int i); /// Get the depth of the @c ith contact point. cpFloat cpArbiterGetDepth(const cpArbiter *arb, int i); /// @}
160017cdc2e7f881fe3a894597fa56a66a64fd4f
ad631b8a408c085a7ea611973c46cc03a5f60c1f
/bpf/lib/ids.h
9043f1d3b0c223679c3be5e9eb41011a4fcea437
[ "BSD-2-Clause", "GPL-1.0-or-later", "GPL-2.0-only", "Apache-2.0", "BSD-3-Clause" ]
permissive
cilium/cilium
6434786ea19052f1c684a70cd8e0fb2667aa52d8
710316a4cf64202e210ec29c97be08209f96c69a
refs/heads/main
2023-09-01T04:29:44.222786
2023-08-31T22:28:15
2023-08-31T23:52:01
48,109,239
16,781
2,829
Apache-2.0
2023-09-14T19:57:29
2015-12-16T12:33:31
Go
UTF-8
C
false
false
290
h
ids.h
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ /* Copyright Authors of Cilium */ #ifndef __LIB_IDS_H_ #define __LIB_IDS_H_ #define CILIUM_MAP_POLICY 1 #define CILIUM_MAP_CALLS 2 #define CILIUM_MAP_CUSTOM_CALLS 3 #define CILIUM_MAP_EGRESSPOLICY 4 #endif /* __LIB_IDS_H_ */
e103f6bebc4610dbe72f5ddb08cc026a1714a61e
7c857119fe1505b1d80d6e62969661c06dc1a2f4
/ArmPlatformPkg/PlatformPei/PlatformPeiLib.c
db39cd4f2c4303510941089a91a3c9eff6663204
[ "BSD-2-Clause" ]
permissive
CloverHackyColor/CloverBootloader
7042ca7dd6b513d22be591a295e49071ae1482ee
2711170df4f60b2ae5aa20add3e00f35cf57b7e5
refs/heads/master
2023-08-30T22:14:34.590134
2023-08-27T19:14:02
2023-08-27T19:14:02
205,810,121
4,734
770
BSD-2-Clause
2023-09-03T12:41:33
2019-09-02T08:22:14
C
UTF-8
C
false
false
400
c
PlatformPeiLib.c
/** @file Copyright (c) 2011-2014, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Library/ArmPlatformLib.h> #include <Library/HobLib.h> #include <Library/PcdLib.h> EFI_STATUS EFIAPI PlatformPeim ( VOID ) { BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize)); return EFI_SUCCESS; }
a37952d345ee74323a1d3dc70596fd54ddf7075f
f7f043523dcacb348f7a387430ae5b7b2932b56a
/vendor/github.com/coreswitch/openconfigd/cli/support/man2html.c
87e5ee47b9e9c1457ca18552ce4d8763de1a4ca6
[ "Apache-2.0", "FSFAP", "GPL-3.0-or-later", "GPL-3.0-only", "LGPL-2.0-or-later" ]
permissive
coreswitch/zebra
2f3dcbb0f1aa0350fe63d664e5533d6895030e85
1931dde592c81398707a07d90d00f90321dc9b46
refs/heads/master
2021-12-15T02:26:03.510038
2019-05-19T12:00:34
2019-05-19T12:00:34
107,520,729
105
22
Apache-2.0
2019-05-17T01:23:34
2017-10-19T08:42:40
Go
UTF-8
C
false
false
84,588
c
man2html.c
/* * This program was written by Richard Verhoeven (NL:5482ZX35) * at the Eindhoven University of Technology. Email: rcb5@win.tue.nl * * Permission is granted to distribute, modify and use this program as long * as this comment is not removed or changed. * * THIS IS A MODIFIED VERSION. IT WAS MODIFIED BY chet@po.cwru.edu FOR * USE BY BASH. */ /* * man2html will add links to the converted manpages. The function add_links * is used for that. At the moment it will add links as follows, where * indicates what should match to start with: * ^^^ * Recognition Item Link * ---------------------------------------------------------- * name(*) Manpage ../man?/name.* * ^ * name@hostname Email address mailto:name@hostname * ^ * method://string URL method://string * ^^^ * www.host.name WWW server http://www.host.name * ^^^^ * ftp.host.name FTP server ftp://ftp.host.name * ^^^^ * <file.h> Include file file:/usr/include/file.h * ^^^ * * Since man2html does not check if manpages, hosts or email addresses exist, * some links might not work. For manpages, some extra checks are performed * to make sure not every () pair creates a link. Also out of date pages * might point to incorrect places. * * The program will not allow users to get system specific files, such as * /etc/passwd. It will check that "man" is part of the specified file and * that "/../" isn't. Even if someone manages to get such file, man2html will * handle it like a manpage and will usually not produce any output (or crash). * * If you find any bugs when normal manpages are converted, please report * them to me (rcb5@win.tue.nl) after you have checked that man(1) can handle * the manpage correct. * * Known bugs and missing features: * * * Equations are not converted at all. * * Tables are converted but some features are not possible in html. * * The tabbing environment is converted by counting characters and adding * spaces. This might go wrong (outside <PRE>) * * Some pages look beter if man2html works in troff mode, especially pages * with tables. You can deside at compile time which made you want to use. * * -DNROFF=0 troff mode * -DNROFF=1 nroff mode (default) * * if you install both modes, you should compile with the correct CGIBASE. * * Some manpages rely on the fact that troff/nroff is used to convert * them and use features which are not descripted in the man manpages. * (definitions, calculations, conditionals, requests). I can't guarantee * that all these features work on all manpages. (I didn't have the * time to look through all the available manpages.) */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #define NROFF 0 #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <ctype.h> #include <sys/types.h> #include <time.h> #include <sys/time.h> #include <errno.h> #define NULL_TERMINATED(n) ((n) + 1) #define HUGE_STR_MAX 10000 #define LARGE_STR_MAX 2000 #define MED_STR_MAX 500 #define SMALL_STR_MAX 100 #define TINY_STR_MAX 10 #define MAX_MAN_PATHS 100 /* Max number of directories */ #define MAX_ZCATS 10 /* Max number of zcat style programs */ #define MAX_WORDLIST 100 #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 #endif #ifndef EXIT_FAILURE #define EXIT_FAILURE 1 #endif #ifndef EXIT_USAGE #define EXIT_USAGE 2 #endif static char location_base[NULL_TERMINATED(MED_STR_MAX)] = ""; static char th_page_and_sec[128] = { '\0' }; static char th_datestr[128] = { '\0' }; static char th_version[128] = { '\0' }; char *signature = "<HR>\nThis document was created by man2html from %s.<BR>\nTime: %s\n"; /* timeformat for signature */ #define TIMEFORMAT "%d %B %Y %T %Z" char *manpage; /* BSD mandoc Bl/El lists to HTML list types */ #define BL_DESC_LIST 1 #define BL_BULLET_LIST 2 #define BL_ENUM_LIST 4 /* BSD mandoc Bd/Ed example(?) blocks */ #define BD_LITERAL 1 #define BD_INDENT 2 #ifndef HAVE_STRERROR static char * strerror(int e) { static char emsg[40]; #if defined (HAVE_SYS_ERRLIST) extern int sys_nerr; extern char *sys_errlist[]; if (e > 0 && e < sys_nerr) return (sys_errlist[e]); else #endif /* HAVE_SYS_ERRLIST */ { sprintf(emsg, "Unknown system error %d", e); return (&emsg[0]); } } #endif /* !HAVE_STRERROR */ static char * strgrow(char *old, int len) { char *new = realloc(old, (strlen(old) + len + 1) * sizeof(char)); if (!new) { fprintf(stderr, "man2html: out of memory"); exit(EXIT_FAILURE); } return new; } static char * stralloc(int len) { /* allocate enough for len + NULL */ char *new = malloc((len + 1) * sizeof(char)); if (!new) { fprintf(stderr, "man2html: out of memory"); exit(EXIT_FAILURE); } return new; } /* * Some systems don't have strdup so lets use our own - which can also * check for out of memory. */ static char * strduplicate(char *from) { char *new = stralloc(strlen(from)); strcpy(new, from); return new; } /* Assumes space for n plus a null */ static char * strmaxcpy(char *to, char *from, int n) { int len = strlen(from); strncpy(to, from, n); to[(len <= n) ? len : n] = '\0'; return to; } static char * strmaxcat(char *to, char *from, int n) { int to_len = strlen(to); if (to_len < n) { int from_len = strlen(from); int cp = (to_len + from_len <= n) ? from_len : n - to_len; strncpy(to + to_len, from, cp); to[to_len + cp] = '\0'; } return to; } /* Assumes space for limit plus a null */ static char * strlimitcpy(char *to, char *from, int n, int limit) { int len = n > limit ? limit : n; strmaxcpy(to, from, len); to[len] = '\0'; return to; } /* * takes string and escapes all metacharacters. should be used before * including string in system() or similar call. */ static char * escape_input(char *str) { int i, j = 0; static char new[NULL_TERMINATED(MED_STR_MAX)]; if (strlen(str) * 2 + 1 > MED_STR_MAX) { fprintf(stderr, "man2html: escape_input - str too long:\n%-80s...\n", str); exit(EXIT_FAILURE); } for (i = 0; i < strlen(str); i++) { if (!(((str[i] >= 'A') && (str[i] <= 'Z')) || ((str[i] >= 'a') && (str[i] <= 'z')) || ((str[i] >= '0') && (str[i] <= '9')))) { new[j] = '\\'; j++; } new[j] = str[i]; j++; } new[j] = '\0'; return new; } static void usage(void) { fprintf(stderr, "man2html: usage: man2html filename\n"); } /* * below this you should not change anything unless you know a lot * about this program or about troff. */ typedef struct STRDEF STRDEF; struct STRDEF { int nr, slen; char *st; STRDEF *next; }; typedef struct INTDEF INTDEF; struct INTDEF { int nr; int val; int incr; INTDEF *next; }; static char NEWLINE[2] = "\n"; static char idxlabel[6] = "ixAAA"; #define INDEXFILE "/tmp/manindex.list" static char *fname; static FILE *idxfile; static STRDEF *chardef, *strdef, *defdef; static INTDEF *intdef; #define V(A,B) ((A)*256+(B)) static INTDEF standardint[] = { {V('n', ' '), NROFF, 0, NULL}, {V('t', ' '), 1 - NROFF, 0, NULL}, {V('o', ' '), 1, 0, NULL}, {V('e', ' '), 0, 0, NULL}, {V('.', 'l'), 70, 0, NULL}, {V('.', '$'), 0, 0, NULL}, {V('.', 'A'), NROFF, 0, NULL}, {V('.', 'T'), 1 - NROFF, 0, NULL}, {V('.', 'V'), 1, 0, NULL}, /* the me package tests for this */ {0, 0, 0, NULL}}; static STRDEF standardstring[] = { {V('R', ' '), 1, "&#174;", NULL}, {V('l', 'q'), 2, "``", NULL}, {V('r', 'q'), 2, "''", NULL}, {0, 0, NULL, NULL} }; static STRDEF standardchar[] = { {V('*', '*'), 1, "*", NULL}, {V('*', 'A'), 1, "A", NULL}, {V('*', 'B'), 1, "B", NULL}, {V('*', 'C'), 2, "Xi", NULL}, {V('*', 'D'), 5, "Delta", NULL}, {V('*', 'E'), 1, "E", NULL}, {V('*', 'F'), 3, "Phi", NULL}, {V('*', 'G'), 5, "Gamma", NULL}, {V('*', 'H'), 5, "Theta", NULL}, {V('*', 'I'), 1, "I", NULL}, {V('*', 'K'), 1, "K", NULL}, {V('*', 'L'), 6, "Lambda", NULL}, {V('*', 'M'), 1, "M", NULL}, {V('*', 'N'), 1, "N", NULL}, {V('*', 'O'), 1, "O", NULL}, {V('*', 'P'), 2, "Pi", NULL}, {V('*', 'Q'), 3, "Psi", NULL}, {V('*', 'R'), 1, "P", NULL}, {V('*', 'S'), 5, "Sigma", NULL}, {V('*', 'T'), 1, "T", NULL}, {V('*', 'U'), 1, "Y", NULL}, {V('*', 'W'), 5, "Omega", NULL}, {V('*', 'X'), 1, "X", NULL}, {V('*', 'Y'), 1, "H", NULL}, {V('*', 'Z'), 1, "Z", NULL}, {V('*', 'a'), 5, "alpha", NULL}, {V('*', 'b'), 4, "beta", NULL}, {V('*', 'c'), 2, "xi", NULL}, {V('*', 'd'), 5, "delta", NULL}, {V('*', 'e'), 7, "epsilon", NULL}, {V('*', 'f'), 3, "phi", NULL}, {V('*', 'g'), 5, "gamma", NULL}, {V('*', 'h'), 5, "theta", NULL}, {V('*', 'i'), 4, "iota", NULL}, {V('*', 'k'), 5, "kappa", NULL}, {V('*', 'l'), 6, "lambda", NULL}, {V('*', 'm'), 1, "&#181;", NULL}, {V('*', 'n'), 2, "nu", NULL}, {V('*', 'o'), 1, "o", NULL}, {V('*', 'p'), 2, "pi", NULL}, {V('*', 'q'), 3, "psi", NULL}, {V('*', 'r'), 3, "rho", NULL}, {V('*', 's'), 5, "sigma", NULL}, {V('*', 't'), 3, "tau", NULL}, {V('*', 'u'), 7, "upsilon", NULL}, {V('*', 'w'), 5, "omega", NULL}, {V('*', 'x'), 3, "chi", NULL}, {V('*', 'y'), 3, "eta", NULL}, {V('*', 'z'), 4, "zeta", NULL}, {V('t', 's'), 5, "sigma", NULL}, {V('+', '-'), 1, "&#177;", NULL}, {V('1', '2'), 1, "&#189;", NULL}, {V('1', '4'), 1, "&#188;", NULL}, {V('3', '4'), 1, "&#190;", NULL}, {V('F', 'i'), 3, "ffi", NULL}, {V('F', 'l'), 3, "ffl", NULL}, {V('a', 'a'), 1, "&#180;", NULL}, {V('a', 'p'), 1, "~", NULL}, {V('b', 'r'), 1, "|", NULL}, {V('b', 'u'), 1, "*", NULL}, {V('b', 'v'), 1, "|", NULL}, {V('c', 'i'), 1, "o", NULL}, {V('c', 'o'), 1, "&#169;", NULL}, {V('c', 't'), 1, "&#162;", NULL}, {V('d', 'e'), 1, "&#176;", NULL}, {V('d', 'g'), 1, "+", NULL}, {V('d', 'i'), 1, "&#247;", NULL}, {V('e', 'm'), 1, "-", NULL}, {V('e', 'm'), 3, "---", NULL}, {V('e', 'q'), 1, "=", NULL}, {V('e', 's'), 1, "&#216;", NULL}, {V('f', 'f'), 2, "ff", NULL}, {V('f', 'i'), 2, "fi", NULL}, {V('f', 'l'), 2, "fl", NULL}, {V('f', 'm'), 1, "&#180;", NULL}, {V('g', 'a'), 1, "`", NULL}, {V('h', 'y'), 1, "-", NULL}, {V('l', 'c'), 2, "|&#175;", NULL}, {V('l', 'f'), 2, "|_", NULL}, {V('l', 'k'), 1, "<FONT SIZE=+2>{</FONT>", NULL}, {V('m', 'i'), 1, "-", NULL}, {V('m', 'u'), 1, "&#215;", NULL}, {V('n', 'o'), 1, "&#172;", NULL}, {V('o', 'r'), 1, "|", NULL}, {V('p', 'l'), 1, "+", NULL}, {V('r', 'c'), 2, "&#175;|", NULL}, {V('r', 'f'), 2, "_|", NULL}, {V('r', 'g'), 1, "&#174;", NULL}, {V('r', 'k'), 1, "<FONT SIZE=+2>}</FONT>", NULL}, {V('r', 'n'), 1, "&#175;", NULL}, {V('r', 'u'), 1, "_", NULL}, {V('s', 'c'), 1, "&#167;", NULL}, {V('s', 'l'), 1, "/", NULL}, {V('s', 'q'), 2, "[]", NULL}, {V('u', 'l'), 1, "_", NULL}, {0, 0, NULL, NULL} }; /* default: print code */ static char eqndelimopen = 0, eqndelimclose = 0; static char escapesym = '\\', nobreaksym = '\'', controlsym = '.', fieldsym = 0, padsym = 0; static char *buffer = NULL; static int buffpos = 0, buffmax = 0; static int scaninbuff = 0; static int itemdepth = 0; static int dl_set[20] = {0}; static int still_dd = 0; static int tabstops[20] = {8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96}; static int maxtstop = 12; static int curpos = 0; static char *scan_troff(char *c, int san, char **result); static char *scan_troff_mandoc(char *c, int san, char **result); static char **argument = NULL; static char charb[TINY_STR_MAX]; static void print_sig(void) { char datbuf[NULL_TERMINATED(MED_STR_MAX)]; struct tm *timetm; time_t clock; datbuf[0] = '\0'; clock = time(NULL); timetm = localtime(&clock); strftime(datbuf, MED_STR_MAX, TIMEFORMAT, timetm); printf(signature, manpage, datbuf); } static char * expand_char(int nr) { STRDEF *h; h = chardef; if (!nr) return NULL; while (h) if (h->nr == nr) { curpos += h->slen; return h->st; } else h = h->next; charb[0] = nr / 256; charb[1] = nr % 256; charb[2] = '\0'; if (charb[0] == '<') { /* Fix up <= */ charb[4] = charb[1]; strncpy(charb, "&lt;", 4); charb[5] = '\0'; } curpos += 2; return charb; } static char * expand_string(int nr) { STRDEF *h = strdef; if (!nr) return NULL; while (h) if (h->nr == nr) { curpos += h->slen; return h->st; } else h = h->next; return NULL; } static char * read_man_page(char *filename) { char *man_buf = NULL; int i; FILE *man_stream = NULL; struct stat stbuf; int buf_size; if (stat(filename, &stbuf) == -1) return NULL; buf_size = stbuf.st_size; man_buf = stralloc(buf_size + 5); man_stream = fopen(filename, "r"); if (man_stream) { man_buf[0] = '\n'; if (fread(man_buf + 1, 1, buf_size, man_stream) == buf_size) { man_buf[buf_size] = '\n'; man_buf[buf_size + 1] = man_buf[buf_size + 2] = '\0'; } else { man_buf = NULL; } fclose(man_stream); } return man_buf; } static char outbuffer[NULL_TERMINATED(HUGE_STR_MAX)]; static int obp = 0; static int no_newline_output = 0; static int newline_for_fun = 0; static int output_possible = 0; static int out_length = 0; /* * Add the links to the output. At the moment the following are * recognized: * #if 0 * name(*) -> ../man?/name.* #endif * method://string -> method://string * www.host.name -> http://www.host.name * ftp.host.name -> ftp://ftp.host.name * name@host -> mailto:name@host * <name.h> -> file:/usr/include/name.h (guess) * * Other possible links to add in the future: * * /dir/dir/file -> file:/dir/dir/file */ static void add_links(char *c) { int i, j, nr; char *f, *g, *h; char *idtest[6]; /* url, mailto, www, ftp, manpage */ out_length += strlen(c); /* search for (section) */ nr = 0; idtest[0] = strstr(c + 1, "://"); idtest[1] = strchr(c + 1, '@'); idtest[2] = strstr(c, "www."); idtest[3] = strstr(c, "ftp."); #if 0 idtest[4] = strchr(c + 1, '('); #else idtest[4] = 0; #endif idtest[5] = strstr(c + 1, ".h&gt;"); for (i = 0; i < 6; i++) nr += (idtest[i] != NULL); while (nr) { j = -1; for (i = 0; i < 6; i++) if (idtest[i] && (j < 0 || idtest[i] < idtest[j])) j = i; switch (j) { case 5: /* <name.h> */ f = idtest[5]; h = f + 2; g = f; while (g > c && g[-1] != ';') g--; if (g != c) { char t; t = *g; *g = '\0'; fputs(c, stdout); *g = t; *h = '\0'; printf("<A HREF=\"file:/usr/include/%s\">%s</A>&gt;", g, g); c = f + 6; } else { f[5] = '\0'; fputs(c, stdout); f[5] = ';'; c = f + 5; } break; case 4: /* manpage */ #if 0 f = idtest[j]; /* check section */ g = strchr(f, ')'); if (g && f - g < 6 && (isalnum(f[-1]) || f[-1] == '>') && ((isdigit(f[1]) && f[1] != '0' && (f[2] == ')' || (isalpha(f[2]) && f[3] == ')') || f[2] == 'X')) || (f[2] == ')' && (f[1] == 'n' || f[1] == 'l')))) { /* this might be a link */ h = f - 1; /* skip html makeup */ while (h > c && *h == '>') { while (h != c && *h != '<') h--; if (h != c) h--; } if (isalnum(*h)) { char t, sec, subsec, *e; e = h + 1; sec = f[1]; subsec = f[2]; if ((subsec == 'X' && f[3] != ')') || subsec == ')') subsec = '\0'; while (h > c && (isalnum(h[-1]) || h[-1] == '_' || h[-1] == '-' || h[-1] == '.')) h--; t = *h; *h = '\0'; fputs(c, stdout); *h = t; t = *e; *e = '\0'; if (subsec) printf("<A HREF=\"" CGIBASE "?man%c/%s.%c%c\">%s</A>", sec, h, sec, tolower(subsec), h); else printf("<A HREF=\"" CGIBASE "?man%c/%s.%c\">%s</A>", sec, h, sec, h); *e = t; c = e; } } *f = '\0'; fputs(c, stdout); *f = '('; idtest[4] = f - 1; c = f; #endif break; /* manpage */ case 3: /* ftp */ case 2: /* www */ g = f = idtest[j]; while (*g && (isalnum(*g) || *g == '_' || *g == '-' || *g == '+' || *g == '.')) g++; if (g[-1] == '.') g--; if (g - f > 4) { char t; t = *f; *f = '\0'; fputs(c, stdout); *f = t; t = *g; *g = '\0'; printf("<A HREF=\"%s://%s\">%s</A>", (j == 3 ? "ftp" : "http"), f, f); *g = t; c = g; } else { f[3] = '\0'; fputs(c, stdout); c = f + 3; f[3] = '.'; } break; case 1: /* mailto */ g = f = idtest[1]; while (g > c && (isalnum(g[-1]) || g[-1] == '_' || g[-1] == '-' || g[-1] == '+' || g[-1] == '.' || g[-1] == '%')) g--; h = f + 1; while (*h && (isalnum(*h) || *h == '_' || *h == '-' || *h == '+' || *h == '.')) h++; if (*h == '.') h--; if (h - f > 4 && f - g > 1) { char t; t = *g; *g = '\0'; fputs(c, stdout); *g = t; t = *h; *h = '\0'; printf("<A HREF=\"mailto:%s\">%s</A>", g, g); *h = t; c = h; } else { *f = '\0'; fputs(c, stdout); *f = '@'; idtest[1] = c; c = f; } break; case 0: /* url */ g = f = idtest[0]; while (g > c && isalpha(g[-1]) && islower(g[-1])) g--; h = f + 3; while (*h && !isspace(*h) && *h != '<' && *h != '>' && *h != '"' && *h != '&') h++; if (f - g > 2 && f - g < 7 && h - f > 3) { char t; t = *g; *g = '\0'; fputs(c, stdout); *g = t; t = *h; *h = '\0'; printf("<A HREF=\"%s\">%s</A>", g, g); *h = t; c = h; } else { f[1] = '\0'; fputs(c, stdout); f[1] = '/'; c = f + 1; } break; default: break; } nr = 0; if (idtest[0] && idtest[0] < c) idtest[0] = strstr(c + 1, "://"); if (idtest[1] && idtest[1] < c) idtest[1] = strchr(c + 1, '@'); if (idtest[2] && idtest[2] < c) idtest[2] = strstr(c, "www."); if (idtest[3] && idtest[3] < c) idtest[3] = strstr(c, "ftp."); if (idtest[4] && idtest[4] < c) idtest[4] = strchr(c + 1, '('); if (idtest[5] && idtest[5] < c) idtest[5] = strstr(c + 1, ".h&gt;"); for (i = 0; i < 6; i++) nr += (idtest[i] != NULL); } fputs(c, stdout); } static int current_font = 0; static int current_size = 0; static int fillout = 1; static void out_html(char *c) { if (!c) return; if (no_newline_output) { int i = 0; no_newline_output = 1; while (c[i]) { if (!no_newline_output) c[i - 1] = c[i]; if (c[i] == '\n') no_newline_output = 1; i++; } if (!no_newline_output) c[i - 1] = 0; } if (scaninbuff) { while (*c) { if (buffpos >= buffmax) { char *h; h = realloc(buffer, buffmax * 2); if (!h) return; buffer = h; buffmax *= 2; } buffer[buffpos++] = *c++; } } else if (output_possible) { while (*c) { outbuffer[obp++] = *c; if (*c == '\n' || obp > HUGE_STR_MAX) { outbuffer[obp] = '\0'; add_links(outbuffer); obp = 0; } c++; } } } #define FO0 "" #define FC0 "" #define FO1 "<I>" #define FC1 "</I>" #define FO2 "<B>" #define FC2 "</B>" #define FO3 "<TT>" #define FC3 "</TT>" static char *switchfont[16] = { "", FC0 FO1, FC0 FO2, FC0 FO3, FC1 FO0, "", FC1 FO2, FC1 FO3, FC2 FO0, FC2 FO1, "", FC2 FO3, FC3 FO0, FC3 FO1, FC3 FO2, "" }; static char * change_to_font(int nr) { int i; switch (nr) { case '0': nr++; case '1': case '2': case '3': case '4': nr = nr - '1'; break; case V('C', 'W'): nr = 3; break; case 'L': nr = 3; break; case 'B': nr = 2; break; case 'I': nr = 1; break; case 'P': case 'R': nr = 0; break; case 0: case 1: case 2: case 3: break; default: nr = 0; break; } i = current_font * 4 + nr % 4; current_font = nr % 4; return switchfont[i]; } static char sizebuf[200]; static char * change_to_size(int nr) { int i; switch (nr) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': nr = nr - '0'; break; case '\0': break; default: nr = current_size + nr; if (nr > 9) nr = 9; if (nr < -9) nr = -9; break; } if (nr == current_size) return ""; i = current_font; sizebuf[0] = '\0'; strcat(sizebuf, change_to_font(0)); if (current_size) strcat(sizebuf, "</FONT>"); current_size = nr; if (nr) { int l; strcat(sizebuf, "<FONT SIZE="); l = strlen(sizebuf); if (nr > 0) sizebuf[l++] = '+'; else sizebuf[l++] = '-', nr = -nr; sizebuf[l++] = nr + '0'; sizebuf[l++] = '>'; sizebuf[l] = '\0'; } strcat(sizebuf, change_to_font(i)); return sizebuf; } static int asint = 0; static int intresult = 0; #define SKIPEOL while (*c && *c++!='\n') static int skip_escape = 0; static int single_escape = 0; static char * scan_escape(char *c) { char *h = NULL; char b[5]; INTDEF *intd; int exoutputp, exskipescape; int i, j; intresult = 0; switch (*c) { case 'e': h = "\\"; curpos++; break; case '0': case ' ': h = "&nbsp;"; curpos++; break; case '|': h = ""; break; case '"': SKIPEOL; c--; h = ""; break; case '$': if (argument) { c++; i = (*c - '1'); if (!(h = argument[i])) h = ""; } break; case 'z': c++; if (*c == '\\') { c = scan_escape(c + 1); c--; h = ""; } else { b[0] = *c; b[1] = '\0'; h = ""; } break; case 'k': c++; if (*c == '(') c += 2; case '^': case '!': case '%': case 'a': case 'd': case 'r': case 'u': case '\n': case '&': h = ""; break; case '(': c++; i = c[0] * 256 + c[1]; c++; h = expand_char(i); break; case '*': c++; if (*c == '(') { c++; i = c[0] * 256 + c[1]; c++; } else i = *c * 256 + ' '; h = expand_string(i); break; case 'f': c++; if (*c == '\\') { c++; c = scan_escape(c); c--; i = intresult; } else if (*c != '(') i = *c; else { c++; i = c[0] * 256 + c[1]; c++; } if (!skip_escape) h = change_to_font(i); else h = ""; break; case 's': c++; j = 0; i = 0; if (*c == '-') { j = -1; c++; } else if (*c == '+') { j = 1; c++; } if (*c == '0') c++; else if (*c == '\\') { c++; c = scan_escape(c); i = intresult; if (!j) j = 1; } else while (isdigit(*c) && (!i || (!j && i < 4))) i = i * 10 + (*c++) - '0'; if (!j) { j = 1; if (i) i = i - 10; } if (!skip_escape) h = change_to_size(i * j); else h = ""; c--; break; case 'n': c++; j = 0; switch (*c) { case '+': j = 1; c++; break; case '-': j = -1; c++; break; default: break; } if (*c == '(') { c++; i = V(c[0], c[1]); c = c + 1; } else { i = V(c[0], ' '); } intd = intdef; while (intd && intd->nr != i) intd = intd->next; if (intd) { intd->val = intd->val + j * intd->incr; intresult = intd->val; } else { switch (i) { case V('.', 's'): intresult = current_size; break; case V('.', 'f'): intresult = current_font; break; default: intresult = 0; break; } } h = ""; break; case 'w': c++; i = *c; c++; exoutputp = output_possible; exskipescape = skip_escape; output_possible = 0; skip_escape = 1; j = 0; while (*c != i) { j++; if (*c == escapesym) c = scan_escape(c + 1); else c++; } output_possible = exoutputp; skip_escape = exskipescape; intresult = j; break; case 'l': h = "<HR>"; curpos = 0; case 'b': case 'v': case 'x': case 'o': case 'L': case 'h': c++; i = *c; c++; exoutputp = output_possible; exskipescape = skip_escape; output_possible = 0; skip_escape = 1; while (*c != i) if (*c == escapesym) c = scan_escape(c + 1); else c++; output_possible = exoutputp; skip_escape = exskipescape; break; case 'c': no_newline_output = 1; break; case '{': newline_for_fun++; h = ""; break; case '}': if (newline_for_fun) newline_for_fun--; h = ""; break; case 'p': h = "<BR>\n"; curpos = 0; break; case 't': h = "\t"; curpos = (curpos + 8) & 0xfff8; break; case '<': h = "&lt;"; curpos++; break; case '>': h = "&gt;"; curpos++; break; case '\\': if (single_escape) { c--; break; } default: b[0] = *c; b[1] = 0; h = b; curpos++; break; } c++; if (!skip_escape) out_html(h); return c; } typedef struct TABLEITEM TABLEITEM; struct TABLEITEM { char *contents; int size, align, valign, colspan, rowspan, font, vleft, vright, space, width; TABLEITEM *next; }; static TABLEITEM emptyfield = {NULL, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, NULL}; typedef struct TABLEROW TABLEROW; struct TABLEROW { TABLEITEM *first; TABLEROW *prev, *next; }; static char *tableopt[] = { "center", "expand", "box", "allbox", "doublebox", "tab", "linesize", "delim", NULL }; static int tableoptl[] = {6, 6, 3, 6, 9, 3, 8, 5, 0}; static void clear_table(TABLEROW * table) { TABLEROW *tr1, *tr2; TABLEITEM *ti1, *ti2; tr1 = table; while (tr1->prev) tr1 = tr1->prev; while (tr1) { ti1 = tr1->first; while (ti1) { ti2 = ti1->next; if (ti1->contents) free(ti1->contents); free(ti1); ti1 = ti2; } tr2 = tr1; tr1 = tr1->next; free(tr2); } } static char *scan_expression(char *c, int *result); static char * scan_format(char *c, TABLEROW ** result, int *maxcol) { TABLEROW *layout, *currow; TABLEITEM *curfield; int i, j; if (*result) { clear_table(*result); } layout = currow = (TABLEROW *) malloc(sizeof(TABLEROW)); currow->next = currow->prev = NULL; currow->first = curfield = (TABLEITEM *) malloc(sizeof(TABLEITEM)); *curfield = emptyfield; while (*c && *c != '.') { switch (*c) { case 'C': case 'c': case 'N': case 'n': case 'R': case 'r': case 'A': case 'a': case 'L': case 'l': case 'S': case 's': case '^': case '_': if (curfield->align) { curfield->next = (TABLEITEM *) malloc(sizeof(TABLEITEM)); curfield = curfield->next; *curfield = emptyfield; } curfield->align = toupper(*c); c++; break; case 'i': case 'I': case 'B': case 'b': curfield->font = toupper(*c); c++; break; case 'f': case 'F': c++; curfield->font = toupper(*c); c++; if (!isspace(*c)) c++; break; case 't': case 'T': curfield->valign = 't'; c++; break; case 'p': case 'P': c++; i = j = 0; if (*c == '+') { j = 1; c++; } if (*c == '-') { j = -1; c++; } while (isdigit(*c)) i = i * 10 + (*c++) - '0'; if (j) curfield->size = i * j; else curfield->size = j - 10; break; case 'v': case 'V': case 'w': case 'W': c = scan_expression(c + 2, &curfield->width); break; case '|': if (curfield->align) curfield->vleft++; else curfield->vright++; c++; break; case 'e': case 'E': c++; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': i = 0; while (isdigit(*c)) i = i * 10 + (*c++) - '0'; curfield->space = i; break; case ',': case '\n': currow->next = (TABLEROW *) malloc(sizeof(TABLEROW)); currow->next->prev = currow; currow = currow->next; currow->next = NULL; curfield = currow->first = (TABLEITEM *) malloc(sizeof(TABLEITEM)); *curfield = emptyfield; c++; break; default: c++; break; } } if (*c == '.') while (*c++ != '\n'); *maxcol = 0; currow = layout; while (currow) { curfield = layout->first; i = 0; while (curfield) { i++; curfield = curfield->next; } if (i > *maxcol) *maxcol = i; currow = currow->next; } *result = layout; return c; } static TABLEROW * next_row(TABLEROW * tr) { if (tr->next) { tr = tr->next; if (!tr->next) next_row(tr); return tr; } else { TABLEITEM *ti, *ti2; tr->next = (TABLEROW *) malloc(sizeof(TABLEROW)); tr->next->prev = tr; ti = tr->first; tr = tr->next; tr->next = NULL; if (ti) tr->first = ti2 = (TABLEITEM *) malloc(sizeof(TABLEITEM)); else tr->first = ti2 = NULL; while (ti != ti2) { *ti2 = *ti; ti2->contents = NULL; if ((ti = ti->next)) { ti2->next = (TABLEITEM *) malloc(sizeof(TABLEITEM)); } ti2 = ti2->next; } return tr; } } static char itemreset[20] = "\\fR\\s0"; static char * scan_table(char *c) { char *t, *h, *g; int center = 0, expand = 0, box = 0, border = 0, linesize = 1; int i, j, maxcol = 0, finished = 0; int oldfont, oldsize, oldfillout; char itemsep = '\t'; TABLEROW *layout = NULL, *currow, *ftable; TABLEITEM *curfield; while (*c++ != '\n'); h = c; if (*h == '.') return c - 1; oldfont = current_font; oldsize = current_size; oldfillout = fillout; out_html(change_to_font(0)); out_html(change_to_size(0)); if (!fillout) { fillout = 1; out_html("</PRE>"); } while (*h && *h != '\n') h++; if (h[-1] == ';') { /* scan table options */ while (c < h) { while (isspace(*c)) c++; for (i = 0; tableopt[i] && strncmp(tableopt[i], c, tableoptl[i]); i++); c = c + tableoptl[i]; switch (i) { case 0: center = 1; break; case 1: expand = 1; break; case 2: box = 1; break; case 3: border = 1; break; case 4: box = 2; break; case 5: while (*c++ != '('); itemsep = *c++; break; case 6: while (*c++ != '('); linesize = 0; while (isdigit(*c)) linesize = linesize * 10 + (*c++) - '0'; break; case 7: while (*c != ')') c++; default: break; } c++; } c = h + 1; } /* scan layout */ c = scan_format(c, &layout, &maxcol); currow = layout; next_row(currow); curfield = layout->first; i = 0; while (!finished) { /* search item */ h = c; if ((*c == '_' || *c == '=') && (c[1] == itemsep || c[1] == '\n')) { if (c[-1] == '\n' && c[1] == '\n') { if (currow->prev) { currow->prev->next = (TABLEROW *) malloc(sizeof(TABLEROW)); currow->prev->next->next = currow; currow->prev->next->prev = currow->prev; currow->prev = currow->prev->next; } else { currow->prev = layout = (TABLEROW *) malloc(sizeof(TABLEROW)); currow->prev->prev = NULL; currow->prev->next = currow; } curfield = currow->prev->first = (TABLEITEM *) malloc(sizeof(TABLEITEM)); *curfield = emptyfield; curfield->align = *c; curfield->colspan = maxcol; curfield = currow->first; c = c + 2; } else { if (curfield) { curfield->align = *c; do { curfield = curfield->next; } while (curfield && curfield->align == 'S'); } if (c[1] == '\n') { currow = next_row(currow); curfield = currow->first; } c = c + 2; } } else if (*c == 'T' && c[1] == '{') { h = c + 2; c = strstr(h, "\nT}"); c++; *c = '\0'; g = NULL; scan_troff(h, 0, &g); scan_troff(itemreset, 0, &g); *c = 'T'; c += 3; if (curfield) { curfield->contents = g; do { curfield = curfield->next; } while (curfield && curfield->align == 'S'); } else if (g) free(g); if (c[-1] == '\n') { currow = next_row(currow); curfield = currow->first; } } else if (*c == '.' && c[1] == 'T' && c[2] == '&' && c[-1] == '\n') { TABLEROW *hr; while (*c++ != '\n'); hr = currow; currow = currow->prev; hr->prev = NULL; c = scan_format(c, &hr, &i); hr->prev = currow; currow->next = hr; currow = hr; next_row(currow); curfield = currow->first; } else if (*c == '.' && c[1] == 'T' && c[2] == 'E' && c[-1] == '\n') { finished = 1; while (*c++ != '\n'); if (currow->prev) currow->prev->next = NULL; currow->prev = NULL; clear_table(currow); } else if (*c == '.' && c[-1] == '\n' && !isdigit(c[1])) { /* * skip troff request inside table (usually only .sp * ) */ while (*c++ != '\n'); } else { h = c; while (*c && (*c != itemsep || c[-1] == '\\') && (*c != '\n' || c[-1] == '\\')) c++; i = 0; if (*c == itemsep) { i = 1; *c = '\n'; } if (h[0] == '\\' && h[2] == '\n' && (h[1] == '_' || h[1] == '^')) { if (curfield) { curfield->align = h[1]; do { curfield = curfield->next; } while (curfield && curfield->align == 'S'); } h = h + 3; } else { g = NULL; h = scan_troff(h, 1, &g); scan_troff(itemreset, 0, &g); if (curfield) { curfield->contents = g; do { curfield = curfield->next; } while (curfield && curfield->align == 'S'); } else if (g) free(g); } if (i) *c = itemsep; c = h; if (c[-1] == '\n') { currow = next_row(currow); curfield = currow->first; } } } /* calculate colspan and rowspan */ currow = layout; while (currow->next) currow = currow->next; while (currow) { TABLEITEM *ti, *ti1 = NULL, *ti2 = NULL; ti = currow->first; if (currow->prev) ti1 = currow->prev->first; while (ti) { switch (ti->align) { case 'S': if (ti2) { ti2->colspan++; if (ti2->rowspan < ti->rowspan) ti2->rowspan = ti->rowspan; } break; case '^': if (ti1) ti1->rowspan++; default: if (!ti2) ti2 = ti; else { do { ti2 = ti2->next; } while (ti2 && curfield->align == 'S'); } break; } ti = ti->next; if (ti1) ti1 = ti1->next; } currow = currow->prev; } /* produce html output */ if (center) out_html("<CENTER>"); if (box == 2) out_html("<TABLE BORDER><TR><TD>"); out_html("<TABLE"); if (box || border) { out_html(" BORDER"); if (!border) out_html("><TR><TD><TABLE"); if (expand) out_html(" WIDTH=100%"); } out_html(">\n"); currow = layout; while (currow) { j = 0; out_html("<TR VALIGN=top>"); curfield = currow->first; while (curfield) { if (curfield->align != 'S' && curfield->align != '^') { out_html("<TD"); switch (curfield->align) { case 'N': curfield->space += 4; case 'R': out_html(" ALIGN=right"); break; case 'C': out_html(" ALIGN=center"); default: break; } if (!curfield->valign && curfield->rowspan > 1) out_html(" VALIGN=center"); if (curfield->colspan > 1) { char buf[5]; out_html(" COLSPAN="); sprintf(buf, "%i", curfield->colspan); out_html(buf); } if (curfield->rowspan > 1) { char buf[5]; out_html(" ROWSPAN="); sprintf(buf, "%i", curfield->rowspan); out_html(buf); } j = j + curfield->colspan; out_html(">"); if (curfield->size) out_html(change_to_size(curfield->size)); if (curfield->font) out_html(change_to_font(curfield->font)); switch (curfield->align) { case '=': out_html("<HR><HR>"); break; case '_': out_html("<HR>"); break; default: if (curfield->contents) out_html(curfield->contents); break; } if (curfield->space) for (i = 0; i < curfield->space; i++) out_html("&nbsp;"); if (curfield->font) out_html(change_to_font(0)); if (curfield->size) out_html(change_to_size(0)); if (j >= maxcol && curfield->align > '@' && curfield->align != '_') out_html("<BR>"); out_html("</TD>"); } curfield = curfield->next; } out_html("</TR>\n"); currow = currow->next; } if (box && !border) out_html("</TABLE>"); out_html("</TABLE>"); if (box == 2) out_html("</TABLE>"); if (center) out_html("</CENTER>\n"); else out_html("\n"); if (!oldfillout) out_html("<PRE>"); fillout = oldfillout; out_html(change_to_size(oldsize)); out_html(change_to_font(oldfont)); return c; } static char * scan_expression(char *c, int *result) { int value = 0, value2, j = 0, sign = 1, opex = 0; char oper = 'c'; if (*c == '!') { c = scan_expression(c + 1, &value); value = (!value); } else if (*c == 'n') { c++; value = NROFF; } else if (*c == 't') { c++; value = 1 - NROFF; } else if (*c == '\'' || *c == '"' || *c < ' ' || (*c == '\\' && c[1] == '(')) { /* * ?string1?string2? test if string1 equals string2. */ char *st1 = NULL, *st2 = NULL, *h; char *tcmp = NULL; char sep; sep = *c; if (sep == '\\') { tcmp = c; c = c + 3; } c++; h = c; while (*c != sep && (!tcmp || strncmp(c, tcmp, 4))) c++; *c = '\n'; scan_troff(h, 1, &st1); *c = sep; if (tcmp) c = c + 3; c++; h = c; while (*c != sep && (!tcmp || strncmp(c, tcmp, 4))) c++; *c = '\n'; scan_troff(h, 1, &st2); *c = sep; if (!st1 && !st2) value = 1; else if (!st1 || !st2) value = 0; else value = (!strcmp(st1, st2)); if (st1) free(st1); if (st2) free(st2); if (tcmp) c = c + 3; c++; } else { while (*c && !isspace(*c) && *c != ')') { opex = 0; switch (*c) { case '(': c = scan_expression(c + 1, &value2); value2 = sign * value2; opex = 1; break; case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':{ int num = 0, denum = 1; value2 = 0; while (isdigit(*c)) value2 = value2 * 10 + ((*c++) - '0'); if (*c == '.') { c++; while (isdigit(*c)) { num = num * 10 + ((*c++) - '0'); denum = denum * 10; } } if (isalpha(*c)) { /* scale indicator */ switch (*c) { case 'i': /* inch -> 10pt */ value2 = value2 * 10 + (num * 10 + denum / 2) / denum; num = 0; break; default: break; } c++; } value2 = value2 + (num + denum / 2) / denum; value2 = sign * value2; opex = 1; break; } case '\\': c = scan_escape(c + 1); value2 = intresult * sign; if (isalpha(*c)) c++; /* scale indicator */ opex = 1; break; case '-': if (oper) { sign = -1; c++; break; } case '>': case '<': case '+': case '/': case '*': case '%': case '&': case '=': case ':': if (c[1] == '=') oper = (*c++) + 16; else oper = *c; c++; break; default: c++; break; } if (opex) { sign = 1; switch (oper) { case 'c': value = value2; break; case '-': value = value - value2; break; case '+': value = value + value2; break; case '*': value = value * value2; break; case '/': if (value2) value = value / value2; break; case '%': if (value2) value = value % value2; break; case '<': value = (value < value2); break; case '>': value = (value > value2); break; case '>' + 16: value = (value >= value2); break; case '<' + 16: value = (value <= value2); break; case '=': case '=' + 16: value = (value == value2); break; case '&': value = (value && value2); break; case ':': value = (value || value2); break; default: fprintf(stderr, "man2html: unknown operator %c.\n", oper); } oper = 0; } } if (*c == ')') c++; } *result = value; return c; } static void trans_char(char *c, char s, char t) { char *sl = c; int slash = 0; while (*sl != '\n' || slash) { if (!slash) { if (*sl == escapesym) slash = 1; else if (*sl == s) *sl = t; } else slash = 0; sl++; } } /* Remove \a from C in place. Return modified C. */ static char * unescape (char *c) { int i, l; l = strlen (c); i = 0; while (i < l && c[i]) { if (c[i] == '\a') { if (c[i+1]) strcpy(c + i, c + i + 1); /* should be memmove */ else { c[i] = '\0'; break; } } i++; } return c; } static char * fill_words(char *c, char *words[], int *n) { char *sl = c; int slash = 0; int skipspace = 0; *n = 0; words[*n] = sl; while (*sl && (*sl != '\n' || slash)) { if (!slash) { if (*sl == '"') { *sl = '\a'; skipspace = !skipspace; } else if (*sl == '\a') { /* handle already-translated " */ skipspace = !skipspace; } else if (*sl == escapesym) slash = 1; else if ((*sl == ' ' || *sl == '\t') && !skipspace) { *sl = '\n'; if (words[*n] != sl) (*n)++; words[*n] = sl + 1; } } else { if (*sl == '"') { sl--; *sl = '\n'; if (words[*n] != sl) (*n)++; sl++; while (*sl && *sl != '\n') sl++; words[*n] = sl; sl--; } slash = 0; } sl++; } if (sl != words[*n]) (*n)++; return sl; } static char *abbrev_list[] = { "GSBG", "Getting Started ", "SUBG", "Customizing SunOS", "SHBG", "Basic Troubleshooting", "SVBG", "SunView User's Guide", "MMBG", "Mail and Messages", "DMBG", "Doing More with SunOS", "UNBG", "Using the Network", "GDBG", "Games, Demos &amp; Other Pursuits", "CHANGE", "SunOS 4.1 Release Manual", "INSTALL", "Installing SunOS 4.1", "ADMIN", "System and Network Administration", "SECUR", "Security Features Guide", "PROM", "PROM User's Manual", "DIAG", "Sun System Diagnostics", "SUNDIAG", "Sundiag User's Guide", "MANPAGES", "SunOS Reference Manual", "REFMAN", "SunOS Reference Manual", "SSI", "Sun System Introduction", "SSO", "System Services Overview", "TEXT", "Editing Text Files", "DOCS", "Formatting Documents", "TROFF", "Using <B>nroff</B> and <B>troff</B>", "INDEX", "Global Index", "CPG", "C Programmer's Guide", "CREF", "C Reference Manual", "ASSY", "Assembly Language Reference", "PUL", "Programming Utilities and Libraries", "DEBUG", "Debugging Tools", "NETP", "Network Programming", "DRIVER", "Writing Device Drivers", "STREAMS", "STREAMS Programming", "SBDK", "SBus Developer's Kit", "WDDS", "Writing Device Drivers for the SBus", "FPOINT", "Floating-Point Programmer's Guide", "SVPG", "SunView 1 Programmer's Guide", "SVSPG", "SunView 1 System Programmer's Guide", "PIXRCT", "Pixrect Reference Manual", "CGI", "SunCGI Reference Manual", "CORE", "SunCore Reference Manual", "4ASSY", "Sun-4 Assembly Language Reference", "SARCH", "<FONT SIZE=-1>SPARC</FONT> Architecture Manual", "KR", "The C Programming Language", NULL, NULL}; static char * lookup_abbrev(char *c) { int i = 0; if (!c) return ""; while (abbrev_list[i] && strcmp(c, abbrev_list[i])) i = i + 2; if (abbrev_list[i]) return abbrev_list[i + 1]; else return c; } static char manidx[NULL_TERMINATED(HUGE_STR_MAX)]; static int subs = 0; static int mip = 0; static char label[5] = "lbAA"; static void add_to_index(int level, char *item) { char *c = NULL; label[3]++; if (label[3] > 'Z') { label[3] = 'A'; label[2]++; } if (level != subs) { if (subs) { strmaxcpy(manidx + mip, "</DL>\n", HUGE_STR_MAX - mip); mip += 6; } else { strmaxcpy(manidx + mip, "<DL>\n", HUGE_STR_MAX - mip); mip += 5; } } subs = level; scan_troff(item, 1, &c); sprintf(manidx + mip, "<DT><A HREF=\"#%s\">%s</A><DD>\n", label, c); if (c) free(c); while (manidx[mip]) mip++; } static char * skip_till_newline(char *c) { int lvl = 0; while (*c && *c != '\n' || lvl > 0) { if (*c == '\\') { c++; if (*c == '}') lvl--; else if (*c == '{') lvl++; } c++; } c++; if (lvl < 0 && newline_for_fun) { newline_for_fun = newline_for_fun + lvl; if (newline_for_fun < 0) newline_for_fun = 0; } return c; } static void outputPageHeader(char *l, char *c, char *r) { out_html("<TABLE WIDTH=100%>\n<TR>\n"); out_html("<TH ALIGN=LEFT width=33%>"); out_html(l); out_html("<TH ALIGN=CENTER width=33%>"); out_html(c); out_html("<TH ALIGN=RIGHT width=33%>"); out_html(r); out_html("\n</TR>\n</TABLE>\n"); } static void outputPageFooter(char *l, char *c, char *r) { out_html("<HR>\n"); outputPageHeader(l, c, r); } static int ifelseval = 0; static char * scan_request(char *c) { /* BSD Mandoc stuff */ static int mandoc_synopsis = 0; /* True if we are in the synopsis * section */ static int mandoc_command = 0; /* True if this is mandoc page */ static int mandoc_bd_options; /* Only copes with non-nested Bd's */ int i, j, mode = 0; char *h; char *wordlist[MAX_WORDLIST]; int words; char *sl; STRDEF *owndef; while (*c == ' ' || *c == '\t') c++; if (c[0] == '\n') return c + 1; if (c[1] == '\n') j = 1; else j = 2; while (c[j] == ' ' || c[j] == '\t') j++; if (c[0] == escapesym) { /* some pages use .\" .\$1 .\} */ /* .\$1 is too difficult/stupid */ if (c[1] == '$') c = skip_till_newline(c); else c = scan_escape(c + 1); } else { i = V(c[0], c[1]); switch (i) { case V('a', 'b'): h = c + j; while (*h && *h != '\n') h++; *h = '\0'; if (scaninbuff && buffpos) { buffer[buffpos] = '\0'; puts(buffer); } /* fprintf(stderr, "%s\n", c+2); */ exit(0); break; case V('d', 'i'): { STRDEF *de; int oldcurpos = curpos; c = c + j; i = V(c[0], c[1]); if (*c == '\n') { c++; break; } while (*c && *c != '\n') c++; c++; h = c; while (*c && strncmp(c, ".di", 3)) while (*c && *c++ != '\n'); *c = '\0'; de = strdef; while (de && de->nr != i) de = de->next; if (!de) { de = (STRDEF *) malloc(sizeof(STRDEF)); de->nr = i; de->slen = 0; de->next = strdef; de->st = NULL; strdef = de; } else { if (de->st) free(de->st); de->slen = 0; de->st = NULL; } scan_troff(h, 0, &de->st); *c = '.'; while (*c && *c++ != '\n'); break; } case V('d', 's'): mode = 1; case V('a', 's'): { STRDEF *de; int oldcurpos = curpos; c = c + j; i = V(c[0], c[1]); j = 0; while (c[j] && c[j] != '\n') j++; if (j < 3) { c = c + j; break; } if (c[1] == ' ') c = c + 1; else c = c + 2; while (isspace(*c)) c++; if (*c == '"') c++; de = strdef; while (de && de->nr != i) de = de->next; single_escape = 1; curpos = 0; if (!de) { char *h; de = (STRDEF *) malloc(sizeof(STRDEF)); de->nr = i; de->slen = 0; de->next = strdef; de->st = NULL; strdef = de; h = NULL; c = scan_troff(c, 1, &h); de->st = h; de->slen = curpos; } else { if (mode) { char *h = NULL; c = scan_troff(c, 1, &h); free(de->st); de->slen = 0; de->st = h; } else c = scan_troff(c, 1, &de->st); de->slen += curpos; } single_escape = 0; curpos = oldcurpos; } break; case V('b', 'r'): if (still_dd) out_html("<DD>"); else out_html("<BR>\n"); curpos = 0; c = c + j; if (c[0] == escapesym) { c = scan_escape(c + 1); } c = skip_till_newline(c); break; case V('c', '2'): c = c + j; if (*c != '\n') { nobreaksym = *c; } else nobreaksym = '\''; c = skip_till_newline(c); break; case V('c', 'c'): c = c + j; if (*c != '\n') { controlsym = *c; } else controlsym = '.'; c = skip_till_newline(c); break; case V('c', 'e'): c = c + j; if (*c == '\n') { i = 1; } else { i = 0; while ('0' <= *c && *c <= '9') { i = i * 10 + *c - '0'; c++; } } c = skip_till_newline(c); /* center next i lines */ if (i > 0) { out_html("<CENTER>\n"); while (i && *c) { char *line = NULL; c = scan_troff(c, 1, &line); if (line && strncmp(line, "<BR>", 4)) { out_html(line); out_html("<BR>\n"); i--; } } out_html("</CENTER>\n"); curpos = 0; } break; case V('e', 'c'): c = c + j; if (*c != '\n') { escapesym = *c; } else escapesym = '\\'; break; c = skip_till_newline(c); case V('e', 'o'): escapesym = '\0'; c = skip_till_newline(c); break; case V('e', 'x'): exit(0); break; case V('f', 'c'): c = c + j; if (*c == '\n') { fieldsym = padsym = '\0'; } else { fieldsym = c[0]; padsym = c[1]; } c = skip_till_newline(c); break; case V('f', 'i'): if (!fillout) { out_html(change_to_font(0)); out_html(change_to_size('0')); out_html("</PRE>\n"); } curpos = 0; fillout = 1; c = skip_till_newline(c); break; case V('f', 't'): c = c + j; if (*c == '\n') { out_html(change_to_font(0)); } else { if (*c == escapesym) { int fn; c = scan_expression(c, &fn); c--; out_html(change_to_font(fn)); } else { out_html(change_to_font(*c)); c++; } } c = skip_till_newline(c); break; case V('e', 'l'): /* .el anything : else part of if else */ if (ifelseval) { c = c + j; c[-1] = '\n'; c = scan_troff(c, 1, NULL); } else c = skip_till_newline(c + j); break; case V('i', 'e'): /* .ie c anything : then part of if else */ case V('i', 'f'): /* * .if c anything .if !c anything .if N anything .if * !N anything .if 'string1'string2' anything .if * !'string1'string2' anything */ c = c + j; c = scan_expression(c, &i); ifelseval = !i; if (i) { *c = '\n'; c++; c = scan_troff(c, 1, NULL); } else c = skip_till_newline(c); break; case V('i', 'g'): { char *endwith = "..\n"; i = 3; c = c + j; if (*c != '\n') { endwith = c - 1; i = 1; c[-1] = '.'; while (*c && *c != '\n') c++, i++; } c++; while (*c && strncmp(c, endwith, i)) while (*c++ != '\n'); while (*c++ != '\n'); break; } case V('n', 'f'): if (fillout) { out_html(change_to_font(0)); out_html(change_to_size('0')); out_html("<PRE>\n"); } curpos = 0; fillout = 0; c = skip_till_newline(c); break; case V('p', 's'): c = c + j; if (*c == '\n') { out_html(change_to_size('0')); } else { j = 0; i = 0; if (*c == '-') { j = -1; c++; } else if (*c == '+') { j = 1; c++; } c = scan_expression(c, &i); if (!j) { j = 1; if (i > 5) i = i - 10; } out_html(change_to_size(i * j)); } c = skip_till_newline(c); break; case V('s', 'p'): c = c + j; if (fillout) out_html("<P>"); else { out_html(NEWLINE); NEWLINE[0] = '\n'; } curpos = 0; c = skip_till_newline(c); break; case V('s', 'o'): { FILE *f; struct stat stbuf; int l = 0; char *buf; char *name = NULL; curpos = 0; c = c + j; if (*c == '/') { h = c; } else { h = c - 3; h[0] = '.'; h[1] = '.'; h[2] = '/'; } while (*c != '\n') c++; *c = '\0'; scan_troff(h, 1, &name); if (name[3] == '/') h = name + 3; else h = name; if (stat(h, &stbuf) != -1) l = stbuf.st_size; buf = stralloc(l + 4); #if NOCGI if (!out_length) { char *t, *s; t = strrchr(fname, '/'); if (!t) t = fname; fprintf(stderr, "ln -s %s.html %s.html\n", h, t); s = strrchr(t, '.'); if (!s) s = t; printf("<HTML><HEAD><TITLE> Manpage of %s</TITLE>\n" "</HEAD><BODY>\n" "See the manpage for <A HREF=\"%s.html\">%s</A>.\n" "</BODY></HTML>\n", s, h, h); } else #endif { /* * this works alright, except for * section 3 */ buf = read_man_page(h); if (!buf) { fprintf(stderr, "man2html: unable to open or read file %s.\n", h); out_html("<BLOCKQUOTE>" "man2html: unable to open or read file.\n"); out_html(h); out_html("</BLOCKQUOTE>\n"); } else { buf[0] = buf[l] = '\n'; buf[l + 1] = buf[l + 2] = '\0'; scan_troff(buf + 1, 0, NULL); } if (buf) free(buf); } *c++ = '\n'; break; } case V('t', 'a'): c = c + j; j = 0; while (*c != '\n') { sl = scan_expression(c, &tabstops[j]); if (*c == '-' || *c == '+') tabstops[j] += tabstops[j - 1]; c = sl; while (*c == ' ' || *c == '\t') c++; j++; } maxtstop = j; curpos = 0; break; case V('t', 'i'): /* * while (itemdepth || dl_set[itemdepth]) { * out_html("</DL>\n"); if (dl_set[itemdepth]) * dl_set[itemdepth]=0; else itemdepth--; } */ out_html("<BR>\n"); c = c + j; c = scan_expression(c, &j); for (i = 0; i < j; i++) out_html("&nbsp;"); curpos = j; c = skip_till_newline(c); break; case V('t', 'm'): c = c + j; h = c; while (*c != '\n') c++; *c = '\0'; /* fprintf(stderr,"%s\n", h); */ *c = '\n'; break; case V('B', ' '): case V('B', '\n'): case V('I', ' '): case V('I', '\n'): /* parse one line in a certain font */ out_html(change_to_font(*c)); trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; c = scan_troff(c, 1, NULL); out_html(change_to_font('R')); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('O', 'P'): /* groff manpages use this * construction */ /* .OP a b : [ <B>a</B> <I>b</I> ] */ mode = 1; c[0] = 'B'; c[1] = 'I'; out_html(change_to_font('R')); out_html("["); curpos++; case V('B', 'R'): case V('B', 'I'): case V('I', 'B'): case V('I', 'R'): case V('R', 'B'): case V('R', 'I'): { char font[2]; font[0] = c[0]; font[1] = c[1]; c = c + j; if (*c == '\n') c++; sl = fill_words(c, wordlist, &words); c = sl + 1; /* * .BR name (section) indicates a link. It * will be added in the output routine. */ for (i = 0; i < words; i++) { if (mode) { out_html(" "); curpos++; } wordlist[i][-1] = ' '; out_html(change_to_font(font[i & 1])); scan_troff(wordlist[i], 1, NULL); } out_html(change_to_font('R')); if (mode) { out_html(" ]"); curpos++; } out_html(NEWLINE); if (!fillout) curpos = 0; else curpos++; } break; case V('D', 'T'): for (j = 0; j < 20; j++) tabstops[j] = (j + 1) * 8; maxtstop = 20; c = skip_till_newline(c); break; case V('I', 'P'): sl = fill_words(c + j, wordlist, &words); c = sl + 1; if (!dl_set[itemdepth]) { out_html("<DL COMPACT>\n"); dl_set[itemdepth] = 1; } out_html("<DT>"); if (words) { scan_troff(wordlist[0], 1, NULL); } out_html("<DD>"); curpos = 0; break; case V('T', 'P'): if (!dl_set[itemdepth]) { out_html("<DL COMPACT>\n"); dl_set[itemdepth] = 1; } out_html("<DT>"); c = skip_till_newline(c); /* somewhere a definition ends with '.TP' */ if (!*c) still_dd = 1; else { c = scan_troff(c, 1, NULL); out_html("<DD>"); } curpos = 0; break; case V('I', 'X'): /* general index */ sl = fill_words(c + j, wordlist, &words); c = sl + 1; j = 4; while (idxlabel[j] == 'Z') idxlabel[j--] = 'A'; idxlabel[j]++; #ifdef MAKEINDEX fprintf(idxfile, "%s@%s@", fname, idxlabel); for (j = 0; j < words; j++) { h = NULL; scan_troff(wordlist[j], 1, &h); fprintf(idxfile, "_\b@%s", h); free(h); } fprintf(idxfile, "\n"); #endif out_html("<A NAME=\""); out_html(idxlabel); /* * this will not work in mosaic (due to a bug). * Adding '&nbsp;' between '>' and '<' solves it, but * creates some space. A normal space does not work. */ out_html("\"></A>"); break; case V('L', 'P'): case V('P', 'P'): if (dl_set[itemdepth]) { out_html("</DL>\n"); dl_set[itemdepth] = 0; } if (fillout) out_html("<P>\n"); else { out_html(NEWLINE); NEWLINE[0] = '\n'; } curpos = 0; c = skip_till_newline(c); break; case V('H', 'P'): if (!dl_set[itemdepth]) { out_html("<DL COMPACT>"); dl_set[itemdepth] = 1; } out_html("<DT>\n"); still_dd = 1; c = skip_till_newline(c); curpos = 0; break; case V('P', 'D'): c = skip_till_newline(c); break; case V('R', 's'): /* BSD mandoc */ case V('R', 'S'): sl = fill_words(c + j, wordlist, &words); j = 1; if (words > 0) scan_expression(wordlist[0], &j); if (j >= 0) { itemdepth++; dl_set[itemdepth] = 0; out_html("<DL COMPACT><DT><DD>"); c = skip_till_newline(c); curpos = 0; break; } case V('R', 'e'): /* BSD mandoc */ case V('R', 'E'): if (itemdepth > 0) { if (dl_set[itemdepth]) out_html("</DL>"); out_html("</DL>\n"); itemdepth--; } c = skip_till_newline(c); curpos = 0; break; case V('S', 'B'): out_html(change_to_size(-1)); out_html(change_to_font('B')); c = scan_troff(c + j, 1, NULL); out_html(change_to_font('R')); out_html(change_to_size('0')); break; case V('S', 'M'): c = c + j; if (*c == '\n') c++; out_html(change_to_size(-1)); trans_char(c, '"', '\a'); c = scan_troff(c, 1, NULL); out_html(change_to_size('0')); break; case V('S', 's'): /* BSD mandoc */ mandoc_command = 1; case V('S', 'S'): mode = 1; case V('S', 'h'): /* BSD mandoc */ /* hack for fallthru from above */ mandoc_command = !mode || mandoc_command; case V('S', 'H'): c = c + j; if (*c == '\n') c++; while (itemdepth || dl_set[itemdepth]) { out_html("</DL>\n"); if (dl_set[itemdepth]) dl_set[itemdepth] = 0; else if (itemdepth > 0) itemdepth--; } out_html(change_to_font(0)); out_html(change_to_size(0)); if (!fillout) { fillout = 1; out_html("</PRE>"); } trans_char(c, '"', '\a'); add_to_index(mode, c); out_html("<A NAME=\""); out_html(label); /* &nbsp; for mosaic users */ if (mode) out_html("\">&nbsp;</A>\n<H4>"); else out_html("\">&nbsp;</A>\n<H3>"); mandoc_synopsis = strncmp(c, "SYNOPSIS", 8) == 0; c = mandoc_command ? scan_troff_mandoc(c, 1, NULL) : scan_troff(c, 1, NULL); if (mode) out_html("</H4>\n"); else out_html("</H3>\n"); curpos = 0; break; case V('T', 'S'): c = scan_table(c); break; case V('D', 't'): /* BSD mandoc */ mandoc_command = 1; case V('T', 'H'): if (!output_possible) { sl = fill_words(c + j, wordlist, &words); if (words > 1) { char *t; for (i = 1; i < words; i++) wordlist[i][-1] = '\0'; *sl = '\0'; output_possible = 1; sprintf(th_page_and_sec, "%s(%s)", wordlist[0], wordlist[1]); if (words > 2) { t = unescape(wordlist[2]); strncpy(th_datestr, t, sizeof(th_datestr)); th_datestr[sizeof(th_datestr) - 1] = '\0'; } else th_datestr[0] = '\0'; if (words > 3) { t = unescape(wordlist[3]); strncpy(th_version, t, sizeof(th_version)); th_version[sizeof(th_version) - 1] = '\0'; } else th_version[0] = '\0'; out_html("<HTML><HEAD>\n<TITLE>"); out_html(th_page_and_sec); out_html(" Manual Page"); out_html("</TITLE>\n</HEAD>\n<BODY>"); outputPageHeader(th_page_and_sec, th_datestr, th_page_and_sec); out_html("<BR><A HREF=\"#index\">Index</A>\n"); *sl = '\n'; out_html("<HR>\n"); if (mandoc_command) out_html("<BR>BSD mandoc<BR>"); } c = sl + 1; } else c = skip_till_newline(c); curpos = 0; break; case V('T', 'X'): sl = fill_words(c + j, wordlist, &words); *sl = '\0'; out_html(change_to_font('I')); if (words > 1) wordlist[1][-1] = '\0'; c = lookup_abbrev(wordlist[0]); curpos += strlen(c); out_html(c); out_html(change_to_font('R')); if (words > 1) out_html(wordlist[1]); *sl = '\n'; c = sl + 1; break; case V('r', 'm'): /* .rm xx : Remove request, macro or string */ case V('r', 'n'): /* * .rn xx yy : Rename request, macro or string xx to * yy */ { STRDEF *de; c = c + j; i = V(c[0], c[1]); c = c + 2; while (isspace(*c) && *c != '\n') c++; j = V(c[0], c[1]); while (*c && *c != '\n') c++; c++; de = strdef; while (de && de->nr != j) de = de->next; if (de) { if (de->st) free(de->st); de->nr = 0; } de = strdef; while (de && de->nr != i) de = de->next; if (de) de->nr = j; break; } case V('n', 'x'): /* .nx filename : next file. */ case V('i', 'n'): /* .in +-N : Indent */ c = skip_till_newline(c); break; case V('n', 'r'): /* * .nr R +-N M: define and set number register R by * +-N; auto-increment by M */ { INTDEF *intd; c = c + j; i = V(c[0], c[1]); c = c + 2; intd = intdef; while (intd && intd->nr != i) intd = intd->next; if (!intd) { intd = (INTDEF *) malloc(sizeof(INTDEF)); intd->nr = i; intd->val = 0; intd->incr = 0; intd->next = intdef; intdef = intd; } while (*c == ' ' || *c == '\t') c++; c = scan_expression(c, &intd->val); if (*c != '\n') { while (*c == ' ' || *c == '\t') c++; c = scan_expression(c, &intd->incr); } c = skip_till_newline(c); break; } case V('a', 'm'): /* .am xx yy : append to a macro. */ /* define or handle as .ig yy */ mode = 1; case V('d', 'e'): /* * .de xx yy : define or redefine macro xx; end at * .yy (..) */ /* define or handle as .ig yy */ { STRDEF *de; int olen = 0; c = c + j; sl = fill_words(c, wordlist, &words); i = V(c[0], c[1]); j = 2; if (words == 1) wordlist[1] = ".."; else { wordlist[1]--; wordlist[1][0] = '.'; j = 3; } c = sl + 1; sl = c; while (*c && strncmp(c, wordlist[1], j)) c = skip_till_newline(c); de = defdef; while (de && de->nr != i) de = de->next; if (mode && de) olen = strlen(de->st); j = olen + c - sl; h = stralloc(j * 2 + 4); if (h) { for (j = 0; j < olen; j++) h[j] = de->st[j]; if (!j || h[j - 1] != '\n') h[j++] = '\n'; while (sl != c) { if (sl[0] == '\\' && sl[1] == '\\') { h[j++] = '\\'; sl++; } else h[j++] = *sl; sl++; } h[j] = '\0'; if (de) { if (de->st) free(de->st); de->st = h; } else { de = (STRDEF *) malloc(sizeof(STRDEF)); de->nr = i; de->next = defdef; de->st = h; defdef = de; } } } c = skip_till_newline(c); break; case V('B', 'l'): /* BSD mandoc */ { char list_options[NULL_TERMINATED(MED_STR_MAX)]; char *nl = strchr(c, '\n'); c = c + j; if (dl_set[itemdepth]) { /* These things can * nest. */ itemdepth++; } if (nl) { /* Parse list options */ strlimitcpy(list_options, c, nl - c, MED_STR_MAX); } if (strstr(list_options, "-bullet")) { /* HTML Unnumbered List */ dl_set[itemdepth] = BL_BULLET_LIST; out_html("<UL>\n"); } else if (strstr(list_options, "-enum")) { /* HTML Ordered List */ dl_set[itemdepth] = BL_ENUM_LIST; out_html("<OL>\n"); } else { /* HTML Descriptive List */ dl_set[itemdepth] = BL_DESC_LIST; out_html("<DL COMPACT>\n"); } if (fillout) out_html("<P>\n"); else { out_html(NEWLINE); NEWLINE[0] = '\n'; } curpos = 0; c = skip_till_newline(c); break; } case V('E', 'l'): /* BSD mandoc */ c = c + j; if (dl_set[itemdepth] & BL_DESC_LIST) { out_html("</DL>\n"); } else if (dl_set[itemdepth] & BL_BULLET_LIST) { out_html("</UL>\n"); } else if (dl_set[itemdepth] & BL_ENUM_LIST) { out_html("</OL>\n"); } dl_set[itemdepth] = 0; if (itemdepth > 0) itemdepth--; if (fillout) out_html("<P>\n"); else { out_html(NEWLINE); NEWLINE[0] = '\n'; } curpos = 0; c = skip_till_newline(c); break; case V('I', 't'): /* BSD mandoc */ c = c + j; if (strncmp(c, "Xo", 2) == 0 && isspace(*(c + 2))) { c = skip_till_newline(c); } if (dl_set[itemdepth] & BL_DESC_LIST) { out_html("<DT>"); out_html(change_to_font('B')); if (*c == '\n') { /* Don't allow embedded * comms after a newline */ c++; c = scan_troff(c, 1, NULL); } else { /* Do allow embedded comms on * the same line. */ c = scan_troff_mandoc(c, 1, NULL); } out_html(change_to_font('R')); out_html(NEWLINE); out_html("<DD>"); } else if (dl_set[itemdepth] & (BL_BULLET_LIST | BL_ENUM_LIST)) { out_html("<LI>"); c = scan_troff_mandoc(c, 1, NULL); out_html(NEWLINE); } if (fillout) curpos++; else curpos = 0; break; case V('B', 'k'): /* BSD mandoc */ case V('E', 'k'): /* BSD mandoc */ case V('D', 'd'): /* BSD mandoc */ case V('O', 's'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; c = scan_troff_mandoc(c, 1, NULL); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('B', 't'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; out_html(" is currently in beta test."); if (fillout) curpos++; else curpos = 0; break; case V('B', 'x'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html("BSD "); c = scan_troff_mandoc(c, 1, NULL); if (fillout) curpos++; else curpos = 0; break; case V('D', 'l'): /* BSD mandoc */ c = c + j; out_html(NEWLINE); out_html("<BLOCKQUOTE>"); out_html(change_to_font('L')); if (*c == '\n') c++; c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); out_html("</BLOCKQUOTE>"); if (fillout) curpos++; else curpos = 0; break; case V('B', 'd'): /* BSD mandoc */ { /* Seems like a kind of example/literal mode */ char bd_options[NULL_TERMINATED(MED_STR_MAX)]; char *nl = strchr(c, '\n'); c = c + j; if (nl) { strlimitcpy(bd_options, c, nl - c, MED_STR_MAX); } out_html(NEWLINE); mandoc_bd_options = 0; /* Remember options for * terminating Bl */ if (strstr(bd_options, "-offset indent")) { mandoc_bd_options |= BD_INDENT; out_html("<BLOCKQUOTE>\n"); } if (strstr(bd_options, "-literal") || strstr(bd_options, "-unfilled")) { if (fillout) { mandoc_bd_options |= BD_LITERAL; out_html(change_to_font(0)); out_html(change_to_size('0')); out_html("<PRE>\n"); } curpos = 0; fillout = 0; } c = skip_till_newline(c); break; } case V('E', 'd'): /* BSD mandoc */ if (mandoc_bd_options & BD_LITERAL) { if (!fillout) { out_html(change_to_font(0)); out_html(change_to_size('0')); out_html("</PRE>\n"); } } if (mandoc_bd_options & BD_INDENT) out_html("</BLOCKQUOTE>\n"); curpos = 0; fillout = 1; c = skip_till_newline(c); break; case V('B', 'e'): /* BSD mandoc */ c = c + j; if (fillout) out_html("<P>"); else { out_html(NEWLINE); NEWLINE[0] = '\n'; } curpos = 0; c = skip_till_newline(c); break; case V('X', 'r'): /* BSD mandoc */ { /* * Translate xyz 1 to xyz(1) Allow for * multiple spaces. Allow the section to be * missing. */ char buff[NULL_TERMINATED(MED_STR_MAX)]; char *bufptr; trans_char(c, '"', '\a'); bufptr = buff; c = c + j; if (*c == '\n') c++; /* Skip spaces */ while (isspace(*c) && *c != '\n') c++; while (isalnum(*c)) { /* Copy the xyz part */ *bufptr = *c; bufptr++; if (bufptr >= buff + MED_STR_MAX) break; c++; } while (isspace(*c) && *c != '\n') c++; /* Skip spaces */ if (isdigit(*c)) { /* Convert the number if * there is one */ *bufptr = '('; bufptr++; if (bufptr < buff + MED_STR_MAX) { while (isalnum(*c)) { *bufptr = *c; bufptr++; if (bufptr >= buff + MED_STR_MAX) break; c++; } if (bufptr < buff + MED_STR_MAX) { *bufptr = ')'; bufptr++; } } } while (*c != '\n') { /* Copy the remainder */ if (!isspace(*c)) { *bufptr = *c; bufptr++; if (bufptr >= buff + MED_STR_MAX) break; } c++; } *bufptr = '\n'; scan_troff_mandoc(buff, 1, NULL); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; } break; case V('F', 'l'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; out_html("-"); if (*c != '\n') { out_html(change_to_font('B')); c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); } out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('P', 'a'): /* BSD mandoc */ case V('P', 'f'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; c = scan_troff_mandoc(c, 1, NULL); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('P', 'p'): /* BSD mandoc */ if (fillout) out_html("<P>\n"); else { out_html(NEWLINE); NEWLINE[0] = '\n'; } curpos = 0; c = skip_till_newline(c); break; case V('D', 'q'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html("``"); c = scan_troff_mandoc(c, 1, NULL); out_html("''"); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('O', 'p'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html(change_to_font('R')); out_html("["); c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); out_html("]"); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('O', 'o'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html(change_to_font('R')); out_html("["); c = scan_troff_mandoc(c, 1, NULL); if (fillout) curpos++; else curpos = 0; break; case V('O', 'c'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); out_html("]"); if (fillout) curpos++; else curpos = 0; break; case V('P', 'q'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html("("); c = scan_troff_mandoc(c, 1, NULL); out_html(")"); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('Q', 'l'): /* BSD mandoc */ { /* Single quote first word in the line */ char *sp; trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; sp = c; do { /* Find first whitespace after the * first word that isn't a mandoc * macro */ while (*sp && isspace(*sp)) sp++; while (*sp && !isspace(*sp)) sp++; } while (*sp && isupper(*(sp - 2)) && islower(*(sp - 1))); /* * Use a newline to mark the end of text to * be quoted */ if (*sp) *sp = '\n'; out_html("`"); /* Quote the text */ c = scan_troff_mandoc(c, 1, NULL); out_html("'"); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; } case V('S', 'q'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html("`"); c = scan_troff_mandoc(c, 1, NULL); out_html("'"); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('A', 'r'): /* BSD mandoc */ /* parse one line in italics */ out_html(change_to_font('I')); trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') { /* An empty Ar means "file * ..." */ out_html("file ..."); } else { c = scan_troff_mandoc(c, 1, NULL); } out_html(change_to_font('R')); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('A', 'd'): /* BSD mandoc */ case V('E', 'm'): /* BSD mandoc */ case V('V', 'a'): /* BSD mandoc */ case V('X', 'c'): /* BSD mandoc */ /* parse one line in italics */ out_html(change_to_font('I')); trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('N', 'd'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html(" - "); c = scan_troff_mandoc(c, 1, NULL); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('N', 'm'): /* BSD mandoc */ { static char mandoc_name[NULL_TERMINATED(SMALL_STR_MAX)] = ""; trans_char(c, '"', '\a'); c = c + j; if (mandoc_synopsis) { /* Break lines only in * the Synopsis. The * Synopsis section * seems to be treated * as a special case - * Bummer! */ static int count = 0; /* Don't break on the * first Nm */ if (count) { out_html("<BR>"); } else { char *end = strchr(c, '\n'); if (end) { /* Remember the name for * later. */ strlimitcpy(mandoc_name, c, end - c, SMALL_STR_MAX); } } count++; } out_html(change_to_font('B')); while (*c == ' ' || *c == '\t') c++; if (*c == '\n') { /* If Nm has no * argument, use one * from an earlier Nm * command that did have * one. Hope there * aren't too many * commands that do * this. */ out_html(mandoc_name); } else { c = scan_troff_mandoc(c, 1, NULL); } out_html(change_to_font('R')); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; } case V('C', 'd'): /* BSD mandoc */ case V('C', 'm'): /* BSD mandoc */ case V('I', 'c'): /* BSD mandoc */ case V('M', 's'): /* BSD mandoc */ case V('O', 'r'): /* BSD mandoc */ case V('S', 'y'): /* BSD mandoc */ /* parse one line in bold */ out_html(change_to_font('B')); trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('D', 'v'): /* BSD mandoc */ case V('E', 'v'): /* BSD mandoc */ case V('F', 'r'): /* BSD mandoc */ case V('L', 'i'): /* BSD mandoc */ case V('N', 'o'): /* BSD mandoc */ case V('N', 's'): /* BSD mandoc */ case V('T', 'n'): /* BSD mandoc */ case V('n', 'N'): /* BSD mandoc */ trans_char(c, '"', '\a'); c = c + j; if (*c == '\n') c++; out_html(change_to_font('B')); c = scan_troff_mandoc(c, 1, NULL); out_html(change_to_font('R')); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; break; case V('%', 'A'): /* BSD mandoc biblio stuff */ case V('%', 'D'): case V('%', 'N'): case V('%', 'O'): case V('%', 'P'): case V('%', 'Q'): case V('%', 'V'): c = c + j; if (*c == '\n') c++; c = scan_troff(c, 1, NULL); /* Don't allow embedded * mandoc coms */ if (fillout) curpos++; else curpos = 0; break; case V('%', 'B'): case V('%', 'J'): case V('%', 'R'): case V('%', 'T'): c = c + j; out_html(change_to_font('I')); if (*c == '\n') c++; c = scan_troff(c, 1, NULL); /* Don't allow embedded * mandoc coms */ out_html(change_to_font('R')); if (fillout) curpos++; else curpos = 0; break; default: /* search macro database of self-defined macros */ owndef = defdef; while (owndef && owndef->nr != i) owndef = owndef->next; if (owndef) { char **oldargument; int deflen; int onff; sl = fill_words(c + j, wordlist, &words); c = sl + 1; *sl = '\0'; for (i = 1; i < words; i++) wordlist[i][-1] = '\0'; for (i = 0; i < words; i++) { char *h = NULL; if (mandoc_command) { scan_troff_mandoc(wordlist[i], 1, &h); } else { scan_troff(wordlist[i], 1, &h); } wordlist[i] = h; } for (i = words; i < 20; i++) wordlist[i] = NULL; deflen = strlen(owndef->st); for (i = 0; owndef->st[deflen + 2 + i] = owndef->st[i]; i++); oldargument = argument; argument = wordlist; onff = newline_for_fun; if (mandoc_command) { scan_troff_mandoc(owndef->st + deflen + 2, 0, NULL); } else { scan_troff(owndef->st + deflen + 2, 0, NULL); } newline_for_fun = onff; argument = oldargument; for (i = 0; i < words; i++) if (wordlist[i]) free(wordlist[i]); *sl = '\n'; } else if (mandoc_command && ((isupper(*c) && islower(*(c + 1))) || (islower(*c) && isupper(*(c + 1)))) ) { /* Let through any BSD mandoc * commands that haven't been delt * with. I don't want to miss * anything out of the text. */ char buf[4]; strncpy(buf, c, 2); buf[2] = ' '; buf[3] = '\0'; out_html(buf); /* Print the command (it * might just be text). */ c = c + j; trans_char(c, '"', '\a'); if (*c == '\n') c++; out_html(change_to_font('R')); c = scan_troff(c, 1, NULL); out_html(NEWLINE); if (fillout) curpos++; else curpos = 0; } else { c = skip_till_newline(c); } break; } } if (fillout) { out_html(NEWLINE); curpos++; } NEWLINE[0] = '\n'; return c; } static void flush(void) { } static int contained_tab = 0; static int mandoc_line = 0; /* Signals whether to look for embedded * mandoc commands. */ /* san : stop at newline */ static char * scan_troff(char *c, int san, char **result) { char *h; char intbuff[NULL_TERMINATED(MED_STR_MAX)]; int ibp = 0; int i; char *exbuffer; int exbuffpos, exbuffmax, exscaninbuff, exnewline_for_fun; int usenbsp = 0; #define FLUSHIBP if (ibp) { intbuff[ibp]=0; out_html(intbuff); ibp=0; } exbuffer = buffer; exbuffpos = buffpos; exbuffmax = buffmax; exnewline_for_fun = newline_for_fun; exscaninbuff = scaninbuff; newline_for_fun = 0; if (result) { if (*result) { buffer = *result; buffpos = strlen(buffer); buffmax = buffpos; } else { buffer = stralloc(LARGE_STR_MAX); buffpos = 0; buffmax = LARGE_STR_MAX; } scaninbuff = 1; } h = c; /* start scanning */ while (*h && (!san || newline_for_fun || *h != '\n')) { if (*h == escapesym) { h++; FLUSHIBP; h = scan_escape(h); } else if (*h == controlsym && h[-1] == '\n') { h++; FLUSHIBP; h = scan_request(h); if (san && h[-1] == '\n') h--; } else if (mandoc_line && *(h) && isupper(*(h)) && *(h + 1) && islower(*(h + 1)) && *(h + 2) && isspace(*(h + 2))) { /* * BSD imbedded command eg ".It Fl Ar arg1 Fl Ar * arg2" */ FLUSHIBP; h = scan_request(h); if (san && h[-1] == '\n') h--; } else if (*h == nobreaksym && h[-1] == '\n') { h++; FLUSHIBP; h = scan_request(h); if (san && h[-1] == '\n') h--; } else { int mx; if (h[-1] == '\n' && still_dd && isalnum(*h)) { /* * sometimes a .HP request is not followed by * a .br request */ FLUSHIBP; out_html("<DD>"); curpos = 0; still_dd = 0; } switch (*h) { case '&': intbuff[ibp++] = '&'; intbuff[ibp++] = 'a'; intbuff[ibp++] = 'm'; intbuff[ibp++] = 'p'; intbuff[ibp++] = ';'; curpos++; break; case '<': intbuff[ibp++] = '&'; intbuff[ibp++] = 'l'; intbuff[ibp++] = 't'; intbuff[ibp++] = ';'; curpos++; break; case '>': intbuff[ibp++] = '&'; intbuff[ibp++] = 'g'; intbuff[ibp++] = 't'; intbuff[ibp++] = ';'; curpos++; break; case '"': intbuff[ibp++] = '&'; intbuff[ibp++] = 'q'; intbuff[ibp++] = 'u'; intbuff[ibp++] = 'o'; intbuff[ibp++] = 't'; intbuff[ibp++] = ';'; curpos++; break; case '\n': if (h[-1] == '\n' && fillout) { intbuff[ibp++] = '<'; intbuff[ibp++] = 'P'; intbuff[ibp++] = '>'; } if (contained_tab && fillout) { intbuff[ibp++] = '<'; intbuff[ibp++] = 'B'; intbuff[ibp++] = 'R'; intbuff[ibp++] = '>'; } contained_tab = 0; curpos = 0; usenbsp = 0; intbuff[ibp++] = '\n'; break; case '\t': { int curtab = 0; contained_tab = 1; FLUSHIBP; /* like a typewriter, not like TeX */ tabstops[19] = curpos + 1; while (curtab < maxtstop && tabstops[curtab] <= curpos) curtab++; if (curtab < maxtstop) { if (!fillout) { while (curpos < tabstops[curtab]) { intbuff[ibp++] = ' '; if (ibp > 480) { FLUSHIBP; } curpos++; } } else { out_html("<TT>"); while (curpos < tabstops[curtab]) { out_html("&nbsp;"); curpos++; } out_html("</TT>"); } } } break; default: if (*h == ' ' && (h[-1] == '\n' || usenbsp)) { FLUSHIBP; if (!usenbsp && fillout) { out_html("<BR>"); curpos = 0; } usenbsp = fillout; if (usenbsp) out_html("&nbsp;"); else intbuff[ibp++] = ' '; } else if (*h > 31 && *h < 127) intbuff[ibp++] = *h; else if (((unsigned char) (*h)) > 127) { intbuff[ibp++] = '&'; intbuff[ibp++] = '#'; intbuff[ibp++] = '0' + ((unsigned char) (*h)) / 100; intbuff[ibp++] = '0' + (((unsigned char) (*h)) % 100) / 10; intbuff[ibp++] = '0' + ((unsigned char) (*h)) % 10; intbuff[ibp++] = ';'; } curpos++; break; } if (ibp > (MED_STR_MAX - 20)) FLUSHIBP; h++; } } FLUSHIBP; if (buffer) buffer[buffpos] = '\0'; if (san && *h) h++; newline_for_fun = exnewline_for_fun; if (result) { *result = buffer; buffer = exbuffer; buffpos = exbuffpos; buffmax = exbuffmax; scaninbuff = exscaninbuff; } return h; } static char * scan_troff_mandoc(char *c, int san, char **result) { char *ret, *end = c; int oldval = mandoc_line; mandoc_line = 1; while (*end && *end != '\n') { end++; } if (end > c + 2 && ispunct(*(end - 1)) && isspace(*(end - 2)) && *(end - 2) != '\n') { /* * Don't format lonely punctuation E.g. in "xyz ," format the * xyz and then append the comma removing the space. */ *(end - 2) = '\n'; ret = scan_troff(c, san, result); *(end - 2) = *(end - 1); *(end - 1) = ' '; } else { ret = scan_troff(c, san, result); } mandoc_line = oldval; return ret; } main(int argc, char **argv) { FILE *f; char *t; int l, i; char *buf; char *h, *fullname; STRDEF *stdf; t = NULL; while ((i = getopt(argc, argv, "")) != EOF) { switch (i) { default: usage(); exit(EXIT_USAGE); } } if (argc != 2) { usage(); exit(EXIT_USAGE); } manpage = h = t = argv[1]; i = 0; buf = read_man_page(h); if (!buf) { fprintf(stderr, "man2html: cannot read %s: %s\n", h, strerror(errno)); exit(1); } #ifdef MAKEINDEX idxfile = fopen(INDEXFILE, "a"); #endif stdf = &standardchar[0]; i = 0; while (stdf->nr) { stdf->next = &standardchar[i]; stdf = stdf->next; i++; } chardef = &standardchar[0]; stdf = &standardstring[0]; i = 0; while (stdf->nr) { stdf->next = &standardstring[i]; stdf = stdf->next; i++; } strdef = &standardstring[0]; intdef = &standardint[0]; i = 0; while (intdef->nr) { intdef->next = &standardint[i]; intdef = intdef->next; i++; } intdef = &standardint[0]; defdef = NULL; scan_troff(buf + 1, 0, NULL); while (itemdepth || dl_set[itemdepth]) { out_html("</DL>\n"); if (dl_set[itemdepth]) dl_set[itemdepth] = 0; else if (itemdepth > 0) itemdepth--; } out_html(change_to_font(0)); out_html(change_to_size(0)); if (!fillout) { fillout = 1; out_html("</PRE>"); } out_html(NEWLINE); if (output_possible) { outputPageFooter(th_version, th_datestr, th_page_and_sec); /* &nbsp; for mosaic users */ fputs("<HR>\n<A NAME=\"index\">&nbsp;</A><H2>Index</H2>\n<DL>\n", stdout); manidx[mip] = 0; fputs(manidx, stdout); if (subs) fputs("</DL>\n", stdout); fputs("</DL>\n", stdout); print_sig(); fputs("</BODY>\n</HTML>\n", stdout); } else fprintf(stderr, "man2html: no output produced\n"); #ifdef MAKEINDEX if (idxfile) fclose(idxfile); #endif exit(EXIT_SUCCESS); }
59e2e30524be78b45717ea896301e77f657998ff
0744dcc5394cebf57ebcba343747af6871b67017
/os/board/rtl8730e/src/component/soc/amebad2/atf/drivers/arm/css/scp/css_pm_scmi.c
aeb7eda3054e26229916eec271fbffe95f25e5ae
[ "Apache-2.0", "GPL-1.0-or-later", "BSD-3-Clause", "ISC", "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-permissive" ]
permissive
Samsung/TizenRT
96abf62f1853f61fcf91ff14671a5e0c6ca48fdb
1a5c2e00a4b1bbf4c505bbf5cc6a8259e926f686
refs/heads/master
2023-08-31T08:59:33.327998
2023-08-08T06:09:20
2023-08-31T04:38:20
82,517,252
590
719
Apache-2.0
2023-09-14T06:54:49
2017-02-20T04:38:30
C
UTF-8
C
false
false
13,658
c
css_pm_scmi.c
/* * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <assert.h> #include <string.h> #include <arch_helpers.h> #include <common/debug.h> #include <drivers/arm/css/css_scp.h> #include <drivers/arm/css/scmi.h> #include <plat/arm/common/plat_arm.h> #include <plat/arm/css/common/css_pm.h> #include <plat/common/platform.h> #include <platform_def.h> /* * This file implements the SCP helper functions using SCMI protocol. */ /* * SCMI power state parameter bit field encoding for ARM CSS platforms. * * 31 20 19 16 15 12 11 8 7 4 3 0 * +-------------------------------------------------------------+ * | SBZ | Max level | Level 3 | Level 2 | Level 1 | Level 0 | * | | | state | state | state | state | * +-------------------------------------------------------------+ * * `Max level` encodes the highest level that has a valid power state * encoded in the power state. */ #define SCMI_PWR_STATE_MAX_PWR_LVL_SHIFT 16 #define SCMI_PWR_STATE_MAX_PWR_LVL_WIDTH 4 #define SCMI_PWR_STATE_MAX_PWR_LVL_MASK \ ((1 << SCMI_PWR_STATE_MAX_PWR_LVL_WIDTH) - 1) #define SCMI_SET_PWR_STATE_MAX_PWR_LVL(_power_state, _max_level) \ (_power_state) |= ((_max_level) & SCMI_PWR_STATE_MAX_PWR_LVL_MASK)\ << SCMI_PWR_STATE_MAX_PWR_LVL_SHIFT #define SCMI_GET_PWR_STATE_MAX_PWR_LVL(_power_state) \ (((_power_state) >> SCMI_PWR_STATE_MAX_PWR_LVL_SHIFT) \ & SCMI_PWR_STATE_MAX_PWR_LVL_MASK) #define SCMI_PWR_STATE_LVL_WIDTH 4 #define SCMI_PWR_STATE_LVL_MASK \ ((1 << SCMI_PWR_STATE_LVL_WIDTH) - 1) #define SCMI_SET_PWR_STATE_LVL(_power_state, _level, _level_state) \ (_power_state) |= ((_level_state) & SCMI_PWR_STATE_LVL_MASK) \ << (SCMI_PWR_STATE_LVL_WIDTH * (_level)) #define SCMI_GET_PWR_STATE_LVL(_power_state, _level) \ (((_power_state) >> (SCMI_PWR_STATE_LVL_WIDTH * (_level))) & \ SCMI_PWR_STATE_LVL_MASK) /* * The SCMI power state enumeration for a power domain level */ typedef enum { scmi_power_state_off = 0, scmi_power_state_on = 1, scmi_power_state_sleep = 2, } scmi_power_state_t; /* * The global handles for invoking the SCMI driver APIs after the driver * has been initialized. */ static void *scmi_handles[PLAT_ARM_SCMI_CHANNEL_COUNT]; /* The global SCMI channels array */ static scmi_channel_t scmi_channels[PLAT_ARM_SCMI_CHANNEL_COUNT]; /* * Channel ID for the default SCMI channel. * The default channel is used to issue SYSTEM level SCMI requests and is * initialized to the channel which has the boot cpu as its resource. */ static uint32_t default_scmi_channel_id; /* * TODO: Allow use of channel specific lock instead of using a single lock for * all the channels. */ ARM_SCMI_INSTANTIATE_LOCK; /* * Function to obtain the SCMI Domain ID and SCMI Channel number from the linear * core position. The SCMI Channel number is encoded in the upper 16 bits and * the Domain ID is encoded in the lower 16 bits in each entry of the mapping * array exported by the platform. */ static void css_scp_core_pos_to_scmi_channel(unsigned int core_pos, unsigned int *scmi_domain_id, unsigned int *scmi_channel_id) { unsigned int composite_id; composite_id = plat_css_core_pos_to_scmi_dmn_id_map[core_pos]; *scmi_channel_id = GET_SCMI_CHANNEL_ID(composite_id); *scmi_domain_id = GET_SCMI_DOMAIN_ID(composite_id); } /* * Helper function to suspend a CPU power domain and its parent power domains * if applicable. */ void css_scp_suspend(const struct psci_power_state *target_state) { int ret; /* At least power domain level 0 should be specified to be suspended */ assert(target_state->pwr_domain_state[ARM_PWR_LVL0] == ARM_LOCAL_STATE_OFF); /* Check if power down at system power domain level is requested */ if (css_system_pwr_state(target_state) == ARM_LOCAL_STATE_OFF) { /* Issue SCMI command for SYSTEM_SUSPEND on all SCMI channels */ ret = scmi_sys_pwr_state_set( scmi_handles[default_scmi_channel_id], SCMI_SYS_PWR_FORCEFUL_REQ, SCMI_SYS_PWR_SUSPEND); if (ret != SCMI_E_SUCCESS) { ERROR("SCMI system power domain suspend return 0x%x unexpected\n", ret); panic(); } return; } #if !HW_ASSISTED_COHERENCY unsigned int lvl, channel_id, domain_id; uint32_t scmi_pwr_state = 0; /* * If we reach here, then assert that power down at system power domain * level is running. */ assert(css_system_pwr_state(target_state) == ARM_LOCAL_STATE_RUN); /* For level 0, specify `scmi_power_state_sleep` as the power state */ SCMI_SET_PWR_STATE_LVL(scmi_pwr_state, ARM_PWR_LVL0, scmi_power_state_sleep); for (lvl = ARM_PWR_LVL1; lvl <= PLAT_MAX_PWR_LVL; lvl++) { if (target_state->pwr_domain_state[lvl] == ARM_LOCAL_STATE_RUN) break; assert(target_state->pwr_domain_state[lvl] == ARM_LOCAL_STATE_OFF); /* * Specify `scmi_power_state_off` as power state for higher * levels. */ SCMI_SET_PWR_STATE_LVL(scmi_pwr_state, lvl, scmi_power_state_off); } SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1); css_scp_core_pos_to_scmi_channel(plat_my_core_pos(), &domain_id, &channel_id); ret = scmi_pwr_state_set(scmi_handles[channel_id], domain_id, scmi_pwr_state); if (ret != SCMI_E_SUCCESS) { ERROR("SCMI set power state command return 0x%x unexpected\n", ret); panic(); } #endif } /* * Helper function to turn off a CPU power domain and its parent power domains * if applicable. */ void css_scp_off(const struct psci_power_state *target_state) { unsigned int lvl = 0, channel_id, domain_id; int ret; uint32_t scmi_pwr_state = 0; /* At-least the CPU level should be specified to be OFF */ assert(target_state->pwr_domain_state[ARM_PWR_LVL0] == ARM_LOCAL_STATE_OFF); /* PSCI CPU OFF cannot be used to turn OFF system power domain */ assert(css_system_pwr_state(target_state) == ARM_LOCAL_STATE_RUN); for (; lvl <= PLAT_MAX_PWR_LVL; lvl++) { if (target_state->pwr_domain_state[lvl] == ARM_LOCAL_STATE_RUN) break; assert(target_state->pwr_domain_state[lvl] == ARM_LOCAL_STATE_OFF); SCMI_SET_PWR_STATE_LVL(scmi_pwr_state, lvl, scmi_power_state_off); } SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1); css_scp_core_pos_to_scmi_channel(plat_my_core_pos(), &domain_id, &channel_id); ret = scmi_pwr_state_set(scmi_handles[channel_id], domain_id, scmi_pwr_state); if (ret != SCMI_E_QUEUED && ret != SCMI_E_SUCCESS) { ERROR("SCMI set power state command return 0x%x unexpected\n", ret); panic(); } } /* * Helper function to turn ON a CPU power domain and its parent power domains * if applicable. */ void css_scp_on(u_register_t mpidr) { unsigned int lvl = 0, channel_id, core_pos, domain_id; int ret; uint32_t scmi_pwr_state = 0; for (; lvl <= PLAT_MAX_PWR_LVL; lvl++) SCMI_SET_PWR_STATE_LVL(scmi_pwr_state, lvl, scmi_power_state_on); SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1); core_pos = (unsigned int)plat_core_pos_by_mpidr(mpidr); assert(core_pos < PLATFORM_CORE_COUNT); css_scp_core_pos_to_scmi_channel(core_pos, &domain_id, &channel_id); ret = scmi_pwr_state_set(scmi_handles[channel_id], domain_id, scmi_pwr_state); if (ret != SCMI_E_QUEUED && ret != SCMI_E_SUCCESS) { ERROR("SCMI set power state command return 0x%x unexpected\n", ret); panic(); } } /* * Helper function to get the power state of a power domain node as reported * by the SCP. */ int css_scp_get_power_state(u_register_t mpidr, unsigned int power_level) { int ret; uint32_t scmi_pwr_state = 0, lvl_state; unsigned int channel_id, cpu_idx, domain_id; /* We don't support get power state at the system power domain level */ if ((power_level > PLAT_MAX_PWR_LVL) || (power_level == CSS_SYSTEM_PWR_DMN_LVL)) { WARN("Invalid power level %u specified for SCMI get power state\n", power_level); return PSCI_E_INVALID_PARAMS; } cpu_idx = (unsigned int)plat_core_pos_by_mpidr(mpidr); assert(cpu_idx < PLATFORM_CORE_COUNT); css_scp_core_pos_to_scmi_channel(cpu_idx, &domain_id, &channel_id); ret = scmi_pwr_state_get(scmi_handles[channel_id], domain_id, &scmi_pwr_state); if (ret != SCMI_E_SUCCESS) { WARN("SCMI get power state command return 0x%x unexpected\n", ret); return PSCI_E_INVALID_PARAMS; } /* * Find the maximum power level described in the get power state * command. If it is less than the requested power level, then assume * the requested power level is ON. */ if (SCMI_GET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state) < power_level) return HW_ON; lvl_state = SCMI_GET_PWR_STATE_LVL(scmi_pwr_state, power_level); if (lvl_state == scmi_power_state_on) return HW_ON; assert((lvl_state == scmi_power_state_off) || (lvl_state == scmi_power_state_sleep)); return HW_OFF; } void __dead2 css_scp_system_off(int state) { int ret; /* * Disable GIC CPU interface to prevent pending interrupt from waking * up the AP from WFI. */ plat_arm_gic_cpuif_disable(); /* * Issue SCMI command. First issue a graceful * request and if that fails force the request. */ ret = scmi_sys_pwr_state_set(scmi_handles[default_scmi_channel_id], SCMI_SYS_PWR_FORCEFUL_REQ, state); if (ret != SCMI_E_SUCCESS) { ERROR("SCMI system power state set 0x%x returns unexpected 0x%x\n", state, ret); panic(); } wfi(); ERROR("CSS set power state: operation not handled.\n"); panic(); } /* * Helper function to shutdown the system via SCMI. */ void __dead2 css_scp_sys_shutdown(void) { css_scp_system_off(SCMI_SYS_PWR_SHUTDOWN); } /* * Helper function to reset the system via SCMI. */ void __dead2 css_scp_sys_reboot(void) { css_scp_system_off(SCMI_SYS_PWR_COLD_RESET); } static int scmi_ap_core_init(scmi_channel_t *ch) { #if PROGRAMMABLE_RESET_ADDRESS uint32_t version; int ret; ret = scmi_proto_version(ch, SCMI_AP_CORE_PROTO_ID, &version); if (ret != SCMI_E_SUCCESS) { WARN("SCMI AP core protocol version message failed\n"); return -1; } if (!is_scmi_version_compatible(SCMI_AP_CORE_PROTO_VER, version)) { WARN("SCMI AP core protocol version 0x%x incompatible with driver version 0x%x\n", version, SCMI_AP_CORE_PROTO_VER); return -1; } INFO("SCMI AP core protocol version 0x%x detected\n", version); #endif return 0; } void __init plat_arm_pwrc_setup(void) { unsigned int composite_id, idx; for (idx = 0; idx < PLAT_ARM_SCMI_CHANNEL_COUNT; idx++) { INFO("Initializing driver on Channel %d\n", idx); scmi_channels[idx].info = plat_css_get_scmi_info(idx); scmi_channels[idx].lock = ARM_SCMI_LOCK_GET_INSTANCE; scmi_handles[idx] = scmi_init(&scmi_channels[idx]); if (scmi_handles[idx] == NULL) { ERROR("SCMI Initialization failed on channel %d\n", idx); panic(); } if (scmi_ap_core_init(&scmi_channels[idx]) < 0) { ERROR("SCMI AP core protocol initialization failed\n"); panic(); } } composite_id = plat_css_core_pos_to_scmi_dmn_id_map[plat_my_core_pos()]; default_scmi_channel_id = GET_SCMI_CHANNEL_ID(composite_id); } /****************************************************************************** * This function overrides the default definition for ARM platforms. Initialize * the SCMI driver, query capability via SCMI and modify the PSCI capability * based on that. *****************************************************************************/ const plat_psci_ops_t *css_scmi_override_pm_ops(plat_psci_ops_t *ops) { uint32_t msg_attr; int ret; void *scmi_handle = scmi_handles[default_scmi_channel_id]; assert(scmi_handle); /* Check that power domain POWER_STATE_SET message is supported */ ret = scmi_proto_msg_attr(scmi_handle, SCMI_PWR_DMN_PROTO_ID, SCMI_PWR_STATE_SET_MSG, &msg_attr); if (ret != SCMI_E_SUCCESS) { ERROR("Set power state command is not supported by SCMI\n"); panic(); } /* * Don't support PSCI NODE_HW_STATE call if SCMI doesn't support * POWER_STATE_GET message. */ ret = scmi_proto_msg_attr(scmi_handle, SCMI_PWR_DMN_PROTO_ID, SCMI_PWR_STATE_GET_MSG, &msg_attr); if (ret != SCMI_E_SUCCESS) ops->get_node_hw_state = NULL; /* Check if the SCMI SYSTEM_POWER_STATE_SET message is supported */ ret = scmi_proto_msg_attr(scmi_handle, SCMI_SYS_PWR_PROTO_ID, SCMI_SYS_PWR_STATE_SET_MSG, &msg_attr); if (ret != SCMI_E_SUCCESS) { /* System power management operations are not supported */ ops->system_off = NULL; ops->system_reset = NULL; ops->get_sys_suspend_power_state = NULL; } else { if (!(msg_attr & SCMI_SYS_PWR_SUSPEND_SUPPORTED)) { /* * System power management protocol is available, but * it does not support SYSTEM SUSPEND. */ ops->get_sys_suspend_power_state = NULL; } if (!(msg_attr & SCMI_SYS_PWR_WARM_RESET_SUPPORTED)) { /* * WARM reset is not available. */ ops->system_reset2 = NULL; } } return ops; } int css_system_reset2(int is_vendor, int reset_type, u_register_t cookie) { if (is_vendor || (reset_type != PSCI_RESET2_SYSTEM_WARM_RESET)) return PSCI_E_INVALID_PARAMS; css_scp_system_off(SCMI_SYS_PWR_WARM_RESET); /* * css_scp_system_off cannot return (it is a __dead function), * but css_system_reset2 has to return some value, even in * this case. */ return 0; } #if PROGRAMMABLE_RESET_ADDRESS void plat_arm_program_trusted_mailbox(uintptr_t address) { int ret, i; for (i = 0; i < PLAT_ARM_SCMI_CHANNEL_COUNT; i++) { assert(scmi_handles[i]); ret = scmi_ap_core_set_reset_addr(scmi_handles[i], address, SCMI_AP_CORE_LOCK_ATTR); if (ret != SCMI_E_SUCCESS) { ERROR("CSS: Failed to program reset address: %d\n", ret); panic(); } } } #endif
cbfab114653f8468b5e0df92ca4d3519e1dbf826
0ba9681b235b377b3f57d52532ab7212d4d4cd8a
/intTests/test_llvm_x86_01/test.c
6184af0bfaae189aff06f0ca6cee6c01c7e5eb01
[ "BSD-3-Clause" ]
permissive
GaloisInc/saw-script
d9a3eb7b05c1bcbcc319987223cd53b903b55b5d
79ddd800bec59528958ed6d7593304e2b17b7dfb
refs/heads/master
2023-09-01T09:47:31.415255
2023-08-30T11:26:08
2023-08-30T11:26:08
34,082,065
458
82
BSD-3-Clause
2023-09-14T16:23:09
2015-04-16T21:39:32
Haskell
UTF-8
C
false
false
168
c
test.c
#include <stdint.h> #include <stdio.h> extern void foo(uint64_t *i, uint64_t j); void bar() { uint64_t i = 42; foo(&i, 1337); puts("bar"); printf("%lu\n", i); };
6835311f13b823b16837794dba4b16a18904ac35
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
/SOFTWARE/A64-TERES/linux-a64/drivers/staging/media/as102/as102_usb_drv.h
1ad1ec52b11e82da540e6d53f594bfb25a2a89c6
[ "Linux-syscall-note", "GPL-2.0-only", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
OLIMEX/DIY-LAPTOP
ae82f4ee79c641d9aee444db9a75f3f6709afa92
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
refs/heads/rel3
2023-08-04T01:54:19.483792
2023-04-03T07:18:12
2023-04-03T07:18:12
80,094,055
507
92
Apache-2.0
2023-04-03T07:05:59
2017-01-26T07:25:50
C
UTF-8
C
false
false
2,113
h
as102_usb_drv.h
/* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 Pierrick Hascoet <pierrick.hascoet@abilis.com> * Copyright (C) 2010 Devin Heitmueller <dheitmueller@kernellabs.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _AS102_USB_DRV_H_ #define _AS102_USB_DRV_H_ #define AS102_USB_DEVICE_TX_CTRL_CMD 0xF1 #define AS102_USB_DEVICE_RX_CTRL_CMD 0xF2 /* define these values to match the supported devices */ /* Abilis system: "TITAN" */ #define AS102_REFERENCE_DESIGN "Abilis Systems DVB-Titan" #define AS102_USB_DEVICE_VENDOR_ID 0x1BA6 #define AS102_USB_DEVICE_PID_0001 0x0001 /* PCTV Systems: PCTV picoStick (74e) */ #define AS102_PCTV_74E "PCTV Systems picoStick (74e)" #define PCTV_74E_USB_VID 0x2013 #define PCTV_74E_USB_PID 0x0246 /* Elgato: EyeTV DTT Deluxe */ #define AS102_ELGATO_EYETV_DTT_NAME "Elgato EyeTV DTT Deluxe" #define ELGATO_EYETV_DTT_USB_VID 0x0fd9 #define ELGATO_EYETV_DTT_USB_PID 0x002c /* nBox: nBox DVB-T Dongle */ #define AS102_NBOX_DVBT_DONGLE_NAME "nBox DVB-T Dongle" #define NBOX_DVBT_DONGLE_USB_VID 0x0b89 #define NBOX_DVBT_DONGLE_USB_PID 0x0007 /* Sky Italia: Digital Key (green led) */ #define AS102_SKY_IT_DIGITAL_KEY_NAME "Sky IT Digital Key (green led)" #define SKY_IT_DIGITAL_KEY_USB_VID 0x2137 #define SKY_IT_DIGITAL_KEY_USB_PID 0x0001 void as102_urb_stream_irq(struct urb *urb); struct as10x_usb_token_cmd_t { /* token cmd */ struct as10x_cmd_t c; /* token response */ struct as10x_cmd_t r; }; #endif
724ddcfd8af46fa46f2e0dc5ebe3be960d6c2dcb
e3cdfae1dd874479c928dad193b33a4e3b8a623e
/tools/textencode/huffman.c
79f5bd7e83c75d213005102b316c6ee1712173d3
[]
no_license
FireEmblemUniverse/fireemblem8u
11493bf94844617b33254110ba006316defb3510
b9ad9bcafd9d4ecb7fc13cc77a464e2a82ac8338
refs/heads/master
2023-09-05T23:39:53.791339
2023-09-04T17:31:47
2023-09-04T17:31:47
121,802,075
118
31
null
2023-09-11T13:08:37
2018-02-16T21:21:50
Assembly
UTF-8
C
false
false
5,466
c
huffman.c
#include <assert.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include "textencode.h" // ================ // = HUFFMAN NODE = // ================ struct HuffNode { struct HuffNode * left; struct HuffNode * right; union { struct { u32 data; // One of the input characters u32 freq; // Frequency of the character } leaf; struct { u32 freq; } node; }; }; struct HuffNode * g_nodes[MAX_NODE_NUM] = { NULL }; size_t g_node_count = 0; static struct HuffNode * HuffNodeCreateLeaf(u32 data, u32 freq); static struct HuffNode * HuffNodeCreateNode(struct HuffNode * left, struct HuffNode * right); static void HuffNodeDestroy(struct HuffNode * node); static bool HuffNodeIsLeaf(struct HuffNode * node); static u32 HuffNodeGetFreq(struct HuffNode * node); static size_t HuffNodeFindIdx(struct HuffNode * node); struct HuffNode * HuffNodeCreateLeaf(u32 data, u32 freq) { struct HuffNode * result = calloc(1, sizeof(struct HuffNode)); g_nodes[g_node_count++] = result; result->leaf.data = data; result->leaf.freq = freq; return result; } struct HuffNode * HuffNodeCreateNode(struct HuffNode * left, struct HuffNode * right) { struct HuffNode * result = calloc(1, sizeof(struct HuffNode)); g_nodes[g_node_count++] = result; result->left = left; result->right = right; result->node.freq = HuffNodeGetFreq(left) + HuffNodeGetFreq(right); return result; } void HuffNodeDestroy(struct HuffNode * node) { if (!HuffNodeIsLeaf(node)) { HuffNodeDestroy(node->left); HuffNodeDestroy(node->right); } free(node); } bool HuffNodeIsLeaf(struct HuffNode * node) { return node->left == NULL && node->right == NULL; } u32 HuffNodeGetFreq(struct HuffNode * node) { return HuffNodeIsLeaf(node) ? node->leaf.freq : node->node.freq; } size_t HuffNodeFindIdx(struct HuffNode * node) { for (size_t i = 0; i < g_node_count; i++) if (g_nodes[i] == node) return i; FATAL_ERROR("could not find node 0x%p\n", (void *)node); } // ===================== // = HUFFMAN NODE LIST = // ===================== // this is used exclusively internally by the build func struct HuffList { struct HuffNode * node; struct HuffList * next; }; static struct HuffList * HuffListCreate(void); static void HuffListDestroy(struct HuffList * list); static bool HuffListIsEmpty(struct HuffList * list); static void HuffListAdd(struct HuffList ** p_self, struct HuffNode * node); static struct HuffNode * HuffListPopHead(struct HuffList ** p_self); struct HuffList * HuffListCreate(void) { return NULL; } void HuffListDestroy(struct HuffList * list) { if (list != NULL) { HuffListDestroy(list->next); free(list); } } bool HuffListIsEmpty(struct HuffList * list) { return list == NULL; } void HuffListAdd(struct HuffList ** p_self, struct HuffNode * node) { struct HuffList * self = *p_self; assert(p_self != NULL); if (self == NULL || HuffNodeGetFreq(node) < HuffNodeGetFreq(self->node)) { struct HuffList * new_list = calloc(1, sizeof(struct HuffList)); new_list->node = node; new_list->next = self; *p_self = new_list; return; } HuffListAdd(&self->next, node); } struct HuffNode * HuffListPopHead(struct HuffList ** p_self) { struct HuffList * self = *p_self; struct HuffNode * result = self->node; assert(p_self != NULL); *p_self = self->next; free(self); return result; } // ================ // = HUFFMAN TREE = // ================ HuffTree_t BuildHuffmanTree(u32 * freq_table) { struct HuffList * list = HuffListCreate(); // TODO: this better // single byte values for (size_t i = 0; i < 0x100; i++) { if (freq_table[i] > 0) { HuffListAdd(&list, HuffNodeCreateLeaf(i, freq_table[i])); } } // portrait codes for (size_t i = 0; i < 0x100; i++) { size_t code = 0x0100 | i; if (freq_table[code] > 0) { HuffListAdd(&list, HuffNodeCreateLeaf(code, freq_table[code])); } } // everything else (double byte values) for (size_t lo = 0; lo < 0x100; lo++) { for (size_t hi = 2; hi < 0x100; hi++) { size_t code = (hi << 8) | lo; if (freq_table[code] > 0) { HuffListAdd(&list, HuffNodeCreateLeaf(code, freq_table[code])); } } } assert(!HuffListIsEmpty(list)); struct HuffNode * head; for (;;) { head = HuffListPopHead(&list); if (HuffListIsEmpty(list)) { HuffListDestroy(list); break; } HuffListAdd(&list, HuffNodeCreateNode(head, HuffListPopHead(&list))); } return head; } void FreeHuffmanTree(HuffTree_t tree) { HuffNodeDestroy((struct HuffNode *)tree); } u32 * BuildHuffmanTable(void) { u32 * result = calloc(g_node_count, sizeof(u32)); for (size_t i = 0; i < g_node_count; i++) { struct HuffNode * node = g_nodes[i]; if (HuffNodeIsLeaf(node)) { result[i] = 0xFFFF0000 | node->leaf.data; } else { result[i] = (HuffNodeFindIdx(node->right) << 16) | HuffNodeFindIdx(node->left); } } return result; }
af55462d15fc435326e10b5239251877926700a3
321d11eaee885ceb3a74db0a062f9bbdf282148c
/include/crypto/engine.h
fac6ed0966ae18d8c814302a1da3872a14d43759
[ "Apache-2.0", "OpenSSL", "LicenseRef-scancode-proprietary-license" ]
permissive
openssl/openssl
75691ebaae957793f2ff0673f77545277dfb3988
5318c012885a5382eadbf95aa9c1d35664bca819
refs/heads/master
2023-09-03T15:22:52.727123
2023-09-01T07:10:49
2023-09-02T14:30:01
7,634,677
24,148
11,569
Apache-2.0
2023-09-14T19:48:11
2013-01-15T22:34:48
C
UTF-8
C
false
false
675
h
engine.h
/* * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include <openssl/engine.h> void engine_load_openssl_int(void); void engine_load_devcrypto_int(void); void engine_load_rdrand_int(void); void engine_load_dynamic_int(void); void engine_load_padlock_int(void); void engine_load_capi_int(void); void engine_load_dasync_int(void); void engine_load_afalg_int(void); void engine_cleanup_int(void);
b154f837a95daad483765c010e08ee54382e0ef9
d38ed5f31d74a79a054ed55dd9123a8d615283b9
/third_party/libgit2/src/fileops.c
877e9cdc5767d79305bffe2358ea541458fe1174
[ "GPL-2.0-only", "LicenseRef-scancode-public-domain", "GCC-exception-2.0", "LGPL-2.0-or-later", "Zlib", "LGPL-2.1-or-later", "LGPL-2.1-only", "ISC", "MIT", "Apache-2.0" ]
permissive
chigraph/chigraph
8ff76a14337da29fa2b2a84d5c35f2eac4156c6e
6981bdd6763db54edfe284c1f7d223193584c69a
refs/heads/master
2022-12-21T13:46:57.273039
2022-12-17T18:41:19
2022-12-17T18:41:19
60,776,831
364
65
Apache-2.0
2019-12-13T14:46:43
2016-06-09T13:27:37
C++
UTF-8
C
false
false
27,515
c
fileops.c
/* * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ #include "fileops.h" #include "global.h" #include "strmap.h" #include <ctype.h> #if GIT_WIN32 #include "win32/findfile.h" #endif int git_futils_mkpath2file(const char *file_path, const mode_t mode) { return git_futils_mkdir( file_path, mode, GIT_MKDIR_PATH | GIT_MKDIR_SKIP_LAST | GIT_MKDIR_VERIFY_DIR); } int git_futils_mktmp(git_buf *path_out, const char *filename, mode_t mode) { int fd; mode_t mask; p_umask(mask = p_umask(0)); git_buf_sets(path_out, filename); git_buf_puts(path_out, "_git2_XXXXXX"); if (git_buf_oom(path_out)) return -1; if ((fd = p_mkstemp(path_out->ptr)) < 0) { git_error_set(GIT_ERROR_OS, "failed to create temporary file '%s'", path_out->ptr); return -1; } if (p_chmod(path_out->ptr, (mode & ~mask))) { git_error_set(GIT_ERROR_OS, "failed to set permissions on file '%s'", path_out->ptr); return -1; } return fd; } int git_futils_creat_withpath(const char *path, const mode_t dirmode, const mode_t mode) { int fd; if (git_futils_mkpath2file(path, dirmode) < 0) return -1; fd = p_creat(path, mode); if (fd < 0) { git_error_set(GIT_ERROR_OS, "failed to create file '%s'", path); return -1; } return fd; } int git_futils_creat_locked(const char *path, const mode_t mode) { int fd = p_open(path, O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, mode); if (fd < 0) { int error = errno; git_error_set(GIT_ERROR_OS, "failed to create locked file '%s'", path); switch (error) { case EEXIST: return GIT_ELOCKED; case ENOENT: return GIT_ENOTFOUND; default: return -1; } } return fd; } int git_futils_creat_locked_withpath(const char *path, const mode_t dirmode, const mode_t mode) { if (git_futils_mkpath2file(path, dirmode) < 0) return -1; return git_futils_creat_locked(path, mode); } int git_futils_open_ro(const char *path) { int fd = p_open(path, O_RDONLY); if (fd < 0) return git_path_set_error(errno, path, "open"); return fd; } int git_futils_truncate(const char *path, int mode) { int fd = p_open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode); if (fd < 0) return git_path_set_error(errno, path, "open"); close(fd); return 0; } git_off_t git_futils_filesize(git_file fd) { struct stat sb; if (p_fstat(fd, &sb)) { git_error_set(GIT_ERROR_OS, "failed to stat file descriptor"); return -1; } return sb.st_size; } mode_t git_futils_canonical_mode(mode_t raw_mode) { if (S_ISREG(raw_mode)) return S_IFREG | GIT_PERMS_CANONICAL(raw_mode); else if (S_ISLNK(raw_mode)) return S_IFLNK; else if (S_ISGITLINK(raw_mode)) return S_IFGITLINK; else if (S_ISDIR(raw_mode)) return S_IFDIR; else return 0; } int git_futils_readbuffer_fd(git_buf *buf, git_file fd, size_t len) { ssize_t read_size = 0; size_t alloc_len; git_buf_clear(buf); if (!git__is_ssizet(len)) { git_error_set(GIT_ERROR_INVALID, "read too large"); return -1; } GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, len, 1); if (git_buf_grow(buf, alloc_len) < 0) return -1; /* p_read loops internally to read len bytes */ read_size = p_read(fd, buf->ptr, len); if (read_size != (ssize_t)len) { git_error_set(GIT_ERROR_OS, "failed to read descriptor"); git_buf_dispose(buf); return -1; } buf->ptr[read_size] = '\0'; buf->size = read_size; return 0; } int git_futils_readbuffer_updated( git_buf *out, const char *path, git_oid *checksum, int *updated) { int error; git_file fd; struct stat st; git_buf buf = GIT_BUF_INIT; git_oid checksum_new; assert(out && path && *path); if (updated != NULL) *updated = 0; if (p_stat(path, &st) < 0) return git_path_set_error(errno, path, "stat"); if (S_ISDIR(st.st_mode)) { git_error_set(GIT_ERROR_INVALID, "requested file is a directory"); return GIT_ENOTFOUND; } if (!git__is_sizet(st.st_size+1)) { git_error_set(GIT_ERROR_OS, "invalid regular file stat for '%s'", path); return -1; } if ((fd = git_futils_open_ro(path)) < 0) return fd; if (git_futils_readbuffer_fd(&buf, fd, (size_t)st.st_size) < 0) { p_close(fd); return -1; } p_close(fd); if (checksum) { if ((error = git_hash_buf(&checksum_new, buf.ptr, buf.size)) < 0) { git_buf_dispose(&buf); return error; } /* * If we were given a checksum, we only want to use it if it's different */ if (!git_oid__cmp(checksum, &checksum_new)) { git_buf_dispose(&buf); if (updated) *updated = 0; return 0; } git_oid_cpy(checksum, &checksum_new); } /* * If we're here, the file did change, or the user didn't have an old version */ if (updated != NULL) *updated = 1; git_buf_swap(out, &buf); git_buf_dispose(&buf); return 0; } int git_futils_readbuffer(git_buf *buf, const char *path) { return git_futils_readbuffer_updated(buf, path, NULL, NULL); } int git_futils_writebuffer( const git_buf *buf, const char *path, int flags, mode_t mode) { int fd, do_fsync = 0, error = 0; if (!flags) flags = O_CREAT | O_TRUNC | O_WRONLY; if ((flags & O_FSYNC) != 0) do_fsync = 1; flags &= ~O_FSYNC; if (!mode) mode = GIT_FILEMODE_BLOB; if ((fd = p_open(path, flags, mode)) < 0) { git_error_set(GIT_ERROR_OS, "could not open '%s' for writing", path); return fd; } if ((error = p_write(fd, git_buf_cstr(buf), git_buf_len(buf))) < 0) { git_error_set(GIT_ERROR_OS, "could not write to '%s'", path); (void)p_close(fd); return error; } if (do_fsync && (error = p_fsync(fd)) < 0) { git_error_set(GIT_ERROR_OS, "could not fsync '%s'", path); p_close(fd); return error; } if ((error = p_close(fd)) < 0) { git_error_set(GIT_ERROR_OS, "error while closing '%s'", path); return error; } if (do_fsync && (flags & O_CREAT)) error = git_futils_fsync_parent(path); return error; } int git_futils_mv_withpath(const char *from, const char *to, const mode_t dirmode) { if (git_futils_mkpath2file(to, dirmode) < 0) return -1; if (p_rename(from, to) < 0) { git_error_set(GIT_ERROR_OS, "failed to rename '%s' to '%s'", from, to); return -1; } return 0; } int git_futils_mmap_ro(git_map *out, git_file fd, git_off_t begin, size_t len) { return p_mmap(out, len, GIT_PROT_READ, GIT_MAP_SHARED, fd, begin); } int git_futils_mmap_ro_file(git_map *out, const char *path) { git_file fd = git_futils_open_ro(path); git_off_t len; int result; if (fd < 0) return fd; if ((len = git_futils_filesize(fd)) < 0) { result = -1; goto out; } if (!git__is_sizet(len)) { git_error_set(GIT_ERROR_OS, "file `%s` too large to mmap", path); result = -1; goto out; } result = git_futils_mmap_ro(out, fd, 0, (size_t)len); out: p_close(fd); return result; } void git_futils_mmap_free(git_map *out) { p_munmap(out); } GIT_INLINE(int) mkdir_validate_dir( const char *path, struct stat *st, mode_t mode, uint32_t flags, struct git_futils_mkdir_options *opts) { /* with exclusive create, existing dir is an error */ if ((flags & GIT_MKDIR_EXCL) != 0) { git_error_set(GIT_ERROR_FILESYSTEM, "failed to make directory '%s': directory exists", path); return GIT_EEXISTS; } if ((S_ISREG(st->st_mode) && (flags & GIT_MKDIR_REMOVE_FILES)) || (S_ISLNK(st->st_mode) && (flags & GIT_MKDIR_REMOVE_SYMLINKS))) { if (p_unlink(path) < 0) { git_error_set(GIT_ERROR_OS, "failed to remove %s '%s'", S_ISLNK(st->st_mode) ? "symlink" : "file", path); return GIT_EEXISTS; } opts->perfdata.mkdir_calls++; if (p_mkdir(path, mode) < 0) { git_error_set(GIT_ERROR_OS, "failed to make directory '%s'", path); return GIT_EEXISTS; } } else if (S_ISLNK(st->st_mode)) { /* Re-stat the target, make sure it's a directory */ opts->perfdata.stat_calls++; if (p_stat(path, st) < 0) { git_error_set(GIT_ERROR_OS, "failed to make directory '%s'", path); return GIT_EEXISTS; } } else if (!S_ISDIR(st->st_mode)) { git_error_set(GIT_ERROR_FILESYSTEM, "failed to make directory '%s': directory exists", path); return GIT_EEXISTS; } return 0; } GIT_INLINE(int) mkdir_validate_mode( const char *path, struct stat *st, bool terminal_path, mode_t mode, uint32_t flags, struct git_futils_mkdir_options *opts) { if (((terminal_path && (flags & GIT_MKDIR_CHMOD) != 0) || (flags & GIT_MKDIR_CHMOD_PATH) != 0) && st->st_mode != mode) { opts->perfdata.chmod_calls++; if (p_chmod(path, mode) < 0) { git_error_set(GIT_ERROR_OS, "failed to set permissions on '%s'", path); return -1; } } return 0; } GIT_INLINE(int) mkdir_canonicalize( git_buf *path, uint32_t flags) { ssize_t root_len; if (path->size == 0) { git_error_set(GIT_ERROR_OS, "attempt to create empty path"); return -1; } /* Trim trailing slashes (except the root) */ if ((root_len = git_path_root(path->ptr)) < 0) root_len = 0; else root_len++; while (path->size > (size_t)root_len && path->ptr[path->size - 1] == '/') path->ptr[--path->size] = '\0'; /* if we are not supposed to made the last element, truncate it */ if ((flags & GIT_MKDIR_SKIP_LAST2) != 0) { git_path_dirname_r(path, path->ptr); flags |= GIT_MKDIR_SKIP_LAST; } if ((flags & GIT_MKDIR_SKIP_LAST) != 0) { git_path_dirname_r(path, path->ptr); } /* We were either given the root path (or trimmed it to * the root), we don't have anything to do. */ if (path->size <= (size_t)root_len) git_buf_clear(path); return 0; } int git_futils_mkdir( const char *path, mode_t mode, uint32_t flags) { git_buf make_path = GIT_BUF_INIT, parent_path = GIT_BUF_INIT; const char *relative; struct git_futils_mkdir_options opts = { 0 }; struct stat st; size_t depth = 0; int len = 0, root_len, error; if ((error = git_buf_puts(&make_path, path)) < 0 || (error = mkdir_canonicalize(&make_path, flags)) < 0 || (error = git_buf_puts(&parent_path, make_path.ptr)) < 0 || make_path.size == 0) goto done; root_len = git_path_root(make_path.ptr); /* find the first parent directory that exists. this will be used * as the base to dirname_relative. */ for (relative = make_path.ptr; parent_path.size; ) { error = p_lstat(parent_path.ptr, &st); if (error == 0) { break; } else if (errno != ENOENT) { git_error_set(GIT_ERROR_OS, "failed to stat '%s'", parent_path.ptr); goto done; } depth++; /* examine the parent of the current path */ if ((len = git_path_dirname_r(&parent_path, parent_path.ptr)) < 0) { error = len; goto done; } assert(len); /* * We've walked all the given path's parents and it's either relative * (the parent is simply '.') or rooted (the length is less than or * equal to length of the root path). The path may be less than the * root path length on Windows, where `C:` == `C:/`. */ if ((len == 1 && parent_path.ptr[0] == '.') || len <= root_len) { relative = make_path.ptr; break; } relative = make_path.ptr + len + 1; /* not recursive? just make this directory relative to its parent. */ if ((flags & GIT_MKDIR_PATH) == 0) break; } /* we found an item at the location we're trying to create, * validate it. */ if (depth == 0) { error = mkdir_validate_dir(make_path.ptr, &st, mode, flags, &opts); if (!error) error = mkdir_validate_mode( make_path.ptr, &st, true, mode, flags, &opts); goto done; } /* we already took `SKIP_LAST` and `SKIP_LAST2` into account when * canonicalizing `make_path`. */ flags &= ~(GIT_MKDIR_SKIP_LAST2 | GIT_MKDIR_SKIP_LAST); error = git_futils_mkdir_relative(relative, parent_path.size ? parent_path.ptr : NULL, mode, flags, &opts); done: git_buf_dispose(&make_path); git_buf_dispose(&parent_path); return error; } int git_futils_mkdir_r(const char *path, const mode_t mode) { return git_futils_mkdir(path, mode, GIT_MKDIR_PATH); } int git_futils_mkdir_relative( const char *relative_path, const char *base, mode_t mode, uint32_t flags, struct git_futils_mkdir_options *opts) { git_buf make_path = GIT_BUF_INIT; ssize_t root = 0, min_root_len; char lastch = '/', *tail; struct stat st; struct git_futils_mkdir_options empty_opts = {0}; int error; if (!opts) opts = &empty_opts; /* build path and find "root" where we should start calling mkdir */ if (git_path_join_unrooted(&make_path, relative_path, base, &root) < 0) return -1; if ((error = mkdir_canonicalize(&make_path, flags)) < 0 || make_path.size == 0) goto done; /* if we are not supposed to make the whole path, reset root */ if ((flags & GIT_MKDIR_PATH) == 0) root = git_buf_rfind(&make_path, '/'); /* advance root past drive name or network mount prefix */ min_root_len = git_path_root(make_path.ptr); if (root < min_root_len) root = min_root_len; while (root >= 0 && make_path.ptr[root] == '/') ++root; /* clip root to make_path length */ if (root > (ssize_t)make_path.size) root = (ssize_t)make_path.size; /* i.e. NUL byte of string */ if (root < 0) root = 0; /* walk down tail of path making each directory */ for (tail = &make_path.ptr[root]; *tail; *tail = lastch) { bool mkdir_attempted = false; /* advance tail to include next path component */ while (*tail == '/') tail++; while (*tail && *tail != '/') tail++; /* truncate path at next component */ lastch = *tail; *tail = '\0'; st.st_mode = 0; if (opts->dir_map && git_strmap_exists(opts->dir_map, make_path.ptr)) continue; /* See what's going on with this path component */ opts->perfdata.stat_calls++; retry_lstat: if (p_lstat(make_path.ptr, &st) < 0) { if (mkdir_attempted || errno != ENOENT) { git_error_set(GIT_ERROR_OS, "cannot access component in path '%s'", make_path.ptr); error = -1; goto done; } git_error_clear(); opts->perfdata.mkdir_calls++; mkdir_attempted = true; if (p_mkdir(make_path.ptr, mode) < 0) { if (errno == EEXIST) goto retry_lstat; git_error_set(GIT_ERROR_OS, "failed to make directory '%s'", make_path.ptr); error = -1; goto done; } } else { if ((error = mkdir_validate_dir( make_path.ptr, &st, mode, flags, opts)) < 0) goto done; } /* chmod if requested and necessary */ if ((error = mkdir_validate_mode( make_path.ptr, &st, (lastch == '\0'), mode, flags, opts)) < 0) goto done; if (opts->dir_map && opts->pool) { char *cache_path; size_t alloc_size; GIT_ERROR_CHECK_ALLOC_ADD(&alloc_size, make_path.size, 1); if (!git__is_uint32(alloc_size)) return -1; cache_path = git_pool_malloc(opts->pool, (uint32_t)alloc_size); GIT_ERROR_CHECK_ALLOC(cache_path); memcpy(cache_path, make_path.ptr, make_path.size + 1); git_strmap_insert(opts->dir_map, cache_path, cache_path, &error); if (error < 0) goto done; } } error = 0; /* check that full path really is a directory if requested & needed */ if ((flags & GIT_MKDIR_VERIFY_DIR) != 0 && lastch != '\0') { opts->perfdata.stat_calls++; if (p_stat(make_path.ptr, &st) < 0 || !S_ISDIR(st.st_mode)) { git_error_set(GIT_ERROR_OS, "path is not a directory '%s'", make_path.ptr); error = GIT_ENOTFOUND; } } done: git_buf_dispose(&make_path); return error; } typedef struct { const char *base; size_t baselen; uint32_t flags; int depth; } futils__rmdir_data; #define FUTILS_MAX_DEPTH 100 static int futils__error_cannot_rmdir(const char *path, const char *filemsg) { if (filemsg) git_error_set(GIT_ERROR_OS, "could not remove directory '%s': %s", path, filemsg); else git_error_set(GIT_ERROR_OS, "could not remove directory '%s'", path); return -1; } static int futils__rm_first_parent(git_buf *path, const char *ceiling) { int error = GIT_ENOTFOUND; struct stat st; while (error == GIT_ENOTFOUND) { git_buf_rtruncate_at_char(path, '/'); if (!path->size || git__prefixcmp(path->ptr, ceiling) != 0) error = 0; else if (p_lstat_posixly(path->ptr, &st) == 0) { if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) error = p_unlink(path->ptr); else if (!S_ISDIR(st.st_mode)) error = -1; /* fail to remove non-regular file */ } else if (errno != ENOTDIR) error = -1; } if (error) futils__error_cannot_rmdir(path->ptr, "cannot remove parent"); return error; } static int futils__rmdir_recurs_foreach(void *opaque, git_buf *path) { int error = 0; futils__rmdir_data *data = opaque; struct stat st; if (data->depth > FUTILS_MAX_DEPTH) error = futils__error_cannot_rmdir( path->ptr, "directory nesting too deep"); else if ((error = p_lstat_posixly(path->ptr, &st)) < 0) { if (errno == ENOENT) error = 0; else if (errno == ENOTDIR) { /* asked to remove a/b/c/d/e and a/b is a normal file */ if ((data->flags & GIT_RMDIR_REMOVE_BLOCKERS) != 0) error = futils__rm_first_parent(path, data->base); else futils__error_cannot_rmdir( path->ptr, "parent is not directory"); } else error = git_path_set_error(errno, path->ptr, "rmdir"); } else if (S_ISDIR(st.st_mode)) { data->depth++; error = git_path_direach(path, 0, futils__rmdir_recurs_foreach, data); data->depth--; if (error < 0) return error; if (data->depth == 0 && (data->flags & GIT_RMDIR_SKIP_ROOT) != 0) return error; if ((error = p_rmdir(path->ptr)) < 0) { if ((data->flags & GIT_RMDIR_SKIP_NONEMPTY) != 0 && (errno == ENOTEMPTY || errno == EEXIST || errno == EBUSY)) error = 0; else error = git_path_set_error(errno, path->ptr, "rmdir"); } } else if ((data->flags & GIT_RMDIR_REMOVE_FILES) != 0) { if (p_unlink(path->ptr) < 0) error = git_path_set_error(errno, path->ptr, "remove"); } else if ((data->flags & GIT_RMDIR_SKIP_NONEMPTY) == 0) error = futils__error_cannot_rmdir(path->ptr, "still present"); return error; } static int futils__rmdir_empty_parent(void *opaque, const char *path) { futils__rmdir_data *data = opaque; int error = 0; if (strlen(path) <= data->baselen) error = GIT_ITEROVER; else if (p_rmdir(path) < 0) { int en = errno; if (en == ENOENT || en == ENOTDIR) { /* do nothing */ } else if ((data->flags & GIT_RMDIR_SKIP_NONEMPTY) == 0 && en == EBUSY) { error = git_path_set_error(errno, path, "rmdir"); } else if (en == ENOTEMPTY || en == EEXIST || en == EBUSY) { error = GIT_ITEROVER; } else { error = git_path_set_error(errno, path, "rmdir"); } } return error; } int git_futils_rmdir_r( const char *path, const char *base, uint32_t flags) { int error; git_buf fullpath = GIT_BUF_INIT; futils__rmdir_data data; /* build path and find "root" where we should start calling mkdir */ if (git_path_join_unrooted(&fullpath, path, base, NULL) < 0) return -1; memset(&data, 0, sizeof(data)); data.base = base ? base : ""; data.baselen = base ? strlen(base) : 0; data.flags = flags; error = futils__rmdir_recurs_foreach(&data, &fullpath); /* remove now-empty parents if requested */ if (!error && (flags & GIT_RMDIR_EMPTY_PARENTS) != 0) error = git_path_walk_up( &fullpath, base, futils__rmdir_empty_parent, &data); if (error == GIT_ITEROVER) { git_error_clear(); error = 0; } git_buf_dispose(&fullpath); return error; } int git_futils_fake_symlink(const char *old, const char *new) { int retcode = GIT_ERROR; int fd = git_futils_creat_withpath(new, 0755, 0644); if (fd >= 0) { retcode = p_write(fd, old, strlen(old)); p_close(fd); } return retcode; } static int cp_by_fd(int ifd, int ofd, bool close_fd_when_done) { int error = 0; char buffer[FILEIO_BUFSIZE]; ssize_t len = 0; while (!error && (len = p_read(ifd, buffer, sizeof(buffer))) > 0) /* p_write() does not have the same semantics as write(). It loops * internally and will return 0 when it has completed writing. */ error = p_write(ofd, buffer, len); if (len < 0) { git_error_set(GIT_ERROR_OS, "read error while copying file"); error = (int)len; } if (error < 0) git_error_set(GIT_ERROR_OS, "write error while copying file"); if (close_fd_when_done) { p_close(ifd); p_close(ofd); } return error; } int git_futils_cp(const char *from, const char *to, mode_t filemode) { int ifd, ofd; if ((ifd = git_futils_open_ro(from)) < 0) return ifd; if ((ofd = p_open(to, O_WRONLY | O_CREAT | O_EXCL, filemode)) < 0) { p_close(ifd); return git_path_set_error(errno, to, "open for writing"); } return cp_by_fd(ifd, ofd, true); } int git_futils_touch(const char *path, time_t *when) { struct p_timeval times[2]; int ret; times[0].tv_sec = times[1].tv_sec = when ? *when : time(NULL); times[0].tv_usec = times[1].tv_usec = 0; ret = p_utimes(path, times); return (ret < 0) ? git_path_set_error(errno, path, "touch") : 0; } static int cp_link(const char *from, const char *to, size_t link_size) { int error = 0; ssize_t read_len; char *link_data; size_t alloc_size; GIT_ERROR_CHECK_ALLOC_ADD(&alloc_size, link_size, 1); link_data = git__malloc(alloc_size); GIT_ERROR_CHECK_ALLOC(link_data); read_len = p_readlink(from, link_data, link_size); if (read_len != (ssize_t)link_size) { git_error_set(GIT_ERROR_OS, "failed to read symlink data for '%s'", from); error = -1; } else { link_data[read_len] = '\0'; if (p_symlink(link_data, to) < 0) { git_error_set(GIT_ERROR_OS, "could not symlink '%s' as '%s'", link_data, to); error = -1; } } git__free(link_data); return error; } typedef struct { const char *to_root; git_buf to; ssize_t from_prefix; uint32_t flags; uint32_t mkdir_flags; mode_t dirmode; } cp_r_info; #define GIT_CPDIR__MKDIR_DONE_FOR_TO_ROOT (1u << 10) static int _cp_r_mkdir(cp_r_info *info, git_buf *from) { int error = 0; /* create root directory the first time we need to create a directory */ if ((info->flags & GIT_CPDIR__MKDIR_DONE_FOR_TO_ROOT) == 0) { error = git_futils_mkdir( info->to_root, info->dirmode, (info->flags & GIT_CPDIR_CHMOD_DIRS) ? GIT_MKDIR_CHMOD : 0); info->flags |= GIT_CPDIR__MKDIR_DONE_FOR_TO_ROOT; } /* create directory with root as base to prevent excess chmods */ if (!error) error = git_futils_mkdir_relative( from->ptr + info->from_prefix, info->to_root, info->dirmode, info->mkdir_flags, NULL); return error; } static int _cp_r_callback(void *ref, git_buf *from) { int error = 0; cp_r_info *info = ref; struct stat from_st, to_st; bool exists = false; if ((info->flags & GIT_CPDIR_COPY_DOTFILES) == 0 && from->ptr[git_path_basename_offset(from)] == '.') return 0; if ((error = git_buf_joinpath( &info->to, info->to_root, from->ptr + info->from_prefix)) < 0) return error; if (!(error = git_path_lstat(info->to.ptr, &to_st))) exists = true; else if (error != GIT_ENOTFOUND) return error; else { git_error_clear(); error = 0; } if ((error = git_path_lstat(from->ptr, &from_st)) < 0) return error; if (S_ISDIR(from_st.st_mode)) { mode_t oldmode = info->dirmode; /* if we are not chmod'ing, then overwrite dirmode */ if ((info->flags & GIT_CPDIR_CHMOD_DIRS) == 0) info->dirmode = from_st.st_mode; /* make directory now if CREATE_EMPTY_DIRS is requested and needed */ if (!exists && (info->flags & GIT_CPDIR_CREATE_EMPTY_DIRS) != 0) error = _cp_r_mkdir(info, from); /* recurse onto target directory */ if (!error && (!exists || S_ISDIR(to_st.st_mode))) error = git_path_direach(from, 0, _cp_r_callback, info); if (oldmode != 0) info->dirmode = oldmode; return error; } if (exists) { if ((info->flags & GIT_CPDIR_OVERWRITE) == 0) return 0; if (p_unlink(info->to.ptr) < 0) { git_error_set(GIT_ERROR_OS, "cannot overwrite existing file '%s'", info->to.ptr); return GIT_EEXISTS; } } /* Done if this isn't a regular file or a symlink */ if (!S_ISREG(from_st.st_mode) && (!S_ISLNK(from_st.st_mode) || (info->flags & GIT_CPDIR_COPY_SYMLINKS) == 0)) return 0; /* Make container directory on demand if needed */ if ((info->flags & GIT_CPDIR_CREATE_EMPTY_DIRS) == 0 && (error = _cp_r_mkdir(info, from)) < 0) return error; /* make symlink or regular file */ if (info->flags & GIT_CPDIR_LINK_FILES) { if ((error = p_link(from->ptr, info->to.ptr)) < 0) git_error_set(GIT_ERROR_OS, "failed to link '%s'", from->ptr); } else if (S_ISLNK(from_st.st_mode)) { error = cp_link(from->ptr, info->to.ptr, (size_t)from_st.st_size); } else { mode_t usemode = from_st.st_mode; if ((info->flags & GIT_CPDIR_SIMPLE_TO_MODE) != 0) usemode = GIT_PERMS_FOR_WRITE(usemode); error = git_futils_cp(from->ptr, info->to.ptr, usemode); } return error; } int git_futils_cp_r( const char *from, const char *to, uint32_t flags, mode_t dirmode) { int error; git_buf path = GIT_BUF_INIT; cp_r_info info; if (git_buf_joinpath(&path, from, "") < 0) /* ensure trailing slash */ return -1; memset(&info, 0, sizeof(info)); info.to_root = to; info.flags = flags; info.dirmode = dirmode; info.from_prefix = path.size; git_buf_init(&info.to, 0); /* precalculate mkdir flags */ if ((flags & GIT_CPDIR_CREATE_EMPTY_DIRS) == 0) { /* if not creating empty dirs, then use mkdir to create the path on * demand right before files are copied. */ info.mkdir_flags = GIT_MKDIR_PATH | GIT_MKDIR_SKIP_LAST; if ((flags & GIT_CPDIR_CHMOD_DIRS) != 0) info.mkdir_flags |= GIT_MKDIR_CHMOD_PATH; } else { /* otherwise, we will do simple mkdir as directories are encountered */ info.mkdir_flags = ((flags & GIT_CPDIR_CHMOD_DIRS) != 0) ? GIT_MKDIR_CHMOD : 0; } error = _cp_r_callback(&info, &path); git_buf_dispose(&path); git_buf_dispose(&info.to); return error; } int git_futils_filestamp_check( git_futils_filestamp *stamp, const char *path) { struct stat st; /* if the stamp is NULL, then always reload */ if (stamp == NULL) return 1; if (p_stat(path, &st) < 0) return GIT_ENOTFOUND; if (stamp->mtime.tv_sec == st.st_mtime && #if defined(GIT_USE_NSEC) stamp->mtime.tv_nsec == st.st_mtime_nsec && #endif stamp->size == (git_off_t)st.st_size && stamp->ino == (unsigned int)st.st_ino) return 0; stamp->mtime.tv_sec = st.st_mtime; #if defined(GIT_USE_NSEC) stamp->mtime.tv_nsec = st.st_mtime_nsec; #endif stamp->size = (git_off_t)st.st_size; stamp->ino = (unsigned int)st.st_ino; return 1; } void git_futils_filestamp_set( git_futils_filestamp *target, const git_futils_filestamp *source) { assert(target); if (source) memcpy(target, source, sizeof(*target)); else memset(target, 0, sizeof(*target)); } void git_futils_filestamp_set_from_stat( git_futils_filestamp *stamp, struct stat *st) { if (st) { stamp->mtime.tv_sec = st->st_mtime; #if defined(GIT_USE_NSEC) stamp->mtime.tv_nsec = st->st_mtime_nsec; #else stamp->mtime.tv_nsec = 0; #endif stamp->size = (git_off_t)st->st_size; stamp->ino = (unsigned int)st->st_ino; } else { memset(stamp, 0, sizeof(*stamp)); } } int git_futils_fsync_dir(const char *path) { #ifdef GIT_WIN32 GIT_UNUSED(path); return 0; #else int fd, error = -1; if ((fd = p_open(path, O_RDONLY)) < 0) { git_error_set(GIT_ERROR_OS, "failed to open directory '%s' for fsync", path); return -1; } if ((error = p_fsync(fd)) < 0) git_error_set(GIT_ERROR_OS, "failed to fsync directory '%s'", path); p_close(fd); return error; #endif } int git_futils_fsync_parent(const char *path) { char *parent; int error; if ((parent = git_path_dirname(path)) == NULL) return -1; error = git_futils_fsync_dir(parent); git__free(parent); return error; }
81e0c2287c31a2eb524650ce2e1bed83fad92259
e3c0499cc58c9fbec887a2e85672d5e29588f9e0
/dex/clibs/basic/include/mem/cmem.h
e4ef4e4d31fc00d685a0912f243fed68ca2695ea
[ "BSD-3-Clause" ]
permissive
stevenknown/xoc
bf19fba2a7851f0c91d62846b61f12000993fa94
3514aaf0d742e7c1bff956f5a5e96a92102abe8a
refs/heads/master
2023-05-14T10:18:34.851859
2023-04-29T08:15:24
2023-04-29T08:15:24
40,242,945
132
19
NOASSERTION
2023-09-08T08:04:04
2015-08-05T12:02:52
C++
UTF-8
C
false
false
1,080
h
cmem.h
/*Copyright 2011 Alibaba Group*/ /* * cmem.h * madagascar * * Created by Misa.Z on 2/19/09. * Copyright 2009 Virtualnology. All rights reserved. * */ #ifndef CLIBS_MEM_H #define CLIBS_MEM_H #include "std/cstd.h" typedef void (*CMemAllocFailProc)(); EXTERN_C void cMemSetAllocFailProc(CMemAllocFailProc proc); EXTERN_C bool cMemInit(); EXTERN_C void cMemFinal(); EXTERN_C void* cMallocRaw(UInt32 size); #define cMalloc(size) cMallocRaw(size) EXTERN_C void cFree(void* p); EXTERN_C UInt32 cMemTotalSize(void); EXTERN_C UInt32 cMemFreeSize(void); EXTERN_C UInt32 cMemUsedSize(void); #ifdef __BREW__ #include "aeestdlib.h" #define cMemchr MEMCHR #define cMemmove MEMMOVE #define cMemcmp MEMCMP #define cMemcpy MEMCPY #define cMemset MEMSET #else #define cMemchr memchr #define cMemmove memmove #define cMemcmp memcmp #define cMemcpy memcpy #define cMemset memset #endif //** added by raymond void *cMmap(Int32 fd, Int32 alignment, Int32 size, Int32 mode); void cMunmap(void *address, Int32 length); //** end #endif
e8e17d63ad594db84a9363e25014a72a259f3424
52c8ed39b32ccc7c0673278c1adea3638797c9ff
/src/arch/arm64/mach-rk3399/x3399.c
c27fa6fe61806f782f54a1f3d53b89ec3d4c9ad2
[ "MIT" ]
permissive
xboot/xboot
0cab7b440b612aa0a4c366025598a53a7ec3adf1
6d6b93947b7fcb8c3924fedb0715c23877eedd5e
refs/heads/master
2023-08-20T05:56:25.149388
2023-07-12T07:38:29
2023-07-12T07:38:29
471,539
765
296
MIT
2023-05-25T09:39:01
2010-01-14T08:25:12
C
UTF-8
C
false
false
2,977
c
x3399.c
/* * x3399.c * * Copyright(c) 2007-2023 Jianjun Jiang <8192542@qq.com> * Official site: http://xboot.org * Mobile phone: +86-18665388956 * QQ: 8192542 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ #include <xboot.h> #include <rk3399/reg-cru.h> #include <rk3399/reg-pmu-grf.h> static int mach_detect(struct machine_t * mach) { return 1; } static void mach_smpinit(struct machine_t * mach) { } static void mach_smpboot(struct machine_t * mach, void (*func)(void)) { } static void mach_shutdown(struct machine_t * mach) { } static void mach_reboot(struct machine_t * mach) { write32(phys_to_virt(RK3399_PMU_GRF_BASE) + PMU_GRF_OS_REG0, 0x0); write32(phys_to_virt(RK3399_CRU_BASE) + CRU_GLB_SRST_FST_VALUE, 0xfdb9); } static void mach_sleep(struct machine_t * mach) { } static void mach_cleanup(struct machine_t * mach) { } static void mach_logger(struct machine_t * mach, const char * buf, int count) { virtual_addr_t virt = phys_to_virt(0xff1a0000); int i; for(i = 0; i < count; i++) { while((read32(virt + 0x7c) & (0x1 << 1)) == 0); write32(virt + 0x00, buf[i]); } } static const char * mach_uniqueid(struct machine_t * mach) { return NULL; } static int mach_keygen(struct machine_t * mach, const char * msg, void * key) { return 0; } static int mach_verify(struct machine_t * mach) { return 1; } static struct machine_t x3399 = { .name = "x3399", .desc = "X3399 Based On RK3399 SOC", .detect = mach_detect, .smpinit = mach_smpinit, .smpboot = mach_smpboot, .shutdown = mach_shutdown, .reboot = mach_reboot, .sleep = mach_sleep, .cleanup = mach_cleanup, .logger = mach_logger, .uniqueid = mach_uniqueid, .keygen = mach_keygen, .verify = mach_verify, }; static __init void x3399_machine_init(void) { register_machine(&x3399); } static __exit void x3399_machine_exit(void) { unregister_machine(&x3399); } machine_initcall(x3399_machine_init); machine_exitcall(x3399_machine_exit);
f82918a2cdcc3cef45ee0891a351d95360ad4f92
fe86affa6ea97393800181c100da9d18e2783e01
/src/lib/vmm/x86.c
84ea81f02bafcbe5617c840643ade7bdeff2b1bd
[ "BSD-2-Clause", "BSD-3-Clause", "GPL-3.0-only" ]
permissive
moby/hyperkit
251be6c6e86b5bbc4483e43e28c02c025709496e
3cb0d5475244761c61e6fd4a562702c26b46f846
refs/heads/master
2023-06-09T01:53:25.506216
2022-02-20T12:19:59
2022-02-20T12:19:59
55,985,023
2,854
305
BSD-2-Clause
2023-02-25T06:55:26
2016-04-11T15:36:20
C
UTF-8
C
false
false
12,167
c
x86.c
/*- * Copyright (c) 2011 NetApp, Inc. * Copyright (c) 2015 xhyve developers * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #include <stdint.h> #include <strings.h> #include <xhyve/support/misc.h> #include <xhyve/support/atomic.h> #include <xhyve/support/specialreg.h> #include <xhyve/vmm/vmm.h> #include <xhyve/vmm/vmm_host.h> #include <xhyve/vmm/vmm_ktr.h> #include <xhyve/vmm/x86.h> #define CPUID_VM_HIGH 0x40000000 static const char bhyve_id[12] = "bhyve bhyve "; static volatile u_long bhyve_xcpuids; /* * The default CPU topology is a single thread per package. */ static u_int threads_per_core = 1; static u_int cores_per_package = 1; static int cpuid_leaf_b = 1; /* * Round up to the next power of two, if necessary, and then take log2. * Returns -1 if argument is zero. */ static __inline int log2(u_int x) { return (fls((int) (x << (1 - powerof2(x)))) - 1); } int x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) { const struct xsave_limits *limits; uint64_t cr4; int error, level, width, x2apic_id; unsigned int func, regs[4], logical_cpus; u_int cpu_feature, amd_feature, amd_feature2, cpu_high, cpu_exthigh; u_int tsc_is_invariant, smp_tsc; enum x2apic_state x2apic_state; VCPU_CTR2(vm, vcpu_id, "cpuid %#x,%#x", *eax, *ecx); tsc_is_invariant = 1; smp_tsc = 1; do_cpuid(0, regs); cpu_high = regs[0]; do_cpuid(1, regs); cpu_feature = regs[3]; do_cpuid(0x80000000, regs); cpu_exthigh = regs[0]; do_cpuid(0x80000001, regs); amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); amd_feature2 = regs[2]; /* * Requests for invalid CPUID levels should map to the highest * available level instead. */ if (cpu_exthigh != 0 && *eax >= 0x80000000) { if (*eax > cpu_exthigh) *eax = cpu_exthigh; } else if (*eax >= 0x40000000) { if (*eax > CPUID_VM_HIGH) *eax = CPUID_VM_HIGH; } else if (*eax > cpu_high) { *eax = cpu_high; } func = *eax; /* * In general the approach used for CPU topology is to * advertise a flat topology where all CPUs are packages with * no multi-core or SMT. */ switch (func) { /* * Pass these through to the guest */ case CPUID_0000_0000: case CPUID_0000_0002: case CPUID_0000_0003: case CPUID_8000_0000: case CPUID_8000_0002: case CPUID_8000_0003: case CPUID_8000_0004: case CPUID_8000_0006: cpuid_count(*eax, *ecx, regs); break; case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); break; case CPUID_8000_0001: cpuid_count(*eax, *ecx, regs); /* * Hide SVM and Topology Extension features from guest. */ regs[2] &= ~((unsigned) (AMDID2_SVM | AMDID2_TOPOLOGY)); /* * Don't advertise extended performance counter MSRs * to the guest. */ regs[2] &= ~((unsigned) AMDID2_PCXC); regs[2] &= ~((unsigned) AMDID2_PNXC); regs[2] &= ~((unsigned) AMDID2_PTSCEL2I); /* * Don't advertise Instruction Based Sampling feature. */ regs[2] &= ~((unsigned) AMDID2_IBS); /* NodeID MSR not available */ regs[2] &= ~((unsigned) AMDID2_NODE_ID); /* Don't advertise the OS visible workaround feature */ regs[2] &= ~((unsigned) AMDID2_OSVW); /* * Hide rdtscp/ia32_tsc_aux until we know how * to deal with them. */ regs[3] &= ~((unsigned) AMDID_RDTSCP); break; case CPUID_8000_0007: /* * AMD uses this leaf to advertise the processor's * power monitoring and RAS capabilities. These * features are hardware-specific and exposing * them to a guest doesn't make a lot of sense. * * Intel uses this leaf only to advertise the * "Invariant TSC" feature with all other bits * being reserved (set to zero). */ regs[0] = 0; regs[1] = 0; regs[2] = 0; regs[3] = 0; /* * "Invariant TSC" can be advertised to the guest if: * - host TSC frequency is invariant * - host TSCs are synchronized across physical cpus * * XXX This still falls short because the vcpu * can observe the TSC moving backwards as it * migrates across physical cpus. But at least * it should discourage the guest from using the * TSC to keep track of time. */ if (tsc_is_invariant && smp_tsc) regs[3] |= AMDPM_TSC_INVARIANT; break; case CPUID_0000_0001: do_cpuid(1, regs); error = vm_get_x2apic_state(vm, vcpu_id, &x2apic_state); if (error) { xhyve_abort("x86_emulate_cpuid: error %d " "fetching x2apic state\n", error); } /* * Override the APIC ID only in ebx */ regs[1] &= ~((unsigned) CPUID_LOCAL_APIC_ID); regs[1] |= (((unsigned) vcpu_id) << CPUID_0000_0001_APICID_SHIFT); /* * Don't expose VMX, SpeedStep, TME or SMX capability. * Advertise x2APIC capability and Hypervisor guest. */ regs[2] &= ~((unsigned) (CPUID2_VMX | CPUID2_EST | CPUID2_TM2)); regs[2] &= ~((unsigned) CPUID2_SMX); regs[2] |= (unsigned) CPUID2_HV; if (x2apic_state != ((unsigned) X2APIC_DISABLED)) regs[2] |= ((unsigned) CPUID2_X2APIC); else regs[2] &= ~((unsigned) CPUID2_X2APIC); /* * Only advertise CPUID2_XSAVE in the guest if * the host is using XSAVE. */ if (!(regs[2] & ((unsigned) CPUID2_OSXSAVE))) regs[2] &= ~((unsigned) CPUID2_XSAVE); /* * If CPUID2_XSAVE is being advertised and the * guest has set CR4_XSAVE, set * CPUID2_OSXSAVE. */ regs[2] &= ~((unsigned) CPUID2_OSXSAVE); if (regs[2] & ((unsigned) CPUID2_XSAVE)) { error = vm_get_register(vm, vcpu_id, VM_REG_GUEST_CR4, &cr4); if (error) xhyve_abort("x86_emulate_cpuid: error %d " "fetching %%cr4\n", error); if (cr4 & CR4_XSAVE) regs[2] |= ((unsigned) CPUID2_OSXSAVE); } /* * Hide monitor/mwait until we know how to deal with * these instructions. */ regs[2] &= ~((unsigned) CPUID2_MON); /* * Hide the performance and debug features. */ regs[2] &= ~((unsigned) CPUID2_PDCM); /* * No TSC deadline support in the APIC yet */ regs[2] &= ~((unsigned) CPUID2_TSCDLT); /* * Hide thermal monitoring */ regs[3] &= ~((unsigned) (CPUID_ACPI | CPUID_TM)); /* * Hide the debug store capability. */ regs[3] &= ~((unsigned) CPUID_DS); /* * Advertise the Machine Check and MTRR capability. * * Some guest OSes (e.g. Windows) will not boot if * these features are absent. */ regs[3] |= (unsigned) (CPUID_MCA | CPUID_MCE | CPUID_MTRR); logical_cpus = threads_per_core * cores_per_package; regs[1] &= ~((unsigned) CPUID_HTT_CORES); regs[1] |= (logical_cpus & 0xff) << 16; regs[3] |= (unsigned) CPUID_HTT; break; case CPUID_0000_0004: cpuid_count(*eax, *ecx, regs); if (regs[0] || regs[1] || regs[2] || regs[3]) { regs[0] &= 0x3ff; regs[0] |= (cores_per_package - 1) << 26; /* * Cache topology: * - L1 and L2 are shared only by the logical * processors in a single core. * - L3 and above are shared by all logical * processors in the package. */ logical_cpus = threads_per_core; level = (regs[0] >> 5) & 0x7; if (level >= 3) logical_cpus *= cores_per_package; regs[0] |= (logical_cpus - 1) << 14; } break; case CPUID_0000_0007: regs[0] = 0; regs[1] = 0; regs[2] = 0; regs[3] = 0; /* leaf 0 */ if (*ecx == 0) { cpuid_count(*eax, *ecx, regs); /* Only leaf 0 is supported */ regs[0] = 0; /* * Expose known-safe features. */ regs[1] &= (CPUID_STDEXT_FSGSBASE | CPUID_STDEXT_BMI1 | CPUID_STDEXT_HLE | CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2 | CPUID_STDEXT_ERMS | CPUID_STDEXT_RTM | CPUID_STDEXT_AVX512F | CPUID_STDEXT_AVX512PF | CPUID_STDEXT_AVX512ER | CPUID_STDEXT_AVX512CD); regs[2] = 0; regs[3] = 0; /* FIXME */ // regs[1] |= CPUID_STDEXT_INVPCID; } break; case CPUID_0000_0006: regs[0] = CPUTPM1_ARAT; regs[1] = 0; regs[2] = 0; regs[3] = 0; break; case CPUID_0000_000A: /* * Handle the access, but report 0 for * all options */ regs[0] = 0; regs[1] = 0; regs[2] = 0; regs[3] = 0; break; case CPUID_0000_000B: /* * Processor topology enumeration */ logical_cpus = 0; width = 0; level = 0; x2apic_id = 0; if (*ecx == 0) { logical_cpus = threads_per_core; width = log2(logical_cpus); level = CPUID_TYPE_SMT; x2apic_id = vcpu_id; } if (*ecx == 1) { logical_cpus = threads_per_core * cores_per_package; width = log2(logical_cpus); level = CPUID_TYPE_CORE; x2apic_id = vcpu_id; } if (!cpuid_leaf_b || *ecx >= 2) { width = 0; logical_cpus = 0; level = 0; x2apic_id = 0; } regs[0] = width & 0x1f; regs[1] = logical_cpus & 0xffff; regs[2] = (((unsigned) level) << 8) | (*ecx & 0xff); regs[3] = (unsigned) x2apic_id; break; case CPUID_0000_000D: limits = vmm_get_xsave_limits(); if (!limits->xsave_enabled) { regs[0] = 0; regs[1] = 0; regs[2] = 0; regs[3] = 0; break; } cpuid_count(*eax, *ecx, regs); switch (*ecx) { case 0: /* * Only permit the guest to use bits * that are active in the host in * %xcr0. Also, claim that the * maximum save area size is * equivalent to the host's current * save area size. Since this runs * "inside" of vmrun(), it runs with * the guest's xcr0, so the current * save area size is correct as-is. */ regs[0] &= limits->xcr0_allowed; regs[2] = limits->xsave_max_size; regs[3] &= (limits->xcr0_allowed >> 32); break; case 1: /* Only permit XSAVEOPT. */ regs[0] &= CPUID_EXTSTATE_XSAVEOPT; regs[1] = 0; regs[2] = 0; regs[3] = 0; break; default: /* * If the leaf is for a permitted feature, * pass through as-is, otherwise return * all zeroes. */ if (!(limits->xcr0_allowed & (1ul << *ecx))) { regs[0] = 0; regs[1] = 0; regs[2] = 0; regs[3] = 0; } break; } break; case CPUID_0000_0015: /* * Don't report CPU TSC/Crystal ratio and clock * values since guests may use these to derive the * local APIC frequency.. */ regs[0] = 0; regs[1] = 0; regs[2] = 0; regs[3] = 0; break; case 0x40000000: regs[0] = CPUID_VM_HIGH; bcopy(bhyve_id, &regs[1], 4); bcopy(bhyve_id + 4, &regs[2], 4); bcopy(bhyve_id + 8, &regs[3], 4); break; default: /* * The leaf value has already been clamped so * simply pass this through, keeping count of * how many unhandled leaf values have been seen. */ atomic_add_long(&bhyve_xcpuids, 1); cpuid_count(*eax, *ecx, regs); break; } *eax = regs[0]; *ebx = regs[1]; *ecx = regs[2]; *edx = regs[3]; return (1); }
c33f476a6d0a5edb199ff91c8d2eb42943e2acdd
e814383d36a10839104efaa4df277996ab220fa3
/ompi/mpi/fortran/mpif-h/ineighbor_alltoallv_f.c
c7b9901cadf17fb548d30728722563c88d8562bc
[ "mpich2", "BSD-3-Clause-Open-MPI" ]
permissive
open-mpi/ompi
a1d7483ae1d83dd8fd8ae3ee95e832e0a0ee04e3
1edfdb025c4450f694600083ad871cf06c8d45cd
refs/heads/main
2023-09-01T01:30:02.040705
2023-08-29T17:32:18
2023-08-29T17:32:18
24,107,001
2,008
973
NOASSERTION
2023-09-14T20:59:26
2014-09-16T16:08:30
C
UTF-8
C
false
false
6,053
c
ineighbor_alltoallv_f.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2021 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #include "ompi_config.h" #include "ompi/mpi/fortran/mpif-h/bindings.h" #include "ompi/mpi/fortran/base/constants.h" #include "ompi/mca/coll/base/coll_base_util.h" #if OMPI_BUILD_MPI_PROFILING #if OPAL_HAVE_WEAK_SYMBOLS #pragma weak PMPI_INEIGHBOR_ALLTOALLV = ompi_ineighbor_alltoallv_f #pragma weak pmpi_ineighbor_alltoallv = ompi_ineighbor_alltoallv_f #pragma weak pmpi_ineighbor_alltoallv_ = ompi_ineighbor_alltoallv_f #pragma weak pmpi_ineighbor_alltoallv__ = ompi_ineighbor_alltoallv_f #pragma weak PMPI_Ineighbor_alltoallv_f = ompi_ineighbor_alltoallv_f #pragma weak PMPI_Ineighbor_alltoallv_f08 = ompi_ineighbor_alltoallv_f #else OMPI_GENERATE_F77_BINDINGS (PMPI_INEIGHBOR_ALLTOALLV, pmpi_ineighbor_alltoallv, pmpi_ineighbor_alltoallv_, pmpi_ineighbor_alltoallv__, pompi_ineighbor_alltoallv_f, (char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr), (sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierr) ) #endif #endif #if OPAL_HAVE_WEAK_SYMBOLS #pragma weak MPI_INEIGHBOR_ALLTOALLV = ompi_ineighbor_alltoallv_f #pragma weak mpi_ineighbor_alltoallv = ompi_ineighbor_alltoallv_f #pragma weak mpi_ineighbor_alltoallv_ = ompi_ineighbor_alltoallv_f #pragma weak mpi_ineighbor_alltoallv__ = ompi_ineighbor_alltoallv_f #pragma weak MPI_Ineighbor_alltoallv_f = ompi_ineighbor_alltoallv_f #pragma weak MPI_Ineighbor_alltoallv_f08 = ompi_ineighbor_alltoallv_f #else #if ! OMPI_BUILD_MPI_PROFILING OMPI_GENERATE_F77_BINDINGS (MPI_INEIGHBOR_ALLTOALLV, mpi_ineighbor_alltoallv, mpi_ineighbor_alltoallv_, mpi_ineighbor_alltoallv__, ompi_ineighbor_alltoallv_f, (char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr), (sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request, ierr) ) #else #define ompi_ineighbor_alltoallv_f pompi_ineighbor_alltoallv_f #endif #endif void ompi_ineighbor_alltoallv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr) { MPI_Comm c_comm; MPI_Datatype c_sendtype, c_recvtype; MPI_Request c_request; int size, idx = 0, c_ierr; OMPI_ARRAY_NAME_DECL(sendcounts); OMPI_ARRAY_NAME_DECL(sdispls); OMPI_ARRAY_NAME_DECL(recvcounts); OMPI_ARRAY_NAME_DECL(rdispls); c_comm = PMPI_Comm_f2c(*comm); c_sendtype = PMPI_Type_f2c(*sendtype); c_recvtype = PMPI_Type_f2c(*recvtype); PMPI_Comm_size(c_comm, &size); OMPI_ARRAY_FINT_2_INT(sendcounts, size); OMPI_ARRAY_FINT_2_INT(sdispls, size); OMPI_ARRAY_FINT_2_INT(recvcounts, size); OMPI_ARRAY_FINT_2_INT(rdispls, size); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf); c_ierr = PMPI_Ineighbor_alltoallv(sendbuf, OMPI_ARRAY_NAME_CONVERT(sendcounts), OMPI_ARRAY_NAME_CONVERT(sdispls), c_sendtype, recvbuf, OMPI_ARRAY_NAME_CONVERT(recvcounts), OMPI_ARRAY_NAME_CONVERT(rdispls), c_recvtype, c_comm, &c_request); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request); if ( REQUEST_COMPLETE(c_request)) { OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts); OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls); OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts); OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls); } else { ompi_coll_base_nbc_request_t* nb_request = (ompi_coll_base_nbc_request_t*)c_request; nb_request->data.release_arrays[idx++] = OMPI_ARRAY_NAME_CONVERT(sendcounts); nb_request->data.release_arrays[idx++] = OMPI_ARRAY_NAME_CONVERT(sdispls); nb_request->data.release_arrays[idx++] = OMPI_ARRAY_NAME_CONVERT(sendcounts); nb_request->data.release_arrays[idx++] = OMPI_ARRAY_NAME_CONVERT(rdispls); nb_request->data.release_arrays[idx] = NULL; } }
6cba27c8ca07c99ec1ef4f9bbd6ef21ea40e42bc
ea8fc70c7dbf49059431fa45a940742736c68fb8
/ext/kernel/murmurhash.h
0ef08206de63aa0199b2810340a003fa112cd878
[ "BSD-3-Clause" ]
permissive
dreamsxin/cphalcon7
1bd2194a251657b48857326927db69fef617ab91
1b8c6b04b4ca237a5ead87d4752df0d2e85c7a9d
refs/heads/master
2023-03-08T04:53:08.829432
2022-07-07T07:48:59
2022-07-07T07:48:59
47,245,335
298
73
null
2021-06-22T11:53:25
2015-12-02T07:44:43
C
UTF-8
C
false
false
2,250
h
murmurhash.h
/* +------------------------------------------------------------------------+ | Phalcon Framework | +------------------------------------------------------------------------+ | Copyright (c) 2011-2014 Phalcon Team (http://www.phalconphp.com) | +------------------------------------------------------------------------+ | This source file is subject to the New BSD License that is bundled | | with this package in the file docs/LICENSE.txt. | | | | If you did not receive a copy of the license and are unable to | | obtain it through the world-wide-web, please send an email | | to license@phalconphp.com so we can send you a copy immediately. | +------------------------------------------------------------------------+ | Authors: Andres Gutierrez <andres@phalconphp.com> | | Eduar Carvajal <eduar@phalconphp.com> | | Vladimir Kolesnikov <vladimir@extrememember.com> | | ZhuZongXin <dreamsxin@qq.com> | +------------------------------------------------------------------------+ */ #ifndef PHALCON_KERNEL_MURMURHASH_H #define PHALCON_KERNEL_MURMURHASH_H #include "php_phalcon.h" void MurmurHash3_x86_32 (const void* key, int len, uint32_t seed, void* out); void MurmurHash3_x86_128(const void* key, int len, uint32_t seed, void* out); #ifdef ZEND_ENABLE_ZVAL_LONG64 void MurmurHash3_x64_128(const void* key, int len, uint32_t seed, void* out); #endif zend_ulong MurmurHash2(const void* key, zend_ulong len, uint32_t seed); static zend_always_inline zend_ulong phalcon_murmurhash_pointer(const void* key, uint32_t seed) { return MurmurHash2(&key, sizeof key, seed); } static zend_always_inline zend_ulong phalcon_murmurhash_int(const void* key, uint32_t seed) { return MurmurHash2(key, sizeof(int), seed); } static zend_always_inline zend_ulong phalcon_murmurhash_string(const void* key, uint32_t seed) { return MurmurHash2(key, strlen((const char*)key), seed); } #endif /* PHALCON_KERNEL_MURMURHASH_H */
718beab236118bc5d7eaa7a3b171e284e4bcef8b
2247493654c160426c1655281aa7f1dca2bc98dd
/src/kernel/ScalarDiffElemKernel.C
08cffbb375abfa43409272c3ba20e73819e64ff4
[ "BSD-2-Clause" ]
permissive
NaluCFD/Nalu
12999b0e3b76dbeab8fc184f38b65a13b1180bce
3286651e494894ac5948c41bf985f987d20c2370
refs/heads/master
2023-08-10T02:48:04.179859
2023-08-02T19:02:46
2023-08-02T19:02:46
69,712,764
138
185
NOASSERTION
2023-09-14T16:42:19
2016-10-01T01:25:20
C
UTF-8
C
false
false
4,111
c
ScalarDiffElemKernel.C
/*------------------------------------------------------------------------*/ /* Copyright 2014 Sandia Corporation. */ /* This software is released under the license detailed */ /* in the file, LICENSE, which is located in the top-level Nalu */ /* directory structure */ /*------------------------------------------------------------------------*/ #include "kernel/ScalarDiffElemKernel.h" #include "AlgTraits.h" #include "master_element/MasterElement.h" #include "TimeIntegrator.h" #include "SolutionOptions.h" // template and scratch space #include "BuildTemplates.h" #include "ScratchViews.h" // stk_mesh/base/fem #include <stk_mesh/base/Entity.hpp> #include <stk_mesh/base/MetaData.hpp> #include <stk_mesh/base/BulkData.hpp> #include <stk_mesh/base/Field.hpp> namespace sierra { namespace nalu { template<typename AlgTraits> ScalarDiffElemKernel<AlgTraits>::ScalarDiffElemKernel( const stk::mesh::BulkData& bulkData, const SolutionOptions& solnOpts, ScalarFieldType* scalarQ, ScalarFieldType* diffFluxCoeff, ElemDataRequests& dataPreReqs) : Kernel(), scalarQ_(scalarQ), diffFluxCoeff_(diffFluxCoeff), lrscv_(sierra::nalu::MasterElementRepo::get_surface_master_element(AlgTraits::topo_)->adjacentNodes()), shiftedGradOp_(solnOpts.get_shifted_grad_op(scalarQ_->name())) { // Save of required fields const stk::mesh::MetaData& metaData = bulkData.mesh_meta_data(); coordinates_ = metaData.get_field<double>(stk::topology::NODE_RANK, solnOpts.get_coordinates_name()); MasterElement *meSCS = sierra::nalu::MasterElementRepo::get_surface_master_element(AlgTraits::topo_); get_scs_shape_fn_data<AlgTraits>([&](double* ptr){meSCS->shape_fcn(ptr);}, v_shape_function_); dataPreReqs.add_cvfem_surface_me(meSCS); // fields and data dataPreReqs.add_coordinates_field(*coordinates_, AlgTraits::nDim_, CURRENT_COORDINATES); dataPreReqs.add_gathered_nodal_field(*scalarQ_, 1); dataPreReqs.add_gathered_nodal_field(*diffFluxCoeff_, 1); dataPreReqs.add_master_element_call(SCS_AREAV, CURRENT_COORDINATES); if ( shiftedGradOp_ ) dataPreReqs.add_master_element_call(SCS_SHIFTED_GRAD_OP, CURRENT_COORDINATES); else dataPreReqs.add_master_element_call(SCS_GRAD_OP, CURRENT_COORDINATES); } template<typename AlgTraits> ScalarDiffElemKernel<AlgTraits>::~ScalarDiffElemKernel() {} template<typename AlgTraits> void ScalarDiffElemKernel<AlgTraits>::execute( SharedMemView<DoubleType**>& lhs, SharedMemView<DoubleType*>& rhs, ScratchViews<DoubleType>& scratchViews) { SharedMemView<DoubleType*>& v_scalarQ = scratchViews.get_scratch_view_1D(*scalarQ_); SharedMemView<DoubleType*>& v_diffFluxCoeff = scratchViews.get_scratch_view_1D(*diffFluxCoeff_); SharedMemView<DoubleType**>& v_scs_areav = scratchViews.get_me_views(CURRENT_COORDINATES).scs_areav; SharedMemView<DoubleType***>& v_dndx = shiftedGradOp_ ? scratchViews.get_me_views(CURRENT_COORDINATES).dndx_shifted : scratchViews.get_me_views(CURRENT_COORDINATES).dndx; // start the assembly for ( int ip = 0; ip < AlgTraits::numScsIp_; ++ip ) { // left and right nodes for this ip const int il = lrscv_[2*ip]; const int ir = lrscv_[2*ip+1]; // compute ip property DoubleType diffFluxCoeffIp = 0.0; for ( int ic = 0; ic < AlgTraits::nodesPerElement_; ++ic ) { const DoubleType r = v_shape_function_(ip,ic); diffFluxCoeffIp += r*v_diffFluxCoeff(ic); } // assemble to rhs and lhs DoubleType qDiff = 0.0; for ( int ic = 0; ic < AlgTraits::nodesPerElement_; ++ic ) { DoubleType lhsfacDiff = 0.0; for ( int j = 0; j < AlgTraits::nDim_; ++j ) { lhsfacDiff += -diffFluxCoeffIp*v_dndx(ip,ic,j)*v_scs_areav(ip,j); } qDiff += lhsfacDiff*v_scalarQ(ic); // lhs; il then ir lhs(il,ic) += lhsfacDiff; lhs(ir,ic) -= lhsfacDiff; } // rhs; il then ir rhs[il] -= qDiff; rhs[ir] += qDiff; } } INSTANTIATE_KERNEL(ScalarDiffElemKernel); } // nalu } // sierra
6f460caef452868ebeebc6d9f2afaa2093d62ea3
f79dec3c4033ca3cbb55d8a51a748cc7b8b6fbab
/x11/gtksourceview/patches/patch-gtksourceview_gtksourcelanguage.c
296d9d0555fa263daa5924c1870f1497dc0215a9
[]
no_license
jsonn/pkgsrc
fb34c4a6a2d350e8e415f3c4955d4989fcd86881
c1514b5f4a3726d90e30aa16b0c209adbc276d17
refs/heads/trunk
2021-01-24T09:10:01.038867
2017-07-07T15:49:43
2017-07-07T15:49:43
2,095,004
106
47
null
2016-09-19T09:26:01
2011-07-23T23:49:04
Makefile
UTF-8
C
false
false
391
c
patch-gtksourceview_gtksourcelanguage.c
$NetBSD: patch-gtksourceview_gtksourcelanguage.c,v 1.1 2012/05/03 06:06:13 wiz Exp $ Adapt for glib-2.32. --- gtksourceview/gtksourcelanguage.c.orig 2007-01-03 15:40:28.000000000 +0000 +++ gtksourceview/gtksourcelanguage.c @@ -30,8 +30,7 @@ #include <libxml/xmlreader.h> -#include <glib/gstdio.h> -#include <glib/gmappedfile.h> +#include <glib.h> #include "gtksourceview-i18n.h"
3c68b3634a3bf2b34edc1b333f0427d0a253fb2c
39963c49c030b0c30f43f878e9a7e1081ad7783c
/include/visionaray/math/simd/detail/common.h
e2cf6b7033813e419e15bbdf7ad358da878bb7b8
[ "MIT" ]
permissive
szellmann/visionaray
f93e9fb58ad93ed4a601000af2cb60d8757954eb
e2ac5cc7f78642223b0670dce781a4a6125e7071
refs/heads/master
2023-09-06T05:14:27.266396
2023-09-03T01:04:56
2023-09-03T01:04:56
29,935,622
446
42
MIT
2020-10-16T17:28:43
2015-01-27T21:24:30
C++
UTF-8
C
false
false
319
h
common.h
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_SIMD_DETAIL_COMMON_H #define VSNRAY_SIMD_DETAIL_COMMON_H 1 #include "../forward.h" #include "basic_float.inl" #include "basic_int.inl" #include "basic_mask.inl" #endif // VSNRAY_SIMD_DETAIL_COMMON_H
7d0411e5bd564698f13bb94a3351d13a3417acf5
fc89df5d65edcfada41a5bcc3b5c52d7b00d9d13
/components/squeezelite/buffer.c
a2e3674307ff56cf05579cf582e54e211761cedc
[]
no_license
sle118/squeezelite-esp32
b83f580b4de4a517be87ca1db8fead2223694068
149c9d8142d7a3f8679efc73985609eb6dee73a5
refs/heads/master-v4.3
2023-08-23T05:06:18.461579
2023-08-22T23:30:18
2023-08-22T23:30:18
187,874,998
698
84
null
2023-09-09T22:58:50
2019-05-21T16:25:56
C
UTF-8
C
false
false
4,919
c
buffer.c
/* * Squeezelite - lightweight headless squeezebox emulator * * (c) Adrian Smith 2012-2015, triode1@btinternet.com * Ralph Irving 2015-2017, ralph_irving@hotmail.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ // fifo bufffers #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include "squeezelite.h" // _* called with muxtex locked inline unsigned _buf_used(struct buffer *buf) { return buf->writep >= buf->readp ? buf->writep - buf->readp : buf->size - (buf->readp - buf->writep); } unsigned _buf_space(struct buffer *buf) { return buf->size - _buf_used(buf) - 1; // reduce by one as full same as empty otherwise } unsigned _buf_cont_read(struct buffer *buf) { return buf->writep >= buf->readp ? buf->writep - buf->readp : buf->wrap - buf->readp; } unsigned _buf_cont_write(struct buffer *buf) { return buf->writep >= buf->readp ? buf->wrap - buf->writep : buf->readp - buf->writep; } void _buf_inc_readp(struct buffer *buf, unsigned by) { buf->readp += by; if (buf->readp >= buf->wrap) { buf->readp -= buf->size; } } void _buf_inc_writep(struct buffer *buf, unsigned by) { buf->writep += by; if (buf->writep >= buf->wrap) { buf->writep -= buf->size; } } void buf_flush(struct buffer *buf) { mutex_lock(buf->mutex); buf->readp = buf->buf; buf->writep = buf->buf; mutex_unlock(buf->mutex); } void _buf_flush(struct buffer *buf) { buf->readp = buf->buf; buf->writep = buf->buf; } // adjust buffer to multiple of mod bytes so reading in multiple always wraps on frame boundary void buf_adjust(struct buffer *buf, size_t mod) { mutex_lock(buf->mutex); buf->base_size = ((size_t)(buf->size / mod)) * mod; buf->readp = buf->writep = buf->buf; buf->wrap = buf->buf + buf->base_size; buf->size = buf->base_size; mutex_unlock(buf->mutex); } // called with mutex locked to resize, does not retain contents, reverts to original size if fails void _buf_resize(struct buffer *buf, size_t size) { if (size == buf->size) return; free(buf->buf); buf->buf = malloc(size); if (!buf->buf) { size = buf->size; buf->buf = malloc(size); if (!buf->buf) size = 0; } buf->writep = buf->readp = buf->buf; buf->wrap = buf->buf + size; buf->true_size = buf->base_size = buf->size = size; } size_t _buf_limit(struct buffer *buf, size_t limit) { if (limit) { buf->size = limit; buf->readp = buf->writep = buf->buf; } else { buf->size = buf->base_size; } buf->wrap = buf->buf + buf->size; return buf->base_size - buf->size; } void _buf_unwrap(struct buffer *buf, size_t cont) { ssize_t len, by = cont - (buf->wrap - buf->readp); size_t size; u8_t *scratch; // do nothing if we have enough space if (by <= 0 || cont >= buf->size) return; // buffer already unwrapped, just move it up if (buf->writep >= buf->readp) { memmove(buf->readp - by, buf->readp, buf->writep - buf->readp); buf->readp -= by; buf->writep -= by; return; } // how much is overlapping size = by - (buf->readp - buf->writep); len = buf->writep - buf->buf; // buffer is wrapped and enough free space to move data up directly if (size <= 0) { memmove(buf->readp - by, buf->readp, buf->wrap - buf->readp); buf->readp -= by; memcpy(buf->wrap - by, buf->buf, min(len, by)); if (len > by) { memmove(buf->buf, buf->buf + by, len - by); buf->writep -= by; } else { buf->writep += buf->size - by; } return; } scratch = malloc(size); // buffer is wrapped but not enough free room => use scratch zone if (scratch) { memcpy(scratch, buf->writep - size, size); memmove(buf->readp - by, buf->readp, buf->wrap - buf->readp); buf->readp -= by; memcpy(buf->wrap - by, buf->buf, by); memmove(buf->buf, buf->buf + by, len - by - size); buf->writep -= by; memcpy(buf->writep - size, scratch, size); free(scratch); } else { _buf_unwrap(buf, cont / 2); _buf_unwrap(buf, cont - cont / 2); } } void buf_init(struct buffer *buf, size_t size) { buf->buf = malloc(size); buf->readp = buf->buf; buf->writep = buf->buf; buf->wrap = buf->buf + size; buf->true_size = buf->base_size = buf->size = size; mutex_create_p(buf->mutex); } void buf_destroy(struct buffer *buf) { if (buf->buf) { free(buf->buf); buf->buf = NULL; buf->size = buf->base_size = buf->true_size = 0; mutex_destroy(buf->mutex); } }
624b486056f2ed713c45131d7f427280470ac318
642ba1746fed0b722a127b8426eca987df6efc61
/src/mesch/schur.c
84f432334dc9ec4b9c9a2a8c7117d721c7b41f93
[ "BSD-3-Clause" ]
permissive
neuronsimulator/nrn
23781d978fe9253b0e3543f41e27252532b35459
b786c36d715ba0f6da1ba8bdf5d2338c939ecf51
refs/heads/master
2023-08-09T00:13:11.123525
2023-08-04T13:11:02
2023-08-04T13:11:02
71,627,569
313
171
NOASSERTION
2023-09-14T17:48:03
2016-10-22T08:47:37
C++
UTF-8
C
false
false
18,461
c
schur.c
#include <../../nrnconf.h> /************************************************************************** ** ** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved. ** ** Meschach Library ** ** This Meschach Library is provided "as is" without any express ** or implied warranty of any kind with respect to this software. ** In particular the authors shall not be liable for any direct, ** indirect, special, incidental or consequential damages arising ** in any way from use of the software. ** ** Everyone is granted permission to copy, modify and redistribute this ** Meschach Library, provided: ** 1. All copies contain this copyright notice. ** 2. All modified copies shall carry a notice stating who ** made the last modification and the date of such modification. ** 3. No charge is made for this software or works derived from it. ** This clause shall not be construed as constraining other software ** distributed on the same medium as this software, nor is a ** distribution fee considered a charge. ** ***************************************************************************/ /* File containing routines for computing the Schur decomposition of a real non-symmetric matrix See also: hessen.c */ #include <stdio.h> #include "matrix.h" #include "matrix2.h" #include <math.h> static char rcsid[] = "schur.c,v 1.1 1997/12/04 17:55:46 hines Exp"; #ifndef ANSI_C static void hhldr3(x,y,z,nu1,beta,newval) double x, y, z; Real *nu1, *beta, *newval; #else static void hhldr3(double x, double y, double z, Real *nu1, Real *beta, Real *newval) #endif { Real alpha; if ( x >= 0.0 ) alpha = sqrt(x*x+y*y+z*z); else alpha = -sqrt(x*x+y*y+z*z); *nu1 = x + alpha; *beta = 1.0/(alpha*(*nu1)); *newval = alpha; } #ifndef ANSI_C static void hhldr3cols(A,k,j0,beta,nu1,nu2,nu3) MAT *A; int k, j0; double beta, nu1, nu2, nu3; #else static void hhldr3cols(MAT *A, int k, int j0, double beta, double nu1, double nu2, double nu3) #endif { Real **A_me, ip, prod; int j, n; if ( k < 0 || k+3 > A->m || j0 < 0 ) error(E_BOUNDS,"hhldr3cols"); A_me = A->me; n = A->n; /* printf("hhldr3cols:(l.%d) j0 = %d, k = %d, A at 0x%lx, m = %d, n = %d\n", __LINE__, j0, k, (long)A, A->m, A->n); */ /* printf("hhldr3cols: A (dumped) =\n"); m_dump(stdout,A); */ for ( j = j0; j < n; j++ ) { /***** ip = nu1*A_me[k][j] + nu2*A_me[k+1][j] + nu3*A_me[k+2][j]; prod = ip*beta; A_me[k][j] -= prod*nu1; A_me[k+1][j] -= prod*nu2; A_me[k+2][j] -= prod*nu3; *****/ /* printf("hhldr3cols: j = %d\n", j); */ ip = nu1*m_entry(A,k,j)+nu2*m_entry(A,k+1,j)+nu3*m_entry(A,k+2,j); prod = ip*beta; /***** m_set_val(A,k ,j,m_entry(A,k ,j) - prod*nu1); m_set_val(A,k+1,j,m_entry(A,k+1,j) - prod*nu2); m_set_val(A,k+2,j,m_entry(A,k+2,j) - prod*nu3); *****/ m_add_val(A,k ,j,-prod*nu1); m_add_val(A,k+1,j,-prod*nu2); m_add_val(A,k+2,j,-prod*nu3); } /* printf("hhldr3cols:(l.%d) j0 = %d, k = %d, m = %d, n = %d\n", __LINE__, j0, k, A->m, A->n); */ /* putc('\n',stdout); */ } #ifndef ANSI_C static void hhldr3rows(A,k,i0,beta,nu1,nu2,nu3) MAT *A; int k, i0; double beta, nu1, nu2, nu3; #else static void hhldr3rows(MAT *A, int k, int i0, double beta, double nu1, double nu2, double nu3) #endif { Real **A_me, ip, prod; int i, m; /* printf("hhldr3rows:(l.%d) A at 0x%lx\n", __LINE__, (long)A); */ /* printf("hhldr3rows: k = %d\n", k); */ if ( k < 0 || k+3 > A->n ) error(E_BOUNDS,"hhldr3rows"); A_me = A->me; m = A->m; i0 = min(i0,m-1); for ( i = 0; i <= i0; i++ ) { /**** ip = nu1*A_me[i][k] + nu2*A_me[i][k+1] + nu3*A_me[i][k+2]; prod = ip*beta; A_me[i][k] -= prod*nu1; A_me[i][k+1] -= prod*nu2; A_me[i][k+2] -= prod*nu3; ****/ ip = nu1*m_entry(A,i,k)+nu2*m_entry(A,i,k+1)+nu3*m_entry(A,i,k+2); prod = ip*beta; m_add_val(A,i,k , - prod*nu1); m_add_val(A,i,k+1, - prod*nu2); m_add_val(A,i,k+2, - prod*nu3); } } /* schur -- computes the Schur decomposition of the matrix A in situ -- optionally, gives Q matrix such that Q^T.A.Q is upper triangular -- returns upper triangular Schur matrix */ MAT *schur(A,Q) MAT *A, *Q; { int i, j, iter, k, k_min, k_max, k_tmp, n, split; Real beta2, c, discrim, dummy, nu1, s, t, tmp, x, y, z; Real **A_me; Real sqrt_macheps; static VEC *diag=VNULL, *beta=VNULL; if ( ! A ) error(E_NULL,"schur"); if ( A->m != A->n || ( Q && Q->m != Q->n ) ) error(E_SQUARE,"schur"); if ( Q != MNULL && Q->m != A->m ) error(E_SIZES,"schur"); n = A->n; diag = v_resize(diag,A->n); beta = v_resize(beta,A->n); MEM_STAT_REG(diag,TYPE_VEC); MEM_STAT_REG(beta,TYPE_VEC); /* compute Hessenberg form */ Hfactor(A,diag,beta); /* save Q if necessary */ if ( Q ) Q = makeHQ(A,diag,beta,Q); makeH(A,A); sqrt_macheps = sqrt(MACHEPS); k_min = 0; A_me = A->me; while ( k_min < n ) { Real a00, a01, a10, a11; double scale, t, numer, denom; /* find k_max to suit: submatrix k_min..k_max should be irreducible */ k_max = n-1; for ( k = k_min; k < k_max; k++ ) /* if ( A_me[k+1][k] == 0.0 ) */ if ( m_entry(A,k+1,k) == 0.0 ) { k_max = k; break; } if ( k_max <= k_min ) { k_min = k_max + 1; continue; /* outer loop */ } /* check to see if we have a 2 x 2 block with complex eigenvalues */ if ( k_max == k_min + 1 ) { /* tmp = A_me[k_min][k_min] - A_me[k_max][k_max]; */ a00 = m_entry(A,k_min,k_min); a01 = m_entry(A,k_min,k_max); a10 = m_entry(A,k_max,k_min); a11 = m_entry(A,k_max,k_max); tmp = a00 - a11; /* discrim = tmp*tmp + 4*A_me[k_min][k_max]*A_me[k_max][k_min]; */ discrim = tmp*tmp + 4*a01*a10; if ( discrim < 0.0 ) { /* yes -- e-vals are complex -- put 2 x 2 block in form [a b; c a]; then eigenvalues have real part a & imag part sqrt(|bc|) */ numer = - tmp; denom = ( a01+a10 >= 0.0 ) ? (a01+a10) + sqrt((a01+a10)*(a01+a10)+tmp*tmp) : (a01+a10) - sqrt((a01+a10)*(a01+a10)+tmp*tmp); if ( denom != 0.0 ) { /* t = s/c = numer/denom */ t = numer/denom; scale = c = 1.0/sqrt(1+t*t); s = c*t; } else { c = 1.0; s = 0.0; } rot_cols(A,k_min,k_max,c,s,A); rot_rows(A,k_min,k_max,c,s,A); if ( Q != MNULL ) rot_cols(Q,k_min,k_max,c,s,Q); k_min = k_max + 1; continue; } else /* discrim >= 0; i.e. block has two real eigenvalues */ { /* no -- e-vals are not complex; split 2 x 2 block and continue */ /* s/c = numer/denom */ numer = ( tmp >= 0.0 ) ? - tmp - sqrt(discrim) : - tmp + sqrt(discrim); denom = 2*a01; if ( fabs(numer) < fabs(denom) ) { /* t = s/c = numer/denom */ t = numer/denom; scale = c = 1.0/sqrt(1+t*t); s = c*t; } else if ( numer != 0.0 ) { /* t = c/s = denom/numer */ t = denom/numer; scale = 1.0/sqrt(1+t*t); c = fabs(t)*scale; s = ( t >= 0.0 ) ? scale : -scale; } else /* numer == denom == 0 */ { c = 0.0; s = 1.0; } rot_cols(A,k_min,k_max,c,s,A); rot_rows(A,k_min,k_max,c,s,A); /* A->me[k_max][k_min] = 0.0; */ if ( Q != MNULL ) rot_cols(Q,k_min,k_max,c,s,Q); k_min = k_max + 1; /* go to next block */ continue; } } /* now have r x r block with r >= 2: apply Francis QR step until block splits */ split = FALSE; iter = 0; while ( ! split ) { iter++; /* set up Wilkinson/Francis complex shift */ k_tmp = k_max - 1; a00 = m_entry(A,k_tmp,k_tmp); a01 = m_entry(A,k_tmp,k_max); a10 = m_entry(A,k_max,k_tmp); a11 = m_entry(A,k_max,k_max); /* treat degenerate cases differently -- if there are still no splits after five iterations and the bottom 2 x 2 looks degenerate, force it to split */ if ( iter >= 5 && fabs(a00-a11) < sqrt_macheps*(fabs(a00)+fabs(a11)) && (fabs(a01) < sqrt_macheps*(fabs(a00)+fabs(a11)) || fabs(a10) < sqrt_macheps*(fabs(a00)+fabs(a11))) ) { if ( fabs(a01) < sqrt_macheps*(fabs(a00)+fabs(a11)) ) m_set_val(A,k_tmp,k_max,0.0); if ( fabs(a10) < sqrt_macheps*(fabs(a00)+fabs(a11)) ) { m_set_val(A,k_max,k_tmp,0.0); split = TRUE; continue; } } s = a00 + a11; t = a00*a11 - a01*a10; /* break loop if a 2 x 2 complex block */ if ( k_max == k_min + 1 && s*s < 4.0*t ) { split = TRUE; continue; } /* perturb shift if convergence is slow */ if ( (iter % 10) == 0 ) { s += iter*0.02; t += iter*0.02; } /* set up Householder transformations */ k_tmp = k_min + 1; /******************** x = A_me[k_min][k_min]*A_me[k_min][k_min] + A_me[k_min][k_tmp]*A_me[k_tmp][k_min] - s*A_me[k_min][k_min] + t; y = A_me[k_tmp][k_min]* (A_me[k_min][k_min]+A_me[k_tmp][k_tmp]-s); if ( k_min + 2 <= k_max ) z = A_me[k_tmp][k_min]*A_me[k_min+2][k_tmp]; else z = 0.0; ********************/ a00 = m_entry(A,k_min,k_min); a01 = m_entry(A,k_min,k_tmp); a10 = m_entry(A,k_tmp,k_min); a11 = m_entry(A,k_tmp,k_tmp); /******************** a00 = A->me[k_min][k_min]; a01 = A->me[k_min][k_tmp]; a10 = A->me[k_tmp][k_min]; a11 = A->me[k_tmp][k_tmp]; ********************/ x = a00*a00 + a01*a10 - s*a00 + t; y = a10*(a00+a11-s); if ( k_min + 2 <= k_max ) z = a10* /* m_entry(A,k_min+2,k_tmp) */ A->me[k_min+2][k_tmp]; else z = 0.0; for ( k = k_min; k <= k_max-1; k++ ) { if ( k < k_max - 1 ) { hhldr3(x,y,z,&nu1,&beta2,&dummy); tracecatch(hhldr3cols(A,k,max(k-1,0), beta2,nu1,y,z),"schur"); tracecatch(hhldr3rows(A,k,min(n-1,k+3),beta2,nu1,y,z),"schur"); if ( Q != MNULL ) hhldr3rows(Q,k,n-1,beta2,nu1,y,z); } else { givens(x,y,&c,&s); rot_cols(A,k,k+1,c,s,A); rot_rows(A,k,k+1,c,s,A); if ( Q ) rot_cols(Q,k,k+1,c,s,Q); } /* if ( k >= 2 ) m_set_val(A,k,k-2,0.0); */ /* x = A_me[k+1][k]; */ x = m_entry(A,k+1,k); if ( k <= k_max - 2 ) /* y = A_me[k+2][k];*/ y = m_entry(A,k+2,k); else y = 0.0; if ( k <= k_max - 3 ) /* z = A_me[k+3][k]; */ z = m_entry(A,k+3,k); else z = 0.0; } /* if ( k_min > 0 ) m_set_val(A,k_min,k_min-1,0.0); if ( k_max < n - 1 ) m_set_val(A,k_max+1,k_max,0.0); */ for ( k = k_min; k <= k_max-2; k++ ) { /* zero appropriate sub-diagonals */ m_set_val(A,k+2,k,0.0); if ( k < k_max-2 ) m_set_val(A,k+3,k,0.0); } /* test to see if matrix should split */ for ( k = k_min; k < k_max; k++ ) if ( fabs(A_me[k+1][k]) < MACHEPS* (fabs(A_me[k][k])+fabs(A_me[k+1][k+1])) ) { A_me[k+1][k] = 0.0; split = TRUE; } } } /* polish up A by zeroing strictly lower triangular elements and small sub-diagonal elements */ for ( i = 0; i < A->m; i++ ) for ( j = 0; j < i-1; j++ ) A_me[i][j] = 0.0; for ( i = 0; i < A->m - 1; i++ ) if ( fabs(A_me[i+1][i]) < MACHEPS* (fabs(A_me[i][i])+fabs(A_me[i+1][i+1])) ) A_me[i+1][i] = 0.0; return A; } /* schur_vals -- compute real & imaginary parts of eigenvalues -- assumes T contains a block upper triangular matrix as produced by schur() -- real parts stored in real_pt, imaginary parts in imag_pt */ void schur_evals(T,real_pt,imag_pt) MAT *T; VEC *real_pt, *imag_pt; { int i, n; Real discrim, **T_me; Real diff, sum, tmp; if ( ! T || ! real_pt || ! imag_pt ) error(E_NULL,"schur_evals"); if ( T->m != T->n ) error(E_SQUARE,"schur_evals"); n = T->n; T_me = T->me; real_pt = v_resize(real_pt,(u_int)n); imag_pt = v_resize(imag_pt,(u_int)n); i = 0; while ( i < n ) { if ( i < n-1 && T_me[i+1][i] != 0.0 ) { /* should be a complex eigenvalue */ sum = 0.5*(T_me[i][i]+T_me[i+1][i+1]); diff = 0.5*(T_me[i][i]-T_me[i+1][i+1]); discrim = diff*diff + T_me[i][i+1]*T_me[i+1][i]; if ( discrim < 0.0 ) { /* yes -- complex e-vals */ real_pt->ve[i] = real_pt->ve[i+1] = sum; imag_pt->ve[i] = sqrt(-discrim); imag_pt->ve[i+1] = - imag_pt->ve[i]; } else { /* no -- actually both real */ tmp = sqrt(discrim); real_pt->ve[i] = sum + tmp; real_pt->ve[i+1] = sum - tmp; imag_pt->ve[i] = imag_pt->ve[i+1] = 0.0; } i += 2; } else { /* real eigenvalue */ real_pt->ve[i] = T_me[i][i]; imag_pt->ve[i] = 0.0; i++; } } } /* schur_vecs -- returns eigenvectors computed from the real Schur decomposition of a matrix -- T is the block upper triangular Schur matrix -- Q is the orthognal matrix where A = Q.T.Q^T -- if Q is null, the eigenvectors of T are returned -- X_re is the real part of the matrix of eigenvectors, and X_im is the imaginary part of the matrix. -- X_re is returned */ MAT *schur_vecs(T,Q,X_re,X_im) MAT *T, *Q, *X_re, *X_im; { int i, j, limit; Real t11_re, t11_im, t12, t21, t22_re, t22_im; Real l_re, l_im, det_re, det_im, invdet_re, invdet_im, val1_re, val1_im, val2_re, val2_im, tmp_val1_re, tmp_val1_im, tmp_val2_re, tmp_val2_im, **T_me; Real sum, diff, discrim, magdet, norm, scale; static VEC *tmp1_re=VNULL, *tmp1_im=VNULL, *tmp2_re=VNULL, *tmp2_im=VNULL; if ( ! T || ! X_re ) error(E_NULL,"schur_vecs"); if ( T->m != T->n || X_re->m != X_re->n || ( Q != MNULL && Q->m != Q->n ) || ( X_im != MNULL && X_im->m != X_im->n ) ) error(E_SQUARE,"schur_vecs"); if ( T->m != X_re->m || ( Q != MNULL && T->m != Q->m ) || ( X_im != MNULL && T->m != X_im->m ) ) error(E_SIZES,"schur_vecs"); tmp1_re = v_resize(tmp1_re,T->m); tmp1_im = v_resize(tmp1_im,T->m); tmp2_re = v_resize(tmp2_re,T->m); tmp2_im = v_resize(tmp2_im,T->m); MEM_STAT_REG(tmp1_re,TYPE_VEC); MEM_STAT_REG(tmp1_im,TYPE_VEC); MEM_STAT_REG(tmp2_re,TYPE_VEC); MEM_STAT_REG(tmp2_im,TYPE_VEC); T_me = T->me; i = 0; while ( i < T->m ) { if ( i+1 < T->m && T->me[i+1][i] != 0.0 ) { /* complex eigenvalue */ sum = 0.5*(T_me[i][i]+T_me[i+1][i+1]); diff = 0.5*(T_me[i][i]-T_me[i+1][i+1]); discrim = diff*diff + T_me[i][i+1]*T_me[i+1][i]; l_re = l_im = 0.0; if ( discrim < 0.0 ) { /* yes -- complex e-vals */ l_re = sum; l_im = sqrt(-discrim); } else /* not correct Real Schur form */ error(E_RANGE,"schur_vecs"); } else { l_re = T_me[i][i]; l_im = 0.0; } v_zero(tmp1_im); v_rand(tmp1_re); sv_mlt(MACHEPS,tmp1_re,tmp1_re); /* solve (T-l.I)x = tmp1 */ limit = ( l_im != 0.0 ) ? i+1 : i; /* printf("limit = %d\n",limit); */ for ( j = limit+1; j < T->m; j++ ) tmp1_re->ve[j] = 0.0; j = limit; while ( j >= 0 ) { if ( j > 0 && T->me[j][j-1] != 0.0 ) { /* 2 x 2 diagonal block */ /* printf("checkpoint A\n"); */ val1_re = tmp1_re->ve[j-1] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j-1][j+1]),limit-j); /* printf("checkpoint B\n"); */ val1_im = tmp1_im->ve[j-1] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j-1][j+1]),limit-j); /* printf("checkpoint C\n"); */ val2_re = tmp1_re->ve[j] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint D\n"); */ val2_im = tmp1_im->ve[j] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint E\n"); */ t11_re = T_me[j-1][j-1] - l_re; t11_im = - l_im; t22_re = T_me[j][j] - l_re; t22_im = - l_im; t12 = T_me[j-1][j]; t21 = T_me[j][j-1]; scale = fabs(T_me[j-1][j-1]) + fabs(T_me[j][j]) + fabs(t12) + fabs(t21) + fabs(l_re) + fabs(l_im); det_re = t11_re*t22_re - t11_im*t22_im - t12*t21; det_im = t11_re*t22_im + t11_im*t22_re; magdet = det_re*det_re+det_im*det_im; if ( sqrt(magdet) < MACHEPS*scale ) { det_re = MACHEPS*scale; magdet = det_re*det_re+det_im*det_im; } invdet_re = det_re/magdet; invdet_im = - det_im/magdet; tmp_val1_re = t22_re*val1_re-t22_im*val1_im-t12*val2_re; tmp_val1_im = t22_im*val1_re+t22_re*val1_im-t12*val2_im; tmp_val2_re = t11_re*val2_re-t11_im*val2_im-t21*val1_re; tmp_val2_im = t11_im*val2_re+t11_re*val2_im-t21*val1_im; tmp1_re->ve[j-1] = invdet_re*tmp_val1_re - invdet_im*tmp_val1_im; tmp1_im->ve[j-1] = invdet_im*tmp_val1_re + invdet_re*tmp_val1_im; tmp1_re->ve[j] = invdet_re*tmp_val2_re - invdet_im*tmp_val2_im; tmp1_im->ve[j] = invdet_im*tmp_val2_re + invdet_re*tmp_val2_im; j -= 2; } else { t11_re = T_me[j][j] - l_re; t11_im = - l_im; magdet = t11_re*t11_re + t11_im*t11_im; scale = fabs(T_me[j][j]) + fabs(l_re); if ( sqrt(magdet) < MACHEPS*scale ) { t11_re = MACHEPS*scale; magdet = t11_re*t11_re + t11_im*t11_im; } invdet_re = t11_re/magdet; invdet_im = - t11_im/magdet; /* printf("checkpoint F\n"); */ val1_re = tmp1_re->ve[j] - __ip__(&(tmp1_re->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint G\n"); */ val1_im = tmp1_im->ve[j] - __ip__(&(tmp1_im->ve[j+1]),&(T->me[j][j+1]),limit-j); /* printf("checkpoint H\n"); */ tmp1_re->ve[j] = invdet_re*val1_re - invdet_im*val1_im; tmp1_im->ve[j] = invdet_im*val1_re + invdet_re*val1_im; j -= 1; } } norm = v_norm_inf(tmp1_re) + v_norm_inf(tmp1_im); sv_mlt(1/norm,tmp1_re,tmp1_re); if ( l_im != 0.0 ) sv_mlt(1/norm,tmp1_im,tmp1_im); mv_mlt(Q,tmp1_re,tmp2_re); if ( l_im != 0.0 ) mv_mlt(Q,tmp1_im,tmp2_im); if ( l_im != 0.0 ) norm = sqrt(in_prod(tmp2_re,tmp2_re)+in_prod(tmp2_im,tmp2_im)); else norm = v_norm2(tmp2_re); sv_mlt(1/norm,tmp2_re,tmp2_re); if ( l_im != 0.0 ) sv_mlt(1/norm,tmp2_im,tmp2_im); if ( l_im != 0.0 ) { if ( ! X_im ) error(E_NULL,"schur_vecs"); set_col(X_re,i,tmp2_re); set_col(X_im,i,tmp2_im); sv_mlt(-1.0,tmp2_im,tmp2_im); set_col(X_re,i+1,tmp2_re); set_col(X_im,i+1,tmp2_im); i += 2; } else { set_col(X_re,i,tmp2_re); if ( X_im != MNULL ) set_col(X_im,i,tmp1_im); /* zero vector */ i += 1; } } return X_re; }
87a69dc81c1b4dc4dd9a6c78fa5e4cb6ae8639b4
931f2ab61f1b2d60fe568e569d1a0f4fa4cec3f8
/src/libc/include/assert.h
f72e7435ed4ef47f094d0578f66cc5abe7951ead
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Simple-XX/SimpleKernel
ef1e484c689a76fc23a45f375debb6afa4867b56
0463c81d929e1d5727a2e3ac810ffd1318cad0eb
refs/heads/master
2023-08-25T15:27:04.938929
2023-05-13T02:48:34
2023-05-13T02:48:34
124,174,311
2,096
318
NOASSERTION
2023-09-12T12:31:35
2018-03-07T03:36:04
C
UTF-8
C
false
false
777
h
assert.h
/** * @file assert.h * @brief assert 实现 * @author Zone.N (Zone.Niuzh@hotmail.com) * @version 1.0 * @date 2023-03-31 * @copyright MIT LICENSE * https://github.com/Simple-XX/SimpleKernel * Based on https://wiki.osdev.org/Raspberry_Pi_Bare_Bones * @par change log: * <table> * <tr><th>Date<th>Author<th>Description * <tr><td>2023-03-31<td>Zone.N<td>迁移到 doxygen * </table> */ #ifndef SIMPLEKERNEL_ASSERT_H #define SIMPLEKERNEL_ASSERT_H #ifdef __cplusplus extern "C" { #endif #include "stdio.h" #define assert(_e) \ ((void)((_e) ? ((void)0) : __assert(#_e, __FILE__, __LINE__))) #define __assert(_e, _file, _line) \ ((void)err("%s:%d: failed assertion `%s'\n", _file, _line, _e)) #ifdef __cplusplus } #endif #endif /* SIMPLEKERNEL_ASSERT_H */
e6d233199e028e7cf5b6c1d2f48ffdb1c5868b51
011e552512f45ca313615e428924d001a427e8e6
/lib/bsearch.h
4e2b27ac0347cf71b74aed058aef2c5378b443cf
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
phoenix-rtos/phoenix-rtos-kernel
3d4c1d0e7703ea5ce50c2642d35fbb79c1f2afd6
e15898bac82e168f7e6aaea60d413790a282f389
refs/heads/master
2023-09-01T15:04:26.226958
2023-09-01T09:21:17
2023-09-01T09:45:00
125,823,596
115
39
BSD-3-Clause
2023-09-14T13:34:22
2018-03-19T08:14:43
C
UTF-8
C
false
false
364
h
bsearch.h
/* * Phoenix-RTOS * * Operating system kernel * * Binary search * * Copyright 2012 Phoenix Systems * Author: Paweł Kołodziej * * This file is part of Phoenix-RTOS. * * %LICENSE% * */ #ifndef LIB_BSEARCH_H_ #define LIB_BSEARCH_H_ extern void *lib_bsearch(void *key, void *base, size_t nmemb, size_t size, int (*compar)(void *, void *)); #endif
9853675fc8187917fac78186ff833d75a0b77bc6
a65e2aac013b48ddfe5d6a7d108c2b84855d1148
/boot/bootutil/include/bootutil/boot_status.h
27a41fd376fba66f26509b035c22d3b9a5940d39
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
mcu-tools/mcuboot
25ccdee3b1d319e09c9381cd00bc854efdc0142b
e188dbb0e1c1e2e2cecd627fbf2e13042222b1da
refs/heads/main
2023-08-30T09:17:10.520597
2023-08-29T06:43:16
2023-08-29T14:01:02
76,305,806
623
320
Apache-2.0
2023-09-13T11:46:03
2016-12-12T23:53:39
C
UTF-8
C
false
false
6,156
h
boot_status.h
/* * Copyright (c) 2018-2020 Arm Limited * Copyright (c) 2020 Linaro Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __BOOT_STATUS_H__ #define __BOOT_STATUS_H__ #include <stdint.h> #include <stddef.h> #ifdef __cplusplus extern "C" { #endif /** * The shared data between boot loader and runtime SW is TLV encoded. The * shared data is stored in a well known location in memory and this is a * contract between boot loader and runtime SW. * * The structure of shared data must be the following: * - At the beginning there must be a header: struct shared_data_tlv_header * This contains a magic number and a size field which covers the entire * size of the shared data area including this header. * - After the header there come the entries which are composed from an entry * header structure: struct shared_data_tlv_entry and the data. In the entry * header is a type field (tly_type) which identify the consumer of the * entry in the runtime SW and specify the subtype of that data item. There * is a size field (tlv_len) which covers the size of the the data. After * this structure comes the actual data. * * - Arbitrary number and size of data entry can be in the shared memory area. * * This table gives of overview about the tlv_type field in the entry header. * The tlv_type always composed from a major and minor number. Major number * identifies the addressee in runtime SW, who should process the data entry. * Minor number used to encode more info about the data entry. The actual * definition of minor number could change per major number. * * In case of boot status data, which can be processed by an attestation * service the minor number is split further to two part: sw_module and claim. * The sw_module identifies the SW component in the system which the data item * belongs to and the claim part identifies the exact type of the data. * * |---------------------------------------| * | tlv_type (16) | * |---------------------------------------| * | tlv_major(4)| tlv_minor(12) | * |---------------------------------------| * | MAJOR_IAS | sw_module(6) | claim(6) | * |---------------------------------------| */ /* General macros to handle TLV type */ #define MAJOR_MASK 0xF /* 4 bit */ #define MAJOR_POS 12 /* 12 bit */ #define MINOR_MASK 0xFFF /* 12 bit */ #define SET_TLV_TYPE(major, minor) \ (((uint16_t)((major) & MAJOR_MASK) << MAJOR_POS) \ | ((minor) & MINOR_MASK)) #define GET_MAJOR(tlv_type) ((uint16_t)(tlv_type) >> MAJOR_POS) #define GET_MINOR(tlv_type) ((tlv_type) & MINOR_MASK) /* Magic value which marks the beginning of shared data area in memory */ #define SHARED_DATA_TLV_INFO_MAGIC 0x2016 /* Initial attestation specific macros */ /** * Major numbers (4 bit) to identify the * consumer of shared data in runtime SW. */ #define TLV_MAJOR_IAS 0x1 #define TLV_MAJOR_BLINFO 0x2 /* Initial attestation: Claim per SW components / SW modules */ /* Bits: 0-2 */ #define SW_VERSION 0x00 #define SW_SIGNER_ID 0x01 /* Reserved 0x02 */ #define SW_TYPE 0x03 /* Bits: 3-5 */ #define SW_MEASURE_VALUE 0x08 #define SW_MEASURE_TYPE 0x09 #define SW_BOOT_RECORD 0x3F #define MODULE_POS 6 /* 6 bit */ #define CLAIM_MASK 0x3F /* 6 bit */ #define MEASUREMENT_CLAIM_POS 3 /* 3 bit */ #define GET_IAS_MODULE(tlv_type) ((uint16_t)GET_MINOR(tlv_type) >> MODULE_POS) #define GET_IAS_CLAIM(tlv_type) (GET_MINOR(tlv_type) & CLAIM_MASK) #define SET_IAS_MINOR(sw_module, claim) \ (((uint16_t)(sw_module) << MODULE_POS) | (claim)) /* Bootloader information */ #define BLINFO_MODE 0x00 #define BLINFO_SIGNATURE_TYPE 0x01 #define BLINFO_RECOVERY 0x02 #define BLINFO_RUNNING_SLOT 0x03 #define BLINFO_BOOTLOADER_VERSION 0x04 #define BLINFO_MAX_APPLICATION_SIZE 0x05 enum mcuboot_mode { MCUBOOT_MODE_SINGLE_SLOT, MCUBOOT_MODE_SWAP_USING_SCRATCH, MCUBOOT_MODE_UPGRADE_ONLY, MCUBOOT_MODE_SWAP_USING_MOVE, MCUBOOT_MODE_DIRECT_XIP, MCUBOOT_MODE_RAM_LOAD }; enum mcuboot_signature_type { MCUBOOT_SIGNATURE_TYPE_NONE, MCUBOOT_SIGNATURE_TYPE_RSA, MCUBOOT_SIGNATURE_TYPE_ECDSA_P256, MCUBOOT_SIGNATURE_TYPE_ED25519 }; enum mcuboot_recovery_mode { MCUBOOT_RECOVERY_MODE_NONE, MCUBOOT_RECOVERY_MODE_SERIAL_RECOVERY, MCUBOOT_RECOVERY_MODE_DFU, }; /** * Shared data TLV header. All fields in little endian. * * ----------------------------------- * | tlv_magic(16) | tlv_tot_len(16) | * ----------------------------------- */ struct shared_data_tlv_header { uint16_t tlv_magic; uint16_t tlv_tot_len; /* size of whole TLV area (including this header) */ }; #define SHARED_DATA_HEADER_SIZE sizeof(struct shared_data_tlv_header) /** * Shared data TLV entry header format. All fields in little endian. * * ------------------------------- * | tlv_type(16) | tlv_len(16) | * ------------------------------- * | Raw data | * ------------------------------- */ struct shared_data_tlv_entry { uint16_t tlv_type; uint16_t tlv_len; /* TLV data length (not including this header). */ }; #define SHARED_DATA_ENTRY_HEADER_SIZE sizeof(struct shared_data_tlv_entry) #define SHARED_DATA_ENTRY_SIZE(size) (size + SHARED_DATA_ENTRY_HEADER_SIZE) /* Structure to store the boot data for the runtime SW. */ struct shared_boot_data { struct shared_data_tlv_header header; uint8_t data[]; }; #ifdef __cplusplus } #endif #endif /* __BOOT_STATUS_H__ */
3b920b8ddacca8af5a7378e8211c9b8ed0cb6976
8bfb66845fd848a9f37e3b958e3e1ee72bbf69df
/Chapter 15/upperghidra.c
8cddb852b549f4b08944e3462a366281fa45b4ec
[ "MIT" ]
permissive
below/HelloSilicon
14841a4a14afeed1fa74009388a7dde75f0962e6
9fc970ddfdd8d43ee8ae6e162faa28ee64304cb7
refs/heads/main
2023-09-05T06:09:06.853638
2022-12-26T19:53:55
2022-12-26T19:53:55
276,852,180
2,877
208
MIT
2023-07-13T15:20:49
2020-07-03T08:46:11
Assembly
UTF-8
C
false
false
671
c
upperghidra.c
#include <stdio.h> #define BUFFERSIZE 250 char *tstStr = "This is a test!"; char outStr[BUFFERSIZE]; typedef unsigned char byte; #define true 1 int main(void) { char cVar1; char *pcVar2; char *pcVar3; char *pcVar4; char *pcVar5; pcVar2 = tstStr; pcVar3 = outStr; pcVar5 = tstStr; do { cVar1 = *pcVar5; pcVar4 = pcVar3; while( true ) { pcVar3 = pcVar4 + 1; pcVar5 = pcVar5 + 1; if (0x19 < (byte)(cVar1 + 0x9fU)) break; *pcVar4 = cVar1 + -0x20; cVar1 = *pcVar5; pcVar4 = pcVar3; } *pcVar4 = cVar1; } while (cVar1 != '\0'); printf("Input: %s\nOutput: %s\n",pcVar2,outStr); return 0; }
8ae46d676859833981ce60eb8ceec72b7d6fd251
3d144a23e67c839a4df1c073c6a2c842508f16b2
/test/ModuleInterface/Inputs/exported-module-name-before/ExportAsCoreKit.h
f078795a60fed7c2d0bfb14d30a92b6c8d132d09
[ "Apache-2.0", "Swift-exception" ]
permissive
apple/swift
c2724e388959f6623cf6e4ad6dc1cdd875fd0592
98ada1b200a43d090311b72eb45fe8ecebc97f81
refs/heads/main
2023-08-16T10:48:25.985330
2023-08-16T09:00:42
2023-08-16T09:00:42
44,838,949
78,897
15,074
Apache-2.0
2023-09-14T21:19:23
2015-10-23T21:15:07
C++
UTF-8
C
false
false
34
h
ExportAsCoreKit.h
struct CKThing { long value; };
1c9e40ff282cc1f8802a4894b87971f40915271b
6bac07ceda232029b6a9ea0144ad261311348699
/plugin_sa/game_sa/eEventType.h
32d40d1e6c4833ea147756c8fa1c8e5e3b1c670d
[ "Zlib" ]
permissive
DK22Pac/plugin-sdk
ced6dc734846f33113e3596045b58febb7eb083c
b0ebc6e4f44c2d5f768b36c6a7a2a688e7e2b9d3
refs/heads/master
2023-08-17T06:36:25.363361
2023-08-10T05:19:16
2023-08-10T05:19:20
17,803,683
445
221
Zlib
2023-08-13T04:34:28
2014-03-16T16:40:08
C++
UTF-8
C
false
false
2,885
h
eEventType.h
/* Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once enum eEventType { EVENT_VEHICLE_COLLISION = 1, EVENT_PED_COLLISION_WITH_PED = 2, EVENT_PED_COLLISION_WITH_PLAYER = 3, EVENT_PLAYER_COLLISION_WITH_PED = 4, EVENT_OBJECT_COLLISION = 5, EVENT_BUILDING_COLLISION = 6, EVENT_DRAGGED_OUT_CAR = 7, EVENT_KNOCK_OFF_BIKE = 8, EVENT_DAMAGE = 9, EVENT_DEATH = 10, EVENT_DEAD_PED = 11, EVENT_POTENTIAL_GET_RUN_OVER = 12, EVENT_POTENTIAL_WALK_INTO_PED = 13, EVENT_VEHICLE_HIT_AND_RUN = 14, EVENT_SHOT_FIRED = 15, EVENT_COP_CAR_BEING_STOLEN = 16, EVENT_PED_ENTERED_MY_VEHICLE = 17, EVENT_REVIVE = 18, EVENT_CHAT_PARTNER = 19, EVENT_SEXY_PED = 20, EVENT_SEXY_VEHICLE = 21, EVENT_PED_TO_CHASE = 25, EVENT_PED_TO_FLEE = 26, EVENT_ATTRACTOR = 27, EVENT_VEHICLE_TO_STEAL = 28, EVENT_VEHICLE_THREAT = 30, EVENT_GUN_AIMED_AT = 31, EVENT_SCRIPT_COMMAND = 32, EVENT_IN_AIR = 33, EVENT_VEHICLE_DIED = 35, EVENT_ACQUAINTANCE_PED_HATE = 36, EVENT_ACQUAINTANCE_PED_DISLIKE = 37, EVENT_ACQUAINTANCE_PED_LIKE = 38, EVENT_ACQUAINTANCE_PED_RESPECT = 39, EVENT_VEHICLE_DAMAGE_WEAPON = 41, EVENT_SPECIAL = 42, EVENT_GOT_KNOCKED_OVER_BY_CAR = 43, EVENT_POTENTIAL_WALK_INTO_OBJECT = 44, EVENT_CAR_UPSIDE_DOWN = 45, EVENT_POTENTIAL_WALK_INTO_FIRE = 46, EVENT_GROUP_EVENT = 47, EVENT_SCRIPTED_ATTRACTOR = 48, EVENT_SHOT_FIRED_WHIZZED_BY = 49, EVENT_LOW_ANGER_AT_PLAYER = 50, EVENT_HIGH_ANGER_AT_PLAYER = 51, EVENT_HEALTH_REALLY_LOW = 52, EVENT_HEALTH_LOW = 53, EVENT_LEADER_ENTERED_CAR_AS_DRIVER = 54, EVENT_LEADER_EXITED_CAR_AS_DRIVER = 55, EVENT_POTENTIAL_WALK_INTO_VEHICLE = 56, EVENT_LEADER_QUIT_ENTERING_CAR_AS_DRIVER = 57, EVENT_ON_FIRE = 58, EVENT_FIRE_NEARBY = 59, EVENT_POTENTIAL_WALK_INTO_BUILDING = 60, EVENT_SOUND_LOUD = 61, EVENT_SOUND_QUIET = 62, EVENT_ACQUAINTANCE_PED_HATE_BADLY_LIT = 63, EVENT_WATER_CANNON = 64, EVENT_SEEN_PANICKED_PED = 65, EVENT_IN_WATER = 66, EVENT_AREA_CODES = 67, EVENT_PLAYER_WANTED_LEVEL = 69, EVENT_CREATE_PARTNER_TASK = 70, EVENT_PLAYER_COMMAND_TO_GROUP = 71, EVENT_SEEN_COP = 72, EVENT_VEHICLE_DAMAGE_COLLISION = 73, EVENT_ON_ESCALATOR = 74, EVENT_DANGER = 75, EVENT_PLAYER_COMMAND_TO_GROUP_GATHER = 76, EVENT_LEADER_ENTRY_EXIT = 77, EVENT_VEHICLE_ON_FIRE = 79, EVENT_INTERIOR_USE_INFO = 81, EVENT_SIGNAL_AT_PED = 88, EVENT_PASS_OBJECT = 89, EVENT_NEW_GANG_MEMBER = 90, EVENT_LEAN_ON_VEHICLE = 92, EVENT_STUCK_IN_AIR = 93, EVENT_DONT_JOIN_GROUP = 94, EVENT_TOTAL_NUM_EVENTS = 96 };
09730bfd803347f7af5a1b3b18e0cb68394985a3
d8fbc197e4fb03e0f083291ec92b75542bcb4917
/src/sysapi/mmap.c
520ecfbb9adf8032f4cadcbb3f6d868c407e6d3d
[]
no_license
hujianzhe/util
b7576091b9d1daa4e3b7f2e8d3be85501c7877a5
146f6c2395c6d8da7383a41d35ebc8190ba8ea02
refs/heads/master
2023-08-18T13:00:57.886249
2023-08-15T08:57:33
2023-08-15T08:57:33
112,769,785
162
55
null
2020-06-09T16:03:15
2017-12-01T17:49:43
C
UTF-8
C
false
false
2,001
c
mmap.c
// // Created by hujianzhe // #include "../../inc/sysapi/mmap.h" #if !defined(_WIN32) && !defined(_WIN64) #include <errno.h> #include <fcntl.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/stat.h> /*#include <sys/sysctl.h>*/ #endif #ifdef __cplusplus extern "C" { #endif BOOL memoryCreateMapping(ShareMemMap_t* mm, const char* name, size_t nbytes) { /* note: if already exist, size is lesser or equal than the size of that segment */ #if defined(_WIN32) || defined(_WIN64) HANDLE handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, ((long long)nbytes) >> 32, nbytes, name); if (!handle) { return FALSE; } /* if (GetLastError() == ERROR_ALREADY_EXISTS) { CloseHandle(handle); return FALSE; } */ *mm = handle; return TRUE; #else key_t k = ftok(name, 0); if ((key_t)-1 == k) { return FALSE; } *mm = shmget(k, nbytes, 0666 | IPC_CREAT); return (*mm) != -1; #endif } BOOL memoryOpenMapping(ShareMemMap_t* mm, const char* name) { #if defined(_WIN32) || defined(_WIN64) *mm = OpenFileMappingA(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, name); return (*mm) != NULL; #else key_t k = ftok(name, 0); if ((key_t)-1 == k) { return FALSE; } *mm = shmget(k, 0, 0666); return (*mm) != -1; #endif } BOOL memoryCloseMapping(ShareMemMap_t mm) { #if defined(_WIN32) || defined(_WIN64) return CloseHandle(mm); #else return shmctl(mm, IPC_RMID, NULL) == 0; #endif } BOOL memoryDoMapping(ShareMemMap_t mm, void* va_base, size_t nbytes, void** ret_mptr) { #if defined(_WIN32) || defined(_WIN64) void* addr = MapViewOfFileEx(mm, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, nbytes, va_base); if (!addr) { return FALSE; } *ret_mptr = addr; return TRUE; #else void* addr = shmat(mm, va_base, 0); if ((void*)-1 == addr) { return FALSE; } *ret_mptr = addr; return TRUE; #endif } BOOL memoryUndoMapping(void* mptr) { #if defined(_WIN32) || defined(_WIN64) return UnmapViewOfFile(mptr); #else return shmdt(mptr) == 0; #endif } #ifdef __cplusplus } #endif
87e6af9efb5cdd77f2dabeae1f93600aa7cc28db
fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be
/govern/data-security/krb-1.2.1/src/kadmin/dbutil/ovload.c
fb55002dfc32972ca50544166b80aa7552645b72
[ "BSD-4-Clause", "LicenseRef-scancode-generic-export-compliance", "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-mit-old-style", "BSD-4-Clause-UC", "LicenseRef-scancode-rsa-1990", "BSD-3-Clause", "MIT-CMU", "LicenseRef-scancode-mit-no-advert-export-control", "CC-BY-SA-3.0", "LicenseRef-scancode-mit-modification-obligations", "LicenseRef-scancode-proprietary-license", "GPL-2.0-or-later", "LicenseRef-scancode-michigan-disclaimer", "ISC", "LicenseRef-scancode-nrl-permission", "FreeBSD-DOC", "LicenseRef-scancode-rsa-md4", "RSA-MD", "OLDAP-2.8", "FSFULLRWD", "BSD-2-Clause", "LicenseRef-scancode-brian-gladman", "MIT", "Apache-2.0" ]
permissive
alldatacenter/alldata
7bc7713c9f1d56ad6b8e59ea03206d1073b7e047
8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6
refs/heads/master
2023-08-05T07:32:25.442740
2023-08-03T13:17:24
2023-08-03T13:17:24
213,321,771
774
250
Apache-2.0
2023-09-06T17:35:32
2019-10-07T07:36:18
null
UTF-8
C
false
false
6,135
c
ovload.c
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #include <k5-int.h> #include <unistd.h> #include <kadm5/admin.h> #include <kadm5/server_internal.h> #include <kdb.h> #include "import_err.h" #include "kdb5_util.h" #include "nstrtok.h" #define LINESIZE 32768 /* XXX */ static int parse_pw_hist_ent(current, hist) char *current; osa_pw_hist_ent *hist; { int tmp, i, j, ret; char *cp; ret = 0; hist->n_key_data = 1; hist->key_data = (krb5_key_data *) malloc(hist->n_key_data * sizeof(krb5_key_data)); if (hist->key_data == NULL) return ENOMEM; memset(hist->key_data, 0, sizeof(krb5_key_data)*hist->n_key_data); for (i = 0; i < hist->n_key_data; i++) { krb5_key_data *key_data = &hist->key_data[i]; key_data->key_data_ver = 1; if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } key_data->key_data_type[0] = atoi(cp); if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } key_data->key_data_length[0] = atoi(cp); if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } if(!(key_data->key_data_contents[0] = (krb5_octet *) malloc(key_data->key_data_length[0]+1))) { ret = ENOMEM; goto done; } for(j = 0; j < key_data->key_data_length[0]; j++) { if(sscanf(cp, "%02x", &tmp) != 1) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } key_data->key_data_contents[0][j] = tmp; cp = strchr(cp, ' ') + 1; } } done: return ret; } /* * Function: parse_principal * * Purpose: parse principal line in db dump file * * Arguments: * <return value> 0 on success, error code on failure * * Requires: * principal database to be opened. * nstrtok(3) to have a valid buffer in memory. * * Effects: * [effects] * * Modifies: * [modifies] * */ int process_ov_principal(kcontext, fname, filep, verbose, linenop) krb5_context kcontext; const char *fname; FILE *filep; krb5_boolean verbose; int *linenop; { XDR xdrs; osa_princ_ent_t rec; krb5_error_code ret; krb5_tl_data tl_data; krb5_principal princ; krb5_db_entry *kdb = NULL; char *current = 0; char *cp; unsigned int x; char line[LINESIZE]; if (fgets(line, LINESIZE, filep) == (char *) NULL) { return IMPORT_BAD_FILE; } if((cp = nstrtok(line, "\t")) == NULL) return IMPORT_BAD_FILE; if((rec = (osa_princ_ent_t) malloc(sizeof(osa_princ_ent_rec))) == NULL) return ENOMEM; memset(rec, 0, sizeof(osa_princ_ent_rec)); if((ret = krb5_parse_name(kcontext, cp, &princ))) goto done; krb5_unparse_name(kcontext, princ, &current); if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } else { if(strcmp(cp, "")) { if((rec->policy = strdup(cp)) == NULL) { ret = ENOMEM; goto done; } } else rec->policy = NULL; } if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } rec->aux_attributes = strtol(cp, (char **)NULL, 16); if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } rec->old_key_len = atoi(cp); if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } rec->old_key_next = atoi(cp); if((cp = nstrtok((char *) NULL, "\t")) == NULL) { com_err(NULL, IMPORT_BAD_RECORD, "%s", current); ret = IMPORT_FAILED; goto done; } rec->admin_history_kvno = atoi(cp); if (! rec->old_key_len) { rec->old_keys = NULL; } else { if(!(rec->old_keys = (osa_pw_hist_ent *) malloc(sizeof(osa_pw_hist_ent) * rec->old_key_len))) { ret = ENOMEM; goto done; } memset(rec->old_keys,0, sizeof(osa_pw_hist_ent) * rec->old_key_len); for(x = 0; x < rec->old_key_len; x++) parse_pw_hist_ent(current, &rec->old_keys[x]); } xdralloc_create(&xdrs, XDR_ENCODE); if (! xdr_osa_princ_ent_rec(&xdrs, rec)) { xdr_destroy(&xdrs); ret = KADM5_XDR_FAILURE; goto done; } tl_data.tl_data_type = KRB5_TL_KADM_DATA; tl_data.tl_data_length = xdr_getpos(&xdrs); tl_data.tl_data_contents = (krb5_octet *) xdralloc_getdata(&xdrs); ret = krb5_db_get_principal(kcontext, princ, 0, &kdb); if (ret) goto done; ret = krb5_dbe_update_tl_data(kcontext, kdb, &tl_data); if (ret) goto done; ret = krb5_db_put_principal(kcontext, kdb); if (ret) goto done; xdr_destroy(&xdrs); (*linenop)++; done: free(current); krb5_free_principal(kcontext, princ); osa_free_princ_ent(rec); krb5_db_free_principal(kcontext, kdb); return ret; }
c848c018d74208b9ed62d90ddda9bbb776ea8ca4
9ceacf33fd96913cac7ef15492c126d96cae6911
/include/complex.h
b29f5a7295e97403f0a0d789e38cff4ecbe040c6
[ "BSD-2-Clause" ]
permissive
openbsd/src
ab97ef834fd2d5a7f6729814665e9782b586c130
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
refs/heads/master
2023-09-02T18:54:56.624627
2023-09-02T15:16:12
2023-09-02T15:16:12
66,966,208
3,394
1,235
null
2023-08-08T02:42:25
2016-08-30T18:18:25
C
UTF-8
C
false
false
4,010
h
complex.h
/* $OpenBSD: complex.h,v 1.5 2014/03/16 18:38:30 guenther Exp $ */ /* * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _COMPLEX_H_ #define _COMPLEX_H_ #include <sys/cdefs.h> /* * C99 */ #ifdef __GNUC__ #if __STDC_VERSION__ < 199901 #define _Complex __complex__ #endif #define _Complex_I 1.0fi #endif #define complex _Complex /* XXX switch to _Imaginary_I */ #undef I #define I _Complex_I __BEGIN_DECLS /* * Double versions of C99 functions */ double complex cacos(double complex); double complex casin(double complex); double complex catan(double complex); double complex ccos(double complex); double complex csin(double complex); double complex ctan(double complex); double complex cacosh(double complex); double complex casinh(double complex); double complex catanh(double complex); double complex ccosh(double complex); double complex csinh(double complex); double complex ctanh(double complex); double complex cexp(double complex); double complex clog(double complex); double cabs(double complex); double complex cpow(double complex, double complex); double complex csqrt(double complex); double carg(double complex); double cimag(double complex); double complex conj(double complex); double complex cproj(double complex); double creal(double complex); /* * Float versions of C99 functions */ float complex cacosf(float complex); float complex casinf(float complex); float complex catanf(float complex); float complex ccosf(float complex); float complex csinf(float complex); float complex ctanf(float complex); float complex cacoshf(float complex); float complex casinhf(float complex); float complex catanhf(float complex); float complex ccoshf(float complex); float complex csinhf(float complex); float complex ctanhf(float complex); float complex cexpf(float complex); float complex clogf(float complex); float cabsf(float complex); float complex cpowf(float complex, float complex); float complex csqrtf(float complex); float cargf(float complex); float cimagf(float complex); float complex conjf(float complex); float complex cprojf(float complex); float crealf(float complex); /* * Long double versions of C99 functions */ long double complex cacosl(long double complex); long double complex casinl(long double complex); long double complex catanl(long double complex); long double complex ccosl(long double complex); long double complex csinl(long double complex); long double complex ctanl(long double complex); long double complex cacoshl(long double complex); long double complex casinhl(long double complex); long double complex catanhl(long double complex); long double complex ccoshl(long double complex); long double complex csinhl(long double complex); long double complex ctanhl(long double complex); long double complex cexpl(long double complex); long double complex clogl(long double complex); long double cabsl(long double complex); long double complex cpowl(long double complex, long double complex); long double complex csqrtl(long double complex); long double cargl(long double complex); long double cimagl(long double complex); long double complex conjl(long double complex); long double complex cprojl(long double complex); long double creall(long double complex); __END_DECLS #endif /* !_COMPLEX_H_ */
63453687e9766bc74b26accc97284ef4290b8a4b
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/frdm-k64f/board/drv_uart.h
d28e69f052b034c2b753b9d627ab2fcff2f65dce
[ "Zlib", "LicenseRef-scancode-proprietary-license", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
484
h
drv_uart.h
/* * Copyright (c) 2006-2022, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * */ #ifndef DRV_UART_H #define DRV_UART_H #include <rthw.h> #include <rtthread.h> #include <rtdevice.h> #include <MK64F12.h> #include <drivers/serial.h> void rt_hw_uart_init(void); //for kernel debug when console not registered void rt_hw_console_output(const char *str); #endif /* end of include guard: DRV_UART_H */
2f82d87042a9a0c0bdd8f89cbd9602ad3e737d25
79d343002bb63a44f8ab0dbac0c9f4ec54078c3a
/lib/libc/include/any-linux-any/linux/sched/types.h
802c52bc19e0fbda931cddc6e92af2c57c434129
[ "MIT" ]
permissive
ziglang/zig
4aa75d8d3bcc9e39bf61d265fd84b7f005623fc5
f4c9e19bc3213c2bc7e03d7b06d7129882f39f6c
refs/heads/master
2023-08-31T13:16:45.980913
2023-08-31T05:50:29
2023-08-31T05:50:29
40,276,274
25,560
2,399
MIT
2023-09-14T21:09:50
2015-08-06T00:51:28
Zig
UTF-8
C
false
false
4,558
h
types.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _LINUX_SCHED_TYPES_H #define _LINUX_SCHED_TYPES_H #include <linux/types.h> struct sched_param { int sched_priority; }; #define SCHED_ATTR_SIZE_VER0 48 /* sizeof first published struct */ #define SCHED_ATTR_SIZE_VER1 56 /* add: util_{min,max} */ /* * Extended scheduling parameters data structure. * * This is needed because the original struct sched_param can not be * altered without introducing ABI issues with legacy applications * (e.g., in sched_getparam()). * * However, the possibility of specifying more than just a priority for * the tasks may be useful for a wide variety of application fields, e.g., * multimedia, streaming, automation and control, and many others. * * This variant (sched_attr) allows to define additional attributes to * improve the scheduler knowledge about task requirements. * * Scheduling Class Attributes * =========================== * * A subset of sched_attr attributes specifies the * scheduling policy and relative POSIX attributes: * * @size size of the structure, for fwd/bwd compat. * * @sched_policy task's scheduling policy * @sched_nice task's nice value (SCHED_NORMAL/BATCH) * @sched_priority task's static priority (SCHED_FIFO/RR) * * Certain more advanced scheduling features can be controlled by a * predefined set of flags via the attribute: * * @sched_flags for customizing the scheduler behaviour * * Sporadic Time-Constrained Task Attributes * ========================================= * * A subset of sched_attr attributes allows to describe a so-called * sporadic time-constrained task. * * In such a model a task is specified by: * - the activation period or minimum instance inter-arrival time; * - the maximum (or average, depending on the actual scheduling * discipline) computation time of all instances, a.k.a. runtime; * - the deadline (relative to the actual activation time) of each * instance. * Very briefly, a periodic (sporadic) task asks for the execution of * some specific computation --which is typically called an instance-- * (at most) every period. Moreover, each instance typically lasts no more * than the runtime and must be completed by time instant t equal to * the instance activation time + the deadline. * * This is reflected by the following fields of the sched_attr structure: * * @sched_deadline representative of the task's deadline * @sched_runtime representative of the task's runtime * @sched_period representative of the task's period * * Given this task model, there are a multiplicity of scheduling algorithms * and policies, that can be used to ensure all the tasks will make their * timing constraints. * * As of now, the SCHED_DEADLINE policy (sched_dl scheduling class) is the * only user of this new interface. More information about the algorithm * available in the scheduling class file or in Documentation/. * * Task Utilization Attributes * =========================== * * A subset of sched_attr attributes allows to specify the utilization * expected for a task. These attributes allow to inform the scheduler about * the utilization boundaries within which it should schedule the task. These * boundaries are valuable hints to support scheduler decisions on both task * placement and frequency selection. * * @sched_util_min represents the minimum utilization * @sched_util_max represents the maximum utilization * * Utilization is a value in the range [0..SCHED_CAPACITY_SCALE]. It * represents the percentage of CPU time used by a task when running at the * maximum frequency on the highest capacity CPU of the system. For example, a * 20% utilization task is a task running for 2ms every 10ms at maximum * frequency. * * A task with a min utilization value bigger than 0 is more likely scheduled * on a CPU with a capacity big enough to fit the specified value. * A task with a max utilization value smaller than 1024 is more likely * scheduled on a CPU with no more capacity than the specified value. * * A task utilization boundary can be reset by setting the attribute to -1. */ struct sched_attr { __u32 size; __u32 sched_policy; __u64 sched_flags; /* SCHED_NORMAL, SCHED_BATCH */ __s32 sched_nice; /* SCHED_FIFO, SCHED_RR */ __u32 sched_priority; /* SCHED_DEADLINE */ __u64 sched_runtime; __u64 sched_deadline; __u64 sched_period; /* Utilization hints */ __u32 sched_util_min; __u32 sched_util_max; }; #endif /* _LINUX_SCHED_TYPES_H */
bcc08251fd03d4dee0336a4e803bf8d20862a8f8
51c60b88750841787e334a213a2042fcba7c7106
/v3.1/glfw/glfw_win32_time.c
3a82eec46d97182f0a54d3eeebbcaf888eb82275
[ "BSD-3-Clause" ]
permissive
go-gl/glfw
f7b87f9fa8379a4714a612460b00387344a2bac0
93cebf72946bdd130bbda47817ad53315d776ca7
refs/heads/master
2023-08-25T08:35:58.025548
2022-10-17T16:15:38
2022-10-17T16:15:38
10,151,943
1,498
229
BSD-3-Clause
2023-03-13T00:37:19
2013-05-19T06:38:45
C
UTF-8
C
false
false
61
c
glfw_win32_time.c
#ifdef _GLFW_WIN32 #include "glfw/src/win32_time.c" #endif
149195dd3f381931f1b4b2eeebcfa93ee68ebcc7
0744dcc5394cebf57ebcba343747af6871b67017
/os/kernel/wdog/wd_start.c
f7257fd11f86835695ee9d9c6a224ed4e9cdac6a
[ "Apache-2.0", "GPL-1.0-or-later", "BSD-3-Clause", "ISC", "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-permissive" ]
permissive
Samsung/TizenRT
96abf62f1853f61fcf91ff14671a5e0c6ca48fdb
1a5c2e00a4b1bbf4c505bbf5cc6a8259e926f686
refs/heads/master
2023-08-31T08:59:33.327998
2023-08-08T06:09:20
2023-08-31T04:38:20
82,517,252
590
719
Apache-2.0
2023-09-14T06:54:49
2017-02-20T04:38:30
C
UTF-8
C
false
false
14,403
c
wd_start.c
/**************************************************************************** * * Copyright 2016 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. * ****************************************************************************/ /**************************************************************************** * kernel/wdog/wd_start.c * * Copyright (C) 2007-2009, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <sys/types.h> #include <stdint.h> #include <stdbool.h> #include <stdarg.h> #include <unistd.h> #include <sched.h> #include <assert.h> #include <errno.h> #include <tinyara/arch.h> #include <tinyara/wdog.h> #include "sched/sched.h" #include "wdog/wdog.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #ifndef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif #ifndef MAX #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif /**************************************************************************** * Private Type Declarations ****************************************************************************/ typedef void (*wdentry0_t)(int argc); #if CONFIG_MAX_WDOGPARMS > 0 typedef void (*wdentry1_t)(int argc, uint32_t arg1); #endif #if CONFIG_MAX_WDOGPARMS > 1 typedef void (*wdentry2_t)(int argc, uint32_t arg1, uint32_t arg2); #endif #if CONFIG_MAX_WDOGPARMS > 2 typedef void (*wdentry3_t)(int argc, uint32_t arg1, uint32_t arg2, uint32_t arg3); #endif #if CONFIG_MAX_WDOGPARMS > 3 typedef void (*wdentry4_t)(int argc, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4); #endif /**************************************************************************** * Global Variables ****************************************************************************/ /**************************************************************************** * Private Variables ****************************************************************************/ /**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** * Name: wd_expiration * * Description: * Check if the timer for the watchdog at the head of list is ready to * run. If so, remove the watchdog from the list and execute it. * * Parameters: * None * * Return Value: * None * * Assumptions: * ****************************************************************************/ static inline void wd_expiration(void) { FAR struct wdog_s *wdog; /* Check if the watchdog at the head of the list is ready to run */ if (((FAR struct wdog_s *)g_wdactivelist.head)->lag <= 0) { /* Process the watchdog at the head of the list as well as any * other watchdogs that became ready to run at this time */ while (g_wdactivelist.head && ((FAR struct wdog_s *)g_wdactivelist.head)->lag <= 0) { /* Remove the watchdog from the head of the list */ wdog = (FAR struct wdog_s *)sq_remfirst(&g_wdactivelist); /* If there is another watchdog behind this one, update its * its lag (this shouldn't be necessary). */ if (g_wdactivelist.head) { ((FAR struct wdog_s *)g_wdactivelist.head)->lag += wdog->lag; } /* Indicate that the watchdog is no longer active. */ WDOG_CLRACTIVE(wdog); /* Execute the watchdog function */ up_setpicbase(wdog->picbase); switch (wdog->argc) { default: DEBUGPANIC(); break; case 0: (*((wdentry0_t)(wdog->func)))(0); break; #if CONFIG_MAX_WDOGPARMS > 0 case 1: (*((wdentry1_t)(wdog->func)))(1, wdog->parm[0]); break; #endif #if CONFIG_MAX_WDOGPARMS > 1 case 2: (*((wdentry2_t)(wdog->func)))(2, wdog->parm[0], wdog->parm[1]); break; #endif #if CONFIG_MAX_WDOGPARMS > 2 case 3: (*((wdentry3_t)(wdog->func)))(3, wdog->parm[0], wdog->parm[1], wdog->parm[2]); break; #endif #if CONFIG_MAX_WDOGPARMS > 3 case 4: (*((wdentry4_t)(wdog->func)))(4, wdog->parm[0], wdog->parm[1], wdog->parm[2], wdog->parm[3]); break; #endif } } } } /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: wd_start * * Description: * This function adds a watchdog to the timer queue. The specified * watchdog function will be called from the interrupt level after the * specified number of ticks has elapsed. Watchdog timers may be started * from the interrupt level. * * Watchdog timers execute in the address environment that was in effect * when wd_start() is called. * * Watchdog timers execute only once. * * To replace either the timeout delay or the function to be executed, * call wd_start again with the same wdog; only the most recent wdStart() * on a given watchdog ID has any effect. * * Parameters: * wdog = watchdog ID * delay = Delay count in clock ticks * wdentry = function to call on timeout * parm1..4 = parameters to pass to wdentry * * Return Value: * OK or ERROR * * Assumptions: * The watchdog routine runs in the context of the timer interrupt handler * and is subject to all ISR restrictions. * ****************************************************************************/ int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...) { va_list ap; FAR struct wdog_s *curr; FAR struct wdog_s *prev; FAR struct wdog_s *next; int32_t now; irqstate_t state; int i; /* Verify the wdog */ if (!wdog || argc > CONFIG_MAX_WDOGPARMS || delay < 0) { set_errno(EINVAL); return ERROR; } /* Check if the watchdog has been started. If so, stop it. * NOTE: There is a race condition here... the caller may receive * the watchdog between the time that wd_start is called and * the critical section is established. */ state = irqsave(); if (WDOG_ISACTIVE(wdog)) { wd_cancel(wdog); } /* Save the data in the watchdog structure */ wdog->func = wdentry; /* Function to execute when delay expires */ up_getpicbase(&wdog->picbase); wdog->argc = argc; va_start(ap, argc); for (i = 0; i < argc; i++) { wdog->parm[i] = va_arg(ap, uint32_t); } #ifdef CONFIG_DEBUG for (; i < CONFIG_MAX_WDOGPARMS; i++) { wdog->parm[i] = 0; } #endif va_end(ap); /* Calculate delay+1, forcing the delay into a range that we can handle */ if (delay <= 0) { delay = 1; } else if (++delay <= 0) { delay--; } #ifdef CONFIG_SCHED_TICKLESS /* Cancel the interval timer that drives the timing events. This will cause * wd_timer to be called which update the delay value for the first time * at the head of the timer list (there is a possibility that it could even * remove it). */ (void)sched_timer_cancel(); #endif /* Do the easy case first -- when the watchdog timer queue is empty. */ if (g_wdactivelist.head == NULL) { /* Add the watchdog to the head == tail of the queue. */ sq_addlast((FAR sq_entry_t *)wdog, &g_wdactivelist); } /* There are other active watchdogs in the timer queue */ else { now = 0; prev = curr = (FAR struct wdog_s *)g_wdactivelist.head; /* Advance to positive time */ while ((now += curr->lag) < 0 && curr->next) { prev = curr; curr = curr->next; } /* Advance past shorter delays */ while (now <= delay && curr->next) { prev = curr; curr = curr->next; now += curr->lag; } /* Check if the new wdog must be inserted before the curr. */ if (delay < now) { /* The relative delay time is smaller or equal to the current delay * time, so decrement the current delay time by the new relative * delay time. */ delay -= (now - curr->lag); curr->lag -= delay; /* Insert the new watchdog in the list */ if (curr == (FAR struct wdog_s *)g_wdactivelist.head) { /* Insert the watchdog at the head of the list */ sq_addfirst((FAR sq_entry_t *)wdog, &g_wdactivelist); } else { /* Insert the watchdog in mid- or end-of-queue */ sq_addafter((FAR sq_entry_t *)prev, (FAR sq_entry_t *)wdog, &g_wdactivelist); } } /* The new watchdog delay time is greater than the curr delay time, * so the new wdog must be inserted after the curr. This only occurs * if the wdog is to be added to the end of the list. */ else { delay -= now; if (!curr->next) { sq_addlast((FAR sq_entry_t *)wdog, &g_wdactivelist); } else { next = curr->next; next->lag -= delay; sq_addafter((FAR sq_entry_t *)curr, (FAR sq_entry_t *)wdog, &g_wdactivelist); } } } /* Put the lag into the watchdog structure and mark it as active. */ wdog->lag = delay; WDOG_SETACTIVE(wdog); #ifdef CONFIG_SCHED_TICKLESS /* Resume the interval timer that will generate the next interval event. * If the timer at the head of the list changed, then this will pick that * new delay. */ sched_timer_resume(); #endif irqrestore(state); return OK; } /**************************************************************************** * Name: wd_timer * * Description: * This function is called from the timer interrupt handler to determine * if it is time to execute a watchdog function. If so, the watchdog * function will be executed in the context of the timer interrupt * handler. * * Parameters: * ticks - If CONFIG_SCHED_TICKLESS is defined then the number of ticks * in the interval that just expired is provided. Otherwise, * this function is called on each timer interrupt and a value of one * is implicit. * * Return Value: * If CONFIG_SCHED_TICKLESS is defined then the number of ticks for the * next delay is provided (zero if no delay). Otherwise, this function * has no returned value. * * Assumptions: * Called from interrupt handler logic with interrupts disabled. * ****************************************************************************/ #ifdef CONFIG_SCHED_TICKLESS unsigned int wd_timer(int ticks) { FAR struct wdog_s *wdog; int decr; /* Check if there are any active watchdogs to process */ while (g_wdactivelist.head && ticks > 0) { /* Get the watchdog at the head of the list */ wdog = (FAR struct wdog_s *)g_wdactivelist.head; #ifndef CONFIG_SCHED_TICKLESS_ALARM /* There is logic to handle the case where ticks is greater than * the watchdog lag, but if the scheduling is working properly * that should never happen. */ DEBUGASSERT(ticks <= wdog->lag); #endif /* Decrement the lag for this watchdog. */ decr = MIN(wdog->lag, ticks); /* There are. Decrement the lag counter */ wdog->lag -= decr; ticks -= decr; /* Check if the watchdog at the head of the list is ready to run */ wd_expiration(); } /* Return the delay for the next watchdog to expire */ return g_wdactivelist.head ? ((FAR struct wdog_s *)g_wdactivelist.head)->lag : 0; } #else void wd_timer(void) { /* Check if there are any active watchdogs to process */ if (g_wdactivelist.head) { /* There are. Decrement the lag counter */ --(((FAR struct wdog_s *)g_wdactivelist.head)->lag); /* Check if the watchdog at the head of the list is ready to run */ wd_expiration(); } } #endif /* CONFIG_SCHED_TICKLESS */ #ifdef CONFIG_SCHED_TICKSUPPRESS void wd_timer_nohz(int ticks) { int ret; FAR struct wdog_s *wdog; int decr; /* Check if there are any active watchdogs to process */ while (g_wdactivelist.head && ticks > 0) { /* Get the watchdog at the head of the list */ wdog = (FAR struct wdog_s *)g_wdactivelist.head; /* Decrement the lag for this watchdog. */ decr = MIN(wdog->lag, ticks); /* There are. Decrement the lag counter */ wdog->lag -= decr; ticks -= decr; /* Check if the watchdog at the head of the list is ready to run */ wd_expiration(); } return ret; } #endif
080a198d1530c4742b42f453ccffe9c373ae57df
328ad992496c5d45b1dabf2027185435b5b281bc
/include/useful/useful.h
a7343366d9a99e8aa5fac797dbdffcfad8147c67
[ "MIT" ]
permissive
masagrator/NX-FPS
cdfdb2873bd4c6c4b9474ca1613935066d7853da
3d6a19e7b6a6b4fb19fc63e7baaf34b1173b8f76
refs/heads/master
2023-09-01T14:05:01.650718
2023-07-01T16:20:19
2023-07-01T16:20:19
243,776,092
179
11
MIT
2023-05-22T16:35:08
2020-02-28T14:04:56
C
UTF-8
C
false
false
587
h
useful.h
#ifndef USEFUL_H #define USEFUL_H #include <switch_min.h> #include <string.h> #include <stdio.h> #define LOAD64 *(u64 *) #define LINKABLE __attribute__ ((weak)) #define debug_log(...) \ {char log_buf[0x200]; snprintf(log_buf, 0x200, __VA_ARGS__); \ svcOutputDebugString(log_buf, strlen(log_buf));} typedef struct Hash40 { uint64_t hash : 40; } Hash40; typedef struct Vector2f { float x; float y; } Vector2f; typedef struct Vector3f { float x; float y; float z; } Vector3f; typedef struct Vector4f { float x; float y; float z; float w; }Vector4f; #endif // USEFUL_H
24de800ad077b9d8e8719a5ace8ceb416c9ab2dc
c36109d7fdbc7db20871353ad606a1c243969dd1
/src/alcotest/alcotest_stubs.c
b7bbc5e53d166857527c991142e307e34bd60cb9
[ "ISC" ]
permissive
mirage/alcotest
e5e807cbc332001fb8c6fd65898f6c47fe416e1c
7c997d1d48ae6e734512bc92144593e11b189d8e
refs/heads/main
2023-09-04T05:17:33.019452
2023-07-04T01:42:52
2023-07-04T01:42:52
15,141,922
402
91
ISC
2023-09-05T15:48:19
2013-12-12T16:58:41
OCaml
UTF-8
C
false
false
3,387
c
alcotest_stubs.c
#include <caml/version.h> #include <caml/alloc.h> #include <caml/memory.h> #include <caml/mlvalues.h> #ifndef _MSC_VER #include <unistd.h> #endif #if OCAML_VERSION < 41200 #define Val_none Val_int(0) #define Tag_some 0 static value caml_alloc_some(value v) { CAMLparam1(v); value some = caml_alloc_small(1, Tag_some); Field(some, 0) = v; CAMLreturn(some); } #endif // Detect platform #if defined(_WIN32) #define OCAML_ALCOTEST_WINDOWS #elif defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) #if defined(_POSIX_VERSION) #define OCAML_ALCOTEST_POSIX #endif #endif // Windows support #if defined(OCAML_ALCOTEST_WINDOWS) #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include <windows.h> CAMLprim value ocaml_alcotest_get_terminal_dimensions(value unit) { CAMLparam1(unit); CAMLlocal2(result, pair); CONSOLE_SCREEN_BUFFER_INFO csbi; int success = GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); if (success) { pair = caml_alloc_tuple(2); Store_field(pair, 0, Val_int((int)(csbi.dwSize.Y))); Store_field(pair, 1, Val_int((int)(csbi.dwSize.X))); result = caml_alloc_some(pair); } else { result = Val_none; } CAMLreturn(result); } // POSIX support #elif defined(OCAML_ALCOTEST_POSIX) #include <sys/ioctl.h> CAMLprim value ocaml_alcotest_get_terminal_dimensions(value unit) { CAMLparam1(unit); CAMLlocal2(result, pair); struct winsize ws; int z = ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws); if (z == 0) { pair = caml_alloc_tuple(2); Store_field(pair, 0, Val_int(ws.ws_row)); Store_field(pair, 1, Val_int(ws.ws_col)); result = caml_alloc_some(pair); } else { result = Val_none; } CAMLreturn(result); } // Unsupported platform #else CAMLprim value ocaml_alcotest_get_terminal_dimensions(value unit) { CAMLparam1(unit); CAMLlocal1(result); result = Val_none; CAMLreturn(result); } #endif /* duplicated from caml/sys.h and io.c */ CAMLextern value caml_channel_descriptor(value vchannel); #define NO_ARG Val_int(0) CAMLextern void caml_sys_error (value); /* End of code duplication */ static int alcotest_saved_stdout; static int alcotest_saved_stderr; CAMLprim value alcotest_before_test (value voutput, value vstdout, value vstderr) { int output_fd, stdout_fd, stderr_fd, fd, ret; stdout_fd = Int_val(caml_channel_descriptor(vstdout)); stderr_fd = Int_val(caml_channel_descriptor(vstderr)); output_fd = Int_val(caml_channel_descriptor(voutput)); fd = dup(stdout_fd); if(fd == -1) caml_sys_error(NO_ARG); alcotest_saved_stdout = fd; fd = dup(stderr_fd); if(fd == -1) caml_sys_error(NO_ARG); alcotest_saved_stderr = fd; ret = dup2(output_fd, stdout_fd); if(ret == -1) caml_sys_error(NO_ARG); ret = dup2(output_fd, stderr_fd); if(ret == -1) caml_sys_error(NO_ARG); return Val_unit; } CAMLprim value alcotest_after_test (value vstdout, value vstderr) { int stdout_fd, stderr_fd, ret; stdout_fd = Int_val(caml_channel_descriptor(vstdout)); stderr_fd = Int_val(caml_channel_descriptor(vstderr)); ret = dup2(alcotest_saved_stdout, stdout_fd); if(ret == -1) caml_sys_error(NO_ARG); ret = dup2(alcotest_saved_stderr, stderr_fd); if(ret == -1) caml_sys_error(NO_ARG); ret = close(alcotest_saved_stdout); if(ret == -1) caml_sys_error(NO_ARG); ret = close(alcotest_saved_stderr); if(ret == -1) caml_sys_error(NO_ARG); return Val_unit; }
f9bbc801d129478e94f8f157d03bc9cbc2776765
e72db16e9747386afd01edd1dd36d9589a3f71ef
/src/libpmem2/pmem2_utils_none.c
0863c7dbe118da48ee1467e591e48f153bcce3f5
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
pmem/pmdk
5e49feee8017574340db2a0f9b4e2eab99f8581c
ccadb16227bddea1bdcc518bd8f298d551b2baad
refs/heads/master
2023-08-31T02:28:06.884934
2023-08-30T14:52:25
2023-08-30T14:52:25
23,637,153
1,017
402
NOASSERTION
2023-09-07T11:52:42
2014-09-03T20:55:23
C
UTF-8
C
false
false
797
c
pmem2_utils_none.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020-2022, Intel Corporation */ #include <errno.h> #include "libpmem2.h" #include "out.h" #include "pmem2_utils.h" #include "source.h" /* * pmem2_device_dax_alignment -- checks the alignment of a given * dax device from given source */ int pmem2_device_dax_alignment(const struct pmem2_source *src, size_t *alignment) { SUPPRESS_UNUSED(src, alignment); ERR("Cannot read Device Dax alignment - ndctl is not available"); return PMEM2_E_NOSUPP; } /* * pmem2_device_dax_size -- checks the size of a given dax device from * given source */ int pmem2_device_dax_size(const struct pmem2_source *src, size_t *size) { SUPPRESS_UNUSED(src, size); ERR("Cannot read Device Dax size - ndctl is not available"); return PMEM2_E_NOSUPP; }
1fe74a503e0594f438be3743d7f02296afbb4522
9ceacf33fd96913cac7ef15492c126d96cae6911
/regress/lib/libradius/test21.c
10b7e2f5fc9894f4185acf3d11f4193b16a058cd
[]
no_license
openbsd/src
ab97ef834fd2d5a7f6729814665e9782b586c130
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
refs/heads/master
2023-09-02T18:54:56.624627
2023-09-02T15:16:12
2023-09-02T15:16:12
66,966,208
3,394
1,235
null
2023-08-08T02:42:25
2016-08-30T18:18:25
C
UTF-8
C
false
false
3,106
c
test21.c
#include "incs.h" /* * integer (uint16_t, uint32_t, uint64_t) attributes */ void test21(void) { RADIUS_PACKET *packet; uint16_t v16; uint32_t v32; uint64_t v64; static const uint8_t attrs_beforeset[] = { 1, 3, 0, 10, 4, 0x12, 0x34, RADIUS_TYPE_VENDOR_SPECIFIC, 10, 0, 0, 0, 20, 30, 4, 0x43, 0x21, 40, 6, 0x13, 0x57, 0x9b, 0xdf, RADIUS_TYPE_VENDOR_SPECIFIC, 12, 0, 0, 0, 50, 60, 6, 0x24, 0x68, 0xac, 0xe0, 70, 10, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, RADIUS_TYPE_VENDOR_SPECIFIC, 16, 0, 0, 0, 80, 90, 10, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, }; static const uint8_t attrs_afterset[] = { 1, 3, 0, 10, 4, 0x43, 0x21, RADIUS_TYPE_VENDOR_SPECIFIC, 10, 0, 0, 0, 20, 30, 4, 0x12, 0x34, 40, 6, 0x24, 0x68, 0xac, 0xe0, RADIUS_TYPE_VENDOR_SPECIFIC, 12, 0, 0, 0, 50, 60, 6, 0x13, 0x57, 0x9b, 0xdf, 70, 10, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, RADIUS_TYPE_VENDOR_SPECIFIC, 16, 0, 0, 0, 80, 90, 10, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, }; packet = radius_new_request_packet(RADIUS_CODE_ACCESS_REQUEST); radius_put_raw_attr(packet, 1, "", 1); /* padding for UNalignment */ radius_put_uint16_attr(packet, 10, 0x1234); radius_put_vs_uint16_attr(packet, 20, 30, 0x4321); radius_put_uint32_attr(packet, 40, 0x13579bdfU); radius_put_vs_uint32_attr(packet, 50, 60, 0x2468ace0U); radius_put_uint64_attr(packet, 70, 0x0123456789abcdefULL); radius_put_vs_uint64_attr(packet, 80, 90, 0xfedcba9876543210ULL); CHECK(radius_get_length(packet) == sizeof(attrs_beforeset) + 20); CHECK(memcmp(radius_get_data(packet) + 20, attrs_beforeset, sizeof(attrs_beforeset)) == 0); CHECK(radius_get_uint16_attr(packet, 10, &v16) == 0); CHECK(v16 == 0x1234); CHECK(radius_get_vs_uint16_attr(packet, 20, 30, &v16) == 0); CHECK(v16 == 0x4321); CHECK(radius_get_uint32_attr(packet, 40, &v32) == 0); CHECK(v32 == 0x13579bdfU); CHECK(radius_get_vs_uint32_attr(packet, 50, 60, &v32) == 0); CHECK(v32 == 0x2468ace0U); CHECK(radius_get_uint64_attr(packet, 70, &v64) == 0); CHECK(v64 == 0x0123456789abcdefULL); CHECK(radius_get_vs_uint64_attr(packet, 80, 90, &v64) == 0); CHECK(v64 == 0xfedcba9876543210ULL); CHECK(radius_set_uint16_attr(packet, 10, 0x4321) == 0); CHECK(radius_set_vs_uint16_attr(packet, 20, 30, 0x1234) == 0); CHECK(radius_set_uint32_attr(packet, 40, 0x2468ace0U) == 0); CHECK(radius_set_vs_uint32_attr(packet, 50, 60, 0x13579bdfU) == 0); CHECK(radius_set_uint64_attr(packet, 70, 0xfedcba9876543210ULL) == 0); CHECK(radius_set_vs_uint64_attr(packet, 80, 90, 0x0123456789abcdefULL) == 0); CHECK(radius_get_length(packet) == sizeof(attrs_afterset) + 20); CHECK(memcmp(radius_get_data(packet) + 20, attrs_afterset, sizeof(attrs_afterset)) == 0); CHECK(radius_get_uint16_attr(packet, 40, &v16) != 0); CHECK(radius_get_vs_uint16_attr(packet, 50, 60, &v16) != 0); CHECK(radius_get_uint32_attr(packet, 70, &v32) != 0); CHECK(radius_get_vs_uint32_attr(packet, 80, 90, &v32) != 0); CHECK(radius_get_uint64_attr(packet, 10, &v64) != 0); CHECK(radius_get_vs_uint64_attr(packet, 20, 30, &v64) != 0); } ADD_TEST(test21)
5bfabb0574f71c023b75e454c5fc8c3b40e5cd78
95ae7dfa9ee578f1b24a65986ff78bf77ceca0c5
/Engine/lib/curl/lib/multihandle.h
76a67a89a06b3db8d5a9f657e192dcb14add62d4
[ "MIT", "LicenseRef-scancode-unknown", "curl" ]
permissive
TorqueGameEngines/Torque3D
4e1f6a05cc0928980c8c7c20bcdd680eaa6dcee8
a445a4364664e299196bd551d213844486080145
refs/heads/development
2023-09-03T12:40:40.658487
2023-08-24T14:44:43
2023-08-24T14:44:43
267,440,108
1,192
178
MIT
2023-09-13T14:28:16
2020-05-27T22:35:54
C++
UTF-8
C
false
false
6,136
h
multihandle.h
#ifndef HEADER_CURL_MULTIHANDLE_H #define HEADER_CURL_MULTIHANDLE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * SPDX-License-Identifier: curl * ***************************************************************************/ #include "llist.h" #include "hash.h" #include "conncache.h" #include "psl.h" #include "socketpair.h" struct connectdata; struct Curl_message { struct Curl_llist_element list; /* the 'CURLMsg' is the part that is visible to the external user */ struct CURLMsg extmsg; }; /* NOTE: if you add a state here, add the name to the statename[] array as well! */ typedef enum { MSTATE_INIT, /* 0 - start in this state */ MSTATE_PENDING, /* 1 - no connections, waiting for one */ MSTATE_CONNECT, /* 2 - resolve/connect has been sent off */ MSTATE_RESOLVING, /* 3 - awaiting the resolve to finalize */ MSTATE_CONNECTING, /* 4 - awaiting the TCP connect to finalize */ MSTATE_TUNNELING, /* 5 - awaiting HTTPS proxy SSL initialization to complete and/or proxy CONNECT to finalize */ MSTATE_PROTOCONNECT, /* 6 - initiate protocol connect procedure */ MSTATE_PROTOCONNECTING, /* 7 - completing the protocol-specific connect phase */ MSTATE_DO, /* 8 - start send off the request (part 1) */ MSTATE_DOING, /* 9 - sending off the request (part 1) */ MSTATE_DOING_MORE, /* 10 - send off the request (part 2) */ MSTATE_DID, /* 11 - done sending off request */ MSTATE_PERFORMING, /* 12 - transfer data */ MSTATE_RATELIMITING, /* 13 - wait because limit-rate exceeded */ MSTATE_DONE, /* 14 - post data transfer operation */ MSTATE_COMPLETED, /* 15 - operation complete */ MSTATE_MSGSENT, /* 16 - the operation complete message is sent */ MSTATE_LAST /* 17 - not a true state, never use this */ } CURLMstate; /* we support N sockets per easy handle. Set the corresponding bit to what action we should wait for */ #define MAX_SOCKSPEREASYHANDLE 5 #define GETSOCK_READABLE (0x00ff) #define GETSOCK_WRITABLE (0xff00) #define CURLPIPE_ANY (CURLPIPE_MULTIPLEX) #if !defined(CURL_DISABLE_SOCKETPAIR) #define ENABLE_WAKEUP #endif /* value for MAXIMUM CONCURRENT STREAMS upper limit */ #define INITIAL_MAX_CONCURRENT_STREAMS ((1U << 31) - 1) /* This is the struct known as CURLM on the outside */ struct Curl_multi { /* First a simple identifier to easier detect if a user mix up this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */ unsigned int magic; /* We have a doubly-linked list with easy handles */ struct Curl_easy *easyp; struct Curl_easy *easylp; /* last node */ int num_easy; /* amount of entries in the linked list above. */ int num_alive; /* amount of easy handles that are added but have not yet reached COMPLETE state */ struct Curl_llist msglist; /* a list of messages from completed transfers */ struct Curl_llist pending; /* Curl_easys that are in the MSTATE_PENDING state */ /* callback function and user data pointer for the *socket() API */ curl_socket_callback socket_cb; void *socket_userp; /* callback function and user data pointer for server push */ curl_push_callback push_cb; void *push_userp; /* Hostname cache */ struct Curl_hash hostcache; #ifdef USE_LIBPSL /* PSL cache. */ struct PslCache psl; #endif /* timetree points to the splay-tree of time nodes to figure out expire times of all currently set timers */ struct Curl_tree *timetree; /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note the pluralis form, there can be more than one easy handle waiting on the same actual socket) */ struct Curl_hash sockhash; /* Shared connection cache (bundles)*/ struct conncache conn_cache; long maxconnects; /* if >0, a fixed limit of the maximum number of entries we're allowed to grow the connection cache to */ long max_host_connections; /* if >0, a fixed limit of the maximum number of connections per host */ long max_total_connections; /* if >0, a fixed limit of the maximum number of connections in total */ /* timer callback and user data pointer for the *socket() API */ curl_multi_timer_callback timer_cb; void *timer_userp; struct curltime timer_lastcall; /* the fixed time for the timeout for the previous callback */ unsigned int max_concurrent_streams; #ifdef USE_WINSOCK WSAEVENT wsa_event; /* winsock event used for waits */ #else #ifdef ENABLE_WAKEUP curl_socket_t wakeup_pair[2]; /* socketpair() used for wakeup 0 is used for read, 1 is used for write */ #endif #endif /* multiplexing wanted */ bool multiplexing; bool recheckstate; /* see Curl_multi_connchanged */ bool in_callback; /* true while executing a callback */ bool ipv6_works; #ifdef USE_OPENSSL bool ssl_seeded; #endif bool dead; /* a callback returned error, everything needs to crash and burn */ }; #endif /* HEADER_CURL_MULTIHANDLE_H */
54f2032ea348c43c2dcf4ef1685684a0877ea412
f79dec3c4033ca3cbb55d8a51a748cc7b8b6fbab
/devel/nsis/patches/patch-Source_util.h
9d67421069b3521788b3cfa9610b50b25d2316dc
[]
no_license
jsonn/pkgsrc
fb34c4a6a2d350e8e415f3c4955d4989fcd86881
c1514b5f4a3726d90e30aa16b0c209adbc276d17
refs/heads/trunk
2021-01-24T09:10:01.038867
2017-07-07T15:49:43
2017-07-07T15:49:43
2,095,004
106
47
null
2016-09-19T09:26:01
2011-07-23T23:49:04
Makefile
UTF-8
C
false
false
270
h
patch-Source_util.h
$NetBSD: patch-Source_util.h,v 1.1 2013/10/15 14:41:36 joerg Exp $ --- Source/util.h.orig 2013-10-14 21:47:58.000000000 +0000 +++ Source/util.h @@ -10,6 +10,7 @@ # include <iconv.h> # include <stdio.h> # include <glob.h> +# include <unistd.h> #endif
f23949c7991e0efcdce8f755116a1272fb4b94c6
235fc55ec33ee09e69796e654c37ec56471f1574
/src/cli/cli.h
61e8b5ae3e54547d70ab008912d2d95d43072553
[ "GPL-1.0-or-later", "BSD-3-Clause", "LGPL-2.1-or-later", "LGPL-3.0-or-later", "LGPL-3.0-only", "GPL-3.0-only", "Apache-2.0" ]
permissive
NVIDIA/libnvidia-container
ef9935d1c949b394332b3af61437a93f63db89f2
6a24508dff6cb36841114ff4c1287cd29ded72af
refs/heads/main
2023-08-19T02:55:45.136564
2023-08-09T11:23:30
2023-08-09T11:23:30
88,311,197
631
165
Apache-2.0
2023-08-14T22:08:40
2017-04-14T23:45:54
C
UTF-8
C
false
false
2,324
h
cli.h
/* * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. */ #ifndef HEADER_CLI_H #define HEADER_CLI_H #include <argp.h> #include <stdbool.h> #include <unistd.h> #include "cli/libnvc.h" #include "nvc_internal.h" #include "error_generic.h" struct context; struct command { const char *name; const struct argp *argp; int (*func)(const struct context *); }; struct context { /* main */ uid_t uid; gid_t gid; char *root; char *ldcache; bool load_kmods; bool no_pivot; char *init_flags; const struct command *command; /* info */ bool csv_output; /* configure */ pid_t pid; char *rootfs; char *reqs[32]; size_t nreqs; char *ldconfig; char *container_flags; /* list */ bool compat32; bool list_bins; bool list_libs; bool list_ipcs; bool list_firmwares; char *devices; char *mig_config; char *mig_monitor; }; bool matches_pci_format(const char *gpu, char *buf, size_t bufsize); struct devices { bool all; const struct nvc_device **gpus; size_t max_gpus; size_t ngpus; const struct nvc_mig_device **migs; size_t max_migs; size_t nmigs; }; int new_devices(struct error *err, const struct nvc_device_info *dev, struct devices *d); void free_devices(struct devices *d); int print_nvcaps_device_from_proc_file(struct nvc_context *, const char*, const char*); int print_all_mig_minor_devices(const struct nvc_device_node *); int select_devices( struct error *err, char *devs, const struct nvc_device_info *available, struct devices *selected); int select_mig_config_devices( struct error *err, char *devs, const struct devices *visible, struct devices *selected); int select_mig_monitor_devices( struct error *err, char *devs, const struct devices *visible, struct devices *selected); extern const struct argp info_usage; extern const struct argp list_usage; extern const struct argp configure_usage; int info_command(const struct context *); int list_command(const struct context *); int configure_command(const struct context *); #endif /* HEADER_CLI_H */
15a75a0075ab3e17b492fcaf812836f459e674d1
810237086aae7600b9ef87a610aec4777b1bf156
/Example/Pods/Headers/Public/SJVideoPlayer/SJClipsResultsControlLayer.h
280c830d6ec51af61fa63c267bdc9f52b4da0c3a
[ "MIT" ]
permissive
changsanjiang/SJVideoPlayer
f63f3156d5ad07ec107b0feb481110222dd45a85
bff75e1f7f033edc05e07c333ce3557cb289c95c
refs/heads/master
2022-12-20T22:47:04.095976
2022-12-10T08:57:46
2022-12-10T08:57:46
100,693,284
2,680
513
MIT
2022-11-02T11:04:42
2017-08-18T08:56:30
Objective-C
UTF-8
C
false
false
109
h
SJClipsResultsControlLayer.h
../../../../../SJVideoPlayer/ControlLayers/SJClipsControlLayer/Core/ControlLayer/SJClipsResultsControlLayer.h
36cc4cfab78774401356d18693f74fed45bfc765
e88f56c1b731329d604fcfdab964d9fa7cf84b75
/src/NMEA_data.h
f17ee0a9e5d9417938e22bd9681c3ec303c0de1e
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
adafruit/Adafruit_GPS
6570ef06e1dcc7082ce531e60edf479179ee0d2f
4005211fd4db7090d24d7409910d3ab764d63d7d
refs/heads/master
2023-08-31T21:55:14.366272
2023-08-22T10:57:23
2023-08-22T10:57:23
3,835,069
309
227
NOASSERTION
2023-08-20T21:52:17
2012-03-26T16:56:04
C++
UTF-8
C
false
false
10,438
h
NMEA_data.h
/**************************************************************************/ /*! @file NMEA_data.h */ /**************************************************************************/ #ifndef _NMEA_DATA_H #define _NMEA_DATA_H #include "Arduino.h" #define NMEA_MAX_WP_ID \ 20 ///< maximum length of a waypoint ID name, including terminating 0 #define NMEA_MAX_SENTENCE_ID \ 20 ///< maximum length of a sentence ID name, including terminating 0 #define NMEA_MAX_SOURCE_ID \ 3 ///< maximum length of a source ID name, including terminating 0 /************************************************************************* doubles and floats are identical on AVR processors like the UNO where space is tight. doubles avoid the roundoff errors that led to the fixed point mods in https://github.com/adafruit/Adafruit-GPS-Library/pull/13, provided the processor supports actual doubles like the SAMD series with more storage. The total penalty for going all double is under a few hundred bytes / instance or 0 bytes / instance on an UNO. This typedef allows a switch to lower precision to save some storage if needed. A float carries 23 bits of fractional resolution, giving a resolution of at least 9 significant digits, thus 6 significant digits in the decimal place of an angular value like latitude, and thus a resolution on earth of at least 110 mm. That's closer than GPS will hit, and closer than needed for navigation, so floats can be used to save a little storage. **************************************************************************/ #ifndef NMEA_FLOAT_T #define NMEA_FLOAT_T float ///< let float be overidden on command line #endif typedef NMEA_FLOAT_T nmea_float_t; ///< the type of variables to use for floating point /**************************************************************************/ /*! Struct to contain all the details associated with the history of an NMEA data value as an optional extension to the data value struct. The history is stored as scaled integers to save space while caputuring a reasonable level of resolution. The integer is set equal to scale * (X - offset) and can be converted back to an approximate float value with X = I / scale + offset Only some tags have history in order to save memory. Most of the memory cost is directly in the array. 192 history values taken every 20 seconds covers just over an hour. **************************************************************************/ typedef struct { int16_t *data = NULL; ///< array of ints, oldest first unsigned n = 0; ///< number of history array elements uint32_t lastHistory = 0; ///< millis() when history was last updated uint16_t historyInterval = 20; ///< seconds between history updates nmea_float_t scale = 1.0; ///< history = (smoothed - offset) * scale nmea_float_t offset = 0.0; ///< value = (float) history / scale + offset } nmea_history_t; /**************************************************************************/ /*! Type to characterize the type of value stored in a data value struct. The sine and cosine components of some angles allow for smoothing of those angles by averaging of sine and cosine values that are continuous, rather than angles that are discontinuous at -180/180 or 359/0 transitions. Types 10-19 must have three contiguous data value entries set up in the matrix to accommodate the extra sin and cos values. */ /**************************************************************************/ typedef enum { NMEA_SIMPLE_FLOAT = 0, ///< A simple floating point number NMEA_COMPASS_ANGLE = 1, ///< A compass style angle from 0 to 360 degrees NMEA_BOAT_ANGLE = 2, ///< An angle relative to the boat orientation ///< from -180 (port) to 180 degrees NMEA_COMPASS_ANGLE_SIN = 11, ///< A compass style angle from 0 to 360 degrees, with sin and cos ///< elements stored for averaging, etc. NMEA_BOAT_ANGLE_SIN = 12, ///< An angle relative to the boat orientation from -180 (port) to 180 ///< degrees, with sin and cos elements stored for averaging, etc. NMEA_DDMM = 20, ///< A latitude or longitude angle stored in DDMM.mmmm format ///< like it comes in from the GPS NMEA_HHMMSS = 30 ///< A time stored in HHMMSS format like it comes in from the GPS } nmea_value_type_t; /**************************************************************************/ /*! Struct to contain all the details associated with an NMEA data value that can be tracked through time to see how it changes, carries a label, units, and a format string to determine how it is displayed. Memory footprint of about 32 bytes per data value, so not tenable in small memory spaces. */ /**************************************************************************/ typedef struct { nmea_float_t latest = 0.0; ///< the most recently obtained value nmea_float_t smoothed = 0.0; ///< smoothed value based on weight of dt/response uint32_t lastUpdate = 0; ///< millis() when latest was last set uint16_t response = 1000; ///< time constant in millis for smoothing nmea_value_type_t type = NMEA_SIMPLE_FLOAT; ///< type of float data value represented byte ockam = 0; ///< the corresponding Ockam Instruments tag number, 0-128 nmea_history_t *hist = NULL; ///< pointer to history, if any char *label = NULL; ///< pointer to quantity label, if any char *unit = NULL; ///< pointer to units label, if any char *fmt = NULL; ///< pointer to format string, if any } nmea_datavalue_t; /**************************************************************************/ /*! Type to provide an index into the array of data values for different NMEA quantities. The sine and cosine components of some angles allow for smoothing of those angles by averaging of sine and cosine values that are continuous, rather than angles that are discontinuous at -180/180 or 359/0 transitions. Note that the enumerations are arranged so that NMEA_XXX_SIN = NMEA_XXX + 1, and NMEA_XXX_COS = NMEA_XXX + 2. */ /**************************************************************************/ typedef enum { NMEA_HDOP = 0, ///< Horizontal Dilution of Position NMEA_LAT, ///< Latitude in signed decimal degrees -90 to 90 NMEA_LON, ///< Longitude in signed decimal degrees -180 to 180 NMEA_LATWP, ///< Waypoint Latitude in signed decimal degrees -90 to 90 NMEA_LONWP, ///< Waypoint Longitude in signed decimal degrees -180 to 180 NMEA_SOG, ///< Speed over Ground in knots NMEA_COG, ///< Course over ground, 0 to 360 degrees true NMEA_COG_SIN, ///< sine of Course over ground NMEA_COG_COS, ///< cosine of Course over ground NMEA_COGWP, ///< Course over ground to the waypoint, 0 to 360 degrees true NMEA_XTE, ///< Cross track error for the current segment to the waypoint, ///< Nautical Miles -ve to the left NMEA_DISTWP, ///< Distance to the waypoint in nautical miles NMEA_AWA, ///< apparent wind angle relative to the boat -180 to 180 degrees NMEA_AWA_SIN, ///< sine of apparent wind angle relative to the boat NMEA_AWA_COS, ///< cosine of apparent wind angle relative to the boat NMEA_AWS, ///< apparent wind speed, will be coerced to knots NMEA_TWA, ///< true wind angle relative to the boat -180 to 180 degrees NMEA_TWA_SIN, ///< sine of true wind angle relative to the boat NMEA_TWA_COS, ///< cosine of true wind angle relative to the boat NMEA_TWD, ///< true wind compass direction, magnetic 0 to 360 degrees magnetic NMEA_TWD_SIN, ///< sine of true wind compass direction, magnetic NMEA_TWD_COS, ///< cosine of true wind compass direction, magnetic NMEA_TWS, ///< true wind speed in knots TWS NMEA_VMG, ///< velocity made good relative to the wind -ve means downwind, ///< knots NMEA_VMGWP, ///< velocity made good relative to the waypoint, knots NMEA_HEEL, ///< boat heel angle, -180 to 180 degrees to starboard NMEA_PITCH, ///< boat pitch angle, -180 to 180 degrees bow up NMEA_HDG, ///< magnetic heading, 0 to 360 degrees magnetic NMEA_HDG_SIN, ///< sine of magnetic heading NMEA_HDG_COS, ///< cosine of magnetic heading NMEA_HDT, ///< true heading, 0 to 360 degrees true NMEA_HDT_SIN, ///< sine of true heading NMEA_HDT_COS, ///< cosine of true heading NMEA_VTW, ///< Boat speed through the water in knots NMEA_LOG, ///< Distance logged through the water in nautical miles NMEA_LOGR, ///< Distance logged through the water in nautical miles since ///< reset NMEA_DEPTH, ///< depth of water below the surface in metres NMEA_RPM_M1, ///< rpm of motor 1 NMEA_TEMPERATURE_M1, ///< temperature of motor 1 in C NMEA_PRESSURE_M1, ///< pressure of motor 1 in kPa NMEA_VOLTAGE_M1, ///< voltage of motor 1 in Volts NMEA_CURRENT_M1, ///< current of motor 1 in Amps NMEA_RPM_M2, ///< rpm of motor 2 NMEA_TEMPERATURE_M2, ///< temperature of motor 2 in C NMEA_PRESSURE_M2, ///< pressure of motor 2 in kPa NMEA_VOLTAGE_M2, ///< voltage of motor 2 in Volts NMEA_CURRENT_M2, ///< current of motor 2 in Amps NMEA_TEMPERATURE_AIR, ///< outside temperature in C NMEA_TEMPERATURE_WATER, ///< sea water temperature in C NMEA_HUMIDITY, ///< outside relative humidity in % NMEA_BAROMETER, ///< barometric pressure in Pa absolute -- not altitude ///< corrected NMEA_USR_00, ///< spaces for a user sketch to inject its own data NMEA_USR_01, ///< spaces for a user sketch to inject its own data NMEA_USR_02, ///< spaces for a user sketch to inject its own data NMEA_USR_03, NMEA_USR_04, NMEA_USR_05, NMEA_USR_06, NMEA_USR_07, NMEA_USR_08, NMEA_USR_09, NMEA_USR_10, NMEA_USR_11, NMEA_USR_12, NMEA_MAX_INDEX ///< the largest number in the enum type -- not for data, ///< but does define size of data value array required. } nmea_index_t; ///< Indices for data values expected to change often with time #endif // _NMEA_DATA_H
fd8db318b85fa0727b6cb87960281d59f93a0456
0b1f18c37bfbf6901749916a5935c49b1afe17e3
/core/lib/experimental/gtk/win/include/glib-2.0/gio/gmenu.h
f1ff261952018a5a4da529643ea4574e4f8c2e7a
[ "OpenSSL", "Zlib", "BSD-3-Clause" ]
permissive
objeck/objeck-lang
2e97ff6c070492e53d4a5f1bec88e07dda4b4296
627482005da67618fd46133d18ade2d66e515284
refs/heads/master
2023-08-24T05:38:15.489677
2023-08-22T20:06:43
2023-08-22T20:06:43
20,608,381
240
33
NOASSERTION
2023-09-06T20:13:02
2014-06-08T03:25:12
C
UTF-8
C
false
false
8,989
h
gmenu.h
/* * Copyright © 2011 Canonical Ltd. * * SPDX-License-Identifier: LGPL-2.1-or-later * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. * * Author: Ryan Lortie <desrt@desrt.ca> */ #ifndef __G_MENU_H__ #define __G_MENU_H__ #include <gio/gmenumodel.h> G_BEGIN_DECLS #define G_TYPE_MENU (g_menu_get_type ()) #define G_MENU(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_MENU, GMenu)) #define G_IS_MENU(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ G_TYPE_MENU)) #define G_TYPE_MENU_ITEM (g_menu_item_get_type ()) #define G_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ G_TYPE_MENU_ITEM, GMenuItem)) #define G_IS_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ G_TYPE_MENU_ITEM)) typedef struct _GMenuItem GMenuItem; typedef struct _GMenu GMenu; GLIB_AVAILABLE_IN_2_32 GType g_menu_get_type (void) G_GNUC_CONST; GLIB_AVAILABLE_IN_2_32 GMenu * g_menu_new (void); GLIB_AVAILABLE_IN_2_32 void g_menu_freeze (GMenu *menu); GLIB_AVAILABLE_IN_2_32 void g_menu_insert_item (GMenu *menu, gint position, GMenuItem *item); GLIB_AVAILABLE_IN_2_32 void g_menu_prepend_item (GMenu *menu, GMenuItem *item); GLIB_AVAILABLE_IN_2_32 void g_menu_append_item (GMenu *menu, GMenuItem *item); GLIB_AVAILABLE_IN_2_32 void g_menu_remove (GMenu *menu, gint position); GLIB_AVAILABLE_IN_2_38 void g_menu_remove_all (GMenu *menu); GLIB_AVAILABLE_IN_2_32 void g_menu_insert (GMenu *menu, gint position, const gchar *label, const gchar *detailed_action); GLIB_AVAILABLE_IN_2_32 void g_menu_prepend (GMenu *menu, const gchar *label, const gchar *detailed_action); GLIB_AVAILABLE_IN_2_32 void g_menu_append (GMenu *menu, const gchar *label, const gchar *detailed_action); GLIB_AVAILABLE_IN_2_32 void g_menu_insert_section (GMenu *menu, gint position, const gchar *label, GMenuModel *section); GLIB_AVAILABLE_IN_2_32 void g_menu_prepend_section (GMenu *menu, const gchar *label, GMenuModel *section); GLIB_AVAILABLE_IN_2_32 void g_menu_append_section (GMenu *menu, const gchar *label, GMenuModel *section); GLIB_AVAILABLE_IN_2_32 void g_menu_insert_submenu (GMenu *menu, gint position, const gchar *label, GMenuModel *submenu); GLIB_AVAILABLE_IN_2_32 void g_menu_prepend_submenu (GMenu *menu, const gchar *label, GMenuModel *submenu); GLIB_AVAILABLE_IN_2_32 void g_menu_append_submenu (GMenu *menu, const gchar *label, GMenuModel *submenu); GLIB_AVAILABLE_IN_2_32 GType g_menu_item_get_type (void) G_GNUC_CONST; GLIB_AVAILABLE_IN_2_32 GMenuItem * g_menu_item_new (const gchar *label, const gchar *detailed_action); GLIB_AVAILABLE_IN_2_34 GMenuItem * g_menu_item_new_from_model (GMenuModel *model, gint item_index); GLIB_AVAILABLE_IN_2_32 GMenuItem * g_menu_item_new_submenu (const gchar *label, GMenuModel *submenu); GLIB_AVAILABLE_IN_2_32 GMenuItem * g_menu_item_new_section (const gchar *label, GMenuModel *section); GLIB_AVAILABLE_IN_2_34 GVariant * g_menu_item_get_attribute_value (GMenuItem *menu_item, const gchar *attribute, const GVariantType *expected_type); GLIB_AVAILABLE_IN_2_34 gboolean g_menu_item_get_attribute (GMenuItem *menu_item, const gchar *attribute, const gchar *format_string, ...); GLIB_AVAILABLE_IN_2_34 GMenuModel *g_menu_item_get_link (GMenuItem *menu_item, const gchar *link); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_attribute_value (GMenuItem *menu_item, const gchar *attribute, GVariant *value); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_attribute (GMenuItem *menu_item, const gchar *attribute, const gchar *format_string, ...); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_link (GMenuItem *menu_item, const gchar *link, GMenuModel *model); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_label (GMenuItem *menu_item, const gchar *label); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_submenu (GMenuItem *menu_item, GMenuModel *submenu); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_section (GMenuItem *menu_item, GMenuModel *section); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_action_and_target_value (GMenuItem *menu_item, const gchar *action, GVariant *target_value); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_action_and_target (GMenuItem *menu_item, const gchar *action, const gchar *format_string, ...); GLIB_AVAILABLE_IN_2_32 void g_menu_item_set_detailed_action (GMenuItem *menu_item, const gchar *detailed_action); GLIB_AVAILABLE_IN_2_38 void g_menu_item_set_icon (GMenuItem *menu_item, GIcon *icon); G_END_DECLS #endif /* __G_MENU_H__ */
17976e626d21f0422723b91787e8dc1b96278051
28d0f8c01599f8f6c711bdde0b59f9c2cd221203
/sys/sys/bufq.h
b0086ba788daf0a763045bc5459adacf95451904
[ "BSD-2-Clause" ]
permissive
NetBSD/src
1a9cbc22ed778be638b37869ed4fb5c8dd616166
23ee83f7c0aea0777bd89d8ebd7f0cde9880d13c
refs/heads/trunk
2023-08-31T13:24:58.105962
2023-08-27T15:50:47
2023-08-27T15:50:47
88,439,547
656
348
null
2023-07-20T20:07:24
2017-04-16T20:03:43
null
UTF-8
C
false
false
4,799
h
bufq.h
/* $NetBSD: bufq.h,v 1.11 2016/11/16 00:46:46 pgoyette Exp $ */ /* NetBSD: buf.h,v 1.75 2004/09/18 16:40:11 yamt Exp */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)buf.h 8.9 (Berkeley) 3/30/95 */ #if !defined(_KERNEL) #error not supposed to be exposed to userland. #endif struct buf; struct bufq_state; /* * Special strategies for bufq_alloc. */ #define BUFQ_STRAT_ANY NULL /* let bufq_alloc select one. */ #define BUFQ_DISK_DEFAULT_STRAT BUFQ_STRAT_ANY /* default for disks. */ /* * Flags for bufq_alloc. */ #define BUFQ_SORT_RAWBLOCK 0x0001 /* Sort by b_rawblkno */ #define BUFQ_SORT_CYLINDER 0x0002 /* Sort by b_cylinder, b_rawblkno */ #define BUFQ_SORT_MASK 0x000f #define BUFQ_EXACT 0x0010 /* Don't fall back to other strategy */ void bufq_init(void); int bufq_alloc(struct bufq_state **, const char *, int); void bufq_drain(struct bufq_state *); void bufq_free(struct bufq_state *); /* Put buffer in queue */ void bufq_put(struct bufq_state *, struct buf *); /* Get and remove buffer from queue */ struct buf *bufq_get(struct bufq_state *); /* Get buffer from queue */ struct buf *bufq_peek(struct bufq_state *); /* Remove specified buffer from queue */ struct buf *bufq_cancel(struct bufq_state *, struct buf *); const char *bufq_getstrategyname(struct bufq_state *); void bufq_move(struct bufq_state *, struct bufq_state *);
2eca1b1ed38304ba0ed6115b5ab159f2260b115c
e65a4dbfbfb0e54e59787ba7741efee12f7687f3
/audio/funktrackergold/files/patch-dsp_mixxer.c
34d646bb433f4cbf8c86679ee128b54759ca057f
[ "BSD-2-Clause" ]
permissive
freebsd/freebsd-ports
86f2e89d43913412c4f6b2be3e255bc0945eac12
605a2983f245ac63f5420e023e7dce56898ad801
refs/heads/main
2023-08-30T21:46:28.720924
2023-08-30T19:33:44
2023-08-30T19:33:44
1,803,961
916
918
NOASSERTION
2023-09-08T04:06:26
2011-05-26T11:15:35
null
UTF-8
C
false
false
1,395
c
patch-dsp_mixxer.c
--- dsp_mixxer.c.orig Mon Jun 22 12:39:39 1998 +++ dsp_mixxer.c Sat Jul 14 21:55:28 2007 @@ -15,15 +15,11 @@ ***************************************************************************/ #include <stdio.h> #include <math.h> -#include <malloc.h> +#include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> -#ifdef Linux - #include <sys/soundcard.h> -#elif FreeBSD - #include <machine/soundcard.h> -#endif +#include <sys/soundcard.h> #include "funktracker_defs.h" #include "funktracker.h" #include "funkload.h" @@ -301,12 +297,12 @@ for(sample_no = 0;sample_no < mix_buffer_size;sample_no++) { - if(chmix[chan_no].funkctrl & 0x2) + if(chmix[chan_no].funkctrl & 0x2) { #pragma pack(1) sam = *((sDB *)chmix[chan_no].sample_addr + (unsigned long)chmix[chan_no].sample_ptr); #pragma pack() - else + } else sam = 0; #ifdef DIGITAL_ECHOING @@ -363,12 +359,12 @@ shift_t = 8 + shift_table[funk_info.no_active_channels]; for(sample_no = 0;sample_no < mix_buffer_size;sample_no++) { - if(chmix[chan_no].funkctrl & 0x2) + if(chmix[chan_no].funkctrl & 0x2) { #pragma pack(1) sam = *((sDW *)chmix[chan_no].sample_addr + (unsigned long)chmix[chan_no].sample_ptr); #pragma pack() - else + } else sam = 0; #ifdef DIGITAL_ECHOING sam_reverb = *(chmix[chan_no].echo_buffer +
55a88bfecaaaf848c06e9bcbe93e0af469a41019
052a5faae25238e6011a4b5647d81db58bbf6ca4
/src/DlibDotNet.Native.Dnn/dlib/dnn/loss/multiclass_log_per_pixel/template.cpp
0c8a532085e079feabf09b8b8d765f4e5870e9d7
[ "Zlib", "Libpng", "BSL-1.0", "MIT" ]
permissive
takuya-takeuchi/DlibDotNet
6ec9033134db63fd00cc630654854066052a279f
19c1a91a7743eca966da5633e327875372e5ebe4
refs/heads/master
2023-08-03T14:18:43.762867
2022-07-25T02:15:47
2022-07-25T02:15:47
103,758,303
449
133
MIT
2023-07-16T05:41:46
2017-09-16T14:29:36
C#
UTF-8
C
false
false
21
cpp
template.cpp
#include "template.h"
9162b0227eef1b724eb2ec24b66826da302fe985
8301e9607481f19635c9ab5bfa0b879c5d6234f8
/libogc/gx.c
86c79ce25fa6dc42131c2bd95a6c578be6f809ef
[ "Zlib" ]
permissive
devkitPro/libogc
ba6af8f0e848cccb3054662edb98127c9616144a
0a35583f638c3705be220ae5b65bd7ec20db234d
refs/heads/master
2023-06-23T08:05:17.433798
2023-06-16T15:47:02
2023-06-16T15:47:02
28,180,403
249
163
NOASSERTION
2023-06-16T15:47:03
2014-12-18T11:13:41
C
UTF-8
C
false
false
131,733
c
gx.c
#include <stdlib.h> #include <string.h> #include <errno.h> #include <math.h> #include "asm.h" #include "processor.h" #include "irq.h" #include "lwp.h" #include "system.h" #include "video.h" #include "video_types.h" #include "lwp_watchdog.h" #include "gx.h" #include "gx_regdef.h" //#define _GP_DEBUG #define TEXCACHE_TESTING #define GX_FINISH 2 #if defined(HW_DOL) #define LARGE_NUMBER (-1048576.0f) #elif defined(HW_RVL) #define LARGE_NUMBER (-1.0e+18f) #endif #define GX_LOAD_BP_REG(x) \ do { \ wgPipe->U8 = 0x61; \ asm volatile ("" ::: "memory" ); \ wgPipe->U32 = (u32)(x); \ asm volatile ("" ::: "memory" ); \ } while(0) #define GX_LOAD_CP_REG(x, y) \ do { \ wgPipe->U8 = 0x08; \ asm volatile ("" ::: "memory" ); \ wgPipe->U8 = (u8)(x); \ asm volatile ("" ::: "memory" ); \ wgPipe->U32 = (u32)(y); \ asm volatile ("" ::: "memory" ); \ } while(0) #define GX_LOAD_XF_REG(x, y) \ do { \ wgPipe->U8 = 0x10; \ asm volatile ("" ::: "memory" ); \ wgPipe->U32 = (u32)((x)&0xffff); \ asm volatile ("" ::: "memory" ); \ wgPipe->U32 = (u32)(y); \ asm volatile ("" ::: "memory" ); \ } while(0) #define GX_LOAD_XF_REGS(x, n) \ do { \ wgPipe->U8 = 0x10; \ asm volatile ("" ::: "memory" ); \ wgPipe->U32 = (u32)(((((n)&0xffff)-1)<<16)|((x)&0xffff)); \ asm volatile ("" ::: "memory" ); \ } while(0) #define XY(x, y) (((y) << 10) | (x)) #define GX_DEFAULT_BG {64,64,64,255} #define BLACK {0,0,0,0} #define WHITE {255,255,255,255} WGPipe* const wgPipe = (WGPipe*)0xCC008000; static GXFifoObj _gpfifo; static GXFifoObj _cpufifo; static GXFifoObj _gxfifoobj; static GXFifoObj _gx_dl_fifoobj; static GXFifoObj _gx_old_cpufifo; static void *_gxcurrbp = NULL; static lwp_t _gxcurrentlwp = LWP_THREAD_NULL; static u32 _gxcpufifoready = 0; static u32 _gxgpfifoready = 0; static u32 _cpgplinked = 0; static u16 _gxgpstatus = 0; static vu32 _gxoverflowsuspend = 0; static vu32 _gxoverflowcount = 0; static vu32 _gxfinished = 0; static lwpq_t _gxwaitfinish; static GXBreakPtCallback breakPtCB = NULL; static GXDrawDoneCallback drawDoneCB = NULL; static GXDrawSyncCallback tokenCB = NULL; static GXTexRegionCallback regionCB = NULL; static GXTlutRegionCallback tlut_regionCB = NULL; static vu32* const _piReg = (u32*)0xCC003000; static vu16* const _cpReg = (u16*)0xCC000000; static vu16* const _peReg = (u16*)0xCC001000; static const u8 _gxtevcolid[9] = {0,1,0,1,0,1,7,5,6}; static const u8 _gxtexmode0ids[8] = {0x80,0x81,0x82,0x83,0xA0,0xA1,0xA2,0xA3}; static const u8 _gxtexmode1ids[8] = {0x84,0x85,0x86,0x87,0xA4,0xA5,0xA6,0xA7}; static const u8 _gxteximg0ids[8] = {0x88,0x89,0x8A,0x8B,0xA8,0xA9,0xAA,0xAB}; static const u8 _gxteximg1ids[8] = {0x8C,0x8D,0x8E,0x8F,0xAC,0xAD,0xAE,0xAF}; static const u8 _gxteximg2ids[8] = {0x90,0x91,0x92,0x93,0xB0,0xB1,0xB2,0xB3}; static const u8 _gxteximg3ids[8] = {0x94,0x95,0x96,0x97,0xB4,0xB5,0xB6,0xB7}; static const u8 _gxtextlutids[8] = {0x98,0x99,0x9A,0x9B,0xB8,0xB9,0xBA,0xBB}; #if defined(HW_RVL) static vu16* const _memReg = (u16*)0xCC004000; static const u32 _gxtexregionaddrtable[48] = { 0x00000000,0x00010000,0x00020000,0x00030000, 0x00040000,0x00050000,0x00060000,0x00070000, 0x00008000,0x00018000,0x00028000,0x00038000, 0x00048000,0x00058000,0x00068000,0x00078000, 0x00000000,0x00090000,0x00020000,0x000B0000, 0x00040000,0x00098000,0x00060000,0x000B8000, 0x00080000,0x00010000,0x000A0000,0x00030000, 0x00088000,0x00050000,0x000A8000,0x00070000, 0x00000000,0x00090000,0x00020000,0x000B0000, 0x00040000,0x00090000,0x00060000,0x000B0000, 0x00080000,0x00010000,0x000A0000,0x00030000, 0x00080000,0x00050000,0x000A0000,0x00070000 }; #endif extern u8 __gxregs[]; static struct __gx_regdef *__gx = (struct __gx_regdef*)__gxregs; static u8 _gx_saved_data[STRUCT_REGDEF_SIZE] ATTRIBUTE_ALIGN(32); static s32 __gx_onreset(s32 final); static sys_resetinfo __gx_resetinfo = { {}, __gx_onreset, 127 }; #ifdef _GP_DEBUG extern int printk(const char *fmt,...); #endif static __inline__ BOOL IsWriteGatherBufferEmpty(void) { return !(mfwpar()&1); } static __inline__ void DisableWriteGatherPipe(void) { mthid2((mfhid2()&~0x40000000)); } static __inline__ void EnableWriteGatherPipe(void) { mtwpar(0x0C008000); mthid2((mfhid2()|0x40000000)); } static __inline__ void __GX_ResetWriteGatherPipe(void) { while(mfwpar()&1); mtwpar(0x0C008000); } static __inline__ void __GX_FifoLink(u8 enable) { __gx->cpCRreg = ((__gx->cpCRreg&~0x10)|(_SHIFTL(enable,4,1))); _cpReg[1] = __gx->cpCRreg; } static __inline__ void __GX_WriteFifoIntReset(u8 inthi,u8 intlo) { __gx->cpCLreg = ((__gx->cpCLreg&~0x03)|(_SHIFTL(intlo,1,1))|(inthi&1)); _cpReg[2] = __gx->cpCLreg; } static __inline__ void __GX_WriteFifoIntEnable(u8 inthi, u8 intlo) { __gx->cpCRreg = ((__gx->cpCRreg&~0x0C)|(_SHIFTL(intlo,3,1))|(_SHIFTL(inthi,2,1))); _cpReg[1] = __gx->cpCRreg; } static __inline__ void __GX_FifoReadEnable(void) { __gx->cpCRreg = ((__gx->cpCRreg&~0x01)|1); _cpReg[1] = __gx->cpCRreg; } static __inline__ void __GX_FifoReadDisable(void) { __gx->cpCRreg = ((__gx->cpCRreg&~0x01)|0); _cpReg[1] = __gx->cpCRreg; } static s32 __gx_onreset(s32 final) { if(final==FALSE) { GX_Flush(); GX_AbortFrame(); } return 1; } #if 0 static u32 __GX_IsGPCPUFifoLinked(void) { return _cpgplinked; } static u32 __GX_IsCPUFifoReady(void) { return _gxcpufifoready; } #endif static u32 __GX_IsGPFifoReady(void) { return _gxgpfifoready; } static u32 __GX_CPGPLinkCheck(void) { struct __gxfifo *gpfifo = (struct __gxfifo*)&_gpfifo; struct __gxfifo *cpufifo = (struct __gxfifo*)&_cpufifo; if(!_gxcpufifoready || !_gxgpfifoready) return 0; if((cpufifo->buf_start==gpfifo->buf_start)&&(cpufifo->buf_end==gpfifo->buf_end)) return 1; return 0; } static void __GX_InitRevBits(void) { s32 i; i=0; while(i<8) { __gx->VAT0reg[i] = 0x40000000; __gx->VAT1reg[i] = 0x80000000; GX_LOAD_CP_REG((0x0080|i),__gx->VAT1reg[i]); i++; } GX_LOAD_XF_REG(0x1000,0x3f); GX_LOAD_XF_REG(0x1012,0x01); GX_LOAD_BP_REG(0x5800000f); } static void __GX_WaitAbort(u32 delay) { u64 start,end; start = gettime(); while(1) { end = gettime(); if(diff_ticks(start,end)>=(u64)delay) break; }; } #ifdef HW_RVL static u32 __GX_ReadMemCounterU32(u32 reg) { u16 lcnt,ucnt,tmp; tmp = _memReg[reg]; do { ucnt = tmp; lcnt = _memReg[reg+1]; tmp = _memReg[reg]; } while(tmp!=ucnt); return (u32)((ucnt<<16)|lcnt); } static void __GX_WaitAbortPixelEngine(void) { u32 cnt,tmp; cnt = __GX_ReadMemCounterU32(39); do { tmp = cnt; __GX_WaitAbort(8); cnt = __GX_ReadMemCounterU32(39); } while(cnt!=tmp); } static void __GX_Abort(void) { if(__gx->gxFifoInited && __GX_IsGPFifoReady()) __GX_WaitAbortPixelEngine(); _piReg[6] = 1; __GX_WaitAbort(50); _piReg[6] = 0; __GX_WaitAbort(5); } #endif static void __GX_SaveFifo(void) { s32 rdwt_dst; u32 level,val; struct __gxfifo *cpufifo = (struct __gxfifo*)&_cpufifo; struct __gxfifo *gpfifo = (struct __gxfifo*)&_gpfifo; _CPU_ISR_Disable(level); if(_gxcpufifoready) { val = _piReg[0x05]; cpufifo->wt_ptr = (u32)MEM_PHYSICAL_TO_K0((val&0x1FFFFFE0)); cpufifo->fifo_wrap = ((val&0x20000000)==0x20000000); } if(_gxgpfifoready) { gpfifo->rd_ptr = (u32)MEM_PHYSICAL_TO_K0(_SHIFTL(_cpReg[29],16,16)|(_cpReg[28]&0xffff)); gpfifo->rdwt_dst = (_SHIFTL(_cpReg[25],16,16)|(_cpReg[24]&0xffff)); } if(_cpgplinked) { cpufifo->rd_ptr = gpfifo->rd_ptr; cpufifo->rdwt_dst = gpfifo->rdwt_dst; gpfifo->wt_ptr = cpufifo->wt_ptr; } else if(_gxcpufifoready) { rdwt_dst = (cpufifo->wt_ptr - cpufifo->rd_ptr); if(rdwt_dst<0) cpufifo->rdwt_dst = (cpufifo->rdwt_dst + cpufifo->size); else cpufifo->rdwt_dst = rdwt_dst; } _CPU_ISR_Restore(level); } static void __GX_CleanGPFifo(void) { u32 level; struct __gxfifo *gpfifo = (struct __gxfifo*)&_gpfifo; struct __gxfifo *cpufifo = (struct __gxfifo*)&_cpufifo; if(!_gxgpfifoready) return; _CPU_ISR_Disable(level); __GX_FifoReadDisable(); __GX_WriteFifoIntEnable(FALSE,FALSE); gpfifo->rd_ptr = gpfifo->wt_ptr; gpfifo->rdwt_dst = 0; /* setup rd<->wd dist */ _cpReg[24] = _SHIFTL(gpfifo->rdwt_dst,0,16); _cpReg[25] = _SHIFTR(gpfifo->rdwt_dst,16,16); /* setup wt ptr */ _cpReg[26] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->wt_ptr),0,16); _cpReg[27] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->wt_ptr),16,16); /* setup rd ptr */ _cpReg[28] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->rd_ptr),0,16); _cpReg[29] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->rd_ptr),16,16); ppcsync(); if(_cpgplinked) { cpufifo->rd_ptr = gpfifo->rd_ptr; cpufifo->wt_ptr = gpfifo->wt_ptr; cpufifo->rdwt_dst = gpfifo->rdwt_dst; _piReg[5] = (cpufifo->wt_ptr&0x1FFFFFE0); __GX_WriteFifoIntEnable(TRUE,FALSE); __GX_FifoLink(TRUE); } __gx->cpCRreg &= ~0x22; _cpReg[1] = __gx->cpCRreg; breakPtCB = NULL; __GX_WriteFifoIntReset(TRUE,TRUE); __GX_FifoReadEnable(); _CPU_ISR_Restore(level); } static void __GXOverflowHandler(void) { if(!_gxoverflowsuspend) { _gxoverflowsuspend = 1; _gxoverflowcount++; __GX_WriteFifoIntEnable(GX_DISABLE,GX_ENABLE); __GX_WriteFifoIntReset(GX_TRUE,GX_FALSE); LWP_SuspendThread(_gxcurrentlwp); } } static void __GXUnderflowHandler(void) { if(_gxoverflowsuspend) { _gxoverflowsuspend = 0; LWP_ResumeThread(_gxcurrentlwp); __GX_WriteFifoIntReset(GX_TRUE,GX_TRUE); __GX_WriteFifoIntEnable(GX_ENABLE,GX_DISABLE); } } static void __GXCPInterruptHandler(u32 irq,void *ctx) { __gx->cpSRreg = _cpReg[0]; if((__gx->cpCRreg&0x08) && (__gx->cpSRreg&0x02)) __GXUnderflowHandler(); if((__gx->cpCRreg&0x04) && (__gx->cpSRreg&0x01)) __GXOverflowHandler(); if((__gx->cpCRreg&0x20) && (__gx->cpSRreg&0x10)) { __gx->cpCRreg &= ~0x20; _cpReg[1] = __gx->cpCRreg; if(breakPtCB) breakPtCB(); } } static void __GXTokenInterruptHandler(u32 irq,void *ctx) { u16 token = _peReg[7]; if(tokenCB) tokenCB(token); _peReg[5] = (_peReg[5]&~0x04)|0x04; } static void __GXFinishInterruptHandler(u32 irq,void *ctx) { #ifdef _GP_DEBUG printf("__GXFinishInterruptHandler()\n"); #endif _peReg[5] = (_peReg[5]&~0x08)|0x08; _gxfinished = 1; if(drawDoneCB) drawDoneCB(); LWP_ThreadBroadcast(_gxwaitfinish); } static void __GX_PEInit(void) { IRQ_Request(IRQ_PI_PETOKEN,__GXTokenInterruptHandler,NULL); __UnmaskIrq(IRQMASK(IRQ_PI_PETOKEN)); IRQ_Request(IRQ_PI_PEFINISH,__GXFinishInterruptHandler,NULL); __UnmaskIrq(IRQMASK(IRQ_PI_PEFINISH)); _peReg[5] = 0x0F; } static void __GX_FifoInit(void) { IRQ_Request(IRQ_PI_CP,__GXCPInterruptHandler,NULL); __UnmaskIrq(IRQMASK(IRQ_PI_CP)); memset(&_cpufifo,0,sizeof(GXFifoObj)); memset(&_gpfifo,0,sizeof(GXFifoObj)); _gxcpufifoready = 0; _gxgpfifoready = 0; _cpgplinked = 0; _gxoverflowsuspend = 0; _gxcurrentlwp = LWP_GetSelf(); } static void __GX_SetTmemConfig(u8 nr) { if(nr==0) { // Set_TextureImage0-3, GXTexMapID=0-3 tmem_offset=00000000, cache_width=32 kb, cache_height=32 kb, image_type=cached GX_LOAD_BP_REG(0x8c0d8000); GX_LOAD_BP_REG(0x900dc000); GX_LOAD_BP_REG(0x8d0d8400); GX_LOAD_BP_REG(0x910dc400); GX_LOAD_BP_REG(0x8e0d8800); GX_LOAD_BP_REG(0x920dc800); GX_LOAD_BP_REG(0x8f0d8c00); GX_LOAD_BP_REG(0x930dcc00); // Set_TextureImage0-3, GXTexMapID=4-7 tmem_offset=00010000, cache_width=32 kb, cache_height=32 kb, image_type=cached GX_LOAD_BP_REG(0xac0d9000); GX_LOAD_BP_REG(0xb00dd000); GX_LOAD_BP_REG(0xad0d9400); GX_LOAD_BP_REG(0xb10dd400); GX_LOAD_BP_REG(0xae0d9800); GX_LOAD_BP_REG(0xb20dd800); GX_LOAD_BP_REG(0xaf0d9c00); GX_LOAD_BP_REG(0xb30ddc00); return; } if(nr==1) { // Set_TextureImage0-3, GXTexMapID=0-3 tmem_offset=00000000, cache_width=32 kb, cache_height=32 kb, image_type=cached GX_LOAD_BP_REG(0x8c0d8000); GX_LOAD_BP_REG(0x900dc000); GX_LOAD_BP_REG(0x8d0d8800); GX_LOAD_BP_REG(0x910dc800); GX_LOAD_BP_REG(0x8e0d9000); GX_LOAD_BP_REG(0x920dd000); GX_LOAD_BP_REG(0x8f0d9800); GX_LOAD_BP_REG(0x930dd800); // Set_TextureImage0-3, GXTexMapID=4-7 tmem_offset=00010000, cache_width=32 kb, cache_height=32 kb, image_type=cached GX_LOAD_BP_REG(0xac0da000); GX_LOAD_BP_REG(0xb00de000); GX_LOAD_BP_REG(0xad0da800); GX_LOAD_BP_REG(0xb10de800); GX_LOAD_BP_REG(0xae0db000); GX_LOAD_BP_REG(0xb20df000); GX_LOAD_BP_REG(0xaf0db800); GX_LOAD_BP_REG(0xb30df800); return; } if(nr==2) { // Set_TextureImage0-3, GXTexMapID=0-3 tmem_offset=00000000, cache_width=32 kb, cache_height=32 kb, image_type=cached GX_LOAD_BP_REG(0x8c0d8000); GX_LOAD_BP_REG(0x900dc000); GX_LOAD_BP_REG(0x8d0d8800); GX_LOAD_BP_REG(0x910dc800); GX_LOAD_BP_REG(0x8e0d9000); GX_LOAD_BP_REG(0x920dd000); GX_LOAD_BP_REG(0x8f0d9800); GX_LOAD_BP_REG(0x930dd800); // Set_TextureImage0-3, GXTexMapID=4-7 tmem_offset=00010000, cache_width=32 kb, cache_height=32 kb, image_type=cached GX_LOAD_BP_REG(0xac0da000); GX_LOAD_BP_REG(0xb00dc400); GX_LOAD_BP_REG(0xad0da800); GX_LOAD_BP_REG(0xb10dcc00); GX_LOAD_BP_REG(0xae0db000); GX_LOAD_BP_REG(0xb20dd400); GX_LOAD_BP_REG(0xaf0db800); GX_LOAD_BP_REG(0xb30ddc00); return; } } #if defined(HW_RVL) static GXTexRegion* __GXDefTexRegionCallback(GXTexObj *obj,u8 mapid) { u32 fmt,mipmap; GXTexRegion *ret = NULL; fmt = GX_GetTexObjFmt(obj); mipmap = GX_GetTexObjMipMap(obj); if(fmt>=GX_TF_CI4 && fmt<=GX_TF_CI14) return &__gx->texRegion[mapid]; else if(fmt==GX_TF_CMPR) ret = &__gx->texRegion[mapid]; else ret = &__gx->texRegion[mapid+8]; if(mipmap) ret = &__gx->texRegion[mapid+16]; return ret; } #else static GXTexRegion* __GXDefTexRegionCallback(GXTexObj *obj,u8 mapid) { u32 fmt; u32 idx; static u32 regionA = 0; static u32 regionB = 0; GXTexRegion *ret = NULL; fmt = GX_GetTexObjFmt(obj); if(fmt==0x0008 || fmt==0x0009 || fmt==0x000a) { idx = regionB++; ret = &__gx->texRegion[(idx&3)+8]; } else { idx = regionA++; ret = &__gx->texRegion[(idx&7)]; } return ret; } #endif static GXTlutRegion* __GXDefTlutRegionCallback(u32 tlut_name) { return &__gx->tlutRegion[tlut_name]; } static void __GX_InitGX(void) { s32 i; u32 flag; GXRModeObj *rmode; Mtx identity_matrix = { {1,0,0,0}, {0,1,0,0}, {0,0,1,0} }; rmode = VIDEO_GetPreferredMode(NULL); GX_SetCopyClear((GXColor)BLACK,0xffffff); GX_SetTexCoordGen(GX_TEXCOORD0,GX_TG_MTX2x4,GX_TG_TEX0,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD1,GX_TG_MTX2x4,GX_TG_TEX1,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD2,GX_TG_MTX2x4,GX_TG_TEX2,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD3,GX_TG_MTX2x4,GX_TG_TEX3,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD4,GX_TG_MTX2x4,GX_TG_TEX4,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD5,GX_TG_MTX2x4,GX_TG_TEX5,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD6,GX_TG_MTX2x4,GX_TG_TEX6,GX_IDENTITY); GX_SetTexCoordGen(GX_TEXCOORD7,GX_TG_MTX2x4,GX_TG_TEX7,GX_IDENTITY); GX_SetNumTexGens(1); GX_ClearVtxDesc(); GX_InvVtxCache(); GX_SetLineWidth(6,GX_TO_ZERO); GX_SetPointSize(6,GX_TO_ZERO); GX_EnableTexOffsets(GX_TEXCOORD0,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD1,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD2,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD3,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD4,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD5,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD6,GX_DISABLE,GX_DISABLE); GX_EnableTexOffsets(GX_TEXCOORD7,GX_DISABLE,GX_DISABLE); GX_LoadPosMtxImm(identity_matrix,GX_PNMTX0); GX_LoadNrmMtxImm(identity_matrix,GX_PNMTX0); GX_SetCurrentMtx(GX_PNMTX0); GX_LoadTexMtxImm(identity_matrix,GX_IDENTITY,GX_MTX3x4); GX_LoadTexMtxImm(identity_matrix,GX_DTTIDENTITY,GX_MTX3x4); GX_SetViewport(0,0,rmode->fbWidth,rmode->efbHeight,0,1); GX_SetCoPlanar(GX_DISABLE); GX_SetCullMode(GX_CULL_BACK); GX_SetClipMode(GX_CLIP_ENABLE); GX_SetScissor(0,0,rmode->fbWidth,rmode->efbHeight); GX_SetScissorBoxOffset(0,0); GX_SetNumChans(0); GX_SetChanCtrl(GX_COLOR0A0,GX_DISABLE,GX_SRC_REG,GX_SRC_VTX,GX_LIGHTNULL,GX_DF_NONE,GX_AF_NONE); GX_SetChanAmbColor(GX_COLOR0A0,(GXColor)BLACK); GX_SetChanMatColor(GX_COLOR0A0,(GXColor)WHITE); GX_SetChanCtrl(GX_COLOR1A1,GX_DISABLE,GX_SRC_REG,GX_SRC_VTX,GX_LIGHTNULL,GX_DF_NONE,GX_AF_NONE); GX_SetChanAmbColor(GX_COLOR1A1,(GXColor)BLACK); GX_SetChanMatColor(GX_COLOR1A1,(GXColor)WHITE); GX_InvalidateTexAll(); GX_SetTexRegionCallback(__GXDefTexRegionCallback); GX_SetTlutRegionCallback(__GXDefTlutRegionCallback); GX_SetTevOrder(GX_TEVSTAGE0,GX_TEXCOORD0,GX_TEXMAP0,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE1,GX_TEXCOORD1,GX_TEXMAP1,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE2,GX_TEXCOORD2,GX_TEXMAP2,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE3,GX_TEXCOORD3,GX_TEXMAP3,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE4,GX_TEXCOORD4,GX_TEXMAP4,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE5,GX_TEXCOORD5,GX_TEXMAP5,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE6,GX_TEXCOORD6,GX_TEXMAP6,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE7,GX_TEXCOORD7,GX_TEXMAP7,GX_COLOR0A0); GX_SetTevOrder(GX_TEVSTAGE8,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE9,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE10,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE11,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE12,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE13,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE14,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetTevOrder(GX_TEVSTAGE15,GX_TEXCOORDNULL,GX_TEXMAP_NULL,GX_COLORNULL); GX_SetNumTevStages(1); GX_SetTevOp(GX_TEVSTAGE0,GX_REPLACE); GX_SetAlphaCompare(GX_ALWAYS,0,GX_AOP_AND,GX_ALWAYS,0); GX_SetZTexture(GX_ZT_DISABLE,GX_TF_Z8,0); for(i=0;i<GX_MAX_TEVSTAGE;i++) { GX_SetTevKColorSel(i,GX_TEV_KCSEL_1_4); GX_SetTevKAlphaSel(i,GX_TEV_KASEL_1); GX_SetTevSwapMode(i,GX_TEV_SWAP0,GX_TEV_SWAP0); } GX_SetTevSwapModeTable(GX_TEV_SWAP0,GX_CH_RED,GX_CH_GREEN,GX_CH_BLUE,GX_CH_ALPHA); GX_SetTevSwapModeTable(GX_TEV_SWAP1,GX_CH_RED,GX_CH_RED,GX_CH_RED,GX_CH_ALPHA); GX_SetTevSwapModeTable(GX_TEV_SWAP2,GX_CH_GREEN,GX_CH_GREEN,GX_CH_GREEN,GX_CH_ALPHA); GX_SetTevSwapModeTable(GX_TEV_SWAP3,GX_CH_BLUE,GX_CH_BLUE,GX_CH_BLUE,GX_CH_ALPHA); for(i=0;i<GX_MAX_TEVSTAGE;i++) { GX_SetTevDirect(i); } GX_SetNumIndStages(0); GX_SetIndTexCoordScale(GX_INDTEXSTAGE0,GX_ITS_1,GX_ITS_1); GX_SetIndTexCoordScale(GX_INDTEXSTAGE1,GX_ITS_1,GX_ITS_1); GX_SetIndTexCoordScale(GX_INDTEXSTAGE2,GX_ITS_1,GX_ITS_1); GX_SetIndTexCoordScale(GX_INDTEXSTAGE3,GX_ITS_1,GX_ITS_1); GX_SetFog(GX_FOG_NONE,0,1,0.1,1,(GXColor)BLACK); GX_SetFogRangeAdj(GX_DISABLE,0,NULL); GX_SetBlendMode(GX_BM_NONE,GX_BL_SRCALPHA,GX_BL_INVSRCALPHA,GX_LO_CLEAR); GX_SetColorUpdate(GX_ENABLE); GX_SetAlphaUpdate(GX_ENABLE); GX_SetZMode(GX_ENABLE,GX_LEQUAL,GX_TRUE); GX_SetZCompLoc(GX_TRUE); GX_SetDither(GX_ENABLE); GX_SetDstAlpha(GX_DISABLE,0); GX_SetPixelFmt(GX_PF_RGB8_Z24,GX_ZC_LINEAR); GX_SetFieldMask(GX_ENABLE,GX_ENABLE); flag = 0; if(rmode->viHeight==(rmode->xfbHeight<<1)) flag = 1; GX_SetFieldMode(rmode->field_rendering,flag); GX_SetCopyClear((GXColor)GX_DEFAULT_BG,0x00ffffff); GX_SetDispCopySrc(0,0,rmode->fbWidth,rmode->efbHeight); GX_SetDispCopyDst(rmode->fbWidth,rmode->efbHeight); GX_SetDispCopyYScale(1.0); GX_SetCopyClamp(GX_CLAMP_TOP|GX_CLAMP_BOTTOM); GX_SetCopyFilter(GX_FALSE,NULL,GX_FALSE,NULL); GX_SetDispCopyGamma(GX_GM_1_0); GX_SetDispCopyFrame2Field(GX_COPY_PROGRESSIVE); GX_ClearBoundingBox(); GX_PokeColorUpdate(GX_TRUE); GX_PokeAlphaUpdate(GX_TRUE); GX_PokeDither(GX_FALSE); GX_PokeBlendMode(GX_BM_NONE,GX_BL_ZERO,GX_BL_ONE,GX_LO_SET); GX_PokeAlphaMode(GX_ALWAYS,0); GX_PokeAlphaRead(GX_READ_FF); GX_PokeDstAlpha(GX_DISABLE,0); GX_PokeZMode(GX_TRUE,GX_ALWAYS,GX_TRUE); GX_SetGPMetric(GX_PERF0_NONE,GX_PERF1_NONE); GX_ClearGPMetric(); } static void __GX_FlushTextureState(void) { GX_LOAD_BP_REG(__gx->tevIndMask); } static void __GX_XfVtxSpecs(void) { u32 xfvtxspecs = 0; u32 nrms,texs,cols; cols = 0; if(__gx->vcdLo&0x6000) cols++; if(__gx->vcdLo&0x18000) cols++; nrms = 0; if(__gx->vcdNrms==1) nrms = 1; else if(__gx->vcdNrms==2) nrms = 2; texs = 0; if(__gx->vcdHi&0x3) texs++; if(__gx->vcdHi&0xc) texs++; if(__gx->vcdHi&0x30) texs++; if(__gx->vcdHi&0xc0) texs++; if(__gx->vcdHi&0x300) texs++; if(__gx->vcdHi&0xc00) texs++; if(__gx->vcdHi&0x3000) texs++; if(__gx->vcdHi&0xc000) texs++; xfvtxspecs = (_SHIFTL(texs,4,4))|(_SHIFTL(nrms,2,2))|(cols&0x3); GX_LOAD_XF_REG(0x1008,xfvtxspecs); } static void __GX_SetMatrixIndex(u32 mtx) { if(mtx<5) { GX_LOAD_CP_REG(0x30,__gx->mtxIdxLo); GX_LOAD_XF_REG(0x1018,__gx->mtxIdxLo); } else { GX_LOAD_CP_REG(0x40,__gx->mtxIdxHi); GX_LOAD_XF_REG(0x1019,__gx->mtxIdxHi); } } static void __GX_SendFlushPrim(void) { u32 tmp,tmp2,cnt; tmp = (__gx->xfFlush*__gx->xfFlushExp); wgPipe->U8 = 0x98; wgPipe->U16 = __gx->xfFlush; tmp2 = (tmp+3)/4; if(tmp>0) { cnt = tmp2/8; while(cnt) { wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; cnt--; } tmp2 &= 0x0007; if(tmp2) { while(tmp2) { wgPipe->U32 = 0; tmp2--; } } } __gx->xfFlush = 1; } static void __GX_SetVCD(void) { GX_LOAD_CP_REG(0x50,__gx->vcdLo); GX_LOAD_CP_REG(0x60,__gx->vcdHi); __GX_XfVtxSpecs(); } static void __GX_SetVAT(void) { u8 setvtx = 0; s32 i; for(i=0;i<8;i++) { setvtx = (1<<i); if(__gx->VATTable&setvtx) { GX_LOAD_CP_REG((0x70+(i&7)),__gx->VAT0reg[i]); GX_LOAD_CP_REG((0x80+(i&7)),__gx->VAT1reg[i]); GX_LOAD_CP_REG((0x90+(i&7)),__gx->VAT2reg[i]); } } __gx->VATTable = 0; } static void __SetSURegs(u8 texmap,u8 texcoord) { u32 reg; u16 wd,ht; u8 wrap_s,wrap_t; wd = __gx->texMapSize[texmap]&0x3ff; ht = _SHIFTR(__gx->texMapSize[texmap],10,10); wrap_s = __gx->texMapWrap[texmap]&3; wrap_t = _SHIFTR(__gx->texMapWrap[texmap],2,2); reg = (texcoord&0x7); __gx->suSsize[reg] = (__gx->suSsize[reg]&~0x0000ffff)|wd; __gx->suTsize[reg] = (__gx->suTsize[reg]&~0x0000ffff)|ht; __gx->suSsize[reg] = (__gx->suSsize[reg]&~0x00010000)|(_SHIFTL(wrap_s,16,1)); __gx->suTsize[reg] = (__gx->suTsize[reg]&~0x00010000)|(_SHIFTL(wrap_t,16,1)); GX_LOAD_BP_REG(__gx->suSsize[reg]); GX_LOAD_BP_REG(__gx->suTsize[reg]); } static void __GX_SetSUTexRegs(void) { u32 i; u32 indtev,dirtev; u8 texcoord,texmap; u32 tevreg,tevm,texcm; dirtev = (_SHIFTR(__gx->genMode,10,4))+1; indtev = _SHIFTR(__gx->genMode,16,3); //indirect texture order for(i=0;i<indtev;i++) { switch(i) { case GX_INDTEXSTAGE0: texmap = __gx->tevRasOrder[2]&7; texcoord = _SHIFTR(__gx->tevRasOrder[2],3,3); break; case GX_INDTEXSTAGE1: texmap = _SHIFTR(__gx->tevRasOrder[2],6,3); texcoord = _SHIFTR(__gx->tevRasOrder[2],9,3); break; case GX_INDTEXSTAGE2: texmap = _SHIFTR(__gx->tevRasOrder[2],12,3); texcoord = _SHIFTR(__gx->tevRasOrder[2],15,3); break; case GX_INDTEXSTAGE3: texmap = _SHIFTR(__gx->tevRasOrder[2],18,3); texcoord = _SHIFTR(__gx->tevRasOrder[2],21,3); break; default: texmap = 0; texcoord = 0; break; } texcm = _SHIFTL(1,texcoord,1); if(!(__gx->texCoordManually&texcm)) __SetSURegs(texmap,texcoord); } //direct texture order for(i=0;i<dirtev;i++) { tevreg = 3+(_SHIFTR(i,1,3)); texmap = (__gx->tevTexMap[i]&0xff); if(i&1) texcoord = _SHIFTR(__gx->tevRasOrder[tevreg],15,3); else texcoord = _SHIFTR(__gx->tevRasOrder[tevreg],3,3); tevm = _SHIFTL(1,i,1); texcm = _SHIFTL(1,texcoord,1); if(texmap!=0xff && (__gx->tevTexCoordEnable&tevm) && !(__gx->texCoordManually&texcm)) { __SetSURegs(texmap,texcoord); } } } static void __GX_SetGenMode(void) { GX_LOAD_BP_REG(__gx->genMode); __gx->xfFlush = 0; } static void __GX_UpdateBPMask(void) { #if defined(HW_DOL) u32 i; u32 nbmp,nres; u8 ntexmap; nbmp = _SHIFTR(__gx->genMode,16,3); nres = 0; for(i=0;i<nbmp;i++) { switch(i) { case GX_INDTEXSTAGE0: ntexmap = __gx->tevRasOrder[2]&7; break; case GX_INDTEXSTAGE1: ntexmap = _SHIFTR(__gx->tevRasOrder[2],6,3); break; case GX_INDTEXSTAGE2: ntexmap = _SHIFTR(__gx->tevRasOrder[2],12,3); break; case GX_INDTEXSTAGE3: ntexmap = _SHIFTR(__gx->tevRasOrder[2],18,3); break; default: ntexmap = 0; break; } nres |= (1<<ntexmap); } if((__gx->tevIndMask&0xff)!=nres) { __gx->tevIndMask = (__gx->tevIndMask&~0xff)|(nres&0xff); GX_LOAD_BP_REG(__gx->tevIndMask); } #endif } static void __GX_SetIndirectMask(u32 mask) { __gx->tevIndMask = ((__gx->tevIndMask&~0xff)|(mask&0xff)); GX_LOAD_BP_REG(__gx->tevIndMask); } static void __GX_SetTexCoordGen(void) { u32 i,mask; u32 texcoord; if(__gx->dirtyState&0x02000000) GX_LOAD_XF_REG(0x103f,(__gx->genMode&0xf)); i = 0; texcoord = 0x1040; mask = _SHIFTR(__gx->dirtyState,16,8); while(mask) { if(mask&0x0001) { GX_LOAD_XF_REG(texcoord,__gx->texCoordGen[i]); GX_LOAD_XF_REG((texcoord+0x10),__gx->texCoordGen2[i]); } mask >>= 1; texcoord++; i++; } } static void __GX_SetChanColor(void) { if(__gx->dirtyState&0x0100) GX_LOAD_XF_REG(0x100a,__gx->chnAmbColor[0]); if(__gx->dirtyState&0x0200) GX_LOAD_XF_REG(0x100b,__gx->chnAmbColor[1]); if(__gx->dirtyState&0x0400) GX_LOAD_XF_REG(0x100c,__gx->chnMatColor[0]); if(__gx->dirtyState&0x0800) GX_LOAD_XF_REG(0x100d,__gx->chnMatColor[1]); } static void __GX_SetChanCntrl(void) { u32 i,chan,mask; if(__gx->dirtyState&0x01000000) GX_LOAD_XF_REG(0x1009,(_SHIFTR(__gx->genMode,4,3))); i = 0; chan = 0x100e; mask = _SHIFTR(__gx->dirtyState,12,4); while(mask) { if(mask&0x0001) GX_LOAD_XF_REG(chan,__gx->chnCntrl[i]); mask >>= 1; chan++; i++; } } static void __GX_SetDirtyState(void) { if(__gx->dirtyState&0x0001) { __GX_SetSUTexRegs(); } if(__gx->dirtyState&0x0002) { __GX_UpdateBPMask(); } if(__gx->dirtyState&0x0004) { __GX_SetGenMode(); } if(__gx->dirtyState&0x0008) { __GX_SetVCD(); } if(__gx->dirtyState&0x0010) { __GX_SetVAT(); } if(__gx->dirtyState&~0xff) { if(__gx->dirtyState&0x0f00) { __GX_SetChanColor(); } if(__gx->dirtyState&0x0100f000) { __GX_SetChanCntrl(); } if(__gx->dirtyState&0x02ff0000) { __GX_SetTexCoordGen(); } if(__gx->dirtyState&0x04000000) { __GX_SetMatrixIndex(0); __GX_SetMatrixIndex(5); } } __gx->dirtyState = 0; } static u32 __GX_GetNumXfbLines(u16 efbHeight,u32 yscale) { u32 tmp,tmp1; tmp = (((efbHeight-1)<<8)/yscale)+1; if(yscale>128 && yscale<256) { while(yscale&0x01) yscale >>= 1; tmp1 = yscale*(efbHeight/yscale); if(!(efbHeight-tmp1)) tmp++; } if(tmp>1024) tmp = 1024; return tmp; } GXFifoObj* GX_Init(void *base,u32 size) { s32 i,re0,re1; #if defined(HW_RVL) u32 tmem; #else u32 tmem_even,tmem_odd; #endif u32 divis,res; u32 divid = TB_BUS_CLOCK; GXTexRegion *region = NULL; GXTlutRegion *tregion = NULL; LWP_InitQueue(&_gxwaitfinish); SYS_RegisterResetFunc(&__gx_resetinfo); memset(__gxregs,0,STRUCT_REGDEF_SIZE); __GX_FifoInit(); GX_InitFifoBase(&_gxfifoobj,base,size); GX_SetCPUFifo(&_gxfifoobj); GX_SetGPFifo(&_gxfifoobj); __GX_PEInit(); EnableWriteGatherPipe(); __gx->gxFifoInited = 1; __gx->tevIndMask = 0xff; __gx->tevIndMask = (__gx->tevIndMask&~0xff000000)|(_SHIFTL(0x0f,24,8)); i=0; re0 = 0xc0; re1 = 0xc1; while(i<16) { __gx->tevColorEnv[i] = (__gx->tevColorEnv[i]&~0xff000000)|(_SHIFTL(re0,24,8)); __gx->tevAlphaEnv[i] = (__gx->tevAlphaEnv[i]&~0xff000000)|(_SHIFTL(re1,24,8)); re0 += 2; re1 += 2; i++; } __gx->texCoordManually = 0; __gx->dirtyState = 0; __gx->saveDLctx = 1; __gx->gxFifoUnlinked = 0; __gx->sciTLcorner = (__gx->sciTLcorner&~0xff000000)|(_SHIFTL(0x20,24,8)); __gx->sciBRcorner = (__gx->sciBRcorner&~0xff000000)|(_SHIFTL(0x21,24,8)); __gx->lpWidth = (__gx->lpWidth&~0xff000000)|(_SHIFTL(0x22,24,8)); __gx->genMode = (__gx->genMode&~0xff000000)|(_SHIFTL(0x00,24,8)); i=0; re0 = 0x30; re1 = 0x31; while(i<8) { __gx->suSsize[i] = (__gx->suSsize[i]&~0xff000000)|(_SHIFTL(re0,24,8)); __gx->suTsize[i] = (__gx->suTsize[i]&~0xff000000)|(_SHIFTL(re1,24,8)); re0 += 2; re1 += 2; i++; } __gx->peZMode = (__gx->peZMode&~0xff000000)|(_SHIFTL(0x40,24,8)); __gx->peCMode0 = (__gx->peCMode0&~0xff000000)|(_SHIFTL(0x41,24,8)); __gx->peCMode1 = (__gx->peCMode1&~0xff000000)|(_SHIFTL(0x42,24,8)); __gx->peCntrl = (__gx->peCntrl&~0xff000000)|(_SHIFTL(0x43,24,8)); i=0; re0 = 0x25; while(i<11) { __gx->tevRasOrder[i] = (__gx->tevRasOrder[i]&~0xff000000)|(_SHIFTL(re0,24,8)); re0++; i++; } divis = 500; res = (u32)(divid/divis); __GX_FlushTextureState(); GX_LOAD_BP_REG(0x69000000|((_SHIFTR(res,11,24))|0x0400)); divis = 4224; res = (u32)(res/divis); __GX_FlushTextureState(); GX_LOAD_BP_REG(0x46000000|(res|0x0200)); i=0; re0 = 0xf6; while(i<8) { __gx->tevSwapModeTable[i] = (__gx->tevSwapModeTable[i]&~0xff000000)|(_SHIFTL(re0,24,8)); re0++; i++; } __gx->tevTexCoordEnable = 0; __gx->perf0Mode = GX_PERF0_NONE; __gx->perf1Mode = GX_PERF1_NONE; __gx->cpPerfMode = 0; __GX_InitRevBits(); i=0; while(i<16) { __gx->tevTexMap[i] = 0xff; i++; } #if defined(HW_RVL) i = 0; while(i<8) { region = &__gx->texRegion[i]; GX_InitTexCacheRegion(region,GX_FALSE,_gxtexregionaddrtable[i+0],GX_TEXCACHE_32K,_gxtexregionaddrtable[i+8],GX_TEXCACHE_32K); region = &__gx->texRegion[i+8]; GX_InitTexCacheRegion(region,GX_FALSE,_gxtexregionaddrtable[i+16],GX_TEXCACHE_32K,_gxtexregionaddrtable[i+24],GX_TEXCACHE_32K); region = &__gx->texRegion[i+16]; GX_InitTexCacheRegion(region,GX_TRUE,_gxtexregionaddrtable[i+32],GX_TEXCACHE_32K,_gxtexregionaddrtable[i+40],GX_TEXCACHE_32K); i++; } i=0; while(i<16) { tmem = 0x000C0000+(i<<13); tregion = &__gx->tlutRegion[i]; GX_InitTlutRegion(tregion,tmem,GX_TLUT_256); i++; } i=0; while(i<4) { tmem = 0x000E0000+(i<<15); tregion = &__gx->tlutRegion[i+16]; GX_InitTlutRegion(tregion,tmem,GX_TLUT_1K); i++; } #else for(i=0;i<8;i++) { tmem_even = tmem_odd = (i<<15); region = &__gx->texRegion[i]; GX_InitTexCacheRegion(region,GX_FALSE,tmem_even,GX_TEXCACHE_32K,(tmem_odd+0x00080000),GX_TEXCACHE_32K); } for(i=0;i<4;i++) { tmem_even = ((0x08+(i<<1))<<15); tmem_odd = ((0x09+(i<<1))<<15); region = &__gx->texRegion[i+8]; GX_InitTexCacheRegion(region,GX_FALSE,tmem_even,GX_TEXCACHE_32K,tmem_odd,GX_TEXCACHE_32K); } for(i=0;i<16;i++) { tmem_even = (i<<13)+0x000C0000; tregion = &__gx->tlutRegion[i]; GX_InitTlutRegion(tregion,tmem_even,GX_TLUT_256); } for(i=0;i<4;i++) { tmem_even = (i<<15)+0x000E0000; tregion = &__gx->tlutRegion[i+16]; GX_InitTlutRegion(tregion,tmem_even,GX_TLUT_1K); } #endif _cpReg[3] = 0; GX_LOAD_CP_REG(0x20,0x00000000); GX_LOAD_XF_REG(0x1006,0x0); GX_LOAD_BP_REG(0x23000000); GX_LOAD_BP_REG(0x24000000); GX_LOAD_BP_REG(0x67000000); __GX_SetIndirectMask(0); #if defined(HW_RVL) __GX_SetTmemConfig(2); #else __GX_SetTmemConfig(0); #endif __GX_InitGX(); return &_gxfifoobj; } void GX_InitFifoBase(GXFifoObj *fifo,void *base,u32 size) { struct __gxfifo *ptr = (struct __gxfifo*)fifo; if(!ptr || size<GX_FIFO_MINSIZE) return; ptr->buf_start = (u32)base; ptr->buf_end = (u32)base + size - 4; ptr->size = size; ptr->rdwt_dst = 0; GX_InitFifoLimits(fifo,(size-GX_FIFO_HIWATERMARK),((size>>1)&0x7fffffe0)); GX_InitFifoPtrs(fifo,base,base); } void GX_InitFifoLimits(GXFifoObj *fifo,u32 hiwatermark,u32 lowatermark) { struct __gxfifo *ptr = (struct __gxfifo*)fifo; ptr->hi_mark = hiwatermark; ptr->lo_mark = lowatermark; } void GX_InitFifoPtrs(GXFifoObj *fifo,void *rd_ptr,void *wt_ptr) { u32 level; s32 rdwt_dst; struct __gxfifo *ptr = (struct __gxfifo*)fifo; _CPU_ISR_Disable(level); rdwt_dst = wt_ptr-rd_ptr; ptr->rd_ptr = (u32)rd_ptr; ptr->wt_ptr = (u32)wt_ptr; ptr->rdwt_dst = rdwt_dst; if(rdwt_dst<0) { rdwt_dst += ptr->size; ptr->rd_ptr = rdwt_dst; } _CPU_ISR_Restore(level); } void GX_GetFifoPtrs(const GXFifoObj *fifo,void **rd_ptr,void **wt_ptr) { const struct __gxfifo *ptr = (const struct __gxfifo*)fifo; *rd_ptr = (void*)ptr->rd_ptr; *wt_ptr = (void*)ptr->wt_ptr; } void GX_SetCPUFifo(GXFifoObj *fifo) { u32 level; struct __gxfifo *ptr = (struct __gxfifo*)fifo; struct __gxfifo *cpufifo = (struct __gxfifo*)&_cpufifo; _CPU_ISR_Disable(level); if(!fifo) { _gxcpufifoready = 0; _cpgplinked = 0; cpufifo->gpfifo_ready = 0; cpufifo->cpufifo_ready = 0; _CPU_ISR_Restore(level); return; } cpufifo->buf_start = ptr->buf_start; cpufifo->buf_end = ptr->buf_end; cpufifo->size = ptr->size; cpufifo->hi_mark = ptr->hi_mark; cpufifo->lo_mark = ptr->lo_mark; cpufifo->rd_ptr = ptr->rd_ptr; cpufifo->wt_ptr = ptr->wt_ptr; cpufifo->rdwt_dst = ptr->rdwt_dst; cpufifo->fifo_wrap = ptr->fifo_wrap; cpufifo->gpfifo_ready = ptr->gpfifo_ready; cpufifo->cpufifo_ready = 1; _gxcpufifoready = 1; if(__GX_CPGPLinkCheck()) { _cpgplinked = 1; cpufifo->gpfifo_ready = 1; _piReg[3] = MEM_VIRTUAL_TO_PHYSICAL(cpufifo->buf_start); _piReg[4] = MEM_VIRTUAL_TO_PHYSICAL(cpufifo->buf_end); _piReg[5] = (cpufifo->wt_ptr&0x1FFFFFE0); __GX_WriteFifoIntReset(GX_TRUE,GX_TRUE); __GX_WriteFifoIntEnable(GX_ENABLE,GX_DISABLE); __GX_FifoLink(GX_TRUE); _CPU_ISR_Restore(level); return; } if(_cpgplinked) { __GX_FifoLink(GX_FALSE); _cpgplinked = 0; } __GX_WriteFifoIntEnable(GX_DISABLE,GX_DISABLE); _piReg[3] = MEM_VIRTUAL_TO_PHYSICAL(cpufifo->buf_start); _piReg[4] = MEM_VIRTUAL_TO_PHYSICAL(cpufifo->buf_end); _piReg[5] = (cpufifo->wt_ptr&0x1FFFFFE0); ppcsync(); _CPU_ISR_Restore(level); } void GX_GetCPUFifo(GXFifoObj *fifo) { struct __gxfifo* ptr = (struct __gxfifo*)fifo; struct __gxfifo* cpufifo = (struct __gxfifo*)&_cpufifo; if(!_gxcpufifoready) return; GX_Flush(); __GX_SaveFifo(); ptr->buf_start = cpufifo->buf_start; ptr->buf_end = cpufifo->buf_end; ptr->size = cpufifo->size; ptr->rd_ptr = cpufifo->rd_ptr; ptr->wt_ptr = cpufifo->wt_ptr; ptr->rdwt_dst = cpufifo->rdwt_dst; ptr->hi_mark = cpufifo->hi_mark; ptr->lo_mark = cpufifo->lo_mark; ptr->fifo_wrap = cpufifo->fifo_wrap; ptr->cpufifo_ready = cpufifo->cpufifo_ready; ptr->gpfifo_ready = cpufifo->gpfifo_ready; } void GX_SetGPFifo(GXFifoObj *fifo) { u32 level; struct __gxfifo *ptr = (struct __gxfifo*)fifo; struct __gxfifo *gpfifo = (struct __gxfifo*)&_gpfifo; _CPU_ISR_Disable(level); __GX_FifoReadDisable(); __GX_WriteFifoIntEnable(GX_DISABLE,GX_DISABLE); if(!fifo) { _gxgpfifoready = 0; _cpgplinked = 0; gpfifo->cpufifo_ready = 0; gpfifo->gpfifo_ready = 0; __GX_FifoLink(GX_FALSE); _CPU_ISR_Restore(level); return; } gpfifo->buf_start = ptr->buf_start; gpfifo->buf_end = ptr->buf_end; gpfifo->size = ptr->size; gpfifo->hi_mark = ptr->hi_mark; gpfifo->lo_mark = ptr->lo_mark; gpfifo->rd_ptr = ptr->rd_ptr; gpfifo->wt_ptr = ptr->wt_ptr; gpfifo->rdwt_dst = ptr->rdwt_dst; gpfifo->fifo_wrap = ptr->fifo_wrap; gpfifo->cpufifo_ready = ptr->cpufifo_ready; gpfifo->gpfifo_ready = 1; _gxgpfifoready = 1; /* setup fifo base */ _cpReg[16] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->buf_start),0,16); _cpReg[17] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->buf_start),16,16); /* setup fifo end */ _cpReg[18] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->buf_end),0,16); _cpReg[19] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->buf_end),16,16); /* setup hiwater mark */ _cpReg[20] = _SHIFTL(gpfifo->hi_mark,0,16); _cpReg[21] = _SHIFTR(gpfifo->hi_mark,16,16); /* setup lowater mark */ _cpReg[22] = _SHIFTL(gpfifo->lo_mark,0,16); _cpReg[23] = _SHIFTR(gpfifo->lo_mark,16,16); /* setup rd<->wd dist */ _cpReg[24] = _SHIFTL(gpfifo->rdwt_dst,0,16); _cpReg[25] = _SHIFTR(gpfifo->rdwt_dst,16,16); /* setup wt ptr */ _cpReg[26] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->wt_ptr),0,16); _cpReg[27] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->wt_ptr),16,16); /* setup rd ptr */ _cpReg[28] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->rd_ptr),0,16); _cpReg[29] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(gpfifo->rd_ptr),16,16); ppcsync(); if(__GX_CPGPLinkCheck()) { _cpgplinked = 1; gpfifo->cpufifo_ready = 1; __GX_WriteFifoIntEnable(GX_ENABLE,GX_DISABLE); __GX_FifoLink(GX_TRUE); } else { _cpgplinked = 0; gpfifo->cpufifo_ready = 0; __GX_WriteFifoIntEnable(GX_DISABLE,GX_DISABLE); __GX_FifoLink(GX_FALSE); } __GX_WriteFifoIntReset(GX_TRUE,GX_TRUE); __GX_FifoReadEnable(); _CPU_ISR_Restore(level); } void GX_GetGPFifo(GXFifoObj *fifo) { struct __gxfifo* ptr = (struct __gxfifo*)fifo; struct __gxfifo* gpfifo = (struct __gxfifo*)&_gpfifo; if(!_gxgpfifoready) return; __GX_SaveFifo(); ptr->buf_start = gpfifo->buf_start; ptr->buf_end = gpfifo->buf_end; ptr->size = gpfifo->size; ptr->rd_ptr = gpfifo->rd_ptr; ptr->wt_ptr = gpfifo->wt_ptr; ptr->rdwt_dst = gpfifo->rdwt_dst; ptr->hi_mark = gpfifo->hi_mark; ptr->lo_mark = gpfifo->lo_mark; ptr->fifo_wrap = gpfifo->fifo_wrap; ptr->gpfifo_ready = gpfifo->gpfifo_ready; ptr->cpufifo_ready = gpfifo->cpufifo_ready; } void* GX_GetFifoBase(const GXFifoObj *fifo) { return (void*)((const struct __gxfifo*)fifo)->buf_start; } u32 GX_GetFifoSize(const GXFifoObj *fifo) { return ((const struct __gxfifo*)fifo)->size; } u32 GX_GetFifoCount(const GXFifoObj *fifo) { return ((const struct __gxfifo*)fifo)->rdwt_dst; } u8 GX_GetFifoWrap(const GXFifoObj *fifo) { return ((const struct __gxfifo*)fifo)->fifo_wrap; } u32 GX_GetOverflowCount(void) { return _gxoverflowcount; } u32 GX_ResetOverflowCount(void) { u32 ret = _gxoverflowcount; _gxoverflowcount = 0; return ret; } lwp_t GX_GetCurrentGXThread(void) { return _gxcurrentlwp; } lwp_t GX_SetCurrentGXThread(void) { u32 level; _CPU_ISR_Disable(level); lwp_t ret = _gxcurrentlwp; _gxcurrentlwp = LWP_GetSelf(); _CPU_ISR_Restore(level); return ret; } volatile void* GX_RedirectWriteGatherPipe(void *ptr) { u32 level; struct __gxfifo *cpufifo = (struct __gxfifo*)&_cpufifo; _CPU_ISR_Disable(level); GX_Flush(); while(!IsWriteGatherBufferEmpty()); mtwpar(0x0C008000); if(_cpgplinked) { __GX_FifoLink(GX_FALSE); __GX_WriteFifoIntEnable(GX_DISABLE,GX_DISABLE); } cpufifo->wt_ptr = (u32)MEM_PHYSICAL_TO_K0(_piReg[5]&~0x04000000); _piReg[3] = 0; _piReg[4] = 0x04000000; _piReg[5] = (((u32)ptr&0x3FFFFFE0)&~0x04000000); _sync(); _CPU_ISR_Restore(level); return (volatile void*)0x0C008000; } void GX_RestoreWriteGatherPipe(void) { u32 level; struct __gxfifo *cpufifo = (struct __gxfifo*)&_cpufifo; _CPU_ISR_Disable(level); wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; ppcsync(); while(!IsWriteGatherBufferEmpty()); mtwpar(0x0C008000); _piReg[3] = MEM_VIRTUAL_TO_PHYSICAL(cpufifo->buf_start); _piReg[4] = MEM_VIRTUAL_TO_PHYSICAL(cpufifo->buf_end); _piReg[5] = (((u32)cpufifo->wt_ptr&0x3FFFFFE0)&~0x04000000); if(_cpgplinked) { __GX_WriteFifoIntReset(GX_TRUE,GX_TRUE); __GX_WriteFifoIntEnable(GX_ENABLE,GX_DISABLE); __GX_FifoLink(GX_TRUE); } _CPU_ISR_Restore(level); } void GX_Flush(void) { if(__gx->dirtyState) __GX_SetDirtyState(); wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; ppcsync(); } void GX_EnableBreakPt(void *break_pt) { u32 level = 0; _CPU_ISR_Disable(level); __GX_FifoReadDisable(); _cpReg[30] = _SHIFTL(MEM_VIRTUAL_TO_PHYSICAL(break_pt),0,16); _cpReg[31] = _SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(break_pt),16,16); __gx->cpCRreg = (__gx->cpCRreg&~0x22)|0x22; _cpReg[1] = __gx->cpCRreg; _gxcurrbp = break_pt; __GX_FifoReadEnable(); _CPU_ISR_Restore(level); } void GX_DisableBreakPt(void) { u32 level = 0; _CPU_ISR_Disable(level); __gx->cpCRreg = (__gx->cpCRreg&~0x22); _cpReg[1] = __gx->cpCRreg; _gxcurrbp = NULL; _CPU_ISR_Restore(level); } #if defined(HW_DOL) void GX_AbortFrame(void) { _piReg[6] = 1; __GX_WaitAbort(50); _piReg[6] = 0; __GX_WaitAbort(5); if(__GX_IsGPFifoReady()) __GX_CleanGPFifo(); } #elif defined(HW_RVL) void GX_AbortFrame(void) { __GX_Abort(); if(__GX_IsGPFifoReady()) { __GX_CleanGPFifo(); __GX_InitRevBits(); __gx->dirtyState = 0; GX_Flush(); } } #endif void GX_SetDrawSync(u16 token) { u32 level = 0; _CPU_ISR_Disable(level); GX_LOAD_BP_REG(0x48000000 | token); GX_LOAD_BP_REG(0x47000000 | token); GX_Flush(); _CPU_ISR_Restore(level); } u16 GX_GetDrawSync(void) { return _peReg[7]; } void GX_SetDrawDone(void) { u32 level; _CPU_ISR_Disable(level); GX_LOAD_BP_REG(0x45000002); // set draw done! GX_Flush(); _gxfinished = 0; _CPU_ISR_Restore(level); } void GX_WaitDrawDone(void) { u32 level; #ifdef _GP_DEBUG printf("GX_WaitDrawDone()\n\n"); #endif _CPU_ISR_Disable(level); while(!_gxfinished) LWP_ThreadSleep(_gxwaitfinish); _CPU_ISR_Restore(level); } void GX_DrawDone(void) { u32 level; _CPU_ISR_Disable(level); GX_LOAD_BP_REG(0x45000002); // set draw done! GX_Flush(); _gxfinished = 0; _CPU_ISR_Flash(level); while(!_gxfinished) LWP_ThreadSleep(_gxwaitfinish); _CPU_ISR_Restore(level); } GXDrawDoneCallback GX_SetDrawDoneCallback(GXDrawDoneCallback cb) { u32 level; _CPU_ISR_Disable(level); GXDrawDoneCallback ret = drawDoneCB; drawDoneCB = cb; _CPU_ISR_Restore(level); return ret; } GXDrawSyncCallback GX_SetDrawSyncCallback(GXDrawSyncCallback cb) { u32 level; _CPU_ISR_Disable(level); GXDrawSyncCallback ret = tokenCB; tokenCB = cb; _CPU_ISR_Restore(level); return ret; } GXBreakPtCallback GX_SetBreakPtCallback(GXBreakPtCallback cb) { u32 level; _CPU_ISR_Disable(level); GXBreakPtCallback ret = breakPtCB; breakPtCB = cb; _CPU_ISR_Restore(level); return ret; } void GX_PixModeSync(void) { GX_LOAD_BP_REG(__gx->peCntrl); } void GX_TexModeSync(void) { GX_LOAD_BP_REG(0x63000000); } void GX_SetMisc(u32 token,u32 value) { u32 cnt; if(token==GX_MT_XF_FLUSH) { __gx->xfFlushSafe = value; cnt = cntlzw(__gx->xfFlushSafe); __gx->xfFlushExp = _SHIFTR(cnt,5,16); __gx->xfFlush = 1; if(!__gx->xfFlushSafe) return; __gx->dirtyState |= 0x0008; } else if(token==GX_MT_DL_SAVE_CTX) { __gx->saveDLctx = (value&0xff); } return; } void GX_SetViewportJitter(f32 xOrig,f32 yOrig,f32 wd,f32 ht,f32 nearZ,f32 farZ,u32 field) { f32 x0,y0,x1,y1,n,f,z; static const f32 Xfactor = 0.5f; static const f32 Yfactor = 342.0f; static const f32 Zfactor = 16777215.0f; if(!field) yOrig -= Xfactor; x0 = wd*Xfactor; y0 = (-ht)*Xfactor; x1 = (xOrig+(wd*Xfactor))+Yfactor; y1 = (yOrig+(ht*Xfactor))+Yfactor; n = Zfactor*nearZ; f = Zfactor*farZ; z = f-n; GX_LOAD_XF_REGS(0x101a,6); wgPipe->F32 = x0; wgPipe->F32 = y0; wgPipe->F32 = z; wgPipe->F32 = x1; wgPipe->F32 = y1; wgPipe->F32 = f; } void GX_SetViewport(f32 xOrig,f32 yOrig,f32 wd,f32 ht,f32 nearZ,f32 farZ) { GX_SetViewportJitter(xOrig,yOrig,wd,ht,nearZ,farZ,1); } void GX_LoadProjectionMtx(Mtx44 mt,u8 type) { f32 tmp[7]; ((u32*)((void*)tmp))[6] = (u32)type; tmp[0] = mt[0][0]; tmp[2] = mt[1][1]; tmp[4] = mt[2][2]; tmp[5] = mt[2][3]; switch(type) { case GX_PERSPECTIVE: tmp[1] = mt[0][2]; tmp[3] = mt[1][2]; break; case GX_ORTHOGRAPHIC: tmp[1] = mt[0][3]; tmp[3] = mt[1][3]; break; default: tmp[1] = 0.0; tmp[3] = 0.0; break; } GX_LOAD_XF_REGS(0x1020,7); wgPipe->F32 = tmp[0]; wgPipe->F32 = tmp[1]; wgPipe->F32 = tmp[2]; wgPipe->F32 = tmp[3]; wgPipe->F32 = tmp[4]; wgPipe->F32 = tmp[5]; wgPipe->F32 = tmp[6]; } static void __GetImageTileCount(u32 fmt,u16 wd,u16 ht,u32 *xtiles,u32 *ytiles,u32 *zplanes) { u32 xshift,yshift,tile; switch(fmt) { case GX_TF_I4: case GX_TF_IA4: case GX_CTF_R4: case GX_CTF_RA4: case GX_CTF_Z4: xshift = 3; yshift = 3; break; case GX_TF_Z8: case GX_TF_I8: case GX_CTF_A8: case GX_CTF_R8: case GX_CTF_G8: case GX_CTF_B8: case GX_CTF_Z8M: case GX_CTF_Z8L: xshift = 3; yshift = 2; break; case GX_TF_IA8: case GX_CTF_RA8: case GX_CTF_RG8: case GX_CTF_GB8: case GX_TF_Z16: case GX_TF_Z24X8: case GX_CTF_Z16L: case GX_TF_RGB565: case GX_TF_RGB5A3: case GX_TF_RGBA8: xshift = 2; yshift = 2; break; default: xshift = 0; yshift = 0; break; } if(!(wd&0xffff)) wd = 1; if(!(ht&0xffff)) ht = 1; wd &= 0xffff; tile = (wd+((1<<xshift)-1))>>xshift; *xtiles = tile; ht &= 0xffff; tile = (ht+((1<<yshift)-1))>>yshift; *ytiles = tile; *zplanes = 1; if(fmt==GX_TF_RGBA8 || fmt==GX_TF_Z24X8) *zplanes = 2; } void GX_SetCopyClear(GXColor color,u32 zvalue) { u32 val; val = (_SHIFTL(color.a,8,8))|(color.r&0xff); GX_LOAD_BP_REG(0x4f000000|val); val = (_SHIFTL(color.g,8,8))|(color.b&0xff); GX_LOAD_BP_REG(0x50000000|val); val = zvalue&0x00ffffff; GX_LOAD_BP_REG(0x51000000|val); } void GX_SetCopyClamp(u8 clamp) { __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~1)|(clamp&1); __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~2)|(clamp&2); } void GX_SetDispCopyGamma(u8 gamma) { __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~0x180)|(_SHIFTL(gamma,7,2)); } void GX_SetCopyFilter(u8 aa,u8 sample_pattern[12][2],u8 vf,u8 vfilter[7]) { u32 reg01=0,reg02=0,reg03=0,reg04=0,reg53=0,reg54=0; if(aa) { reg01 = sample_pattern[0][0]&0xf; reg01 = (reg01&~0xf0)|(_SHIFTL(sample_pattern[0][1],4,4)); reg01 = (reg01&~0xf00)|(_SHIFTL(sample_pattern[1][0],8,4)); reg01 = (reg01&~0xf000)|(_SHIFTL(sample_pattern[1][1],12,4)); reg01 = (reg01&~0xf0000)|(_SHIFTL(sample_pattern[2][0],16,4)); reg01 = (reg01&~0xf00000)|(_SHIFTL(sample_pattern[2][1],20,4)); reg01 = (reg01&~0xff000000)|(_SHIFTL(0x01,24,8)); reg02 = sample_pattern[3][0]&0xf; reg02 = (reg02&~0xf0)|(_SHIFTL(sample_pattern[3][1],4,4)); reg02 = (reg02&~0xf00)|(_SHIFTL(sample_pattern[4][0],8,4)); reg02 = (reg02&~0xf000)|(_SHIFTL(sample_pattern[4][1],12,4)); reg02 = (reg02&~0xf0000)|(_SHIFTL(sample_pattern[5][0],16,4)); reg02 = (reg02&~0xf00000)|(_SHIFTL(sample_pattern[5][1],20,4)); reg02 = (reg02&~0xff000000)|(_SHIFTL(0x02,24,8)); reg03 = sample_pattern[6][0]&0xf; reg03 = (reg03&~0xf0)|(_SHIFTL(sample_pattern[6][1],4,4)); reg03 = (reg03&~0xf00)|(_SHIFTL(sample_pattern[7][0],8,4)); reg03 = (reg03&~0xf000)|(_SHIFTL(sample_pattern[7][1],12,4)); reg03 = (reg03&~0xf0000)|(_SHIFTL(sample_pattern[8][0],16,4)); reg03 = (reg03&~0xf00000)|(_SHIFTL(sample_pattern[8][1],20,4)); reg03 = (reg03&~0xff000000)|(_SHIFTL(0x03,24,8)); reg04 = sample_pattern[9][0]&0xf; reg04 = (reg04&~0xf0)|(_SHIFTL(sample_pattern[9][1],4,4)); reg04 = (reg04&~0xf00)|(_SHIFTL(sample_pattern[10][0],8,4)); reg04 = (reg04&~0xf000)|(_SHIFTL(sample_pattern[10][1],12,4)); reg04 = (reg04&~0xf0000)|(_SHIFTL(sample_pattern[11][0],16,4)); reg04 = (reg04&~0xf00000)|(_SHIFTL(sample_pattern[11][1],20,4)); reg04 = (reg04&~0xff000000)|(_SHIFTL(0x04,24,8)); } else { reg01 = 0x01666666; reg02 = 0x02666666; reg03 = 0x03666666; reg04 = 0x04666666; } GX_LOAD_BP_REG(reg01); GX_LOAD_BP_REG(reg02); GX_LOAD_BP_REG(reg03); GX_LOAD_BP_REG(reg04); reg53 = 0x53595000; reg54 = 0x54000015; if(vf) { reg53 = 0x53000000|(vfilter[0]&0x3f); reg53 = (reg53&~0xfc0)|(_SHIFTL(vfilter[1],6,6)); reg53 = (reg53&~0x3f000)|(_SHIFTL(vfilter[2],12,6)); reg53 = (reg53&~0xfc0000)|(_SHIFTL(vfilter[3],18,6)); reg54 = 0x54000000|(vfilter[4]&0x3f); reg54 = (reg54&~0xfc0)|(_SHIFTL(vfilter[5],6,6)); reg54 = (reg54&~0x3f000)|(_SHIFTL(vfilter[6],12,6)); } GX_LOAD_BP_REG(reg53); GX_LOAD_BP_REG(reg54); } void GX_SetDispCopyFrame2Field(u8 mode) { __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~0x3000)|(_SHIFTL(mode,12,2)); } u32 GX_SetDispCopyYScale(f32 yscale) { u32 ht,yScale = 0; yScale = ((u32)(256.0f/yscale))&0x1ff; GX_LOAD_BP_REG(0x4e000000|yScale); __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~0x400)|(_SHIFTL(((256-yScale)>0),10,1)); ht = _SHIFTR(__gx->dispCopyWH,12,10)+1; return __GX_GetNumXfbLines(ht,yScale); } void GX_SetDispCopyDst(u16 wd,u16 ht) { __gx->dispCopyDst = (__gx->dispCopyDst&~0x3ff)|(_SHIFTR(wd,4,10)); __gx->dispCopyDst = (__gx->dispCopyDst&~0xff000000)|(_SHIFTL(0x4d,24,8)); } void GX_SetDispCopySrc(u16 left,u16 top,u16 wd,u16 ht) { __gx->dispCopyTL = (__gx->dispCopyTL&~0x00ffffff)|XY(left,top); __gx->dispCopyTL = (__gx->dispCopyTL&~0xff000000)|(_SHIFTL(0x49,24,8)); __gx->dispCopyWH = (__gx->dispCopyWH&~0x00ffffff)|XY((wd-1),(ht-1)); __gx->dispCopyWH = (__gx->dispCopyWH&~0xff000000)|(_SHIFTL(0x4a,24,8)); } void GX_CopyDisp(void *dest,u8 clear) { u8 clflag; u32 val; if(clear) { val= (__gx->peZMode&~0xf)|0xf; GX_LOAD_BP_REG(val); val = (__gx->peCMode0&~0x3); GX_LOAD_BP_REG(val); } clflag = 0; if(clear || (__gx->peCntrl&0x7)==0x0003) { if(__gx->peCntrl&0x40) { clflag = 1; val = (__gx->peCntrl&~0x40); GX_LOAD_BP_REG(val); } } GX_LOAD_BP_REG(__gx->dispCopyTL); // set source top GX_LOAD_BP_REG(__gx->dispCopyWH); GX_LOAD_BP_REG(__gx->dispCopyDst); val = 0x4b000000|(_SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(dest),5,24)); GX_LOAD_BP_REG(val); __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~0x800)|(_SHIFTL(clear,11,1)); __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~0x4000)|0x4000; __gx->dispCopyCntrl = (__gx->dispCopyCntrl&~0xff000000)|(_SHIFTL(0x52,24,8)); GX_LOAD_BP_REG(__gx->dispCopyCntrl); if(clear) { GX_LOAD_BP_REG(__gx->peZMode); GX_LOAD_BP_REG(__gx->peCMode0); } if(clflag) GX_LOAD_BP_REG(__gx->peCntrl); } void GX_CopyTex(void *dest,u8 clear) { u8 clflag; u32 val; if(clear) { val = (__gx->peZMode&~0xf)|0xf; GX_LOAD_BP_REG(val); val = (__gx->peCMode0&~0x3); GX_LOAD_BP_REG(val); } clflag = 0; val = __gx->peCntrl; if(__gx->texCopyZTex && (val&0x7)!=0x0003) { clflag = 1; val = (val&~0x7)|0x0003; } if(clear || (val&0x7)==0x0003) { if(val&0x40) { clflag = 1; val = (val&~0x40); } } if(clflag) GX_LOAD_BP_REG(val); val = 0x4b000000|(_SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(dest),5,24)); GX_LOAD_BP_REG(__gx->texCopyTL); GX_LOAD_BP_REG(__gx->texCopyWH); GX_LOAD_BP_REG(__gx->texCopyDst); GX_LOAD_BP_REG(val); __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x800)|(_SHIFTL(clear,11,1)); __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x4000); __gx->texCopyCntrl = (__gx->texCopyCntrl&~0xff000000)|(_SHIFTL(0x52,24,8)); GX_LOAD_BP_REG(__gx->texCopyCntrl); if(clear) { GX_LOAD_BP_REG(__gx->peZMode); GX_LOAD_BP_REG(__gx->peCMode0); } if(clflag) GX_LOAD_BP_REG(__gx->peCntrl); } void GX_SetTexCopySrc(u16 left,u16 top,u16 wd,u16 ht) { __gx->texCopyTL = (__gx->texCopyTL&~0x00ffffff)|XY(left,top); __gx->texCopyTL = (__gx->texCopyTL&~0xff000000)|(_SHIFTL(0x49,24,8)); __gx->texCopyWH = (__gx->texCopyWH&~0x00ffffff)|XY((wd-1),(ht-1)); __gx->texCopyWH = (__gx->texCopyWH&~0xff000000)|(_SHIFTL(0x4a,24,8)); } void GX_SetTexCopyDst(u16 wd,u16 ht,u32 fmt,u8 mipmap) { u8 lfmt = fmt&0xf; u32 xtiles,ytiles,zplanes; __GetImageTileCount(fmt,wd,ht,&xtiles,&ytiles,&zplanes); __gx->texCopyDst = (__gx->texCopyDst&~0x3ff)|((xtiles*zplanes)&0x3ff); if(fmt==GX_TF_Z16) lfmt = 11; if(fmt==GX_CTF_YUVA8 || (fmt>=GX_TF_I4 && fmt<GX_TF_RGB565)) __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x18000)|0x18000; else __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x18000)|0x10000; __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x8)|(lfmt&0x8); __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x200)|(_SHIFTL(mipmap,9,1)); __gx->texCopyCntrl = (__gx->texCopyCntrl&~0x70)|(_SHIFTL(lfmt,4,3)); __gx->texCopyDst = (__gx->texCopyDst&~0xff000000)|(_SHIFTL(0x4d,24,8)); __gx->texCopyZTex = ((fmt&_GX_TF_ZTF)==_GX_TF_ZTF); } void GX_ClearBoundingBox(void) { GX_LOAD_BP_REG(0x550003ff); GX_LOAD_BP_REG(0x560003ff); } void GX_BeginDispList(void *list,u32 size) { struct __gxfifo *fifo; if(__gx->dirtyState) __GX_SetDirtyState(); if(__gx->saveDLctx) memcpy(_gx_saved_data,__gxregs,STRUCT_REGDEF_SIZE); fifo = (struct __gxfifo*)&_gx_dl_fifoobj; fifo->buf_start = (u32)list; fifo->buf_end = (u32)list + size - 4; fifo->size = size; fifo->rd_ptr = (u32)list; fifo->wt_ptr = (u32)list; fifo->rdwt_dst = 0; __gx->gxFifoUnlinked = 1; GX_GetCPUFifo(&_gx_old_cpufifo); GX_SetCPUFifo(&_gx_dl_fifoobj); __GX_ResetWriteGatherPipe(); } u32 GX_EndDispList(void) { u32 level; u8 wrap = 0; GX_GetCPUFifo(&_gx_dl_fifoobj); GX_SetCPUFifo(&_gx_old_cpufifo); if(__gx->saveDLctx) { _CPU_ISR_Disable(level); memcpy(__gxregs,_gx_saved_data,STRUCT_REGDEF_SIZE); _CPU_ISR_Restore(level); } __gx->gxFifoUnlinked = 0; wrap = GX_GetFifoWrap(&_gx_dl_fifoobj); if(wrap) return 0; return GX_GetFifoCount(&_gx_dl_fifoobj); } void GX_CallDispList(void *list,u32 nbytes) { if(__gx->dirtyState) __GX_SetDirtyState(); if(!__gx->vcdClear) __GX_SendFlushPrim(); wgPipe->U8 = 0x40; //call displaylist wgPipe->U32 = MEM_VIRTUAL_TO_PHYSICAL(list); wgPipe->U32 = nbytes; } void GX_SetChanCtrl(s32 channel,u8 enable,u8 ambsrc,u8 matsrc,u8 litmask,u8 diff_fn,u8 attn_fn) { u32 reg,difffn = (attn_fn==GX_AF_SPEC)?GX_DF_NONE:diff_fn; u32 val = (matsrc&1)|(_SHIFTL(enable,1,1))|(_SHIFTL(litmask,2,4))|(_SHIFTL(ambsrc,6,1))|(_SHIFTL(difffn,7,2))|(_SHIFTL(((GX_AF_NONE-attn_fn)>0),9,1))|(_SHIFTL((attn_fn>0),10,1))|(_SHIFTL((_SHIFTR(litmask,4,4)),11,4)); reg = (channel&0x03); __gx->chnCntrl[reg] = val; __gx->dirtyState |= (0x1000<<reg); if(channel==GX_COLOR0A0) { __gx->chnCntrl[2] = val; __gx->dirtyState |= 0x5000; } else { __gx->chnCntrl[3] = val; __gx->dirtyState |= 0xa000; } } void GX_SetChanAmbColor(s32 channel,GXColor color) { u32 reg,val = (_SHIFTL(color.r,24,8))|(_SHIFTL(color.g,16,8))|(_SHIFTL(color.b,8,8))|0x00; switch(channel) { case GX_COLOR0: reg = 0; val |= (__gx->chnAmbColor[0]&0xff); break; case GX_COLOR1: reg = 1; val |= (__gx->chnAmbColor[1]&0xff); break; case GX_ALPHA0: reg = 0; val = ((__gx->chnAmbColor[0]&~0xff)|(color.a&0xff)); break; case GX_ALPHA1: reg = 1; val = ((__gx->chnAmbColor[1]&~0xff)|(color.a&0xff)); break; case GX_COLOR0A0: reg = 0; val |= (color.a&0xFF); break; case GX_COLOR1A1: reg = 1; val |= (color.a&0xFF); break; default: return; } __gx->chnAmbColor[reg] = val; __gx->dirtyState |= (0x0100<<reg); } void GX_SetChanMatColor(s32 channel,GXColor color) { u32 reg,val = (_SHIFTL(color.r,24,8))|(_SHIFTL(color.g,16,8))|(_SHIFTL(color.b,8,8))|0x00; switch(channel) { case GX_COLOR0: reg = 0; val |= (__gx->chnMatColor[0]&0xff); break; case GX_COLOR1: reg = 1; val |= (__gx->chnMatColor[1]&0xff); break; case GX_ALPHA0: reg = 0; val = ((__gx->chnMatColor[0]&~0xff)|(color.a&0xff)); break; case GX_ALPHA1: reg = 1; val = ((__gx->chnMatColor[1]&~0xff)|(color.a&0xff)); break; case GX_COLOR0A0: reg = 0; val |= (color.a&0xFF); break; case GX_COLOR1A1: reg = 1; val |= (color.a&0xFF); break; default: return; } __gx->chnMatColor[reg] = val; __gx->dirtyState |= (0x0400<<reg); } void GX_SetArray(u32 attr,void *ptr,u8 stride) { u32 idx = 0; if(attr==GX_VA_NBT) attr = GX_VA_NRM; if(attr>=GX_VA_POS && attr<=GX_LIGHTARRAY) { idx = attr-GX_VA_POS; GX_LOAD_CP_REG((0xA0+idx),(u32)MEM_VIRTUAL_TO_PHYSICAL(ptr)); GX_LOAD_CP_REG((0xB0+idx),(u32)stride); } } static __inline__ void __SETVCDATTR(u8 attr,u8 type) { switch(attr) { case GX_VA_PTNMTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x1)|(type&0x1); break; case GX_VA_TEX0MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x2)|(_SHIFTL(type,1,1)); break; case GX_VA_TEX1MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x4)|(_SHIFTL(type,2,1)); break; case GX_VA_TEX2MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x8)|(_SHIFTL(type,3,1)); break; case GX_VA_TEX3MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x10)|(_SHIFTL(type,4,1)); break; case GX_VA_TEX4MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x20)|(_SHIFTL(type,5,1)); break; case GX_VA_TEX5MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x40)|(_SHIFTL(type,6,1)); break; case GX_VA_TEX6MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x80)|(_SHIFTL(type,7,1)); break; case GX_VA_TEX7MTXIDX: __gx->vcdLo = (__gx->vcdLo&~0x100)|(_SHIFTL(type,8,1)); break; case GX_VA_POS: __gx->vcdLo = (__gx->vcdLo&~0x600)|(_SHIFTL(type,9,2)); break; case GX_VA_NRM: __gx->vcdLo = (__gx->vcdLo&~0x1800)|(_SHIFTL(type,11,2)); __gx->vcdNrms = 1; break; case GX_VA_NBT: __gx->vcdLo = (__gx->vcdLo&~0x1800)|(_SHIFTL(type,11,2)); __gx->vcdNrms = 2; break; case GX_VA_CLR0: __gx->vcdLo = (__gx->vcdLo&~0x6000)|(_SHIFTL(type,13,2)); break; case GX_VA_CLR1: __gx->vcdLo = (__gx->vcdLo&~0x18000)|(_SHIFTL(type,15,2)); break; case GX_VA_TEX0: __gx->vcdHi = (__gx->vcdHi&~0x3)|(type&0x3); break; case GX_VA_TEX1: __gx->vcdHi = (__gx->vcdHi&~0xc)|(_SHIFTL(type,2,2)); break; case GX_VA_TEX2: __gx->vcdHi = (__gx->vcdHi&~0x30)|(_SHIFTL(type,4,2)); break; case GX_VA_TEX3: __gx->vcdHi = (__gx->vcdHi&~0xc0)|(_SHIFTL(type,6,2)); break; case GX_VA_TEX4: __gx->vcdHi = (__gx->vcdHi&~0x300)|(_SHIFTL(type,8,2)); break; case GX_VA_TEX5: __gx->vcdHi = (__gx->vcdHi&~0xc00)|(_SHIFTL(type,10,2)); break; case GX_VA_TEX6: __gx->vcdHi = (__gx->vcdHi&~0x3000)|(_SHIFTL(type,12,2)); break; case GX_VA_TEX7: __gx->vcdHi = (__gx->vcdHi&~0xc000)|(_SHIFTL(type,14,2)); break; } } void GX_SetVtxDesc(u8 attr,u8 type) { __SETVCDATTR(attr,type); __gx->dirtyState |= 0x0008; } void GX_SetVtxDescv(GXVtxDesc *attr_list) { u32 i; if(!attr_list) return; for(i=0;i<GX_MAX_VTXDESC_LISTSIZE;i++){ if(attr_list[i].attr==GX_VA_NULL) break; __SETVCDATTR(attr_list[i].attr,attr_list[i].type); } __gx->dirtyState |= 0x0008; } void GX_GetVtxDescv(GXVtxDesc *attr_list) { u32 count; // Clear everything first for(count=0;count<GX_MAX_VTXDESC_LISTSIZE;count++) { attr_list[count].attr = GX_VA_NULL; attr_list[count].type = 0; } count = 0; if(__gx->vcdLo&0x1) { attr_list[count].attr = GX_VA_PTNMTXIDX; attr_list[count].type = __gx->vcdLo&0x1; count++; } if(__gx->vcdLo&0x2) { attr_list[count].attr = GX_VA_TEX0MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x2,1,1); count++; } if(__gx->vcdLo&0x4) { attr_list[count].attr = GX_VA_TEX1MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x4,2,1); count++; } if(__gx->vcdLo&0x8) { attr_list[count].attr = GX_VA_TEX2MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x8,3,1); count++; } if(__gx->vcdLo&0x10) { attr_list[count].attr = GX_VA_TEX3MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x10,4,1); count++; } if(__gx->vcdLo&0x20) { attr_list[count].attr = GX_VA_TEX4MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x20,5,1); count++; } if(__gx->vcdLo&0x40) { attr_list[count].attr = GX_VA_TEX5MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x40,6,1); count++; } if(__gx->vcdLo&0x80) { attr_list[count].attr = GX_VA_TEX6MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x80,7,1); count++; } if(__gx->vcdLo&0x100) { attr_list[count].attr = GX_VA_TEX7MTXIDX; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x100,8,1); count++; } if(__gx->vcdLo&0x600) { attr_list[count].attr = GX_VA_POS; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x600,9,2); count++; } if(__gx->vcdLo&0x1800) { if(__gx->vcdNrms==1) { attr_list[count].attr = GX_VA_NRM; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x1800,11,2); count++; } else if(__gx->vcdNrms==2){ attr_list[count].attr = GX_VA_NBT; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x1800,11,2); count++; } } if(__gx->vcdLo&0x6000) { attr_list[count].attr = GX_VA_CLR0; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x6000,13,2); count++; } if(__gx->vcdLo&0x18000) { attr_list[count].attr = GX_VA_CLR1; attr_list[count].type = _SHIFTR(__gx->vcdLo&0x18000,15,2); count++; } if(__gx->vcdHi&0x3) { attr_list[count].attr = GX_VA_TEX0; attr_list[count].type = __gx->vcdHi&0x3; count++; } if(__gx->vcdHi&0xc) { attr_list[count].attr = GX_VA_TEX1; attr_list[count].type = _SHIFTR(__gx->vcdHi&0xc,2,2); count++; } if(__gx->vcdHi&0x30) { attr_list[count].attr = GX_VA_TEX2; attr_list[count].type = _SHIFTR(__gx->vcdHi&0x30,4,2); count++; } if(__gx->vcdHi&0xc0) { attr_list[count].attr = GX_VA_TEX3; attr_list[count].type = _SHIFTR(__gx->vcdHi&0xc0,6,2); count++; } if(__gx->vcdHi&0x300) { attr_list[count].attr = GX_VA_TEX4; attr_list[count].type = _SHIFTR(__gx->vcdHi&0x300,8,2); count++; } if(__gx->vcdHi&0xc00) { attr_list[count].attr = GX_VA_TEX5; attr_list[count].type = _SHIFTR(__gx->vcdHi&0xc00,10,2); count++; } if(__gx->vcdHi&0x3000) { attr_list[count].attr = GX_VA_TEX6; attr_list[count].type = _SHIFTR(__gx->vcdHi&0x3000,12,2); count++; } if(__gx->vcdHi&0xc000) { attr_list[count].attr = GX_VA_TEX7; attr_list[count].type = _SHIFTR(__gx->vcdHi&0xc000,14,2); count++; } } static __inline__ void __SETVCDFMT(u8 vtxfmt,u32 vtxattr,u32 comptype,u32 compsize,u32 frac) { u8 vat = (vtxfmt&7); if(vtxattr==GX_VA_POS && (comptype==GX_POS_XY || comptype==GX_POS_XYZ) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1)|(comptype&1); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0xe)|(_SHIFTL(compsize,1,3)); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1f0)|(_SHIFTL(frac,4,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_NRM && comptype==GX_NRM_XYZ && (compsize==GX_S8 || compsize==GX_S16 || compsize==GX_F32)) { __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x200); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1C00)|(_SHIFTL(compsize,10,3)); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x80000000); } else if(vtxattr==GX_VA_NBT && (comptype==GX_NRM_NBT || comptype==GX_NRM_NBT3) && (compsize==GX_S8 || compsize==GX_S16 || compsize==GX_F32)) { __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x200)|0x200; __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1C00)|(_SHIFTL(compsize,10,3)); if(comptype==GX_NRM_NBT3) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x80000000)|0x80000000; } else if(vtxattr==GX_VA_CLR0 && (comptype==GX_CLR_RGB || comptype==GX_CLR_RGBA) && (compsize>=GX_RGB565 && compsize<=GX_RGBA8)) { __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x2000)|(_SHIFTL(comptype,13,1)); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1C000)|(_SHIFTL(compsize,14,3)); } else if(vtxattr==GX_VA_CLR1 && (comptype==GX_CLR_RGB || comptype==GX_CLR_RGBA) && (compsize>=GX_RGB565 && compsize<=GX_RGBA8)) { __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x20000)|(_SHIFTL(comptype,17,1)); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1C0000)|(_SHIFTL(compsize,18,3)); } else if(vtxattr==GX_VA_TEX0 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x200000)|(_SHIFTL(comptype,21,1)); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x1C00000)|(_SHIFTL(compsize,22,3)); __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x3E000000)|(_SHIFTL(frac,25,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX1 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x1)|(comptype&1); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0xe)|(_SHIFTL(compsize,1,3)); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x1F0)|(_SHIFTL(frac,4,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX2 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x200)|(_SHIFTL(comptype,9,1)); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x1C00)|(_SHIFTL(compsize,10,3)); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x3E000)|(_SHIFTL(frac,13,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX3 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x40000)|(_SHIFTL(comptype,18,1)); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x380000)|(_SHIFTL(compsize,19,3)); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x7C00000)|(_SHIFTL(frac,22,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX4 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x8000000)|(_SHIFTL(comptype,27,1)); __gx->VAT1reg[vat] = (__gx->VAT1reg[vat]&~0x70000000)|(_SHIFTL(compsize,28,3)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x1f)|(frac&0x1f); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX5 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x20)|(_SHIFTL(comptype,5,1)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x1C0)|(_SHIFTL(compsize,6,3)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x3E00)|(_SHIFTL(frac,9,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX6 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x4000)|(_SHIFTL(comptype,14,1)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x38000)|(_SHIFTL(compsize,15,3)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x7C0000)|(_SHIFTL(frac,18,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } else if(vtxattr==GX_VA_TEX7 && (comptype==GX_TEX_S || comptype==GX_TEX_ST) && (compsize>=GX_U8 && compsize<=GX_F32)) { __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x800000)|(_SHIFTL(comptype,23,1)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0x7000000)|(_SHIFTL(compsize,24,3)); __gx->VAT2reg[vat] = (__gx->VAT2reg[vat]&~0xF8000000)|(_SHIFTL(frac,27,5)); if(frac) __gx->VAT0reg[vat] = (__gx->VAT0reg[vat]&~0x40000000)|0x40000000; } } void GX_SetVtxAttrFmt(u8 vtxfmt,u32 vtxattr,u32 comptype,u32 compsize,u32 frac) { __SETVCDFMT(vtxfmt,vtxattr,comptype,compsize,frac); __gx->VATTable |= (1<<vtxfmt); __gx->dirtyState |= 0x0010; } void GX_SetVtxAttrFmtv(u8 vtxfmt,GXVtxAttrFmt *attr_list) { u32 i; for(i=0;i<GX_MAX_VTXATTRFMT_LISTSIZE;i++) { if(attr_list[i].vtxattr==GX_VA_NULL) break; __SETVCDFMT(vtxfmt,attr_list[i].vtxattr,attr_list[i].comptype,attr_list[i].compsize,attr_list[i].frac); } __gx->VATTable |= (1<<vtxfmt); __gx->dirtyState |= 0x0010; } void GX_Begin(u8 primitve,u8 vtxfmt,u16 vtxcnt) { u8 reg = primitve|(vtxfmt&7); if(__gx->dirtyState) __GX_SetDirtyState(); wgPipe->U8 = reg; wgPipe->U16 = vtxcnt; } void GX_SetTexCoordGen(u16 texcoord,u32 tgen_typ,u32 tgen_src,u32 mtxsrc) { GX_SetTexCoordGen2(texcoord,tgen_typ,tgen_src,mtxsrc,GX_FALSE,GX_DTTIDENTITY); } void GX_SetTexCoordGen2(u16 texcoord,u32 tgen_typ,u32 tgen_src,u32 mtxsrc,u32 normalize,u32 postmtx) { u32 txc; u32 texcoords; u8 vtxrow,stq; if(texcoord>=GX_MAXCOORD) return; stq = 0; switch(tgen_src) { case GX_TG_POS: vtxrow = 0; stq = 1; break; case GX_TG_NRM: vtxrow = 1; stq = 1; break; case GX_TG_BINRM: vtxrow = 3; stq = 1; break; case GX_TG_TANGENT: vtxrow = 4; stq = 1; break; case GX_TG_COLOR0: vtxrow = 2; break; case GX_TG_COLOR1: vtxrow = 2; break; case GX_TG_TEX0: vtxrow = 5; break; case GX_TG_TEX1: vtxrow = 6; break; case GX_TG_TEX2: vtxrow = 7; break; case GX_TG_TEX3: vtxrow = 8; break; case GX_TG_TEX4: vtxrow = 9; break; case GX_TG_TEX5: vtxrow = 10; break; case GX_TG_TEX6: vtxrow = 11; break; case GX_TG_TEX7: vtxrow = 12; break; default: vtxrow = 5; break; } texcoords = 0; txc = (texcoord&7); if((tgen_typ==GX_TG_MTX3x4 || tgen_typ==GX_TG_MTX2x4)) { if(tgen_typ==GX_TG_MTX3x4) texcoords = 0x02; texcoords |= (_SHIFTL(stq,2,1)); texcoords |= (_SHIFTL(vtxrow,7,5)); } else if((tgen_typ>=GX_TG_BUMP0 && tgen_typ<=GX_TG_BUMP7)) { tgen_src -= GX_TG_TEXCOORD0; tgen_typ -= GX_TG_BUMP0; texcoords = 0x10; texcoords |= (_SHIFTL(stq,2,1)); texcoords |= (_SHIFTL(vtxrow,7,5)); texcoords |= (_SHIFTL(tgen_src,12,3)); texcoords |= (_SHIFTL(tgen_typ,15,3)); } else if(tgen_typ==GX_TG_SRTG) { if(tgen_src==GX_TG_COLOR0) texcoords = 0x20; else if(tgen_src==GX_TG_COLOR1) texcoords = 0x30; texcoords |= (_SHIFTL(stq,2,1)); texcoords |= (_SHIFTL(2,7,5)); } postmtx -= GX_DTTMTX0; __gx->texCoordGen[txc] = texcoords; __gx->texCoordGen2[txc] = ((_SHIFTL(normalize,8,1))|(postmtx&0x3f)); switch(texcoord) { case GX_TEXCOORD0: __gx->mtxIdxLo = (__gx->mtxIdxLo&~0xfc0)|(_SHIFTL(mtxsrc,6,6)); break; case GX_TEXCOORD1: __gx->mtxIdxLo = (__gx->mtxIdxLo&~0x3f000)|(_SHIFTL(mtxsrc,12,6)); break; case GX_TEXCOORD2: __gx->mtxIdxLo = (__gx->mtxIdxLo&~0xfc0000)|(_SHIFTL(mtxsrc,18,6)); break; case GX_TEXCOORD3: __gx->mtxIdxLo = (__gx->mtxIdxLo&~0x3f000000)|(_SHIFTL(mtxsrc,24,6)); break; case GX_TEXCOORD4: __gx->mtxIdxHi = (__gx->mtxIdxHi&~0x3f)|(mtxsrc&0x3f); break; case GX_TEXCOORD5: __gx->mtxIdxHi = (__gx->mtxIdxHi&~0xfc0)|(_SHIFTL(mtxsrc,6,6)); break; case GX_TEXCOORD6: __gx->mtxIdxHi = (__gx->mtxIdxHi&~0x3f000)|(_SHIFTL(mtxsrc,12,6)); break; case GX_TEXCOORD7: __gx->mtxIdxHi = (__gx->mtxIdxHi&~0xfc0000)|(_SHIFTL(mtxsrc,18,6)); break; } __gx->dirtyState |= (0x04000000|(0x00010000<<texcoord)); } void GX_SetZTexture(u8 op,u8 fmt,u32 bias) { u32 val = 0; if(fmt==GX_TF_Z8) fmt = 0; else if(fmt==GX_TF_Z16) fmt = 1; else fmt = 2; val = (u32)(_SHIFTL(op,2,2))|(fmt&3); GX_LOAD_BP_REG(0xF4000000|(bias&0x00FFFFFF)); GX_LOAD_BP_REG(0xF5000000|(val&0x00FFFFFF)); } static inline void WriteMtxPS4x3(register Mtx mt,register void *wgpipe) { register f32 tmp0,tmp1,tmp2,tmp3,tmp4,tmp5; __asm__ __volatile__ ( "psq_l %0,0(%6),0,0\n\ psq_l %1,8(%6),0,0\n\ psq_l %2,16(%6),0,0\n\ psq_l %3,24(%6),0,0\n\ psq_l %4,32(%6),0,0\n\ psq_l %5,40(%6),0,0\n\ psq_st %0,0(%7),0,0\n\ psq_st %1,0(%7),0,0\n\ psq_st %2,0(%7),0,0\n\ psq_st %3,0(%7),0,0\n\ psq_st %4,0(%7),0,0\n\ psq_st %5,0(%7),0,0" : "=&f"(tmp0),"=&f"(tmp1),"=&f"(tmp2),"=&f"(tmp3),"=&f"(tmp4),"=&f"(tmp5) : "b"(mt), "b"(wgpipe) : "memory" ); } static inline void WriteMtxPS3x3from4x3(register Mtx mt,register void *wgpipe) { register f32 tmp0,tmp1,tmp2,tmp3,tmp4,tmp5; __asm__ __volatile__ ("psq_l %0,0(%6),0,0\n\ lfs %1,8(%6)\n\ psq_l %2,16(%6),0,0\n\ lfs %3,24(%6)\n\ psq_l %4,32(%6),0,0\n\ lfs %5,40(%6)\n\ psq_st %0,0(%7),0,0\n\ stfs %1,0(%7)\n\ psq_st %2,0(%7),0,0\n\ stfs %3,0(%7)\n\ psq_st %4,0(%7),0,0\n\ stfs %5,0(%7)" : "=&f"(tmp0),"=&f"(tmp1),"=&f"(tmp2),"=&f"(tmp3),"=&f"(tmp4),"=&f"(tmp5) : "b"(mt), "b"(wgpipe) : "memory" ); } static inline void WriteMtxPS3x3(register Mtx33 mt,register void *wgpipe) { register f32 tmp0,tmp1,tmp2,tmp3,tmp4; __asm__ __volatile__ ("psq_l %0,0(%5),0,0\n\ psq_l %1,8(%5),0,0\n\ psq_l %2,16(%5),0,0\n\ psq_l %3,24(%5),0,0\n\ lfs %4,32(%5)\n\ psq_st %0,0(%6),0,0\n\ psq_st %1,0(%6),0,0\n\ psq_st %2,0(%6),0,0\n\ psq_st %3,0(%6),0,0\n\ stfs %4,0(%6)" : "=&f"(tmp0),"=&f"(tmp1),"=&f"(tmp2),"=&f"(tmp3),"=&f"(tmp4) : "b"(mt), "b"(wgpipe) : "memory" ); } static inline void WriteMtxPS4x2(register Mtx mt,register void *wgpipe) { register f32 tmp0,tmp1,tmp2,tmp3; __asm__ __volatile__ ("psq_l %0,0(%4),0,0\n\ psq_l %1,8(%4),0,0\n\ psq_l %2,16(%4),0,0\n\ psq_l %3,24(%4),0,0\n\ psq_st %0,0(%5),0,0\n\ psq_st %1,0(%5),0,0\n\ psq_st %2,0(%5),0,0\n\ psq_st %3,0(%5),0,0" : "=&f"(tmp0),"=&f"(tmp1),"=&f"(tmp2),"=&f"(tmp3) : "b"(mt), "b"(wgpipe) : "memory" ); } void GX_LoadPosMtxImm(Mtx mt,u32 pnidx) { GX_LOAD_XF_REGS((0x0000|(_SHIFTL(pnidx,2,8))),12); WriteMtxPS4x3(mt,(void*)wgPipe); } void GX_LoadPosMtxIdx(u16 mtxidx,u32 pnidx) { wgPipe->U8 = 0x20; wgPipe->U32 = ((_SHIFTL(mtxidx,16,16))|0xb000|(_SHIFTL(pnidx,2,8))); } void GX_LoadNrmMtxImm(Mtx mt,u32 pnidx) { GX_LOAD_XF_REGS((0x0400|(pnidx*3)),9); WriteMtxPS3x3from4x3(mt,(void*)wgPipe); } void GX_LoadNrmMtxImm3x3(Mtx33 mt,u32 pnidx) { GX_LOAD_XF_REGS((0x0400|(pnidx*3)),9); WriteMtxPS3x3(mt,(void*)wgPipe); } void GX_LoadNrmMtxIdx3x3(u16 mtxidx,u32 pnidx) { wgPipe->U8 = 0x28; wgPipe->U32 = ((_SHIFTL(mtxidx,16,16))|0x8000|(0x0400|(pnidx*3))); } void GX_LoadTexMtxImm(Mtx mt,u32 texidx,u8 type) { u32 addr = 0; u32 rows = (type==GX_MTX2x4)?2:3; if(texidx<GX_DTTMTX0) addr = (_SHIFTL(texidx,2,8)); else { texidx -= GX_DTTMTX0; addr = 0x0500 + (_SHIFTL(texidx,2,8)); } GX_LOAD_XF_REGS(addr,(rows*4)); if(type==GX_MTX2x4) WriteMtxPS4x2(mt,(void*)wgPipe); else WriteMtxPS4x3(mt,(void*)wgPipe); } void GX_LoadTexMtxIdx(u16 mtxidx,u32 texidx,u8 type) { u32 addr,size = (type==GX_MTX2x4)?7:11; if(texidx<GX_DTTMTX0) addr = 0x0000|(_SHIFTL(texidx,2,8)); else addr = 0x0500|(_SHIFTL((texidx-GX_DTTMTX0),2,8)); wgPipe->U8 = 0x30; wgPipe->U32 = ((_SHIFTL(mtxidx,16,16))|(_SHIFTL(size,12,4))|addr); } void GX_SetCurrentMtx(u32 mtx) { __gx->mtxIdxLo = (__gx->mtxIdxLo&~0x3f)|(mtx&0x3f); __gx->dirtyState |= 0x04000000; } void GX_SetNumTexGens(u32 nr) { __gx->genMode = (__gx->genMode&~0xf)|(nr&0xf); __gx->dirtyState |= 0x02000004; } void GX_InvVtxCache(void) { wgPipe->U8 = 0x48; // vertex cache weg } void GX_SetZMode(u8 enable,u8 func,u8 update_enable) { __gx->peZMode = (__gx->peZMode&~0x1)|(enable&1); __gx->peZMode = (__gx->peZMode&~0xe)|(_SHIFTL(func,1,3)); __gx->peZMode = (__gx->peZMode&~0x10)|(_SHIFTL(update_enable,4,1)); GX_LOAD_BP_REG(__gx->peZMode); } #if 0 static void __GetTexTileShift(u32 fmt,u32 *xshift,u32 *yshift) { switch(fmt) { case GX_TF_I4: case GX_TF_IA4: case GX_CTF_R4: case GX_CTF_RA4: case GX_CTF_Z4: *xshift = 3; *yshift = 3; break; case GX_TF_Z8: case GX_TF_I8: case GX_TF_IA8: case GX_CTF_RA8: case GX_CTF_A8: case GX_CTF_R8: case GX_CTF_G8: case GX_CTF_B8: case GX_CTF_RG8: case GX_CTF_GB8: case GX_CTF_Z8M: case GX_CTF_Z8L: *xshift = 3; *yshift = 2; break; case GX_TF_Z16: case GX_TF_Z24X8: case GX_CTF_Z16L: case GX_TF_RGB565: case GX_TF_RGB5A3: case GX_TF_RGBA8: *xshift = 2; *yshift = 2; break; default: *xshift = 0; *yshift = 0; break; } } #endif u32 GX_GetTexObjFmt(const GXTexObj *obj) { return ((const struct __gx_texobj*)obj)->tex_fmt; } u32 GX_GetTexObjMipMap(const GXTexObj *obj) { return (((const struct __gx_texobj*)obj)->tex_flag&0x01); } void* GX_GetTexObjData(const GXTexObj *obj) { return (void*)(_SHIFTL(((const struct __gx_texobj*)obj)->tex_maddr & 0x00ffffff,5,24)); } u8 GX_GetTexObjWrapS(const GXTexObj *obj) { return ((const struct __gx_texobj*)obj)->tex_filt & 0x03; } u8 GX_GetTexObjWrapT(const GXTexObj *obj) { return _SHIFTR(((const struct __gx_texobj*)obj)->tex_filt & 0x0c, 2, 2); } u16 GX_GetTexObjHeight(const GXTexObj *obj) { return _SHIFTR(((const struct __gx_texobj*)obj)->tex_size & 0xffc00, 10, 10) + 1; } u16 GX_GetTexObjWidth(const GXTexObj *obj) { return (((const struct __gx_texobj*)obj)->tex_size & 0x3ff) + 1; } void GX_GetTexObjAll(const GXTexObj *obj, void** image_ptr, u16* width, u16* height, u8* format, u8* wrap_s, u8* wrap_t, u8* mipmap) { const struct __gx_texobj *ptr = (const struct __gx_texobj*)obj; *image_ptr = (void*)(_SHIFTL(ptr->tex_maddr & 0x00ffffff,5,24)); *width = (ptr->tex_size & 0x3ff) + 1; *height = _SHIFTR(ptr->tex_size & 0xffc00, 10, 10) + 1; *format = ptr->tex_fmt; *wrap_s = ptr->tex_filt & 0x03; *wrap_t = _SHIFTR(ptr->tex_filt & 0x0c, 2, 2); *mipmap = ptr->tex_flag & 0x01; } u32 GX_GetTexBufferSize(u16 wd,u16 ht,u32 fmt,u8 mipmap,u8 maxlod) { u32 xshift,yshift,xtiles,ytiles,bitsize,size; switch(fmt) { case GX_TF_I4: case GX_TF_CMPR: case GX_CTF_R4: case GX_CTF_RA4: case GX_CTF_Z4: xshift = 3; yshift = 3; break; case GX_TF_Z8: case GX_TF_I8: case GX_TF_IA4: case GX_CTF_A8: case GX_CTF_R8: case GX_CTF_G8: case GX_CTF_B8: case GX_CTF_RG8: case GX_CTF_GB8: case GX_CTF_Z8M: case GX_CTF_Z8L: xshift = 3; yshift = 2; break; case GX_TF_IA8: case GX_TF_Z16: case GX_TF_Z24X8: case GX_TF_RGB565: case GX_TF_RGB5A3: case GX_TF_RGBA8: case GX_CTF_Z16L: case GX_CTF_RA8: xshift = 2; yshift = 2; break; default: xshift = 2; yshift = 2; break; } bitsize = 32; if(fmt==GX_TF_RGBA8 || fmt==GX_TF_Z24X8) bitsize = 64; size = 0; if(mipmap) { u32 cnt = (maxlod&0xff); while(cnt) { u32 w = wd&0xffff; u32 h = ht&0xffff; xtiles = ((w+(1<<xshift))-1)>>xshift; ytiles = ((h+(1<<yshift))-1)>>yshift; if(cnt==0) return size; size += ((xtiles*ytiles)*bitsize); if(w==0x0001 && h==0x0001) return size; if(wd>0x0001) wd = (w>>1); else wd = 0x0001; if(ht>0x0001) ht = (h>>1); else ht = 0x0001; --cnt; } return size; } wd &= 0xffff; xtiles = (wd+((1<<xshift)-1))>>xshift; ht &= 0xffff; ytiles = (ht+((1<<yshift)-1))>>yshift; size = ((xtiles*ytiles)*bitsize); return size; } void GX_InitTexCacheRegion(GXTexRegion *region,u8 is32bmipmap,u32 tmem_even,u8 size_even,u32 tmem_odd,u8 size_odd) { u32 sze = 0; struct __gx_texregion *ptr = (struct __gx_texregion*)region; switch(size_even) { case GX_TEXCACHE_32K: sze = 3; break; case GX_TEXCACHE_128K: sze = 4; break; case GX_TEXCACHE_512K: sze = 5; break; default: sze = 3; break; } ptr->tmem_even = 0; ptr->tmem_even = (ptr->tmem_even&~0x7fff)|(_SHIFTR(tmem_even,5,15)); ptr->tmem_even = (ptr->tmem_even&~0x38000)|(_SHIFTL(sze,15,3)); ptr->tmem_even = (ptr->tmem_even&~0x1C0000)|(_SHIFTL(sze,18,3)); switch(size_odd) { case GX_TEXCACHE_32K: sze = 3; break; case GX_TEXCACHE_128K: sze = 4; break; case GX_TEXCACHE_512K: sze = 5; break; default: sze = 3; break; } ptr->tmem_odd = 0; ptr->tmem_odd = (ptr->tmem_odd&~0x7fff)|(_SHIFTR(tmem_odd,5,15)); ptr->tmem_odd = (ptr->tmem_odd&~0x38000)|(_SHIFTL(sze,15,3)); ptr->tmem_odd = (ptr->tmem_odd&~0x1C0000)|(_SHIFTL(sze,18,3)); ptr->ismipmap = is32bmipmap; ptr->iscached = 1; } void GX_InitTexPreloadRegion(GXTexRegion *region,u32 tmem_even,u32 size_even,u32 tmem_odd,u32 size_odd) { struct __gx_texregion *ptr = (struct __gx_texregion*)region; ptr->tmem_even = 0; ptr->tmem_even = (ptr->tmem_even&~0x7FFF)|(_SHIFTR(tmem_even,5,15)); ptr->tmem_even = (ptr->tmem_even&~0x200000)|0x200000; ptr->tmem_odd = 0; ptr->tmem_odd = (ptr->tmem_odd&~0x7FFF)|(_SHIFTR(tmem_odd,5,15)); ptr->size_even = _SHIFTR(size_even,5,16); ptr->size_odd = _SHIFTR(size_odd,5,16); ptr->ismipmap = 0; ptr->iscached = 0; } void GX_InitTlutRegion(GXTlutRegion *region,u32 tmem_addr,u8 tlut_sz) { struct __gx_tlutregion *ptr = (struct __gx_tlutregion*)region; tmem_addr -= 0x80000; ptr->tmem_addr_conf = 0; ptr->tmem_addr_conf = (ptr->tmem_addr_conf&~0x3ff)|(_SHIFTR(tmem_addr,9,10)); ptr->tmem_addr_conf = (ptr->tmem_addr_conf&~0x1FFC00)|(_SHIFTL(tlut_sz,10,10)); ptr->tmem_addr_conf = (ptr->tmem_addr_conf&~0xff000000)|(_SHIFTL(0x65,24,8)); } void GX_InitTexObj(GXTexObj *obj,void *img_ptr,u16 wd,u16 ht,u8 fmt,u8 wrap_s,u8 wrap_t,u8 mipmap) { u32 nwd,nht; u32 xshift,yshift; struct __gx_texobj *ptr = (struct __gx_texobj*)obj; if(!obj) return; memset(obj,0,sizeof(GXTexObj)); ptr->tex_filt = (ptr->tex_filt&~0x03)|(wrap_s&3); ptr->tex_filt = (ptr->tex_filt&~0x0c)|(_SHIFTL(wrap_t,2,2)); ptr->tex_filt = (ptr->tex_filt&~0x10)|0x10; if(mipmap) { ptr->tex_flag |= 0x01; if(fmt==GX_TF_CI4 || fmt==GX_TF_CI8 || fmt==GX_TF_CI14) ptr->tex_filt = (ptr->tex_filt&~0xe0)|0x00a0; else ptr->tex_filt = (ptr->tex_filt&~0xe0)|0x00c0; } else ptr->tex_filt= (ptr->tex_filt&~0xE0)|0x0080; ptr->tex_fmt = fmt; ptr->tex_size = (ptr->tex_size&~0x3ff)|((wd-1)&0x3ff); ptr->tex_size = (ptr->tex_size&~0xFFC00)|(_SHIFTL((ht-1),10,10)); ptr->tex_size = (ptr->tex_size&~0xF00000)|(_SHIFTL(fmt,20,4)); ptr->tex_maddr = (ptr->tex_maddr&~0x00ffffff)|(_SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(img_ptr),5,24)); switch(fmt) { case GX_TF_I4: case GX_TF_CI4: xshift = 3; yshift = 3; ptr->tex_tile_type = 1; break; case GX_TF_I8: case GX_TF_IA4: case GX_TF_CI8: xshift = 3; yshift = 2; ptr->tex_tile_type = 2; break; case GX_TF_IA8: case GX_TF_RGB565: case GX_TF_RGB5A3: case GX_TF_RGBA8: xshift = 2; yshift = 2; ptr->tex_tile_type = 2; break; case GX_TF_CI14: xshift = 2; yshift = 2; ptr->tex_tile_type = 3; break; case GX_TF_CMPR: xshift = 3; yshift = 3; ptr->tex_tile_type = 0; break; default: xshift = 2; yshift = 2; ptr->tex_tile_type = 2; break; } nwd = ((wd+(1<<xshift))-1)>>xshift; nht = ((ht+(1<<yshift))-1)>>yshift; ptr->tex_tile_cnt = (nwd*nht)&0x7fff; ptr->tex_flag |= 0x0002; } void GX_InitTexObjCI(GXTexObj *obj,void *img_ptr,u16 wd,u16 ht,u8 fmt,u8 wrap_s,u8 wrap_t,u8 mipmap,u32 tlut_name) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; GX_InitTexObj(obj,img_ptr,wd,ht,fmt,wrap_s,wrap_t,mipmap); ptr->tex_flag &= ~0x02; ptr->tex_tlut = tlut_name; } void GX_InitTexObjLOD(GXTexObj *obj,u8 minfilt,u8 magfilt,f32 minlod,f32 maxlod,f32 lodbias,u8 biasclamp,u8 edgelod,u8 maxaniso) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; static const u8 GX2HWFiltConv[] = {0x00,0x04,0x01,0x05,0x02,0x06,0x00,0x00}; //static const u8 HW2GXFiltConv[] = {0x00,0x02,0x04,0x00,0x01,0x03,0x05,0x00}; if(lodbias<-4.0f) lodbias = -4.0f; else if(lodbias==4.0f) lodbias = 3.99f; ptr->tex_filt = (ptr->tex_filt&~0x1fe00)|(_SHIFTL(((u32)(32.0f*lodbias)),9,8)); ptr->tex_filt = (ptr->tex_filt&~0x10)|(_SHIFTL((magfilt==GX_LINEAR?1:0),4,1)); ptr->tex_filt = (ptr->tex_filt&~0xe0)|(_SHIFTL(GX2HWFiltConv[minfilt],5,3)); ptr->tex_filt = (ptr->tex_filt&~0x100)|(_SHIFTL(!(edgelod&0xff),8,1)); ptr->tex_filt = (ptr->tex_filt&~0x180000)|(_SHIFTL(maxaniso,19,2)); ptr->tex_filt = (ptr->tex_filt&~0x200000)|(_SHIFTL(biasclamp,21,1)); if(minlod<0.0f) minlod = 0.0f; else if(minlod>10.0f) minlod = 10.0f; if(maxlod<0.0f) maxlod = 0.0f; else if(maxlod>10.0f) maxlod = 10.0f; ptr->tex_lod = (ptr->tex_lod&~0xff)|(((u32)(16.0f*minlod))&0xff); ptr->tex_lod = (ptr->tex_lod&~0xff00)|(_SHIFTL(((u32)(16.0f*maxlod)),8,8)); } void GX_InitTexObjData(GXTexObj *obj,void *img_ptr) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; ptr->tex_maddr = (ptr->tex_maddr&~0x00ffffff)|(_SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(img_ptr),5,24)); } void GX_InitTexObjTlut(GXTexObj *obj,u32 tlut_name) { ((struct __gx_texobj*)obj)->tex_tlut = tlut_name; } void GX_InitTexObjWrapMode(GXTexObj *obj,u8 wrap_s,u8 wrap_t) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; ptr->tex_filt = (ptr->tex_filt&~0x03)|(wrap_s&3); ptr->tex_filt = (ptr->tex_filt&~0x0c)|(_SHIFTL(wrap_t,2,2)); } void GX_InitTexObjFilterMode(GXTexObj *obj,u8 minfilt,u8 magfilt) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; static const u8 GX2HWFiltConv[] = {0x00,0x04,0x01,0x05,0x02,0x06,0x00,0x00}; ptr->tex_filt = (ptr->tex_filt&~0x10)|(_SHIFTL((magfilt==GX_LINEAR?1:0),4,1)); ptr->tex_filt = (ptr->tex_filt&~0xe0)|(_SHIFTL(GX2HWFiltConv[minfilt],5,3)); } void GX_InitTexObjMinLOD(GXTexObj *obj,f32 minlod) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; if(minlod<0.0f) minlod = 0.0f; else if(minlod>10.0f) minlod = 10.0f; ptr->tex_lod = (ptr->tex_lod&~0xff)|(((u32)(16.0f*minlod))&0xff); } void GX_InitTexObjMaxLOD(GXTexObj *obj,f32 maxlod) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; if(maxlod<0.0f) maxlod = 0.0f; else if(maxlod>10.0f) maxlod = 10.0f; ptr->tex_lod = (ptr->tex_lod&~0xff00)|(_SHIFTL(((u32)(16.0f*maxlod)),8,8)); } void GX_InitTexObjLODBias(GXTexObj *obj,f32 lodbias) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; if(lodbias<-4.0f) lodbias = -4.0f; else if(lodbias==4.0f) lodbias = 3.99f; ptr->tex_filt = (ptr->tex_filt&~0x1fe00)|(_SHIFTL(((u32)(32.0f*lodbias)),9,8)); } void GX_InitTexObjBiasClamp(GXTexObj *obj,u8 biasclamp) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; ptr->tex_filt = (ptr->tex_filt&~0x200000)|(_SHIFTL(biasclamp,21,1)); } void GX_InitTexObjEdgeLOD(GXTexObj *obj,u8 edgelod) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; ptr->tex_filt = (ptr->tex_filt&~0x100)|(_SHIFTL(!(edgelod&0xff),8,1)); } void GX_InitTexObjMaxAniso(GXTexObj *obj,u8 maxaniso) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; ptr->tex_filt = (ptr->tex_filt&~0x180000)|(_SHIFTL(maxaniso,19,2)); } void GX_InitTexObjUserData(GXTexObj *obj,void *userdata) { struct __gx_texobj *ptr = (struct __gx_texobj*)obj; ptr->usr_data = (u32)userdata; } void* GX_GetTexObjUserData(const GXTexObj *obj) { const struct __gx_texobj *ptr = (const struct __gx_texobj*)obj; return (void*)ptr->usr_data; } void GX_InitTlutObj(GXTlutObj *obj,void *lut,u8 fmt,u16 entries) { struct __gx_tlutobj *ptr = (struct __gx_tlutobj*)obj; memset(obj,0,sizeof(GXTlutObj)); ptr->tlut_fmt = _SHIFTL(fmt,10,2); ptr->tlut_maddr = (ptr->tlut_maddr&~0x00ffffff)|(_SHIFTR(MEM_VIRTUAL_TO_PHYSICAL(lut),5,24)); ptr->tlut_maddr = (ptr->tlut_maddr&~0xff000000)|(_SHIFTL(0x64,24,8)); ptr->tlut_nentries = entries; } void GX_LoadTexObj(GXTexObj *obj,u8 mapid) { GXTexRegion *region = NULL; if(regionCB) region = regionCB(obj,mapid); GX_LoadTexObjPreloaded(obj,region,mapid); } void GX_LoadTexObjPreloaded(GXTexObj *obj,GXTexRegion *region,u8 mapid) { u8 type; struct __gx_tlutregion *tlut = NULL; struct __gx_texobj *ptr = (struct __gx_texobj*)obj; struct __gx_texregion *reg = (struct __gx_texregion*)region; ptr->tex_filt = (ptr->tex_filt&~0xff000000)|(_SHIFTL(_gxtexmode0ids[mapid],24,8)); ptr->tex_lod = (ptr->tex_lod&~0xff000000)|(_SHIFTL(_gxtexmode1ids[mapid],24,8)); ptr->tex_size = (ptr->tex_size&~0xff000000)|(_SHIFTL(_gxteximg0ids[mapid],24,8)); ptr->tex_maddr = (ptr->tex_maddr&~0xff000000)|(_SHIFTL(_gxteximg3ids[mapid],24,8)); reg->tmem_even = (reg->tmem_even&~0xff000000)|(_SHIFTL(_gxteximg1ids[mapid],24,8)); reg->tmem_odd = (reg->tmem_odd&~0xff000000)|(_SHIFTL(_gxteximg2ids[mapid],24,8)); GX_LOAD_BP_REG(ptr->tex_filt); GX_LOAD_BP_REG(ptr->tex_lod); GX_LOAD_BP_REG(ptr->tex_size); GX_LOAD_BP_REG(reg->tmem_even); GX_LOAD_BP_REG(reg->tmem_odd); GX_LOAD_BP_REG(ptr->tex_maddr); type = ptr->tex_flag; if(!(type&0x02)) { if(tlut_regionCB) tlut = (struct __gx_tlutregion*)tlut_regionCB(ptr->tex_tlut); tlut->tmem_addr_base = (tlut->tmem_addr_base&~0xff000000)|(_SHIFTL(_gxtextlutids[mapid],24,8)); GX_LOAD_BP_REG(tlut->tmem_addr_base); } __gx->texMapSize[mapid] = ptr->tex_size; __gx->texMapWrap[mapid] = ptr->tex_filt; __gx->dirtyState |= 0x0001; } void GX_PreloadEntireTexture(GXTexObj *obj,GXTexRegion *region) { u32 i,fmt; s32 wd,ht; u16 cnt = 0; u32 regA = 0; u32 regB = 0; u32 regC = 0; u32 regD = 0; struct __gx_texobj *ptr = (struct __gx_texobj*)obj; struct __gx_texregion *reg = (struct __gx_texregion*)region; regA = (regA&~0xff000000)|(_SHIFTL(0x60,24,8)); regA = (regA&~0x00ffffff)|(ptr->tex_maddr&~0xff000000); regB = (regB&~0xff000000)|(_SHIFTL(0x61,24,8)); regB = (regB&~0x00007fff)|(reg->tmem_even&0x00007fff); regC = (regC&~0xff000000)|(_SHIFTL(0x62,24,8)); regC = (regC&~0x00007fff)|(reg->tmem_odd&0x00007fff); regD = (regD&~0xff000000)|(_SHIFTL(0x63,24,8)); regD = (regD&~0x00007fff)|(ptr->tex_tile_cnt&0x00007fff); regD = (regD&~0x00018000)|(_SHIFTL(ptr->tex_tile_type,15,2)); fmt = _SHIFTR(ptr->tex_size,20,4); __GX_FlushTextureState(); GX_LOAD_BP_REG(regA); GX_LOAD_BP_REG(regB); GX_LOAD_BP_REG(regC); GX_LOAD_BP_REG(regD); if(ptr->tex_flag&0x01) { wd = (ptr->tex_size&0x3ff)+1; ht = _SHIFTR(ptr->tex_size,10,10)+1; if(wd>ht) cnt = (31 - (cntlzw(wd))); else cnt = (31 - (cntlzw(ht))); } if(cnt>0) { u32 tmem_even,tmem_odd,maddr; u32 tile_cnt = ptr->tex_tile_cnt; tmem_even = (reg->tmem_even&0xffff); tmem_odd = (reg->tmem_odd&0xffff); maddr = (ptr->tex_maddr&~0xff000000); i = 0; while(cnt) { u32 w,h; u32 te,to; u32 xshift,yshift; if(fmt==GX_TF_RGBA8) { tmem_even += tile_cnt; tmem_odd += tile_cnt; maddr += (tile_cnt<<1); } else { maddr += tile_cnt; if(i&1) tmem_odd += tile_cnt; else tmem_even += tile_cnt; } te = tmem_even; to = tmem_odd; if(i&1) { te = tmem_odd; to = tmem_even; } w = wd>>(i+1); h = wd>>(i+1); switch(ptr->tex_fmt) { case GX_TF_I4: case GX_TF_IA4: case GX_TF_CI4: case GX_TF_CMPR: xshift = 3; yshift = 3; break; case GX_TF_I8: case GX_TF_CI8: xshift = 3; yshift = 2; break; case GX_TF_IA8: case GX_TF_RGB5A3: case GX_TF_RGB565: case GX_TF_CI14: xshift = 2; yshift = 2; break; default: xshift = 0; yshift = 0; break; } if(!w) w = 1; if(!h) h = 1; regA = ((regA&~0x00ffffff)|(maddr&0x00ffffff)); GX_LOAD_BP_REG(regA); regB = ((regB&~0x00007fff)|(te&0x00007fff)); GX_LOAD_BP_REG(regB); regC = ((regC&~0x00007fff)|(to&0x00007fff)); GX_LOAD_BP_REG(regC); tile_cnt = (((w+(1<<xshift))-1)>>xshift)*(((h+(1<<yshift))-1)>>yshift); regD = ((regD&~0x00007fff)|(tile_cnt&0x00007fff)); GX_LOAD_BP_REG(regD); ++i; --cnt; } } __GX_FlushTextureState(); } void GX_InvalidateTexAll(void) { __GX_FlushTextureState(); GX_LOAD_BP_REG(0x66001000); GX_LOAD_BP_REG(0x66001100); __GX_FlushTextureState(); } void GX_InvalidateTexRegion(GXTexRegion *region) { u8 ismipmap; s32 cw_e,ch_e,cw_o,ch_o; u32 size,tmp,regvalA = 0,regvalB = 0; struct __gx_texregion *ptr = (struct __gx_texregion*)region; cw_e = (_SHIFTR(ptr->tmem_even,15,3))-1; ch_e = (_SHIFTR(ptr->tmem_even,18,3))-1; cw_o = (_SHIFTR(ptr->tmem_odd,15,3))-1; ch_o = (_SHIFTR(ptr->tmem_odd,18,3))-1; if(cw_e<0) cw_e = 0; if(ch_e<0) ch_e = 0; if(cw_o<0) cw_o = 0; if(ch_o<0) ch_o = 0; ismipmap = ptr->ismipmap; tmp = size = cw_e+ch_e; if(ismipmap) size = (tmp+cw_o+ch_o)-2; regvalA = _SHIFTR((ptr->tmem_even&0x7fff),6,9)|(_SHIFTL(size,9,4))|(_SHIFTL(0x66,24,8)); if(cw_o!=0) { size = cw_o+ch_o; if(ismipmap) size += (tmp-2); regvalB = _SHIFTR((ptr->tmem_odd&0x7fff),6,9)|(_SHIFTL(size,9,4))|(_SHIFTL(0x66,24,8)); } __GX_FlushTextureState(); GX_LOAD_BP_REG(regvalA); if(cw_o!=0) GX_LOAD_BP_REG(regvalB); __GX_FlushTextureState(); } void GX_LoadTlut(GXTlutObj *obj,u32 tlut_name) { struct __gx_tlutregion *region = NULL; struct __gx_tlutobj *ptr = (struct __gx_tlutobj*)obj; if(tlut_regionCB) region = (struct __gx_tlutregion*)tlut_regionCB(tlut_name); __GX_FlushTextureState(); GX_LOAD_BP_REG(ptr->tlut_maddr); GX_LOAD_BP_REG(region->tmem_addr_conf); __GX_FlushTextureState(); region->tmem_addr_base = (ptr->tlut_fmt&~0x3ff)|(region->tmem_addr_conf&0x3ff); region->tlut_maddr = ptr->tlut_maddr; region->tlut_nentries = ptr->tlut_nentries; } void GX_SetTexCoordScaleManually(u8 texcoord,u8 enable,u16 ss,u16 ts) { u32 reg; __gx->texCoordManually = (__gx->texCoordManually&~(_SHIFTL(1,texcoord,1)))|(_SHIFTL(enable,texcoord,1)); if(!enable) return; reg = (texcoord&0x7); __gx->suSsize[reg] = (__gx->suSsize[reg]&~0xffff)|((ss-1)&0xffff); __gx->suTsize[reg] = (__gx->suTsize[reg]&~0xffff)|((ts-1)&0xffff); GX_LOAD_BP_REG(__gx->suSsize[reg]); GX_LOAD_BP_REG(__gx->suTsize[reg]); } void GX_SetTexCoordCylWrap(u8 texcoord,u8 s_enable,u8 t_enable) { u32 reg; reg = (texcoord&0x7); __gx->suSsize[reg] = (__gx->suSsize[reg]&~0x20000)|(_SHIFTL(s_enable,17,1)); __gx->suTsize[reg] = (__gx->suTsize[reg]&~0x20000)|(_SHIFTL(t_enable,17,1)); if(!(__gx->texCoordManually&(_SHIFTL(1,texcoord,1)))) return; GX_LOAD_BP_REG(__gx->suSsize[reg]); GX_LOAD_BP_REG(__gx->suTsize[reg]); } void GX_SetTexCoordBias(u8 texcoord,u8 s_enable,u8 t_enable) { u32 reg; reg = (texcoord&0x7); __gx->suSsize[reg] = (__gx->suSsize[reg]&~0x10000)|(_SHIFTL(s_enable,16,1)); __gx->suTsize[reg] = (__gx->suTsize[reg]&~0x10000)|(_SHIFTL(t_enable,16,1)); if(!(__gx->texCoordManually&(_SHIFTL(1,texcoord,1)))) return; GX_LOAD_BP_REG(__gx->suSsize[reg]); GX_LOAD_BP_REG(__gx->suTsize[reg]); } GXTexRegionCallback GX_SetTexRegionCallback(GXTexRegionCallback cb) { u32 level; GXTexRegionCallback ret; _CPU_ISR_Disable(level); ret = regionCB; regionCB = cb; _CPU_ISR_Restore(level); return ret; } GXTlutRegionCallback GX_SetTlutRegionCallback(GXTlutRegionCallback cb) { u32 level; GXTlutRegionCallback ret; _CPU_ISR_Disable(level); ret = tlut_regionCB; tlut_regionCB = cb; _CPU_ISR_Restore(level); return ret; } void GX_SetBlendMode(u8 type,u8 src_fact,u8 dst_fact,u8 op) { __gx->peCMode0 = (__gx->peCMode0&~0x1); if(type==GX_BM_BLEND || type==GX_BM_SUBTRACT) __gx->peCMode0 |= 0x1; __gx->peCMode0 = (__gx->peCMode0&~0x800); if(type==GX_BM_SUBTRACT) __gx->peCMode0 |= 0x800; __gx->peCMode0 = (__gx->peCMode0&~0x2); if(type==GX_BM_LOGIC) __gx->peCMode0 |= 0x2; __gx->peCMode0 = (__gx->peCMode0&~0xF000)|(_SHIFTL(op,12,4)); __gx->peCMode0 = (__gx->peCMode0&~0xE0)|(_SHIFTL(dst_fact,5,3)); __gx->peCMode0 = (__gx->peCMode0&~0x700)|(_SHIFTL(src_fact,8,3)); GX_LOAD_BP_REG(__gx->peCMode0); } void GX_ClearVtxDesc(void) { __gx->vcdNrms = 0; __gx->vcdClear = ((__gx->vcdClear&~0x0600)|0x0200); __gx->vcdLo = __gx->vcdHi = 0; __gx->dirtyState |= 0x0008; } void GX_SetLineWidth(u8 width,u8 fmt) { __gx->lpWidth = (__gx->lpWidth&~0xff)|(width&0xff); __gx->lpWidth = (__gx->lpWidth&~0x70000)|(_SHIFTL(fmt,16,3)); GX_LOAD_BP_REG(__gx->lpWidth); } void GX_SetPointSize(u8 width,u8 fmt) { __gx->lpWidth = (__gx->lpWidth&~0xFF00)|(_SHIFTL(width,8,8)); __gx->lpWidth = (__gx->lpWidth&~0x380000)|(_SHIFTL(fmt,19,3)); GX_LOAD_BP_REG(__gx->lpWidth); } void GX_SetTevColor(u8 tev_regid,GXColor color) { u32 reg; reg = (_SHIFTL((0xe0+(tev_regid<<1)),24,8)|(_SHIFTL(color.a,12,8))|(color.r&0xff)); GX_LOAD_BP_REG(reg); reg = (_SHIFTL((0xe1+(tev_regid<<1)),24,8)|(_SHIFTL(color.g,12,8))|(color.b&0xff)); GX_LOAD_BP_REG(reg); //this two calls should obviously flush the Write Gather Pipe. GX_LOAD_BP_REG(reg); GX_LOAD_BP_REG(reg); } void GX_SetTevColorS10(u8 tev_regid,GXColorS10 color) { u32 reg; reg = (_SHIFTL((0xe0+(tev_regid<<1)),24,8)|(_SHIFTL(color.a,12,11))|(color.r&0x7ff)); GX_LOAD_BP_REG(reg); reg = (_SHIFTL((0xe1+(tev_regid<<1)),24,8)|(_SHIFTL(color.g,12,11))|(color.b&0x7ff)); GX_LOAD_BP_REG(reg); //this two calls should obviously flush the Write Gather Pipe. GX_LOAD_BP_REG(reg); GX_LOAD_BP_REG(reg); } void GX_SetTevKColor(u8 tev_kregid,GXColor color) { u32 reg; reg = (_SHIFTL((0xe0+(tev_kregid<<1)),24,8)|(_SHIFTL(1,23,1))|(_SHIFTL(color.a,12,8))|(color.r&0xff)); GX_LOAD_BP_REG(reg); reg = (_SHIFTL((0xe1+(tev_kregid<<1)),24,8)|(_SHIFTL(1,23,1))|(_SHIFTL(color.g,12,8))|(color.b&0xff)); GX_LOAD_BP_REG(reg); //this two calls should obviously flush the Write Gather Pipe. GX_LOAD_BP_REG(reg); GX_LOAD_BP_REG(reg); } void GX_SetTevKColorS10(u8 tev_kregid,GXColorS10 color) { u32 reg; reg = (_SHIFTL((0xe0+(tev_kregid<<1)),24,8)|(_SHIFTL(1,23,1))|(_SHIFTL(color.a,12,11))|(color.r&0x7ff)); GX_LOAD_BP_REG(reg); reg = (_SHIFTL((0xe1+(tev_kregid<<1)),24,8)|(_SHIFTL(1,23,1))|(_SHIFTL(color.g,12,11))|(color.b&0x7ff)); GX_LOAD_BP_REG(reg); //this two calls should obviously flush the Write Gather Pipe. GX_LOAD_BP_REG(reg); GX_LOAD_BP_REG(reg); } void GX_SetTevOp(u8 tevstage,u8 mode) { u8 defcolor = GX_CC_RASC; u8 defalpha = GX_CA_RASA; if(tevstage!=GX_TEVSTAGE0) { defcolor = GX_CC_CPREV; defalpha = GX_CA_APREV; } switch(mode) { case GX_MODULATE: GX_SetTevColorIn(tevstage,GX_CC_ZERO,GX_CC_TEXC,defcolor,GX_CC_ZERO); GX_SetTevAlphaIn(tevstage,GX_CA_ZERO,GX_CA_TEXA,defalpha,GX_CA_ZERO); break; case GX_DECAL: GX_SetTevColorIn(tevstage,defcolor,GX_CC_TEXC,GX_CC_TEXA,GX_CC_ZERO); GX_SetTevAlphaIn(tevstage,GX_CA_ZERO,GX_CA_ZERO,GX_CA_ZERO,defalpha); break; case GX_BLEND: GX_SetTevColorIn(tevstage,defcolor,GX_CC_ONE,GX_CC_TEXC,GX_CC_ZERO); GX_SetTevAlphaIn(tevstage,GX_CA_ZERO,GX_CA_TEXA,defalpha,GX_CA_RASA); break; case GX_REPLACE: GX_SetTevColorIn(tevstage,GX_CC_ZERO,GX_CC_ZERO,GX_CC_ZERO,GX_CC_TEXC); GX_SetTevAlphaIn(tevstage,GX_CA_ZERO,GX_CA_ZERO,GX_CA_ZERO,GX_CA_TEXA); break; case GX_PASSCLR: GX_SetTevColorIn(tevstage,GX_CC_ZERO,GX_CC_ZERO,GX_CC_ZERO,defcolor); GX_SetTevAlphaIn(tevstage,GX_CC_A2,GX_CC_A2,GX_CC_A2,defalpha); break; } GX_SetTevColorOp(tevstage,GX_TEV_ADD,GX_TB_ZERO,GX_CS_SCALE_1,GX_TRUE,GX_TEVPREV); GX_SetTevAlphaOp(tevstage,GX_TEV_ADD,GX_TB_ZERO,GX_CS_SCALE_1,GX_TRUE,GX_TEVPREV); } void GX_SetTevColorIn(u8 tevstage,u8 a,u8 b,u8 c,u8 d) { u32 reg = (tevstage&0xf); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0xF000)|(_SHIFTL(a,12,4)); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0xF00)|(_SHIFTL(b,8,4)); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0xF0)|(_SHIFTL(c,4,4)); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0xf)|(d&0xf); GX_LOAD_BP_REG(__gx->tevColorEnv[reg]); } void GX_SetTevAlphaIn(u8 tevstage,u8 a,u8 b,u8 c,u8 d) { u32 reg = (tevstage&0xf); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0xE000)|(_SHIFTL(a,13,3)); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x1C00)|(_SHIFTL(b,10,3)); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x380)|(_SHIFTL(c,7,3)); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x70)|(_SHIFTL(d,4,3)); GX_LOAD_BP_REG(__gx->tevAlphaEnv[reg]); } void GX_SetTevColorOp(u8 tevstage,u8 tevop,u8 tevbias,u8 tevscale,u8 clamp,u8 tevregid) { /* set tev op add/sub*/ u32 reg = (tevstage&0xf); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0x40000)|(_SHIFTL(tevop,18,1)); if(tevop<=GX_TEV_SUB) { __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0x300000)|(_SHIFTL(tevscale,20,2)); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0x30000)|(_SHIFTL(tevbias,16,2)); } else { __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0x300000)|((_SHIFTL(tevop,19,4))&0x300000); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0x30000)|0x30000; } __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0x80000)|(_SHIFTL(clamp,19,1)); __gx->tevColorEnv[reg] = (__gx->tevColorEnv[reg]&~0xC00000)|(_SHIFTL(tevregid,22,2)); GX_LOAD_BP_REG(__gx->tevColorEnv[reg]); } void GX_SetTevAlphaOp(u8 tevstage,u8 tevop,u8 tevbias,u8 tevscale,u8 clamp,u8 tevregid) { /* set tev op add/sub*/ u32 reg = (tevstage&0xf); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x40000)|(_SHIFTL(tevop,18,1)); if(tevop<=GX_TEV_SUB) { __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x300000)|(_SHIFTL(tevscale,20,2)); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x30000)|(_SHIFTL(tevbias,16,2)); } else { __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x300000)|((_SHIFTL(tevop,19,4))&0x300000); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x30000)|0x30000; } __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x80000)|(_SHIFTL(clamp,19,1)); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0xC00000)|(_SHIFTL(tevregid,22,2)); GX_LOAD_BP_REG(__gx->tevAlphaEnv[reg]); } void GX_SetCullMode(u8 mode) { static const u8 cm2hw[] = { 0, 2, 1, 3 }; __gx->genMode = (__gx->genMode&~0xC000)|(_SHIFTL(cm2hw[mode],14,2)); __gx->dirtyState |= 0x0004; } void GX_SetCoPlanar(u8 enable) { __gx->genMode = (__gx->genMode&~0x80000)|(_SHIFTL(enable,19,1)); GX_LOAD_BP_REG(0xFE080000); GX_LOAD_BP_REG(__gx->genMode); } void GX_EnableTexOffsets(u8 coord,u8 line_enable,u8 point_enable) { u32 reg = (coord&0x7); __gx->suSsize[reg] = (__gx->suSsize[reg]&~0x40000)|(_SHIFTL(line_enable,18,1)); __gx->suSsize[reg] = (__gx->suSsize[reg]&~0x80000)|(_SHIFTL(point_enable,19,1)); GX_LOAD_BP_REG(__gx->suSsize[reg]); } void GX_SetClipMode(u8 mode) { GX_LOAD_XF_REG(0x1005,(mode&1)); } void GX_SetScissor(u32 xOrigin,u32 yOrigin,u32 wd,u32 ht) { u32 xo = xOrigin+0x156; u32 yo = yOrigin+0x156; u32 nwd = xo+(wd-1); u32 nht = yo+(ht-1); __gx->sciTLcorner = (__gx->sciTLcorner&~0x7ff)|(yo&0x7ff); __gx->sciTLcorner = (__gx->sciTLcorner&~0x7FF000)|(_SHIFTL(xo,12,11)); __gx->sciBRcorner = (__gx->sciBRcorner&~0x7ff)|(nht&0xfff); __gx->sciBRcorner = (__gx->sciBRcorner&~0x7FF000)|(_SHIFTL(nwd,12,11)); GX_LOAD_BP_REG(__gx->sciTLcorner); GX_LOAD_BP_REG(__gx->sciBRcorner); } void GX_SetScissorBoxOffset(s32 xoffset,s32 yoffset) { s32 xoff = _SHIFTR((xoffset+0x156),1,24); s32 yoff = _SHIFTR((yoffset+0x156),1,24); GX_LOAD_BP_REG((0x59000000|(_SHIFTL(yoff,10,10))|(xoff&0x3ff))); } void GX_SetNumChans(u8 num) { __gx->genMode = (__gx->genMode&~0x70)|(_SHIFTL(num,4,3)); __gx->dirtyState |= 0x01000004; } void GX_SetTevOrder(u8 tevstage,u8 texcoord,u32 texmap,u8 color) { u8 colid; u32 texm,texc,tmp; u32 reg = 3+(_SHIFTR(tevstage,1,3)); __gx->tevTexMap[(tevstage&0xf)] = texmap; texm = (texmap&~0x100); if(texm>=GX_MAX_TEXMAP) texm = 0; if(texcoord>=GX_MAXCOORD) { texc = 0; __gx->tevTexCoordEnable &= ~(_SHIFTL(1,tevstage,1)); } else { texc = texcoord; __gx->tevTexCoordEnable |= (_SHIFTL(1,tevstage,1)); } if(tevstage&1) { __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x7000)|(_SHIFTL(texm,12,3)); __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x38000)|(_SHIFTL(texc,15,3)); colid = GX_ALPHA_BUMP; if(color!=GX_COLORNULL) colid = _gxtevcolid[color]; __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x380000)|(_SHIFTL(colid,19,3)); tmp = 1; if(texmap==GX_TEXMAP_NULL || texmap&0x100) tmp = 0; __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x40000)|(_SHIFTL(tmp,18,1)); } else { __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x7)|(texm&0x7); __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x38)|(_SHIFTL(texc,3,3)); colid = GX_ALPHA_BUMP; if(color!=GX_COLORNULL) colid = _gxtevcolid[color]; __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x380)|(_SHIFTL(colid,7,3)); tmp = 1; if(texmap==GX_TEXMAP_NULL || texmap&0x100) tmp = 0; __gx->tevRasOrder[reg] = (__gx->tevRasOrder[reg]&~0x40)|(_SHIFTL(tmp,6,1)); } GX_LOAD_BP_REG(__gx->tevRasOrder[reg]); __gx->dirtyState |= 0x0001; } void GX_SetNumTevStages(u8 num) { __gx->genMode = (__gx->genMode&~0x3C00)|(_SHIFTL((num-1),10,4)); __gx->dirtyState |= 0x0004; } void GX_SetAlphaCompare(u8 comp0,u8 ref0,u8 aop,u8 comp1,u8 ref1) { u32 val = 0; val = (_SHIFTL(aop,22,2))|(_SHIFTL(comp1,19,3))|(_SHIFTL(comp0,16,3))|(_SHIFTL(ref1,8,8))|(ref0&0xff); GX_LOAD_BP_REG(0xf3000000|val); } void GX_SetTevKColorSel(u8 tevstage,u8 sel) { u32 reg = (_SHIFTR(tevstage,1,3)); if(tevstage&1) __gx->tevSwapModeTable[reg] = (__gx->tevSwapModeTable[reg]&~0x7C000)|(_SHIFTL(sel,14,5)); else __gx->tevSwapModeTable[reg] = (__gx->tevSwapModeTable[reg]&~0x1F0)|(_SHIFTL(sel,4,5)); GX_LOAD_BP_REG(__gx->tevSwapModeTable[reg]); } void GX_SetTevKAlphaSel(u8 tevstage,u8 sel) { u32 reg = (_SHIFTR(tevstage,1,3)); if(tevstage&1) __gx->tevSwapModeTable[reg] = (__gx->tevSwapModeTable[reg]&~0xF80000)|(_SHIFTL(sel,19,5)); else __gx->tevSwapModeTable[reg] = (__gx->tevSwapModeTable[reg]&~0x3E00)|(_SHIFTL(sel,9,5)); GX_LOAD_BP_REG(__gx->tevSwapModeTable[reg]); } void GX_SetTevSwapMode(u8 tevstage,u8 ras_sel,u8 tex_sel) { u32 reg = (tevstage&0xf); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0x3)|(ras_sel&0x3); __gx->tevAlphaEnv[reg] = (__gx->tevAlphaEnv[reg]&~0xC)|(_SHIFTL(tex_sel,2,2)); GX_LOAD_BP_REG(__gx->tevAlphaEnv[reg]); } void GX_SetTevSwapModeTable(u8 swapid,u8 r,u8 g,u8 b,u8 a) { u32 regA = 0+(_SHIFTL(swapid,1,3)); u32 regB = 1+(_SHIFTL(swapid,1,3)); __gx->tevSwapModeTable[regA] = (__gx->tevSwapModeTable[regA]&~0x3)|(r&0x3); __gx->tevSwapModeTable[regA] = (__gx->tevSwapModeTable[regA]&~0xC)|(_SHIFTL(g,2,2)); GX_LOAD_BP_REG(__gx->tevSwapModeTable[regA]); __gx->tevSwapModeTable[regB] = (__gx->tevSwapModeTable[regB]&~0x3)|(b&0x3); __gx->tevSwapModeTable[regB] = (__gx->tevSwapModeTable[regB]&~0xC)|(_SHIFTL(a,2,2)); GX_LOAD_BP_REG(__gx->tevSwapModeTable[regB]); } void GX_SetTevIndirect(u8 tevstage,u8 indtexid,u8 format,u8 bias,u8 mtxid,u8 wrap_s,u8 wrap_t,u8 addprev,u8 utclod,u8 a) { u32 val = (0x10000000|(_SHIFTL(tevstage,24,4)))|(indtexid&3)|(_SHIFTL(format,2,2))|(_SHIFTL(bias,4,3))|(_SHIFTL(a,7,2))|(_SHIFTL(mtxid,9,4))|(_SHIFTL(wrap_s,13,3))|(_SHIFTL(wrap_t,16,3))|(_SHIFTL(utclod,19,1))|(_SHIFTL(addprev,20,1)); GX_LOAD_BP_REG(val); } void GX_SetTevDirect(u8 tevstage) { GX_SetTevIndirect(tevstage,GX_INDTEXSTAGE0,GX_ITF_8,GX_ITB_NONE,GX_ITM_OFF,GX_ITW_OFF,GX_ITW_OFF,GX_FALSE,GX_FALSE,GX_ITBA_OFF); } void GX_SetNumIndStages(u8 nstages) { __gx->genMode = (__gx->genMode&~0x70000)|(_SHIFTL(nstages,16,3)); __gx->dirtyState |= 0x0006; } void GX_SetIndTexMatrix(u8 indtexmtx,f32 offset_mtx[2][3],s8 scale_exp) { u32 ma,mb; u32 val,s,idx; if(indtexmtx>0x00 && indtexmtx<0x04) indtexmtx -= 0x01; else if(indtexmtx>0x04 && indtexmtx<0x08) indtexmtx -= 0x05; else if(indtexmtx>0x08 && indtexmtx<0x0C) indtexmtx -= 0x09; else indtexmtx = 0x00; s = (scale_exp+17); idx = ((indtexmtx<<2)-indtexmtx); ma = (u32)(offset_mtx[0][0]*1024.0F); mb = (u32)(offset_mtx[1][0]*1024.0F); val = (_SHIFTL((0x06+idx),24,8)|_SHIFTL(s,22,2)|_SHIFTL(mb,11,11)|_SHIFTL(ma,0,11)); GX_LOAD_BP_REG(val); ma = (u32)(offset_mtx[0][1]*1024.0F); mb = (u32)(offset_mtx[1][1]*1024.0F); val = (_SHIFTL((0x07+idx),24,8)|_SHIFTL((s>>2),22,2)|_SHIFTL(mb,11,11)|_SHIFTL(ma,0,11)); GX_LOAD_BP_REG(val); ma = (u32)(offset_mtx[0][2]*1024.0F); mb = (u32)(offset_mtx[1][2]*1024.0F); val = (_SHIFTL((0x08+idx),24,8)|_SHIFTL((s>>4),22,2)|_SHIFTL(mb,11,11)|_SHIFTL(ma,0,11)); GX_LOAD_BP_REG(val); } void GX_SetTevIndBumpST(u8 tevstage,u8 indstage,u8 mtx_sel) { u8 sel_s,sel_t; switch(mtx_sel) { case GX_ITM_0: sel_s = GX_ITM_S0; sel_t = GX_ITM_T0; break; case GX_ITM_1: sel_s = GX_ITM_S1; sel_t = GX_ITM_T1; break; case GX_ITM_2: sel_s = GX_ITM_S2; sel_t = GX_ITM_T2; break; default: sel_s = GX_ITM_OFF; sel_t = GX_ITM_OFF; break; } GX_SetTevIndirect((tevstage+0),indstage,GX_ITF_8,GX_ITB_ST,sel_s,GX_ITW_0,GX_ITW_0,GX_FALSE,GX_FALSE,GX_ITBA_OFF); GX_SetTevIndirect((tevstage+1),indstage,GX_ITF_8,GX_ITB_ST,sel_t,GX_ITW_0,GX_ITW_0,GX_TRUE,GX_FALSE,GX_ITBA_OFF); GX_SetTevIndirect((tevstage+2),indstage,GX_ITF_8,GX_ITB_NONE,GX_ITM_OFF,GX_ITW_OFF,GX_ITW_OFF,GX_TRUE,GX_FALSE,GX_ITBA_OFF); } void GX_SetTevIndBumpXYZ(u8 tevstage,u8 indstage,u8 mtx_sel) { GX_SetTevIndirect(tevstage,indstage,GX_ITF_8,GX_ITB_STU,mtx_sel,GX_ITW_OFF,GX_ITW_OFF,GX_FALSE,GX_FALSE,GX_ITBA_OFF); } void GX_SetTevIndRepeat(u8 tevstage) { GX_SetTevIndirect(tevstage,GX_INDTEXSTAGE0,GX_ITF_8,GX_ITB_NONE,GX_ITM_OFF,GX_ITW_0,GX_ITW_0,GX_TRUE,GX_FALSE,GX_ITBA_OFF); } void GX_SetIndTexCoordScale(u8 indtexid,u8 scale_s,u8 scale_t) { switch(indtexid) { case GX_INDTEXSTAGE0: __gx->tevRasOrder[0] = (__gx->tevRasOrder[0]&~0x0f)|(scale_s&0x0f); __gx->tevRasOrder[0] = (__gx->tevRasOrder[0]&~0xF0)|(_SHIFTL(scale_t,4,4)); GX_LOAD_BP_REG(__gx->tevRasOrder[0]); break; case GX_INDTEXSTAGE1: __gx->tevRasOrder[0] = (__gx->tevRasOrder[0]&~0xF00)|(_SHIFTL(scale_s,8,4)); __gx->tevRasOrder[0] = (__gx->tevRasOrder[0]&~0xF000)|(_SHIFTL(scale_t,12,4)); GX_LOAD_BP_REG(__gx->tevRasOrder[0]); break; case GX_INDTEXSTAGE2: __gx->tevRasOrder[1] = (__gx->tevRasOrder[1]&~0x0f)|(scale_s&0x0f); __gx->tevRasOrder[1] = (__gx->tevRasOrder[1]&~0xF0)|(_SHIFTL(scale_t,4,4)); GX_LOAD_BP_REG(__gx->tevRasOrder[1]); break; case GX_INDTEXSTAGE3: __gx->tevRasOrder[1] = (__gx->tevRasOrder[1]&~0xF00)|(_SHIFTL(scale_s,8,4)); __gx->tevRasOrder[1] = (__gx->tevRasOrder[1]&~0xF000)|(_SHIFTL(scale_t,12,4)); GX_LOAD_BP_REG(__gx->tevRasOrder[1]); break; } } void GX_SetTevIndWarp(u8 tevstage, u8 indtexid, u8 bias_flag, u8 replace_tex, u8 mtxid) { u8 wrap = GX_ITW_OFF; u8 bias = GX_ITB_NONE; if(replace_tex) { wrap = GX_ITW_0; } if(bias_flag) { bias = GX_ITB_STU; } GX_SetTevIndirect(tevstage, indtexid, GX_ITF_8, bias, mtxid, wrap, wrap, GX_FALSE, GX_FALSE, GX_ITBA_OFF); } void GX_SetTevIndTile(u8 tevstage,u8 indtexid,u16 tilesize_x,u16 tilesize_y,u16 tilespacing_x,u16 tilespacing_y,u8 indtexfmt,u8 indtexmtx,u8 bias_sel,u8 alpha_sel) { s32 wrap_s,wrap_t; f32 offset_mtx[2][3]; f64 fdspace_x,fdspace_y; u32 fbuf_x[2] = { 0x43300000,tilespacing_x }; u32 fbuf_y[2] = { 0x43300000,tilespacing_y }; wrap_s = GX_ITW_OFF; if(tilesize_x==0x0010) wrap_s = GX_ITW_16; else if(tilesize_x==0x0020) wrap_s = GX_ITW_32; else if(tilesize_x==0x0040) wrap_s = GX_ITW_64; else if(tilesize_x==0x0080) wrap_s = GX_ITW_128; else if(tilesize_x==0x0100) wrap_s = GX_ITW_256; wrap_t = GX_ITW_OFF; if(tilesize_y==0x0010) wrap_t = GX_ITW_16; else if(tilesize_y==0x0020) wrap_t = GX_ITW_32; else if(tilesize_y==0x0040) wrap_t = GX_ITW_64; else if(tilesize_y==0x0080) wrap_t = GX_ITW_128; else if(tilesize_y==0x0100) wrap_t = GX_ITW_256; fdspace_x = *(f64*)((void*)fbuf_x); fdspace_y = *(f64*)((void*)fbuf_y); offset_mtx[0][0] = (f32)((fdspace_x - 4503599627370496.0F)*0.00097656250F); offset_mtx[0][1] = 0.0F; offset_mtx[0][2] = 0.0F; offset_mtx[1][0] = 0.0F; offset_mtx[1][1] = (f32)((fdspace_y - 4503599627370496.0F)*0.00097656250F); offset_mtx[1][2] = 0.0F; GX_SetIndTexMatrix(indtexmtx,offset_mtx,10); GX_SetTevIndirect(tevstage,indtexid,indtexfmt,bias_sel,indtexmtx,wrap_s,wrap_t,GX_FALSE,GX_TRUE,alpha_sel); } void GX_SetFog(u8 type,f32 startz,f32 endz,f32 nearz,f32 farz,GXColor col) { f32 A, B, B_mant, C, A_f; u32 b_expn, b_m, a_hex, c_hex,val,proj = 0; union ieee32 { f32 f; u32 i; } v; proj = _SHIFTR(type,3,1); // Calculate constants a, b, and c (TEV HW requirements). if(proj) { // Orthographic Fog Type if((farz==nearz) || (endz==startz)) { // take care of the odd-ball case. A_f = 0.0f; C = 0.0f; } else { A = 1.0f/(endz-startz); A_f = (farz-nearz) * A; C = (startz-nearz) * A; } b_expn = 0; b_m = 0; } else { // Perspective Fog Type // Calculate constants a, b, and c (TEV HW requirements). if((farz==nearz) || (endz==startz)) { // take care of the odd-ball case. A = 0.0f; B = 0.5f; C = 0.0f; } else { A = (farz*nearz)/((farz-nearz)*(endz-startz)); B = farz/(farz-nearz); C = startz/(endz-startz); } B_mant = B; b_expn = 1; while(B_mant>1.0f) { B_mant /= 2.0f; b_expn++; } while((B_mant>0.0f) && (B_mant<0.5f)) { B_mant *= 2.0f; b_expn--; } A_f = A/(1<<(b_expn)); b_m = (u32)(B_mant * 8388638.0f); } v.f = A_f; a_hex = v.i; v.f = C; c_hex = v.i; val = 0xee000000|(_SHIFTR(a_hex,12,20)); GX_LOAD_BP_REG(val); val = 0xef000000|(b_m&0x00ffffff); GX_LOAD_BP_REG(val); val = 0xf0000000|(b_expn&0x1f); GX_LOAD_BP_REG(val); val = 0xf1000000|(_SHIFTL(type,21,3))|(_SHIFTL(proj,20,1))|(_SHIFTR(c_hex,12,20)); GX_LOAD_BP_REG(val); val = 0xf2000000|(_SHIFTL(col.r,16,8))|(_SHIFTL(col.g,8,8))|(col.b&0xff); GX_LOAD_BP_REG(val); } void GX_InitFogAdjTable(GXFogAdjTbl *table,u16 width,f32 projmtx[4][4]) { u32 i,val7; f32 val0,val1,val2,val4,val5,val6; if(projmtx[3][3]==0.0f) { val0 = projmtx[2][3]/(projmtx[2][2] - 1.0f); val1 = val0/projmtx[0][0]; } else { val1 = 1.0f/projmtx[0][0]; val0 = val1*1.7320499f; } val2 = val0*val0; val4 = 2.0f/(f32)width; for(i=0;i<10;i++) { val5 = (i+1)*32.0f; val5 *= val4; val5 *= val1; val5 *= val5; val5 /= val2; val6 = sqrtf(val5 + 1.0f); val7 = (u32)(val6*256.0f); table->r[i] = (val7&0x0fff); } } void GX_SetFogRangeAdj(u8 enable,u16 center,GXFogAdjTbl *table) { u32 val; if(enable) { val = 0xe9000000|(_SHIFTL(table->r[1],12,12))|(table->r[0]&0x0fff); GX_LOAD_BP_REG(val); val = 0xea000000|(_SHIFTL(table->r[3],12,12))|(table->r[2]&0x0fff); GX_LOAD_BP_REG(val); val = 0xeb000000|(_SHIFTL(table->r[5],12,12))|(table->r[4]&0x0fff); GX_LOAD_BP_REG(val); val = 0xec000000|(_SHIFTL(table->r[7],12,12))|(table->r[6]&0x0fff); GX_LOAD_BP_REG(val); val = 0xed000000|(_SHIFTL(table->r[9],12,12))|(table->r[8]&0x0fff); GX_LOAD_BP_REG(val); } val = 0xe8000000|(_SHIFTL(enable,10,1))|((center + 342)&0x03ff); GX_LOAD_BP_REG(val); } void GX_SetFogColor(GXColor color) { GX_LOAD_BP_REG(0xf2000000|(_SHIFTL(color.r,16,8)|_SHIFTL(color.g,8,8)|(color.b&0xff))); } void GX_SetColorUpdate(u8 enable) { __gx->peCMode0 = (__gx->peCMode0&~0x8)|(_SHIFTL(enable,3,1)); GX_LOAD_BP_REG(__gx->peCMode0); } void GX_SetAlphaUpdate(u8 enable) { __gx->peCMode0 = (__gx->peCMode0&~0x10)|(_SHIFTL(enable,4,1)); GX_LOAD_BP_REG(__gx->peCMode0); } void GX_SetZCompLoc(u8 before_tex) { __gx->peCntrl = (__gx->peCntrl&~0x40)|(_SHIFTL(before_tex,6,1)); GX_LOAD_BP_REG(__gx->peCntrl); } void GX_SetPixelFmt(u8 pix_fmt,u8 z_fmt) { u8 ms_en = 0; u32 realfmt[8] = {0,1,2,3,4,4,4,5}; __gx->peCntrl = (__gx->peCntrl&~0x7)|(realfmt[pix_fmt]&0x7); __gx->peCntrl = (__gx->peCntrl&~0x38)|(_SHIFTL(z_fmt,3,3)); GX_LOAD_BP_REG(__gx->peCntrl); __gx->dirtyState |= 0x0004; if(pix_fmt==GX_PF_RGB565_Z16) ms_en = 1; __gx->genMode = (__gx->genMode&~0x200)|(_SHIFTL(ms_en,9,1)); if(realfmt[pix_fmt]==GX_PF_Y8) { pix_fmt -= GX_PF_Y8; __gx->peCMode1 = (__gx->peCMode1&~0xC00)|(_SHIFTL(pix_fmt,10,2)); GX_LOAD_BP_REG(__gx->peCMode1); } } void GX_SetDither(u8 dither) { __gx->peCMode0 = (__gx->peCMode0&~0x4)|(_SHIFTL(dither,2,1)); GX_LOAD_BP_REG(__gx->peCMode0); } void GX_SetDstAlpha(u8 enable,u8 a) { __gx->peCMode1 = (__gx->peCMode1&~0xff)|(a&0xff); __gx->peCMode1 = (__gx->peCMode1&~0x100)|(_SHIFTL(enable,8,1)); GX_LOAD_BP_REG(__gx->peCMode1); } void GX_SetFieldMask(u8 even_mask,u8 odd_mask) { u32 val = 0; val = (_SHIFTL(even_mask,1,1))|(odd_mask&1); GX_LOAD_BP_REG(0x44000000|val); } void GX_SetFieldMode(u8 field_mode,u8 half_aspect_ratio) { __gx->lpWidth = (__gx->lpWidth&~0x400000)|(_SHIFTL(half_aspect_ratio,22,1)); GX_LOAD_BP_REG(__gx->lpWidth); __GX_FlushTextureState(); GX_LOAD_BP_REG(0x68000000|(field_mode&1)); __GX_FlushTextureState(); } void GX_PokeAlphaMode(u8 func,u8 threshold) { _peReg[3] = (_SHIFTL(func,8,8))|(threshold&0xFF); } void GX_PokeAlphaRead(u8 mode) { _peReg[4] = (mode&~0x4)|0x4; } void GX_PokeDstAlpha(u8 enable,u8 a) { _peReg[2] = (_SHIFTL(enable,8,1))|(a&0xff); } void GX_PokeAlphaUpdate(u8 update_enable) { _peReg[1] = (_peReg[1]&~0x10)|(_SHIFTL(update_enable,4,1)); } void GX_PokeColorUpdate(u8 update_enable) { _peReg[1] = (_peReg[1]&~0x8)|(_SHIFTL(update_enable,3,1)); } void GX_PokeDither(u8 dither) { _peReg[1] = (_peReg[1]&~0x4)|(_SHIFTL(dither,2,1)); } void GX_PokeBlendMode(u8 type,u8 src_fact,u8 dst_fact,u8 op) { u32 regval = _peReg[1]; regval = (regval&~0x1); if(type==GX_BM_BLEND || type==GX_BM_SUBTRACT) regval |= 0x1; regval = (regval&~0x800); if(type==GX_BM_SUBTRACT) regval |= 0x800; regval = (regval&~0x2); if(type==GX_BM_LOGIC) regval |= 0x2; regval = (regval&~0xF000)|(_SHIFTL(op,12,4)); regval = (regval&~0xE0)|(_SHIFTL(dst_fact,5,3)); regval = (regval&~0x700)|(_SHIFTL(src_fact,8,3)); regval |= 0x41000000; _peReg[1] = (u16)regval; } void GX_PokeARGB(u16 x,u16 y,GXColor color) { u32 regval; regval = 0xc8000000|(_SHIFTL(x,2,10)); regval = (regval&~0x3FF000)|(_SHIFTL(y,12,10)); *(u32*)regval = _SHIFTL(color.a,24,8)|_SHIFTL(color.r,16,8)|_SHIFTL(color.g,8,8)|(color.b&0xff); } void GX_PeekARGB(u16 x,u16 y,GXColor *color) { u32 regval,val; regval = 0xc8000000|(_SHIFTL(x,2,10)); regval = (regval&~0x3FF000)|(_SHIFTL(y,12,10)); val = *(u32*)regval; color->a = _SHIFTR(val,24,8); color->r = _SHIFTR(val,16,8); color->g = _SHIFTR(val,8,8); color->b = val&0xff; } void GX_PokeZ(u16 x,u16 y,u32 z) { u32 regval; regval = 0xc8000000|(_SHIFTL(x,2,10)); regval = (regval&~0x3FF000)|(_SHIFTL(y,12,10)); regval = (regval&~0xC00000)|0x400000; *(u32*)regval = z; } void GX_PeekZ(u16 x,u16 y,u32 *z) { u32 regval; regval = 0xc8000000|(_SHIFTL(x,2,10)); regval = (regval&~0x3FF000)|(_SHIFTL(y,12,10)); regval = (regval&~0xC00000)|0x400000; *z = *(u32*)regval; } void GX_PokeZMode(u8 comp_enable,u8 func,u8 update_enable) { u16 regval; regval = comp_enable&0x1; regval = (regval&~0xE)|(_SHIFTL(func,1,3)); regval = (regval&0x10)|(_SHIFTL(update_enable,4,1)); _peReg[0] = regval; } void GX_SetIndTexOrder(u8 indtexstage,u8 texcoord,u8 texmap) { switch(indtexstage) { case GX_INDTEXSTAGE0: __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0x7)|(texmap&0x7); __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0x38)|(_SHIFTL(texcoord,3,3)); break; case GX_INDTEXSTAGE1: __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0x1C0)|(_SHIFTL(texmap,6,3)); __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0xE00)|(_SHIFTL(texcoord,9,3)); break; case GX_INDTEXSTAGE2: __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0x7000)|(_SHIFTL(texmap,12,3)); __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0x38000)|(_SHIFTL(texcoord,15,3)); break; case GX_INDTEXSTAGE3: __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0x1C0000)|(_SHIFTL(texmap,18,3)); __gx->tevRasOrder[2] = (__gx->tevRasOrder[2]&~0xE00000)|(_SHIFTL(texcoord,21,3)); break; } GX_LOAD_BP_REG(__gx->tevRasOrder[2]); __gx->dirtyState |= 0x0003; } void GX_InitLightPos(GXLightObj *lit_obj,f32 x,f32 y,f32 z) { struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; lit->px = x; lit->py = y; lit->pz = z; } void GX_InitLightColor(GXLightObj *lit_obj,GXColor col) { struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; lit->col = ((_SHIFTL(col.r,24,8))|(_SHIFTL(col.g,16,8))|(_SHIFTL(col.b,8,8))|(col.a&0xff)); } void GX_LoadLightObj(const GXLightObj *lit_obj,u8 lit_id) { u32 id; u16 reg; const struct __gx_litobj *lit = (const struct __gx_litobj*)lit_obj; switch(lit_id) { case GX_LIGHT0: id = 0; break; case GX_LIGHT1: id = 1; break; case GX_LIGHT2: id = 2; break; case GX_LIGHT3: id = 3; break; case GX_LIGHT4: id = 4; break; case GX_LIGHT5: id = 5; break; case GX_LIGHT6: id = 6; break; case GX_LIGHT7: id = 7; break; default: id = 0; break; } reg = 0x600|(_SHIFTL(id,4,8)); GX_LOAD_XF_REGS(reg,16); wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = 0; wgPipe->U32 = lit->col; wgPipe->F32 = lit->a0; wgPipe->F32 = lit->a1; wgPipe->F32 = lit->a2; wgPipe->F32 = lit->k0; wgPipe->F32 = lit->k1; wgPipe->F32 = lit->k2; wgPipe->F32 = lit->px; wgPipe->F32 = lit->py; wgPipe->F32 = lit->pz; wgPipe->F32 = lit->nx; wgPipe->F32 = lit->ny; wgPipe->F32 = lit->nz; } void GX_LoadLightObjIdx(u32 litobjidx,u8 litid) { u32 reg; u32 idx = 0; switch(litid) { case GX_LIGHT0: idx = 0; break; case GX_LIGHT1: idx = 1; break; case GX_LIGHT2: idx = 2; break; case GX_LIGHT3: idx = 3; break; case GX_LIGHT4: idx = 4; break; case GX_LIGHT5: idx = 5; break; case GX_LIGHT6: idx = 6; break; case GX_LIGHT7: idx = 7; break; default: idx = 0; break; } reg = 0xf600|(_SHIFTL(idx,4,8)); reg = (reg&~0xffff0000)|(_SHIFTL(litobjidx,16,16)); wgPipe->U8 = 0x38; wgPipe->U32 = reg; } void GX_InitLightDir(GXLightObj *lit_obj,f32 nx,f32 ny,f32 nz) { struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; lit->nx = -(nx); lit->ny = -(ny); lit->nz = -(nz); } void GX_InitLightDistAttn(GXLightObj *lit_obj,f32 ref_dist,f32 ref_brite,u8 dist_fn) { f32 k0,k1,k2; struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; if(ref_dist<0.0f || ref_brite<0.0f || ref_brite>=1.0f) dist_fn = GX_DA_OFF; switch(dist_fn) { case GX_DA_GENTLE: k0 = 1.0f; k1 = (1.0f-ref_brite)/(ref_brite*ref_dist); k2 = 0.0f; break; case GX_DA_MEDIUM: k0 = 1.0f; k1 = 0.5f*(1.0f-ref_brite)/(ref_brite*ref_dist); k2 = 0.5f*(1.0f-ref_brite)/(ref_brite*ref_dist*ref_dist); break; case GX_DA_STEEP: k0 = 1.0f; k1 = 0.0f; k2 = (1.0f-ref_brite)/(ref_brite*ref_dist*ref_dist); break; case GX_DA_OFF: default: k0 = 1.0f; k1 = 0.0f; k2 = 0.0f; break; } lit->k0 = k0; lit->k1 = k1; lit->k2 = k2; } void GX_InitLightAttn(GXLightObj *lit_obj,f32 a0,f32 a1,f32 a2,f32 k0,f32 k1,f32 k2) { struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; lit->a0 = a0; lit->a1 = a1; lit->a2 = a2; lit->k0 = k0; lit->k1 = k1; lit->k2 = k2; } void GX_InitLightAttnA(GXLightObj *lit_obj,f32 a0,f32 a1,f32 a2) { struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; lit->a0 = a0; lit->a1 = a1; lit->a2 = a2; } void GX_InitLightAttnK(GXLightObj *lit_obj,f32 k0,f32 k1,f32 k2) { struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; lit->k0 = k0; lit->k1 = k1; lit->k2 = k2; } void GX_InitSpecularDirHA(GXLightObj *lit_obj,f32 nx,f32 ny,f32 nz,f32 hx,f32 hy,f32 hz) { f32 px, py, pz; struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; px = (nx * LARGE_NUMBER); py = (ny * LARGE_NUMBER); pz = (nz * LARGE_NUMBER); lit->px = px; lit->py = py; lit->pz = pz; lit->nx = hx; lit->ny = hy; lit->nz = hz; } void GX_InitSpecularDir(GXLightObj *lit_obj,f32 nx,f32 ny,f32 nz) { f32 px, py, pz; f32 hx, hy, hz, mag; struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; // Compute half-angle vector hx = -nx; hy = -ny; hz = (-nz + 1.0f); mag = ((hx * hx) + (hy * hy) + (hz * hz)); if(mag!=0.0f) mag = 1.0f / sqrtf(mag); hx *= mag; hy *= mag; hz *= mag; px = (nx * LARGE_NUMBER); py = (ny * LARGE_NUMBER); pz = (nz * LARGE_NUMBER); lit->px = px; lit->py = py; lit->pz = pz; lit->nx = hx; lit->ny = hy; lit->nz = hz; } void GX_InitLightSpot(GXLightObj *lit_obj,f32 cut_off,u8 spotfn) { f32 r,d,cr,a0,a1,a2; struct __gx_litobj *lit = (struct __gx_litobj*)lit_obj; if(cut_off<0.0f || cut_off>90.0f) spotfn = GX_SP_OFF; r = (cut_off*M_PI)/180.0f; cr = cosf(r); switch(spotfn) { case GX_SP_FLAT: a0 = -1000.0f*cr; a1 = 1000.0f; a2 = 0.0f; break; case GX_SP_COS: a0 = -cr/(1.0f-cr); a1 = 1.0f/(1.0f-cr); a2 = 0.0f; break; case GX_SP_COS2: a0 = 0.0f; a1 = -cr/(1.0f-cr); a2 = 1.0f/(1.0f-cr); break; case GX_SP_SHARP: d = (1.0f-cr)*(1.0f-cr); a0 = cr*(cr-2.0f); a1 = 2.0f/d; a2 = -1.0/d; break; case GX_SP_RING1: d = (1.0f-cr)*(1.0f-cr); a0 = -4.0f*cr/d; a1 = 4.0f*(1.0f+cr)/d; a2 = -4.0f/d; break; case GX_SP_RING2: d = (1.0f-cr)*(1.0f-cr); a0 = 1.0f-2.0f*cr*cr/d; a1 = 4.0f*cr/d; a2 = -2.0f/d; break; case GX_SP_OFF: default: a0 = 1.0f; a1 = 0.0f; a2 = 0.0f; break; } lit->a0 = a0; lit->a1 = a1; lit->a2 = a2; } void GX_SetGPMetric(u32 perf0,u32 perf1) { // check last setted perf0 counters if(__gx->perf0Mode>=GX_PERF0_TRIANGLES && __gx->perf0Mode<GX_PERF0_QUAD_0CVG) GX_LOAD_BP_REG(0x23000000); else if(__gx->perf0Mode>=GX_PERF0_QUAD_0CVG && __gx->perf0Mode<GX_PERF0_CLOCKS) GX_LOAD_BP_REG(0x24000000); else if(__gx->perf0Mode>=GX_PERF0_VERTICES && __gx->perf0Mode<=GX_PERF0_CLOCKS) GX_LOAD_XF_REG(0x1006,0); // check last setted perf1 counters if(__gx->perf1Mode>=GX_PERF1_VC_ELEMQ_FULL && __gx->perf1Mode<GX_PERF1_FIFO_REQ) { __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0); GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); } else if(__gx->perf1Mode>=GX_PERF1_FIFO_REQ && __gx->perf1Mode<GX_PERF1_CLOCKS) { _cpReg[3] = 0; } else if(__gx->perf1Mode>=GX_PERF1_TEXELS && __gx->perf1Mode<=GX_PERF1_CLOCKS) { GX_LOAD_BP_REG(0x67000000); } __gx->perf0Mode = perf0; switch(__gx->perf0Mode) { case GX_PERF0_CLOCKS: GX_LOAD_XF_REG(0x1006,0x00000273); break; case GX_PERF0_VERTICES: GX_LOAD_XF_REG(0x1006,0x0000014a); break; case GX_PERF0_CLIP_VTX: GX_LOAD_XF_REG(0x1006,0x0000016b); break; case GX_PERF0_CLIP_CLKS: GX_LOAD_XF_REG(0x1006,0x00000084); break; case GX_PERF0_XF_WAIT_IN: GX_LOAD_XF_REG(0x1006,0x000000c6); break; case GX_PERF0_XF_WAIT_OUT: GX_LOAD_XF_REG(0x1006,0x00000210); break; case GX_PERF0_XF_XFRM_CLKS: GX_LOAD_XF_REG(0x1006,0x00000252); break; case GX_PERF0_XF_LIT_CLKS: GX_LOAD_XF_REG(0x1006,0x00000231); break; case GX_PERF0_XF_BOT_CLKS: GX_LOAD_XF_REG(0x1006,0x000001ad); break; case GX_PERF0_XF_REGLD_CLKS: GX_LOAD_XF_REG(0x1006,0x000001ce); break; case GX_PERF0_XF_REGRD_CLKS: GX_LOAD_XF_REG(0x1006,0x00000021); break; case GX_PERF0_CLIP_RATIO: GX_LOAD_XF_REG(0x1006,0x00000153); break; case GX_PERF0_TRIANGLES: GX_LOAD_BP_REG(0x2300AE7F); break; case GX_PERF0_TRIANGLES_CULLED: GX_LOAD_BP_REG(0x23008E7F); break; case GX_PERF0_TRIANGLES_PASSED: GX_LOAD_BP_REG(0x23009E7F); break; case GX_PERF0_TRIANGLES_SCISSORED: GX_LOAD_BP_REG(0x23001E7F); break; case GX_PERF0_TRIANGLES_0TEX: GX_LOAD_BP_REG(0x2300AC3F); break; case GX_PERF0_TRIANGLES_1TEX: GX_LOAD_BP_REG(0x2300AC7F); break; case GX_PERF0_TRIANGLES_2TEX: GX_LOAD_BP_REG(0x2300ACBF); break; case GX_PERF0_TRIANGLES_3TEX: GX_LOAD_BP_REG(0x2300ACFF); break; case GX_PERF0_TRIANGLES_4TEX: GX_LOAD_BP_REG(0x2300AD3F); break; case GX_PERF0_TRIANGLES_5TEX: GX_LOAD_BP_REG(0x2300AD7F); break; case GX_PERF0_TRIANGLES_6TEX: GX_LOAD_BP_REG(0x2300ADBF); break; case GX_PERF0_TRIANGLES_7TEX: GX_LOAD_BP_REG(0x2300ADFF); break; case GX_PERF0_TRIANGLES_8TEX: GX_LOAD_BP_REG(0x2300AE3F); break; case GX_PERF0_TRIANGLES_0CLR: GX_LOAD_BP_REG(0x2300A27F); break; case GX_PERF0_TRIANGLES_1CLR: GX_LOAD_BP_REG(0x2300A67F); break; case GX_PERF0_TRIANGLES_2CLR: GX_LOAD_BP_REG(0x2300AA7F); break; case GX_PERF0_QUAD_0CVG: GX_LOAD_BP_REG(0x2402C0C6); break; case GX_PERF0_QUAD_NON0CVG: GX_LOAD_BP_REG(0x2402C16B); break; case GX_PERF0_QUAD_1CVG: GX_LOAD_BP_REG(0x2402C0E7); break; case GX_PERF0_QUAD_2CVG: GX_LOAD_BP_REG(0x2402C108); break; case GX_PERF0_QUAD_3CVG: GX_LOAD_BP_REG(0x2402C129); break; case GX_PERF0_QUAD_4CVG: GX_LOAD_BP_REG(0x2402C14A); break; case GX_PERF0_AVG_QUAD_CNT: GX_LOAD_BP_REG(0x2402C1AD); break; case GX_PERF0_NONE: break; } __gx->perf1Mode = perf1; switch(__gx->perf1Mode) { case GX_PERF1_CLOCKS: GX_LOAD_BP_REG(0x67000042); break; case GX_PERF1_TEXELS: GX_LOAD_BP_REG(0x67000084); break; case GX_PERF1_TX_IDLE: GX_LOAD_BP_REG(0x67000063); break; case GX_PERF1_TX_REGS: GX_LOAD_BP_REG(0x67000129); break; case GX_PERF1_TX_MEMSTALL: GX_LOAD_BP_REG(0x67000252); break; case GX_PERF1_TC_CHECK1_2: GX_LOAD_BP_REG(0x67000021); break; case GX_PERF1_TC_CHECK3_4: GX_LOAD_BP_REG(0x6700014b); break; case GX_PERF1_TC_CHECK5_6: GX_LOAD_BP_REG(0x6700018d); break; case GX_PERF1_TC_CHECK7_8: GX_LOAD_BP_REG(0x670001cf); break; case GX_PERF1_TC_MISS: GX_LOAD_BP_REG(0x67000211); break; case GX_PERF1_VC_ELEMQ_FULL: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x20; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VC_MISSQ_FULL: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x30; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VC_MEMREQ_FULL: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x40; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VC_STATUS7: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x50; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VC_MISSREP_FULL: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x60; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VC_STREAMBUF_LOW: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x70; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VC_ALL_STALLS: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x90; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_VERTICES: __gx->cpPerfMode = (__gx->cpPerfMode&~0xf0)|0x80; GX_LOAD_CP_REG(0x20,__gx->cpPerfMode); break; case GX_PERF1_FIFO_REQ: _cpReg[3] = 2; break; case GX_PERF1_CALL_REQ: _cpReg[3] = 3; break; case GX_PERF1_VC_MISS_REQ: _cpReg[3] = 4; break; case GX_PERF1_CP_ALL_REQ: _cpReg[3] = 5; break; case GX_PERF1_NONE: break; } } void GX_ClearGPMetric(void) { _cpReg[2] = 4; } void GX_InitXfRasMetric(void) { GX_LOAD_BP_REG(0x2402C022); GX_LOAD_XF_REG(0x1006,0x31000); } void GX_ReadXfRasMetric(u32 *xfwaitin,u32 *xfwaitout,u32 *rasbusy,u32 *clks) { *rasbusy = _SHIFTL(_cpReg[33],16,16)|(_cpReg[32]&0xffff); *clks = _SHIFTL(_cpReg[35],16,16)|(_cpReg[34]&0xffff); *xfwaitin = _SHIFTL(_cpReg[37],16,16)|(_cpReg[36]&0xffff); *xfwaitout = _SHIFTL(_cpReg[39],16,16)|(_cpReg[38]&0xffff); } u32 GX_ReadClksPerVtx(void) { GX_DrawDone(); _cpReg[49] = 0x1007; _cpReg[48] = 0x1007; return (_cpReg[50]>>8); } void GX_ClearVCacheMetric(void) { GX_LOAD_CP_REG(0,0); } void GX_ReadVCacheMetric(u32 *check,u32 *miss,u32 *stall) { *check = _SHIFTL(_cpReg[41],16,16)|(_cpReg[40]&0xffff); *miss = _SHIFTL(_cpReg[43],16,16)|(_cpReg[42]&0xffff); *stall = _SHIFTL(_cpReg[45],16,16)|(_cpReg[44]&0xffff); } void GX_SetVCacheMetric(u32 attr) { } void GX_GetGPStatus(u8 *overhi,u8 *underlow,u8 *readIdle,u8 *cmdIdle,u8 *brkpt) { _gxgpstatus = _cpReg[0]; *overhi = !!(_gxgpstatus&1); *underlow = !!(_gxgpstatus&2); *readIdle = !!(_gxgpstatus&4); *cmdIdle = !!(_gxgpstatus&8); *brkpt = !!(_gxgpstatus&16); } void GX_ReadGPMetric(u32 *cnt0,u32 *cnt1) { u32 tmp,reg1,reg2; reg1 = (_SHIFTL(_cpReg[33],16,16))|(_cpReg[32]&0xffff); reg2 = (_SHIFTL(_cpReg[35],16,16))|(_cpReg[34]&0xffff); //reg3 = (_SHIFTL(_cpReg[37],16,16))|(_cpReg[36]&0xffff); //reg4 = (_SHIFTL(_cpReg[39],16,16))|(_cpReg[38]&0xffff); *cnt0 = 0; if(__gx->perf0Mode==GX_PERF0_CLIP_RATIO) { tmp = reg2*1000; *cnt0 = tmp/reg1; } else if(__gx->perf0Mode>=GX_PERF0_VERTICES && __gx->perf0Mode<GX_PERF0_NONE) *cnt0 = reg1; //further implementation needed..... // cnt1 fails.... } void GX_AdjustForOverscan(GXRModeObj *rmin,GXRModeObj *rmout,u16 hor,u16 ver) { if(rmin!=rmout) memcpy(rmout,rmin,sizeof(GXRModeObj)); rmout->fbWidth = rmin->fbWidth-(hor<<1); rmout->efbHeight = rmin->efbHeight-((rmin->efbHeight*(ver<<1))/rmin->xfbHeight); if(rmin->xfbMode==VI_XFBMODE_SF && !(rmin->viTVMode&VI_PROGRESSIVE)) rmout->xfbHeight = rmin->xfbHeight-ver; else rmout->xfbHeight = rmin->xfbHeight-(ver<<1); rmout->viWidth = rmin->viWidth-(hor<<1); if(rmin->viTVMode&VI_PROGRESSIVE) rmout->viHeight = rmin->viHeight-(ver<<2); else rmout->viHeight = rmin->viHeight-(ver<<1); rmout->viXOrigin += hor; rmout->viYOrigin += ver; } f32 GX_GetYScaleFactor(u16 efbHeight,u16 xfbHeight) { u32 yScale,xfblines,cnt; f32 yscale; yscale = (f32)efbHeight/(f32)xfbHeight; yScale = (u32)((f32)256.0/yscale)&0x1ff; cnt = xfbHeight; xfblines = __GX_GetNumXfbLines(efbHeight,yScale); while(xfblines>=xfbHeight) { yscale = (f32)(cnt--)/(f32)efbHeight; yScale = (u32)((f32)256.0/yscale)&0x1ff; xfblines = __GX_GetNumXfbLines(efbHeight,yScale); } while(xfblines<xfbHeight) { yscale = (f32)(cnt++)/(f32)efbHeight; yScale = (u32)((f32)256.0/yscale)&0x1ff; xfblines = __GX_GetNumXfbLines(efbHeight,yScale); } return yscale; } void GX_ReadBoundingBox(u16 *top,u16 *bottom,u16 *left,u16 *right) { *left = _peReg[8]; *right = _peReg[9]; *top = _peReg[10]; *bottom = _peReg[11]; } #undef LARGE_NUMBER
c7e4ec9ce609d8f9c2443739cf9a887f8643e7d4
f8c0a188d1cf8ae5221c4cd11552c221a86e259a
/Firmware/Flux.AX3/include/Peripherals/Gyro.h
56e056dba9cb85f2edfb5d3819d058e5a72ce1d5
[ "CC-BY-3.0", "BSD-2-Clause" ]
permissive
digitalinteraction/openmovement
6310abf35b379655073485e84719cc2521733c0e
9c2ee2eeb5eae457673e60699b2842c6df82abb1
refs/heads/master
2023-08-03T23:48:42.973605
2023-07-26T17:52:37
2023-07-26T17:52:37
27,082,024
135
86
null
2018-06-21T23:32:43
2014-11-24T15:38:43
C
UTF-8
C
false
false
3,284
h
Gyro.h
/* * Copyright (c) 2009-2012, Newcastle University, UK. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ // gyro.h - L3G4200 Gyroscope interface. // Karim Ladha, Dan Jackson 2011-2012. // Adapted to be more user friendly, KL 01-12-11 /* Revisions: 01-12-11 : KL - Added FIFO capability */ // Data types typedef union { struct { short x, y, z; }; struct { unsigned char xl, xh, yl, yh, zl, zh; }; short values[3]; } gyro_t; #define GYRO_BYTES_PER_SAMPLE 6 #define GYRO_MAX_FIFO_SAMPLES (32) //#define GYRO_MAX_FIFO_BYTES (GYRO_MAX_FIFO_SAMPLES * GYRO_BYTES_PER_SAMPLE) // Gyro detection extern char gyroPresent; // Gyro present (call GyroReadDeviceId() once to set this) // TODO: Make this return the current gyro frequency #define GyroFrequency() (100) // Verify device ID extern unsigned char GyroVerifyDeviceId(void); // Initialisation for single sample mode - no interrupts extern void GyroStartup(void); // Initialisation to use FIFO and fifo interrupt enable extern void GyroStartupFifoInterrupts(void); // Shutdown the device to conserve power extern void GyroStandby(void); // Read a single xyz value from the device extern void GyroSingleSample(gyro_t *value); // Returns how many bytes are in the fifo extern unsigned char GyroReadFifoLength(void); // Reads specified number of bytes from the fifo to the buffer if available - returns number read extern unsigned char GyroReadFIFO(gyro_t *gyroBuffer, unsigned char maxEntries); // The internal temperature register in celcius - needs calibrating with the GYRO_TEMP_OFFSET extern signed char GyroReadTemp(void); // Reads a device register - debugging extern unsigned char GyroReadRegister(unsigned char reg); // Reads multiple device registers - debugging // note: fifo causes re-wrap about x,y,z values extern void GyroReadRegisters(unsigned char reg, unsigned char count, unsigned char *buffer);
6366c64d6067f8ce3956c2f8620b5724c117ec5f
de21f9075f55640514c29ef0f1fe3f0690845764
/regression/cbmc/Struct_Pointer_Array1/main.c
be95b7c31459d4460b82b7e34a9d8c4ef74237f6
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-4-Clause" ]
permissive
diffblue/cbmc
975a074ac445febb3b5715f8792beb545522dc18
decd2839c2f51a54b2ad0f3e89fdc1b4bf78cd16
refs/heads/develop
2023-08-31T05:52:05.342195
2023-08-30T13:31:51
2023-08-30T13:31:51
51,877,056
589
309
NOASSERTION
2023-09-14T18:49:17
2016-02-16T23:03:52
C++
UTF-8
C
false
false
161
c
main.c
#define NULL ((void *)0) typedef struct tag { int field; } StructTag; StructTag *TagTbl[2]; int main() { if(TagTbl[0] != NULL) TagTbl[0]->field = 1; }
16147d6d708f1537cab56b339d73190a1ac0049f
9eedaea06306b20520151321854f989a73c7daf8
/src/render/direct3d12/SDL_shaders_d3d12.c
36bedf52a055f381007c7659b619e5622ae2ab6e
[ "Zlib" ]
permissive
libsdl-org/SDL
cf56bdc8a9e198e9735201674118c822d0e3edf3
8387fae698745969ce366c4de9bcc1b4a364a7dd
refs/heads/main
2023-09-04T06:58:34.316952
2023-09-03T15:11:13
2023-09-03T15:11:13
330,008,801
6,912
1,605
Zlib
2023-09-13T19:12:26
2021-01-15T19:55:54
C
UTF-8
C
false
false
491,324
c
SDL_shaders_d3d12.c
/* Simple DirectMedia Layer Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include "SDL_internal.h" #if defined(SDL_VIDEO_RENDER_D3D12) && !defined(SDL_RENDER_DISABLED) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) #include "../../core/windows/SDL_windows.h" #include <d3d12.h> #include "SDL_shaders_d3d12.h" #define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str /* Direct3D 12 shaders SDL's shaders are compiled into SDL itself, to simplify distribution. All Direct3D 12 shaders were compiled with the following: dxc -E <FUNC> -T <TYPE> -Fo <OUTPUT FILE> <INPUT FILE> Variables: - <FUNC>: the function. This is main for the pixel shader, and one of four options for the vertex shader - <TYPE>: the type of shader. A table of utilized shader types is listed below. - <OUTPUT FILE>: where to store compiled output - <INPUT FILE>: where to read shader source code from Shader types: - ps_6_0: Pixel shader - vs_6_0: Vertex shader Shader object code was converted to unsigned chars via the following *nix style command (available separately from Windows + MSVC): xxd --include <FILE> */ /* The color-only-rendering pixel shader: --- D3D12_PixelShader_Colors.hlsl --- struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define ColorRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ "DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ "DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ "DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0)" [RootSignature(ColorRS)] float4 main(PixelShaderInput input) : SV_TARGET0 { return input.color; } */ static unsigned char D3D12_PixelShader_Colors[] = { 0x44, 0x58, 0x42, 0x43, 0x38, 0xfe, 0xa0, 0xc7, 0x8e, 0xb3, 0x78, 0x02, 0x7e, 0x71, 0xa9, 0x1c, 0x23, 0x3e, 0x23, 0xa2, 0x01, 0x00, 0x00, 0x00, 0xe5, 0x0c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0xd9, 0x01, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0xa9, 0x07, 0x00, 0x00, 0xc5, 0x07, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xbc, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0x90, 0x05, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x64, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x78, 0x05, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x5b, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x3c, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80, 0x61, 0x04, 0x62, 0x18, 0x46, 0x10, 0x86, 0xbb, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x4f, 0x91, 0x8b, 0x58, 0xd8, 0x03, 0x18, 0x88, 0x48, 0x6c, 0x1e, 0x6a, 0x42, 0xc3, 0xf2, 0xa6, 0x03, 0x01, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28, 0x86, 0x02, 0x2b, 0x83, 0x42, 0x28, 0x87, 0x92, 0x28, 0x90, 0x02, 0x2a, 0x82, 0xf2, 0xa0, 0x2a, 0x89, 0x32, 0x28, 0x84, 0x11, 0x80, 0x22, 0x28, 0x10, 0xea, 0x19, 0x00, 0xf2, 0xb1, 0x1c, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x40, 0x14, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x4d, 0x35, 0x41, 0x20, 0x0c, 0x0e, 0x70, 0x6f, 0x73, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0x08, 0x97, 0x29, 0xab, 0x2f, 0xa8, 0xa7, 0xa9, 0x24, 0xaa, 0xa4, 0x27, 0xa7, 0x09, 0x02, 0x91, 0x4c, 0x10, 0x08, 0x65, 0x03, 0x82, 0x30, 0x0d, 0xe1, 0x3c, 0x50, 0xc4, 0x81, 0xae, 0x0c, 0x6f, 0x82, 0x40, 0x2c, 0x4c, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x60, 0x36, 0x20, 0xc8, 0xd4, 0x50, 0x4e, 0x05, 0x45, 0x2c, 0xc6, 0xde, 0xd8, 0xde, 0xe4, 0x26, 0x08, 0x04, 0x43, 0x63, 0xe8, 0x89, 0xe9, 0x49, 0x0a, 0x66, 0x03, 0x82, 0x5c, 0x0d, 0xe6, 0x64, 0x50, 0xb4, 0x81, 0x58, 0x24, 0x4b, 0xdb, 0x30, 0x10, 0xca, 0x36, 0x41, 0x10, 0x80, 0x0d, 0xc0, 0x86, 0x81, 0xf0, 0xbc, 0x0d, 0xc1, 0xb7, 0x61, 0x18, 0x3a, 0x30, 0x98, 0x20, 0x38, 0xd6, 0x86, 0x40, 0x0c, 0x48, 0xb4, 0x85, 0xa5, 0xb9, 0x71, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x20, 0x14, 0xcf, 0x04, 0xa1, 0x80, 0x36, 0x04, 0xc4, 0x04, 0xa1, 0x88, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xca, 0xc0, 0x0c, 0xce, 0x00, 0x0d, 0xd2, 0x60, 0x48, 0x03, 0x42, 0x0d, 0x00, 0x22, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x13, 0x84, 0x62, 0xda, 0xb0, 0x0c, 0x6c, 0x60, 0x06, 0x6a, 0x80, 0x06, 0x6d, 0x30, 0xb4, 0xc1, 0xa0, 0x06, 0xc0, 0x04, 0x81, 0x68, 0x58, 0x0c, 0x3d, 0x31, 0x3d, 0x49, 0x4d, 0x10, 0x08, 0x67, 0x83, 0xd0, 0xc4, 0xc1, 0x86, 0xe5, 0x0d, 0xe0, 0xc0, 0x0c, 0xd4, 0x00, 0x0d, 0xda, 0x60, 0x48, 0x83, 0x37, 0x50, 0x03, 0x39, 0xd8, 0x30, 0xac, 0x81, 0x1b, 0xcc, 0x01, 0x93, 0x29, 0xab, 0x2f, 0xaa, 0x30, 0xb9, 0xb3, 0x32, 0xba, 0x09, 0x42, 0x41, 0x6d, 0x58, 0x88, 0x3a, 0x30, 0x03, 0x3b, 0x40, 0x03, 0x35, 0x18, 0xd2, 0x80, 0x50, 0x03, 0x39, 0xd8, 0x10, 0xdc, 0xc1, 0x86, 0x81, 0x0e, 0xf0, 0x00, 0xd8, 0x50, 0x74, 0x64, 0x90, 0x07, 0x00, 0xc0, 0x22, 0xcd, 0x6d, 0x8e, 0x6e, 0x8e, 0xc6, 0x5c, 0xda, 0xd9, 0x17, 0x1b, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0xaf, 0x39, 0xba, 0x0d, 0xc6, 0x1e, 0x44, 0x7c, 0xe0, 0xf4, 0x81, 0x53, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x45, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x89, 0x0c, 0xcf, 0x85, 0x2e, 0x0f, 0xae, 0x2c, 0xc8, 0xcd, 0xed, 0x8d, 0x2e, 0x8c, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x8a, 0xb0, 0x81, 0x41, 0x1d, 0x32, 0x3c, 0x17, 0xbb, 0xb4, 0xb2, 0xbb, 0x24, 0xb2, 0x29, 0xba, 0x30, 0xba, 0xb2, 0x29, 0x81, 0x18, 0xd4, 0x21, 0xc3, 0x73, 0x29, 0x73, 0xa3, 0x93, 0xcb, 0x83, 0x7a, 0x4b, 0x73, 0xa3, 0x9b, 0x9b, 0x12, 0xe4, 0x41, 0x17, 0x32, 0x3c, 0x97, 0xb1, 0xb7, 0x3a, 0x37, 0xba, 0x32, 0xb9, 0xb9, 0x29, 0x41, 0x1f, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x4a, 0xd5, 0x78, 0xe4, 0x4f, 0xd6, 0x12, 0x0d, 0x86, 0x23, 0xf7, 0x0e, 0x82, 0x21, 0x40, 0x44, 0x58, 0x49, 0x4c, 0x18, 0x05, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x46, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x3d, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28, 0x86, 0x22, 0x28, 0x83, 0xf2, 0xa0, 0x2a, 0x89, 0x32, 0x28, 0x84, 0x11, 0x80, 0x22, 0x28, 0x10, 0xda, 0xb1, 0x1c, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb1, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xcb, 0xb3, 0x21, 0x50, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x48, 0x26, 0x08, 0x85, 0xb2, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x32, 0x41, 0x28, 0x98, 0x0d, 0x0b, 0xe1, 0x3c, 0x50, 0x24, 0x0d, 0x12, 0x31, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0xb3, 0x61, 0x19, 0xaa, 0x67, 0x8a, 0xac, 0xc1, 0x1a, 0x26, 0x60, 0x82, 0x40, 0x18, 0x2c, 0x86, 0x9e, 0x98, 0x9e, 0xa4, 0x26, 0x08, 0xc4, 0x31, 0x41, 0x20, 0x90, 0x0d, 0x82, 0xb6, 0x6d, 0x58, 0xb0, 0xec, 0x99, 0x22, 0x6b, 0x90, 0xb0, 0x89, 0xdb, 0x30, 0x50, 0x57, 0xc7, 0x64, 0xca, 0xea, 0x8b, 0x2a, 0x4c, 0xee, 0xac, 0x8c, 0x6e, 0x82, 0x50, 0x38, 0x1b, 0x16, 0xe2, 0x7b, 0xc0, 0x20, 0x9a, 0x06, 0x89, 0x98, 0xb8, 0x0d, 0x41, 0x18, 0x6c, 0x18, 0x3c, 0x31, 0x00, 0x36, 0x14, 0x4c, 0x33, 0x06, 0x00, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x46, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x87, 0x0c, 0xcf, 0xc5, 0x2e, 0xad, 0xec, 0x2e, 0x89, 0x6c, 0x8a, 0x2e, 0x8c, 0xae, 0x6c, 0x4a, 0xa0, 0xd4, 0x21, 0xc3, 0x73, 0x29, 0x73, 0xa3, 0x93, 0xcb, 0x83, 0x7a, 0x4b, 0x73, 0xa3, 0x9b, 0x9b, 0x12, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x85, 0x30, 0x03, 0x50, 0x0a, 0x54, 0x25, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x4c, 0x84, 0x03, 0x21, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x54, 0xf1, 0x44, 0x02, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x65, 0x40, 0x52, 0x52, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x61, 0x1d, 0xd1, 0xd4, 0x18, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0x58, 0x06, 0x45, 0x31, 0xc4, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x96, 0x41, 0x51, 0xc5, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, 0x65, 0x50, 0xd4, 0x22, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x62, 0x19, 0x14, 0xe5, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The texture-rendering pixel shader: --- D3D12_PixelShader_Textures.hlsl --- Texture2D theTexture : register(t0); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define TextureRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(TextureRS)] float4 main(PixelShaderInput input) : SV_TARGET { return theTexture.Sample(theSampler, input.tex) * input.color; } */ static unsigned char D3D12_PixelShader_Textures[] = { 0x44, 0x58, 0x42, 0x43, 0x7e, 0x22, 0x8c, 0xc3, 0x6b, 0xf9, 0xa8, 0x10, 0xf1, 0x5f, 0x55, 0xde, 0x62, 0x56, 0x81, 0x2d, 0x01, 0x00, 0x00, 0x00, 0x7d, 0x11, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0xfd, 0x01, 0x00, 0x00, 0x8d, 0x02, 0x00, 0x00, 0x6d, 0x0a, 0x00, 0x00, 0x89, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0xd8, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf6, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xed, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x9c, 0x23, 0x08, 0x8a, 0x21, 0xc5, 0x12, 0xa2, 0x92, 0x1d, 0x08, 0x18, 0x46, 0x10, 0x80, 0xbb, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x4f, 0x91, 0x8b, 0x58, 0xd8, 0x03, 0x18, 0x88, 0x48, 0x6c, 0x1e, 0x6a, 0x42, 0x43, 0xc8, 0x21, 0x1d, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xf4, 0x00, 0x80, 0x87, 0x3c, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x18, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x99, 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x63, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x8a, 0x85, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3d, 0x03, 0x40, 0x7b, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x9e, 0x07, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xb7, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x01, 0x99, 0x20, 0x08, 0xc9, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x28, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x45, 0x47, 0x85, 0x0e, 0xad, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x6c, 0x82, 0x20, 0x2c, 0x13, 0x04, 0x81, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x10, 0x3c, 0x13, 0x84, 0x83, 0xa3, 0x42, 0x87, 0x56, 0x36, 0x15, 0xd6, 0x06, 0xc7, 0x56, 0x26, 0xb7, 0x01, 0x21, 0x22, 0x89, 0x20, 0x06, 0x02, 0xd8, 0x10, 0x4c, 0x1b, 0x08, 0x08, 0x00, 0xa8, 0x09, 0x02, 0xe1, 0x4d, 0x10, 0x84, 0x86, 0x01, 0xda, 0x04, 0x41, 0x70, 0x26, 0x08, 0xc2, 0xb3, 0xc1, 0x40, 0xb0, 0x8c, 0xd0, 0x1a, 0x12, 0x6d, 0x69, 0x70, 0x73, 0x13, 0x04, 0x01, 0xda, 0x40, 0x20, 0x5c, 0xd6, 0x4d, 0x10, 0x02, 0x30, 0xd8, 0x20, 0x10, 0xdf, 0x86, 0x00, 0x0c, 0x36, 0x08, 0x44, 0x18, 0x6c, 0x20, 0xae, 0xcd, 0x13, 0x83, 0x09, 0xc2, 0xf0, 0x4d, 0x10, 0x84, 0x88, 0x06, 0x5a, 0x98, 0x1b, 0x19, 0x5b, 0xd9, 0x04, 0x41, 0x90, 0x36, 0x18, 0x88, 0x19, 0x64, 0x84, 0x76, 0x06, 0x1b, 0x84, 0x32, 0x40, 0x83, 0x09, 0x82, 0x16, 0x06, 0x13, 0x04, 0x61, 0xe2, 0x00, 0xf7, 0x36, 0xc7, 0x65, 0xca, 0xea, 0x0b, 0xea, 0x69, 0x2a, 0x89, 0x2a, 0xe9, 0xc9, 0x69, 0x03, 0x82, 0xb0, 0x41, 0x46, 0x94, 0x41, 0x1b, 0x68, 0x0d, 0x07, 0xba, 0x32, 0x3c, 0x26, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x1b, 0x10, 0xe4, 0x0d, 0xb2, 0xae, 0x0c, 0xe0, 0x40, 0x6b, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x04, 0x8a, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0x91, 0x83, 0x6c, 0x0e, 0xca, 0x80, 0x0e, 0xb4, 0x66, 0x03, 0xb1, 0x06, 0x6e, 0x10, 0x07, 0x75, 0xb0, 0xe1, 0x20, 0xac, 0x31, 0x20, 0x83, 0x34, 0x50, 0x03, 0x3b, 0x98, 0x20, 0x28, 0xc2, 0x06, 0x60, 0xc3, 0x40, 0xe4, 0x41, 0x1e, 0x6c, 0x08, 0xf4, 0x60, 0xc3, 0x30, 0xe0, 0xc1, 0x1e, 0x4c, 0x10, 0x36, 0x31, 0xd8, 0x10, 0xf4, 0x01, 0x89, 0xb6, 0xb0, 0x34, 0x37, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x13, 0x84, 0x65, 0x9b, 0x20, 0x2c, 0xda, 0x86, 0x80, 0x98, 0x20, 0x2c, 0xd9, 0x04, 0x61, 0xc1, 0x36, 0x2c, 0x04, 0x28, 0x84, 0x82, 0x28, 0x8c, 0x02, 0x29, 0x0c, 0xa4, 0x40, 0x94, 0x02, 0x40, 0x84, 0xaa, 0x08, 0x6b, 0xe8, 0xe9, 0x49, 0x8a, 0x68, 0x82, 0xb0, 0x5c, 0x1b, 0x84, 0x2c, 0xdb, 0xb0, 0x0c, 0xa7, 0x10, 0x0a, 0xa5, 0x30, 0x0a, 0xa8, 0x30, 0xa0, 0xc2, 0x50, 0x0a, 0xa9, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x20, 0x54, 0x1b, 0x84, 0x8c, 0x15, 0x36, 0x2c, 0xcc, 0x2a, 0x84, 0x42, 0x29, 0x8c, 0x02, 0x2a, 0x0c, 0xa4, 0xc0, 0x94, 0x42, 0x2b, 0x6c, 0x18, 0x4c, 0x41, 0x15, 0x5c, 0x81, 0xc9, 0x94, 0xd5, 0x17, 0x55, 0x98, 0xdc, 0x59, 0x19, 0xdd, 0x04, 0x61, 0x39, 0x36, 0x2c, 0x04, 0x2c, 0x84, 0x42, 0x2c, 0x8c, 0x42, 0x29, 0x0c, 0xa4, 0x40, 0x94, 0x42, 0x2b, 0x6c, 0x08, 0x64, 0x61, 0xc3, 0xf0, 0x0a, 0xb3, 0x00, 0x6c, 0x28, 0xf0, 0xe0, 0x0f, 0x68, 0xa1, 0x02, 0x68, 0x98, 0xb1, 0xbd, 0x85, 0xd1, 0xcd, 0xb1, 0x48, 0x73, 0x9b, 0xa3, 0x9b, 0x9b, 0x20, 0x08, 0x16, 0x8d, 0xb9, 0xb4, 0xb3, 0x2f, 0x36, 0x32, 0x1a, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x74, 0x44, 0xe8, 0xca, 0xf0, 0xbe, 0xdc, 0xde, 0xe4, 0xda, 0x36, 0x28, 0xb6, 0x50, 0x06, 0xb7, 0x80, 0x0b, 0xb9, 0x80, 0xe8, 0x42, 0x19, 0xec, 0xc2, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x45, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0x40, 0x55, 0x22, 0xc3, 0x73, 0xa1, 0xcb, 0x83, 0x2b, 0x0b, 0x72, 0x73, 0x7b, 0xa3, 0x0b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x9b, 0x22, 0xd8, 0xc1, 0x1e, 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0xf4, 0x41, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0x01, 0x2d, 0x74, 0x21, 0xc3, 0x73, 0x19, 0x7b, 0xab, 0x73, 0xa3, 0x2b, 0x93, 0x9b, 0x9b, 0x12, 0xec, 0x02, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x15, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0x2c, 0x80, 0x37, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0x65, 0x20, 0x70, 0x66, 0xfd, 0x91, 0xa8, 0x65, 0x3c, 0xbd, 0x2e, 0x2f, 0xcb, 0x88, 0x40, 0xeb, 0x8f, 0x64, 0x2f, 0x8f, 0xe9, 0x6f, 0x39, 0xb0, 0x49, 0x82, 0xcd, 0x80, 0x40, 0x20, 0x30, 0x68, 0x06, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0xd8, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x15, 0x40, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x01, 0xcc, 0xb3, 0x10, 0x7e, 0x71, 0xdb, 0x46, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x26, 0x40, 0x30, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xa4, 0x51, 0x7f, 0xb4, 0x3e, 0x6a, 0xe5, 0x04, 0x66, 0x2e, 0x73, 0x80, 0x43, 0xf2, 0xb2, 0x44, 0x58, 0x49, 0x4c, 0xec, 0x06, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xbb, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xd4, 0x06, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xb2, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x36, 0x47, 0x10, 0x14, 0x83, 0x91, 0x42, 0xc8, 0x23, 0x38, 0x10, 0x30, 0x8c, 0x40, 0x0c, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x80, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x98, 0x94, 0xea, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x80, 0xd0, 0x4d, 0x07, 0x02, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, 0x04, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xec, 0x0c, 0x00, 0xe1, 0x19, 0x00, 0xca, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0xf0, 0x3c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xa2, 0x98, 0x20, 0x10, 0xc6, 0x06, 0x61, 0x20, 0x26, 0x08, 0xc4, 0xb1, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x96, 0x44, 0x60, 0x82, 0x40, 0x20, 0x13, 0x04, 0x22, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x10, 0x3c, 0x13, 0x04, 0x6c, 0xda, 0x80, 0x10, 0xd1, 0x42, 0x10, 0x03, 0x01, 0x6c, 0x08, 0xa4, 0x0d, 0x04, 0x04, 0x00, 0xd3, 0x04, 0x21, 0xa3, 0x36, 0x04, 0xd5, 0x04, 0x41, 0x00, 0x48, 0xb4, 0x85, 0xa5, 0xb9, 0x71, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x20, 0x14, 0xcc, 0x04, 0xa1, 0x68, 0x36, 0x04, 0xc4, 0x04, 0xa1, 0x70, 0x26, 0x08, 0xc5, 0xb3, 0x61, 0x21, 0x32, 0x6d, 0xe3, 0xba, 0xa1, 0x23, 0x3c, 0x80, 0x08, 0x55, 0x11, 0xd6, 0xd0, 0xd3, 0x93, 0x14, 0xd1, 0x04, 0xa1, 0x80, 0x26, 0x08, 0x84, 0xb2, 0x41, 0x10, 0x03, 0x31, 0xd8, 0xb0, 0x0c, 0x60, 0xa0, 0x79, 0x5c, 0x18, 0x0c, 0x61, 0x30, 0x78, 0x63, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x40, 0x2c, 0x1b, 0x04, 0x31, 0x30, 0x83, 0x0d, 0x0b, 0x53, 0x06, 0x9a, 0xc7, 0x85, 0xc1, 0xd0, 0x31, 0xde, 0x19, 0x6c, 0x18, 0x3e, 0x32, 0x40, 0x03, 0x26, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x13, 0x84, 0x22, 0xda, 0xb0, 0x10, 0x6a, 0xa0, 0xad, 0x01, 0xe7, 0x0d, 0x1d, 0xe1, 0x9d, 0xc1, 0x86, 0x80, 0x0d, 0x36, 0x0c, 0x69, 0xd0, 0x06, 0xc0, 0x86, 0xe2, 0xc2, 0xdc, 0x80, 0x02, 0xaa, 0xb0, 0xb1, 0xd9, 0xb5, 0xb9, 0xa4, 0x91, 0x95, 0xb9, 0xd1, 0x4d, 0x09, 0x82, 0x2a, 0x64, 0x78, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x02, 0xa2, 0x09, 0x19, 0x9e, 0x8b, 0x5d, 0x18, 0x9b, 0x5d, 0x99, 0xdc, 0x94, 0xc0, 0xa8, 0x43, 0x86, 0xe7, 0x32, 0x87, 0x16, 0x46, 0x56, 0x26, 0xd7, 0xf4, 0x46, 0x56, 0xc6, 0x36, 0x25, 0x40, 0xca, 0x90, 0xe1, 0xb9, 0xc8, 0x95, 0xcd, 0xbd, 0xd5, 0xc9, 0x8d, 0x95, 0xcd, 0x4d, 0x09, 0xa6, 0x3a, 0x64, 0x78, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x49, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x82, 0xaa, 0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0xc0, 0x0d, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x46, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x05, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0xdb, 0x00, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x46, 0x00, 0x88, 0xcc, 0x00, 0x14, 0x42, 0x29, 0x94, 0x5c, 0xe1, 0x51, 0x29, 0x01, 0x1a, 0x33, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x00, 0x65, 0x84, 0x73, 0x5d, 0xc8, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x40, 0x5a, 0x11, 0x61, 0x58, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x87, 0x5c, 0x19, 0x94, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x25, 0x98, 0x56, 0x28, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x80, 0x81, 0x92, 0x6d, 0xd1, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x18, 0x2c, 0x1a, 0x57, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x88, 0x01, 0xe3, 0x75, 0x54, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x18, 0x34, 0x9f, 0x97, 0x38, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0x88, 0xc1, 0x82, 0x1c, 0x42, 0x90, 0x24, 0xdf, 0xf7, 0x24, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x46, 0x2c, 0xf2, 0x31, 0x62, 0x91, 0x8f, 0x11, 0x8b, 0x7c, 0x8c, 0x58, 0xe4, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0x1f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0xd3, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0x9e, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1b, 0x58, 0x68, 0x80, 0x06, 0x61, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_YUV_JPEG.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureU : register(t1); Texture2D theTextureV : register(t2); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define YUVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(YUVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {0.0, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.0000, 0.0000, 1.4020}; const float3 Gcoeff = {1.0000, -0.3441, -0.7141}; const float3 Bcoeff = {1.0000, 1.7720, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.y = theTextureU.Sample(theSampler, input.tex).r; yuv.z = theTextureV.Sample(theSampler, input.tex).r; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_YUV_JPEG[] = { 0x44, 0x58, 0x42, 0x43, 0xb1, 0xef, 0x39, 0xc1, 0xc8, 0x72, 0xbb, 0xb0, 0x20, 0x73, 0xd6, 0x2a, 0xc9, 0xba, 0xcb, 0x70, 0x01, 0x00, 0x00, 0x00, 0x95, 0x13, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, 0x9d, 0x0b, 0x00, 0x00, 0xb9, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0x00, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x90, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x24, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x78, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x1b, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xc9, 0x01, 0x00, 0xd3, 0x03, 0x00, 0x1e, 0xf2, 0x24, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x61, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x67, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x4f, 0x05, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1e, 0x0c, 0x08, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x40, 0x16, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0xa2, 0x74, 0x68, 0x15, 0xc1, 0x08, 0x40, 0x21, 0x94, 0x41, 0x49, 0xd0, 0x99, 0x01, 0xa0, 0x32, 0x03, 0x40, 0x64, 0x06, 0x80, 0xc6, 0x0c, 0x00, 0x85, 0x19, 0x00, 0xe2, 0x33, 0x00, 0xd4, 0xc7, 0x72, 0x18, 0x02, 0x00, 0x00, 0xe0, 0x38, 0x00, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x61, 0x99, 0x20, 0x08, 0xcc, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x34, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x45, 0x18, 0x70, 0xa1, 0x43, 0x2b, 0xa3, 0x2a, 0xc3, 0xa3, 0xab, 0x93, 0x2b, 0xcb, 0x9a, 0x20, 0x08, 0xce, 0x04, 0x41, 0x78, 0x36, 0x08, 0x44, 0xb3, 0x21, 0x21, 0x94, 0x85, 0x20, 0x06, 0x86, 0x70, 0xb8, 0xd0, 0xa1, 0x95, 0x51, 0x95, 0xe1, 0xd1, 0xd5, 0xc9, 0x95, 0x55, 0x6d, 0x48, 0x06, 0x05, 0x22, 0x86, 0x81, 0x21, 0x1c, 0x2e, 0x74, 0x68, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x56, 0x1b, 0x12, 0x46, 0x91, 0x08, 0x66, 0x60, 0x08, 0x67, 0xc3, 0xf0, 0x44, 0xd3, 0x04, 0xe1, 0x00, 0x03, 0x2a, 0x74, 0x68, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1b, 0x10, 0xa2, 0xb2, 0x08, 0x62, 0x20, 0x80, 0x0d, 0xc1, 0xb5, 0x81, 0xa0, 0x00, 0x00, 0x9b, 0x20, 0x10, 0x62, 0x30, 0x41, 0x10, 0x20, 0x06, 0x68, 0x13, 0x04, 0x21, 0x9a, 0x20, 0x08, 0xd2, 0x06, 0x03, 0xe1, 0x3a, 0xc2, 0x6b, 0x48, 0xb4, 0xa5, 0xc1, 0xcd, 0x4d, 0x10, 0x84, 0x69, 0x03, 0x81, 0x80, 0x41, 0x17, 0x06, 0x13, 0x84, 0x80, 0x0c, 0x36, 0x08, 0xc4, 0x18, 0x6c, 0x08, 0xc8, 0x60, 0x83, 0x40, 0x94, 0xc1, 0x06, 0x62, 0xfb, 0xc4, 0xc0, 0x0c, 0x26, 0x08, 0xc3, 0x18, 0x4c, 0x10, 0x04, 0x8a, 0x06, 0x5a, 0x98, 0x1b, 0x19, 0x5b, 0xd9, 0x04, 0x41, 0xa8, 0x36, 0x18, 0x88, 0x1a, 0x74, 0x84, 0xb7, 0x06, 0x1b, 0x84, 0x34, 0x60, 0x83, 0x09, 0x02, 0x57, 0x06, 0x13, 0x04, 0xc1, 0xe2, 0x00, 0xf7, 0x36, 0xc7, 0x65, 0xca, 0xea, 0x0b, 0xea, 0x69, 0x2a, 0x89, 0x2a, 0xe9, 0xc9, 0x69, 0x03, 0x82, 0xc0, 0x41, 0x47, 0xa4, 0x41, 0x1c, 0x78, 0x0d, 0x07, 0xba, 0x32, 0x3c, 0x26, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x1b, 0x10, 0x64, 0x0e, 0xba, 0x30, 0x48, 0x03, 0x3a, 0xf0, 0x1a, 0x16, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x13, 0x04, 0xe1, 0xa2, 0x31, 0xf4, 0xc4, 0xf4, 0x24, 0x05, 0xb3, 0x01, 0x41, 0xec, 0xa0, 0xbb, 0x83, 0x34, 0xc0, 0x03, 0xaf, 0xd9, 0x40, 0xbc, 0x81, 0x1c, 0xd4, 0x41, 0x1e, 0x6c, 0x38, 0x08, 0xed, 0x0c, 0xd0, 0xa0, 0x0d, 0xdc, 0x40, 0x0f, 0x26, 0x08, 0x0a, 0xb1, 0x01, 0xd8, 0x30, 0x10, 0x7d, 0xd0, 0x07, 0x1b, 0x02, 0x3f, 0xd8, 0x30, 0x0c, 0x7c, 0xf0, 0x07, 0x13, 0x84, 0xce, 0x0c, 0x36, 0x04, 0xa1, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0x61, 0xf9, 0x26, 0x08, 0x8b, 0xb7, 0x21, 0x20, 0x26, 0x08, 0x4b, 0x37, 0x41, 0x58, 0xb8, 0x0d, 0x0b, 0x41, 0x0a, 0xa5, 0x60, 0x0a, 0xa7, 0x80, 0x0a, 0x03, 0x2a, 0x10, 0xa9, 0x00, 0x10, 0xa1, 0x2a, 0xc2, 0x1a, 0x7a, 0x7a, 0x92, 0x22, 0x9a, 0x20, 0x2c, 0xdb, 0x06, 0xa1, 0xeb, 0x36, 0x2c, 0xc3, 0x2a, 0x94, 0x42, 0x2a, 0x9c, 0x02, 0x2b, 0x0c, 0xac, 0x30, 0xa4, 0x42, 0x2b, 0xb0, 0x18, 0x7a, 0x62, 0x7a, 0x92, 0x9a, 0x20, 0x08, 0xd8, 0x06, 0xa1, 0x83, 0x85, 0x0d, 0x0b, 0xf3, 0x0a, 0xa5, 0x90, 0x0a, 0xa7, 0xc0, 0x0a, 0x03, 0x2a, 0x30, 0xa9, 0x10, 0x0b, 0x1b, 0x06, 0x55, 0x70, 0x05, 0x59, 0x60, 0x32, 0x65, 0xf5, 0x45, 0x15, 0x26, 0x77, 0x56, 0x46, 0x37, 0x41, 0x58, 0x94, 0x0d, 0x0b, 0x41, 0x0b, 0xa5, 0x50, 0x0b, 0xa7, 0x90, 0x0a, 0x03, 0x2a, 0x10, 0xa9, 0x10, 0x0b, 0x1b, 0x02, 0x5b, 0xd8, 0x30, 0xcc, 0xc2, 0x2d, 0x00, 0x1b, 0x0a, 0x3e, 0x18, 0x05, 0x5c, 0xc8, 0x00, 0x1a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x73, 0x13, 0x04, 0x21, 0x63, 0x91, 0xe6, 0x36, 0x47, 0x37, 0x37, 0x41, 0x10, 0x34, 0x1a, 0x73, 0x69, 0x67, 0x5f, 0x6c, 0x64, 0x34, 0xe6, 0xd2, 0xce, 0xbe, 0xe6, 0xe8, 0x88, 0xd0, 0x95, 0xe1, 0x7d, 0xb9, 0xbd, 0xc9, 0xb5, 0x6d, 0x50, 0x74, 0x61, 0x17, 0x78, 0xa1, 0x17, 0x7c, 0x01, 0xf9, 0x85, 0x34, 0x00, 0x87, 0xae, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0x20, 0xa8, 0x42, 0x86, 0xe7, 0x62, 0x57, 0x26, 0x37, 0x97, 0xf6, 0xe6, 0x36, 0x25, 0x20, 0x9a, 0x90, 0xe1, 0xb9, 0xd8, 0x85, 0xb1, 0xd9, 0x95, 0xc9, 0x4d, 0x09, 0x8a, 0x3a, 0x64, 0x78, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x02, 0xa4, 0x0c, 0x19, 0x9e, 0x8b, 0x5c, 0xd9, 0xdc, 0x5b, 0x9d, 0xdc, 0x58, 0xd9, 0xdc, 0x94, 0x00, 0xab, 0x44, 0x86, 0xe7, 0x42, 0x97, 0x07, 0x57, 0x16, 0xe4, 0xe6, 0xf6, 0x46, 0x17, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x37, 0x45, 0xd0, 0x83, 0x3f, 0xa8, 0x43, 0x86, 0xe7, 0x62, 0x97, 0x56, 0x76, 0x97, 0x44, 0x36, 0x45, 0x17, 0x46, 0x57, 0x36, 0x25, 0x08, 0x85, 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x02, 0x5c, 0xe8, 0x42, 0x86, 0xe7, 0x32, 0xf6, 0x56, 0xe7, 0x46, 0x57, 0x26, 0x37, 0x37, 0x25, 0x00, 0x07, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x35, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x00, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0x2a, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0x2c, 0x01, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0x65, 0x2b, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0x2c, 0x00, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0x2c, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0xb4, 0x04, 0x69, 0xb8, 0x7c, 0xe7, 0xf1, 0x85, 0x88, 0x00, 0x26, 0x22, 0x04, 0x9a, 0x61, 0x21, 0x0c, 0xc1, 0x19, 0x2e, 0xdf, 0x79, 0xfc, 0xc1, 0x99, 0x6e, 0xbf, 0xb8, 0x6d, 0x2b, 0x98, 0x86, 0xcb, 0x77, 0x1e, 0x7f, 0x71, 0x80, 0x41, 0x6c, 0x1e, 0x6a, 0xf2, 0x8b, 0xdb, 0xb6, 0x03, 0x68, 0xb8, 0x7c, 0xe7, 0xf1, 0x25, 0x80, 0x79, 0x16, 0xc2, 0x2f, 0x6e, 0xdb, 0x0c, 0xaa, 0xe1, 0xf2, 0x9d, 0xc7, 0x97, 0x26, 0x27, 0x22, 0x50, 0x6a, 0x7a, 0xa8, 0xc9, 0x2f, 0x6e, 0xdb, 0x08, 0x08, 0x06, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x76, 0x77, 0xba, 0xe6, 0x06, 0xb3, 0xd2, 0x85, 0x4b, 0xcf, 0xc4, 0x54, 0x26, 0x79, 0xad, 0x44, 0x58, 0x49, 0x4c, 0xd4, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf5, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xbc, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x12, 0x46, 0x59, 0x08, 0x66, 0x60, 0x08, 0x67, 0xc3, 0xf0, 0x40, 0xd1, 0x04, 0x41, 0xa3, 0x36, 0x20, 0xc4, 0xb4, 0x10, 0xc4, 0x40, 0x00, 0x1b, 0x02, 0x6a, 0x03, 0x21, 0x01, 0x40, 0x35, 0x41, 0xd8, 0xaa, 0x0d, 0xc1, 0x35, 0x41, 0x10, 0x00, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0xde, 0xe6, 0xd2, 0xe8, 0xd2, 0xde, 0xdc, 0x26, 0x08, 0x45, 0x33, 0x41, 0x28, 0x9c, 0x0d, 0x01, 0x31, 0x41, 0x28, 0x9e, 0x09, 0x42, 0x01, 0x6d, 0x58, 0x88, 0x8d, 0xeb, 0xbc, 0x6f, 0xf8, 0x08, 0x30, 0x00, 0x88, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0x4d, 0x10, 0x8a, 0x68, 0x82, 0x40, 0x2c, 0x1b, 0x04, 0x32, 0x20, 0x83, 0x0d, 0xcb, 0x20, 0x06, 0x1c, 0x18, 0x78, 0x63, 0x30, 0x8c, 0xc1, 0x00, 0x06, 0x65, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x40, 0x30, 0x1b, 0x04, 0x32, 0x40, 0x83, 0x0d, 0x0b, 0x73, 0x06, 0x1c, 0x18, 0x78, 0x63, 0x30, 0x7c, 0x0c, 0x18, 0xa4, 0xc1, 0x86, 0x21, 0x0c, 0xcc, 0x40, 0x0d, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x0a, 0x69, 0xc3, 0x42, 0xb0, 0x01, 0xd7, 0x06, 0x1e, 0x18, 0x0c, 0x1f, 0x01, 0x06, 0x69, 0xb0, 0x21, 0x70, 0x83, 0x0d, 0xc3, 0x1a, 0xbc, 0x01, 0xb0, 0xa1, 0xc8, 0x34, 0x38, 0xb0, 0x80, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x30, 0xea, 0x90, 0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, 0x95, 0xb1, 0x4d, 0x09, 0x90, 0x32, 0x64, 0x78, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x82, 0xaa, 0x0e, 0x19, 0x9e, 0x8b, 0x5d, 0x5a, 0xd9, 0x5d, 0x12, 0xd9, 0x14, 0x5d, 0x18, 0x5d, 0xd9, 0x94, 0xe0, 0xaa, 0x43, 0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0x80, 0x03, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0x72, 0x2b, 0xbc, 0x52, 0x28, 0xb9, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0x50, 0x9e, 0x74, 0xe9, 0x7f, 0x63, 0x04, 0xa2, 0x3e, 0xb7, 0xf3, 0x2f, 0x8c, 0x11, 0x80, 0xef, 0x0a, 0xae, 0xbf, 0x30, 0x46, 0xc0, 0x97, 0xbd, 0xb9, 0x7f, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x85, 0xc1, 0x62, 0x75, 0x1d, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x92, 0x18, 0x30, 0x57, 0x18, 0x84, 0x41, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xd2, 0x18, 0x34, 0x58, 0x18, 0x84, 0x81, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x12, 0x19, 0x38, 0x9b, 0x18, 0x88, 0xc1, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x1a, 0x38, 0x61, 0x30, 0x06, 0x5a, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x1a, 0x3c, 0x62, 0x40, 0x06, 0x94, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x1a, 0x40, 0x63, 0x50, 0x06, 0xdb, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x06, 0x1b, 0x44, 0x64, 0x60, 0x06, 0x1f, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x1b, 0x48, 0x68, 0x70, 0x06, 0x5e, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x1b, 0x4c, 0x69, 0x80, 0x06, 0x98, 0x34, 0x62, 0xf0, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x1b, 0x5c, 0xc8, 0x21, 0x04, 0xcb, 0x92, 0x06, 0x69, 0x30, 0x2d, 0xa3, 0x09, 0x01, 0x30, 0x62, 0xf0, 0x00, 0x20, 0x08, 0x06, 0xcd, 0x1b, 0x64, 0x4b, 0x42, 0x0c, 0x4d, 0xb3, 0x06, 0x6b, 0x50, 0x35, 0xa3, 0x09, 0x01, 0x30, 0x62, 0xf0, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x1c, 0x6c, 0xce, 0x62, 0x14, 0xcf, 0xd3, 0x06, 0x6d, 0x70, 0x3d, 0xa3, 0x09, 0x01, 0x60, 0xc3, 0x04, 0x1f, 0x13, 0x28, 0xf8, 0x8c, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x43, 0x07, 0x60, 0x70, 0x08, 0x01, 0x65, 0x5d, 0x23, 0x06, 0x0b, 0x00, 0x82, 0x60, 0xf0, 0xd4, 0x41, 0x18, 0x20, 0x83, 0x50, 0x65, 0xda, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x3c, 0x76, 0x20, 0x06, 0x09, 0x31, 0x58, 0x1c, 0x66, 0x43, 0x24, 0x1f, 0x1b, 0x22, 0xf9, 0xd8, 0x10, 0xc9, 0x67, 0xc4, 0x20, 0x01, 0x40, 0x10, 0x0c, 0x10, 0x3e, 0x20, 0x83, 0x3b, 0xb8, 0x03, 0x37, 0x18, 0x46, 0x0c, 0x12, 0x00, 0x04, 0xc1, 0x00, 0xe1, 0x03, 0x32, 0xb8, 0x83, 0x3b, 0x38, 0x03, 0x61, 0xc4, 0x20, 0x01, 0x40, 0x10, 0x0c, 0x10, 0x3e, 0x20, 0x83, 0x3b, 0xb8, 0x83, 0x36, 0x08, 0x46, 0x0c, 0x12, 0x00, 0x04, 0xc1, 0x00, 0xe1, 0x03, 0x32, 0xb8, 0x83, 0x3b, 0x80, 0x83, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_YUV_BT601.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureU : register(t1); Texture2D theTextureV : register(t2); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define YUVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(YUVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.1644, 0.0000, 1.5960}; const float3 Gcoeff = {1.1644, -0.3918, -0.8130}; const float3 Bcoeff = {1.1644, 2.0172, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.y = theTextureU.Sample(theSampler, input.tex).r; yuv.z = theTextureV.Sample(theSampler, input.tex).r; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_YUV_BT601[] = { 0x44, 0x58, 0x42, 0x43, 0x15, 0xda, 0x8f, 0x26, 0x88, 0x1f, 0xc5, 0x79, 0x25, 0xc3, 0x83, 0x74, 0xb6, 0xe8, 0x4f, 0x43, 0x01, 0x00, 0x00, 0x00, 0x99, 0x13, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, 0x95, 0x0b, 0x00, 0x00, 0xb1, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0x00, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x88, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x22, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x19, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xc9, 0x01, 0x00, 0xd3, 0x03, 0x00, 0x1e, 0xf2, 0x24, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x61, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x67, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x4f, 0x05, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1e, 0x0c, 0x08, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x40, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x8a, 0x87, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3e, 0x03, 0x40, 0x7d, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x61, 0x99, 0x20, 0x08, 0xcc, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x34, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x05, 0x18, 0x70, 0xa1, 0x43, 0x2b, 0xa3, 0x2a, 0xc3, 0xa3, 0xab, 0x93, 0x2b, 0xcb, 0x9a, 0x20, 0x08, 0xce, 0x04, 0x41, 0x78, 0x36, 0x08, 0x44, 0xb3, 0x21, 0x21, 0x94, 0x85, 0x20, 0x06, 0x86, 0x70, 0xb8, 0xd0, 0xa1, 0x95, 0x51, 0x95, 0xe1, 0xd1, 0xd5, 0xc9, 0x95, 0x55, 0x6d, 0x48, 0x06, 0x05, 0x22, 0x86, 0x81, 0x21, 0x1c, 0x2e, 0x74, 0x68, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x56, 0x1b, 0x12, 0x46, 0x91, 0x08, 0x66, 0x60, 0x08, 0x67, 0xc3, 0xf0, 0x44, 0xd3, 0x04, 0xe1, 0xf8, 0xa8, 0xd0, 0xa1, 0x95, 0x4d, 0x85, 0xb5, 0xc1, 0xb1, 0x95, 0xc9, 0x6d, 0x40, 0x88, 0xca, 0x22, 0x88, 0x81, 0x00, 0x36, 0x04, 0xd7, 0x06, 0x82, 0x02, 0x00, 0x6c, 0x82, 0x40, 0x84, 0xc1, 0x04, 0x41, 0x80, 0x18, 0xa0, 0x4d, 0x10, 0x84, 0x68, 0x82, 0x20, 0x48, 0x1b, 0x0c, 0x84, 0xeb, 0x08, 0xaf, 0x21, 0xd1, 0x96, 0x06, 0x37, 0x37, 0x41, 0x10, 0xa6, 0x0d, 0x04, 0x02, 0x06, 0x5d, 0x18, 0x4c, 0x10, 0x82, 0x31, 0xd8, 0x20, 0x10, 0x63, 0xb0, 0x21, 0x20, 0x83, 0x0d, 0x02, 0x51, 0x06, 0x1b, 0x88, 0xed, 0x13, 0x03, 0x33, 0x98, 0x20, 0x0c, 0x62, 0x30, 0x41, 0x10, 0x28, 0x1a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x13, 0x04, 0xa1, 0xda, 0x60, 0x20, 0x6a, 0xd0, 0x11, 0xde, 0x1a, 0x6c, 0x10, 0xd2, 0x80, 0x0d, 0x26, 0x08, 0x1c, 0x19, 0x4c, 0x10, 0x04, 0x8b, 0x03, 0xdc, 0xdb, 0x1c, 0x97, 0x29, 0xab, 0x2f, 0xa8, 0xa7, 0xa9, 0x24, 0xaa, 0xa4, 0x27, 0xa7, 0x0d, 0x08, 0x02, 0x07, 0x1d, 0x91, 0x06, 0x71, 0xe0, 0x35, 0x1c, 0xe8, 0xca, 0xf0, 0x98, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0xc1, 0x6c, 0x40, 0x90, 0x39, 0xe8, 0xc2, 0x20, 0x0d, 0xe8, 0xc0, 0x6b, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x84, 0x8b, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0xb1, 0x83, 0xee, 0x0e, 0xd2, 0x00, 0x0f, 0xbc, 0x66, 0x03, 0xf1, 0x06, 0x72, 0x50, 0x07, 0x79, 0xb0, 0xe1, 0x20, 0xb4, 0x33, 0x40, 0x83, 0x36, 0x70, 0x03, 0x3d, 0x98, 0x20, 0x28, 0xc4, 0x06, 0x60, 0xc3, 0x40, 0xf4, 0x41, 0x1f, 0x6c, 0x08, 0xfc, 0x60, 0xc3, 0x30, 0xf0, 0xc1, 0x1f, 0x4c, 0x10, 0xba, 0x32, 0xd8, 0x10, 0x84, 0x02, 0x89, 0xb6, 0xb0, 0x34, 0x37, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x13, 0x84, 0xc5, 0x9b, 0x20, 0x2c, 0xdd, 0x86, 0x80, 0x98, 0x20, 0x2c, 0xdc, 0x04, 0x61, 0xd9, 0x36, 0x2c, 0x04, 0x29, 0x94, 0x82, 0x29, 0x9c, 0x02, 0x2a, 0x0c, 0xa8, 0x40, 0xa4, 0x02, 0x40, 0x84, 0xaa, 0x08, 0x6b, 0xe8, 0xe9, 0x49, 0x8a, 0x68, 0x82, 0xb0, 0x68, 0x1b, 0x84, 0xae, 0xdb, 0xb0, 0x0c, 0xab, 0x50, 0x0a, 0xa9, 0x70, 0x0a, 0xac, 0x30, 0xb0, 0xc2, 0x90, 0x0a, 0xad, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x20, 0x60, 0x1b, 0x84, 0x0e, 0x16, 0x36, 0x2c, 0xcc, 0x2b, 0x94, 0x42, 0x2a, 0x9c, 0x02, 0x2b, 0x0c, 0xa8, 0xc0, 0xa4, 0x42, 0x2c, 0x6c, 0x18, 0x54, 0xc1, 0x15, 0x64, 0x81, 0xc9, 0x94, 0xd5, 0x17, 0x55, 0x98, 0xdc, 0x59, 0x19, 0xdd, 0x04, 0x61, 0x51, 0x36, 0x2c, 0x04, 0x2d, 0x94, 0x42, 0x2d, 0x9c, 0x42, 0x2a, 0x0c, 0xa8, 0x40, 0xa4, 0x42, 0x2c, 0x6c, 0x08, 0x6c, 0x61, 0xc3, 0x30, 0x0b, 0xb7, 0x00, 0x6c, 0x28, 0xf8, 0x60, 0x14, 0x70, 0x21, 0x03, 0x68, 0x98, 0xb1, 0xbd, 0x85, 0xd1, 0xcd, 0xb1, 0x48, 0x73, 0x9b, 0xa3, 0x9b, 0x9b, 0x20, 0x08, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0x2f, 0x36, 0x32, 0x1a, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x74, 0x44, 0xe8, 0xca, 0xf0, 0xbe, 0xdc, 0xde, 0xe4, 0xda, 0x36, 0x28, 0xba, 0xd0, 0xec, 0x02, 0x2f, 0xf4, 0x02, 0xe2, 0x0b, 0x69, 0xf0, 0x0b, 0x5d, 0x15, 0x36, 0x36, 0xbb, 0x36, 0x97, 0x34, 0xb2, 0x32, 0x37, 0xba, 0x29, 0x41, 0x50, 0x85, 0x0c, 0xcf, 0xc5, 0xae, 0x4c, 0x6e, 0x2e, 0xed, 0xcd, 0x6d, 0x4a, 0x40, 0x34, 0x21, 0xc3, 0x73, 0xb1, 0x0b, 0x63, 0xb3, 0x2b, 0x93, 0x9b, 0x12, 0x14, 0x75, 0xc8, 0xf0, 0x5c, 0xe6, 0xd0, 0xc2, 0xc8, 0xca, 0xe4, 0x9a, 0xde, 0xc8, 0xca, 0xd8, 0xa6, 0x04, 0x48, 0x19, 0x32, 0x3c, 0x17, 0xb9, 0xb2, 0xb9, 0xb7, 0x3a, 0xb9, 0xb1, 0xb2, 0xb9, 0x29, 0x01, 0x56, 0x89, 0x0c, 0xcf, 0x85, 0x2e, 0x0f, 0xae, 0x2c, 0xc8, 0xcd, 0xed, 0x8d, 0x2e, 0x8c, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x8a, 0xa0, 0x07, 0x7f, 0x50, 0x87, 0x0c, 0xcf, 0xc5, 0x2e, 0xad, 0xec, 0x2e, 0x89, 0x6c, 0x8a, 0x2e, 0x8c, 0xae, 0x6c, 0x4a, 0x10, 0x0a, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0xb8, 0xd0, 0x85, 0x0c, 0xcf, 0x65, 0xec, 0xad, 0xce, 0x8d, 0xae, 0x4c, 0x6e, 0x6e, 0x4a, 0xf0, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x35, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x00, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0x2a, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0x2c, 0x01, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0x65, 0x2b, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0x2c, 0x00, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0x2c, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0xb4, 0x04, 0x69, 0xb8, 0x7c, 0xe7, 0xf1, 0x85, 0x88, 0x00, 0x26, 0x22, 0x04, 0x9a, 0x61, 0x21, 0x0c, 0xc1, 0x19, 0x2e, 0xdf, 0x79, 0xfc, 0xc1, 0x99, 0x6e, 0xbf, 0xb8, 0x6d, 0x2b, 0x98, 0x86, 0xcb, 0x77, 0x1e, 0x7f, 0x71, 0x80, 0x41, 0x6c, 0x1e, 0x6a, 0xf2, 0x8b, 0xdb, 0xb6, 0x03, 0x68, 0xb8, 0x7c, 0xe7, 0xf1, 0x25, 0x80, 0x79, 0x16, 0xc2, 0x2f, 0x6e, 0xdb, 0x0c, 0xaa, 0xe1, 0xf2, 0x9d, 0xc7, 0x97, 0x26, 0x27, 0x22, 0x50, 0x6a, 0x7a, 0xa8, 0xc9, 0x2f, 0x6e, 0xdb, 0x08, 0x08, 0x06, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xe4, 0xe0, 0xfd, 0x5b, 0x8a, 0xbf, 0x47, 0x55, 0x60, 0xe1, 0xa5, 0xe1, 0x4c, 0x5a, 0xa7, 0x44, 0x58, 0x49, 0x4c, 0xe0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc8, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xef, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x12, 0x46, 0x59, 0x08, 0x66, 0x60, 0x08, 0x67, 0xc3, 0xf0, 0x40, 0xd1, 0x04, 0x41, 0xa3, 0x36, 0x20, 0xc4, 0xb4, 0x10, 0xc4, 0x40, 0x00, 0x1b, 0x02, 0x6a, 0x03, 0x21, 0x01, 0x40, 0x35, 0x41, 0xd8, 0xaa, 0x0d, 0xc1, 0x35, 0x41, 0x10, 0x00, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0xde, 0xe6, 0xd2, 0xe8, 0xd2, 0xde, 0xdc, 0x26, 0x08, 0x45, 0x33, 0x41, 0x28, 0x9c, 0x0d, 0x01, 0x31, 0x41, 0x28, 0x9e, 0x09, 0x42, 0x01, 0x6d, 0x58, 0x88, 0x8d, 0xeb, 0xbc, 0x6f, 0xf8, 0x08, 0x30, 0x00, 0x88, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0x4d, 0x10, 0x8a, 0x68, 0x82, 0x40, 0x2c, 0x1b, 0x04, 0x32, 0x20, 0x83, 0x0d, 0xcb, 0x20, 0x06, 0x1c, 0x18, 0x78, 0x63, 0x30, 0x8c, 0xc1, 0x00, 0x06, 0x65, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x40, 0x30, 0x1b, 0x04, 0x32, 0x40, 0x83, 0x0d, 0x0b, 0x73, 0x06, 0x1c, 0x18, 0x78, 0x63, 0x30, 0x7c, 0x0c, 0x18, 0xa4, 0xc1, 0x86, 0x21, 0x0c, 0xcc, 0x40, 0x0d, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x0a, 0x69, 0xc3, 0x42, 0xb0, 0x01, 0xd7, 0x06, 0x1e, 0x18, 0x0c, 0x1f, 0x01, 0x06, 0x69, 0xb0, 0x21, 0x70, 0x83, 0x0d, 0xc3, 0x1a, 0xbc, 0x01, 0xb0, 0xa1, 0xc8, 0x34, 0x38, 0xb0, 0x80, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x30, 0xea, 0x90, 0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, 0x95, 0xb1, 0x4d, 0x09, 0x90, 0x32, 0x64, 0x78, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x82, 0xaa, 0x0e, 0x19, 0x9e, 0x8b, 0x5d, 0x5a, 0xd9, 0x5d, 0x12, 0xd9, 0x14, 0x5d, 0x18, 0x5d, 0xd9, 0x94, 0xe0, 0xaa, 0x43, 0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0x80, 0x03, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0x72, 0x2b, 0xbc, 0x52, 0x28, 0xb9, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0xe0, 0xba, 0xa6, 0x08, 0x82, 0xc1, 0x18, 0x41, 0x69, 0xa2, 0x60, 0xfd, 0x0b, 0x63, 0x04, 0x22, 0x6c, 0xc6, 0xec, 0x2f, 0x8c, 0x11, 0xe8, 0xad, 0x8c, 0xf3, 0xdf, 0x18, 0x41, 0x48, 0x82, 0x21, 0xee, 0x0b, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0xbc, 0xb8, 0xa8, 0xe6, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x01, 0x73, 0x79, 0x5e, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xd2, 0x18, 0x34, 0x98, 0x18, 0x88, 0x81, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x12, 0x19, 0x38, 0x99, 0x18, 0x88, 0xc1, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x52, 0x19, 0x3c, 0xdc, 0x18, 0x8c, 0x01, 0x35, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x1a, 0x3c, 0x62, 0x40, 0x06, 0x9b, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x1a, 0x40, 0x63, 0x50, 0x06, 0xd5, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x06, 0x1b, 0x44, 0x64, 0x60, 0x06, 0x1c, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x1b, 0x48, 0x65, 0x70, 0x06, 0x60, 0x10, 0x8d, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xe1, 0x06, 0x53, 0x1a, 0xa0, 0xc1, 0x27, 0x8d, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x06, 0x94, 0x1a, 0xa4, 0x41, 0x36, 0x8d, 0x18, 0x3c, 0x00, 0x08, 0x82, 0x41, 0xe3, 0x06, 0x18, 0x72, 0x08, 0xc1, 0xb2, 0xa8, 0x81, 0x1a, 0x50, 0xcb, 0x68, 0x42, 0x00, 0x8c, 0x18, 0x3c, 0x00, 0x08, 0x82, 0x41, 0x03, 0x07, 0xda, 0x92, 0x10, 0x43, 0xd3, 0xb0, 0x01, 0x1b, 0x58, 0xcd, 0x68, 0x42, 0x00, 0x8c, 0x18, 0x3c, 0x00, 0x08, 0x82, 0x41, 0x23, 0x07, 0x9c, 0xb3, 0x18, 0xc5, 0xf3, 0xb8, 0x81, 0x1b, 0x60, 0xcf, 0x68, 0x42, 0x00, 0x58, 0x51, 0xc1, 0xc7, 0x08, 0x0a, 0x3e, 0x36, 0x54, 0xf0, 0x19, 0x31, 0x58, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x0e, 0xc4, 0x60, 0x10, 0x82, 0xea, 0xca, 0x46, 0x0c, 0x16, 0x00, 0x04, 0xc1, 0xe0, 0xb9, 0x83, 0x31, 0x20, 0x06, 0xc1, 0xda, 0xb8, 0x11, 0x83, 0x05, 0x00, 0x41, 0x30, 0x78, 0xf0, 0x80, 0x0c, 0x0a, 0x62, 0xb8, 0xbc, 0xcc, 0x06, 0x49, 0x3e, 0x36, 0x48, 0xf2, 0xb1, 0x41, 0x92, 0xcf, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7e, 0x60, 0x06, 0x79, 0x90, 0x07, 0x70, 0x30, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xe2, 0x07, 0x66, 0x90, 0x07, 0x79, 0x90, 0x06, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7e, 0x60, 0x06, 0x79, 0x90, 0x07, 0x6f, 0x10, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xe2, 0x07, 0x66, 0x90, 0x07, 0x79, 0x20, 0x07, 0x12, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_YUV_BT709.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureU : register(t1); Texture2D theTextureV : register(t2); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define YUVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(YUVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.1644, 0.0000, 1.7927}; const float3 Gcoeff = {1.1644, -0.2132, -0.5329}; const float3 Bcoeff = {1.1644, 2.1124, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.y = theTextureU.Sample(theSampler, input.tex).r; yuv.z = theTextureV.Sample(theSampler, input.tex).r; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_YUV_BT709[] = { 0x44, 0x58, 0x42, 0x43, 0xe6, 0x97, 0xfb, 0x70, 0x81, 0x58, 0x82, 0x84, 0xfd, 0xe7, 0xb6, 0x4d, 0x56, 0x90, 0xf8, 0x87, 0x01, 0x00, 0x00, 0x00, 0x99, 0x13, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, 0x95, 0x0b, 0x00, 0x00, 0xb1, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0x00, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x88, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x22, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x19, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xc9, 0x01, 0x00, 0xd3, 0x03, 0x00, 0x1e, 0xf2, 0x24, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x61, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x67, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x4f, 0x05, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1e, 0x0c, 0x08, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x40, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x8a, 0x87, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3e, 0x03, 0x40, 0x7d, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x61, 0x99, 0x20, 0x08, 0xcc, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x34, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x05, 0x18, 0x70, 0xa1, 0x43, 0x2b, 0xa3, 0x2a, 0xc3, 0xa3, 0xab, 0x93, 0x2b, 0xcb, 0x9a, 0x20, 0x08, 0xce, 0x04, 0x41, 0x78, 0x36, 0x08, 0x44, 0xb3, 0x21, 0x21, 0x94, 0x85, 0x20, 0x06, 0x86, 0x70, 0xb8, 0xd0, 0xa1, 0x95, 0x51, 0x95, 0xe1, 0xd1, 0xd5, 0xc9, 0x95, 0x55, 0x6d, 0x48, 0x06, 0x05, 0x22, 0x86, 0x81, 0x21, 0x1c, 0x2e, 0x74, 0x68, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x56, 0x1b, 0x12, 0x46, 0x91, 0x08, 0x66, 0x60, 0x08, 0x67, 0xc3, 0xf0, 0x44, 0xd3, 0x04, 0xe1, 0xf8, 0xa8, 0xd0, 0xa1, 0x95, 0x4d, 0x85, 0xb5, 0xc1, 0xb1, 0x95, 0xc9, 0x6d, 0x40, 0x88, 0xca, 0x22, 0x88, 0x81, 0x00, 0x36, 0x04, 0xd7, 0x06, 0x82, 0x02, 0x00, 0x6c, 0x82, 0x40, 0x84, 0xc1, 0x04, 0x41, 0x80, 0x18, 0xa0, 0x4d, 0x10, 0x84, 0x68, 0x82, 0x20, 0x48, 0x1b, 0x0c, 0x84, 0xeb, 0x08, 0xaf, 0x21, 0xd1, 0x96, 0x06, 0x37, 0x37, 0x41, 0x10, 0xa6, 0x0d, 0x04, 0x02, 0x06, 0x5d, 0x18, 0x4c, 0x10, 0x82, 0x31, 0xd8, 0x20, 0x10, 0x63, 0xb0, 0x21, 0x20, 0x83, 0x0d, 0x02, 0x51, 0x06, 0x1b, 0x88, 0xed, 0x13, 0x03, 0x33, 0x98, 0x20, 0x0c, 0x62, 0x30, 0x41, 0x10, 0x28, 0x1a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x13, 0x04, 0xa1, 0xda, 0x60, 0x20, 0x6a, 0xd0, 0x11, 0xde, 0x1a, 0x6c, 0x10, 0xd2, 0x80, 0x0d, 0x26, 0x08, 0x1c, 0x19, 0x4c, 0x10, 0x04, 0x8b, 0x03, 0xdc, 0xdb, 0x1c, 0x97, 0x29, 0xab, 0x2f, 0xa8, 0xa7, 0xa9, 0x24, 0xaa, 0xa4, 0x27, 0xa7, 0x0d, 0x08, 0x02, 0x07, 0x1d, 0x91, 0x06, 0x71, 0xe0, 0x35, 0x1c, 0xe8, 0xca, 0xf0, 0x98, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0xc1, 0x6c, 0x40, 0x90, 0x39, 0xe8, 0xc2, 0x20, 0x0d, 0xe8, 0xc0, 0x6b, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x84, 0x8b, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0xb1, 0x83, 0xee, 0x0e, 0xd2, 0x00, 0x0f, 0xbc, 0x66, 0x03, 0xf1, 0x06, 0x72, 0x50, 0x07, 0x79, 0xb0, 0xe1, 0x20, 0xb4, 0x33, 0x40, 0x83, 0x36, 0x70, 0x03, 0x3d, 0x98, 0x20, 0x28, 0xc4, 0x06, 0x60, 0xc3, 0x40, 0xf4, 0x41, 0x1f, 0x6c, 0x08, 0xfc, 0x60, 0xc3, 0x30, 0xf0, 0xc1, 0x1f, 0x4c, 0x10, 0xba, 0x32, 0xd8, 0x10, 0x84, 0x02, 0x89, 0xb6, 0xb0, 0x34, 0x37, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x13, 0x84, 0xc5, 0x9b, 0x20, 0x2c, 0xdd, 0x86, 0x80, 0x98, 0x20, 0x2c, 0xdc, 0x04, 0x61, 0xd9, 0x36, 0x2c, 0x04, 0x29, 0x94, 0x82, 0x29, 0x9c, 0x02, 0x2a, 0x0c, 0xa8, 0x40, 0xa4, 0x02, 0x40, 0x84, 0xaa, 0x08, 0x6b, 0xe8, 0xe9, 0x49, 0x8a, 0x68, 0x82, 0xb0, 0x68, 0x1b, 0x84, 0xae, 0xdb, 0xb0, 0x0c, 0xab, 0x50, 0x0a, 0xa9, 0x70, 0x0a, 0xac, 0x30, 0xb0, 0xc2, 0x90, 0x0a, 0xad, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x20, 0x60, 0x1b, 0x84, 0x0e, 0x16, 0x36, 0x2c, 0xcc, 0x2b, 0x94, 0x42, 0x2a, 0x9c, 0x02, 0x2b, 0x0c, 0xa8, 0xc0, 0xa4, 0x42, 0x2c, 0x6c, 0x18, 0x54, 0xc1, 0x15, 0x64, 0x81, 0xc9, 0x94, 0xd5, 0x17, 0x55, 0x98, 0xdc, 0x59, 0x19, 0xdd, 0x04, 0x61, 0x51, 0x36, 0x2c, 0x04, 0x2d, 0x94, 0x42, 0x2d, 0x9c, 0x42, 0x2a, 0x0c, 0xa8, 0x40, 0xa4, 0x42, 0x2c, 0x6c, 0x08, 0x6c, 0x61, 0xc3, 0x30, 0x0b, 0xb7, 0x00, 0x6c, 0x28, 0xf8, 0x60, 0x14, 0x70, 0x21, 0x03, 0x68, 0x98, 0xb1, 0xbd, 0x85, 0xd1, 0xcd, 0xb1, 0x48, 0x73, 0x9b, 0xa3, 0x9b, 0x9b, 0x20, 0x08, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0x2f, 0x36, 0x32, 0x1a, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x74, 0x44, 0xe8, 0xca, 0xf0, 0xbe, 0xdc, 0xde, 0xe4, 0xda, 0x36, 0x28, 0xba, 0xd0, 0xec, 0x02, 0x2f, 0xf4, 0x02, 0xe2, 0x0b, 0x69, 0xf0, 0x0b, 0x5d, 0x15, 0x36, 0x36, 0xbb, 0x36, 0x97, 0x34, 0xb2, 0x32, 0x37, 0xba, 0x29, 0x41, 0x50, 0x85, 0x0c, 0xcf, 0xc5, 0xae, 0x4c, 0x6e, 0x2e, 0xed, 0xcd, 0x6d, 0x4a, 0x40, 0x34, 0x21, 0xc3, 0x73, 0xb1, 0x0b, 0x63, 0xb3, 0x2b, 0x93, 0x9b, 0x12, 0x14, 0x75, 0xc8, 0xf0, 0x5c, 0xe6, 0xd0, 0xc2, 0xc8, 0xca, 0xe4, 0x9a, 0xde, 0xc8, 0xca, 0xd8, 0xa6, 0x04, 0x48, 0x19, 0x32, 0x3c, 0x17, 0xb9, 0xb2, 0xb9, 0xb7, 0x3a, 0xb9, 0xb1, 0xb2, 0xb9, 0x29, 0x01, 0x56, 0x89, 0x0c, 0xcf, 0x85, 0x2e, 0x0f, 0xae, 0x2c, 0xc8, 0xcd, 0xed, 0x8d, 0x2e, 0x8c, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x8a, 0xa0, 0x07, 0x7f, 0x50, 0x87, 0x0c, 0xcf, 0xc5, 0x2e, 0xad, 0xec, 0x2e, 0x89, 0x6c, 0x8a, 0x2e, 0x8c, 0xae, 0x6c, 0x4a, 0x10, 0x0a, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0xb8, 0xd0, 0x85, 0x0c, 0xcf, 0x65, 0xec, 0xad, 0xce, 0x8d, 0xae, 0x4c, 0x6e, 0x6e, 0x4a, 0xf0, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x35, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x00, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0x2a, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0x2c, 0x01, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0x65, 0x2b, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0x2c, 0x00, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0x2c, 0x10, 0x38, 0xb3, 0xfe, 0x48, 0xd4, 0x32, 0x9e, 0x5e, 0x97, 0x97, 0x65, 0x44, 0xa0, 0xf5, 0x47, 0xb2, 0x97, 0xc7, 0xf4, 0xb7, 0x1c, 0xd8, 0x24, 0xc1, 0x66, 0x40, 0x20, 0x10, 0x18, 0xb4, 0x04, 0x69, 0xb8, 0x7c, 0xe7, 0xf1, 0x85, 0x88, 0x00, 0x26, 0x22, 0x04, 0x9a, 0x61, 0x21, 0x0c, 0xc1, 0x19, 0x2e, 0xdf, 0x79, 0xfc, 0xc1, 0x99, 0x6e, 0xbf, 0xb8, 0x6d, 0x2b, 0x98, 0x86, 0xcb, 0x77, 0x1e, 0x7f, 0x71, 0x80, 0x41, 0x6c, 0x1e, 0x6a, 0xf2, 0x8b, 0xdb, 0xb6, 0x03, 0x68, 0xb8, 0x7c, 0xe7, 0xf1, 0x25, 0x80, 0x79, 0x16, 0xc2, 0x2f, 0x6e, 0xdb, 0x0c, 0xaa, 0xe1, 0xf2, 0x9d, 0xc7, 0x97, 0x26, 0x27, 0x22, 0x50, 0x6a, 0x7a, 0xa8, 0xc9, 0x2f, 0x6e, 0xdb, 0x08, 0x08, 0x06, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xea, 0x91, 0x74, 0x07, 0xef, 0x37, 0x34, 0xc5, 0x63, 0xc4, 0x30, 0x49, 0xbf, 0x93, 0x8b, 0x44, 0x58, 0x49, 0x4c, 0xe0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc8, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xef, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x12, 0x46, 0x59, 0x08, 0x66, 0x60, 0x08, 0x67, 0xc3, 0xf0, 0x40, 0xd1, 0x04, 0x41, 0xa3, 0x36, 0x20, 0xc4, 0xb4, 0x10, 0xc4, 0x40, 0x00, 0x1b, 0x02, 0x6a, 0x03, 0x21, 0x01, 0x40, 0x35, 0x41, 0xd8, 0xaa, 0x0d, 0xc1, 0x35, 0x41, 0x10, 0x00, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0xde, 0xe6, 0xd2, 0xe8, 0xd2, 0xde, 0xdc, 0x26, 0x08, 0x45, 0x33, 0x41, 0x28, 0x9c, 0x0d, 0x01, 0x31, 0x41, 0x28, 0x9e, 0x09, 0x42, 0x01, 0x6d, 0x58, 0x88, 0x8d, 0xeb, 0xbc, 0x6f, 0xf8, 0x08, 0x30, 0x00, 0x88, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0x4d, 0x10, 0x8a, 0x68, 0x82, 0x40, 0x2c, 0x1b, 0x04, 0x32, 0x20, 0x83, 0x0d, 0xcb, 0x20, 0x06, 0x1c, 0x18, 0x78, 0x63, 0x30, 0x8c, 0xc1, 0x00, 0x06, 0x65, 0xc0, 0x62, 0xe8, 0x89, 0xe9, 0x49, 0x6a, 0x82, 0x40, 0x30, 0x1b, 0x04, 0x32, 0x40, 0x83, 0x0d, 0x0b, 0x73, 0x06, 0x1c, 0x18, 0x78, 0x63, 0x30, 0x7c, 0x0c, 0x18, 0xa4, 0xc1, 0x86, 0x21, 0x0c, 0xcc, 0x40, 0x0d, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x0a, 0x69, 0xc3, 0x42, 0xb0, 0x01, 0xd7, 0x06, 0x1e, 0x18, 0x0c, 0x1f, 0x01, 0x06, 0x69, 0xb0, 0x21, 0x70, 0x83, 0x0d, 0xc3, 0x1a, 0xbc, 0x01, 0xb0, 0xa1, 0xc8, 0x34, 0x38, 0xb0, 0x80, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x30, 0xea, 0x90, 0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, 0x95, 0xb1, 0x4d, 0x09, 0x90, 0x32, 0x64, 0x78, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x82, 0xaa, 0x0e, 0x19, 0x9e, 0x8b, 0x5d, 0x5a, 0xd9, 0x5d, 0x12, 0xd9, 0x14, 0x5d, 0x18, 0x5d, 0xd9, 0x94, 0xe0, 0xaa, 0x43, 0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0x80, 0x03, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0x72, 0x2b, 0xbc, 0x52, 0x28, 0xb9, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0x00, 0xb3, 0xac, 0x0b, 0x82, 0xc1, 0x18, 0x81, 0x18, 0xee, 0x30, 0xfc, 0x0b, 0x63, 0x04, 0x3a, 0x4a, 0xd3, 0xe5, 0x2f, 0x8c, 0x11, 0xc8, 0x79, 0xaf, 0xfa, 0xdf, 0x18, 0x41, 0x48, 0x82, 0x21, 0xee, 0x0b, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0xbc, 0xb8, 0xa8, 0xe6, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x01, 0x73, 0x79, 0x5e, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xd2, 0x18, 0x34, 0x98, 0x18, 0x88, 0x81, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x12, 0x19, 0x38, 0x99, 0x18, 0x88, 0xc1, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x52, 0x19, 0x3c, 0xdc, 0x18, 0x8c, 0x01, 0x35, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x1a, 0x3c, 0x62, 0x40, 0x06, 0x9b, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x1a, 0x40, 0x63, 0x50, 0x06, 0xd5, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x06, 0x1b, 0x44, 0x64, 0x60, 0x06, 0x1c, 0x34, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x1b, 0x48, 0x65, 0x70, 0x06, 0x60, 0x10, 0x8d, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xe1, 0x06, 0x53, 0x1a, 0xa0, 0xc1, 0x27, 0x8d, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x06, 0x94, 0x1a, 0xa4, 0x41, 0x36, 0x8d, 0x18, 0x3c, 0x00, 0x08, 0x82, 0x41, 0xe3, 0x06, 0x18, 0x72, 0x08, 0xc1, 0xb2, 0xa8, 0x81, 0x1a, 0x50, 0xcb, 0x68, 0x42, 0x00, 0x8c, 0x18, 0x3c, 0x00, 0x08, 0x82, 0x41, 0x03, 0x07, 0xda, 0x92, 0x10, 0x43, 0xd3, 0xb0, 0x01, 0x1b, 0x58, 0xcd, 0x68, 0x42, 0x00, 0x8c, 0x18, 0x3c, 0x00, 0x08, 0x82, 0x41, 0x23, 0x07, 0x9c, 0xb3, 0x18, 0xc5, 0xf3, 0xb8, 0x81, 0x1b, 0x60, 0xcf, 0x68, 0x42, 0x00, 0x58, 0x51, 0xc1, 0xc7, 0x08, 0x0a, 0x3e, 0x36, 0x54, 0xf0, 0x19, 0x31, 0x58, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x0e, 0xc4, 0x60, 0x10, 0x82, 0xea, 0xca, 0x46, 0x0c, 0x16, 0x00, 0x04, 0xc1, 0xe0, 0xb9, 0x83, 0x31, 0x20, 0x06, 0xc1, 0xda, 0xb8, 0x11, 0x83, 0x05, 0x00, 0x41, 0x30, 0x78, 0xf0, 0x80, 0x0c, 0x0a, 0x62, 0xb8, 0xbc, 0xcc, 0x06, 0x49, 0x3e, 0x36, 0x48, 0xf2, 0xb1, 0x41, 0x92, 0xcf, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7e, 0x60, 0x06, 0x79, 0x90, 0x07, 0x70, 0x30, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xe2, 0x07, 0x66, 0x90, 0x07, 0x79, 0x90, 0x06, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7e, 0x60, 0x06, 0x79, 0x90, 0x07, 0x6f, 0x10, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xe2, 0x07, 0x66, 0x90, 0x07, 0x79, 0x20, 0x07, 0x12, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_NV12_JPEG.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureUV : register(t1); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(NVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {0.0, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.0000, 0.0000, 1.4020}; const float3 Gcoeff = {1.0000, -0.3441, -0.7141}; const float3 Bcoeff = {1.0000, 1.7720, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_NV12_JPEG[] = { 0x44, 0x58, 0x42, 0x43, 0x4d, 0x84, 0xab, 0xd3, 0xf9, 0x2a, 0x29, 0x46, 0xc8, 0x39, 0x22, 0xd6, 0x7a, 0xdf, 0x22, 0x16, 0x01, 0x00, 0x00, 0x00, 0xe1, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x1d, 0x0b, 0x00, 0x00, 0x39, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x4c, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xe9, 0x01, 0x00, 0x0f, 0x79, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa7, 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x0f, 0x06, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0xa2, 0x6c, 0x68, 0x15, 0xc1, 0x08, 0x40, 0x21, 0x94, 0x41, 0x49, 0xd0, 0x99, 0x01, 0xa0, 0x32, 0x03, 0x40, 0x64, 0x06, 0x80, 0xc6, 0x0c, 0x00, 0x85, 0x19, 0x00, 0xe2, 0x33, 0x00, 0xd4, 0xc7, 0x72, 0x18, 0x02, 0x00, 0x00, 0xe0, 0x38, 0x00, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x41, 0x99, 0x20, 0x08, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x05, 0x18, 0x70, 0xa1, 0x43, 0x2b, 0xa3, 0x2a, 0xc3, 0xa3, 0xab, 0x93, 0x2b, 0xcb, 0x9a, 0x20, 0x08, 0xcd, 0x04, 0x41, 0x70, 0x36, 0x08, 0x44, 0xb3, 0x21, 0x21, 0x94, 0x85, 0x20, 0x06, 0x86, 0x70, 0xc8, 0xd0, 0xa1, 0x95, 0x51, 0x95, 0xe1, 0xd1, 0xd5, 0xc9, 0x95, 0x55, 0x59, 0x6d, 0x48, 0x06, 0x05, 0x22, 0x86, 0x81, 0x21, 0x9c, 0x0d, 0xc2, 0x13, 0x4d, 0x10, 0x8e, 0x8f, 0x0a, 0x1d, 0x5a, 0xd9, 0x54, 0x58, 0x1b, 0x1c, 0x5b, 0x99, 0xdc, 0x06, 0x84, 0x98, 0x28, 0x82, 0x18, 0x08, 0x60, 0x43, 0x50, 0x6d, 0x20, 0x24, 0x00, 0xb0, 0x26, 0x08, 0x44, 0x18, 0x4c, 0x10, 0x84, 0x87, 0x01, 0xda, 0x04, 0x41, 0x80, 0x26, 0x08, 0x42, 0xb4, 0xc1, 0x40, 0xb4, 0x8d, 0xe0, 0x1a, 0x12, 0x6d, 0x69, 0x70, 0x73, 0x13, 0x04, 0x41, 0xda, 0x40, 0x20, 0xde, 0xf6, 0x4d, 0x10, 0x82, 0x31, 0xd8, 0x20, 0x10, 0x61, 0xb0, 0x21, 0x10, 0x83, 0x0d, 0x02, 0x31, 0x06, 0x1b, 0x88, 0xac, 0x03, 0x03, 0x32, 0x98, 0x20, 0x0c, 0x62, 0x30, 0x41, 0x10, 0x26, 0x1a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x13, 0x04, 0x81, 0xda, 0x60, 0x20, 0x68, 0xb0, 0x11, 0x5c, 0x1a, 0x6c, 0x10, 0xce, 0x40, 0x0d, 0x26, 0x08, 0x1c, 0x19, 0x4c, 0x10, 0x84, 0x8a, 0x03, 0xdc, 0xdb, 0x1c, 0x97, 0x29, 0xab, 0x2f, 0xa8, 0xa7, 0xa9, 0x24, 0xaa, 0xa4, 0x27, 0xa7, 0x0d, 0x08, 0xe2, 0x06, 0x1b, 0x71, 0x06, 0x6f, 0xc0, 0x35, 0x1c, 0xe8, 0xca, 0xf0, 0x98, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0xc1, 0x6c, 0x40, 0x90, 0x38, 0xd8, 0xbe, 0x33, 0x90, 0x03, 0xae, 0x61, 0x31, 0xf6, 0xc6, 0xf6, 0x26, 0x37, 0x41, 0x10, 0x2c, 0x1a, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x30, 0x1b, 0x10, 0x84, 0x0e, 0xb6, 0x3a, 0x38, 0x03, 0x3b, 0xe0, 0x9a, 0x0d, 0x44, 0x1b, 0xc0, 0xc1, 0x1c, 0xdc, 0xc1, 0x86, 0x83, 0xc0, 0xca, 0xc0, 0x0c, 0xd6, 0x80, 0x0d, 0xf0, 0x60, 0x82, 0xa0, 0x0c, 0x1b, 0x80, 0x0d, 0x03, 0xb1, 0x07, 0x7b, 0xb0, 0x21, 0xe0, 0x83, 0x0d, 0xc3, 0xa0, 0x07, 0x7d, 0x30, 0x41, 0xe8, 0xca, 0x60, 0x43, 0xf0, 0x07, 0x24, 0xda, 0xc2, 0xd2, 0xdc, 0xb8, 0x4c, 0x59, 0x7d, 0x41, 0xbd, 0xcd, 0xa5, 0xd1, 0xa5, 0xbd, 0xb9, 0x4d, 0x10, 0x16, 0x6f, 0x82, 0xb0, 0x74, 0x1b, 0x02, 0x62, 0x82, 0xb0, 0x70, 0x13, 0x84, 0x65, 0xdb, 0xb0, 0x10, 0xa2, 0x30, 0x0a, 0xa4, 0x50, 0x0a, 0xa6, 0x30, 0x98, 0x02, 0x71, 0x0a, 0x00, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0xc2, 0xa2, 0x6d, 0x10, 0xb6, 0x6d, 0xc3, 0x32, 0xa4, 0xc2, 0x28, 0x9c, 0x42, 0x29, 0xa8, 0xc2, 0xa0, 0x0a, 0xc3, 0x29, 0xac, 0x02, 0x8b, 0xa1, 0x27, 0xa6, 0x27, 0xa9, 0x09, 0x82, 0x70, 0x6d, 0x10, 0x36, 0x57, 0xd8, 0xb0, 0x30, 0xad, 0x30, 0x0a, 0xa7, 0x50, 0x0a, 0xaa, 0x30, 0x98, 0x02, 0x73, 0x0a, 0xaf, 0xb0, 0x61, 0x40, 0x05, 0x56, 0x80, 0x05, 0x26, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x13, 0x84, 0x25, 0xd9, 0xb0, 0x10, 0xb2, 0x30, 0x0a, 0xb3, 0x50, 0x0a, 0xa7, 0x30, 0x98, 0x02, 0x71, 0x0a, 0xaf, 0xb0, 0x21, 0xa0, 0x85, 0x0d, 0x43, 0x2c, 0xd4, 0x02, 0xb0, 0xa1, 0xd0, 0x83, 0x50, 0xb0, 0x85, 0x0b, 0xa0, 0x61, 0xc6, 0xf6, 0x16, 0x46, 0x37, 0x37, 0x41, 0x10, 0x30, 0x16, 0x69, 0x6e, 0x73, 0x74, 0x73, 0x13, 0x04, 0x21, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0xc5, 0x46, 0x46, 0x63, 0x2e, 0xed, 0xec, 0x6b, 0x8e, 0x8e, 0x08, 0x5d, 0x19, 0xde, 0x97, 0xdb, 0x9b, 0x5c, 0xdb, 0x06, 0x05, 0x17, 0x72, 0x41, 0x17, 0x76, 0x81, 0x17, 0x90, 0x5e, 0x38, 0x03, 0x5f, 0x60, 0xaa, 0xb0, 0xb1, 0xd9, 0xb5, 0xb9, 0xa4, 0x91, 0x95, 0xb9, 0xd1, 0x4d, 0x09, 0x82, 0x2a, 0x64, 0x78, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x02, 0xa2, 0x09, 0x19, 0x9e, 0x8b, 0x5d, 0x18, 0x9b, 0x5d, 0x99, 0xdc, 0x94, 0xa0, 0xa8, 0x43, 0x86, 0xe7, 0x32, 0x87, 0x16, 0x46, 0x56, 0x26, 0xd7, 0xf4, 0x46, 0x56, 0xc6, 0x36, 0x25, 0x40, 0xca, 0x90, 0xe1, 0xb9, 0xc8, 0x95, 0xcd, 0xbd, 0xd5, 0xc9, 0x8d, 0x95, 0xcd, 0x4d, 0x09, 0xac, 0x4a, 0x64, 0x78, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x04, 0x3c, 0xe8, 0x83, 0x3a, 0x64, 0x78, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x49, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x82, 0x3f, 0xa8, 0x43, 0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0xb0, 0x85, 0x2e, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x53, 0x02, 0x5f, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x25, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x80, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0xaa, 0x15, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x16, 0x00, 0x1c, 0x04, 0x7e, 0x74, 0x74, 0x99, 0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0x72, 0x16, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x1a, 0x82, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x76, 0xe0, 0x0c, 0x97, 0xef, 0x3c, 0xfe, 0xe0, 0x4c, 0xb7, 0x5f, 0xdc, 0xb6, 0x11, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x01, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x05, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x59, 0x53, 0xa0, 0x6c, 0x9f, 0xab, 0x00, 0x3c, 0x49, 0x69, 0x91, 0x4f, 0x9f, 0xaf, 0x32, 0x44, 0x58, 0x49, 0x4c, 0xa0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x88, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xdf, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x84, 0x07, 0x9a, 0x20, 0x68, 0xd4, 0x06, 0x84, 0x90, 0x16, 0x82, 0x18, 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x22, 0x00, 0xa0, 0x26, 0x08, 0x5b, 0xb5, 0x21, 0xb0, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x68, 0x26, 0x08, 0x85, 0xb3, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x33, 0x41, 0x28, 0xa0, 0x0d, 0x0b, 0xa1, 0x6d, 0x5c, 0xe7, 0x0d, 0x1e, 0xf1, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0x34, 0x41, 0x20, 0x96, 0x0d, 0xc2, 0x18, 0x8c, 0xc1, 0x86, 0x65, 0x08, 0x83, 0xed, 0xeb, 0xc4, 0x60, 0x10, 0x83, 0xe1, 0x23, 0x03, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, 0x04, 0x82, 0xd9, 0x20, 0x8c, 0xc1, 0x19, 0x6c, 0x58, 0x18, 0x33, 0xd8, 0xbe, 0x4e, 0x0c, 0x06, 0x8f, 0xf9, 0xd0, 0x60, 0xc3, 0x00, 0x06, 0x65, 0x90, 0x06, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2, 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xd6, 0x60, 0x63, 0x83, 0xee, 0x1b, 0x3c, 0xe2, 0x43, 0x83, 0x0d, 0x41, 0x1b, 0x6c, 0x18, 0xd4, 0xc0, 0x0d, 0x80, 0x0d, 0x05, 0x96, 0xbd, 0x41, 0x05, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x50, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x56, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1, 0x1b, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xc2, 0x2b, 0xb7, 0x92, 0x2b, 0x85, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0x50, 0x9e, 0x74, 0xe9, 0x7f, 0x63, 0x04, 0xa2, 0x3e, 0xb7, 0xf3, 0x2f, 0x8c, 0x11, 0x80, 0xef, 0x0a, 0xae, 0xbf, 0x30, 0x46, 0xc0, 0x97, 0xbd, 0xb9, 0x7f, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x85, 0x01, 0x63, 0x81, 0x01, 0x18, 0x40, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x41, 0x73, 0x81, 0x01, 0x18, 0x44, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x8d, 0x81, 0xa3, 0x85, 0x41, 0x18, 0x48, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa0, 0x41, 0x03, 0x06, 0x62, 0x90, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa4, 0x81, 0x13, 0x06, 0x63, 0x30, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa8, 0xc1, 0x23, 0x06, 0x64, 0xa0, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xac, 0x01, 0x34, 0x06, 0x65, 0xe0, 0x3d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb0, 0x41, 0x74, 0x06, 0x66, 0xd0, 0x41, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb4, 0x81, 0x84, 0x06, 0x67, 0x70, 0x45, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb0, 0xc1, 0x85, 0x1c, 0x42, 0xa0, 0x28, 0x68, 0x80, 0x06, 0x92, 0x32, 0x9a, 0x10, 0x00, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb8, 0x41, 0xb6, 0x24, 0xc4, 0xc0, 0x30, 0x6a, 0xa0, 0x06, 0x14, 0x33, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x60, 0x42, 0x04, 0x1f, 0x13, 0x24, 0xf8, 0x8c, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x23, 0x07, 0x9d, 0x21, 0x04, 0x12, 0x55, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x33, 0x07, 0xde, 0x31, 0x08, 0xd3, 0x85, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x43, 0x07, 0x1f, 0x42, 0x0c, 0x94, 0x66, 0xd9, 0x00, 0xc9, 0xc7, 0x06, 0x48, 0x3e, 0x36, 0x40, 0xf2, 0x19, 0x31, 0x48, 0x00, 0x10, 0x04, 0x03, 0x44, 0x0f, 0xc2, 0xa0, 0x0e, 0xea, 0x80, 0x0d, 0x86, 0x11, 0x83, 0x04, 0x00, 0x41, 0x30, 0x40, 0xf4, 0x20, 0x0c, 0xea, 0xa0, 0x0e, 0xca, 0x40, 0x18, 0x31, 0x48, 0x00, 0x10, 0x04, 0x03, 0x44, 0x0f, 0xc2, 0xa0, 0x0e, 0xea, 0x60, 0x0d, 0x82, 0x11, 0x83, 0x04, 0x00, 0x41, 0x30, 0x40, 0xf4, 0x20, 0x0c, 0xea, 0xa0, 0x0e, 0xdc, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_NV12_BT601.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureUV : register(t1); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(NVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.1644, 0.0000, 1.5960}; const float3 Gcoeff = {1.1644, -0.3918, -0.8130}; const float3 Bcoeff = {1.1644, 2.0172, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_NV12_BT601[] = { 0x44, 0x58, 0x42, 0x43, 0xd0, 0xda, 0x37, 0x96, 0x52, 0x6b, 0x77, 0x3b, 0x82, 0x71, 0x03, 0xf9, 0x0a, 0x76, 0x4b, 0xd7, 0x01, 0x00, 0x00, 0x00, 0xe9, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x15, 0x0b, 0x00, 0x00, 0x31, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xe9, 0x01, 0x00, 0x0f, 0x79, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa7, 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x0f, 0x06, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0x87, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3e, 0x03, 0x40, 0x7d, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x41, 0x99, 0x20, 0x08, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0xc5, 0xc7, 0x85, 0x0e, 0xad, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x2c, 0x6b, 0x82, 0x20, 0x34, 0x13, 0x04, 0xc1, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0x21, 0x43, 0x87, 0x56, 0x46, 0x55, 0x86, 0x47, 0x57, 0x27, 0x57, 0x56, 0x65, 0xb5, 0x21, 0x19, 0x14, 0x88, 0x18, 0x06, 0x86, 0x70, 0x36, 0x08, 0x4f, 0x34, 0x41, 0x38, 0x3c, 0x2a, 0x74, 0x68, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1b, 0x10, 0x62, 0xa2, 0x08, 0x62, 0x20, 0x80, 0x0d, 0x41, 0xb5, 0x81, 0x90, 0x00, 0xc0, 0x9a, 0x20, 0x10, 0x60, 0x30, 0x41, 0x10, 0x1e, 0x06, 0x68, 0x13, 0x04, 0x01, 0x9a, 0x20, 0x08, 0xd1, 0x06, 0x03, 0xd1, 0x36, 0x82, 0x6b, 0x48, 0xb4, 0xa5, 0xc1, 0xcd, 0x4d, 0x10, 0x04, 0x69, 0x03, 0x81, 0x78, 0xdb, 0x37, 0x41, 0x08, 0xc4, 0x60, 0x83, 0x40, 0x84, 0xc1, 0x86, 0x40, 0x0c, 0x36, 0x08, 0xc4, 0x18, 0x6c, 0x20, 0xb2, 0x0e, 0x0c, 0xc8, 0x60, 0x82, 0x30, 0x84, 0xc1, 0x04, 0x41, 0x98, 0x68, 0xa0, 0x85, 0xb9, 0x91, 0xb1, 0x95, 0x4d, 0x10, 0x04, 0x6a, 0x83, 0x81, 0xa0, 0xc1, 0x46, 0x70, 0x69, 0xb0, 0x41, 0x38, 0x03, 0x35, 0x98, 0x20, 0x70, 0x63, 0x30, 0x41, 0x10, 0x2a, 0x0e, 0x70, 0x6f, 0x73, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0x9e, 0xa6, 0x92, 0xa8, 0x92, 0x9e, 0x9c, 0x36, 0x20, 0x88, 0x1b, 0x6c, 0xc4, 0x19, 0xbc, 0x01, 0xd7, 0x70, 0xa0, 0x2b, 0xc3, 0x63, 0x42, 0x55, 0x84, 0x35, 0xf4, 0xf4, 0x24, 0x45, 0x04, 0xb3, 0x01, 0x41, 0xe2, 0x60, 0xfb, 0xce, 0x40, 0x0e, 0xb8, 0x86, 0xc5, 0xd8, 0x1b, 0xdb, 0x9b, 0xdc, 0x04, 0x41, 0xb0, 0x68, 0x0c, 0x3d, 0x31, 0x3d, 0x49, 0xc1, 0x6c, 0x40, 0x10, 0x3a, 0xd8, 0xea, 0xe0, 0x0c, 0xec, 0x80, 0x6b, 0x36, 0x10, 0x6d, 0x00, 0x07, 0x73, 0x70, 0x07, 0x1b, 0x0e, 0x02, 0x2b, 0x03, 0x33, 0x58, 0x03, 0x36, 0xc0, 0x83, 0x09, 0x82, 0x32, 0x6c, 0x00, 0x36, 0x0c, 0xc4, 0x1e, 0xec, 0xc1, 0x86, 0x80, 0x0f, 0x36, 0x0c, 0x83, 0x1e, 0xf4, 0xc1, 0x04, 0xa1, 0x23, 0x83, 0x0d, 0xc1, 0x1f, 0x90, 0x68, 0x0b, 0x4b, 0x73, 0xe3, 0x32, 0x65, 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x58, 0xba, 0x09, 0xc2, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0xc2, 0xb2, 0x4d, 0x10, 0x16, 0x6d, 0xc3, 0x42, 0x88, 0xc2, 0x28, 0x90, 0x42, 0x29, 0x98, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0x00, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x4b, 0xb6, 0x41, 0xd8, 0xb6, 0x0d, 0xcb, 0x90, 0x0a, 0xa3, 0x70, 0x0a, 0xa5, 0xa0, 0x0a, 0x83, 0x2a, 0x0c, 0xa7, 0xb0, 0x0a, 0x2c, 0x86, 0x9e, 0x98, 0x9e, 0xa4, 0x26, 0x08, 0xc2, 0xb5, 0x41, 0xd8, 0x5c, 0x61, 0xc3, 0xc2, 0xb4, 0xc2, 0x28, 0x9c, 0x42, 0x29, 0xa8, 0xc2, 0x60, 0x0a, 0xcc, 0x29, 0xbc, 0xc2, 0x86, 0x01, 0x15, 0x58, 0x01, 0x16, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x96, 0x64, 0xc3, 0x42, 0xc8, 0xc2, 0x28, 0xcc, 0x42, 0x29, 0x9c, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0xbc, 0xc2, 0x86, 0x80, 0x16, 0x36, 0x0c, 0xb1, 0x50, 0x0b, 0xc0, 0x86, 0x42, 0x0f, 0x42, 0xc1, 0x16, 0x2e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0x1c, 0x8b, 0x34, 0xb7, 0x39, 0xba, 0xb9, 0x09, 0x82, 0x80, 0xd1, 0x98, 0x4b, 0x3b, 0xfb, 0x62, 0x23, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0x35, 0x47, 0x47, 0x84, 0xae, 0x0c, 0xef, 0xcb, 0xed, 0x4d, 0xae, 0x6d, 0x83, 0x82, 0x0b, 0x4d, 0x2e, 0xe8, 0xc2, 0x2e, 0x20, 0xbc, 0x70, 0x06, 0xbd, 0xc0, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x41, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x58, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82, 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x08, 0x78, 0xd0, 0x07, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x7f, 0x50, 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x60, 0x0b, 0x5d, 0xc8, 0xf0, 0x5c, 0xc6, 0xde, 0xea, 0xdc, 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x25, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x80, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0xaa, 0x15, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x16, 0x00, 0x1c, 0x04, 0x7e, 0x74, 0x74, 0x99, 0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0x72, 0x16, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x1a, 0x82, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x76, 0xe0, 0x0c, 0x97, 0xef, 0x3c, 0xfe, 0xe0, 0x4c, 0xb7, 0x5f, 0xdc, 0xb6, 0x11, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x01, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x05, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x59, 0x5f, 0x75, 0xd6, 0x73, 0xad, 0xd4, 0x07, 0x66, 0xfb, 0xaa, 0x3b, 0xb4, 0x38, 0x99, 0x44, 0x58, 0x49, 0x4c, 0xb0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x84, 0x07, 0x9a, 0x20, 0x68, 0xd4, 0x06, 0x84, 0x90, 0x16, 0x82, 0x18, 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x22, 0x00, 0xa0, 0x26, 0x08, 0x5b, 0xb5, 0x21, 0xb0, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x68, 0x26, 0x08, 0x85, 0xb3, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x33, 0x41, 0x28, 0xa0, 0x0d, 0x0b, 0xa1, 0x6d, 0x5c, 0xe7, 0x0d, 0x1e, 0xf1, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0x34, 0x41, 0x20, 0x96, 0x0d, 0xc2, 0x18, 0x8c, 0xc1, 0x86, 0x65, 0x08, 0x83, 0xed, 0xeb, 0xc4, 0x60, 0x10, 0x83, 0xe1, 0x23, 0x03, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, 0x04, 0x82, 0xd9, 0x20, 0x8c, 0xc1, 0x19, 0x6c, 0x58, 0x18, 0x33, 0xd8, 0xbe, 0x4e, 0x0c, 0x06, 0x8f, 0xf9, 0xd0, 0x60, 0xc3, 0x00, 0x06, 0x65, 0x90, 0x06, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2, 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xd6, 0x60, 0x63, 0x83, 0xee, 0x1b, 0x3c, 0xe2, 0x43, 0x83, 0x0d, 0x41, 0x1b, 0x6c, 0x18, 0xd4, 0xc0, 0x0d, 0x80, 0x0d, 0x05, 0x96, 0xbd, 0x41, 0x05, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x50, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x56, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1, 0x1b, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xc2, 0x2b, 0xb7, 0x92, 0x2b, 0x85, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0xe0, 0xba, 0xa6, 0x08, 0x82, 0xc1, 0x18, 0x41, 0x69, 0xa2, 0x60, 0xfd, 0x0b, 0x63, 0x04, 0x22, 0x6c, 0xc6, 0xec, 0x2f, 0x8c, 0x11, 0xe8, 0xad, 0x8c, 0xf3, 0xdf, 0x18, 0x41, 0x48, 0x82, 0x21, 0xee, 0x0b, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0xbc, 0xb8, 0xa8, 0xe6, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x41, 0x73, 0x85, 0x41, 0x18, 0x44, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x8d, 0x81, 0x83, 0x85, 0x41, 0x18, 0x48, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x91, 0xc1, 0xb3, 0x89, 0x81, 0x18, 0x4c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa4, 0x81, 0x13, 0x06, 0x63, 0xa0, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa8, 0xc1, 0x23, 0x06, 0x64, 0x40, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xac, 0x01, 0x34, 0x06, 0x65, 0xb0, 0x3d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb0, 0x41, 0x44, 0x06, 0x66, 0xf0, 0x41, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb4, 0x81, 0x84, 0x06, 0x67, 0xe0, 0x45, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb8, 0xc1, 0x94, 0x06, 0x68, 0x80, 0x49, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb4, 0x01, 0x86, 0x1c, 0x42, 0xa0, 0x28, 0x69, 0x90, 0x06, 0x93, 0x32, 0x9a, 0x10, 0x00, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xbc, 0x81, 0xb6, 0x24, 0xc4, 0xc0, 0x30, 0x6b, 0xb0, 0x06, 0x15, 0x33, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x60, 0xc4, 0x04, 0x1f, 0x1b, 0x24, 0xf8, 0xd8, 0x30, 0xc1, 0x67, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x1e, 0x3a, 0xf8, 0x06, 0x21, 0x98, 0xaa, 0x6b, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3a, 0x00, 0x03, 0x62, 0x10, 0xa8, 0x4c, 0x1b, 0x31, 0x58, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x0e, 0xc2, 0xa0, 0x20, 0x86, 0x8a, 0xbb, 0x6c, 0x88, 0xe4, 0x63, 0x43, 0x24, 0x1f, 0x1b, 0x22, 0xf9, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xe0, 0x06, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x67, 0x20, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xd0, 0x06, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x70, 0x10, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_NV12_BT709.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureUV : register(t1); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(NVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.1644, 0.0000, 1.7927}; const float3 Gcoeff = {1.1644, -0.2132, -0.5329}; const float3 Bcoeff = {1.1644, 2.1124, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_NV12_BT709[] = { 0x44, 0x58, 0x42, 0x43, 0x45, 0xb4, 0xa5, 0xa8, 0x01, 0xc5, 0xab, 0xf5, 0xc0, 0x51, 0x32, 0xc2, 0xc3, 0x60, 0x64, 0xf1, 0x01, 0x00, 0x00, 0x00, 0xe9, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x15, 0x0b, 0x00, 0x00, 0x31, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xe9, 0x01, 0x00, 0x0f, 0x79, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa7, 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x0f, 0x06, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0x87, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3e, 0x03, 0x40, 0x7d, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x41, 0x99, 0x20, 0x08, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0xc5, 0xc7, 0x85, 0x0e, 0xad, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x2c, 0x6b, 0x82, 0x20, 0x34, 0x13, 0x04, 0xc1, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0x21, 0x43, 0x87, 0x56, 0x46, 0x55, 0x86, 0x47, 0x57, 0x27, 0x57, 0x56, 0x65, 0xb5, 0x21, 0x19, 0x14, 0x88, 0x18, 0x06, 0x86, 0x70, 0x36, 0x08, 0x4f, 0x34, 0x41, 0x38, 0x3c, 0x2a, 0x74, 0x68, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1b, 0x10, 0x62, 0xa2, 0x08, 0x62, 0x20, 0x80, 0x0d, 0x41, 0xb5, 0x81, 0x90, 0x00, 0xc0, 0x9a, 0x20, 0x10, 0x60, 0x30, 0x41, 0x10, 0x1e, 0x06, 0x68, 0x13, 0x04, 0x01, 0x9a, 0x20, 0x08, 0xd1, 0x06, 0x03, 0xd1, 0x36, 0x82, 0x6b, 0x48, 0xb4, 0xa5, 0xc1, 0xcd, 0x4d, 0x10, 0x04, 0x69, 0x03, 0x81, 0x78, 0xdb, 0x37, 0x41, 0x08, 0xc4, 0x60, 0x83, 0x40, 0x84, 0xc1, 0x86, 0x40, 0x0c, 0x36, 0x08, 0xc4, 0x18, 0x6c, 0x20, 0xb2, 0x0e, 0x0c, 0xc8, 0x60, 0x82, 0x30, 0x84, 0xc1, 0x04, 0x41, 0x98, 0x68, 0xa0, 0x85, 0xb9, 0x91, 0xb1, 0x95, 0x4d, 0x10, 0x04, 0x6a, 0x83, 0x81, 0xa0, 0xc1, 0x46, 0x70, 0x69, 0xb0, 0x41, 0x38, 0x03, 0x35, 0x98, 0x20, 0x70, 0x63, 0x30, 0x41, 0x10, 0x2a, 0x0e, 0x70, 0x6f, 0x73, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0x9e, 0xa6, 0x92, 0xa8, 0x92, 0x9e, 0x9c, 0x36, 0x20, 0x88, 0x1b, 0x6c, 0xc4, 0x19, 0xbc, 0x01, 0xd7, 0x70, 0xa0, 0x2b, 0xc3, 0x63, 0x42, 0x55, 0x84, 0x35, 0xf4, 0xf4, 0x24, 0x45, 0x04, 0xb3, 0x01, 0x41, 0xe2, 0x60, 0xfb, 0xce, 0x40, 0x0e, 0xb8, 0x86, 0xc5, 0xd8, 0x1b, 0xdb, 0x9b, 0xdc, 0x04, 0x41, 0xb0, 0x68, 0x0c, 0x3d, 0x31, 0x3d, 0x49, 0xc1, 0x6c, 0x40, 0x10, 0x3a, 0xd8, 0xea, 0xe0, 0x0c, 0xec, 0x80, 0x6b, 0x36, 0x10, 0x6d, 0x00, 0x07, 0x73, 0x70, 0x07, 0x1b, 0x0e, 0x02, 0x2b, 0x03, 0x33, 0x58, 0x03, 0x36, 0xc0, 0x83, 0x09, 0x82, 0x32, 0x6c, 0x00, 0x36, 0x0c, 0xc4, 0x1e, 0xec, 0xc1, 0x86, 0x80, 0x0f, 0x36, 0x0c, 0x83, 0x1e, 0xf4, 0xc1, 0x04, 0xa1, 0x23, 0x83, 0x0d, 0xc1, 0x1f, 0x90, 0x68, 0x0b, 0x4b, 0x73, 0xe3, 0x32, 0x65, 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x58, 0xba, 0x09, 0xc2, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0xc2, 0xb2, 0x4d, 0x10, 0x16, 0x6d, 0xc3, 0x42, 0x88, 0xc2, 0x28, 0x90, 0x42, 0x29, 0x98, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0x00, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x4b, 0xb6, 0x41, 0xd8, 0xb6, 0x0d, 0xcb, 0x90, 0x0a, 0xa3, 0x70, 0x0a, 0xa5, 0xa0, 0x0a, 0x83, 0x2a, 0x0c, 0xa7, 0xb0, 0x0a, 0x2c, 0x86, 0x9e, 0x98, 0x9e, 0xa4, 0x26, 0x08, 0xc2, 0xb5, 0x41, 0xd8, 0x5c, 0x61, 0xc3, 0xc2, 0xb4, 0xc2, 0x28, 0x9c, 0x42, 0x29, 0xa8, 0xc2, 0x60, 0x0a, 0xcc, 0x29, 0xbc, 0xc2, 0x86, 0x01, 0x15, 0x58, 0x01, 0x16, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x96, 0x64, 0xc3, 0x42, 0xc8, 0xc2, 0x28, 0xcc, 0x42, 0x29, 0x9c, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0xbc, 0xc2, 0x86, 0x80, 0x16, 0x36, 0x0c, 0xb1, 0x50, 0x0b, 0xc0, 0x86, 0x42, 0x0f, 0x42, 0xc1, 0x16, 0x2e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0x1c, 0x8b, 0x34, 0xb7, 0x39, 0xba, 0xb9, 0x09, 0x82, 0x80, 0xd1, 0x98, 0x4b, 0x3b, 0xfb, 0x62, 0x23, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0x35, 0x47, 0x47, 0x84, 0xae, 0x0c, 0xef, 0xcb, 0xed, 0x4d, 0xae, 0x6d, 0x83, 0x82, 0x0b, 0x4d, 0x2e, 0xe8, 0xc2, 0x2e, 0x20, 0xbc, 0x70, 0x06, 0xbd, 0xc0, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x41, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x58, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82, 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x08, 0x78, 0xd0, 0x07, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x7f, 0x50, 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x60, 0x0b, 0x5d, 0xc8, 0xf0, 0x5c, 0xc6, 0xde, 0xea, 0xdc, 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x25, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x80, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0xaa, 0x15, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x16, 0x00, 0x1c, 0x04, 0x7e, 0x74, 0x74, 0x99, 0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0x72, 0x16, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x1a, 0x82, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x76, 0xe0, 0x0c, 0x97, 0xef, 0x3c, 0xfe, 0xe0, 0x4c, 0xb7, 0x5f, 0xdc, 0xb6, 0x11, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x01, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x05, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x3f, 0x63, 0xb2, 0x44, 0xb0, 0x28, 0x54, 0xc4, 0x46, 0x87, 0x44, 0x49, 0x1b, 0x1b, 0xb5, 0x44, 0x58, 0x49, 0x4c, 0xb0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x84, 0x07, 0x9a, 0x20, 0x68, 0xd4, 0x06, 0x84, 0x90, 0x16, 0x82, 0x18, 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x22, 0x00, 0xa0, 0x26, 0x08, 0x5b, 0xb5, 0x21, 0xb0, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x68, 0x26, 0x08, 0x85, 0xb3, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x33, 0x41, 0x28, 0xa0, 0x0d, 0x0b, 0xa1, 0x6d, 0x5c, 0xe7, 0x0d, 0x1e, 0xf1, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0x34, 0x41, 0x20, 0x96, 0x0d, 0xc2, 0x18, 0x8c, 0xc1, 0x86, 0x65, 0x08, 0x83, 0xed, 0xeb, 0xc4, 0x60, 0x10, 0x83, 0xe1, 0x23, 0x03, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, 0x04, 0x82, 0xd9, 0x20, 0x8c, 0xc1, 0x19, 0x6c, 0x58, 0x18, 0x33, 0xd8, 0xbe, 0x4e, 0x0c, 0x06, 0x8f, 0xf9, 0xd0, 0x60, 0xc3, 0x00, 0x06, 0x65, 0x90, 0x06, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2, 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xd6, 0x60, 0x63, 0x83, 0xee, 0x1b, 0x3c, 0xe2, 0x43, 0x83, 0x0d, 0x41, 0x1b, 0x6c, 0x18, 0xd4, 0xc0, 0x0d, 0x80, 0x0d, 0x05, 0x96, 0xbd, 0x41, 0x05, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x50, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x56, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1, 0x1b, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xc2, 0x2b, 0xb7, 0x92, 0x2b, 0x85, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0x00, 0xb3, 0xac, 0x0b, 0x82, 0xc1, 0x18, 0x81, 0x18, 0xee, 0x30, 0xfc, 0x0b, 0x63, 0x04, 0x3a, 0x4a, 0xd3, 0xe5, 0x2f, 0x8c, 0x11, 0xc8, 0x79, 0xaf, 0xfa, 0xdf, 0x18, 0x41, 0x48, 0x82, 0x21, 0xee, 0x0b, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0xbc, 0xb8, 0xa8, 0xe6, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x41, 0x73, 0x85, 0x41, 0x18, 0x44, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x8d, 0x81, 0x83, 0x85, 0x41, 0x18, 0x48, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x91, 0xc1, 0xb3, 0x89, 0x81, 0x18, 0x4c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa4, 0x81, 0x13, 0x06, 0x63, 0xa0, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa8, 0xc1, 0x23, 0x06, 0x64, 0x40, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xac, 0x01, 0x34, 0x06, 0x65, 0xb0, 0x3d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb0, 0x41, 0x44, 0x06, 0x66, 0xf0, 0x41, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb4, 0x81, 0x84, 0x06, 0x67, 0xe0, 0x45, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb8, 0xc1, 0x94, 0x06, 0x68, 0x80, 0x49, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb4, 0x01, 0x86, 0x1c, 0x42, 0xa0, 0x28, 0x69, 0x90, 0x06, 0x93, 0x32, 0x9a, 0x10, 0x00, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xbc, 0x81, 0xb6, 0x24, 0xc4, 0xc0, 0x30, 0x6b, 0xb0, 0x06, 0x15, 0x33, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x60, 0xc4, 0x04, 0x1f, 0x1b, 0x24, 0xf8, 0xd8, 0x30, 0xc1, 0x67, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x1e, 0x3a, 0xf8, 0x06, 0x21, 0x98, 0xaa, 0x6b, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3a, 0x00, 0x03, 0x62, 0x10, 0xa8, 0x4c, 0x1b, 0x31, 0x58, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x0e, 0xc2, 0xa0, 0x20, 0x86, 0x8a, 0xbb, 0x6c, 0x88, 0xe4, 0x63, 0x43, 0x24, 0x1f, 0x1b, 0x22, 0xf9, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xe0, 0x06, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x67, 0x20, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xd0, 0x06, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x70, 0x10, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_NV21_JPEG.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureUV : register(t1); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(NVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {0.0, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.0000, 0.0000, 1.4020}; const float3 Gcoeff = {1.0000, -0.3441, -0.7141}; const float3 Bcoeff = {1.0000, 1.7720, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_NV21_JPEG[] = { 0x44, 0x58, 0x42, 0x43, 0xcf, 0xc7, 0x5e, 0x20, 0x3e, 0x0d, 0xdf, 0x60, 0x41, 0xdf, 0xe0, 0xb4, 0x61, 0xb5, 0x7b, 0x53, 0x01, 0x00, 0x00, 0x00, 0xe1, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x1d, 0x0b, 0x00, 0x00, 0x39, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x4c, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xe9, 0x01, 0x00, 0x0f, 0x79, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa7, 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x0f, 0x06, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0xa2, 0x6c, 0x68, 0x15, 0xc1, 0x08, 0x40, 0x21, 0x94, 0x41, 0x49, 0xd0, 0x99, 0x01, 0xa0, 0x32, 0x03, 0x40, 0x64, 0x06, 0x80, 0xc6, 0x0c, 0x00, 0x85, 0x19, 0x00, 0xe2, 0x33, 0x00, 0xd4, 0xc7, 0x72, 0x18, 0x02, 0x00, 0x00, 0xe0, 0x38, 0x00, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x41, 0x99, 0x20, 0x08, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x05, 0x18, 0x70, 0xa1, 0x43, 0x2b, 0xa3, 0x2a, 0xc3, 0xa3, 0xab, 0x93, 0x2b, 0xcb, 0x9a, 0x20, 0x08, 0xcd, 0x04, 0x41, 0x70, 0x36, 0x08, 0x44, 0xb3, 0x21, 0x21, 0x94, 0x85, 0x20, 0x06, 0x86, 0x70, 0xc8, 0xd0, 0xa1, 0x95, 0x51, 0x95, 0xe1, 0xd1, 0xd5, 0xc9, 0x95, 0x55, 0x59, 0x6d, 0x48, 0x06, 0x05, 0x22, 0x86, 0x81, 0x21, 0x9c, 0x0d, 0xc2, 0x13, 0x4d, 0x10, 0x8e, 0x8f, 0x0a, 0x1d, 0x5a, 0xd9, 0x54, 0x58, 0x1b, 0x1c, 0x5b, 0x99, 0xdc, 0x06, 0x84, 0x98, 0x28, 0x82, 0x18, 0x08, 0x60, 0x43, 0x50, 0x6d, 0x20, 0x24, 0x00, 0xb0, 0x26, 0x08, 0x44, 0x18, 0x4c, 0x10, 0x84, 0x87, 0x01, 0xda, 0x04, 0x41, 0x80, 0x26, 0x08, 0x42, 0xb4, 0xc1, 0x40, 0xb4, 0x8d, 0xe0, 0x1a, 0x12, 0x6d, 0x69, 0x70, 0x73, 0x13, 0x04, 0x41, 0xda, 0x40, 0x20, 0xde, 0xf6, 0x4d, 0x10, 0x82, 0x31, 0xd8, 0x20, 0x10, 0x61, 0xb0, 0x21, 0x10, 0x83, 0x0d, 0x02, 0x31, 0x06, 0x1b, 0x88, 0xac, 0x03, 0x03, 0x32, 0x98, 0x20, 0x0c, 0x62, 0x30, 0x41, 0x10, 0x26, 0x1a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x13, 0x04, 0x81, 0xda, 0x60, 0x20, 0x68, 0xb0, 0x11, 0x5c, 0x1a, 0x6c, 0x10, 0xce, 0x40, 0x0d, 0x26, 0x08, 0x1c, 0x19, 0x4c, 0x10, 0x84, 0x8a, 0x03, 0xdc, 0xdb, 0x1c, 0x97, 0x29, 0xab, 0x2f, 0xa8, 0xa7, 0xa9, 0x24, 0xaa, 0xa4, 0x27, 0xa7, 0x0d, 0x08, 0xe2, 0x06, 0x1b, 0x71, 0x06, 0x6f, 0xc0, 0x35, 0x1c, 0xe8, 0xca, 0xf0, 0x98, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d, 0x49, 0x11, 0xc1, 0x6c, 0x40, 0x90, 0x38, 0xd8, 0xbe, 0x33, 0x90, 0x03, 0xae, 0x61, 0x31, 0xf6, 0xc6, 0xf6, 0x26, 0x37, 0x41, 0x10, 0x2c, 0x1a, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x30, 0x1b, 0x10, 0x84, 0x0e, 0xb6, 0x3a, 0x38, 0x03, 0x3b, 0xe0, 0x9a, 0x0d, 0x44, 0x1b, 0xc0, 0xc1, 0x1c, 0xdc, 0xc1, 0x86, 0x83, 0xc0, 0xca, 0xc0, 0x0c, 0xd6, 0x80, 0x0d, 0xf0, 0x60, 0x82, 0xa0, 0x0c, 0x1b, 0x80, 0x0d, 0x03, 0xb1, 0x07, 0x7b, 0xb0, 0x21, 0xe0, 0x83, 0x0d, 0xc3, 0xa0, 0x07, 0x7d, 0x30, 0x41, 0xe8, 0xca, 0x60, 0x43, 0xf0, 0x07, 0x24, 0xda, 0xc2, 0xd2, 0xdc, 0xb8, 0x4c, 0x59, 0x7d, 0x41, 0xbd, 0xcd, 0xa5, 0xd1, 0xa5, 0xbd, 0xb9, 0x4d, 0x10, 0x16, 0x6f, 0x82, 0xb0, 0x74, 0x1b, 0x02, 0x62, 0x82, 0xb0, 0x70, 0x13, 0x84, 0x65, 0xdb, 0xb0, 0x10, 0xa2, 0x30, 0x0a, 0xa4, 0x50, 0x0a, 0xa6, 0x30, 0x98, 0x02, 0x71, 0x0a, 0x00, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0xc2, 0xa2, 0x6d, 0x10, 0xb6, 0x6d, 0xc3, 0x32, 0xa4, 0xc2, 0x28, 0x9c, 0x42, 0x29, 0xa8, 0xc2, 0xa0, 0x0a, 0xc3, 0x29, 0xac, 0x02, 0x8b, 0xa1, 0x27, 0xa6, 0x27, 0xa9, 0x09, 0x82, 0x70, 0x6d, 0x10, 0x36, 0x57, 0xd8, 0xb0, 0x30, 0xad, 0x30, 0x0a, 0xa7, 0x50, 0x0a, 0xaa, 0x30, 0x98, 0x02, 0x73, 0x0a, 0xaf, 0xb0, 0x61, 0x40, 0x05, 0x56, 0x80, 0x05, 0x26, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x13, 0x84, 0x25, 0xd9, 0xb0, 0x10, 0xb2, 0x30, 0x0a, 0xb3, 0x50, 0x0a, 0xa7, 0x30, 0x98, 0x02, 0x71, 0x0a, 0xaf, 0xb0, 0x21, 0xa0, 0x85, 0x0d, 0x43, 0x2c, 0xd4, 0x02, 0xb0, 0xa1, 0xd0, 0x83, 0x50, 0xb0, 0x85, 0x0b, 0xa0, 0x61, 0xc6, 0xf6, 0x16, 0x46, 0x37, 0x37, 0x41, 0x10, 0x30, 0x16, 0x69, 0x6e, 0x73, 0x74, 0x73, 0x13, 0x04, 0x21, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0xc5, 0x46, 0x46, 0x63, 0x2e, 0xed, 0xec, 0x6b, 0x8e, 0x8e, 0x08, 0x5d, 0x19, 0xde, 0x97, 0xdb, 0x9b, 0x5c, 0xdb, 0x06, 0x05, 0x17, 0x72, 0x41, 0x17, 0x76, 0x81, 0x17, 0x90, 0x5e, 0x38, 0x03, 0x5f, 0x60, 0xaa, 0xb0, 0xb1, 0xd9, 0xb5, 0xb9, 0xa4, 0x91, 0x95, 0xb9, 0xd1, 0x4d, 0x09, 0x82, 0x2a, 0x64, 0x78, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x02, 0xa2, 0x09, 0x19, 0x9e, 0x8b, 0x5d, 0x18, 0x9b, 0x5d, 0x99, 0xdc, 0x94, 0xa0, 0xa8, 0x43, 0x86, 0xe7, 0x32, 0x87, 0x16, 0x46, 0x56, 0x26, 0xd7, 0xf4, 0x46, 0x56, 0xc6, 0x36, 0x25, 0x40, 0xca, 0x90, 0xe1, 0xb9, 0xc8, 0x95, 0xcd, 0xbd, 0xd5, 0xc9, 0x8d, 0x95, 0xcd, 0x4d, 0x09, 0xac, 0x4a, 0x64, 0x78, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x04, 0x3c, 0xe8, 0x83, 0x3a, 0x64, 0x78, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x49, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x82, 0x3f, 0xa8, 0x43, 0x86, 0xe7, 0x52, 0xe6, 0x46, 0x27, 0x97, 0x07, 0xf5, 0x96, 0xe6, 0x46, 0x37, 0x37, 0x25, 0xb0, 0x85, 0x2e, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x53, 0x02, 0x5f, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x25, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x80, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0xaa, 0x15, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x16, 0x00, 0x1c, 0x04, 0x7e, 0x74, 0x74, 0x99, 0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0x72, 0x16, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x1a, 0x82, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x76, 0xe0, 0x0c, 0x97, 0xef, 0x3c, 0xfe, 0xe0, 0x4c, 0xb7, 0x5f, 0xdc, 0xb6, 0x11, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x01, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x05, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xf1, 0x38, 0x49, 0x7f, 0x91, 0x6b, 0xbb, 0x2e, 0x0c, 0x31, 0x06, 0xa9, 0xa3, 0xcd, 0x81, 0x44, 0x58, 0x49, 0x4c, 0xa0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x88, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xdf, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x84, 0x07, 0x9a, 0x20, 0x68, 0xd4, 0x06, 0x84, 0x90, 0x16, 0x82, 0x18, 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x22, 0x00, 0xa0, 0x26, 0x08, 0x5b, 0xb5, 0x21, 0xb0, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x68, 0x26, 0x08, 0x85, 0xb3, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x33, 0x41, 0x28, 0xa0, 0x0d, 0x0b, 0xa1, 0x6d, 0x5c, 0xe7, 0x0d, 0x1e, 0xf1, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0x34, 0x41, 0x20, 0x96, 0x0d, 0xc2, 0x18, 0x8c, 0xc1, 0x86, 0x65, 0x08, 0x83, 0xed, 0xeb, 0xc4, 0x60, 0x10, 0x83, 0xe1, 0x23, 0x03, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, 0x04, 0x82, 0xd9, 0x20, 0x8c, 0xc1, 0x19, 0x6c, 0x58, 0x18, 0x33, 0xd8, 0xbe, 0x4e, 0x0c, 0x06, 0x8f, 0xf9, 0xd0, 0x60, 0xc3, 0x00, 0x06, 0x65, 0x90, 0x06, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2, 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xd6, 0x60, 0x63, 0x83, 0xee, 0x1b, 0x3c, 0xe2, 0x43, 0x83, 0x0d, 0x41, 0x1b, 0x6c, 0x18, 0xd4, 0xc0, 0x0d, 0x80, 0x0d, 0x05, 0x96, 0xbd, 0x41, 0x05, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x50, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x56, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1, 0x1b, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xc2, 0x2b, 0xb7, 0x92, 0x2b, 0x85, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0x50, 0x9e, 0x74, 0xe9, 0x7f, 0x63, 0x04, 0xa2, 0x3e, 0xb7, 0xf3, 0x2f, 0x8c, 0x11, 0x80, 0xef, 0x0a, 0xae, 0xbf, 0x30, 0x46, 0xc0, 0x97, 0xbd, 0xb9, 0x7f, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x85, 0x01, 0x63, 0x81, 0x01, 0x18, 0x40, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x41, 0x73, 0x81, 0x01, 0x18, 0x44, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x8d, 0x81, 0xa3, 0x85, 0x41, 0x18, 0x48, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa0, 0x41, 0x03, 0x06, 0x62, 0x90, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa4, 0x81, 0x13, 0x06, 0x63, 0x30, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa8, 0xc1, 0x23, 0x06, 0x64, 0xa0, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xac, 0x01, 0x34, 0x06, 0x65, 0xe0, 0x3d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb0, 0x41, 0x74, 0x06, 0x66, 0xd0, 0x41, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb4, 0x81, 0x84, 0x06, 0x67, 0x70, 0x45, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb0, 0xc1, 0x85, 0x1c, 0x42, 0xa0, 0x28, 0x68, 0x80, 0x06, 0x92, 0x32, 0x9a, 0x10, 0x00, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb8, 0x41, 0xb6, 0x24, 0xc4, 0xc0, 0x30, 0x6a, 0xa0, 0x06, 0x14, 0x33, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x60, 0x41, 0x04, 0x1f, 0x1b, 0x24, 0xf8, 0x8c, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x23, 0x07, 0x9d, 0x21, 0x04, 0x12, 0x55, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x33, 0x07, 0xde, 0x31, 0x08, 0xd3, 0x85, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0xc1, 0x43, 0x07, 0x1f, 0x42, 0x0c, 0x94, 0x66, 0xd9, 0x00, 0xc9, 0xc7, 0x06, 0x48, 0x3e, 0x36, 0x40, 0xf2, 0x19, 0x31, 0x48, 0x00, 0x10, 0x04, 0x03, 0x44, 0x0f, 0xc2, 0xa0, 0x0e, 0xea, 0x80, 0x0d, 0x86, 0x11, 0x83, 0x04, 0x00, 0x41, 0x30, 0x40, 0xf4, 0x20, 0x0c, 0xea, 0xa0, 0x0e, 0xca, 0x40, 0x18, 0x31, 0x48, 0x00, 0x10, 0x04, 0x03, 0x44, 0x0f, 0xc2, 0xa0, 0x0e, 0xea, 0x60, 0x0d, 0x82, 0x11, 0x83, 0x04, 0x00, 0x41, 0x30, 0x40, 0xf4, 0x20, 0x0c, 0xea, 0xa0, 0x0e, 0xdc, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_NV21_BT601.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureUV : register(t1); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(NVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.1644, 0.0000, 1.5960}; const float3 Gcoeff = {1.1644, -0.3918, -0.8130}; const float3 Bcoeff = {1.1644, 2.0172, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_NV21_BT601[] = { 0x44, 0x58, 0x42, 0x43, 0x06, 0x29, 0xca, 0x47, 0x9e, 0x47, 0xed, 0x99, 0xcf, 0xa5, 0xa6, 0xdb, 0x0b, 0x0d, 0xa5, 0x31, 0x01, 0x00, 0x00, 0x00, 0xe9, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x15, 0x0b, 0x00, 0x00, 0x31, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xe9, 0x01, 0x00, 0x0f, 0x79, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa7, 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x0f, 0x06, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0x87, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3e, 0x03, 0x40, 0x7d, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x41, 0x99, 0x20, 0x08, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0xc5, 0xc7, 0x85, 0x0e, 0xad, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x2c, 0x6b, 0x82, 0x20, 0x34, 0x13, 0x04, 0xc1, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0x21, 0x43, 0x87, 0x56, 0x46, 0x55, 0x86, 0x47, 0x57, 0x27, 0x57, 0x56, 0x65, 0xb5, 0x21, 0x19, 0x14, 0x88, 0x18, 0x06, 0x86, 0x70, 0x36, 0x08, 0x4f, 0x34, 0x41, 0x38, 0x3c, 0x2a, 0x74, 0x68, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1b, 0x10, 0x62, 0xa2, 0x08, 0x62, 0x20, 0x80, 0x0d, 0x41, 0xb5, 0x81, 0x90, 0x00, 0xc0, 0x9a, 0x20, 0x10, 0x60, 0x30, 0x41, 0x10, 0x1e, 0x06, 0x68, 0x13, 0x04, 0x01, 0x9a, 0x20, 0x08, 0xd1, 0x06, 0x03, 0xd1, 0x36, 0x82, 0x6b, 0x48, 0xb4, 0xa5, 0xc1, 0xcd, 0x4d, 0x10, 0x04, 0x69, 0x03, 0x81, 0x78, 0xdb, 0x37, 0x41, 0x08, 0xc4, 0x60, 0x83, 0x40, 0x84, 0xc1, 0x86, 0x40, 0x0c, 0x36, 0x08, 0xc4, 0x18, 0x6c, 0x20, 0xb2, 0x0e, 0x0c, 0xc8, 0x60, 0x82, 0x30, 0x84, 0xc1, 0x04, 0x41, 0x98, 0x68, 0xa0, 0x85, 0xb9, 0x91, 0xb1, 0x95, 0x4d, 0x10, 0x04, 0x6a, 0x83, 0x81, 0xa0, 0xc1, 0x46, 0x70, 0x69, 0xb0, 0x41, 0x38, 0x03, 0x35, 0x98, 0x20, 0x70, 0x63, 0x30, 0x41, 0x10, 0x2a, 0x0e, 0x70, 0x6f, 0x73, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0x9e, 0xa6, 0x92, 0xa8, 0x92, 0x9e, 0x9c, 0x36, 0x20, 0x88, 0x1b, 0x6c, 0xc4, 0x19, 0xbc, 0x01, 0xd7, 0x70, 0xa0, 0x2b, 0xc3, 0x63, 0x42, 0x55, 0x84, 0x35, 0xf4, 0xf4, 0x24, 0x45, 0x04, 0xb3, 0x01, 0x41, 0xe2, 0x60, 0xfb, 0xce, 0x40, 0x0e, 0xb8, 0x86, 0xc5, 0xd8, 0x1b, 0xdb, 0x9b, 0xdc, 0x04, 0x41, 0xb0, 0x68, 0x0c, 0x3d, 0x31, 0x3d, 0x49, 0xc1, 0x6c, 0x40, 0x10, 0x3a, 0xd8, 0xea, 0xe0, 0x0c, 0xec, 0x80, 0x6b, 0x36, 0x10, 0x6d, 0x00, 0x07, 0x73, 0x70, 0x07, 0x1b, 0x0e, 0x02, 0x2b, 0x03, 0x33, 0x58, 0x03, 0x36, 0xc0, 0x83, 0x09, 0x82, 0x32, 0x6c, 0x00, 0x36, 0x0c, 0xc4, 0x1e, 0xec, 0xc1, 0x86, 0x80, 0x0f, 0x36, 0x0c, 0x83, 0x1e, 0xf4, 0xc1, 0x04, 0xa1, 0x23, 0x83, 0x0d, 0xc1, 0x1f, 0x90, 0x68, 0x0b, 0x4b, 0x73, 0xe3, 0x32, 0x65, 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x58, 0xba, 0x09, 0xc2, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0xc2, 0xb2, 0x4d, 0x10, 0x16, 0x6d, 0xc3, 0x42, 0x88, 0xc2, 0x28, 0x90, 0x42, 0x29, 0x98, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0x00, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x4b, 0xb6, 0x41, 0xd8, 0xb6, 0x0d, 0xcb, 0x90, 0x0a, 0xa3, 0x70, 0x0a, 0xa5, 0xa0, 0x0a, 0x83, 0x2a, 0x0c, 0xa7, 0xb0, 0x0a, 0x2c, 0x86, 0x9e, 0x98, 0x9e, 0xa4, 0x26, 0x08, 0xc2, 0xb5, 0x41, 0xd8, 0x5c, 0x61, 0xc3, 0xc2, 0xb4, 0xc2, 0x28, 0x9c, 0x42, 0x29, 0xa8, 0xc2, 0x60, 0x0a, 0xcc, 0x29, 0xbc, 0xc2, 0x86, 0x01, 0x15, 0x58, 0x01, 0x16, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x96, 0x64, 0xc3, 0x42, 0xc8, 0xc2, 0x28, 0xcc, 0x42, 0x29, 0x9c, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0xbc, 0xc2, 0x86, 0x80, 0x16, 0x36, 0x0c, 0xb1, 0x50, 0x0b, 0xc0, 0x86, 0x42, 0x0f, 0x42, 0xc1, 0x16, 0x2e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0x1c, 0x8b, 0x34, 0xb7, 0x39, 0xba, 0xb9, 0x09, 0x82, 0x80, 0xd1, 0x98, 0x4b, 0x3b, 0xfb, 0x62, 0x23, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0x35, 0x47, 0x47, 0x84, 0xae, 0x0c, 0xef, 0xcb, 0xed, 0x4d, 0xae, 0x6d, 0x83, 0x82, 0x0b, 0x4d, 0x2e, 0xe8, 0xc2, 0x2e, 0x20, 0xbc, 0x70, 0x06, 0xbd, 0xc0, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x41, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x58, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82, 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x08, 0x78, 0xd0, 0x07, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x7f, 0x50, 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x60, 0x0b, 0x5d, 0xc8, 0xf0, 0x5c, 0xc6, 0xde, 0xea, 0xdc, 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x25, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x80, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0xaa, 0x15, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x16, 0x00, 0x1c, 0x04, 0x7e, 0x74, 0x74, 0x99, 0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0x72, 0x16, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x1a, 0x82, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x76, 0xe0, 0x0c, 0x97, 0xef, 0x3c, 0xfe, 0xe0, 0x4c, 0xb7, 0x5f, 0xdc, 0xb6, 0x11, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x01, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x05, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6a, 0x46, 0xfe, 0xd5, 0x21, 0x7d, 0xa1, 0xb7, 0x81, 0xb9, 0x35, 0xf9, 0x0f, 0x28, 0x1d, 0x44, 0x58, 0x49, 0x4c, 0xb0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x84, 0x07, 0x9a, 0x20, 0x68, 0xd4, 0x06, 0x84, 0x90, 0x16, 0x82, 0x18, 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x22, 0x00, 0xa0, 0x26, 0x08, 0x5b, 0xb5, 0x21, 0xb0, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x68, 0x26, 0x08, 0x85, 0xb3, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x33, 0x41, 0x28, 0xa0, 0x0d, 0x0b, 0xa1, 0x6d, 0x5c, 0xe7, 0x0d, 0x1e, 0xf1, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0x34, 0x41, 0x20, 0x96, 0x0d, 0xc2, 0x18, 0x8c, 0xc1, 0x86, 0x65, 0x08, 0x83, 0xed, 0xeb, 0xc4, 0x60, 0x10, 0x83, 0xe1, 0x23, 0x03, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, 0x04, 0x82, 0xd9, 0x20, 0x8c, 0xc1, 0x19, 0x6c, 0x58, 0x18, 0x33, 0xd8, 0xbe, 0x4e, 0x0c, 0x06, 0x8f, 0xf9, 0xd0, 0x60, 0xc3, 0x00, 0x06, 0x65, 0x90, 0x06, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2, 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xd6, 0x60, 0x63, 0x83, 0xee, 0x1b, 0x3c, 0xe2, 0x43, 0x83, 0x0d, 0x41, 0x1b, 0x6c, 0x18, 0xd4, 0xc0, 0x0d, 0x80, 0x0d, 0x05, 0x96, 0xbd, 0x41, 0x05, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x50, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x56, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1, 0x1b, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xc2, 0x2b, 0xb7, 0x92, 0x2b, 0x85, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0xe0, 0xba, 0xa6, 0x08, 0x82, 0xc1, 0x18, 0x41, 0x69, 0xa2, 0x60, 0xfd, 0x0b, 0x63, 0x04, 0x22, 0x6c, 0xc6, 0xec, 0x2f, 0x8c, 0x11, 0xe8, 0xad, 0x8c, 0xf3, 0xdf, 0x18, 0x41, 0x48, 0x82, 0x21, 0xee, 0x0b, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0xbc, 0xb8, 0xa8, 0xe6, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x41, 0x73, 0x85, 0x41, 0x18, 0x44, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x8d, 0x81, 0x83, 0x85, 0x41, 0x18, 0x48, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x91, 0xc1, 0xb3, 0x89, 0x81, 0x18, 0x4c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa4, 0x81, 0x13, 0x06, 0x63, 0xa0, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa8, 0xc1, 0x23, 0x06, 0x64, 0x40, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xac, 0x01, 0x34, 0x06, 0x65, 0xb0, 0x3d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb0, 0x41, 0x44, 0x06, 0x66, 0xf0, 0x41, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb4, 0x81, 0x84, 0x06, 0x67, 0xe0, 0x45, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb8, 0xc1, 0x94, 0x06, 0x68, 0x80, 0x49, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb4, 0x01, 0x86, 0x1c, 0x42, 0xa0, 0x28, 0x69, 0x90, 0x06, 0x93, 0x32, 0x9a, 0x10, 0x00, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xbc, 0x81, 0xb6, 0x24, 0xc4, 0xc0, 0x30, 0x6b, 0xb0, 0x06, 0x15, 0x33, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x60, 0xc4, 0x04, 0x1f, 0x13, 0x24, 0xf8, 0x18, 0x31, 0xc1, 0x67, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x1e, 0x3a, 0xf8, 0x06, 0x21, 0x98, 0xaa, 0x6b, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3a, 0x00, 0x03, 0x62, 0x10, 0xa8, 0x4c, 0x1b, 0x31, 0x58, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x0e, 0xc2, 0xa0, 0x20, 0x86, 0x8a, 0xbb, 0x6c, 0x88, 0xe4, 0x63, 0x43, 0x24, 0x1f, 0x1b, 0x22, 0xf9, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xe0, 0x06, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x67, 0x20, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xd0, 0x06, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x70, 0x10, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The yuv-rendering pixel shader: --- D3D12_PixelShader_NV21_BT709.hlsl --- Texture2D theTextureY : register(t0); Texture2D theTextureUV : register(t1); SamplerState theSampler : register(s0); struct PixelShaderInput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(NVRS)] float4 main(PixelShaderInput input) : SV_TARGET { const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; const float3 Rcoeff = {1.1644, 0.0000, 1.7927}; const float3 Gcoeff = {1.1644, -0.2132, -0.5329}; const float3 Bcoeff = {1.1644, 2.1124, 0.0000}; float4 Output; float3 yuv; yuv.x = theTextureY.Sample(theSampler, input.tex).r; yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr; yuv += offset; Output.r = dot(yuv, Rcoeff); Output.g = dot(yuv, Gcoeff); Output.b = dot(yuv, Bcoeff); Output.a = 1.0f; return Output * input.color; } */ static unsigned char D3D12_PixelShader_NV21_BT709[] = { 0x44, 0x58, 0x42, 0x43, 0x5c, 0x52, 0x50, 0xb3, 0x0c, 0x9c, 0x81, 0x8a, 0x2d, 0x9e, 0x1b, 0x5d, 0x0b, 0xcb, 0x2a, 0xa0, 0x01, 0x00, 0x00, 0x00, 0xe9, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x15, 0x01, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x15, 0x0b, 0x00, 0x00, 0x31, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x78, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x47, 0x00, 0x06, 0x33, 0xb5, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x40, 0xcc, 0x24, 0x06, 0xe3, 0xc0, 0x0e, 0xe1, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xb4, 0x50, 0x0e, 0xf8, 0x40, 0x0f, 0xf5, 0x20, 0x0f, 0xe5, 0x20, 0x07, 0xa4, 0xc0, 0x07, 0xf6, 0x50, 0x0e, 0xe3, 0x40, 0x0f, 0xef, 0x20, 0x0f, 0x7c, 0x60, 0x0e, 0xec, 0xf0, 0x0e, 0xe1, 0x40, 0x0f, 0x6c, 0x00, 0x06, 0x74, 0xe0, 0x07, 0x60, 0xe0, 0x07, 0x48, 0x08, 0x83, 0xc8, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x40, 0x90, 0x19, 0x01, 0x28, 0x01, 0xa2, 0x34, 0x47, 0x80, 0x14, 0x03, 0x08, 0x21, 0x96, 0x20, 0x56, 0x0c, 0x24, 0x84, 0x58, 0x80, 0xdc, 0x4d, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0xfe, 0x4a, 0x48, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0xa3, 0x02, 0x00, 0x00, 0x04, 0xad, 0x7b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x10, 0x68, 0x86, 0x85, 0x40, 0x41, 0x2c, 0x0c, 0x14, 0x52, 0x02, 0x00, 0x80, 0x10, 0x02, 0xd0, 0x2c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x39, 0x82, 0xa0, 0x18, 0x52, 0x2c, 0x21, 0x2e, 0xe1, 0x81, 0x80, 0x61, 0x04, 0x01, 0xb8, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x14, 0xb9, 0x88, 0x85, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x84, 0x1d, 0xd2, 0x41, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0x72, 0x00, 0xc0, 0xe4, 0x00, 0x80, 0xe9, 0x01, 0x00, 0x0f, 0x79, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa7, 0x02, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x0f, 0x06, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x5a, 0x05, 0x42, 0xa2, 0x04, 0x46, 0x00, 0x8a, 0xa1, 0x08, 0x4a, 0xa2, 0x50, 0xca, 0xa0, 0x1c, 0x0a, 0xa4, 0x10, 0x4a, 0xa1, 0xc0, 0x0a, 0xa8, 0x3c, 0x0a, 0x87, 0x56, 0x11, 0x8c, 0x00, 0x14, 0x42, 0x19, 0x94, 0x04, 0x9d, 0x19, 0x00, 0x2a, 0x33, 0x00, 0x44, 0x66, 0x00, 0x68, 0xcc, 0x00, 0x50, 0x98, 0x01, 0x20, 0x3e, 0x03, 0x40, 0x7d, 0x2c, 0x87, 0x21, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x02, 0x81, 0x40, 0x00, 0x79, 0x18, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x41, 0x99, 0x20, 0x08, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x20, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0xc5, 0xc7, 0x85, 0x0e, 0xad, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x2c, 0x6b, 0x82, 0x20, 0x34, 0x13, 0x04, 0xc1, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0x21, 0x43, 0x87, 0x56, 0x46, 0x55, 0x86, 0x47, 0x57, 0x27, 0x57, 0x56, 0x65, 0xb5, 0x21, 0x19, 0x14, 0x88, 0x18, 0x06, 0x86, 0x70, 0x36, 0x08, 0x4f, 0x34, 0x41, 0x38, 0x3c, 0x2a, 0x74, 0x68, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1b, 0x10, 0x62, 0xa2, 0x08, 0x62, 0x20, 0x80, 0x0d, 0x41, 0xb5, 0x81, 0x90, 0x00, 0xc0, 0x9a, 0x20, 0x10, 0x60, 0x30, 0x41, 0x10, 0x1e, 0x06, 0x68, 0x13, 0x04, 0x01, 0x9a, 0x20, 0x08, 0xd1, 0x06, 0x03, 0xd1, 0x36, 0x82, 0x6b, 0x48, 0xb4, 0xa5, 0xc1, 0xcd, 0x4d, 0x10, 0x04, 0x69, 0x03, 0x81, 0x78, 0xdb, 0x37, 0x41, 0x08, 0xc4, 0x60, 0x83, 0x40, 0x84, 0xc1, 0x86, 0x40, 0x0c, 0x36, 0x08, 0xc4, 0x18, 0x6c, 0x20, 0xb2, 0x0e, 0x0c, 0xc8, 0x60, 0x82, 0x30, 0x84, 0xc1, 0x04, 0x41, 0x98, 0x68, 0xa0, 0x85, 0xb9, 0x91, 0xb1, 0x95, 0x4d, 0x10, 0x04, 0x6a, 0x83, 0x81, 0xa0, 0xc1, 0x46, 0x70, 0x69, 0xb0, 0x41, 0x38, 0x03, 0x35, 0x98, 0x20, 0x70, 0x63, 0x30, 0x41, 0x10, 0x2a, 0x0e, 0x70, 0x6f, 0x73, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0x9e, 0xa6, 0x92, 0xa8, 0x92, 0x9e, 0x9c, 0x36, 0x20, 0x88, 0x1b, 0x6c, 0xc4, 0x19, 0xbc, 0x01, 0xd7, 0x70, 0xa0, 0x2b, 0xc3, 0x63, 0x42, 0x55, 0x84, 0x35, 0xf4, 0xf4, 0x24, 0x45, 0x04, 0xb3, 0x01, 0x41, 0xe2, 0x60, 0xfb, 0xce, 0x40, 0x0e, 0xb8, 0x86, 0xc5, 0xd8, 0x1b, 0xdb, 0x9b, 0xdc, 0x04, 0x41, 0xb0, 0x68, 0x0c, 0x3d, 0x31, 0x3d, 0x49, 0xc1, 0x6c, 0x40, 0x10, 0x3a, 0xd8, 0xea, 0xe0, 0x0c, 0xec, 0x80, 0x6b, 0x36, 0x10, 0x6d, 0x00, 0x07, 0x73, 0x70, 0x07, 0x1b, 0x0e, 0x02, 0x2b, 0x03, 0x33, 0x58, 0x03, 0x36, 0xc0, 0x83, 0x09, 0x82, 0x32, 0x6c, 0x00, 0x36, 0x0c, 0xc4, 0x1e, 0xec, 0xc1, 0x86, 0x80, 0x0f, 0x36, 0x0c, 0x83, 0x1e, 0xf4, 0xc1, 0x04, 0xa1, 0x23, 0x83, 0x0d, 0xc1, 0x1f, 0x90, 0x68, 0x0b, 0x4b, 0x73, 0xe3, 0x32, 0x65, 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x58, 0xba, 0x09, 0xc2, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0xc2, 0xb2, 0x4d, 0x10, 0x16, 0x6d, 0xc3, 0x42, 0x88, 0xc2, 0x28, 0x90, 0x42, 0x29, 0x98, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0x00, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x4b, 0xb6, 0x41, 0xd8, 0xb6, 0x0d, 0xcb, 0x90, 0x0a, 0xa3, 0x70, 0x0a, 0xa5, 0xa0, 0x0a, 0x83, 0x2a, 0x0c, 0xa7, 0xb0, 0x0a, 0x2c, 0x86, 0x9e, 0x98, 0x9e, 0xa4, 0x26, 0x08, 0xc2, 0xb5, 0x41, 0xd8, 0x5c, 0x61, 0xc3, 0xc2, 0xb4, 0xc2, 0x28, 0x9c, 0x42, 0x29, 0xa8, 0xc2, 0x60, 0x0a, 0xcc, 0x29, 0xbc, 0xc2, 0x86, 0x01, 0x15, 0x58, 0x01, 0x16, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9, 0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x96, 0x64, 0xc3, 0x42, 0xc8, 0xc2, 0x28, 0xcc, 0x42, 0x29, 0x9c, 0xc2, 0x60, 0x0a, 0xc4, 0x29, 0xbc, 0xc2, 0x86, 0x80, 0x16, 0x36, 0x0c, 0xb1, 0x50, 0x0b, 0xc0, 0x86, 0x42, 0x0f, 0x42, 0xc1, 0x16, 0x2e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0x1c, 0x8b, 0x34, 0xb7, 0x39, 0xba, 0xb9, 0x09, 0x82, 0x80, 0xd1, 0x98, 0x4b, 0x3b, 0xfb, 0x62, 0x23, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0x35, 0x47, 0x47, 0x84, 0xae, 0x0c, 0xef, 0xcb, 0xed, 0x4d, 0xae, 0x6d, 0x83, 0x82, 0x0b, 0x4d, 0x2e, 0xe8, 0xc2, 0x2e, 0x20, 0xbc, 0x70, 0x06, 0xbd, 0xc0, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x41, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x58, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82, 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x08, 0x78, 0xd0, 0x07, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x7f, 0x50, 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x60, 0x0b, 0x5d, 0xc8, 0xf0, 0x5c, 0xc6, 0xde, 0xea, 0xdc, 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x25, 0xf0, 0x05, 0x7e, 0x74, 0x74, 0x79, 0x1a, 0x6e, 0xc3, 0xd9, 0x65, 0x39, 0x10, 0x38, 0xab, 0x4e, 0xc3, 0x6d, 0x38, 0xbb, 0x2c, 0x9f, 0xd2, 0xc3, 0xf4, 0x32, 0x10, 0x18, 0xac, 0x80, 0x38, 0x08, 0xfc, 0xe8, 0xe8, 0x32, 0xb5, 0x8c, 0xa7, 0xd7, 0xe5, 0xe5, 0xaa, 0x15, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x16, 0x00, 0x1c, 0x04, 0x7e, 0x74, 0x74, 0x99, 0x5a, 0xc6, 0xd3, 0xeb, 0xf2, 0x72, 0x16, 0x08, 0x9c, 0x59, 0x7f, 0x24, 0x6a, 0x19, 0x4f, 0xaf, 0xcb, 0xcb, 0x32, 0x22, 0xd0, 0xfa, 0x23, 0xd9, 0xcb, 0x63, 0xfa, 0x5b, 0x0e, 0x6c, 0x92, 0x60, 0x33, 0x20, 0x10, 0x08, 0x0c, 0x1a, 0x82, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x76, 0xe0, 0x0c, 0x97, 0xef, 0x3c, 0xfe, 0xe0, 0x4c, 0xb7, 0x5f, 0xdc, 0xb6, 0x11, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x01, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0xe1, 0x17, 0xb7, 0x6d, 0x05, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x33, 0x44, 0x4f, 0x49, 0x10, 0x21, 0xcb, 0x08, 0xc8, 0x3e, 0x2d, 0x19, 0x9c, 0x34, 0xa7, 0x44, 0x58, 0x49, 0x4c, 0xb0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xec, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0x9b, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0xfc, 0x95, 0x90, 0x56, 0x62, 0xf2, 0x8b, 0xdb, 0x46, 0xc5, 0x18, 0x63, 0x10, 0x2a, 0xf7, 0x0c, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x21, 0xd0, 0x0c, 0x0b, 0x81, 0x82, 0x55, 0x18, 0x45, 0x18, 0x1b, 0x63, 0x0c, 0x42, 0xc8, 0xa0, 0x56, 0x90, 0x41, 0xc6, 0x18, 0x63, 0x0c, 0x7a, 0x73, 0x04, 0x41, 0x31, 0x18, 0x29, 0x84, 0x44, 0x92, 0x03, 0x01, 0xc3, 0x08, 0xc4, 0x30, 0x53, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x02, 0x1f, 0xd8, 0x43, 0x39, 0x8c, 0x03, 0x3d, 0xbc, 0x83, 0x3c, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xb0, 0x01, 0x18, 0xd0, 0x81, 0x1f, 0x80, 0x81, 0x1f, 0xe8, 0x81, 0x1e, 0xb4, 0x43, 0x3a, 0xc0, 0xc3, 0x3c, 0xfc, 0x02, 0x3d, 0xe4, 0x03, 0x3c, 0x94, 0x03, 0x0a, 0xc8, 0x4c, 0x62, 0x30, 0x0e, 0xec, 0x10, 0x0e, 0xf3, 0x30, 0x0f, 0x6e, 0x40, 0x0b, 0xe5, 0x80, 0x0f, 0xf4, 0x50, 0x0f, 0xf2, 0x50, 0x0e, 0x72, 0x40, 0x0a, 0x7c, 0x60, 0x0f, 0xe5, 0x30, 0x0e, 0xf4, 0xf0, 0x0e, 0xf2, 0xc0, 0x07, 0xe6, 0xc0, 0x0e, 0xef, 0x10, 0x0e, 0xf4, 0xc0, 0x06, 0x60, 0x40, 0x07, 0x7e, 0x00, 0x06, 0x7e, 0x80, 0x84, 0x6a, 0xe9, 0xde, 0x24, 0x4d, 0x11, 0x25, 0x4c, 0x3e, 0x0b, 0x30, 0xcf, 0x42, 0x44, 0xec, 0x04, 0x4c, 0x04, 0x0a, 0x08, 0xe5, 0x74, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x45, 0x50, 0x12, 0x65, 0x50, 0x1e, 0x54, 0x4a, 0xa2, 0x0c, 0x0a, 0x61, 0x04, 0xa0, 0x08, 0x0a, 0x84, 0xf0, 0x0c, 0x00, 0xe9, 0x19, 0x00, 0xda, 0x63, 0x39, 0x0c, 0x01, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd8, 0x44, 0x60, 0x82, 0x40, 0x24, 0x13, 0x04, 0x42, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x82, 0x18, 0x18, 0xc2, 0xd9, 0x90, 0x0c, 0xca, 0x42, 0x0c, 0x03, 0x43, 0x38, 0x1b, 0x84, 0x07, 0x9a, 0x20, 0x68, 0xd4, 0x06, 0x84, 0x90, 0x16, 0x82, 0x18, 0x08, 0x60, 0x43, 0x30, 0x6d, 0x20, 0x22, 0x00, 0xa0, 0x26, 0x08, 0x5b, 0xb5, 0x21, 0xb0, 0x26, 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x8d, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0x68, 0x26, 0x08, 0x85, 0xb3, 0x21, 0x20, 0x26, 0x08, 0xc5, 0x33, 0x41, 0x28, 0xa0, 0x0d, 0x0b, 0xa1, 0x6d, 0x5c, 0xe7, 0x0d, 0x1e, 0xf1, 0x01, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0x34, 0x41, 0x20, 0x96, 0x0d, 0xc2, 0x18, 0x8c, 0xc1, 0x86, 0x65, 0x08, 0x83, 0xed, 0xeb, 0xc4, 0x60, 0x10, 0x83, 0xe1, 0x23, 0x03, 0x16, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x13, 0x04, 0x82, 0xd9, 0x20, 0x8c, 0xc1, 0x19, 0x6c, 0x58, 0x18, 0x33, 0xd8, 0xbe, 0x4e, 0x0c, 0x06, 0x8f, 0xf9, 0xd0, 0x60, 0xc3, 0x00, 0x06, 0x65, 0x90, 0x06, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2, 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x85, 0xb4, 0x61, 0x21, 0xd6, 0x60, 0x63, 0x83, 0xee, 0x1b, 0x3c, 0xe2, 0x43, 0x83, 0x0d, 0x41, 0x1b, 0x6c, 0x18, 0xd4, 0xc0, 0x0d, 0x80, 0x0d, 0x05, 0x96, 0xbd, 0x41, 0x05, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x50, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x56, 0x1d, 0x32, 0x3c, 0x97, 0x32, 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1, 0x1b, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x38, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x38, 0xd3, 0xed, 0x17, 0xb7, 0x6d, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x00, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x61, 0x20, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x47, 0x00, 0xa8, 0x94, 0x00, 0x91, 0xc2, 0x2b, 0xb7, 0x92, 0x2b, 0x85, 0x42, 0x98, 0x01, 0xa0, 0x31, 0x46, 0x00, 0xb3, 0xac, 0x0b, 0x82, 0xc1, 0x18, 0x81, 0x18, 0xee, 0x30, 0xfc, 0x0b, 0x63, 0x04, 0x3a, 0x4a, 0xd3, 0xe5, 0x2f, 0x8c, 0x11, 0xc8, 0x79, 0xaf, 0xfa, 0xdf, 0x18, 0x41, 0x48, 0x82, 0x21, 0xee, 0x0b, 0x23, 0x00, 0x63, 0x04, 0x21, 0x09, 0x86, 0xf0, 0x2f, 0x8c, 0x11, 0xbc, 0xb8, 0xa8, 0xe6, 0xdf, 0x0c, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x89, 0x41, 0x73, 0x85, 0x41, 0x18, 0x44, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x8d, 0x81, 0x83, 0x85, 0x41, 0x18, 0x48, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x91, 0xc1, 0xb3, 0x89, 0x81, 0x18, 0x4c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa4, 0x81, 0x13, 0x06, 0x63, 0xa0, 0x35, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xa8, 0xc1, 0x23, 0x06, 0x64, 0x40, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xac, 0x01, 0x34, 0x06, 0x65, 0xb0, 0x3d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb0, 0x41, 0x44, 0x06, 0x66, 0xf0, 0x41, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb4, 0x81, 0x84, 0x06, 0x67, 0xe0, 0x45, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0xb8, 0xc1, 0x94, 0x06, 0x68, 0x80, 0x49, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xb4, 0x01, 0x86, 0x1c, 0x42, 0xa0, 0x28, 0x69, 0x90, 0x06, 0x93, 0x32, 0x9a, 0x10, 0x00, 0x23, 0x06, 0x0f, 0x00, 0x82, 0x60, 0xd0, 0xbc, 0x81, 0xb6, 0x24, 0xc4, 0xc0, 0x30, 0x6b, 0xb0, 0x06, 0x15, 0x33, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x60, 0xc4, 0x04, 0x1f, 0x13, 0x24, 0xf8, 0x18, 0x31, 0xc1, 0x67, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x1e, 0x3a, 0xf8, 0x06, 0x21, 0x98, 0xaa, 0x6b, 0xc4, 0x60, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3a, 0x00, 0x03, 0x62, 0x10, 0xa8, 0x4c, 0x1b, 0x31, 0x58, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x0e, 0xc2, 0xa0, 0x20, 0x86, 0x8a, 0xbb, 0x6c, 0x88, 0xe4, 0x63, 0x43, 0x24, 0x1f, 0x1b, 0x22, 0xf9, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xe0, 0x06, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x67, 0x20, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x07, 0x63, 0x70, 0x07, 0x77, 0xd0, 0x06, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7c, 0x30, 0x06, 0x77, 0x70, 0x07, 0x70, 0x10, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* The sole vertex shader (have to build 4x for different root signatures): --- D3D12_VertexShader.hlsl --- #pragma pack_matrix( row_major ) cbuffer VertexShaderConstants : register(b0) { matrix model; matrix projectionAndView; }; struct VertexShaderInput { float3 pos : POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; struct VertexShaderOutput { float4 pos : SV_POSITION; float2 tex : TEXCOORD0; float4 color : COLOR0; }; #define ColorRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ "DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ "DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ "DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0)" #define TextureRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" #define YUVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" #define NVRS \ "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ " DENY_HULL_SHADER_ROOT_ACCESS )," \ "RootConstants(num32BitConstants=32, b0),"\ "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" [RootSignature(ColorRS)] VertexShaderOutput mainColor(VertexShaderInput input) { VertexShaderOutput output; float4 pos = float4(input.pos, 1.0f); // Transform the vertex position into projected space. pos = mul(pos, model); pos = mul(pos, projectionAndView); output.pos = pos; // Pass through texture coordinates and color values without transformation output.tex = input.tex; output.color = input.color; return output; } [RootSignature(TextureRS)] VertexShaderOutput mainTexture(VertexShaderInput input) { return mainColor(input); } [RootSignature(YUVRS)] VertexShaderOutput mainYUV(VertexShaderInput input) { return mainColor(input); } [RootSignature(NVRS)] VertexShaderOutput mainNV(VertexShaderInput input) { return mainColor(input); } */ static unsigned char D3D12_VertexShader_Colors[] = { 0x44, 0x58, 0x42, 0x43, 0xbd, 0x28, 0xdc, 0xb4, 0x40, 0x82, 0x5f, 0xf6, 0x92, 0x33, 0x60, 0xe7, 0x83, 0x5b, 0x8f, 0x2d, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x13, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x63, 0x01, 0x00, 0x00, 0x73, 0x02, 0x00, 0x00, 0xab, 0x02, 0x00, 0x00, 0xa7, 0x0a, 0x00, 0x00, 0xc3, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x53, 0x56, 0x30, 0x08, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xf4, 0x07, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0xfd, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x0c, 0xc0, 0x30, 0x02, 0x01, 0x24, 0x41, 0x70, 0x70, 0x30, 0x5c, 0x3e, 0xb0, 0x20, 0x46, 0xc3, 0x10, 0xcd, 0xe4, 0x2f, 0x84, 0x01, 0x08, 0x98, 0x2f, 0x4d, 0x11, 0x25, 0x4c, 0xfe, 0x4b, 0x44, 0x13, 0x71, 0xb1, 0x07, 0x30, 0x10, 0x11, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x04, 0x41, 0xb8, 0x6e, 0xb8, 0x7c, 0x60, 0x41, 0x8c, 0x86, 0x21, 0x9a, 0xc9, 0x5f, 0x08, 0x03, 0x10, 0x30, 0x9f, 0x73, 0x1a, 0x69, 0x02, 0x9a, 0x49, 0x42, 0xc1, 0x40, 0xc4, 0x08, 0x40, 0x09, 0x0c, 0x3a, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0x06, 0x90, 0x24, 0x89, 0x92, 0xd0, 0x52, 0x0c, 0x23, 0x49, 0x12, 0x05, 0xa0, 0xe6, 0xa8, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x9f, 0xdb, 0xa8, 0x62, 0x25, 0x26, 0xbf, 0xb8, 0x6d, 0x44, 0x00, 0x00, 0x00, 0x90, 0x72, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x80, 0x0a, 0xf1, 0x24, 0x51, 0x42, 0x52, 0x29, 0x80, 0x04, 0x00, 0x00, 0xa2, 0xe6, 0x08, 0x82, 0x62, 0x44, 0x89, 0x92, 0x24, 0x16, 0x5d, 0x03, 0x01, 0x67, 0x09, 0x0b, 0x20, 0x49, 0x3e, 0x03, 0x4c, 0x11, 0x72, 0xf9, 0xc5, 0xe2, 0x00, 0x93, 0x8f, 0xfb, 0x38, 0x0a, 0x84, 0xe3, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x7f, 0x89, 0x68, 0x22, 0x2e, 0xf6, 0x00, 0x06, 0x22, 0xe2, 0x9c, 0x46, 0x9a, 0x80, 0x66, 0x92, 0x90, 0xa0, 0x69, 0xc3, 0x08, 0x02, 0x70, 0x99, 0x34, 0x45, 0x94, 0x30, 0xf9, 0x2f, 0x11, 0x4d, 0xc4, 0xc5, 0x1e, 0xc0, 0x40, 0x44, 0x28, 0x35, 0x3d, 0xd4, 0x84, 0x86, 0x80, 0x0b, 0x86, 0x11, 0x06, 0xe0, 0x30, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x78, 0x5c, 0x70, 0x09, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x2d, 0x1d, 0x12, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x52, 0x00, 0xc0, 0x90, 0xe7, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0xcf, 0x02, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x06, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x12, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x5c, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00, 0x19, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x52, 0x0a, 0xa1, 0x08, 0xca, 0x80, 0x92, 0x12, 0x18, 0x01, 0x28, 0x86, 0x02, 0x14, 0x28, 0x82, 0x42, 0x28, 0x83, 0x72, 0x28, 0x89, 0x02, 0x0c, 0x28, 0xb0, 0x02, 0x29, 0xa0, 0xf2, 0x28, 0x8c, 0xd2, 0x0d, 0x28, 0x0a, 0x52, 0x4a, 0x62, 0x04, 0x80, 0x8a, 0x19, 0x00, 0x22, 0x66, 0x00, 0x68, 0x98, 0x01, 0xa0, 0x6d, 0x06, 0x80, 0xba, 0x19, 0x00, 0xfa, 0x66, 0x00, 0x08, 0x9c, 0x01, 0xa0, 0x70, 0x2c, 0x87, 0x61, 0x9e, 0xe7, 0x01, 0x20, 0x30, 0x00, 0x00, 0x10, 0x01, 0x21, 0x10, 0x0c, 0x40, 0x50, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x44, 0x99, 0x20, 0x24, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0xc1, 0x6e, 0x6e, 0x82, 0x90, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x45, 0xc7, 0x64, 0xe8, 0xcd, 0x6d, 0x8e, 0x2e, 0xcc, 0x8d, 0x6e, 0x6e, 0x82, 0x90, 0x34, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x6c, 0x60, 0xc0, 0xa2, 0xed, 0x8d, 0xac, 0x8c, 0x6d, 0x82, 0x90, 0x38, 0x13, 0x84, 0xe4, 0xd9, 0x30, 0x4c, 0xd3, 0x30, 0x41, 0x48, 0xa0, 0x09, 0x42, 0x12, 0x4d, 0x10, 0x12, 0x69, 0x03, 0x82, 0x44, 0x12, 0x55, 0x11, 0xd6, 0xc5, 0x08, 0x4e, 0xee, 0x4d, 0xad, 0x6c, 0x8c, 0x2e, 0xed, 0xcd, 0x2d, 0xc8, 0x8d, 0xcc, 0x2a, 0xad, 0xec, 0x6e, 0x82, 0x90, 0x4c, 0x1b, 0x10, 0x24, 0x93, 0xa8, 0x4a, 0xb3, 0xae, 0x0d, 0x03, 0x83, 0x6d, 0x13, 0x84, 0x2e, 0x0c, 0x26, 0x08, 0x09, 0xc5, 0x01, 0xee, 0x6d, 0x8e, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xd3, 0x54, 0x12, 0x55, 0xd2, 0x93, 0xd3, 0x06, 0x04, 0xf9, 0x2a, 0x62, 0x02, 0x03, 0xeb, 0xe2, 0x40, 0x57, 0x86, 0x37, 0x41, 0x48, 0x2a, 0x26, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x1b, 0x10, 0x44, 0x0c, 0xaa, 0x31, 0x98, 0xc8, 0xc0, 0xba, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x12, 0x8b, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0x31, 0x83, 0xea, 0x0c, 0x26, 0x34, 0xb0, 0xae, 0x0d, 0x84, 0x17, 0x06, 0x65, 0x90, 0x06, 0x13, 0x84, 0x4f, 0x0c, 0x88, 0x40, 0x3d, 0x4d, 0x25, 0x51, 0x25, 0x3d, 0x39, 0x6d, 0x40, 0x90, 0xaf, 0x22, 0x26, 0x36, 0xb0, 0xae, 0x0d, 0x84, 0xd7, 0x06, 0x65, 0x90, 0x06, 0x13, 0x04, 0x30, 0x18, 0x83, 0x0d, 0x04, 0xb2, 0x54, 0xc4, 0x06, 0x81, 0x81, 0x83, 0x09, 0xc2, 0xf0, 0x4d, 0x10, 0x08, 0x6f, 0x43, 0x43, 0x40, 0x5c, 0xa7, 0x06, 0x6b, 0xe0, 0x06, 0x6f, 0x10, 0x07, 0x72, 0xc0, 0xcd, 0x41, 0x1c, 0x4c, 0x10, 0x90, 0x60, 0x03, 0xb0, 0x61, 0x20, 0xec, 0xc0, 0x0e, 0x36, 0x04, 0x77, 0xb0, 0x61, 0x18, 0xea, 0x00, 0x0f, 0x26, 0x08, 0x61, 0x40, 0x06, 0x1b, 0x02, 0x3d, 0x60, 0xd2, 0x16, 0x96, 0xe6, 0x36, 0xf4, 0xc6, 0xf6, 0x26, 0x37, 0x41, 0x50, 0xb6, 0x09, 0x82, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0x82, 0x92, 0x6c, 0x10, 0x2a, 0x6b, 0xc3, 0x42, 0xb0, 0x41, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x00, 0x0a, 0x84, 0x1f, 0x84, 0x02, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x82, 0x82, 0x6c, 0x10, 0xaa, 0x6a, 0xc3, 0x32, 0x8c, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x40, 0x0a, 0x83, 0x1f, 0x94, 0x02, 0x8b, 0xa1, 0x27, 0xa6, 0x27, 0xa9, 0x09, 0x82, 0x72, 0x4c, 0x10, 0x92, 0x6b, 0x83, 0x50, 0xa5, 0xc2, 0x86, 0x45, 0x3a, 0x85, 0x3e, 0xf0, 0x83, 0x3f, 0xf0, 0x83, 0x01, 0x15, 0x24, 0x3f, 0x50, 0x85, 0x0d, 0x83, 0x28, 0x98, 0xc2, 0x2a, 0x70, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0xdb, 0xb0, 0x10, 0xad, 0xd0, 0x07, 0xa0, 0xf0, 0x07, 0xa8, 0x30, 0xa0, 0x02, 0xe1, 0x07, 0xaa, 0xb0, 0x61, 0x19, 0x46, 0xa1, 0x0f, 0xfc, 0xe0, 0x0f, 0x48, 0x61, 0x20, 0x85, 0xc1, 0x0f, 0x4a, 0x61, 0xc3, 0x22, 0x9d, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0x90, 0xc2, 0x80, 0x0a, 0x92, 0x1f, 0xa8, 0xc2, 0x86, 0xc1, 0x15, 0x5e, 0x01, 0x16, 0x36, 0x0c, 0xac, 0x10, 0x0b, 0xc0, 0x86, 0xa2, 0x0e, 0xf8, 0x40, 0x16, 0x1e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0xdc, 0x04, 0x21, 0xc1, 0x58, 0xa4, 0xb9, 0xcd, 0xd1, 0xcd, 0x4d, 0x10, 0x92, 0x8c, 0xc6, 0x5c, 0xda, 0xd9, 0x17, 0x1b, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0xaf, 0x39, 0xba, 0x09, 0x42, 0xa2, 0x6d, 0x40, 0x68, 0xa1, 0x16, 0x6c, 0xe1, 0x16, 0x70, 0xe1, 0xca, 0x05, 0x5d, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x82, 0xa2, 0x0e, 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x00, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0x70, 0x2a, 0x91, 0xe1, 0xb9, 0xd0, 0xe5, 0xc1, 0x95, 0x05, 0xb9, 0xb9, 0xbd, 0xd1, 0x85, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x11, 0xe6, 0x00, 0x0f, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xf4, 0xa0, 0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0x40, 0x16, 0xba, 0x90, 0xe1, 0xb9, 0x8c, 0xbd, 0xd5, 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0x74, 0x01, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x71, 0x4e, 0x23, 0x4d, 0x40, 0x33, 0x49, 0xff, 0x42, 0x18, 0x80, 0x80, 0x19, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x5f, 0xdc, 0xb6, 0x19, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0x61, 0x02, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0x44, 0x44, 0x13, 0x02, 0x44, 0x98, 0x5f, 0xdc, 0xb6, 0x05, 0x24, 0x0c, 0x80, 0x34, 0x9c, 0xb3, 0x38, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xa8, 0xdb, 0xf4, 0x51, 0x8f, 0x4d, 0x34, 0xfb, 0x4e, 0x9d, 0x82, 0x8b, 0x6e, 0x9e, 0x44, 0x58, 0x49, 0x4c, 0x20, 0x09, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x48, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x09, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x3f, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x6c, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f, 0xc2, 0x1e, 0x42, 0xf2, 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, 0xad, 0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43, 0x12, 0xd4, 0x83, 0x83, 0xe1, 0xf2, 0x81, 0x05, 0x31, 0x1a, 0x86, 0x68, 0x26, 0x7f, 0x21, 0x0c, 0x40, 0xc0, 0x7c, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0x38, 0xa7, 0x91, 0x26, 0xa0, 0x99, 0x24, 0x24, 0x58, 0x7b, 0xdd, 0x70, 0xf9, 0xc0, 0x82, 0x18, 0x0d, 0x43, 0x34, 0x93, 0xbf, 0x10, 0x06, 0x20, 0x60, 0x3e, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x4b, 0x38, 0x1d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x05, 0x28, 0x50, 0x06, 0xe5, 0x50, 0x04, 0xe5, 0x41, 0xa5, 0x24, 0x46, 0x00, 0xca, 0xa0, 0x08, 0x0a, 0x81, 0xf2, 0x0c, 0x00, 0xe9, 0xb1, 0x1c, 0x86, 0x79, 0x9e, 0x07, 0x80, 0xc0, 0x00, 0x00, 0x40, 0x04, 0x84, 0x40, 0x30, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x76, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd9, 0x44, 0x60, 0x82, 0x40, 0x24, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x68, 0xd4, 0x86, 0x00, 0x9a, 0x20, 0x08, 0x00, 0x93, 0xb6, 0xb0, 0x34, 0xb7, 0xa1, 0x37, 0xb6, 0x37, 0x39, 0x22, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x13, 0x84, 0xc2, 0x99, 0x20, 0x14, 0xcf, 0x86, 0x80, 0x98, 0x20, 0x14, 0xd0, 0x04, 0x81, 0x50, 0x26, 0x08, 0xc4, 0xb2, 0x41, 0xc8, 0xb4, 0x0d, 0x0b, 0x41, 0x55, 0xd6, 0x65, 0x0d, 0x18, 0x61, 0x6d, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0xb4, 0x41, 0xc8, 0xb2, 0x0d, 0xcb, 0xd0, 0x55, 0xd6, 0x65, 0x0d, 0xde, 0x60, 0x7d, 0x13, 0x04, 0x82, 0x61, 0x31, 0xf4, 0xc4, 0xf4, 0x24, 0x35, 0x41, 0x28, 0xa4, 0x09, 0x02, 0xd1, 0x6c, 0x10, 0x32, 0x32, 0xd8, 0xb0, 0x84, 0x81, 0x18, 0x54, 0xd6, 0x65, 0x0d, 0x63, 0x10, 0x06, 0x56, 0x19, 0x6c, 0x18, 0x38, 0x30, 0x30, 0x03, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1b, 0x16, 0x02, 0x0d, 0x2a, 0xec, 0x1a, 0x83, 0x61, 0x0c, 0x08, 0xab, 0x0c, 0x36, 0x2c, 0x43, 0x57, 0x59, 0x97, 0x37, 0x78, 0x83, 0xf5, 0x6d, 0x58, 0xc2, 0x40, 0x0c, 0x2a, 0xeb, 0xf2, 0x86, 0x31, 0x08, 0x03, 0xab, 0x0c, 0x36, 0x0c, 0x69, 0xa0, 0x06, 0x6b, 0xb0, 0x61, 0x38, 0x03, 0x36, 0x00, 0x36, 0x14, 0xd2, 0xd4, 0x06, 0x0f, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x46, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xe0, 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0x40, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x6d, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x36, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x11, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x11, 0xd1, 0x84, 0x00, 0x11, 0xe6, 0x17, 0xb7, 0x6d, 0x00, 0x09, 0x03, 0x20, 0x0d, 0xe7, 0x2c, 0x4e, 0x04, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x44, 0x8a, 0xab, 0x14, 0x0a, 0x61, 0x06, 0xa0, 0xec, 0x4a, 0x8e, 0x4a, 0x09, 0x50, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x61, 0x03, 0x63, 0x59, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0xdd, 0x21, 0x5d, 0x8f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x87, 0x4c, 0x18, 0x71, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x25, 0x54, 0xf6, 0x20, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x80, 0x81, 0x52, 0x69, 0x51, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x18, 0x2c, 0xdc, 0x36, 0x29, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x88, 0x01, 0xd3, 0x71, 0xc8, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x18, 0x34, 0x5d, 0x57, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x90, 0x81, 0xe3, 0x79, 0x4a, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x19, 0x3c, 0xdf, 0x57, 0x39, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0x90, 0x81, 0xa3, 0x80, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x69, 0x30, 0x3d, 0x66, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x8d, 0x1b, 0x60, 0x54, 0x19, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x33, 0x07, 0x5d, 0xc6, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x36, 0x5d, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x07, 0x0f, 0xce, 0xe0, 0x7a, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xf2, 0x00, 0x0d, 0xae, 0x25, 0xb0, 0xe0, 0x80, 0x8e, 0x59, 0x9b, 0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0xe1, 0x83, 0x35, 0xd8, 0xa4, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3e, 0x60, 0x83, 0xcd, 0x09, 0x2c, 0x50, 0xa0, 0x63, 0xd9, 0x27, 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x40, 0xe1, 0x0d, 0xbe, 0x2a, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x27, 0x14, 0xe0, 0xe0, 0x8b, 0x02, 0x0b, 0x1a, 0xe8, 0x18, 0x37, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x14, 0xe6, 0x60, 0x0c, 0xb0, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x52, 0xa0, 0x83, 0x31, 0xa0, 0x02, 0x0b, 0x20, 0xe8, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x83, 0x0a, 0x72, 0xe0, 0x06, 0x74, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x2b, 0xdc, 0xc1, 0x1c, 0xe8, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0xb2, 0xc0, 0x07, 0x78, 0xd0, 0x0a, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0xdc, 0x42, 0x28, 0xf4, 0xc1, 0x2b, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0xd8, 0x14, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x17, 0x56, 0xc1, 0x7b, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x7a, 0x81, 0x15, 0xb6, 0x25, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x17, 0x5a, 0x01, 0x3b, 0x02, 0xb3, 0xca, 0x40, 0x3e, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xf0, 0x80, 0xc3, 0x2b, 0x88, 0x81, 0x14, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x13, 0x0e, 0xb0, 0xf0, 0x39, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xe2, 0x10, 0x0b, 0x9c, 0x12, 0x58, 0x96, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x1c, 0x66, 0xc1, 0x0c, 0xaa, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x72, 0xa0, 0x85, 0x31, 0x88, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xcc, 0xa1, 0x16, 0xc0, 0xa0, 0x09, 0x8c, 0x6b, 0x03, 0xf9, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x83, 0x0e, 0xb7, 0xa0, 0x06, 0x58, 0x30, 0x62, 0x80, 0x00, 0x20, 0x08, 0x06, 0x4f, 0x3a, 0xe0, 0xc2, 0x19, 0x50, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xea, 0x90, 0x0b, 0x64, 0x00, 0x05, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0x80, 0x43, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0x03, 0x2d, 0x24, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0xf8, 0x42, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0xc3, 0x2f, 0x04, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa4, 0x03, 0x3a, 0x80, 0x43, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x90, 0x0e, 0xe8, 0x40, 0x0b, 0xac, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0xc2, 0x38, 0xa0, 0x03, 0x38, 0xc4, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xed, 0x90, 0x0b, 0xe3, 0x80, 0x0e, 0xb4, 0x00, 0x0b, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0x8c, 0x03, 0x3a, 0xf8, 0xc2, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x30, 0x0e, 0xe8, 0xf0, 0x0b, 0xae, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 }; static unsigned char D3D12_VertexShader_Textures[] = { 0x44, 0x58, 0x42, 0x43, 0x64, 0x78, 0x9b, 0xaf, 0x0d, 0x1f, 0x5b, 0x33, 0xd2, 0x5e, 0x6d, 0x7f, 0x5d, 0x5c, 0xd1, 0x9d, 0x01, 0x00, 0x00, 0x00, 0x4b, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x63, 0x01, 0x00, 0x00, 0x73, 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x03, 0x0b, 0x00, 0x00, 0x1f, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x53, 0x56, 0x30, 0x08, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0xf8, 0x07, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xf5, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x0c, 0xc0, 0x30, 0x02, 0x01, 0x24, 0x41, 0x70, 0x70, 0x30, 0x5c, 0x3e, 0xb0, 0x20, 0x46, 0xc3, 0x10, 0xcd, 0xe4, 0x2f, 0x84, 0x01, 0x08, 0x98, 0x2f, 0x4d, 0x11, 0x25, 0x4c, 0xfe, 0x4b, 0x44, 0x13, 0x71, 0xb1, 0x07, 0x30, 0x10, 0x11, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x04, 0x41, 0xb8, 0x6e, 0xb8, 0x7c, 0x60, 0x41, 0x8c, 0x86, 0x21, 0x9a, 0xc9, 0x5f, 0x08, 0x03, 0x10, 0x30, 0x9f, 0x73, 0x1a, 0x69, 0x02, 0x9a, 0x49, 0x42, 0xc1, 0x40, 0xc4, 0x08, 0x40, 0x09, 0x0c, 0x3a, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0x06, 0x90, 0x24, 0x89, 0x92, 0xd0, 0x52, 0x0c, 0x23, 0x49, 0x12, 0x05, 0xa0, 0xe6, 0xa8, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x9f, 0xdb, 0xa8, 0x62, 0x25, 0x26, 0xbf, 0xb8, 0x6d, 0x44, 0x00, 0x00, 0x00, 0x90, 0x72, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x80, 0x0a, 0xf1, 0x24, 0x51, 0x42, 0x52, 0x29, 0x80, 0x04, 0x00, 0x00, 0xa2, 0xe6, 0x08, 0x82, 0x62, 0x44, 0x89, 0x92, 0x24, 0x16, 0x5d, 0x03, 0x01, 0x67, 0x09, 0x0b, 0x20, 0x49, 0x3e, 0x03, 0x4c, 0x11, 0x72, 0xf9, 0xc5, 0xe2, 0x00, 0x93, 0x8f, 0xfb, 0x38, 0x0a, 0x84, 0xe3, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x7f, 0x89, 0x68, 0x22, 0x2e, 0xf6, 0x00, 0x06, 0x22, 0xe2, 0x9c, 0x46, 0x9a, 0x80, 0x66, 0x92, 0x90, 0xa0, 0x69, 0xc3, 0x08, 0x02, 0x70, 0x99, 0x34, 0x45, 0x94, 0x30, 0xf9, 0x2f, 0x11, 0x4d, 0xc4, 0xc5, 0x1e, 0xc0, 0x40, 0x44, 0x28, 0x35, 0x3d, 0xd4, 0x84, 0x86, 0x80, 0x0b, 0x86, 0x11, 0x06, 0xe0, 0x30, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x78, 0x5c, 0x70, 0x09, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x2d, 0x1d, 0x12, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x52, 0x00, 0xc0, 0x90, 0xe7, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0xcf, 0x02, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x06, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x12, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x5c, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00, 0x19, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x52, 0x0a, 0xa1, 0x08, 0xca, 0x80, 0x92, 0x12, 0x18, 0x01, 0x28, 0x86, 0x02, 0x14, 0x28, 0x82, 0x42, 0x28, 0x83, 0x72, 0x28, 0x89, 0x02, 0x0c, 0x28, 0xb0, 0x02, 0x29, 0xa0, 0xf2, 0x28, 0x8c, 0xd2, 0x0d, 0x28, 0x0a, 0x52, 0x4a, 0x62, 0x04, 0x80, 0x8a, 0x19, 0x00, 0x22, 0x66, 0x00, 0x68, 0x98, 0x01, 0xa0, 0x6d, 0x06, 0x80, 0xba, 0x19, 0x00, 0xfa, 0x66, 0x00, 0x08, 0x9c, 0x01, 0xa0, 0x70, 0x2c, 0x87, 0x61, 0x9e, 0xe7, 0x01, 0x20, 0x30, 0x00, 0x00, 0x10, 0x01, 0x21, 0x10, 0x0c, 0x40, 0x50, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x44, 0x99, 0x20, 0x24, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0xc1, 0x6e, 0x6e, 0x82, 0x90, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x45, 0xc7, 0x64, 0xe8, 0xcd, 0x6d, 0x8e, 0x2e, 0xcc, 0x8d, 0x6e, 0x6e, 0x82, 0x90, 0x34, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x6c, 0x60, 0xc0, 0xa2, 0xed, 0x8d, 0xac, 0x8c, 0x6d, 0x82, 0x90, 0x38, 0x13, 0x84, 0xe4, 0xd9, 0x30, 0x4c, 0xd3, 0x30, 0x41, 0x48, 0xa0, 0x09, 0x42, 0x12, 0x4d, 0x10, 0x12, 0x69, 0x03, 0x82, 0x44, 0x12, 0x55, 0x11, 0xd6, 0xc5, 0x08, 0x4e, 0xee, 0x4d, 0xad, 0x6c, 0x8c, 0x2e, 0xed, 0xcd, 0x2d, 0xc8, 0x8d, 0xcc, 0x2a, 0xad, 0xec, 0x6e, 0x82, 0x90, 0x4c, 0x1b, 0x10, 0x24, 0x93, 0xa8, 0x4a, 0xb3, 0xae, 0x0d, 0x03, 0x83, 0x6d, 0x13, 0x84, 0x2e, 0x0c, 0x26, 0x08, 0x09, 0xc5, 0x01, 0xee, 0x6d, 0x8e, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xd3, 0x54, 0x12, 0x55, 0xd2, 0x93, 0xd3, 0x06, 0x04, 0xf9, 0x2a, 0x62, 0x02, 0x03, 0xeb, 0xe2, 0x40, 0x57, 0x86, 0x37, 0x41, 0x48, 0x2a, 0x26, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x1b, 0x10, 0x44, 0x0c, 0xaa, 0x31, 0x98, 0xc8, 0xc0, 0xba, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x12, 0x8b, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0x31, 0x83, 0xea, 0x0c, 0x26, 0x34, 0xb0, 0xae, 0x0d, 0x84, 0x17, 0x06, 0x65, 0x90, 0x06, 0x13, 0x84, 0x4f, 0x0c, 0x88, 0x40, 0x3d, 0x4d, 0x25, 0x51, 0x25, 0x3d, 0x39, 0x6d, 0x40, 0x90, 0xaf, 0x22, 0x26, 0x36, 0xb0, 0xae, 0x0d, 0x84, 0xd7, 0x06, 0x65, 0x90, 0x06, 0x13, 0x04, 0x30, 0x18, 0x83, 0x0d, 0x04, 0xb2, 0x54, 0xc4, 0x06, 0x81, 0x81, 0x83, 0x09, 0xc2, 0xf0, 0x4d, 0x10, 0x08, 0x6f, 0x43, 0x43, 0x40, 0x5c, 0xa7, 0x06, 0x6b, 0xe0, 0x06, 0x6f, 0x10, 0x07, 0x72, 0xc0, 0xcd, 0x41, 0x1c, 0x4c, 0x10, 0x90, 0x60, 0x03, 0xb0, 0x61, 0x20, 0xec, 0xc0, 0x0e, 0x36, 0x04, 0x77, 0xb0, 0x61, 0x18, 0xea, 0x00, 0x0f, 0x26, 0x08, 0x61, 0x40, 0x06, 0x1b, 0x02, 0x3d, 0xe0, 0xd2, 0x16, 0x96, 0xe6, 0x46, 0x55, 0x86, 0x47, 0x57, 0x27, 0x57, 0x36, 0x41, 0x50, 0xb6, 0x09, 0x82, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0x82, 0x92, 0x6c, 0x10, 0x2a, 0x6b, 0xc3, 0x42, 0xb0, 0x41, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x00, 0x0a, 0x84, 0x1f, 0x84, 0x02, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x82, 0x82, 0x6c, 0x10, 0xaa, 0x6a, 0xc3, 0x32, 0x8c, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x40, 0x0a, 0x83, 0x1f, 0x94, 0x02, 0x8b, 0xa1, 0x27, 0xa6, 0x27, 0xa9, 0x09, 0x82, 0x72, 0x4c, 0x10, 0x92, 0x6b, 0x83, 0x50, 0xa5, 0xc2, 0x86, 0x45, 0x3a, 0x85, 0x3e, 0xf0, 0x83, 0x3f, 0xf0, 0x83, 0x01, 0x15, 0x24, 0x3f, 0x50, 0x85, 0x0d, 0x83, 0x28, 0x98, 0xc2, 0x2a, 0x70, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0xdb, 0xb0, 0x10, 0xad, 0xd0, 0x07, 0xa0, 0xf0, 0x07, 0xa8, 0x30, 0xa0, 0x02, 0xe1, 0x07, 0xaa, 0xb0, 0x61, 0x19, 0x46, 0xa1, 0x0f, 0xfc, 0xe0, 0x0f, 0x48, 0x61, 0x20, 0x85, 0xc1, 0x0f, 0x4a, 0x61, 0xc3, 0x22, 0x9d, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0x90, 0xc2, 0x80, 0x0a, 0x92, 0x1f, 0xa8, 0xc2, 0x86, 0xc1, 0x15, 0x5e, 0x01, 0x16, 0x36, 0x0c, 0xac, 0x10, 0x0b, 0xc0, 0x86, 0xa2, 0x0e, 0xf8, 0x40, 0x16, 0x1e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0xdc, 0x04, 0x21, 0xc1, 0x58, 0xa4, 0xb9, 0xcd, 0xd1, 0xcd, 0x4d, 0x10, 0x92, 0x8c, 0xc6, 0x5c, 0xda, 0xd9, 0x17, 0x1b, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0xaf, 0x39, 0xba, 0x09, 0x42, 0xa2, 0x6d, 0x40, 0x68, 0xa1, 0x16, 0x6c, 0xe1, 0x16, 0x70, 0xe1, 0xca, 0x05, 0x5d, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x82, 0xa2, 0x0e, 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x00, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0x70, 0x2a, 0x91, 0xe1, 0xb9, 0xd0, 0xe5, 0xc1, 0x95, 0x05, 0xb9, 0xb9, 0xbd, 0xd1, 0x85, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x11, 0xe6, 0x00, 0x0f, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xf4, 0xa0, 0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0x40, 0x16, 0xba, 0x90, 0xe1, 0xb9, 0x8c, 0xbd, 0xd5, 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0x74, 0x01, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x71, 0x4e, 0x23, 0x4d, 0x40, 0x33, 0x49, 0xff, 0x42, 0x18, 0x80, 0x80, 0x19, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x5f, 0xdc, 0xb6, 0x19, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0x61, 0x02, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0x44, 0x44, 0x13, 0x02, 0x44, 0x98, 0x5f, 0xdc, 0xb6, 0x05, 0x2c, 0x0c, 0x80, 0x34, 0x2d, 0x71, 0x4d, 0x54, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xa0, 0xdd, 0xa0, 0xcf, 0x1a, 0x5f, 0x65, 0x5e, 0xda, 0x32, 0xf3, 0x80, 0x17, 0x51, 0x70, 0x44, 0x58, 0x49, 0x4c, 0x24, 0x09, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x49, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x6c, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f, 0xc2, 0x1e, 0x42, 0xf2, 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, 0xad, 0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43, 0x12, 0xd4, 0x83, 0x83, 0xe1, 0xf2, 0x81, 0x05, 0x31, 0x1a, 0x86, 0x68, 0x26, 0x7f, 0x21, 0x0c, 0x40, 0xc0, 0x7c, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0x38, 0xa7, 0x91, 0x26, 0xa0, 0x99, 0x24, 0x24, 0x58, 0x7b, 0xdd, 0x70, 0xf9, 0xc0, 0x82, 0x18, 0x0d, 0x43, 0x34, 0x93, 0xbf, 0x10, 0x06, 0x20, 0x60, 0x3e, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x4b, 0x38, 0x1d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x05, 0x28, 0x50, 0x06, 0xe5, 0x50, 0x04, 0xe5, 0x41, 0xa5, 0x24, 0x46, 0x00, 0xca, 0xa0, 0x08, 0x0a, 0x81, 0xf2, 0x0c, 0x00, 0xe9, 0xb1, 0x1c, 0x86, 0x79, 0x9e, 0x07, 0x80, 0xc0, 0x00, 0x00, 0x40, 0x04, 0x84, 0x40, 0x30, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x76, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd9, 0x44, 0x60, 0x82, 0x40, 0x24, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x68, 0xd4, 0x86, 0x00, 0x9a, 0x20, 0x08, 0x00, 0x97, 0xb6, 0xb0, 0x34, 0x37, 0xaa, 0x32, 0x3c, 0xba, 0x3a, 0xb9, 0x32, 0x22, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x13, 0x84, 0xc2, 0x99, 0x20, 0x14, 0xcf, 0x86, 0x80, 0x98, 0x20, 0x14, 0xd0, 0x04, 0x81, 0x50, 0x26, 0x08, 0xc4, 0xb2, 0x41, 0xc8, 0xb4, 0x0d, 0x0b, 0x41, 0x55, 0xd6, 0x65, 0x0d, 0x18, 0x61, 0x6d, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0xb4, 0x41, 0xc8, 0xb2, 0x0d, 0xcb, 0xd0, 0x55, 0xd6, 0x65, 0x0d, 0xde, 0x60, 0x7d, 0x13, 0x04, 0x82, 0x61, 0x31, 0xf4, 0xc4, 0xf4, 0x24, 0x35, 0x41, 0x28, 0xa4, 0x09, 0x02, 0xd1, 0x6c, 0x10, 0x32, 0x32, 0xd8, 0xb0, 0x84, 0x81, 0x18, 0x54, 0xd6, 0x65, 0x0d, 0x63, 0x10, 0x06, 0x56, 0x19, 0x6c, 0x18, 0x38, 0x30, 0x30, 0x03, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1b, 0x16, 0x02, 0x0d, 0x2a, 0xec, 0x1a, 0x83, 0x61, 0x0c, 0x08, 0xab, 0x0c, 0x36, 0x2c, 0x43, 0x57, 0x59, 0x97, 0x37, 0x78, 0x83, 0xf5, 0x6d, 0x58, 0xc2, 0x40, 0x0c, 0x2a, 0xeb, 0xf2, 0x86, 0x31, 0x08, 0x03, 0xab, 0x0c, 0x36, 0x0c, 0x69, 0xa0, 0x06, 0x6b, 0xb0, 0x61, 0x38, 0x03, 0x36, 0x00, 0x36, 0x14, 0xd2, 0xd4, 0x06, 0x0f, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x46, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xe0, 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0x40, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x36, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x11, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x11, 0xd1, 0x84, 0x00, 0x11, 0xe6, 0x17, 0xb7, 0x6d, 0x00, 0x0b, 0x03, 0x20, 0x4d, 0x4b, 0x5c, 0x13, 0x15, 0x11, 0x00, 0x61, 0x20, 0x00, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x44, 0x8a, 0xab, 0x14, 0x0a, 0x61, 0x06, 0xa0, 0xec, 0x4a, 0x8e, 0x4a, 0x09, 0x50, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x61, 0x03, 0x63, 0x59, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0xdd, 0x21, 0x5d, 0x8f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x87, 0x4c, 0x18, 0x71, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x25, 0x54, 0xf6, 0x20, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x80, 0x81, 0x52, 0x69, 0x51, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x18, 0x2c, 0xdc, 0x36, 0x29, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x88, 0x01, 0xd3, 0x71, 0xc8, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x18, 0x34, 0x5d, 0x57, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x90, 0x81, 0xe3, 0x79, 0x4a, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x19, 0x3c, 0xdf, 0x57, 0x39, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0x90, 0x81, 0xa3, 0x80, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x69, 0x30, 0x3d, 0x66, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x8d, 0x1b, 0x60, 0x54, 0x19, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x33, 0x07, 0x5d, 0xc6, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x36, 0x5d, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x07, 0x0f, 0xce, 0xe0, 0x7a, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xf2, 0x00, 0x0d, 0xae, 0x25, 0xb0, 0xe0, 0x80, 0x8e, 0x59, 0x9b, 0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0xe1, 0x83, 0x35, 0xd8, 0xa4, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3e, 0x60, 0x83, 0xcd, 0x09, 0x2c, 0x50, 0xa0, 0x63, 0xd9, 0x27, 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x40, 0xe1, 0x0d, 0xbe, 0x2a, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x27, 0x14, 0xe0, 0xe0, 0x8b, 0x02, 0x0b, 0x1a, 0xe8, 0x18, 0x37, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x14, 0xe6, 0x60, 0x0c, 0xb0, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x52, 0xa0, 0x83, 0x31, 0xa0, 0x02, 0x0b, 0x20, 0xe8, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x83, 0x0a, 0x72, 0xe0, 0x06, 0x74, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x2b, 0xdc, 0xc1, 0x1c, 0xe8, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0xb2, 0xc0, 0x07, 0x78, 0xd0, 0x0a, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0xdc, 0x42, 0x28, 0xf4, 0xc1, 0x2b, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0xd8, 0x14, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x17, 0x56, 0xc1, 0x7b, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x7a, 0x81, 0x15, 0xb6, 0x25, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x17, 0x5a, 0x01, 0x3b, 0x02, 0xb3, 0xca, 0x40, 0x3e, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xf0, 0x80, 0xc3, 0x2b, 0x88, 0x81, 0x14, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x13, 0x0e, 0xb0, 0xf0, 0x39, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xe2, 0x10, 0x0b, 0x9c, 0x12, 0x58, 0x96, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x1c, 0x66, 0xc1, 0x0c, 0xaa, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x72, 0xa0, 0x85, 0x31, 0x88, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xcc, 0xa1, 0x16, 0xc0, 0xa0, 0x09, 0x8c, 0x6b, 0x03, 0xf9, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x83, 0x0e, 0xb7, 0xa0, 0x06, 0x58, 0x30, 0x62, 0x80, 0x00, 0x20, 0x08, 0x06, 0x4f, 0x3a, 0xe0, 0xc2, 0x19, 0x50, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xea, 0x90, 0x0b, 0x64, 0x00, 0x05, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0x80, 0x43, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0x03, 0x2d, 0x24, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0xf8, 0x42, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0xc3, 0x2f, 0x04, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa4, 0x03, 0x3a, 0x80, 0x43, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x90, 0x0e, 0xe8, 0x40, 0x0b, 0xac, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0xc2, 0x38, 0xa0, 0x03, 0x38, 0xc4, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xed, 0x90, 0x0b, 0xe3, 0x80, 0x0e, 0xb4, 0x00, 0x0b, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0x8c, 0x03, 0x3a, 0xf8, 0xc2, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x30, 0x0e, 0xe8, 0xf0, 0x0b, 0xae, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 }; static unsigned char D3D12_VertexShader_YUV[] = { 0x44, 0x58, 0x42, 0x43, 0xec, 0x10, 0x35, 0x4f, 0x25, 0x8f, 0xde, 0xa0, 0xad, 0x2c, 0x2c, 0xb7, 0x5e, 0xd4, 0x57, 0xdd, 0x01, 0x00, 0x00, 0x00, 0x97, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x63, 0x01, 0x00, 0x00, 0x73, 0x02, 0x00, 0x00, 0x5b, 0x03, 0x00, 0x00, 0x53, 0x0b, 0x00, 0x00, 0x6f, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x53, 0x56, 0x30, 0x08, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0xf0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xd8, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xf3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x0c, 0xc0, 0x30, 0x02, 0x01, 0x24, 0x41, 0x70, 0x70, 0x30, 0x5c, 0x3e, 0xb0, 0x20, 0x46, 0xc3, 0x10, 0xcd, 0xe4, 0x2f, 0x84, 0x01, 0x08, 0x98, 0x2f, 0x4d, 0x11, 0x25, 0x4c, 0xfe, 0x4b, 0x44, 0x13, 0x71, 0xb1, 0x07, 0x30, 0x10, 0x11, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x04, 0x41, 0xb8, 0x6e, 0xb8, 0x7c, 0x60, 0x41, 0x8c, 0x86, 0x21, 0x9a, 0xc9, 0x5f, 0x08, 0x03, 0x10, 0x30, 0x9f, 0x73, 0x1a, 0x69, 0x02, 0x9a, 0x49, 0x42, 0xc1, 0x40, 0xc4, 0x08, 0x40, 0x09, 0x0c, 0x3a, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0x06, 0x90, 0x24, 0x89, 0x92, 0xd0, 0x52, 0x0c, 0x23, 0x49, 0x12, 0x05, 0xa0, 0xe6, 0xa8, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x9f, 0xdb, 0xa8, 0x62, 0x25, 0x26, 0xbf, 0xb8, 0x6d, 0x44, 0x00, 0x00, 0x00, 0x90, 0x72, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x80, 0x0a, 0xf1, 0x24, 0x51, 0x42, 0x52, 0x29, 0x80, 0x04, 0x00, 0x00, 0xa2, 0xe6, 0x08, 0x82, 0x62, 0x44, 0x89, 0x92, 0x24, 0x16, 0x5d, 0x03, 0x01, 0x67, 0x09, 0x0b, 0x20, 0x49, 0x3e, 0x03, 0x4c, 0x11, 0x72, 0xf9, 0xc5, 0xe2, 0x00, 0x93, 0x8f, 0xfb, 0x38, 0x0a, 0x84, 0xe3, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x7f, 0x89, 0x68, 0x22, 0x2e, 0xf6, 0x00, 0x06, 0x22, 0xe2, 0x9c, 0x46, 0x9a, 0x80, 0x66, 0x92, 0x90, 0xa0, 0x69, 0xc3, 0x08, 0x02, 0x70, 0x99, 0x34, 0x45, 0x94, 0x30, 0xf9, 0x2f, 0x11, 0x4d, 0xc4, 0xc5, 0x1e, 0xc0, 0x40, 0x44, 0x28, 0x35, 0x3d, 0xd4, 0x84, 0x86, 0x80, 0x0b, 0x86, 0x11, 0x06, 0xe0, 0x30, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x78, 0x5c, 0x70, 0x09, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x2d, 0x1d, 0x12, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x52, 0x00, 0xc0, 0x90, 0xe7, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0xcf, 0x02, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x06, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x12, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x5c, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00, 0x19, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x52, 0x0a, 0xa1, 0x08, 0xca, 0x80, 0x92, 0x12, 0x18, 0x01, 0x28, 0x86, 0x02, 0x14, 0x28, 0x82, 0x42, 0x28, 0x83, 0x72, 0x28, 0x89, 0x02, 0x0c, 0x28, 0xb0, 0x02, 0x29, 0xa0, 0xf2, 0x28, 0x8c, 0xd2, 0x0d, 0x28, 0x0a, 0x52, 0x4a, 0x62, 0x04, 0x80, 0x8a, 0x19, 0x00, 0x22, 0x66, 0x00, 0x68, 0x98, 0x01, 0xa0, 0x6d, 0x06, 0x80, 0xba, 0x19, 0x00, 0xfa, 0x66, 0x00, 0x08, 0x9c, 0x01, 0xa0, 0x70, 0x2c, 0x87, 0x61, 0x9e, 0xe7, 0x01, 0x20, 0x30, 0x00, 0x00, 0x10, 0x01, 0x21, 0x10, 0x0c, 0x40, 0x50, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x44, 0x99, 0x20, 0x24, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0xc1, 0x6e, 0x6e, 0x82, 0x90, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x45, 0xc7, 0x64, 0xe8, 0xcd, 0x6d, 0x8e, 0x2e, 0xcc, 0x8d, 0x6e, 0x6e, 0x82, 0x90, 0x34, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x6c, 0x60, 0xc0, 0xa2, 0xed, 0x8d, 0xac, 0x8c, 0x6d, 0x82, 0x90, 0x38, 0x13, 0x84, 0xe4, 0xd9, 0x30, 0x4c, 0xd3, 0x30, 0x41, 0x48, 0xa0, 0x09, 0x42, 0x12, 0x4d, 0x10, 0x12, 0x69, 0x03, 0x82, 0x44, 0x12, 0x55, 0x11, 0xd6, 0xc5, 0x08, 0x4e, 0xee, 0x4d, 0xad, 0x6c, 0x8c, 0x2e, 0xed, 0xcd, 0x2d, 0xc8, 0x8d, 0xcc, 0x2a, 0xad, 0xec, 0x6e, 0x82, 0x90, 0x4c, 0x1b, 0x10, 0x24, 0x93, 0xa8, 0x4a, 0xb3, 0xae, 0x0d, 0x03, 0x83, 0x6d, 0x13, 0x84, 0x2e, 0x0c, 0x26, 0x08, 0x09, 0xc5, 0x01, 0xee, 0x6d, 0x8e, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xd3, 0x54, 0x12, 0x55, 0xd2, 0x93, 0xd3, 0x06, 0x04, 0xf9, 0x2a, 0x62, 0x02, 0x03, 0xeb, 0xe2, 0x40, 0x57, 0x86, 0x37, 0x41, 0x48, 0x2a, 0x26, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x1b, 0x10, 0x44, 0x0c, 0xaa, 0x31, 0x98, 0xc8, 0xc0, 0xba, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x12, 0x8b, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0x31, 0x83, 0xea, 0x0c, 0x26, 0x34, 0xb0, 0xae, 0x0d, 0x84, 0x17, 0x06, 0x65, 0x90, 0x06, 0x13, 0x84, 0x4f, 0x0c, 0x88, 0x40, 0x3d, 0x4d, 0x25, 0x51, 0x25, 0x3d, 0x39, 0x6d, 0x40, 0x90, 0xaf, 0x22, 0x26, 0x36, 0xb0, 0xae, 0x0d, 0x84, 0xd7, 0x06, 0x65, 0x90, 0x06, 0x13, 0x04, 0x30, 0x18, 0x83, 0x0d, 0x04, 0xb2, 0x54, 0xc4, 0x06, 0x81, 0x81, 0x83, 0x09, 0xc2, 0xf0, 0x4d, 0x10, 0x08, 0x6f, 0x43, 0x43, 0x40, 0x5c, 0xa7, 0x06, 0x6b, 0xe0, 0x06, 0x6f, 0x10, 0x07, 0x72, 0xc0, 0xcd, 0x41, 0x1c, 0x4c, 0x10, 0x90, 0x60, 0x03, 0xb0, 0x61, 0x20, 0xec, 0xc0, 0x0e, 0x36, 0x04, 0x77, 0xb0, 0x61, 0x18, 0xea, 0x00, 0x0f, 0x26, 0x08, 0x61, 0x40, 0x06, 0x1b, 0x02, 0x3d, 0xe0, 0xd1, 0x16, 0x96, 0xe6, 0x96, 0x55, 0x65, 0x35, 0x41, 0x50, 0xb6, 0x09, 0x82, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0x82, 0x92, 0x6c, 0x10, 0x2a, 0x6b, 0xc3, 0x42, 0xb0, 0x41, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x00, 0x0a, 0x84, 0x1f, 0x84, 0x02, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x82, 0x82, 0x6c, 0x10, 0xaa, 0x6a, 0xc3, 0x32, 0x8c, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x40, 0x0a, 0x83, 0x1f, 0x94, 0x02, 0x8b, 0xa1, 0x27, 0xa6, 0x27, 0xa9, 0x09, 0x82, 0x72, 0x4c, 0x10, 0x92, 0x6b, 0x83, 0x50, 0xa5, 0xc2, 0x86, 0x45, 0x3a, 0x85, 0x3e, 0xf0, 0x83, 0x3f, 0xf0, 0x83, 0x01, 0x15, 0x24, 0x3f, 0x50, 0x85, 0x0d, 0x83, 0x28, 0x98, 0xc2, 0x2a, 0x70, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0xdb, 0xb0, 0x10, 0xad, 0xd0, 0x07, 0xa0, 0xf0, 0x07, 0xa8, 0x30, 0xa0, 0x02, 0xe1, 0x07, 0xaa, 0xb0, 0x61, 0x19, 0x46, 0xa1, 0x0f, 0xfc, 0xe0, 0x0f, 0x48, 0x61, 0x20, 0x85, 0xc1, 0x0f, 0x4a, 0x61, 0xc3, 0x22, 0x9d, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0x90, 0xc2, 0x80, 0x0a, 0x92, 0x1f, 0xa8, 0xc2, 0x86, 0xc1, 0x15, 0x5e, 0x01, 0x16, 0x36, 0x0c, 0xac, 0x10, 0x0b, 0xc0, 0x86, 0xa2, 0x0e, 0xf8, 0x40, 0x16, 0x1e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0xdc, 0x04, 0x21, 0xc1, 0x58, 0xa4, 0xb9, 0xcd, 0xd1, 0xcd, 0x4d, 0x10, 0x92, 0x8c, 0xc6, 0x5c, 0xda, 0xd9, 0x17, 0x1b, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0xaf, 0x39, 0xba, 0x09, 0x42, 0xa2, 0x6d, 0x40, 0x68, 0xa1, 0x16, 0x6c, 0xe1, 0x16, 0x70, 0xe1, 0xca, 0x05, 0x5d, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x82, 0xa2, 0x0e, 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x00, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0x70, 0x2a, 0x91, 0xe1, 0xb9, 0xd0, 0xe5, 0xc1, 0x95, 0x05, 0xb9, 0xb9, 0xbd, 0xd1, 0x85, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x11, 0xe6, 0x00, 0x0f, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xf4, 0xa0, 0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0x40, 0x16, 0xba, 0x90, 0xe1, 0xb9, 0x8c, 0xbd, 0xd5, 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0x74, 0x01, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x71, 0x4e, 0x23, 0x4d, 0x40, 0x33, 0x49, 0xff, 0x42, 0x18, 0x80, 0x80, 0x19, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x5f, 0xdc, 0xb6, 0x19, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0x61, 0x02, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0x44, 0x44, 0x13, 0x02, 0x44, 0x98, 0x5f, 0xdc, 0xb6, 0x05, 0x1c, 0x0c, 0x80, 0x34, 0xb2, 0xfb, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x37, 0x12, 0xc2, 0x76, 0x04, 0xc6, 0xc0, 0xad, 0xe5, 0xc2, 0x1e, 0x4d, 0x70, 0xa6, 0x71, 0x44, 0x58, 0x49, 0x4c, 0x20, 0x09, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x48, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x09, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x3f, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x6c, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f, 0xc2, 0x1e, 0x42, 0xf2, 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, 0xad, 0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43, 0x12, 0xd4, 0x83, 0x83, 0xe1, 0xf2, 0x81, 0x05, 0x31, 0x1a, 0x86, 0x68, 0x26, 0x7f, 0x21, 0x0c, 0x40, 0xc0, 0x7c, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0x38, 0xa7, 0x91, 0x26, 0xa0, 0x99, 0x24, 0x24, 0x58, 0x7b, 0xdd, 0x70, 0xf9, 0xc0, 0x82, 0x18, 0x0d, 0x43, 0x34, 0x93, 0xbf, 0x10, 0x06, 0x20, 0x60, 0x3e, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x4b, 0x38, 0x1d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x05, 0x28, 0x50, 0x06, 0xe5, 0x50, 0x04, 0xe5, 0x41, 0xa5, 0x24, 0x46, 0x00, 0xca, 0xa0, 0x08, 0x0a, 0x81, 0xf2, 0x0c, 0x00, 0xe9, 0xb1, 0x1c, 0x86, 0x79, 0x9e, 0x07, 0x80, 0xc0, 0x00, 0x00, 0x40, 0x04, 0x84, 0x40, 0x30, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x76, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd9, 0x44, 0x60, 0x82, 0x40, 0x24, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x68, 0xd4, 0x86, 0x00, 0x9a, 0x20, 0x08, 0x00, 0x8f, 0xb6, 0xb0, 0x34, 0xb7, 0xac, 0x2a, 0x2b, 0x22, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x13, 0x84, 0xc2, 0x99, 0x20, 0x14, 0xcf, 0x86, 0x80, 0x98, 0x20, 0x14, 0xd0, 0x04, 0x81, 0x50, 0x26, 0x08, 0xc4, 0xb2, 0x41, 0xc8, 0xb4, 0x0d, 0x0b, 0x41, 0x55, 0xd6, 0x65, 0x0d, 0x18, 0x61, 0x6d, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0xb4, 0x41, 0xc8, 0xb2, 0x0d, 0xcb, 0xd0, 0x55, 0xd6, 0x65, 0x0d, 0xde, 0x60, 0x7d, 0x13, 0x04, 0x82, 0x61, 0x31, 0xf4, 0xc4, 0xf4, 0x24, 0x35, 0x41, 0x28, 0xa4, 0x09, 0x02, 0xd1, 0x6c, 0x10, 0x32, 0x32, 0xd8, 0xb0, 0x84, 0x81, 0x18, 0x54, 0xd6, 0x65, 0x0d, 0x63, 0x10, 0x06, 0x56, 0x19, 0x6c, 0x18, 0x38, 0x30, 0x30, 0x03, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1b, 0x16, 0x02, 0x0d, 0x2a, 0xec, 0x1a, 0x83, 0x61, 0x0c, 0x08, 0xab, 0x0c, 0x36, 0x2c, 0x43, 0x57, 0x59, 0x97, 0x37, 0x78, 0x83, 0xf5, 0x6d, 0x58, 0xc2, 0x40, 0x0c, 0x2a, 0xeb, 0xf2, 0x86, 0x31, 0x08, 0x03, 0xab, 0x0c, 0x36, 0x0c, 0x69, 0xa0, 0x06, 0x6b, 0xb0, 0x61, 0x38, 0x03, 0x36, 0x00, 0x36, 0x14, 0xd2, 0xd4, 0x06, 0x0f, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x46, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xe0, 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0x40, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x36, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x11, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x11, 0xd1, 0x84, 0x00, 0x11, 0xe6, 0x17, 0xb7, 0x6d, 0x00, 0x07, 0x03, 0x20, 0x8d, 0xec, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x44, 0x8a, 0xab, 0x14, 0x0a, 0x61, 0x06, 0xa0, 0xec, 0x4a, 0x8e, 0x4a, 0x09, 0x50, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x61, 0x03, 0x63, 0x59, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0xdd, 0x21, 0x5d, 0x8f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x87, 0x4c, 0x18, 0x71, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x25, 0x54, 0xf6, 0x20, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x80, 0x81, 0x52, 0x69, 0x51, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x18, 0x2c, 0xdc, 0x36, 0x29, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x88, 0x01, 0xd3, 0x71, 0xc8, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x18, 0x34, 0x5d, 0x57, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x90, 0x81, 0xe3, 0x79, 0x4a, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x19, 0x3c, 0xdf, 0x57, 0x39, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0x90, 0x81, 0xa3, 0x80, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x69, 0x30, 0x3d, 0x66, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x8d, 0x1b, 0x60, 0x54, 0x19, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x33, 0x07, 0x5d, 0xc6, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x36, 0x5d, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x07, 0x0f, 0xce, 0xe0, 0x7a, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xf2, 0x00, 0x0d, 0xae, 0x25, 0xb0, 0xe0, 0x80, 0x8e, 0x59, 0x9b, 0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0xe1, 0x83, 0x35, 0xd8, 0xa4, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3e, 0x60, 0x83, 0xcd, 0x09, 0x2c, 0x50, 0xa0, 0x63, 0xd9, 0x27, 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x40, 0xe1, 0x0d, 0xbe, 0x2a, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x27, 0x14, 0xe0, 0xe0, 0x8b, 0x02, 0x0b, 0x1a, 0xe8, 0x18, 0x37, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x14, 0xe6, 0x60, 0x0c, 0xb0, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x52, 0xa0, 0x83, 0x31, 0xa0, 0x02, 0x0b, 0x20, 0xe8, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x83, 0x0a, 0x72, 0xe0, 0x06, 0x74, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x2b, 0xdc, 0xc1, 0x1c, 0xe8, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0xb2, 0xc0, 0x07, 0x78, 0xd0, 0x0a, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0xdc, 0x42, 0x28, 0xf4, 0xc1, 0x2b, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0xd8, 0x14, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x17, 0x56, 0xc1, 0x7b, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x7a, 0x81, 0x15, 0xb6, 0x25, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x17, 0x5a, 0x01, 0x3b, 0x02, 0xb3, 0xca, 0x40, 0x3e, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xf0, 0x80, 0xc3, 0x2b, 0x88, 0x81, 0x14, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x13, 0x0e, 0xb0, 0xf0, 0x39, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xe2, 0x10, 0x0b, 0x9c, 0x12, 0x58, 0x96, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x1c, 0x66, 0xc1, 0x0c, 0xaa, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x72, 0xa0, 0x85, 0x31, 0x88, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xcc, 0xa1, 0x16, 0xc0, 0xa0, 0x09, 0x8c, 0x6b, 0x03, 0xf9, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x83, 0x0e, 0xb7, 0xa0, 0x06, 0x58, 0x30, 0x62, 0x80, 0x00, 0x20, 0x08, 0x06, 0x4f, 0x3a, 0xe0, 0xc2, 0x19, 0x50, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xea, 0x90, 0x0b, 0x64, 0x00, 0x05, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0x80, 0x43, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0x03, 0x2d, 0x24, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0xf8, 0x42, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0xc3, 0x2f, 0x04, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa4, 0x03, 0x3a, 0x80, 0x43, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x90, 0x0e, 0xe8, 0x40, 0x0b, 0xac, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0xc2, 0x38, 0xa0, 0x03, 0x38, 0xc4, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xed, 0x90, 0x0b, 0xe3, 0x80, 0x0e, 0xb4, 0x00, 0x0b, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0x8c, 0x03, 0x3a, 0xf8, 0xc2, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x30, 0x0e, 0xe8, 0xf0, 0x0b, 0xae, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 }; static unsigned char D3D12_VertexShader_NV[] = { 0x44, 0x58, 0x42, 0x43, 0x52, 0x51, 0xf4, 0x61, 0xe0, 0x16, 0x3e, 0xc4, 0xd9, 0x83, 0xc5, 0x7a, 0x0a, 0xa7, 0x7f, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x63, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x63, 0x01, 0x00, 0x00, 0x73, 0x02, 0x00, 0x00, 0x2f, 0x03, 0x00, 0x00, 0x27, 0x0b, 0x00, 0x00, 0x43, 0x0b, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x53, 0x56, 0x30, 0x08, 0x01, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x42, 0x00, 0x03, 0x02, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x53, 0x54, 0x41, 0x54, 0xf0, 0x07, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xd8, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xf3, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x0c, 0xc0, 0x30, 0x02, 0x01, 0x24, 0x41, 0x70, 0x70, 0x30, 0x5c, 0x3e, 0xb0, 0x20, 0x46, 0xc3, 0x10, 0xcd, 0xe4, 0x2f, 0x84, 0x01, 0x08, 0x98, 0x2f, 0x4d, 0x11, 0x25, 0x4c, 0xfe, 0x4b, 0x44, 0x13, 0x71, 0xb1, 0x07, 0x30, 0x10, 0x11, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x04, 0x41, 0xb8, 0x6e, 0xb8, 0x7c, 0x60, 0x41, 0x8c, 0x86, 0x21, 0x9a, 0xc9, 0x5f, 0x08, 0x03, 0x10, 0x30, 0x9f, 0x73, 0x1a, 0x69, 0x02, 0x9a, 0x49, 0x42, 0xc1, 0x40, 0xc4, 0x08, 0x40, 0x09, 0x0c, 0x3a, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0x06, 0x90, 0x24, 0x89, 0x92, 0xd0, 0x52, 0x0c, 0x23, 0x49, 0x12, 0x05, 0xa0, 0xe6, 0xa8, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x9f, 0xdb, 0xa8, 0x62, 0x25, 0x26, 0xbf, 0xb8, 0x6d, 0x44, 0x00, 0x00, 0x00, 0x90, 0x72, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x80, 0x0a, 0xf1, 0x24, 0x51, 0x42, 0x52, 0x29, 0x80, 0x04, 0x00, 0x00, 0xa2, 0xe6, 0x08, 0x82, 0x62, 0x44, 0x89, 0x92, 0x24, 0x16, 0x5d, 0x03, 0x01, 0x67, 0x09, 0x0b, 0x20, 0x49, 0x3e, 0x03, 0x4c, 0x11, 0x72, 0xf9, 0xc5, 0xe2, 0x00, 0x93, 0x8f, 0xfb, 0x38, 0x0a, 0x84, 0xe3, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x7f, 0x89, 0x68, 0x22, 0x2e, 0xf6, 0x00, 0x06, 0x22, 0xe2, 0x9c, 0x46, 0x9a, 0x80, 0x66, 0x92, 0x90, 0xa0, 0x69, 0xc3, 0x08, 0x02, 0x70, 0x99, 0x34, 0x45, 0x94, 0x30, 0xf9, 0x2f, 0x11, 0x4d, 0xc4, 0xc5, 0x1e, 0xc0, 0x40, 0x44, 0x28, 0x35, 0x3d, 0xd4, 0x84, 0x86, 0x80, 0x0b, 0x86, 0x11, 0x06, 0xe0, 0x30, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0xc4, 0xe6, 0xa1, 0x26, 0x34, 0x78, 0x5c, 0x70, 0x09, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x2d, 0x1d, 0x12, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x64, 0x90, 0x21, 0x23, 0x25, 0x40, 0x00, 0x52, 0x00, 0xc0, 0x90, 0xe7, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0xcf, 0x02, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x06, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x12, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x5c, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00, 0x19, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x52, 0x0a, 0xa1, 0x08, 0xca, 0x80, 0x92, 0x12, 0x18, 0x01, 0x28, 0x86, 0x02, 0x14, 0x28, 0x82, 0x42, 0x28, 0x83, 0x72, 0x28, 0x89, 0x02, 0x0c, 0x28, 0xb0, 0x02, 0x29, 0xa0, 0xf2, 0x28, 0x8c, 0xd2, 0x0d, 0x28, 0x0a, 0x52, 0x4a, 0x62, 0x04, 0x80, 0x8a, 0x19, 0x00, 0x22, 0x66, 0x00, 0x68, 0x98, 0x01, 0xa0, 0x6d, 0x06, 0x80, 0xba, 0x19, 0x00, 0xfa, 0x66, 0x00, 0x08, 0x9c, 0x01, 0xa0, 0x70, 0x2c, 0x87, 0x61, 0x9e, 0xe7, 0x01, 0x20, 0x30, 0x00, 0x00, 0x10, 0x01, 0x21, 0x10, 0x0c, 0x40, 0x50, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x44, 0x99, 0x20, 0x24, 0xcb, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0xc1, 0x6e, 0x6e, 0x82, 0x90, 0x30, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x45, 0xc7, 0x64, 0xe8, 0xcd, 0x6d, 0x8e, 0x2e, 0xcc, 0x8d, 0x6e, 0x6e, 0x82, 0x90, 0x34, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x6c, 0x60, 0xc0, 0xa2, 0xed, 0x8d, 0xac, 0x8c, 0x6d, 0x82, 0x90, 0x38, 0x13, 0x84, 0xe4, 0xd9, 0x30, 0x4c, 0xd3, 0x30, 0x41, 0x48, 0xa0, 0x09, 0x42, 0x12, 0x4d, 0x10, 0x12, 0x69, 0x03, 0x82, 0x44, 0x12, 0x55, 0x11, 0xd6, 0xc5, 0x08, 0x4e, 0xee, 0x4d, 0xad, 0x6c, 0x8c, 0x2e, 0xed, 0xcd, 0x2d, 0xc8, 0x8d, 0xcc, 0x2a, 0xad, 0xec, 0x6e, 0x82, 0x90, 0x4c, 0x1b, 0x10, 0x24, 0x93, 0xa8, 0x4a, 0xb3, 0xae, 0x0d, 0x03, 0x83, 0x6d, 0x13, 0x84, 0x2e, 0x0c, 0x26, 0x08, 0x09, 0xc5, 0x01, 0xee, 0x6d, 0x8e, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xd3, 0x54, 0x12, 0x55, 0xd2, 0x93, 0xd3, 0x06, 0x04, 0xf9, 0x2a, 0x62, 0x02, 0x03, 0xeb, 0xe2, 0x40, 0x57, 0x86, 0x37, 0x41, 0x48, 0x2a, 0x26, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x1b, 0x10, 0x44, 0x0c, 0xaa, 0x31, 0x98, 0xc8, 0xc0, 0xba, 0x58, 0x8c, 0xbd, 0xb1, 0xbd, 0xc9, 0x4d, 0x10, 0x12, 0x8b, 0xc6, 0xd0, 0x13, 0xd3, 0x93, 0x14, 0xcc, 0x06, 0x04, 0x31, 0x83, 0xea, 0x0c, 0x26, 0x34, 0xb0, 0xae, 0x0d, 0x84, 0x17, 0x06, 0x65, 0x90, 0x06, 0x13, 0x84, 0x4f, 0x0c, 0x88, 0x40, 0x3d, 0x4d, 0x25, 0x51, 0x25, 0x3d, 0x39, 0x6d, 0x40, 0x90, 0xaf, 0x22, 0x26, 0x36, 0xb0, 0xae, 0x0d, 0x84, 0xd7, 0x06, 0x65, 0x90, 0x06, 0x13, 0x04, 0x30, 0x18, 0x83, 0x0d, 0x04, 0xb2, 0x54, 0xc4, 0x06, 0x81, 0x81, 0x83, 0x09, 0xc2, 0xf0, 0x4d, 0x10, 0x08, 0x6f, 0x43, 0x43, 0x40, 0x5c, 0xa7, 0x06, 0x6b, 0xe0, 0x06, 0x6f, 0x10, 0x07, 0x72, 0xc0, 0xcd, 0x41, 0x1c, 0x4c, 0x10, 0x90, 0x60, 0x03, 0xb0, 0x61, 0x20, 0xec, 0xc0, 0x0e, 0x36, 0x04, 0x77, 0xb0, 0x61, 0x18, 0xea, 0x00, 0x0f, 0x26, 0x08, 0x61, 0x40, 0x06, 0x1b, 0x02, 0x3d, 0xa0, 0xd1, 0x16, 0x96, 0xe6, 0xe6, 0x64, 0x35, 0x41, 0x50, 0xb6, 0x09, 0x82, 0xc2, 0x6d, 0x08, 0x88, 0x09, 0x82, 0x92, 0x6c, 0x10, 0x2a, 0x6b, 0xc3, 0x42, 0xb0, 0x41, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x00, 0x0a, 0x84, 0x1f, 0x84, 0x02, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x82, 0x82, 0x6c, 0x10, 0xaa, 0x6a, 0xc3, 0x32, 0x8c, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0xf8, 0xc1, 0x40, 0x0a, 0x83, 0x1f, 0x94, 0x02, 0x8b, 0xa1, 0x27, 0xa6, 0x27, 0xa9, 0x09, 0x82, 0x72, 0x4c, 0x10, 0x92, 0x6b, 0x83, 0x50, 0xa5, 0xc2, 0x86, 0x45, 0x3a, 0x85, 0x3e, 0xf0, 0x83, 0x3f, 0xf0, 0x83, 0x01, 0x15, 0x24, 0x3f, 0x50, 0x85, 0x0d, 0x83, 0x28, 0x98, 0xc2, 0x2a, 0x70, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0xdb, 0xb0, 0x10, 0xad, 0xd0, 0x07, 0xa0, 0xf0, 0x07, 0xa8, 0x30, 0xa0, 0x02, 0xe1, 0x07, 0xaa, 0xb0, 0x61, 0x19, 0x46, 0xa1, 0x0f, 0xfc, 0xe0, 0x0f, 0x48, 0x61, 0x20, 0x85, 0xc1, 0x0f, 0x4a, 0x61, 0xc3, 0x22, 0x9d, 0x42, 0x1f, 0xf8, 0xc1, 0x1f, 0x90, 0xc2, 0x80, 0x0a, 0x92, 0x1f, 0xa8, 0xc2, 0x86, 0xc1, 0x15, 0x5e, 0x01, 0x16, 0x36, 0x0c, 0xac, 0x10, 0x0b, 0xc0, 0x86, 0xa2, 0x0e, 0xf8, 0x40, 0x16, 0x1e, 0x80, 0x86, 0x19, 0xdb, 0x5b, 0x18, 0xdd, 0xdc, 0x04, 0x21, 0xc1, 0x58, 0xa4, 0xb9, 0xcd, 0xd1, 0xcd, 0x4d, 0x10, 0x92, 0x8c, 0xc6, 0x5c, 0xda, 0xd9, 0x17, 0x1b, 0x19, 0x8d, 0xb9, 0xb4, 0xb3, 0xaf, 0x39, 0xba, 0x09, 0x42, 0xa2, 0x6d, 0x40, 0x68, 0xa1, 0x16, 0x6c, 0xe1, 0x16, 0x70, 0xe1, 0xca, 0x05, 0x5d, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x82, 0xa2, 0x0e, 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x00, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0x70, 0x2a, 0x91, 0xe1, 0xb9, 0xd0, 0xe5, 0xc1, 0x95, 0x05, 0xb9, 0xb9, 0xbd, 0xd1, 0x85, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x11, 0xe6, 0x00, 0x0f, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xf4, 0xa0, 0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0x40, 0x16, 0xba, 0x90, 0xe1, 0xb9, 0x8c, 0xbd, 0xd5, 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0x74, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x71, 0x4e, 0x23, 0x4d, 0x40, 0x33, 0x49, 0xff, 0x42, 0x18, 0x80, 0x80, 0x19, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x5f, 0xdc, 0xb6, 0x19, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0x61, 0x02, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x56, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0x44, 0x44, 0x13, 0x02, 0x44, 0x98, 0x5f, 0xdc, 0xb6, 0x05, 0x18, 0x0c, 0x80, 0x34, 0xe7, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x7e, 0xdd, 0xd9, 0x5c, 0x85, 0x79, 0x2c, 0xb5, 0xd6, 0x2b, 0x4f, 0x5a, 0xb5, 0xd4, 0xd5, 0x44, 0x58, 0x49, 0x4c, 0x18, 0x09, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x46, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x3d, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x6c, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f, 0xc2, 0x1e, 0x42, 0xf2, 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, 0xad, 0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43, 0x12, 0xd4, 0x83, 0x83, 0xe1, 0xf2, 0x81, 0x05, 0x31, 0x1a, 0x86, 0x68, 0x26, 0x7f, 0x21, 0x0c, 0x40, 0xc0, 0x7c, 0x69, 0x8a, 0x28, 0x61, 0xf2, 0x5f, 0x22, 0x9a, 0x88, 0x8b, 0x3d, 0x80, 0x81, 0x88, 0x38, 0xa7, 0x91, 0x26, 0xa0, 0x99, 0x24, 0x24, 0x58, 0x7b, 0xdd, 0x70, 0xf9, 0xc0, 0x82, 0x18, 0x0d, 0x43, 0x34, 0x93, 0xbf, 0x10, 0x06, 0x20, 0x60, 0x3e, 0xe7, 0x34, 0xd2, 0x04, 0x34, 0x93, 0x84, 0x82, 0x4b, 0x38, 0x1d, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c, 0x05, 0x28, 0x50, 0x06, 0xe5, 0x50, 0x04, 0xe5, 0x41, 0xa5, 0x24, 0x46, 0x00, 0xca, 0xa0, 0x08, 0x0a, 0x81, 0xf2, 0x0c, 0x00, 0xe9, 0xb1, 0x1c, 0x86, 0x79, 0x9e, 0x07, 0x80, 0xc0, 0x00, 0x00, 0x40, 0x04, 0x84, 0x40, 0x30, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10, 0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x76, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xd9, 0x44, 0x60, 0x82, 0x40, 0x24, 0x1b, 0x10, 0x42, 0x59, 0x08, 0x62, 0x60, 0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x68, 0xd4, 0x86, 0x00, 0x9a, 0x20, 0x08, 0x00, 0x8d, 0xb6, 0xb0, 0x34, 0x37, 0x27, 0x2b, 0x22, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x13, 0x84, 0xc2, 0x99, 0x20, 0x14, 0xcf, 0x86, 0x80, 0x98, 0x20, 0x14, 0xd0, 0x04, 0x81, 0x50, 0x26, 0x08, 0xc4, 0xb2, 0x41, 0xc8, 0xb4, 0x0d, 0x0b, 0x41, 0x55, 0xd6, 0x65, 0x0d, 0x18, 0x61, 0x6d, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x45, 0xb4, 0x41, 0xc8, 0xb2, 0x0d, 0xcb, 0xd0, 0x55, 0xd6, 0x65, 0x0d, 0xde, 0x60, 0x7d, 0x13, 0x04, 0x82, 0x61, 0x31, 0xf4, 0xc4, 0xf4, 0x24, 0x35, 0x41, 0x28, 0xa4, 0x09, 0x02, 0xd1, 0x6c, 0x10, 0x32, 0x32, 0xd8, 0xb0, 0x84, 0x81, 0x18, 0x54, 0xd6, 0x65, 0x0d, 0x63, 0x10, 0x06, 0x56, 0x19, 0x6c, 0x18, 0x38, 0x30, 0x30, 0x03, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1b, 0x16, 0x02, 0x0d, 0x2a, 0xec, 0x1a, 0x83, 0x61, 0x0c, 0x08, 0xab, 0x0c, 0x36, 0x2c, 0x43, 0x57, 0x59, 0x97, 0x37, 0x78, 0x83, 0xf5, 0x6d, 0x58, 0xc2, 0x40, 0x0c, 0x2a, 0xeb, 0xf2, 0x86, 0x31, 0x08, 0x03, 0xab, 0x0c, 0x36, 0x0c, 0x69, 0xa0, 0x06, 0x6b, 0xb0, 0x61, 0x38, 0x03, 0x36, 0x00, 0x36, 0x14, 0xd2, 0xd4, 0x06, 0x0f, 0x50, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x46, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xe0, 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0x40, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x6d, 0x00, 0x79, 0x18, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f, 0xdc, 0xb6, 0x11, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x3f, 0x11, 0xd1, 0x84, 0x00, 0x11, 0xe6, 0x17, 0xb7, 0x6d, 0x00, 0x06, 0x03, 0x20, 0xcd, 0xf9, 0x02, 0x61, 0x20, 0x00, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x44, 0x8a, 0xab, 0x14, 0x0a, 0x61, 0x06, 0xa0, 0xec, 0x4a, 0x8e, 0x4a, 0x09, 0x50, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x61, 0x03, 0x63, 0x59, 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0xdd, 0x21, 0x5d, 0x8f, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x87, 0x4c, 0x18, 0x71, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0xf1, 0x25, 0x54, 0xf6, 0x20, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x80, 0x81, 0x52, 0x69, 0x51, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x18, 0x2c, 0xdc, 0x36, 0x29, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x88, 0x01, 0xd3, 0x71, 0xc8, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x18, 0x34, 0x5d, 0x57, 0x31, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x90, 0x81, 0xe3, 0x79, 0x4a, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x19, 0x3c, 0xdf, 0x57, 0x39, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0x90, 0x81, 0xa3, 0x80, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0x69, 0x30, 0x3d, 0x66, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x8d, 0x1b, 0x60, 0x54, 0x19, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x33, 0x07, 0x5d, 0xc6, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x36, 0x5d, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x07, 0x0f, 0xce, 0xe0, 0x7a, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xf2, 0x00, 0x0d, 0xae, 0x25, 0xb0, 0xe0, 0x80, 0x8e, 0x59, 0x9b, 0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0xe1, 0x83, 0x35, 0xd8, 0xa4, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3e, 0x60, 0x83, 0xcd, 0x09, 0x2c, 0x50, 0xa0, 0x63, 0xd9, 0x27, 0x9f, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x40, 0xe1, 0x0d, 0xbe, 0x2a, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x27, 0x14, 0xe0, 0xe0, 0x8b, 0x02, 0x0b, 0x1a, 0xe8, 0x18, 0x37, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x14, 0xe6, 0x60, 0x0c, 0xb0, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x52, 0xa0, 0x83, 0x31, 0xa0, 0x02, 0x0b, 0x20, 0xe8, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x83, 0x0a, 0x72, 0xe0, 0x06, 0x74, 0x30, 0x9a, 0x10, 0x00, 0xa3, 0x09, 0x42, 0x30, 0x9a, 0x30, 0x08, 0xa3, 0x09, 0xc4, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x4d, 0x2b, 0xdc, 0xc1, 0x1c, 0xe8, 0xc1, 0x68, 0x42, 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0xc3, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x34, 0xb2, 0xc0, 0x07, 0x78, 0xd0, 0x0a, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0xd0, 0xdc, 0x42, 0x28, 0xf4, 0xc1, 0x2b, 0x8c, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0xd8, 0x14, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x17, 0x56, 0xc1, 0x7b, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0x7a, 0x81, 0x15, 0xb6, 0x25, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0xc7, 0x17, 0x5a, 0x01, 0x3b, 0x02, 0xb3, 0xca, 0x40, 0x3e, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xf0, 0x80, 0xc3, 0x2b, 0x88, 0x81, 0x14, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x13, 0x0e, 0xb0, 0xf0, 0x39, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xe2, 0x10, 0x0b, 0x9c, 0x12, 0x58, 0x96, 0x06, 0xf2, 0x19, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x87, 0x1c, 0x66, 0xc1, 0x0c, 0xaa, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x72, 0xa0, 0x85, 0x31, 0x88, 0x82, 0x11, 0x03, 0x04, 0x00, 0x41, 0x30, 0x78, 0xcc, 0xa1, 0x16, 0xc0, 0xa0, 0x09, 0x8c, 0x6b, 0x03, 0xf9, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0xc1, 0x83, 0x0e, 0xb7, 0xa0, 0x06, 0x58, 0x30, 0x62, 0x80, 0x00, 0x20, 0x08, 0x06, 0x4f, 0x3a, 0xe0, 0xc2, 0x19, 0x50, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x3c, 0xea, 0x90, 0x0b, 0x64, 0x00, 0x05, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0x80, 0x43, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0x03, 0x2d, 0x24, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa0, 0x03, 0x3a, 0xf8, 0x42, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0x02, 0x3a, 0xa0, 0xc3, 0x2f, 0x04, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0xa4, 0x03, 0x3a, 0x80, 0x43, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x90, 0x0e, 0xe8, 0x40, 0x0b, 0xac, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x3b, 0xe4, 0xc2, 0x38, 0xa0, 0x03, 0x38, 0xc4, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xed, 0x90, 0x0b, 0xe3, 0x80, 0x0e, 0xb4, 0x00, 0x0b, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xb4, 0x43, 0x2e, 0x8c, 0x03, 0x3a, 0xf8, 0xc2, 0x2b, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xd2, 0x0e, 0xb9, 0x30, 0x0e, 0xe8, 0xf0, 0x0b, 0xae, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* Root signature blobs extracted from Vertex Shader dxc command line is: dxc -E <RS> -T rootsig_1_1 -rootsig-define <RS> -Fo <OUTFILE> D3D12_VertexShader.hlsl Variables: - <RS>: the root signature define - <OUTFILE>: the output file name. */ static unsigned char D3D12_RootSig_Color[] = { 0x44, 0x58, 0x42, 0x43, 0x16, 0xb1, 0xe2, 0x29, 0x64, 0xb1, 0xb2, 0xe8, 0x3c, 0xf7, 0xf6, 0x21, 0xad, 0x40, 0xa9, 0x50, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00 }; static unsigned char D3D12_RootSig_Texture[] = { 0x44, 0x58, 0x42, 0x43, 0x7a, 0x3c, 0xe5, 0xd1, 0x3c, 0x38, 0x44, 0x34, 0xda, 0xbc, 0x9b, 0xfc, 0xb3, 0xe7, 0x95, 0xaa, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff }; static unsigned char D3D12_RootSig_YUV[] = { 0x44, 0x58, 0x42, 0x43, 0x65, 0xa2, 0x64, 0x32, 0x6e, 0x35, 0x8d, 0x76, 0xf7, 0x54, 0x3c, 0x62, 0x2e, 0x8e, 0xa4, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff }; static unsigned char D3D12_RootSig_NV[] = { 0x44, 0x58, 0x42, 0x43, 0x22, 0xd8, 0x7c, 0x4d, 0xb5, 0x44, 0x4a, 0xcd, 0x25, 0xc2, 0x80, 0xac, 0x89, 0xb0, 0xa6, 0xfe, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0xb4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff }; static struct { const void *ps_shader_data; SIZE_T ps_shader_size; const void *vs_shader_data; SIZE_T vs_shader_size; D3D12_RootSignature root_sig; } D3D12_shaders[NUM_SHADERS] = { { D3D12_PixelShader_Colors, sizeof(D3D12_PixelShader_Colors), D3D12_VertexShader_Colors, sizeof(D3D12_VertexShader_Colors), ROOTSIG_COLOR }, { D3D12_PixelShader_Textures, sizeof(D3D12_PixelShader_Textures), D3D12_VertexShader_Textures, sizeof(D3D12_VertexShader_Textures), ROOTSIG_TEXTURE }, #if SDL_HAVE_YUV { D3D12_PixelShader_YUV_JPEG, sizeof(D3D12_PixelShader_YUV_JPEG), D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), ROOTSIG_YUV }, { D3D12_PixelShader_YUV_BT601, sizeof(D3D12_PixelShader_YUV_BT601), D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), ROOTSIG_YUV }, { D3D12_PixelShader_YUV_BT709, sizeof(D3D12_PixelShader_YUV_BT709), D3D12_VertexShader_YUV, sizeof(D3D12_VertexShader_YUV), ROOTSIG_YUV }, { D3D12_PixelShader_NV12_JPEG, sizeof(D3D12_PixelShader_NV12_JPEG), D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), ROOTSIG_NV }, { D3D12_PixelShader_NV12_BT601, sizeof(D3D12_PixelShader_NV12_BT601), D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), ROOTSIG_NV }, { D3D12_PixelShader_NV12_BT709, sizeof(D3D12_PixelShader_NV12_BT709), D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), ROOTSIG_NV }, { D3D12_PixelShader_NV21_JPEG, sizeof(D3D12_PixelShader_NV21_JPEG), D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), ROOTSIG_NV }, { D3D12_PixelShader_NV21_BT601, sizeof(D3D12_PixelShader_NV21_BT601), D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), ROOTSIG_NV }, { D3D12_PixelShader_NV21_BT709, sizeof(D3D12_PixelShader_NV21_BT709), D3D12_VertexShader_NV, sizeof(D3D12_VertexShader_NV), ROOTSIG_NV }, #endif }; static struct { const void *rs_shader_data; SIZE_T rs_shader_size; } D3D12_rootsigs[NUM_ROOTSIGS] = { { D3D12_RootSig_Color, sizeof(D3D12_RootSig_Color) }, { D3D12_RootSig_Texture, sizeof(D3D12_RootSig_Texture) }, #if SDL_HAVE_YUV { D3D12_RootSig_YUV, sizeof(D3D12_RootSig_YUV) }, { D3D12_RootSig_NV, sizeof(D3D12_RootSig_NV) }, #endif }; void D3D12_GetVertexShader(D3D12_Shader shader, D3D12_SHADER_BYTECODE *outBytecode) { outBytecode->pShaderBytecode = D3D12_shaders[shader].vs_shader_data; outBytecode->BytecodeLength = D3D12_shaders[shader].vs_shader_size; } void D3D12_GetPixelShader(D3D12_Shader shader, D3D12_SHADER_BYTECODE *outBytecode) { outBytecode->pShaderBytecode = D3D12_shaders[shader].ps_shader_data; outBytecode->BytecodeLength = D3D12_shaders[shader].ps_shader_size; } D3D12_RootSignature D3D12_GetRootSignatureType(D3D12_Shader shader) { return D3D12_shaders[shader].root_sig; } void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECODE *outBytecode) { outBytecode->pShaderBytecode = D3D12_rootsigs[rootSig].rs_shader_data; outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size; } #endif /* SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && !defined(__XBOXONE__) && !defined(__XBOXSERIES__) */