"use strict"; /* * This file contains OpenJPEG, compiled from C to JavaScript using Emscripten. * This file is released under OpenJPEG's license: * * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium * Copyright (c) 2002-2007, Professor Benoit Macq * Copyright (c) 2001-2003, David Janssens * Copyright (c) 2002-2003, Yannick Verschueren * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe * Copyright (c) 2005, Herve Drolon, FreeImage Team * 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. */ this.Module={}; var args=arguments,Runtime={stackAlloc:function(b){var f=STACKTOP;_memset(STACKTOP,0,b);STACKTOP+=b;STACKTOP=Math.ceil(STACKTOP/4)*4;return f},staticAlloc:function(b){var f=STATICTOP;STATICTOP+=b;STATICTOP=Math.ceil(STATICTOP/4)*4;return f},alignMemory:function(b,f){return Math.ceil(b/(f?f:4))*(f?f:4)},getFunctionIndex:function(b,f){var e=FUNCTION_TABLE.length;FUNCTION_TABLE[e]=b;FUNCTION_TABLE[e+1]=null;Module[f]=b;return e},isNumberType:function(b){return b in Runtime.INT_TYPES||b in Runtime.FLOAT_TYPES}, isPointerType:function(b){return pointingLevels(b)>0},isStructType:function(b){if(isPointerType(b))return false;if(RegExp(/^\[\d+\ x\ (.*)\]/g).test(b))return true;return!Runtime.isNumberType(b)&&b[0]=="%"},INT_TYPES:{i1:0,i8:0,i16:0,i32:0,i64:0},FLOAT_TYPES:{"float":0,"double":0},getNativeFieldSize:function(b,f){var e={_i1:1,_i8:1,_i16:2,_i32:4,_i64:8,_float:4,_double:8}["_"+b];e||(e=4);f||(e=Math.max(e,4));return e},dedup:function(b,f){var e={};return f?b.filter(function(c){if(e[c[f]])return false; return e[c[f]]=true}):b.filter(function(c){if(e[c])return false;return e[c]=true})},set:function(){for(var b=typeof arguments[0]==="object"?arguments[0]:arguments,f={},e=0;e=0&&f.push(c-e);return e=c});b.flatSize=Runtime.alignMemory(b.flatSize,b.alignSize);if(f.length==0)b.flatFactor=b.flatSize;else if(Runtime.dedup(f).length==1)b.flatFactor=f[0];b.needsFlattening=b.flatFactor!=1;return b.flatIndexes},__dummy__:0},CorrectionsMonitor={MAX_ALLOWED:0,corrections:0,sigs:{},note:function(b){b=b+"|"+Error().stack;if(!this.sigs[b]){print("Correction: "+ b);this.sigs[b]=0}this.sigs[b]++;this.corrections++;this.corrections>=this.MAX_ALLOWED&&abort("\n\nToo many corrections!")}};function __globalConstructor__(){}var FUNCTION_TABLE=[],__THREW__=false,__ATEXIT__=[],ABORT=false,undef=0;function abort(b){print(b+":\n"+Error().stack);ABORT=true;throw"Assertion: "+b;}function assert(b,f){b||abort("Assertion failed: "+f)}var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2; function Pointer_make(b,f,e){f=f?f:0;assert(f===0);if(b===HEAP)return f;f=b.length;var c;for(c=0;c0;){var b=__ATEXIT__.pop();if(typeof b==="number")b=FUNCTION_TABLE[b];b()}}function Array_copy(b,f){return HAS_TYPED_ARRAYS?Array.prototype.slice.call(IHEAP.subarray(b,b+f)):IHEAP.slice(b,b+f)}function String_len(b){for(var f=0;IHEAP[b+f];)f++;return f}function String_copy(b,f){var e=String_len(b);f&&e++;var c=Array_copy(b,e);if(f)c[e-1]=0;return c}var PRINTBUFFER=""; function __print__(b){if(b===null){print(PRINTBUFFER);PRINTBUFFER=""}else for(PRINTBUFFER+=b;(b=PRINTBUFFER.indexOf("\n"))!=-1;){print(PRINTBUFFER.substr(0,b));PRINTBUFFER=PRINTBUFFER.substr(b+1)}}function jrint(b,f){if(f)b+=" : ";else{f=b;b=""}print(b+JSON.stringify(f))}function intArrayFromString(b){for(var f=[],e=0;e=0)return b;return f<=32?2*Math.abs(1<=e)b=-2*e+b;return b} var $0___SIZE=128,$1___SIZE=16,$2___SIZE=40,$2___FLATTENER=[0,4,8,12,14,16,20,24,28,32,36],$struct__IO_FILE___SIZE=148,$struct__IO_FILE___FLATTENER=[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,70,71,72,76,84,88,92,96,100,104,108],$struct__IO_marker___SIZE=12,$struct___dirstream___SIZE=0,$struct___dirstream___FLATTENER=[],$struct___jmp_buf_tag___SIZE=156,$struct___jmp_buf_tag___FLATTENER=[0,24,28],$struct_anon___SIZE=16,$struct_anon___FLATTENER=[0,4,8,10,12],$struct_dircnt___SIZE=8,$struct_dirent___SIZE= 268,$struct_dirent___FLATTENER=[0,4,8,10,11],$struct_dwt_local___SIZE=16,$struct_img_folder___SIZE=12,$struct_img_folder___FLATTENER=[0,4,8,9],$struct_internal_state___SIZE=4,$struct_j2k_prog_order___SIZE=8,$struct_opj_bio___SIZE=20,$struct_opj_cinfo___SIZE=28,$struct_opj_cio___SIZE=28,$struct_opj_codestream_info___SIZE=92,$struct_opj_codestream_info___FLATTENER=[0,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88],$struct_opj_cp___SIZE=116,$struct_opj_cp___FLATTENER=[0,4,8,12,16,17,20, 24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112],$struct_opj_cparameters___SIZE=18692,$struct_opj_cparameters___FLATTENER=[0,4,8,12,16,20,24,28,32,36,40,44,48,4784,4788,4792,5192,5592,5596,5600,5604,5608,5612,5616,5620,5624,5756,5888,9984,14080,14084,18180,18184,18188,18192,18196,18200,18204,18208,18212,18276,18340,18404,18468,18532,18536,18540,18544,18548,18612,18676,18680,18684,18688,18689,18690],$struct_opj_dec_mstabent___SIZE=12,$struct_opj_dparameters___SIZE=8224,$struct_opj_dparameters___FLATTENER= [0,4,8,4104,8200,8204,8208,8212,8216,8220],$struct_opj_event_mgr___SIZE=12,$struct_opj_image___SIZE=36,$struct_opj_image_comp___SIZE=48,$struct_opj_image_comptparm___SIZE=36,$struct_opj_j2k___SIZE=76,$struct_opj_jp2___SIZE=80,$struct_opj_jp2_box___SIZE=12,$struct_opj_jp2_cdef___SIZE=8,$struct_opj_jp2_cdef_info___SIZE=6,$struct_opj_jp2_cmap_comp___SIZE=4,$struct_opj_jp2_cmap_comp___FLATTENER=[0,2,3],$struct_opj_jp2_color___SIZE=20,$struct_opj_jp2_pclr___SIZE=20,$struct_opj_jp2_pclr___FLATTENER=[0, 4,8,12,16,18],$struct_opj_jpt_msg_header___SIZE=28,$struct_opj_marker_info_t___SIZE=12,$struct_opj_mqc___SIZE=104,$struct_opj_mqc___FLATTENER=[0,4,8,12,16,20,24,100],$struct_opj_mqc_state___SIZE=16,$struct_opj_packet_info___SIZE=20,$struct_opj_pi_comp___SIZE=16,$struct_opj_pi_iterator___SIZE=232,$struct_opj_pi_iterator___FLATTENER=[0,4,8,12,16,20,24,28,32,36,40,44,192,196,200,204,208,212,216,220,224,228],$struct_opj_pi_resolution___SIZE=16,$struct_opj_poc___SIZE=148,$struct_opj_poc___FLATTENER=[0, 4,8,12,16,20,24,28,32,36,40,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],$struct_opj_raw___SIZE=28,$struct_opj_stepsize___SIZE=8,$struct_opj_t1___SIZE=40,$struct_opj_t2___SIZE=12,$struct_opj_tccp___SIZE=1076,$struct_opj_tccp___FLATTENER=[0,4,8,12,16,20,24,28,804,808,812,944],$struct_opj_tcd___SIZE=56,$struct_opj_tcd_band___SIZE=32,$struct_opj_tcd_cblk_dec___SIZE=44,$struct_opj_tcd_cblk_enc___SIZE=48,$struct_opj_tcd_image___SIZE=12,$struct_opj_tcd_layer___SIZE= 20,$struct_opj_tcd_layer___FLATTENER=[0,4,8,16],$struct_opj_tcd_pass___SIZE=20,$struct_opj_tcd_pass___FLATTENER=[0,4,12,16],$struct_opj_tcd_precinct___SIZE=36,$struct_opj_tcd_resolution___SIZE=124,$struct_opj_tcd_seg___SIZE=28,$struct_opj_tcd_tile___SIZE=840,$struct_opj_tcd_tile___FLATTENER=[0,4,8,12,16,20,24,28,36,836],$struct_opj_tcd_tilecomp___SIZE=32,$struct_opj_tcp___SIZE=5588,$struct_opj_tcp___FLATTENER=[0,4,8,12,16,20,420,424,428,5164,5168,5172,5176,5180,5184,5584],$struct_opj_tgt_node___SIZE= 16,$struct_opj_tgt_tree___SIZE=16,$struct_opj_tile_info___SIZE=572,$struct_opj_tile_info___FLATTENER=[0,4,8,12,16,20,152,284,416,548,552,556,564,568],$struct_opj_tp_info___SIZE=20,$struct_option___SIZE=16,$struct_png_color_16_struct___SIZE=10,$struct_png_color_8_struct___SIZE=5,$struct_png_color_struct___SIZE=3,$struct_png_info_struct___SIZE=288,$struct_png_info_struct___FLATTENER=[0,4,8,12,16,20,22,24,25,26,27,28,29,30,31,32,40,44,48,52,56,60,68,76,80,90,100,104,108,112,116,120,124,128,132,136,140, 144,148,152,156,160,164,168,172,176,180,181,184,188,192,196,200,204,208,212,216,220,224,232,240,244,248,252,256,260,264,268,272,276,280,284],$struct_png_row_info_struct___SIZE=12,$struct_png_row_info_struct___FLATTENER=[0,4,8,9,10,11],$struct_png_sPLT_entry_struct___SIZE=10,$struct_png_sPLT_struct___SIZE=16,$struct_png_struct_def___SIZE=744,$struct_png_struct_def___FLATTENER=[0,156,160,164,168,172,176,180,184,188,192,193,196,200,204,208,264,268,272,276,280,284,288,292,296,300,304,308,312,316,320, 324,328,332,336,340,344,348,360,364,368,372,374,376,381,382,383,384,385,386,387,388,389,390,391,392,394,396,400,404,414,424,428,432,436,440,444,448,452,456,460,464,468,472,477,484,488,500,504,508,512,516,520,524,528,532,536,540,544,548,552,556,560,564,568,572,576,580,584,588,592,596,597,600,604,608,612,616,620,624,628,632,636,640,644,646,648,650,652,656,660,661,664,668,672,676,680,684,688,692,696,700,704,708,712,732,736,740],$struct_png_text_struct___SIZE=16,$struct_png_time_struct___SIZE=8,$struct_png_time_struct___FLATTENER= [0,2,3,4,5,6],$struct_png_unknown_chunk_t___SIZE=20,$struct_png_unknown_chunk_t___FLATTENER=[0,8,12,16],$struct_tga_header___SIZE=20,$struct_tga_header___FLATTENER=[0,1,2,4,6,8,10,12,14,16,18,19],$struct_tiff___SIZE=0,$struct_tiff___FLATTENER=[],$struct_tiff_infoheader___SIZE=20,$struct_tiff_infoheader___FLATTENER=[0,4,8,12,14,16,18],$struct_v4dwt_local___SIZE=16,$struct_z_stream_s___SIZE=56,$union_anon___SIZE=4,_stdout,__str,__str1,__str2,__str4,__str5,__str6,__str7,__str8,__str9,__str10,__str11, __str12,__str13,__str14,__str15,__str16,__str17,__str18,__str19,__str20,__str21,__str22,__str23,__str24,__str25,__str26,__str27,__str28,__str29,__str30,__str31,__str32,__str33,_stderr,__str34,__str35,__str36,__str37,_get_file_format_extension,__str38,__str39,__str40,__str41,__str42,__str43,__str44,__str45,__str46,__str47,__str48,__str49,__str50,__str51,_get_file_format_format,__str52,__str53,__str54,__str55,__str56,__str57,_parse_cmdline_decoder_long_option,_parse_cmdline_decoder_optlist,__str58, __str59,__str60,__str61,__str62,__str63,__str64,__str65,__str66,__str67,__str68,__str69,__str70,__str71,__str72,__str73,__str74,__str75,__str76,__str77,__str78,__str79,__str80,__str81,__str82,__str83,__str84,__str185,__str286,_dwt_norms,_dwt_norms_real,__str387,_j2k_prog_order_list,_j2k_dec_mstab,__str488,__str1589,__str2690,__str3791,__str4892,__str593,__str694,__str795,__str896,__str997,_opj_clock_last,__str1198,__str112,__str213,__str314,__str415,__str516,__str617,__str718,__str819,__str920,__str1099, __str1121,__str12100,__str13101,__str14102,__str1522,__str16103,__str23104,_mct_norms,_mct_norms_real,_mqc_states,__str27105,__str128,__str29106,__str130,__str231,__str332,__str433,_t1_updateflags_mod,_lut_spb,_lut_ctxno_sc,_lut_ctxno_zc,_lut_nmsedec_sig,_lut_nmsedec_sig0,_lut_nmsedec_ref,_lut_nmsedec_ref0,__str41107,__str142,__str344,__str49108,__str150,__str251,__str352,__str453,__str554,__str655,__str756,__str857,__str958,__str1059,__str1160,__str1261,__str1362,__str1463,__str1564,__str1665,__str17109, __str18110,__str19111,__str20112,__str21113,__str22114,__str2366,__str24115,__str25116,__str126,__str227,__str328,__str429,__str631,__str732,__str833,__str934,__str1035,__str1136,__str1237,__str1338,__str1439,__str1540,__str1641,__str1742,__str1843,__str1944,__str2045,__str2146,__str2247,__str2348,__str2449,__str2550,__str2651,__str2752,__str28117,__str2953,__str30118,__str31119,__str32120,__str33121,__str54122,__str155,__str357,__str458,__str559,__str660,__str761,__str862,__str963,__str1064,__str1165, __str1266,__str1367,__str1468,__str1569,__str1670,__str1771,__str1973,__str2074,__str2175,__str2276,__str2377,__str2478,__str2579,__str2680,__str2781,__str2882,__str2983,__str3084,__str3185,__str3286,__str3387,__str34123,__str36125,__str3788,__str38126,__str39127,__str40128,__str4189,__str42129,__str43130,__str44131,__str45132,__str46133,__str47134,__str4890,__str4991,__str50135,__str51136,__str52137,__str53138,__str5492,__str55139,__str56140,__str57141,__str58142,__str59143,__str60144,__str61145, __str62146,__str63147,__str96,__str197,_opterr,_optind,_getopt_place,__str98,_optreset,_optopt,__str199,_optarg,__str2100,_getopt_long_lastidx,_getopt_long_lastofs,__str3101,__str4102,__str5103,__str6104,__str7105,_str,_fprintf=function(){var b=arguments[0],f=Array.prototype.slice.call(arguments,1);f=__formatString.apply(null,f);_STDIO.write(b,f,String_len(f))},__formatString=function(){function b(m){return String.fromCharCode(m)in Runtime.set("f","e","g")}function f(m){var l;if(e){l=b(m)?FHEAP[a]: IHEAP[a];a+=m==="l".charCodeAt(0)?8:4}else{l=d[a];a++}return l}var e=false,c=arguments[0],a=1;if(c<0){e=true;c=-c;a=arguments[1]}else var d=arguments;for(var g=[],h,i,j;;){h=IHEAP[c];if(h===0)break;i=IHEAP[c+1];if(h=="%".charCodeAt(0)){h=-1;if(i==".".charCodeAt(0)){c++;for(h=0;;){i=IHEAP[c+1];if(!(i>="0".charCodeAt(0)&&i<="9".charCodeAt(0)))break;h*=10;h+=i-"0".charCodeAt(0);c++}i=IHEAP[c+1]}if(i=="l".charCodeAt(0)){c++;i=IHEAP[c+1]}if(b(i))i="f".charCodeAt(0);if(["d","i","u","p","f"].indexOf(String.fromCharCode(i))!= -1){var k;j=f(i);k=String(+j);k=i=="u".charCodeAt(0)?String(unSign(j,32)):i=="p".charCodeAt(0)?"0x"+j.toString(16):String(+j);if(h>=0)if(b(i)){j=k.indexOf(".");if(j==-1&&i=="f".charCodeAt(0)){j=k.length;k+="."}k+="00000000000";k=k.substr(0,j+1+h)}else for(;k.length>")}catch(b){}try{_stdout=Pointer_make([0],null,ALLOC_STATIC);IHEAP[_stdout]=this.prepare("<>",null,true)}catch(f){}try{_stderr=Pointer_make([0],null,ALLOC_STATIC);IHEAP[_stderr]=this.prepare("<>",null,true)}catch(e){}},prepare:function(b,f,e){var c=this.counter++;this.streams[c]={filename:b,data:f? f:[],position:0,eof:0,error:0,print:e};return this.filenames[b]=c},open:function(b){b=_STDIO.filenames[b];if(!b)return-1;var f=_STDIO.streams[b];f.position=f.error=f.eof=0;return b},read:function(b,f,e){b=_STDIO.streams[b];if(!b)return-1;for(var c=0;c=b.data.length){b.eof=1;return 0}IHEAP[f]=b.data[b.position];b.position++;f++}return e},write:function(b,f,e){b=_STDIO.streams[b];if(!b)return-1;if(b.print)__print__(intArrayToString(Array_copy(f,e)));else for(var c=0;cd?1:-1}return 0},_strcpy=function(b,f){var e=0;do{IHEAP[b+e]=IHEAP[f+e];e++}while(IHEAP[f+e-1]!=0)},_strrchr=function(b,f){var e=b+Pointer_stringify(b).length;do{if(IHEAP[e]==f)return e;e--}while(e>=b);return 0},_strncasecmp= function(b,f,e){for(var c=0;cd?1:-1}return 0},_tolower=function(b){if(b>="A".charCodeAt(0)&&b<="Z".charCodeAt(0))return b-"A".charCodeAt(0)+"a".charCodeAt(0);return b},_llvm_memset_p0i8_i32=function(b,f,e){for(var c=0;c=0?_STDIO.open(b):f.indexOf("w")>=0?_STDIO.prepare(b):assert(false,"fopen with odd params: "+f)},_fseek=function(b,f,e){b=_STDIO.streams[b];if(e===_STDIO.SEEK_CUR)f+=b.position;else if(e===_STDIO.SEEK_END)f+=b.data.length;b.position=f;return b.eof=0},_ftell=function(b){return _STDIO.streams[b].position},_fread=function(b,f,e,c){for(var a=_STDIO.streams[c],d=0;da.data.length){a.eof=1;return d}_STDIO.read(c,b, f);b+=f}return e},_fclose=function(){return 0},_free=function(){},_floor=Math.floor,_memalign=function(b,f){var e=Runtime.staticAlloc(f+b);return e+b-e%b},_vsprintf=function(b,f,e){_strcpy(b,__formatString(-f,e))},_calloc=function(b,f){var e=_malloc(b*f);_memset(e,0,b*f);return e},_realloc=function(b,f){if(!f){b&&_free(b);return 0}var e=_malloc(f);if(b){_memcpy(e,b,f);_free(b)}return e},_memcpy=function(b,f,e){for(var c=0;cd?1:-1}return 0},__setjmp=function(){print("WARNING: setjmp() not really implemented, will fail if longjmp() is actually called"); return 0},_strchr=function(b,f){b--;do{b++;var e=IHEAP[b];if(e==f)return b}while(e);return 0},_fputc=function b(f,e){if(!b.ptr)b.ptr=_malloc(1);IHEAP[b.ptr]=f;_STDIO.write(e,b.ptr,1)},_ldexp=function(b,f){return b*Math.pow(2,f)},_puts=function(b){__print__(Pointer_stringify(b)+"\n")},_memset=function(b,f,e){for(var c=0;c1?u:1)-0;for(a=3;;){s=a==3?0:s;IHEAP[IHEAP[q]+4*(0+s)]=IHEAP[r]+(0+s*4096);var s=s+1;if(s!=u)a=5;else break}}else{d=1;break a}}while(0);if(_load_images(k,IHEAP[g])!=1){if(j!=0){c=9;break b}_fwrite(__str71,16,1,IHEAP[_stdout])}d=1;break a}else j=1;while(0);j=j;r=g+8;q=k;u=e+8;var t=e+8200,v= o,y=o,x=o,w=e+8204,C=e+4104,z=o,A=e+4104,B=e+4104,D=e+4104,J=e+4104,E=e+4104,N=e+4104,Q=e+4104,S=e+4104,P=e+4104,G=e+4104,F=e+4104,L=e+4104,K=e+4104,H=e+4104,M=o,I=o,O=o,R=o,T=o,V=o,ba=l;a=9;b:for(;;){var fa=a==16?oa:ba,ca=a==16?pa:0;if(!(ca=0){var a=0-e;a=e+(a>0?a:0)+1;for(c=0;;){i=c==0?0:i;c=f>>e+i*-1&1;if(IHEAP[b+16]==0){IHEAP[b+12]=IHEAP[b+12]<<8&65535;IHEAP[b+16]=IHEAP[b+12]==65280?7:8;if(!(IHEAP[b+8]>=IHEAP[b+4])){var d=IHEAP[b+12]>>>8&255,g=b+8,h=IHEAP[g];IHEAP[g]=h+1;IHEAP[h]=d}}IHEAP[b+16]+=-1;IHEAP[b+12]|=c<=0){c=c;var d=0-a;d=a+(d>0?d:0)+1;for(e=0;;){j=e==0?0:j;i=e==0?c:i;e=a+j*-1;if(IHEAP[b+16]==0){IHEAP[b+12]=IHEAP[b+12]<<8&65535;IHEAP[b+16]=IHEAP[b+12]==65280?7:8;if(!(IHEAP[b+8]>=IHEAP[b+4])){var g=b+8,h=IHEAP[g];IHEAP[g]=h+1;IHEAP[b+12]|=IHEAP[h]}}IHEAP[b+16]+=-1;var i=((IHEAP[b+12]>>>IHEAP[b+16]&1)<=IHEAP[b+4];a:do if(c)e=1;else{e=IHEAP[b+12]>>>8&255;f=b+8;var a=IHEAP[f];IHEAP[f]=a+1;IHEAP[a]=e;if(IHEAP[b+16]==7){IHEAP[b+16]=0;f=b;IHEAP[f+12]=IHEAP[f+12]<<8&65535;IHEAP[f+16]=IHEAP[f+12]==65280?7:8;if(IHEAP[f+8]>=IHEAP[f+4]){e=1;break a}else{e=IHEAP[f+12]>>>8&255;f=f+8;a=IHEAP[f];IHEAP[f]=a+1;IHEAP[a]=e}}e=0}while(0);return e} _bio_flush.__index__=Runtime.getFunctionIndex(_bio_flush,"_bio_flush");function _bio_inalign(b){var f,e;IHEAP[b+16]=0;var c=(IHEAP[b+12]&255)==255;a:do if(c){f=b;IHEAP[f+12]=IHEAP[f+12]<<8&65535;IHEAP[f+16]=IHEAP[f+12]==65280?7:8;if(IHEAP[f+8]>=IHEAP[f+4]){e=1;f=0}else{c=f+8;var a=IHEAP[c];IHEAP[c]=a+1;IHEAP[f+12]|=IHEAP[a];IHEAP[b+16]=0;f=1}break a}else f=1;while(0);if(f==1)e=0;return e}_bio_inalign.__index__=Runtime.getFunctionIndex(_bio_inalign,"_bio_inalign"); function _opj_cio_open(b,f,e){var c,a,d,g;d=0;g=_malloc(28);var h=g!=0;a:do if(h){IHEAP[g]=b;var i=f!=0;b:do if(i){if(e!=0){IHEAP[g+4]=1;IHEAP[g+8]=f;IHEAP[g+12]=e;c=1}else c=f!=0?2:3;break b}else c=3;while(0);b:do if(c==3){if(e!=0){c=2;break b}if(b==0){c=2;break b}IHEAP[g+4]=2;c=IHEAP[b+12];c=c==0?9:c==2?10:11;if(c==11){_free(g);a=0;break a}else if(c==9)d=IHEAP[IHEAP[b+16]+64];else if(c==10)d=IHEAP[IHEAP[IHEAP[b+20]+4]+64];IHEAP[g+12]=Math.floor(0.1625*IHEAP[d+8]+2E3);c=_malloc(IHEAP[g+12]);IHEAP[g+ 8]=c;if(IHEAP[g+8]!=0){c=1;break b}_opj_event_msg(IHEAP[g],1,__str84);_free(g);a=0;break a}while(0);if(c==1){IHEAP[g+16]=IHEAP[g+8];IHEAP[g+20]=IHEAP[g+8]+IHEAP[g+12];IHEAP[g+24]=IHEAP[g+8];a=g}else if(c==2){_free(g);a=0}}else a=0;while(0);return a}_opj_cio_open.__index__=Runtime.getFunctionIndex(_opj_cio_open,"_opj_cio_open");function _opj_cio_close(b){if(b!=0){IHEAP[b+4]==2&&_free(IHEAP[b+8]);_free(b)}}_opj_cio_close.__index__=Runtime.getFunctionIndex(_opj_cio_close,"_opj_cio_close"); function _cio_tell(b){return IHEAP[b+24]-IHEAP[b+16]}_cio_tell.__index__=Runtime.getFunctionIndex(_cio_tell,"_cio_tell");function _cio_seek(b,f){IHEAP[b+24]=IHEAP[b+16]+f}_cio_seek.__index__=Runtime.getFunctionIndex(_cio_seek,"_cio_seek");function _cio_numbytesleft(b){return IHEAP[b+20]-IHEAP[b+24]}_cio_numbytesleft.__index__=Runtime.getFunctionIndex(_cio_numbytesleft,"_cio_numbytesleft");function _cio_getbp(b){return IHEAP[b+24]}_cio_getbp.__index__=Runtime.getFunctionIndex(_cio_getbp,"_cio_getbp"); function _cio_byteout(b,f){var e;if(IHEAP[b+24]>=IHEAP[b+20]){_opj_event_msg(IHEAP[b],1,__str185);e=0}else{e=b+24;var c=IHEAP[e];IHEAP[e]=c+1;IHEAP[c]=f;e=1}return e}_cio_byteout.__index__=Runtime.getFunctionIndex(_cio_byteout,"_cio_byteout");function _cio_bytein(b){if(IHEAP[b+24]>=IHEAP[b+20]){_opj_event_msg(IHEAP[b],1,__str286,Pointer_make([IHEAP[b+16],0,0,0,IHEAP[b+24],0,0,0,IHEAP[b+20],0,0,0],0,ALLOC_STACK));b=0}else{b=b+24;var f=IHEAP[b];IHEAP[b]=f+1;b=IHEAP[f]}return b} _cio_bytein.__index__=Runtime.getFunctionIndex(_cio_bytein,"_cio_bytein");function _cio_write(b,f,e){var c,a=null,d,g=e-1,h=g*8,i=g+-1;for(a=0;;){c=a==5?k:0;k=h+c*-8;var j=i+c*-1;if(!((a==5?j:g)>=0)){c=3;break}a=f>>>k&255&255;if(IHEAP[b+24]>=IHEAP[b+20]){c=4;break}k=b+24;j=IHEAP[k];IHEAP[k]=j+1;IHEAP[j]=a;var k=c+1;a=5;c=1}if(c==3)d=e;else if(c==4){_opj_event_msg(IHEAP[b],1,__str185);d=0}return d}_cio_write.__index__=Runtime.getFunctionIndex(_cio_write,"_cio_write"); function _cio_read(b,f){var e=null,c;c=0;var a=f-1;if(a>=0){c=c;var d=0-a;d=a+(d>0?d:0)+1;a=a*8;for(e=0;;){j=e==0?0:j;i=e==0?c:i;var g=a+j*-8;if(IHEAP[b+24]>=IHEAP[b+20]){_opj_event_msg(IHEAP[b],1,__str286,Pointer_make([IHEAP[b+16],0,0,0,IHEAP[b+24],0,0,0,IHEAP[b+20],0,0,0],0,ALLOC_STACK));e=2}else{var h=b+24;e=IHEAP[h];IHEAP[h]=e+1;h=IHEAP[e];e=4}var i=((e==2?0:h)<1?a:1)-0,p=a-0,r=a-0,q=a-0,u=a-0,s=a-0,t=a+-1-0,v=a-0,y=a-0,x=a-0;a=a-0;f=0;a:for(;;){V=f==0?0:V;f=V*-1;var w=IHEAP[IHEAP[d]+124*(p+f)+8],C=IHEAP[IHEAP[g]+124*(r+f)],z=w-C,A=IHEAP[IHEAP[h]+124*(q+f)+12],B=IHEAP[IHEAP[i]+124*(u+f)+4],D=A-B,J=IHEAP[IHEAP[j]+124*(s+f)+-116]-IHEAP[IHEAP[k]+124*(t+f)],E=IHEAP[IHEAP[m]+124* (v+f)+-112]-IHEAP[IHEAP[l]+124*(y+f)+-120],N=IHEAP[IHEAP[n]+124*(x+f)]%2,Q=IHEAP[IHEAP[b]+124*(a+f)+4]%2,S=D-E,P=_malloc(D*4),G=P;if(0=k){var o=IHEAP[b+4*m];a=30}else{var p=IHEAP[b+4*(d*2+1)];a=31}s=a==28?n:a==30?o:p;if(d-1<0){var r=IHEAP[b+4];a=32}else if(d-1>=i){var q=IHEAP[b+4*j];a=34}else{var u=IHEAP[b+4*((d-1)*2+1)];a=35}IHEAP[b+4*d*2]-=(a==32?r:a==34?q:u)+s>>1;d+=1;var s= d;if(s=j){var v=IHEAP[b+4*k];a=42}else{var y=IHEAP[b+4*d*2];a=43}z=a==40?t:a==42?v:y;if(d+1<0){var x=IHEAP[b];a=44}else if(d+1>=h){var w=IHEAP[b+4*i];a=46}else{var C=IHEAP[b+4*(d+1)*2];a=47}IHEAP[b+4*(d*2+1)]+=z+2+(a==44?x:a==46?w:C)>>2;d+=1;var z=d;if(z0))if(!(e>1))break a;d=0;g=d=k){var B=IHEAP[b+4*m];a=6}else{var D=IHEAP[b+4*d*2];a=7}Q=a==4?A:a==6?B:D;if(d+1<0){var J=IHEAP[b];a=8}else if(d+1>=i){var E=IHEAP[b+4*j];a=10}else{var N=IHEAP[b+4*(d+1)*2];a=11}IHEAP[b+4*(d*2+1)]-=(a==8?J:a==10?E:N)+Q>>1;d+=1;var Q=d;if(Q=j){var P=IHEAP[b+4*k];a=18}else{var G=IHEAP[b+4*((d- 1)*2+1)];a=19}m=a==16?S:a==18?P:G;if(d<0){var F=IHEAP[b+4];a=20}else if(d>=h){var L=IHEAP[b+4*i];a=22}else{var K=IHEAP[b+4*(d*2+1)];a=23}IHEAP[b+4*d*2]+=m+2+(a==20?F:a==22?L:K)>>2;d+=1;if(!(dh?c:h)-g;var i=g*a,j=d+g*2;for(g=0;;){g=g==0?0:k;IHEAP[f+4*(i+a*g)]=IHEAP[b+4*(j+g*2)];var k=g+1;if(k!=h)g=1;else break}}g=0;if(gk?e:k)-g;c=a*(g+c);d=g*2+1-d;for(g=4;;){m=g==4?0:m;IHEAP[f+4*(c+a*m)]=IHEAP[b+4*(d+m*2)];var m=m+1;if(m!=e)g=5;else break}}}_dwt_deinterleave_v.__index__=Runtime.getFunctionIndex(_dwt_deinterleave_v,"_dwt_deinterleave_v"); function _dwt_deinterleave_h(b,f,e,c,a){var d=null;d=0;if(dd?c:d)-g,i=a+g*2;for(d=0;;){d=d==0?0:j;IHEAP[f+4*(g+d)]=IHEAP[b+4*(i+d*2)];var j=d+1;if(j!=h)d=1;else break}}d=0;if(dg?e:g)-d;c=d+c;a=d*2+1-a;for(d=4;;){k=d==4?0:k;IHEAP[f+4*(c+k)]=IHEAP[b+4*(a+k*2)];var k=k+1;if(k!=e)d=5;else break}}}_dwt_deinterleave_h.__index__=Runtime.getFunctionIndex(_dwt_deinterleave_h,"_dwt_deinterleave_h"); function _dwt_decode(b,f){var e=STACKTOP;STACKTOP+=32;_memset(e,0,32);var c,a=null,d,g,h,i=e+16,j,k,m,l;g=f;h=_dwt_decode_1.__index__;j=IHEAP[b+20];k=IHEAP[j+8]-IHEAP[j];m=IHEAP[j+12]-IHEAP[j+4];l=IHEAP[b+8]-IHEAP[b];a=g;d=1;var n=a+-1;a=n;if(n!=0){d=d;n=a;for(a=0;;){r=a==0?0:r;p=a==0?d:p;a=r+1;var o=IHEAP[j+124*a+8]-IHEAP[j+124*a];p=p=k){var o=IHEAP[b+4*m];f=29}else{var p=IHEAP[b+4*e*2];f=30}s=f==27?n:f==29?o:p;if(e+1<0){var r=IHEAP[b];f=31}else if(e+1>=i){var q=IHEAP[b+4*j];f=33}else{var u=IHEAP[b+4*(e+1)*2];f=34}IHEAP[b+ 4*(e*2+1)]-=s+2+(f==31?r:f==33?q:u)>>2;e+=1;var s=e;if(s=j){var v=IHEAP[b+4*k];f=41}else{var y=IHEAP[b+4*(e*2+1)];f=42}z=f==39?t:f==41?v:y;if(e-1<0){var x=IHEAP[b+4];f=43}else if(e-1>=h){var w=IHEAP[b+4*i];f=45}else{var C=IHEAP[b+4*((e-1)*2+1)];f=46}IHEAP[b+4*e*2]+=(f==43?x:f==45?w:C)+z>>1;e+=1;var z=e;if(z0))if(!(a> 1))break a;e=0;g=e=k){var B=IHEAP[b+4*m];f=5}else{var D=IHEAP[b+4*((e-1)*2+1)];f=6}l=f==3?A:f==5?B:D;if(e<0){var J=IHEAP[b+4];f=7}else if(e>=i){var E=IHEAP[b+4*j];f=9}else{var N=IHEAP[b+4*(e*2+1)];f=10}IHEAP[b+4*e*2]-=l+2+(f==7?J:f==9?E:N)>>2;e+=1;if(!(e=j){var S= IHEAP[b+4*k];f=16}else{var P=IHEAP[b+4*e*2];f=17}K=f==14?Q:f==16?S:P;if(e+1<0){var G=IHEAP[b];f=18}else if(e+1>=h){var F=IHEAP[b+4*i];f=20}else{var L=IHEAP[b+4*(e+1)*2];f=21}IHEAP[b+4*(e*2+1)]+=(f==18?G:f==20?F:L)+K>>1;e+=1;var K=e;if(K1?a:1)-0,p=a-0,r=a-0,q=a-0,u=a-0,s=a-0,t=a+-1-0,v=a-0,y=a-0,x=a-0;a=a-0;f=0;a:for(;;){V=f==0?0:V;f=V*-1;var w=IHEAP[IHEAP[d]+124*(p+f)+8],C=IHEAP[IHEAP[g]+124*(r+f)],z=w-C,A=IHEAP[IHEAP[h]+124*(q+f)+12],B=IHEAP[IHEAP[i]+124*(u+f)+4],D=A-B,J=IHEAP[IHEAP[j]+124*(s+f)+-116]-IHEAP[IHEAP[k]+124*(t+f)],E=IHEAP[IHEAP[m]+ 124*(v+f)+-112]-IHEAP[IHEAP[l]+124*(y+f)+-120],N=IHEAP[IHEAP[n]+124*(x+f)]%2,Q=IHEAP[IHEAP[b]+124*(a+f)+4]%2,S=D-E,P=_malloc(D*4),G=P;if(00))if(!(f>1))break a;c=0;if(c=e){var i=IHEAP[b+4*((e-1)*2+1)];a=61}else{var j=IHEAP[b+4*(c*2+1)];a=62}n=a==59?h:a==61?i:j;if(c-1<0){var k=IHEAP[b+4];a=63}else if(c-1>=e){var m=IHEAP[b+4*((e-1)*2+1)];a=65}else{var l=IHEAP[b+4*((c-1)*2+1)];a=66}n=12993*((a==63?k:a==65?m:l)+n);IHEAP[b+4*c*2]-=n+(n&4096)>>13&4294967295;c+=1;var n=c;if(n=f){var p=IHEAP[b+4*(f-1)*2];a=74}else{var r=IHEAP[b+4*c*2];a=75}t=a==72?o:a==74?p:r;if(c+1<0){var q=IHEAP[b];a=76}else if(c+1>=f){var u=IHEAP[b+4*(f-1)*2];a=78}else{var s=IHEAP[b+4*(c+1)*2];a=79}t=434*((a==76?q:a==78?u:s)+t);IHEAP[b+4*(c*2+1)]-=t+(t&4096)>>13&4294967295;c+=1;var t=c;if(t=e){var y=IHEAP[b+4*((e-1)*2+1)];a=87}else{var x= IHEAP[b+4*(c*2+1)];a=88}A=a==85?v:a==87?y:x;if(c-1<0){var w=IHEAP[b+4];a=89}else if(c-1>=e){var C=IHEAP[b+4*((e-1)*2+1)];a=91}else{var z=IHEAP[b+4*((c-1)*2+1)];a=92}A=7233*((a==89?w:a==91?C:z)+A);IHEAP[b+4*c*2]+=A+(A&4096)>>13&4294967295;c+=1;var A=c;if(A=f){var D=IHEAP[b+4*(f-1)*2];a=100}else{var J=IHEAP[b+4*c*2];a=101}S=a==98?B:a==100?D:J;if(c+1<0){var E=IHEAP[b];a=102}else if(c+1>=f){var N=IHEAP[b+4* (f-1)*2];a=104}else{var Q=IHEAP[b+4*(c+1)*2];a=105}S=3633*((a==102?E:a==104?N:Q)+S);IHEAP[b+4*(c*2+1)]+=S+(S&4096)>>13&4294967295;c+=1;var S=c;if(S>13&4294967295;c+=1;if(c>13&4294967295;c+=1;if(!(c0))if(!(e>1))break a;c=0;if(c=e){var G=IHEAP[b+4*(e-1)*2];a=6}else{var F=IHEAP[b+4*c*2];a=7}M=a==4?P:a==6?G:F;if(c+1<0){var L=IHEAP[b];a=8}else if(c+1>=e){var K=IHEAP[b+4*(e-1)*2];a=10}else{var H=IHEAP[b+4*(c+1)*2];a=11}M=12993*((a==8?L:a==10?K:H)+M);IHEAP[b+4*(c*2+1)]-=M+(M&4096)>>13&4294967295;c+=1;var M=c;if(M=f){var O=IHEAP[b+4*((f-1)*2+1)];a=19}else{var R=IHEAP[b+4* ((c-1)*2+1)];a=20}g=a==17?I:a==19?O:R;if(c<0){var T=IHEAP[b+4];a=21}else if(c>=f){var V=IHEAP[b+4*((f-1)*2+1)];a=23}else{var ba=IHEAP[b+4*(c*2+1)];a=24}a=434*((a==21?T:a==23?V:ba)+g);IHEAP[b+4*c*2]-=a+(a&4096)>>13&4294967295;c+=1;if(c=e){var ca=IHEAP[b+4*(e-1)*2];a=31}else{var U=IHEAP[b+4*c*2];a=32}W=a==29?fa:a==31?ca:U;if(c+1<0){var $=IHEAP[b];a=33}else if(c+ 1>=e){var Y=IHEAP[b+4*(e-1)*2];a=35}else{var Z=IHEAP[b+4*(c+1)*2];a=36}W=7233*((a==33?$:a==35?Y:Z)+W);IHEAP[b+4*(c*2+1)]+=W+(W&4096)>>13&4294967295;c+=1;var W=c;if(W=f){var aa=IHEAP[b+4*((f-1)*2+1)];a=44}else{var ka=IHEAP[b+4*((c-1)*2+1)];a=45}g=a==42?X:a==44?aa:ka;if(c<0){var ga=IHEAP[b+4];a=46}else if(c>=f){var ja=IHEAP[b+4*((f-1)*2+1)];a=48}else{var ia=IHEAP[b+4*(c*2+1)];a=49}a=3633*((a==46?ga:a== 48?ja:ia)+g);IHEAP[b+4*c*2]+=a+(a&4096)>>13&4294967295;c+=1;if(c>13&4294967295;c+=1;if(c>13&4294967295;c+=1;if(!(c1?a:1)-0;c=0;a:for(;;){A=c==0?0:A;c=0+A;var i=-1+A,j=b+28+c*8+4,k=b+28+c*8;if(c==0)c=1;else{var m=(i/3|0)+1,l=i%3+1;c=2}i=c==2?l:0;var n=IHEAP[d]+-1+(0-(c==2?m:0));if(IHEAP[g]==0|i==0)c=18;else{var o=i==2;o=(i==1?1:o)?1:2;c=4}e=c==18?0:o;if(IHEAP[h]==0)c=19;else{var p=(1<1){c=8;e=9}else{c=8;e=10}b:for(;;)if(e== 9){u=c==9?u:0;var r=u+1,q=(c==9?q:i)>>1,u=u+1;if(q>1){e=c=9;continue b}var s=r-13;if(i>1)c=11;else{c=11;e=10;continue b}for(;;){y=c==12?y:0;var t=y+1,v=(c==12?v:i)>>1,y=y+1;if(v>1)e=c=12;else{c=12;e=10;continue b}}}else if(e==10){var x=c==11?s:c==8?-13:s,w=11-(c==11?0:c==8?0:t);e=w<0?13:14;break b}if(e==13){var C=i>>0-w;c=13}else if(e==14){var z=i<3){y=n;var x=m,w=n,C=n,z=n,A=n,B=n;o=o;p=p;r=a;var D=x+-1>=0;b:do if(D){var J=x+-1,E=A*4,N=x+-1;c=N+w;var Q=N+C*2,S=N+z*3,P=r+-4,G=B*-4,F=p-B*4,L=A*4;a=7;for(;;){Y=a==10?Y:0;a=E*Y;var K=N+a,H=c+a,M=Q+a,I=S+a,O=P+Y*-4,R=G*Y,T=F+R,V=o+4*(L+a); _v4dwt_interleave_h(e,o+4*a,y,p+R);_v4dwt_decode(e);for(a=8;;){$=a==8?0:$;a=$*-1;R=o+4*(H+a);var ba=o+4*(M+a),fa=o+4*(I+a),ca=$*-1,U=x+ca;FHEAP[o+4*(K+a)]=FHEAP[IHEAP[e]+16*(J+ca)];FHEAP[R]=FHEAP[IHEAP[e]+16*U+-12];FHEAP[ba]=FHEAP[IHEAP[e]+16*U+-8];FHEAP[fa]=FHEAP[IHEAP[e]+16*U+-4];var $=$+1;if($!=x)a=9;else break}var Y=Y+1;if(O>3)a=10;else{a=10;break b}}}else{J=A*4;E=r+-4;N=B*-4;c=p-B*4;Q=A*4;for(a=12;;){X=a==12?0:X;S=J*X;a=E+X*-4;P=N*X;var Z=c+P,W=o+4*(Q+S);_v4dwt_interleave_h(e,o+4*S,y,p+P);_v4dwt_decode(e); var X=X+1;if(a>3)a=13;else{a=13;break b}}}while(0);y=a==10?V:W;p=a==10?T:Z;o=y}y=(l&3)!=0;b:do if(y){a=l&3;_v4dwt_interleave_h(e,o,n,p);_v4dwt_decode(e);r=m;r=x=r+-1;if(!(x>=0))break b;x=a;w=n;C=o;z=n;B=A=o;r=r;D=x==3;c:do if(D){a=r*-1;J=r+1+(a>0?a:0);E=r+w*2;N=r+z;for(a=17;;){aa=a==18?aa:0;a=aa*-1;c=r+a;Q=A+4*(N+a);S=B+4*c;FHEAP[C+4*(E+a)]=FHEAP[IHEAP[e]+16*c+8];FHEAP[Q]=FHEAP[IHEAP[e]+16*c+4];FHEAP[S]=FHEAP[IHEAP[e]+16*c];var aa=aa+1;if(aa!=J)a=18;else break}}else{J=r+-1;E=r+z;a=21;for(;;){ka=a== 21?0:ka;c=ka*-1;a=J+c;N=r+c;Q=A+4*(E+c);S=B+4*N;c=x==2?40:x==1?23:25;e:do if(c==40){FHEAP[Q]=FHEAP[IHEAP[e]+16*N+4];c=23;break e}while(0);if(c==23)FHEAP[S]=FHEAP[IHEAP[e]+16*N];var ka=ka+1;if(a>=0)a=25;else break c}}while(0)}while(0);IHEAP[u]=l-IHEAP[q];IHEAP[v]=IHEAP[k+4]%2;o=IHEAP[b+24];a=y=m;if(y>3){x=y=n;w=l;C=o;z=a;A=01?w:1;o=z+-4;a=28;for(;;){ia=a==31?ia:0;r=ia*4;p=o+ia*-4;var ga=C+4*(r+4);_v4dwt_interleave_v(j,C+4*r,y);_v4dwt_decode(j);for(a=29;;){ja=a==29?0:ja;_llvm_memcpy_p0i8_p0i8_i32(C+ 4*(r+x*ja),IHEAP[j]+16*ja,16,1,0);var ja=ja+1;if(ja!=B)a=30;else break}var ia=ia+1;if(p>3)a=31;else{a=31;break b}}}else{B=z+-4;for(a=33;;){oa=a==33?0:oa;o=oa*4;a=B+oa*-4;var ea=C+4*(o+4);_v4dwt_interleave_v(j,C+4*o,y);_v4dwt_decode(j);var oa=oa+1;if(a>3)a=34;else{a=34;break b}}}while(0);o=a==31?ga:ea}if((m&3)==0)continue a;a=m&3;_v4dwt_interleave_v(j,o,n);_v4dwt_decode(j);if(!(01?a:1)-0;z=0*y;for(a=37;;){pa=a==37?0:pa;_llvm_memcpy_p0i8_p0i8_i32(x+4*(z+y*pa),IHEAP[j]+ 16*(0+pa),w,1,0);var pa=pa+1;if(pa!=C)a=38;else break}}_free(IHEAP[e]);STACKTOP=e}_dwt_decode_real.__index__=Runtime.getFunctionIndex(_dwt_decode_real,"_dwt_decode_real"); function _v4dwt_interleave_h(b,f,e,c){var a,d=null,g,h;g=IHEAP[b]+16*IHEAP[b+12];h=IHEAP[b+8];var i=e*3,j=(e&15)==0,k=b+12,m=b+8,l=b+8,n=b+4,o=e+e,p=o+e,r=e+e,q=r+e;d=0;a:for(;;){N=d==0?0:N;J=d==0?c:J;E=d==0?h:E;B=d==0?g:B;D=d==0?f:D;d=i+EJ;d:do if(!w){FHEAP[v]=FHEAP[t];if(u>J)break d;FHEAP[y]=FHEAP[s];if(d>J)break d;FHEAP[z]=FHEAP[a]}while(0);var A=A+1;if(A!=E){d=10;a=8}else{a=14;break c}}}while(0);var B=IHEAP[b]+16+16*(0-IHEAP[k]),D=D+4*IHEAP[m],J=J-IHEAP[l],E=IHEAP[n], N=N+1;if(N!=2)d=6;else break a}}_v4dwt_interleave_h.__index__=Runtime.getFunctionIndex(_v4dwt_interleave_h,"_v4dwt_interleave_h"); function _v4dwt_decode(b){var f,e,c,a=IHEAP[b+12]==0;a:do{if(a){if(!(IHEAP[b+4]>0))if(!(IHEAP[b+8]>1)){f=1;break a}e=0;c=1}else{if(!(IHEAP[b+8]>0))if(!(IHEAP[b+4]>1)){f=1;break a}e=1;c=0}f=2;break a}while(0);if(f==2){_v4dwt_decode_step1(IHEAP[b]+16*e,IHEAP[b+8],1.2301740646362305);_v4dwt_decode_step1(IHEAP[b]+16*c,IHEAP[b+4],1.625732421875);a=IHEAP[b]+16*c;var d=IHEAP[b]+16*e+16,g=IHEAP[b+8],h=IHEAP[b+4]-e;f=IHEAP[b+8];_v4dwt_decode_step2(a,d,g,f1?f:1)-0;for(c=0;;){c=c==0?0:k;k=c*8;var a=3+k,d=b+4*a,g=2+k,h=b+4*g,i=1+k,j=b+4*i;i=FHEAP[b+4*i];g=FHEAP[b+4*g];a=FHEAP[b+4*a];FHEAP[b+4*(0+k)]*=e;FHEAP[j]=i*e;FHEAP[h]=g*e;FHEAP[d]=a*e;var k=c+1;if(k!=f)c=1;else break}}}_v4dwt_decode_step1.__index__=Runtime.getFunctionIndex(_v4dwt_decode_step1,"_v4dwt_decode_step1"); function _v4dwt_decode_step2(b,f,e,c,a){var d=null,g,h,i;a=a;b=b;f=f;if(01?c:1)-0;for(d=0;;){t=d==0?0:t;d=d==0?b:s;s=FHEAP[d+4];var m=FHEAP[d+8],l=FHEAP[d+12],n=FHEAP[f+-12],o=FHEAP[f+-8],p=FHEAP[f+-4],r=FHEAP[f+4],q=FHEAP[f+8],u=FHEAP[f+12];FHEAP[f+-16]+=(FHEAP[d]+FHEAP[f])*j;FHEAP[f+-12]=n+(s+r)*g;FHEAP[f+-8]=o+(m+q)*h;FHEAP[f+-4]=p+(l+u)*i;var s=f;f+=32;var t=t+1;if(t!=k)d=1;else break}b=s}j=cs?d:s)-t;for(d=4;;){v=d==4?0:v;d=FHEAP[f+-12];s=FHEAP[f+-8];m=FHEAP[f+-4];FHEAP[f+-16]+=g;FHEAP[f+-12]=d+h;FHEAP[f+-8]=s+i;FHEAP[f+-4]=m+k;f+=32;var v=v+1;if(v!=t)d=6;else break}}while(0)}_v4dwt_decode_step2.__index__=Runtime.getFunctionIndex(_v4dwt_decode_step2,"_v4dwt_decode_step2");function _opj_set_event_mgr(b,f,e){var c;if(b!=0){c=IHEAP[b];IHEAP[b]=f;IHEAP[b+4]=e;b=c}else b=0;return b} _opj_set_event_mgr.__index__=Runtime.getFunctionIndex(_opj_set_event_mgr,"_opj_set_event_mgr"); function _opj_event_msg(b,f,e){var c=STACKTOP;STACKTOP+=516;_memset(c,0,516);var a,d=null,g,h,i=c+4;g=0;h=IHEAP[b];if(h!=0){a=f==1?0:f==2?2:f==4?3:4;if(a==4){var j=g;d=4}else if(a==0){var k=IHEAP[h];g=k;d=0}else if(a==2){var m=IHEAP[h+4];g=m;d=2}else if(a==3){var l=IHEAP[h+8];g=l;d=3}if((d==4?j:d==3?l:d==2?m:k)==0)g=0;else{a=e!=0;a:do if(a){if(h==0)break a;_llvm_memset_p0i8_i32(i,0,512,1,0);IHEAP[c]=arguments[_opj_event_msg.length];_strlen(e)>512||_strlen(e);_vsprintf(i,e,IHEAP[c]);FUNCTION_TABLE[g](i, IHEAP[b+4])}while(0);g=1}}else g=0;g=g;STACKTOP=c;return g}_opj_event_msg.__index__=Runtime.getFunctionIndex(_opj_event_msg,"_opj_event_msg");function _opj_image_create0(){return _calloc(1,36)}_opj_image_create0.__index__=Runtime.getFunctionIndex(_opj_image_create0,"_opj_image_create0"); function _opj_image_create(b,f,e){var c,a=null,d,g;g=_calloc(1,36);var h=g!=0;a:do if(h){IHEAP[g+20]=e;IHEAP[g+16]=b;var i=_malloc(IHEAP[g+16]*48);IHEAP[g+24]=i;if(IHEAP[g+24]!=0){i=b;var j=g+24,k=f,m=f,l=f,n=f,o=f,p=f,r=f,q=f,u=f;for(a=1;;){c=a==5?D:0;a=0+c;var s=k+36*a,t=m+36*a+4,v=l+36*a+8,y=n+36*a+12,x=o+36*a+16,w=p+36*a+20,C=r+36*a+24,z=q+36*a+28,A=u+36*a+32;if(!(a1?e:1)-0;for(f=3;;){k=f==3?0:k;f=d+(0+k);var j=_cio_read(g,1)&255;IHEAP[f]=j;var k=k+1;if(k!=i)f=4;else break}}IHEAP[IHEAP[b+52]+4*h]+=e;IHEAP[IHEAP[b+48]+4*h]=a;IHEAP[b+4]=c!=0?64:8;IHEAP[b+16]+=1}_j2k_read_sod.__index__=Runtime.getFunctionIndex(_j2k_read_sod,"_j2k_read_sod"); function _j2k_read_eoc(b){var f,e=null,c,a,d,g=IHEAP[IHEAP[b+64]+44]!=2;a:do if(g){c=_tcd_create(IHEAP[b]);_tcd_malloc_decode(c,IHEAP[b+60],IHEAP[b+64]);d=0;var h=a=c,i=c;d=d;for(e=0;;){f=e==5?m:0;e=d+f;if(!(e>7;j=_cio_read(h,1);IHEAP[IHEAP[a+24]+48*e]=j;j=_cio_read(i,1);IHEAP[IHEAP[a+24]+48*e+4]=j;IHEAP[IHEAP[a+24]+48*e+36]=0;IHEAP[IHEAP[a+24]+48*e+40]=IHEAP[d+36];e+=1;if(!(ef?i:f)-c;for(f=5;;){p=f==5?0:p;var j=c+p;f=g+428+j*148+36;var k=g+428+j*148+16,m=g+428+j*148+12,l=g+428+j*148+8,n=g+428+j*148+4;j=g+428+j*148; var o=_cio_read(b,1);IHEAP[j]=o;j=_cio_read(b,d);IHEAP[n]=j;n=_cio_read(b,2);IHEAP[l]=n;l=_cio_read(b,1);IHEAP[m]=l;m=_cio_read(b,h);IHEAP[k]=m>4&2)+(f>>4&1);f=f>>6&1;c=(e-4)/((f+1)*2+b)|0;if(01?c:1)-0;for(f=0;;){d=f==0?0:d;_cio_read(a,b);_cio_read(a,e);var d=d+1;if(d!=c)f=1;else break}}}_j2k_read_tlm.__index__=Runtime.getFunctionIndex(_j2k_read_tlm,"_j2k_read_tlm"); function _j2k_read_plm(b){var f=null,e;b=IHEAP[b+72];e=_cio_read(b,2);_cio_read(b,1);var c=e-3;e=c;if(c>0){e=e;f=3;a:for(;;){var a=f==3?e:h;c=_cio_read(b,4);var d=a+-4;a=a+-5;for(f=1;;){f=f==6?j:0;var g=f*-1,h=d+g,i=a+g;if(!(c+g>0))break;_cio_read(b,1);if(i<=0)break a;var j=f+1;f=6}if(h>0)f=0;else break a}}}_j2k_read_plm.__index__=Runtime.getFunctionIndex(_j2k_read_plm,"_j2k_read_plm"); function _j2k_read_plt(b){var f=null;b=IHEAP[b+72];f=_cio_read(b,2);_cio_read(b,1);f=f-3;if(f>0){var e=0-f;e=f+(e>-1?e:-1)+1;for(f=0;;){c=f==0?0:c;_cio_read(b,1);var c=c+1;if(c!=e)f=1;else break}}}_j2k_read_plt.__index__=Runtime.getFunctionIndex(_j2k_read_plt,"_j2k_read_plt"); function _j2k_read_ppm(b){var f=null,e,c,a;a=IHEAP[b+64];b=IHEAP[b+72];e=_cio_read(b,2);IHEAP[a+92]=1;c=_cio_read(b,1);var d=e-3;e=d;if(d>0){d=a+100;var g=a+96;c=c==0;var h=a+84,i=a+84,j=a+88,k=a+104,m=a+84,l=a+100,n=a+96,o=a+84,p=a+96,r=a+84,q=a+84,u=a+88,s=a+96,t=a+104;a=a+100;e=e;f=0;a:for(;;){var v=f==0?e:P;if(IHEAP[d]==0){var y=_cio_read(b,4),x=v-4;f=2}else{var w=IHEAP[a];f=4}P=f==4?w:y;var C=f==4?v:x;v=IHEAP[g];if(c){var z=_malloc(P);IHEAP[h]=z;IHEAP[j]=IHEAP[i];IHEAP[k]=P}else{z=_realloc(IHEAP[o], IHEAP[p]+P);IHEAP[r]=z;IHEAP[u]=IHEAP[q];IHEAP[t]=IHEAP[s]+P}z=C*-1;var A=-1-P;A=-2-P-(A>-1?A:-1);var B=z>A?z:A;z=P+1+B;var D=C+B,J=C+1+B;A=v-B;B=v+-1-B;C=C+-1;for(f=6;;){f=f==10?S:0;var E=f*-1,N=C+E,Q=v+f;if(!(P+E>0)){f=7;break}E=_cio_read(b,1)&255;IHEAP[IHEAP[m]+Q]=E;if(N==0){f=8;break}var S=f+1;f=10}var P=f==8?D:J;v=f==8?A:B;IHEAP[l]=z-1;IHEAP[n]=v;if(P>0)f=9;else break a}}}_j2k_read_ppm.__index__=Runtime.getFunctionIndex(_j2k_read_ppm,"_j2k_read_ppm"); function _j2k_read_ppt(b){var f=null,e,c,a;a=IHEAP[IHEAP[b+64]+108]+5588*IHEAP[b+8];b=IHEAP[b+72];e=_cio_read(b,2);c=_cio_read(b,1);IHEAP[a+5172]=1;if(c==0){c=_malloc(e-3);IHEAP[a+5164]=c;IHEAP[a+5168]=IHEAP[a+5164];IHEAP[a+5176]=0;IHEAP[a+5180]=e-3}else{c=_realloc(IHEAP[a+5164],e+-3+IHEAP[a+5176]);IHEAP[a+5164]=c;IHEAP[a+5168]=IHEAP[a+5164];IHEAP[a+5180]=e+-3+IHEAP[a+5176]}c=IHEAP[a+5176];var d=e-3;if(d>0){e=a+5164;c=c;var g=0-d;f=g>-1?g:-1;g=d+c+f;d=d+f+1;for(f=1;;){i=f==1?0:i;f=c+i;var h=_cio_read(b, 1)&255;IHEAP[IHEAP[e]+f]=h;var i=i+1;if(i!=d)f=2;else break}c=g+1}IHEAP[a+5176]=c}_j2k_read_ppt.__index__=Runtime.getFunctionIndex(_j2k_read_ppt,"_j2k_read_ppt");function _j2k_read_crg(b){var f=null,e;e=IHEAP[b+72];f=IHEAP[IHEAP[b+60]+16];_cio_read(e,2);if(01?f:1)-0;for(f=0;;){c=f==0?0:c;_cio_read(e,2);_cio_read(e,2);var c=c+1;if(c!=b)f=1;else break}}}_j2k_read_crg.__index__=Runtime.getFunctionIndex(_j2k_read_crg,"_j2k_read_crg"); function _j2k_read_com(b){b=IHEAP[b+72];var f=_cio_read(b,2)-2;IHEAP[b+24]+=f}_j2k_read_com.__index__=Runtime.getFunctionIndex(_j2k_read_com,"_j2k_read_com");function _j2k_read_unk(b){_opj_event_msg(IHEAP[b],2,__str795)}_j2k_read_unk.__index__=Runtime.getFunctionIndex(_j2k_read_unk,"_j2k_read_unk");function _j2k_create_decompress(b){var f;f=_calloc(1,76);if(f!=0){var e=_calloc(1,5588);IHEAP[f+56]=e;if(IHEAP[f+56]!=0){IHEAP[f]=b;IHEAP[f+48]=0;b=f}else{_free(f);b=0}}else b=0;return b} _j2k_create_decompress.__index__=Runtime.getFunctionIndex(_j2k_create_decompress,"_j2k_create_decompress"); function _j2k_destroy_decompress(b){var f=null,e;IHEAP[b+52]!=0&&_free(IHEAP[b+52]);IHEAP[b+48]!=0&&_free(IHEAP[b+48]);if(IHEAP[b+56]!=0){e=IHEAP[b+56];IHEAP[e+5168]!=0&&_free(IHEAP[e+5168]);IHEAP[IHEAP[b+56]+5584]!=0&&_free(IHEAP[IHEAP[b+56]+5584]);_free(IHEAP[b+56])}if(IHEAP[b+64]!=0){e=IHEAP[b+64];if(IHEAP[e+108]!=0){if(0>8!=255){c=3;break a}else a=2;for(;;){c=a==8?o:0;var n=_j2k_dec_mstab+c*12;a=n;if(IHEAP[a]==0)break;if(IHEAP[a]==l)break;var o=c+1;a=8}if((IHEAP[n+4]&IHEAP[h])==0){c=10;break a}if(IHEAP[n]==65424)if(IHEAP[IHEAP[i]+44]==1){c=11;break a}IHEAP[n+8]!=0&&FUNCTION_TABLE[IHEAP[n+ 8]](b);if((IHEAP[j]&128)!=0){c=14;break a}if(IHEAP[k]==32){c=16;break a}if(IHEAP[m]==64){c=16;break a}else c=2}if(c==3){b=l;_opj_image_destroy(e);_opj_event_msg(g,1,__str488,Pointer_make([IHEAP[f+24]+-2+(0-IHEAP[f+16]),0,0,0,b,0,0,0],0,ALLOC_STACK));d=0}else if(c==10){b=l;_opj_image_destroy(e);_opj_event_msg(g,1,__str1589,Pointer_make([IHEAP[f+24]+-2+(0-IHEAP[f+16]),0,0,0,b,0,0,0],0,ALLOC_STACK));d=0}else if(c==11){_opj_event_msg(g,4,__str2690);d=e}else if(c==14)d=0;else if(c==16){IHEAP[b+4]==64&& _j2k_read_eoc(b);IHEAP[b+4]!=32&&_opj_event_msg(g,2,__str3791);d=e}return d}_j2k_decode.__index__=Runtime.getFunctionIndex(_j2k_decode,"_j2k_decode"); function _j2k_decode_jpt_stream(b,f){var e=STACKTOP;STACKTOP+=28;_memset(e,0,28);var c,a=null,d,g,h,i;i=IHEAP[b];IHEAP[b+72]=f;g=_calloc(1,36);IHEAP[b+60]=g;IHEAP[b+4]=1;IHEAP[e]=0;IHEAP[e+4]=0;IHEAP[e+8]=0;IHEAP[e+12]=0;IHEAP[e+16]=0;IHEAP[e+20]=0;IHEAP[e+24]=0;_jpt_read_msg_header(i,f,e);h=IHEAP[f+24]-IHEAP[f+16];if(IHEAP[e+8]!=6){_opj_image_destroy(g);_opj_event_msg(i,1,__str4892,Pointer_make([IHEAP[e+8],0,0,0],0,ALLOC_STACK));d=0}else{var j=e+20,k=e+8,m=b+4,l=b+4,n=b+4;a=0;a:for(;;){p=a==0?h: p;if(IHEAP[f+20]-IHEAP[f+24]==0){c=4;break a}if(0-p+IHEAP[f+24]+(0-IHEAP[f+16])==IHEAP[j]){_jpt_read_msg_header(i,f,e);var o=IHEAP[f+24]-IHEAP[f+16];if(IHEAP[k]!=4){c=6;break a}else a=5}else a=3;var p=a==5?o:p,r=_cio_read(f,2);if(r>>8!=255){c=9;break a}else a=8;for(;;){a=a==13?u:0;var q=_j2k_dec_mstab+a*12;c=q;if(IHEAP[c]==0)break;if(IHEAP[c]==r)break;var u=a+1;a=13}if((IHEAP[q+4]&IHEAP[m])==0){c=15;break a}IHEAP[q+8]!=0&&FUNCTION_TABLE[IHEAP[q+8]](b);if(IHEAP[l]==32){c=17;break a}if(IHEAP[n]==64){c= 17;break a}else{a=18;c=1}}if(c==4){_j2k_read_eoc(b);d=g}else if(c==6){_opj_image_destroy(g);_opj_event_msg(i,1,__str593);d=0}else if(c==9){d=r;_opj_image_destroy(g);_opj_event_msg(i,1,__str488,Pointer_make([IHEAP[f+24]+-2+(0-IHEAP[f+16]),0,0,0,d,0,0,0],0,ALLOC_STACK));d=0}else if(c==15){d=r;_opj_image_destroy(g);_opj_event_msg(i,1,__str1589,Pointer_make([IHEAP[f+24]+-2+(0-IHEAP[f+16]),0,0,0,d,0,0,0],0,ALLOC_STACK));d=0}else if(c==17){IHEAP[b+4]==64&&_j2k_read_eoc(b);IHEAP[b+4]!=32&&_opj_event_msg(i, 2,__str3791);d=g}}g=d;STACKTOP=e;return g}_j2k_decode_jpt_stream.__index__=Runtime.getFunctionIndex(_j2k_decode_jpt_stream,"_j2k_decode_jpt_stream");function _j2k_create_compress(b){var f;f=_calloc(1,76);if(f!=0)IHEAP[f]=b;return f}_j2k_create_compress.__index__=Runtime.getFunctionIndex(_j2k_create_compress,"_j2k_create_compress"); function _j2k_destroy_compress(b){var f=null,e;if(b!=0){if(IHEAP[b+64]!=0){e=IHEAP[b+64];IHEAP[e+64]!=0&&_free(IHEAP[e+64]);IHEAP[e+112]!=0&&_free(IHEAP[e+112]);if(01){a=27;c=28}else{a=27;c=29}d:for(;;)if(c==28){B=a==28?B:0;var z=B+1,A=(a==28?A:i)>>1,B=B+1;if(A>1)c=a=28;else{a=28;c=29}}else if(c==29){IHEAP[k+8]=a==27?0:z;var D=IHEAP[f+5600];if(D>1){a=29; c=30}else{a=29;c=31}break d}d:for(;;)if(c==30){N=a==30?N:0;var J=N+1,E=(a==30?E:D)>>1,N=N+1;if(E>1)c=a=30;else{a=30;c=31}}else if(c==31){IHEAP[k+12]=a==29?0:J;IHEAP[k+16]=IHEAP[f+5604];IHEAP[k+20]=IHEAP[f+5608]!=0?0:1;IHEAP[k+24]=IHEAP[f+5608]!=0?2:0;IHEAP[k+804]=2;c=h==IHEAP[f+5612]?32:33;break d}if(c==32)IHEAP[k+808]=IHEAP[f+5616];else if(c==33)IHEAP[k+808]=0;r=IHEAP[f+18676]!=0;d:do if(r){IHEAP[k+812]=7;IHEAP[k+944]=7;i=1;if(!(i=0)a=38;else break d;for(;;){T=a==51?T:0;q=T+1;u=T1){a=42;c=43}else{a=42;c=44}for(;;)if(c==43){P=a==43?P:0;var Q=P+1,S=(a==43?S:v)>>1,P=P+1;if(S>1)c=a=43;else{a=43;c=44}}else if(c==44){IHEAP[k+812+i*4]=a==42?0:Q;break g}}while(0);if(IHEAP[f+5756+T*4]<1)IHEAP[k+944+i*4]=1;else{t=IHEAP[f+5756+T*4];if(t>1){a= 48;c=49}else{a=48;c=50}for(;;)if(c==49){L=a==49?L:0;var G=L+1,F=(a==49?F:t)>>1,L=L+1;if(F>1)c=a=49;else{a=49;c=50}}else if(c==50){IHEAP[k+944+i*4]=a==48?0:G;break f}}}else{a=IHEAP[s+5620];t=IHEAP[f+5624+(a-1)*4]>>q-a;v=IHEAP[f+5756+(a-1)*4]>>q-a;y=t<1;g:do if(y)IHEAP[k+812+i*4]=1;else{if(t>1){a=54;c=55}else{a=54;c=56}for(;;)if(c==55){M=a==55?M:0;var K=M+1,H=(a==55?H:t)>>1,M=M+1;if(H>1)c=a=55;else{a=55;c=56}}else if(c==56){IHEAP[k+812+i*4]=a==54?0:K;break g}}while(0);if(v<1)IHEAP[k+944+i*4]=1;else{if(v> 1){a=59;c=60}else{a=59;c=61}for(;;)if(c==60){R=a==60?R:0;var I=R+1,O=(a==60?O:v)>>1,R=R+1;if(O>1)c=a=60;else{a=60;c=61}}else if(c==61){IHEAP[k+944+i*4]=a==59?0:I;break f}}}while(0);var T=T+1;i=a=i+-1;if(a>=0)a=51;else break d}}else{i=0;if(!(i(IHEAP[g+40]/(IHEAP[D]*IHEAP[B])|0);f:do if(S)FHEAP[Q]-= IHEAP[g+40]/(IHEAP[E]*IHEAP[J])|0;else{if(FHEAP[Q]==0)break f;FHEAP[Q]=1}while(0);var P=P+1;if(d1?e:1)-0;for(f=0;;){o=f==0?0:o;var j=0+o;f=a+428+j*148+36;var k=a+428+j*148+16,m=a+428+j*148+12,l=a+428+j*148+8,n=a+428+j*148+4;_cio_write(b,IHEAP[a+428+j*148],1);_cio_write(b,IHEAP[n],g);_cio_write(b,IHEAP[l],2);j=IHEAP[l]; n=IHEAP[h];IHEAP[l]=j1?c:1)-0;for(e=2;;){i=e==2?0:i;var h=0+i;e=IHEAP[a+28+h*8];h=IHEAP[a+28+h*8+4];IHEAP[g]==0?_cio_write(d,e<<3,1):_cio_write(d,h+e*2048,2);var i=i+1;if(i!=c)e=5;else break}}}_j2k_write_qcx.__index__=Runtime.getFunctionIndex(_j2k_write_qcx,"_j2k_write_qcx"); function _j2k_write_cox(b,f){var e=null,c,a;c=IHEAP[IHEAP[IHEAP[b+64]+108]+5588*IHEAP[b+8]+5584]+1076*f;a=IHEAP[b+72];_cio_write(a,IHEAP[c+4]-1,1);_cio_write(a,IHEAP[c+8]-2,1);_cio_write(a,IHEAP[c+12]-2,1);_cio_write(a,IHEAP[c+16],1);_cio_write(a,IHEAP[c+20],1);var d=(IHEAP[c]&1)!=0;a:do if(d){if(!(0>5;a=IHEAP[f+24]==1;a:do if(a)c=21;else{var g=e-1;if(IHEAP[f+24]==0){c=3;break a}var h=g/2|0;c=5}while(0);a=c==21?1:c==5?h:g;c=0;e=IHEAP[f+24];if(cc?a:c)-h;for(c=7;;){n=c==7?0:n;var i=h+n;d=f+28+i*8+4;i=f+28+i*8;if((c==7?e:l)==0){var j=_cio_read(b, 1)>>>3;c=9}else{c=_cio_read(b,2);var k=c>>11,m=c&2047;c=11}l=c==11?m:0;IHEAP[i]=c==11?k:j;IHEAP[d]=l;var l=IHEAP[g],n=n+1;if(n!=a)c=12;else break}c=13}else c=4;if((c==13?l:e)==1){c=1;j=f+28;k=f+28;m=f+28+4;l=c;b=97-l;n=l+-1;for(c=15;;){p=c==15?0:p;c=n+p;g=l+p;e=f+28+g*8+4;g=f+28+g*8;if(IHEAP[j]-(c/3|0)>0){var o=IHEAP[k]-(c/3|0);c=17}else c=16;IHEAP[g]=c==17?o:0;IHEAP[e]=IHEAP[m];var p=p+1;if(p!=b)c=19;else break}}}_j2k_read_qcx.__index__=Runtime.getFunctionIndex(_j2k_read_qcx,"_j2k_read_qcx"); function _j2k_read_cox(b,f){var e=null,c,a,d;c=IHEAP[b+64];if(IHEAP[b+4]==16){a=IHEAP[c+108]+5588*IHEAP[b+8];e=0}else{d=IHEAP[b+56];e=2}a=IHEAP[(e==0?a:d)+5584]+1076*f;d=IHEAP[b+72];e=_cio_read(d,1)+1;IHEAP[a+4]=e;if(IHEAP[c+36]>=IHEAP[a+4]){_opj_event_msg(IHEAP[b],1,__str896,Pointer_make([f,0,0,0],0,ALLOC_STACK));IHEAP[b+4]|=128}e=_cio_read(d,1)+2;IHEAP[a+8]=e;e=_cio_read(d,1)+2;IHEAP[a+12]=e;e=_cio_read(d,1);IHEAP[a+16]=e;e=_cio_read(d,1);IHEAP[a+20]=e;c=(IHEAP[a]&1)!=0;a:do if(c){e=0;if(!(e>4;var p=p+1;if(e=IHEAP[f+20]){a=5;break a}_jp2_read_boxhdr(y,f,v)}if(1785737832!=IHEAP[p])a=1;else{a=9;break a}}a:do if(a==2){_opj_event_msg(y,1,__str1198);q=0}else if(a==5)q=0;else if(a==9){t=f;q=b;u=t;t=IHEAP[q];_jp2_read_boxhdr(t, u,s);if(1768449138!=IHEAP[s+4])_opj_event_msg(t,1,__str14102);else{p=_cio_read(u,4);IHEAP[q+12]=p;p=_cio_read(u,4);IHEAP[q+8]=p;p=_cio_read(u,2);IHEAP[q+16]=p;p=_malloc(IHEAP[q+16]*12);IHEAP[q+68]=p;p=_cio_read(u,1);IHEAP[q+20]=p;p=_cio_read(u,1);IHEAP[q+24]=p;p=_cio_read(u,1);IHEAP[q+28]=p;p=_cio_read(u,1);IHEAP[q+32]=p;q=u;if(0-IHEAP[q+16]+IHEAP[q+24]+(0-IHEAP[s+8])!=IHEAP[s])_opj_event_msg(t,1,__str1522);else{s=IHEAP[v]+IHEAP[v+8];q=IHEAP[b+20]==255;b:do if(q){q=f;p=b;r=q;q=IHEAP[p];_jp2_read_boxhdr(q, r,c);if(1651532643!=IHEAP[c+4])_opj_event_msg(q,1,__str12100);else{t=r;if(00))break d;j=h;j=IHEAP[j+24];l=_malloc(i);IHEAP[n]=l;IHEAP[n+4]=i;l=h;var E=IHEAP[g+ 8],N=IHEAP[g];m=h;m=N+E+(0-IHEAP[m+24])+(0-(0-IHEAP[m+16]));l=l;m=m;IHEAP[l+24]+=m;_llvm_memcpy_p0i8_p0i8_i32(IHEAP[n],j,i,1,0)}}while(0);d=h;if(0-IHEAP[d+16]+IHEAP[d+24]+(0-IHEAP[g+8])!=IHEAP[g]){_opj_event_msg(a,1,__str1121);a=20}else{IHEAP[n+16]=1;a=24}}break c}while(0);if(a==20){a=IHEAP[C]+8;d=f;a=a;IHEAP[d+24]=IHEAP[d+16]+a;a=IHEAP[q]-8;d=f;a=a;IHEAP[d+24]+=a}}else if(IHEAP[t]==1667523942){d=e;g=f;d=d;h=IHEAP[d+8]!=0;c:do{if(h)a=31;else{h=_cio_read(g,2)&65535;if(h==0)a=31;else{a=_malloc(h*6); n=_malloc(8);IHEAP[d+8]=n;IHEAP[IHEAP[d+8]]=a;IHEAP[IHEAP[d+8]+4]=h;n=0>3);IHEAP[F]=L;var K=K+1;if(di)){d=37;break f}d=38}while(0);IHEAP[B]=IHEAP[r+4*((d==37?D:d==38?o:0)*y+z)];m=m+1;if(m!=A)d=39; else break e}}while(0);l+=1;if(!(l16384)break b;_j2k_setup_encoder(IHEAP[b+4],f,e);IHEAP[b+52]=1785737760;IHEAP[b+56]=0;IHEAP[b+60]=1;a=_malloc(IHEAP[b+60]*4);IHEAP[b+64]=a;IHEAP[IHEAP[b+64]]=1785737760;IHEAP[b+16]=IHEAP[e+16];a=_malloc(IHEAP[b+16]*12);IHEAP[b+68]=a;IHEAP[b+12]=IHEAP[e+12]-IHEAP[e+4];IHEAP[b+8]=IHEAP[e+8]-IHEAP[e];f=IHEAP[IHEAP[e+24]+24]-1;a=IHEAP[IHEAP[e+24]+32];IHEAP[b+ 20]=a*128+f;a=1;if(a>7==1;c<<=7;c=e&127|c;if(a){c=c;for(e=0;;){d=e==0?c:d;e=_cio_read(b,1)&255;var d=e&127|d<<7;if(e>>7==1)e=1;else break}c=d}return c}_jpt_read_VBAS_info.__index__=Runtime.getFunctionIndex(_jpt_read_VBAS_info,"_jpt_read_VBAS_info");function _jpt_init_msg_header(b){IHEAP[b]=0;IHEAP[b+4]=0;IHEAP[b+8]=0;IHEAP[b+12]=0;IHEAP[b+16]=0;IHEAP[b+20]=0;IHEAP[b+24]=0} _jpt_init_msg_header.__index__=Runtime.getFunctionIndex(_jpt_init_msg_header,"_jpt_init_msg_header");function _jpt_reinit_msg_header(b){IHEAP[b]=0;IHEAP[b+4]=0;IHEAP[b+16]=0;IHEAP[b+20]=0}_jpt_reinit_msg_header.__index__=Runtime.getFunctionIndex(_jpt_reinit_msg_header,"_jpt_reinit_msg_header"); function _jpt_read_msg_header(b,f,e){var c,a,d,g;g=d=0;IHEAP[e]=0;IHEAP[e+4]=0;IHEAP[e+16]=0;IHEAP[e+20]=0;a=_cio_read(f,1)&255;c=a>>5&3;c=c==0?5:c==1?6:c==2?7:c==3?8:9;if(c==5)_opj_event_msg(b,1,__str23104);else if(c==6)g=d=0;else if(c==7){d=1;g=0}else if(c==8)g=d=1;if((a>>4&1)==1)IHEAP[e+4]=1;IHEAP[e]|=a&15;if(a>>7==1){b=_jpt_read_VBAS_info(f,IHEAP[e]);IHEAP[e]=b}if(d==1){IHEAP[e+8]=0;d=_jpt_read_VBAS_info(f,IHEAP[e+8]);IHEAP[e+8]=d}if(g==1){IHEAP[e+12]=0;g=_jpt_read_VBAS_info(f,IHEAP[e+12]);IHEAP[e+ 12]=g}g=_jpt_read_VBAS_info(f,IHEAP[e+16]);IHEAP[e+16]=g;g=_jpt_read_VBAS_info(f,IHEAP[e+20]);IHEAP[e+20]=g;if((IHEAP[e+8]&1)==1){IHEAP[e+24]=0;f=_jpt_read_VBAS_info(f,IHEAP[e+24]);IHEAP[e+24]=f}}_jpt_read_msg_header.__index__=Runtime.getFunctionIndex(_jpt_read_msg_header,"_jpt_read_msg_header"); function _mct_encode(b,f,e,c){var a=null;if(01?c:1)-0;for(a=0;;){a=a==0?0:l;l=0+a;var d=e+4*l,g=f+4*l,h=IHEAP[b+4*l],i=IHEAP[f+4*l],j=IHEAP[e+4*l],k=j-i,m=h-i;IHEAP[b+4*l]=j+h+i*2>>2;IHEAP[g]=k;IHEAP[d]=m;var l=a+1;if(l!=c)a=1;else break}}}_mct_encode.__index__=Runtime.getFunctionIndex(_mct_encode,"_mct_encode"); function _mct_decode(b,f,e,c){var a=null;if(01?c:1)-0;for(a=0;;){a=a==0?0:k;k=0+a;var d=e+4*k,g=f+4*k,h=IHEAP[f+4*k],i=IHEAP[e+4*k],j=IHEAP[b+4*k]-(i+h>>2);h=j+h;IHEAP[b+4*k]=j+i;IHEAP[g]=j;IHEAP[d]=h;var k=a+1;if(k!=c)a=1;else break}}}_mct_decode.__index__=Runtime.getFunctionIndex(_mct_decode,"_mct_decode");function _mct_getnorm(b){return FHEAP[_mct_norms+b*8]}_mct_getnorm.__index__=Runtime.getFunctionIndex(_mct_getnorm,"_mct_getnorm"); function _mct_encode_real(b,f,e,c){var a=null;if(01?c:1)-0;for(a=0;;){a=a==0?0:r;r=0+a;var d=e+4*r,g=f+4*r,h=IHEAP[b+4*r],i=IHEAP[f+4*r],j=IHEAP[e+4*r],k=2449*h,m=4809*i,l=934*j,n=1382*h,o=2714*i,p=4096*j;n=0-(o+(o&4096)>>13&4294967295)+(0-(n+(n&4096)>>13&4294967295))+(p+(p&4096)>>13&4294967295);h=4096*h;i=3430*i;j=666*j;j=0-(i+(i&4096)>>13&4294967295)+(h+(h&4096)>>13&4294967295)+(0-(j+(j&4096)>>13&4294967295));IHEAP[b+4*r]=(m+(m&4096)>>13&4294967295)+(k+(k&4096)>>13&4294967295)+(l+(l&4096)>> 13&4294967295);IHEAP[g]=n;IHEAP[d]=j;var r=a+1;if(r!=c)a=1;else break}}}_mct_encode_real.__index__=Runtime.getFunctionIndex(_mct_encode_real,"_mct_encode_real");function _mct_decode_real(b,f,e,c){var a=null;if(01?c:1)-0;for(a=0;;){a=a==0?0:m;m=0+a;var d=e+4*m,g=f+4*m,h=FHEAP[b+4*m],i=FHEAP[f+4*m],j=FHEAP[e+4*m],k=h-i*0.3441300094127655-j*0.714139997959137;i=h+i*1.7719999551773071;FHEAP[b+4*m]=h+j*1.4019999504089355;FHEAP[g]=k;FHEAP[d]=i;var m=a+1;if(m!=c)a=1;else break}}} _mct_decode_real.__index__=Runtime.getFunctionIndex(_mct_decode_real,"_mct_decode_real");function _mct_getnorm_real(b){return FHEAP[_mct_norms_real+b*8]}_mct_getnorm_real.__index__=Runtime.getFunctionIndex(_mct_getnorm_real,"_mct_getnorm_real");function _mqc_create(){return _malloc(104)}_mqc_create.__index__=Runtime.getFunctionIndex(_mqc_create,"_mqc_create");function _mqc_destroy(b){b!=0&&_free(b)}_mqc_destroy.__index__=Runtime.getFunctionIndex(_mqc_destroy,"_mqc_destroy"); function _mqc_numbytes(b){return IHEAP[b+12]-IHEAP[b+16]}_mqc_numbytes.__index__=Runtime.getFunctionIndex(_mqc_numbytes,"_mqc_numbytes");function _mqc_init_enc(b,f){IHEAP[b+100]=b+24;IHEAP[b+4]=32768;IHEAP[b]=0;IHEAP[b+12]=f+-1;IHEAP[b+8]=12;if(IHEAP[IHEAP[b+12]]==255)IHEAP[b+8]=13;IHEAP[b+16]=f}_mqc_init_enc.__index__=Runtime.getFunctionIndex(_mqc_init_enc,"_mqc_init_enc"); function _mqc_encode(b,f){var e,c,a=IHEAP[IHEAP[IHEAP[b+100]]+4]==f;a:do if(a){c=b;IHEAP[c+4]-=IHEAP[IHEAP[IHEAP[c+100]]];var d=c;if((IHEAP[c+4]&32768)==0){var g=IHEAP[IHEAP[IHEAP[c+100]]],h=c;if(IHEAP[d+4]=f)IHEAP[b]-=32768;IHEAP[b]<<=IHEAP[b+8];_mqc_byteout(b);IHEAP[b]<<=IHEAP[b+8];_mqc_byteout(b);if(IHEAP[IHEAP[b+12]]!=255)IHEAP[b+12]+=1}_mqc_flush.__index__=Runtime.getFunctionIndex(_mqc_flush,"_mqc_flush"); function _mqc_byteout(b){if(IHEAP[IHEAP[b+12]]==255){IHEAP[b+12]+=1;IHEAP[IHEAP[b+12]]=IHEAP[b]>>>20&255;IHEAP[b]&=1048575;IHEAP[b+8]=7}else{var f=b+12,e=IHEAP[f];if((IHEAP[b]&134217728)==0){IHEAP[f]=e+1;IHEAP[IHEAP[b+12]]=IHEAP[b]>>>19&255;IHEAP[b]&=524287;IHEAP[b+8]=8}else{IHEAP[e]+=1;if(IHEAP[IHEAP[b+12]]==255){IHEAP[b]&=134217727;IHEAP[b+12]+=1;IHEAP[IHEAP[b+12]]=IHEAP[b]>>>20&255;IHEAP[b]&=1048575;IHEAP[b+8]=7}else{IHEAP[b+12]+=1;IHEAP[IHEAP[b+12]]=IHEAP[b]>>>19&255;IHEAP[b]&=524287;IHEAP[b+ 8]=8}}}}_mqc_byteout.__index__=Runtime.getFunctionIndex(_mqc_byteout,"_mqc_byteout");function _mqc_bypass_init_enc(b){IHEAP[b]=0;IHEAP[b+8]=8}_mqc_bypass_init_enc.__index__=Runtime.getFunctionIndex(_mqc_bypass_init_enc,"_mqc_bypass_init_enc");function _mqc_bypass_enc(b,f){IHEAP[b+8]+=-1;IHEAP[b]=(f<0){var e=b+8,c=b+8,a=b;for(f=0;;){d=f==0?0:d;IHEAP[(f==0?b:a)+8]+=-1;IHEAP[b]+=d<0)f=1;else break}f=2}else f=4;IHEAP[(f==2?a:b)+12]+=1;IHEAP[IHEAP[b+12]]=IHEAP[b]&255;IHEAP[b+8]=8;IHEAP[b]=0}return 1}_mqc_bypass_flush_enc.__index__=Runtime.getFunctionIndex(_mqc_bypass_flush_enc,"_mqc_bypass_flush_enc"); function _mqc_reset_enc(b){var f=null;for(f=0;;){f=f==0?0:e;IHEAP[b+24+(0+f)*4]=_mqc_states;var e=f+1;if(e!=19)f=1;else break}IHEAP[b+24+72]=_mqc_states+1472;IHEAP[b+24+68]=_mqc_states+96;IHEAP[b+24+0]=_mqc_states+128}_mqc_reset_enc.__index__=Runtime.getFunctionIndex(_mqc_reset_enc,"_mqc_reset_enc");function _mqc_resetstates(b){var f=null;for(f=0;;){f=f==0?0:e;IHEAP[b+24+(0+f)*4]=_mqc_states;var e=f+1;if(e!=19)f=1;else break}}_mqc_resetstates.__index__=Runtime.getFunctionIndex(_mqc_resetstates,"_mqc_resetstates"); function _mqc_setstate(b,f,e,c){IHEAP[b+24+f*4]=_mqc_states+(c*2+e)*16}_mqc_setstate.__index__=Runtime.getFunctionIndex(_mqc_setstate,"_mqc_setstate");function _mqc_restart_enc(b){var f=null,e;e=12-IHEAP[b+8];IHEAP[b]<<=IHEAP[b+8];var c=e>0;_mqc_byteout(b);if(c){c=b+8;var a=b+8;for(f=0;;){var d=(f==0?e:d)-IHEAP[c];IHEAP[b]<<=IHEAP[a];f=d>0;_mqc_byteout(b);if(f)f=1;else break}}return 1}_mqc_restart_enc.__index__=Runtime.getFunctionIndex(_mqc_restart_enc,"_mqc_restart_enc"); function _mqc_restart_init_enc(b){IHEAP[b+100]=b+24;IHEAP[b+4]=32768;IHEAP[b]=0;IHEAP[b+8]=12;IHEAP[b+12]+=-1;if(IHEAP[IHEAP[b+12]]==255)IHEAP[b+8]=13}_mqc_restart_init_enc.__index__=Runtime.getFunctionIndex(_mqc_restart_init_enc,"_mqc_restart_init_enc"); function _mqc_erterm_enc(b){var f=null,e=11-IHEAP[b+8]+1;if(e>0){var c=b+8,a=b+8,d=b;for(f=0;;){g=f==0?e:g;IHEAP[b]<<=IHEAP[(f==0?b:d)+8];IHEAP[c]=0;_mqc_byteout(b);var g=g-IHEAP[a];if(g>0)f=1;else break}f=2}else f=4;if(IHEAP[IHEAP[(f==2?d:b)+12]]!=255)_mqc_byteout(b)}_mqc_erterm_enc.__index__=Runtime.getFunctionIndex(_mqc_erterm_enc,"_mqc_erterm_enc");function _mqc_segmark_enc(b){var f=null;IHEAP[b+100]=b+24+72;for(f=0;;){f=f==0?0:e;_mqc_encode(b,(1+f)%2);var e=f+1;if(e!=4)f=1;else break}} _mqc_segmark_enc.__index__=Runtime.getFunctionIndex(_mqc_segmark_enc,"_mqc_segmark_enc");function _mqc_init_dec(b,f,e){IHEAP[b+100]=b+24;IHEAP[b+16]=f;IHEAP[b+20]=f+e;IHEAP[b+12]=f;IHEAP[b]=e==0?16711680:IHEAP[IHEAP[b+12]]<<16;_mqc_bytein(b);IHEAP[b]<<=7;IHEAP[b+8]-=7;IHEAP[b+4]=32768}_mqc_init_dec.__index__=Runtime.getFunctionIndex(_mqc_init_dec,"_mqc_init_dec"); function _mqc_bytein(b){var f;if(IHEAP[b+12]!=IHEAP[b+20]){f=IHEAP[b+12]+1!=IHEAP[b+20]?IHEAP[IHEAP[b+12]+1]:255;if(IHEAP[IHEAP[b+12]]==255)if(f>143){IHEAP[b]+=65280;IHEAP[b+8]=8}else{IHEAP[b+12]+=1;IHEAP[b]+=f*512;IHEAP[b+8]=7}else{IHEAP[b+12]+=1;IHEAP[b]+=f*256;IHEAP[b+8]=8}}else{IHEAP[b]+=65280;IHEAP[b+8]=8}}_mqc_bytein.__index__=Runtime.getFunctionIndex(_mqc_bytein,"_mqc_bytein"); function _mqc_decode(b){var f,e,c;IHEAP[b+4]-=IHEAP[IHEAP[IHEAP[b+100]]];var a=unSign(IHEAP[b],32,true)>>>unSign(16,32,true);f=IHEAP[IHEAP[IHEAP[b+100]]];a=unSign(a,32,true)O?I:O;I=IHEAP[r]* c+IHEAP[p];O=IHEAP[q];IHEAP[h+232*g+204]=I>O?I:O;M=IHEAP[s]*(M+1)+IHEAP[u];I=IHEAP[t];IHEAP[h+232*g+208]=MR){var fa=IHEAP[V+16*c+8];a=11}else a=9;var ca=a==11?fa:R;if(0>X+Z;Y=M+(1<>X+Z;var aa=qa+-1+(1<>X+Z;Z=O+(1<>X+Z;var ka=a>>IHEAP[j]<>IHEAP[j+4]<>ga<>ja<>IHEAP[j];a=16}IHEAP[j+8]=a==16?ia:0;if(Y== Z)a=35;else{var ea=ja-X>>IHEAP[j+4];a=18}IHEAP[j+12]=a==18?ea:0;if(IHEAP[j+12]*IHEAP[j+8]>pa){var oa=IHEAP[j+12]*IHEAP[j+8];a=20}else a=30;var pa=a==30?pa:oa,da=da+1;if(WQ?N:Q;N=IHEAP[r]*E+IHEAP[p];Q=IHEAP[q];IHEAP[i+ 232*h+204]=N>Q?N:Q;d=IHEAP[s]*(d+1)+IHEAP[u];N=IHEAP[t];IHEAP[i+232*h+208]=dS){var L=IHEAP[G+16*E+8];d=11}else d=9;var K=d==11?L:S;if(0>T+O;I=N+(1<>T+O;var V=aa+-1+(1<>T+O;O=F+(1<>T+O;var ba=d>>IHEAP[k]<>IHEAP[k+4]<>fa<>ca<>IHEAP[k];d=16}IHEAP[k+8]=d==16?U:0;if(I==O)d=55;else{var $=ca-T>>IHEAP[k+4]; d=18}IHEAP[k+12]=d==18?$:0;if(IHEAP[k+12]*IHEAP[k+8]>Z){var Y=IHEAP[k+12]*IHEAP[k+8];d=20}else d=50;var Z=d==50?Z:Y,W=W+1;if(R0)){a=46;break b}if(IHEAP[j+ 428+h*148+84]>IHEAP[j+428+(h-1)*148+84]){var ea=IHEAP[j+428+(h-1)*148+84];d=47}else d=45;IHEAP[j+428+h*148+68]=d==47?ea:0;a=46;break b}else a=43;while(0);if(a==43){IHEAP[j+428+h*148+76]=0;IHEAP[j+428+h*148+92]=IHEAP[D];IHEAP[j+428+h*148+72]=0;IHEAP[j+428+h*148+88]=S;IHEAP[j+428+h*148+68]=0;IHEAP[j+428+h*148+84]=IHEAP[j+12];IHEAP[j+428+h*148+36]=IHEAP[j+8]}IHEAP[j+428+h*148+80]=0;IHEAP[j+428+h*148+96]=P;IHEAP[j+428+h*148+100]=IHEAP[i+232*h+200];IHEAP[j+428+h*148+104]=IHEAP[i+232*h+208];IHEAP[j+428+ h*148+108]=IHEAP[i+232*h+204];IHEAP[j+428+h*148+112]=IHEAP[i+232*h+212];IHEAP[j+428+h*148+116]=IHEAP[i+232*h+224];IHEAP[j+428+h*148+120]=IHEAP[i+232*h+228];h+=1;d=46;a=2}if(a==4)g=i;else if(a==6){_pi_destroy(i,f,e);g=0}else if(a==10){_pi_destroy(i,f,e);g=0}else if(a==42){_pi_destroy(i,f,e);g=0}}else g=0;return g}_pi_initialise_encode.__index__=Runtime.getFunctionIndex(_pi_initialise_encode,"_pi_initialise_encode"); function _pi_next(b){var f,e=null,c,a,d,g,h,i,j,k,m,l,n,o,p,r,q,u,s,t,v,y,x;e=IHEAP[b+44+36];f=e==0?144:e==1?145:e==2?146:e==3?147:e==4?148:e==-1?149:150;if(f==150)x=0;else if(f==144){g=a=0;d=IHEAP[b+40]!=0;a:do{if(d){IHEAP[b+40]=0;IHEAP[b+36]=IHEAP[b+44+20];f=1}else{a=IHEAP[b+196]+16*IHEAP[b+24];f=0}break a}while(0);a:for(;;){b:do if(f==1){if(!(IHEAP[b+36]=IHEAP[a+8])f=10;else{f=11;break}}else if(f==10){IHEAP[b+24]+=1;f=7}if(f==9){IHEAP[C+28]+=1;f=4}else if(f==11){d=IHEAP[a+12]+16*IHEAP[b+28];if(IHEAP[b]==0)IHEAP[b+44+28]=IHEAP[d+12]*IHEAP[d+8];IHEAP[b+32]=IHEAP[b+44+24]; f=13}}if(f==6){IHEAP[w+36]+=1;f=1}else if(f==14){g=IHEAP[b+12]*IHEAP[b+28]+IHEAP[b+8]*IHEAP[b+36]+IHEAP[b+16]*IHEAP[b+24]+IHEAP[b+20]*IHEAP[b+32];if(IHEAP[IHEAP[b+4]+2*g]!=0)f=0;else{f=15;break a}}}if(f==3)y=0;else if(f==15)y=IHEAP[IHEAP[b+4]+2*g]=1;x=y}else if(f==145){g=a=0;d=IHEAP[b+40]!=0;a:do{if(d){IHEAP[b+40]=0;IHEAP[b+28]=IHEAP[b+44];f=19}else{a=IHEAP[b+196]+16*IHEAP[b+24];f=18}break a}while(0);a:for(;;){b:do if(f==19){if(!(IHEAP[b+28]=IHEAP[a+8])f=28;else{f=29;break}}else if(f==28){IHEAP[b+24]+=1;f=25}if(f==27){IHEAP[A+36]+=1;f=22}else if(f==29){d=IHEAP[a+ 12]+16*IHEAP[b+28];if(IHEAP[b]==0)IHEAP[b+44+28]=IHEAP[d+12]*IHEAP[d+8];IHEAP[b+32]=IHEAP[b+44+24];f=31}}if(f==24){IHEAP[z+28]+=1;f=19}else if(f==32){g=IHEAP[b+12]*IHEAP[b+28]+IHEAP[b+8]*IHEAP[b+36]+IHEAP[b+16]*IHEAP[b+24]+IHEAP[b+20]*IHEAP[b+32];if(IHEAP[IHEAP[b+4]+2*g]!=0)f=18;else{f=33;break a}}}if(f==21)c=0;else if(f==33)c=IHEAP[IHEAP[b+4]+2*g]=1;x=c}else if(f==146){d=g=a=0;h=IHEAP[b+40]!=0;a:do if(h){IHEAP[b+40]=0;IHEAP[b+224]=0;IHEAP[b+228]=0;if(0=IHEAP[a+8])f=58;else{g=IHEAP[a+12]+16*IHEAP[b+28];l=IHEAP[a+8]+-1+(0-IHEAP[b+28]);i=IHEAP[a]<>i;j=IHEAP[g];h=n;j=j;h=i-(h>>j);j=IHEAP[a+4]<>j;k=IHEAP[g+4];i=o;k=k;i=j-(i>>k);IHEAP[b+32]=IHEAP[g+8]*i+h;IHEAP[b+36]=IHEAP[b+44+20];f=68}}if(f==53){IHEAP[N+28]+=1;f=48}else if(f==69){d=IHEAP[b+12]*IHEAP[b+28]+IHEAP[b+8]*IHEAP[b+36]+IHEAP[b+16]*IHEAP[b+24]+IHEAP[b+20]*IHEAP[b+32];if(IHEAP[IHEAP[b+ 4]+2*d]!=0)f=70;else{f=71;break a}}}if(f==50)m=0;else if(f==71)m=IHEAP[IHEAP[b+4]+2*d]=1;x=m}else if(f==147){k=j=i=0;p=IHEAP[b+40]!=0;a:do{if(p){IHEAP[b+40]=0;IHEAP[b+224]=0;IHEAP[b+228]=0;if(0>u;r=IHEAP[j];p=q;r=r;p=u-(p>>r);r=IHEAP[i+4]<>r;s=IHEAP[j+4];u=t;s=s;u=r-(u>> s);IHEAP[b+32]=IHEAP[j+8]*u+p;IHEAP[b+36]=IHEAP[b+44+20];f=106}}if(f==92){p=b+220;IHEAP[p]=0-IHEAP[b+220]%IHEAP[b+228]+IHEAP[d+228]+IHEAP[p];f=87}else if(f==107){k=IHEAP[b+12]*IHEAP[b+28]+IHEAP[b+8]*IHEAP[b+36]+IHEAP[b+16]*IHEAP[b+24]+IHEAP[b+20]*IHEAP[b+32];if(IHEAP[IHEAP[b+4]+2*k]!=0)f=73;else{f=108;break a}}}if(f==89)a=0;else if(f==108)a=IHEAP[IHEAP[b+4]+2*k]=1;x=a}else if(f==148){g=d=a=0;h=IHEAP[b+40]!=0;a:do{if(h){IHEAP[b+40]=0;IHEAP[b+24]=IHEAP[b+44+4];f=111}else{a=IHEAP[b+196]+16*IHEAP[b+24]; f=110}break a}while(0);a:for(;;){b:do if(f==111){if(!(IHEAP[b+24]>q;m=IHEAP[d];h=s;m=m;h=q-(h>>m);m=IHEAP[a+4]<>m;l=IHEAP[d+4];q=v;l=l;q=m-(q>>l);IHEAP[b+32]=IHEAP[d+8]*q+h;IHEAP[b+36]=IHEAP[b+44+20];f=140}}if(f==126){IHEAP[k+24]+=1;f=111}else if(f==141){g=IHEAP[b+12]*IHEAP[b+28]+IHEAP[b+8]*IHEAP[b+36]+IHEAP[b+16]*IHEAP[b+24]+IHEAP[b+20]*IHEAP[b+32];if(IHEAP[IHEAP[b+4]+2*g]!=0)f=110;else{f=142;break a}}}if(f==113)i=0;else if(f==142)i=IHEAP[IHEAP[b+4]+2*g]=1;x=i}else if(f== 149)x=0;return x}_pi_next.__index__=Runtime.getFunctionIndex(_pi_next,"_pi_next"); function _pi_create_encode(b,f,e,c,a,d,g,h){var i=STACKTOP;STACKTOP+=4;_memset(i,0,4);var j,k=null,m;e=IHEAP[f+108]+5588*e+428+c*148;IHEAP[b+232*c+40]=1;IHEAP[b+232*c+44+36]=IHEAP[e+36];var l=IHEAP[e+36];j=l==4?42:l==0?43:l==3?44:l==1?45:l==2?46:l==-1?47:0;a:do if(j==42){_llvm_memcpy_p0i8_p0i8_i32(i,__str29106,4,1,0);j=0;break a}else if(j==43){_llvm_memcpy_p0i8_p0i8_i32(i,__str130,4,1,0);j=0;break a}else if(j==44){_llvm_memcpy_p0i8_p0i8_i32(i,__str231,4,1,0);j=0;break a}else if(j==45){_llvm_memcpy_p0i8_p0i8_i32(i, __str332,4,1,0);j=0;break a}else if(j==46){_llvm_memcpy_p0i8_p0i8_i32(i,__str433,4,1,0);j=0;break a}else if(j==47){j=m=1;break a}while(0);if(j==0){m=IHEAP[f+16]!=0;a:do if(m){m=IHEAP[f]!=0;b:do if(m)j=3;else{j=g==1?2:3;break b}while(0);if(j==3)if(IHEAP[f]==0){j=5;break a}if(!(af){IHEAP[b+232*c+44+4]=IHEAP[e+76];IHEAP[b+232*c+44+16]=IHEAP[e+92];k=10}else if(g){IHEAP[e+132]=IHEAP[e+76];IHEAP[b+232*c+44+4]=IHEAP[e+132];IHEAP[b+232*c+44+16]=IHEAP[e+132]+1;IHEAP[e+132]+=1;k=12}else{j=IHEAP[e+132];if(u==1){k=e;if(j==IHEAP[e+92]){IHEAP[e+132]=IHEAP[k+76];IHEAP[b+232*c+44+4]=IHEAP[e+132];IHEAP[b+232*c+44+16]=IHEAP[e+132]+1;IHEAP[e+132]+=1;k=13}else{IHEAP[b+232*c+44+4]=IHEAP[k+132];IHEAP[b+232*c+44+16]=IHEAP[e+132]+1;IHEAP[e+132]+=1;k=14}}else{IHEAP[b+ 232*c+44+4]=j-1;IHEAP[b+232*c+44+16]=IHEAP[e+132];k=15}}else if(j==49)if(r>h){IHEAP[b+232*c+44]=IHEAP[e+72];IHEAP[b+232*c+44+12]=IHEAP[e+88];k=16}else if(m){IHEAP[e+128]=IHEAP[e+72];IHEAP[b+232*c+44]=IHEAP[e+128];IHEAP[b+232*c+44+12]=IHEAP[e+128]+1;IHEAP[e+128]+=1;k=17}else{j=IHEAP[e+128];if(u==1){k=e;if(j==IHEAP[e+88]){IHEAP[e+128]=IHEAP[k+72];IHEAP[b+232*c+44]=IHEAP[e+128];IHEAP[b+232*c+44+12]=IHEAP[e+128]+1;IHEAP[e+128]+=1;k=18}else{IHEAP[b+232*c+44]=IHEAP[k+128];IHEAP[b+232*c+44+12]=IHEAP[e+128]+ 1;IHEAP[e+128]+=1;k=19}}else{IHEAP[b+232*c+44]=j-1;IHEAP[b+232*c+44+12]=IHEAP[e+128];k=20}}else if(j==50)if(r>l){IHEAP[b+232*c+44+20]=IHEAP[e+68];IHEAP[b+232*c+44+8]=IHEAP[e+84];k=21}else if(n){IHEAP[e+124]=IHEAP[e+68];IHEAP[b+232*c+44+20]=IHEAP[e+124];IHEAP[b+232*c+44+8]=IHEAP[e+124]+1;IHEAP[e+124]+=1;k=22}else{j=IHEAP[e+124];if(u==1){k=e;if(j==IHEAP[e+84]){IHEAP[e+124]=IHEAP[k+68];IHEAP[b+232*c+44+20]=IHEAP[e+124];IHEAP[b+232*c+44+8]=IHEAP[e+124]+1;IHEAP[e+124]+=1;k=23}else{IHEAP[b+232*c+44+20]= IHEAP[k+124];IHEAP[b+232*c+44+8]=IHEAP[e+124]+1;IHEAP[e+124]+=1;k=24}}else{IHEAP[b+232*c+44+20]=j-1;IHEAP[b+232*c+44+8]=IHEAP[e+124];k=25}}else if(j==51){j=IHEAP[e+36];j=j==0?52:j==1?52:53;if(j==53)if(r>o){IHEAP[b+232*c+44+52]=IHEAP[e+100];IHEAP[b+232*c+44+60]=IHEAP[e+108];IHEAP[b+232*c+44+56]=IHEAP[e+104];IHEAP[b+232*c+44+64]=IHEAP[e+112];k=31}else if(p){IHEAP[e+140]=IHEAP[e+100];IHEAP[e+144]=IHEAP[e+108];IHEAP[b+232*c+44+52]=IHEAP[e+140];IHEAP[b+232*c+44+56]=IHEAP[e+116]+IHEAP[e+140]+(0-IHEAP[e+ 140]%IHEAP[e+116]);IHEAP[b+232*c+44+60]=IHEAP[e+144];IHEAP[b+232*c+44+64]=IHEAP[e+120]+IHEAP[e+144]+(0-IHEAP[e+144]%IHEAP[e+120]);IHEAP[e+140]=IHEAP[b+232*c+44+56];IHEAP[e+144]=IHEAP[b+232*c+44+64];k=32}else{k=IHEAP[e+140];r=e;if(u==1){j=e;if(k>=IHEAP[r+104]){var q=e;if(IHEAP[j+144]>=IHEAP[e+112]){IHEAP[e+144]=IHEAP[q+108];IHEAP[b+232*c+44+60]=IHEAP[e+144];IHEAP[b+232*c+44+64]=IHEAP[e+120]+IHEAP[e+144]+(0-IHEAP[e+144]%IHEAP[e+120]);IHEAP[e+144]=IHEAP[b+232*c+44+64];k=33}else{IHEAP[b+232*c+44+60]= IHEAP[q+144];IHEAP[b+232*c+44+64]=IHEAP[e+120]+IHEAP[e+144]+(0-IHEAP[e+144]%IHEAP[e+120]);IHEAP[e+144]=IHEAP[b+232*c+44+64];k=35}q=k==35?0:1;IHEAP[e+140]=IHEAP[e+100];IHEAP[b+232*c+44+52]=IHEAP[e+140];IHEAP[b+232*c+44+56]=IHEAP[e+116]+IHEAP[e+140]+(0-IHEAP[e+140]%IHEAP[e+116]);IHEAP[e+140]=IHEAP[b+232*c+44+56];k=36}else{IHEAP[b+232*c+44+52]=IHEAP[j+140];IHEAP[b+232*c+44+56]=IHEAP[e+116]+IHEAP[e+140]+(0-IHEAP[e+140]%IHEAP[e+116]);IHEAP[e+140]=IHEAP[b+232*c+44+56];IHEAP[b+232*c+44+60]=0-IHEAP[e+120]+ IHEAP[e+144]+(0-IHEAP[e+144]%IHEAP[e+120]);IHEAP[b+232*c+44+64]=IHEAP[e+144];k=37}}else{IHEAP[b+232*c+44+52]=0-IHEAP[r+116]+k+(0-IHEAP[e+140]%IHEAP[e+116]);IHEAP[b+232*c+44+56]=IHEAP[e+140];IHEAP[b+232*c+44+60]=0-IHEAP[e+120]+IHEAP[e+144]+(0-IHEAP[e+144]%IHEAP[e+120]);IHEAP[b+232*c+44+64]=IHEAP[e+144];k=38}}else if(j==52)if(r>d){IHEAP[b+232*c+44+24]=IHEAP[e+80];IHEAP[b+232*c+44+28]=IHEAP[e+96];k=26}else if(a){IHEAP[e+136]=IHEAP[e+80];IHEAP[b+232*c+44+24]=IHEAP[e+136];IHEAP[b+232*c+44+28]=IHEAP[e+ 136]+1;IHEAP[e+136]+=1;k=27}else{j=IHEAP[e+136];if(u==1){k=e;if(j==IHEAP[e+96]){IHEAP[e+136]=IHEAP[k+80];IHEAP[b+232*c+44+24]=IHEAP[e+136];IHEAP[b+232*c+44+28]=IHEAP[e+136]+1;IHEAP[e+136]+=1;k=28}else{IHEAP[b+232*c+44+24]=IHEAP[k+136];IHEAP[b+232*c+44+28]=IHEAP[e+136]+1;IHEAP[e+136]+=1;k=29}}else{IHEAP[b+232*c+44+24]=j-1;IHEAP[b+232*c+44+28]=IHEAP[e+136];k=30}}}var u=k==9?u:k==12?u:k==13?1:k==14?0:k==15?u:k==10?u:k==17?u:k==18?1:k==19?0:k==20?u:k==16?u:k==22?u:k==23?1:k==24?0:k==25?u:k==21?u:k==31? u:k==38?u:k==36?q:k==37?0:k==32?u:k==26?u:k==30?u:k==29?0:k==28?1:u,s=s+1;if(s!=4)k=39;else break}j=8;break a}else j=5;while(0);if(j==5){IHEAP[b+232*c+44]=IHEAP[e+72];IHEAP[b+232*c+44+12]=IHEAP[e+88];IHEAP[b+232*c+44+4]=IHEAP[e+76];IHEAP[b+232*c+44+16]=IHEAP[e+92];IHEAP[b+232*c+44+20]=IHEAP[e+68];IHEAP[b+232*c+44+8]=IHEAP[e+84];IHEAP[b+232*c+44+24]=IHEAP[e+80];IHEAP[b+232*c+44+28]=IHEAP[e+96];IHEAP[b+232*c+44+52]=IHEAP[e+100];IHEAP[b+232*c+44+60]=IHEAP[e+108];IHEAP[b+232*c+44+56]=IHEAP[e+104];IHEAP[b+ 232*c+44+64]=IHEAP[e+112]}m=0}b=m;STACKTOP=i;return b}_pi_create_encode.__index__=Runtime.getFunctionIndex(_pi_create_encode,"_pi_create_encode");function _raw_create(){return _malloc(28)}_raw_create.__index__=Runtime.getFunctionIndex(_raw_create,"_raw_create");function _raw_destroy(b){b!=0&&_free(b)}_raw_destroy.__index__=Runtime.getFunctionIndex(_raw_destroy,"_raw_destroy");function _raw_numbytes(b){return IHEAP[b+16]-IHEAP[b+20]}_raw_numbytes.__index__=Runtime.getFunctionIndex(_raw_numbytes,"_raw_numbytes"); function _raw_init_dec(b,f,e){IHEAP[b+20]=f;IHEAP[b+8]=e;IHEAP[b+12]=0;IHEAP[b]=0;IHEAP[b+4]=0}_raw_init_dec.__index__=Runtime.getFunctionIndex(_raw_init_dec,"_raw_init_dec");function _raw_decode(b){if(IHEAP[b+4]==0){IHEAP[b+4]=8;if(IHEAP[b+12]==IHEAP[b+8])IHEAP[b]=-1;else{if(IHEAP[b]==255)IHEAP[b+4]=7;IHEAP[b]=IHEAP[IHEAP[b+20]+IHEAP[b+12]];IHEAP[b+12]+=1}}IHEAP[b+4]+=-1;return IHEAP[b]>>IHEAP[b+4]&1}_raw_decode.__index__=Runtime.getFunctionIndex(_raw_decode,"_raw_decode"); function _t1_create(b){var f;f=_malloc(40);if(f!=0){IHEAP[f]=b;b=_malloc(104);IHEAP[f+4]=b;b=_malloc(28);IHEAP[f+8]=b;IHEAP[f+12]=0;IHEAP[f+16]=0;IHEAP[f+28]=0;IHEAP[f+32]=0;f=f}else f=0;return f}_t1_create.__index__=Runtime.getFunctionIndex(_t1_create,"_t1_create");function _t1_destroy(b){var f;if(b!=0){f=IHEAP[b+4];f!=0&&_free(f);f=IHEAP[b+8];f!=0&&_free(f);_free(IHEAP[b+12]);_free(IHEAP[b+16]);_free(b)}}_t1_destroy.__index__=Runtime.getFunctionIndex(_t1_destroy,"_t1_destroy"); function _t1_encode_cblks(b,f,e){var c=STACKTOP;STACKTOP+=4;_memset(c,0,4);var a,d=null,g;FHEAP[f+28]=0;var h=f+16,i=f+20,j=e+5584,k=b+12,m=b+20,l=b+24,n=f+16;e=e+16;d=0;a:for(;;){Tb=d==6?Tb:0;var o=0+Tb,p=_mct_norms_real+o*8,r=_mct_norms+o*8;if(!(o>13&4294967295)>>5;var Z=Z+1;if(Z!=I)d=34;else break}var W=W+1;if(W1?d:1;d=37;g:for(;;){ea=d==37?0:ea;ia=d==37?0:ia;d=IHEAP[O+4*ea];V=0-d;d=d>-1?d:V;var ia=ia>d?ia:d,ea=ea+1;if(ea!=T)d=38;else break g}if(ia==0){d=39;break f}if(ia>1){d=40;a=42}else{d=40;a=43}for(;;)if(a==42){da=d==42?da:0;var oa=da+1,pa=(d==42?pa:ia)>>1, da=da+1;if(pa>1)a=d=42;else{d=42;a=43}}else if(a==43){var ha=(d==40?0:oa)+-5;d=43;break f}}else d=23;while(0);IHEAP[Xa+48*G+28]=d==43?ha:d==39?0:0;d=IHEAP[Xa+48*G+28];IHEAP[F+24+4]=_mqc_states;IHEAP[F+24+8]=_mqc_states;IHEAP[F+24+12]=_mqc_states;IHEAP[F+24+16]=_mqc_states;IHEAP[F+24+20]=_mqc_states;IHEAP[F+24+24]=_mqc_states;IHEAP[F+24+28]=_mqc_states;IHEAP[F+24+32]=_mqc_states;IHEAP[F+24+36]=_mqc_states;IHEAP[F+24+40]=_mqc_states;IHEAP[F+24+44]=_mqc_states;IHEAP[F+24+48]=_mqc_states;IHEAP[F+24+52]= _mqc_states;IHEAP[F+24+56]=_mqc_states;IHEAP[F+24+60]=_mqc_states;IHEAP[F+24+64]=_mqc_states;I=d-1;IHEAP[F+24+72]=_mqc_states+1472;IHEAP[F+24+68]=_mqc_states+96;IHEAP[F+24]=_mqc_states+128;d=IHEAP[Xa+48*G];IHEAP[F+100]=F+24;IHEAP[F+4]=32768;IHEAP[F]=0;IHEAP[F+12]=d+-1;IHEAP[F+8]=12;if(IHEAP[IHEAP[F+12]]==255)IHEAP[F+8]=13;IHEAP[F+16]=d;if(I>=0){O=(L&1)!=0;R=R==1;T=f+28;V=(L&4)!=0;ba=(L&1)!=0;fa=(L&1)!=0;Y=(L&2)!=0;var qa=(L&32)!=0,wa=(L&8)!=0,la=(L&8)!=0,ma=(L&8)!=0,ua=(L&8)!=0;d=ja!=0^1;ja=d|ga== 3^1;var ra=_dwt_norms+aa*80+(w+ka)*8,ta=ba^1,va=F,na=F+8,ya=F+24,Ba=F+100,Na=F+4,Pa=F,Ja=F+8,xa=F+12,Ya=F+12,$a=F+8,db=F+12,Ta=F+16;ga=d|ga==3^1;ka=_dwt_norms_real+aa*80+(w+ka)*8;var Ma=b+24,Ga=b+20,Ca=b+24,Ka=b+24,Ra=b+36,Oa=b+16,Ia=b+20,Sa=b+12,Aa=b+20,La=b+4,Ea=aa<<8,Ha=b+36,Qa=b+24,Da=b+24,eb=b+20,za=b+24,Wa=b+24,Ua=b+36,ab=b+16,tb=b+20,Ab=b+12,jb=b+20,Db=b+4,ub=b+24;aa=aa<<8;var Eb=F+24+72,Ub=F+100,ob=Xa+48*G+28,Bb=Xa+48*G+8;d=45;f:for(;;){mb=d==45?0:mb;fb=d==45?2:fb;Vb=d==45?0:Vb;bb=d==45?I: bb;var vb=mb+1,hb=IHEAP[Bb],Za=bb6,Fb=d-6;d=52;h:for(;;){var qb=d==56?ac:0,xb=qb*4,Lb=xb+1,Gb=xb+3,rb=xb+4;if(0>Fb&127)*2];d=72}else{var dc=IHEAP[_lut_nmsedec_sig0+(d&127)*2];d=74}IHEAP[c]+=d==74?dc:cc;IHEAP[sa+100]=sa+24+IHEAP[_lut_ctxno_sc+((Va&4080)>>4)]*4;k:do if(pb){IHEAP[sa+8]+=-1;IHEAP[sa]=(nb<>4)]^nb);while(0);_t1_updateflags(Hb,nb,IHEAP[Ha])}IHEAP[Hb]=(IHEAP[Hb]|16384)&65535}var Hb=Fa+1;d=85}var Mb=Mb+1;if(a6;kb=d- 6;d=90;h:for(;;){Fb=d==93?ec:0;qb=Fb*4;xb=qb+1;Lb=qb+3;Gb=qb+4;if(0>kb&127)*2];d=102}else{var hc=IHEAP[_lut_nmsedec_ref0+(d&127)*2];d=104}IHEAP[c]+=d==104?hc:gc;d=IHEAP[Va];Va=0-d;d=((d<0?Va:d)&g)!=0?1:0;Va=(sa&255)!=0?15:14;IHEAP[Fa+100]=Fa+24+((sa&8192)!=0?16:Va)*4;k:do if(cb){IHEAP[Fa+8]+=-1;IHEAP[Fa]=(d<6;Gb=d-6;d=116;h:for(;;){rb=d==116?0:ic;Fa=rb*4;sa=Fa+2;Va=Fa+3;gb=Fa+4;nb=Fa+1;if(0>1);_mqc_encode(cb,yb&1);d=139;a=133;break j}else{d= 118;a=133}while(0);j:do if(a==133){var Rb=d==131?0:d==139?yb:0;Pb=(d==131?0:d==139?Qb:0)!=0;Yb=nb+Rb;Rb=Fa+Rb;d=133;for(;;){var Zb=d==148?Wb:0,Cb=Yb+Zb;a=Rb+Zb;if(!(a>Gb&127)*2];d=151}else{var rc=IHEAP[_lut_nmsedec_sig0+(d&127)*2];d=153}IHEAP[c]+=d==153?rc:qc;IHEAP[Jb+100]=Jb+24+IHEAP[_lut_ctxno_sc+((Kb&4080)>>4)]*4;d=IHEAP[$b]<0?1:0;_mqc_encode(Jb,IHEAP[_lut_spb+((Kb&4080)>>4)]^d);_t1_updateflags(Cb,d,IHEAP[Wb+36])}IHEAP[Cb]= IHEAP[Cb]&-16385&65535;var Wb=Zb+1;d=148;a=140}}while(0);var Ib=Ib+1;if(sb0;g:do{a=Za?ba?174:173:bb==IHEAP[ob]-4&fb==2^1|ta?173:174;break g}while(0);if(a==174){_mqc_flush(F);IHEAP[hb+20*mb+12]=1;d=174}else if(a==173){IHEAP[hb+20*mb+12]=0;d=173}}d=d==174?1:d==173?3:1;fb=fb+1;a=bb+-1;var bb=(Za=fb==3)?a:bb,fb=Za?0:fb; Za=IHEAP[hb+20*mb+12]!=0&bb>0;g:do if(Za)if((((bb=0)d=182;else break f}d=183}else d=207;M=d==183?vb:0;d=(L&16)!=0;f:do if(d)_mqc_erterm_enc(F);else{if((L&1)!=0)break f;_mqc_flush(F)}while(0);IHEAP[Xa+48*G+44]= M;if(0IHEAP[L]-IHEAP[M])IHEAP[V+20*ib]=IHEAP[I]-IHEAP[F];ba=IHEAP[V+20*ib]>1;g:do if(ba){if(IHEAP[IHEAP[Xa]+(IHEAP[V+20*ib]-1)]!=255)break g;IHEAP[V+20*ib]+=-1}while(0);ba=IHEAP[V+20*ib];if(ib==0)d=193;else{var yc=IHEAP[IHEAP[O]+20*d];d=195}IHEAP[V+20*ib+16]=ba-(d==195?yc:0);var ib=ib+1;if(TIHEAP[b+28];a:do if(g){_free(IHEAP[b+12]);c=_memalign(16,d*4);IHEAP[b+12]=c;if(IHEAP[b+12]!=0){IHEAP[b+28]=d;c=1}else c=a=0;break a}else c=1;while(0);a:do if(c==1){_llvm_memset_p0i8_i32(IHEAP[b+12],0,d*4,1,0);IHEAP[b+36]=f+2;a=(e+2)*IHEAP[b+36];if(a>IHEAP[b+32]){_free(IHEAP[b+16]);g=_memalign(16,a*2);IHEAP[b+16]=g;if(IHEAP[b+16]!=0)IHEAP[b+32]=a;else{a=0;break a}}_llvm_memset_p0i8_i32(IHEAP[b+16],0,a*2,1,0);IHEAP[b+20]=f;IHEAP[b+24]=e;a=1}while(0); return a}_allocate_buffers.__index__=Runtime.getFunctionIndex(_allocate_buffers,"_allocate_buffers"); function _t1_decode_cblks(b,f,e){var c,a=null,d,g,h,i,j,k,m,l,n,o,p,r,q,u,s,t,v,y,x,w,C,z,A,B,D,J,E,N,Q,S,P,G,F,L,K,H,M,I,O,R;K=IHEAP[f+8]-IHEAP[f];P=0;c=P>1;n=h|d;if(!(0>1;m=h|d;if(!(0>4)]*4;X=_mqc_decode(X); a=IHEAP[_lut_spb+((a&4080)>>4)]^X;IHEAP[aa]=a!=0?j:m;_t1_updateflags(da,a,IHEAP[l])}IHEAP[da]=(IHEAP[da]|16384)&65535}var da=W+1;a=55}var ha=ha+1;if(c>1;i=i|a;g=0;y=g<(IHEAP[d+24]&-4);a=0;if(y){y=h;s=i;t=h;m=i;U=h;n=i;x=h;o=i;j=j;l=a;k=k;g=g+4;a=58;j:for(;;){ra=a==58?0:ra;ua=a==58?k:ua;c=a==58?l:0;ma=a==58?j:ma;var wa= g+ra*4;if(c>1;if(a>0){var Ba=0-n;a=73}else a=231;a=a==73?Ba:-1;if(!(0>1;if(a>0){var Ya=0-m;a=92}else a=234; a=a==92?Ya:-1;if(!(0>1;if(a>0){var Ga=0-h;a=109}else a=236;i=a==109?Ga:-1;g=0;y=g<(IHEAP[d+24]&-4);a=0;if(y){y=h;s=i;t=h;m=i; U=h;n=i;x=h;o=i;j=j;l=a;k=k;g=g+4;a=111;j:for(;;){Ia=a==111?0:Ia;Oa=a==111?k:Oa;c=a==111?l:0;Ra=a==111?j:Ra;var Ca=g+Ia*4;if(c>1;s=t|s;U=(a&8)!=0;j:do if(U){m=0;if(!(m>4)]*4;a=_mqc_decode(Z);a=IHEAP[_lut_spb+((w&4080)>>4)]^a;IHEAP[Y]=a!=0?o:x;_t1_updateflags($,a,IHEAP[g+36])}IHEAP[$]=IHEAP[$]&-16385&65535;n+=1;a=147;c=139}}while(0);var Ua=a==135?Ua:a==139?eb:eb;t+=1;var ab=m;if(t>4)]*4;c=_mqc_decode(c);a=IHEAP[_lut_spb+ ((a&4080)>>4)]^c;IHEAP[Db]=a!=0?aa:$;_t1_updateflags(ub,a,IHEAP[Eb+36]);IHEAP[ub]=IHEAP[ub]&-16385&65535;c=171;break o}else c=170;while(0);c==170&&_t1_dec_clnpass_step(d,ub,Db,Y,Z);var Eb=Db+4*IHEAP[d+20];n+=1;a=171}c=jb;w=Db}else{c+=2*IHEAP[d+36];_t1_dec_clnpass_step(d,c,w,h,s);w+=4*IHEAP[d+20];c+=2*IHEAP[d+36];_t1_dec_clnpass_step(d,c,w,h,s);w+=4*IHEAP[d+20];c+=2*IHEAP[d+36];_t1_dec_clnpass_step(d,c,w,h,s);w+=4*IHEAP[d+20];c+=2*IHEAP[d+36];_t1_dec_clnpass_step(d,c,w,h,s);w+=4*IHEAP[d+20]}while(0); t+=1;c=t1?fa:1;a=189;for(;;){hb=a==189?B:hb;ca=S*hb;c=N*hb;for(a=190;;){vb=a==190?0:vb;a=V+4*(ca+vb);d=IHEAP[Q+4*(c+vb)];h=0-d;h=d>-1?d:h;if(h>= R){h=h>>IHEAP[u];i=0-h;IHEAP[a]=d<0?i:h}var vb=vb+1;if(vb!=q)a=191;else break}var hb=hb+1;if(hb1?u:1;a=201;for(;;){cb=a==201?B:cb;p=Q*cb;r=J*cb;for(a=202;;){wb=a==202?0:wb;IHEAP[R+4*(p+wb)]=IHEAP[N+4*(r+wb)]/2|0;var wb=wb+1;if(wb!=fa)a=203;else break}var cb=cb+1;if(cb< S)a=204;else break f}}else for(a=199;;){var pb=(a==206?pb:B)+1;if(pb1?R:1)-0;for(a=209;;){kb=a==209?0:kb;FHEAP[Q+4*kb]=IHEAP[A+4*kb]*FHEAP[N];var kb=kb+1;if(kb!=R)a=210;else break}A=A+4*R}J+=4*K;B+=1;if(!(B>4)]*4;g=_mqc_decode(i);d=h;d=IHEAP[_lut_spb+((d&4080)>>4)]^g;g=a;var k=0-g;IHEAP[e]=d!=0?k:g;_t1_updateflags(f,d,IHEAP[b+36])}while(0);IHEAP[f]=IHEAP[f]&-16385&65535}_t1_dec_clnpass_step.__index__=Runtime.getFunctionIndex(_t1_dec_clnpass_step,"_t1_dec_clnpass_step"); function _t1_updateflags(b,f,e){var c;c=b+2*(0-e);e=b+2*e;var a=c+-2;IHEAP[a]=(IHEAP[a]|2)&65535;IHEAP[c]=(IHEAP[c]|IHEAP[_t1_updateflags_mod+f*2])&65535;c=c+2;IHEAP[c]=(IHEAP[c]|4)&65535;c=b+-2;IHEAP[c]=(IHEAP[c]|IHEAP[_t1_updateflags_mod+(f+2)*2])&65535;IHEAP[b]=(IHEAP[b]|4096)&65535;b=b+2;IHEAP[b]=(IHEAP[b]|IHEAP[_t1_updateflags_mod+(f+4)*2])&65535;b=e+-2;IHEAP[b]=(IHEAP[b]|1)&65535;IHEAP[e]=(IHEAP[e]|IHEAP[_t1_updateflags_mod+(f+6)*2])&65535;f=e+2;IHEAP[f]=(IHEAP[f]|8)&65535} _t1_updateflags.__index__=Runtime.getFunctionIndex(_t1_updateflags,"_t1_updateflags");function _t1_dec_refpass_step_mqc(b,f,e,c,a){var d,g;b=IHEAP[b+4];g=IHEAP[f];if((g&20480)==4096){d=(g&255)!=0?15:14;d=(g&8192)!=0?16:d;IHEAP[b+100]=b+24+d*4;b=_mqc_decode(b);c=b!=0?c:a;a=0-c;IHEAP[e]+=IHEAP[e]<0?a:c;IHEAP[f]=(IHEAP[f]|8192)&65535}}_t1_dec_refpass_step_mqc.__index__=Runtime.getFunctionIndex(_t1_dec_refpass_step_mqc,"_t1_dec_refpass_step_mqc"); function _t1_dec_sigpass_step_mqc(b,f,e,c,a){var d,g,h,i;i=IHEAP[b+4];h=IHEAP[f];var j=(h&255)!=0;a:do if(j){if((h&20480)!=0)break a;g=c;d=h;g=g;IHEAP[i+100]=i+24+IHEAP[_lut_ctxno_zc+(d&255|g<<8)]*4;if(_mqc_decode(i)!=0){d=h;IHEAP[i+100]=i+24+IHEAP[_lut_ctxno_sc+((d&4080)>>4)]*4;g=_mqc_decode(i);d=h;d=IHEAP[_lut_spb+((d&4080)>>4)]^g;g=a;var k=0-g;IHEAP[e]=d!=0?k:g;_t1_updateflags(f,d,IHEAP[b+36])}d=f;IHEAP[d]=(IHEAP[d]|16384)&65535}while(0)} _t1_dec_sigpass_step_mqc.__index__=Runtime.getFunctionIndex(_t1_dec_sigpass_step_mqc,"_t1_dec_sigpass_step_mqc"); function _t2_encode_packets(b,f,e,c,a,d,g,h,i,j,k,m){var l,n=null,o,p,r,q,u,s,t;o=a;p=0;r=IHEAP[b+4];q=IHEAP[b+8];u=IHEAP[q+108]+5588*f;s=IHEAP[q]==3?2:1;if(IHEAP[q+4]>0){t=IHEAP[r+16];n=0}else n=40;t=n==0?t:1;r=_pi_initialise_encode(r,q,f,k);var v=r!=0;a:do if(v){if(k==0){var y=t,x=s,w=r,C=q,z=f,A=i,B=k,D=m,J=r,E=r,N=c,Q=e,S=f,P=q+108,G=r,F=a+d,L=g,K=f,H=q+4,M=q+4,I=p,O=o;n=3;b:for(;;){l=n==23?ia:0;var R=n==23?ba:O,T=n==23?fa:I,V=0+l;if(VIHEAP[M]){l=19;break b}var ja=ca+1;n=22}if(fa==-999){n=8;l=6;break b}var ia= l+1;n=23;l=4}if(l==6){p=n==8?-999:T;o=n==8?ba:R;p=p}else if(l==9){_opj_event_msg(IHEAP[b],1,__str41107);_pi_destroy(r,q,f);n=-999;break a}else if(l==15){o=W;p=-999}else if(l==17){o=W;p=-999}else if(l==19){o=W;p=-999}}else{_pi_create_encode(r,q,f,j,h,i,k,m);y=r+232*j;x=r+232*j+36;w=c;C=e;z=f;A=q+108;B=r+232*j;D=a+d;J=g;E=f;N=g!=0;Q=g+12;S=f;P=g+88;G=g+8;F=g+8;L=q+16;K=u+424;H=g+8;M=g+8;I=e+836;p=p;o=o;n=24;b:for(;;){var ea=n==24?o:n==39?da:ea,oa=n==24?p:n==39?pa:oa;if(_pi_next(y)==0){n=25;l=27;break b}if(!(IHEAP[x]< w)){n=26;l=25;continue b}var pa=_t2_encode_packet(C,IHEAP[A]+5588*z,B,ea,D-ea,J,E);if(pa==-999){n=28;l=27;break b}var da=ea+pa;if(N){if(IHEAP[Q]!=0){n=44;V=IHEAP[P]+572*S;O=IHEAP[V+548]+20*IHEAP[G];if(IHEAP[F]!=0){ca=(IHEAP[K]|IHEAP[L])!=0;c:do if(ca){if(IHEAP[O]==0){l=32;break c}var ha=IHEAP[O];n=31;l=33;break c}else l=32;while(0);if(l==32){var qa=IHEAP[IHEAP[V+548]+20*(IHEAP[H]-1)+8]+1;n=32}IHEAP[O]=n==31?ha:qa}else IHEAP[O]=IHEAP[V+12]+1;IHEAP[O+8]=IHEAP[O]+-1+pa;n=O+4;IHEAP[n]=IHEAP[O]+-1+IHEAP[n]}IHEAP[M]+= 1}IHEAP[I]+=1;n=39;l=25}n=n==28?-999:oa;o=ea;p=n}_pi_destroy(r,q,f);n=p==-999?p:o-a}else n=-999;while(0);return n}_t2_encode_packets.__index__=Runtime.getFunctionIndex(_t2_encode_packets,"_t2_encode_packets"); function _t2_encode_packet(b,f,e,c,a,d,g){var h,i=null,j,k,m,l,n;k=c;m=IHEAP[e+24];i=IHEAP[e+28];l=IHEAP[e+32];e=IHEAP[e+36];m=IHEAP[IHEAP[b+20]+32*m+20]+124*i;if((IHEAP[f+4]&2)!=0){IHEAP[k]=-1;IHEAP[k+1]=-111;IHEAP[k+2]=0;IHEAP[k+3]=4;IHEAP[k+4]=(IHEAP[b+836]%65536/256|0)&255;IHEAP[k+5]=IHEAP[b+836]%65536%256&255;k+=6}var o=e!=0;a:do if(!o){b=0;if(!(bC))break;IHEAP[i+4]=C;n=IHEAP[i];i=16}b+=1;if(!(be))break c;IHEAP[i+4]=e;var J=IHEAP[i];i=31}}while(0);b+=1;if(!(bh?i:h)-w;i=41;e:for(;;){ca=i==41?0:ca;fa=i==41?0:fa;var P=w+ca;V=(i==41?0:V)+1;ba=(i==41?0:ba)+IHEAP[z+20*P+16];var G=IHEAP[z+20*P+12]!=0;f:do if(G)h=44;else{if(P==IHEAP[N]+-1+IHEAP[Q]){i=43;h=44}else{i=43;h=45}break f}while(0);f:do if(h==44){if(ba>1){i=44;h=46}else{i=44;h=47}g:for(;;)if(h==46){K=i==46?K:0;var F=K+1,L=(i==46?L:ba)>>1,K=K+1;if(L>1)h=i=46;else{i=46;h=47}}else if(h==47){var H=i==44?0:F,M=IHEAP[E];if(V>1){i=47;h=48}else{i=47;h=49}break g}for(;;)if(h==48){R=i==48?R:0;var I= R+1,O=(i==48?O:V)>>1,R=R+1;if(O>1)h=i=48;else{i=48;h=49}}else if(h==49){var T=H+1+(0-M)+(0-(i==47?0:I));T=fa>T?fa:T;i=49;break f}}while(0);var V=i==43?V:0,ba=i==43?ba:0,fa=i==43?fa:T,ca=ca+1;if(ca!=S)i=45;else break e}if(!(fa+-1>=0)){i=50;break d}i=1-fa;h=fa+(i>0?i:0);for(i=51;;){U=i==51?0:U;_bio_write(n,1,1);var U=U+1;if(U!=h)i=53;else break}i=54}else i=40;while(0);w=i==54?V:i==50?V:0;C=i==54?ba:i==50?ba:0;i=i==54?fa:i==50?fa:0;_bio_write(n,0,1);IHEAP[v+32]+=i;z=IHEAP[v+36];if(!(z1){i=60;h=62}else{i=60;h=63}for(;;)if(h==62){ka=i==62?ka:0;var X=ka+1,aa=(i==62?aa:ga)>>1,ka=ka+1;if(aa>1)h=i=62;else{i=62;h=63}}else if(h==63){_bio_write(n,ja,(i==60?0:X)+Y);i=63;break e}}while(0); var ga=i==59?ga:0,ja=i==59?ja:0,ia=ia+1;if(Za){h=84;break a}_llvm_memcpy_p0i8_p0i8_i32(k,IHEAP[K+16],IHEAP[K+4],1,0);IHEAP[aa+36]+=IHEAP[K];k+=IHEAP[K+4];if(!J)break c;if(IHEAP[F]==0)break c;T=IHEAP[IHEAP[H]+572*g+548]+20*IHEAP[L];FHEAP[T+12]+=FHEAP[K+8];if(!(FHEAP[d]=IHEAP[E+232*o+36]+1){g=6;break d}var F=k=0;h=7;g=111;break d}while(0);if(g==6){u=d!=0?IHEAP[IHEAP[d+88]+572*c+548]+20*IHEAP[d+8]:0;j=J;s=f+e-J; t=a;v=IHEAP[P+108]+5588*c;C=E+232*o;B=u;u=b;j=j;s=s;t=t;v=v;r=C;y=B;C=j;z=IHEAP[u+8];A=IHEAP[r+24];q=IHEAP[r+28];B=IHEAP[r+32];p=IHEAP[r+36];t=IHEAP[IHEAP[t+20]+32*A+20]+124*q;r=p==0;d:do if(r){x=0;if(!(x1){h=74;g=75}else{h=74;g=76}for(;;)if(g==75){Aa=h==75?Aa:0;var Ia=Aa+1,Sa=(h==75?Sa:Oa)>>1,Aa=Aa+1;if(Sa>1)g=h=75;else{h=75;g=76}}else if(g==76){La=_bio_read(I,(h==74?0:Ia)+Ra);IHEAP[IHEAP[D+4]+28*Ka+24]=La;var La=Ga-IHEAP[IHEAP[D+4]+28*Ka+20];if(La>0)break; else break g}_t2_init_seg(D,Ca,IHEAP[IHEAP[R]+1076*O+16],0);var Ea=Ma+1;h=77}}else IHEAP[g+36]=0;D=la+1;if(maq){g=104;break b}Da=_realloc(IHEAP[p],(IHEAP[y+24]+IHEAP[A])*4);IHEAP[m]=Da;_llvm_memcpy_p0i8_p0i8_i32(IHEAP[l]+IHEAP[n],T,IHEAP[y+24],1,0);if(IHEAP[y+8]==0){IHEAP[y]=L;IHEAP[y+4]=IHEAP[K]}var Da=T+IHEAP[y+24];IHEAP[H]+=IHEAP[y+24];IHEAP[y+12]+=IHEAP[y+24];IHEAP[y+8]+=IHEAP[y+20];IHEAP[M]-=IHEAP[y+20];if(IHEAP[I]>0){y+=28;IHEAP[O]+=1}if(IHEAP[R]> 0)h=108;else break}C=Da}w+=1}}while(0);x+=1}var eb=C-j;h=95}else{_bio_inalign(q);k=q;r+=IHEAP[k+8]-IHEAP[k];k=q;k!=0&&_free(k);k=(IHEAP[v+4]&4)!=0;d:do if(k){var za=IHEAP[r]!=255;e:do if(!za){if(IHEAP[r+1]!=146)break e;r+=2;break d}while(0);_puts(_str)}while(0);if(y!=0)IHEAP[y+4]=C-j;if(IHEAP[z+92]==1){var Wa=z+104;IHEAP[Wa]=0-r+IHEAP[z+84]+IHEAP[Wa];IHEAP[z+84]=r;Wa=C-j;h=40}else if(IHEAP[v+5172]==1){var Ua=v+5180;IHEAP[Ua]=0-r+IHEAP[v+5164]+IHEAP[Ua];IHEAP[v+5164]=r;Ua=C-j;h=42}else{var ab=r-j; h=43}}k=za=h==95?eb:h==43?ab:h==42?Ua:Wa;if(za==-999){h=113;g=114;break b}else h=113}j=E+232*o;if((h==7?F:za)>0){s=IHEAP[IHEAP[S+24]+48*IHEAP[E+232*o+24]+36];i=IHEAP[j+28];j=s;s=i;C=j;i=i>j?s:C;h=116}else{var tb=IHEAP[IHEAP[S+24]+48*IHEAP[j+24]+36];h=118}IHEAP[IHEAP[S+24]+48*IHEAP[E+232*o+24]+36]=h==116?i:tb;if(d!=0){s=IHEAP[d+88]+572*c;j=IHEAP[s+548]+20*IHEAP[d+8];if(IHEAP[d+8]!=0)if(IHEAP[IHEAP[s+548]+20*(IHEAP[d+8]-1)+8]>=IHEAP[IHEAP[IHEAP[d+88]+572*c+568]+20*N+8]){IHEAP[IHEAP[s+568]+20*N+16]= IHEAP[d+8]-Q;Q=IHEAP[d+8];N+=1;IHEAP[j]=IHEAP[IHEAP[IHEAP[d+88]+572*c+568]+20*N+4]+1}else{C=IHEAP[P+16]!=0;d:do if(C){if(IHEAP[j]==0){g=121;break d}var Ab=IHEAP[j];h=120;g=122;break d}else g=121;while(0);if(g==121){var jb=IHEAP[IHEAP[s+548]+20*(IHEAP[d+8]-1)+8]+1;h=121}IHEAP[j]=h==120?Ab:jb}else IHEAP[j]=IHEAP[s+12]+1;IHEAP[j+8]=IHEAP[j]+-1+k;s=j+4;IHEAP[s]=IHEAP[j]+-1+IHEAP[s];IHEAP[d+8]+=1}if(k==-999)break c;J+=k}o+=1;g=1}b:do if(g==3){if(d!=0)IHEAP[IHEAP[IHEAP[d+88]+572*c+568]+20*N+16]=IHEAP[d+ 8]-Q;_pi_destroy(E,P,c);o=k==-999?k:J-f;break a}else if(g==82){o=X;o!=0&&_free(o);g=85;break b}else if(g==87){_opj_event_msg(IHEAP[u],1,__str344);g=85;break b}else if(g==104){g=85;break b}while(0);if(g==85)k=-999}o=-999}while(0);return o}_t2_decode_packets.__index__=Runtime.getFunctionIndex(_t2_decode_packets,"_t2_decode_packets");function _t2_create(b,f,e){var c;c=_malloc(12);if(c!=0){IHEAP[c]=b;IHEAP[c+4]=f;IHEAP[c+8]=e;b=c}else b=0;return b} _t2_create.__index__=Runtime.getFunctionIndex(_t2_create,"_t2_create");function _t2_destroy(b){b!=0&&_free(b)}_t2_destroy.__index__=Runtime.getFunctionIndex(_t2_destroy,"_t2_destroy"); function _t2_init_seg(b,f,e,c){var a=null;a=_realloc(IHEAP[b+4],(f+1)*28);IHEAP[b+4]=a;b=IHEAP[b+4]+28*f;IHEAP[b]=0;IHEAP[b+4]=0;IHEAP[b+8]=0;IHEAP[b+12]=0;if((e&4)!=0)IHEAP[b+16]=1;else if((e&1)!=0)if(c!=0)IHEAP[b+16]=10;else{if(IHEAP[b+-28+16]==1)a=2;else{var d=IHEAP[b+-28+16]==10;a=0}IHEAP[b+16]=(a==2?1:d)?2:1}else IHEAP[b+16]=109}_t2_init_seg.__index__=Runtime.getFunctionIndex(_t2_init_seg,"_t2_init_seg"); function _tcd_dump(b,f,e){var c,a=null;_fwrite(__str49108,8,1,b);_fprintf(b,__str150,IHEAP[e],IHEAP[e+4],IHEAP[IHEAP[f+28]],IHEAP[IHEAP[f+28]+8],IHEAP[IHEAP[f+28]+4],IHEAP[IHEAP[f+28]+12]);if(0M?H:M;H=IHEAP[q]*L+IHEAP[r];M=IHEAP[u];IHEAP[K+4]=H>M?H:M;F=IHEAP[t]*(F+1)+IHEAP[s];H=IHEAP[v];IHEAP[K+8]=F>ea+ia;IHEAP[h+4]=IHEAP[g+4]+-1+(1<>ea+ia;IHEAP[h+8]=IHEAP[g+8]+-1+(1<>ea+ia;IHEAP[h+12]=IHEAP[g+12]+-1+(1<>ea+ia;IHEAP[h+24]=aa==0?1:3;if((IHEAP[T]&1)!=0){var oa=IHEAP[ga],pa=IHEAP[ka];d=19}else d=18;var da=d==19?pa:15,ha=d==19?oa:15;ga=IHEAP[h]>>ha<>da<>da<>ha<>ha;IHEAP[h+20]=qa-ka>>da;if(aa==0)d=21;else{var wa=ga+-1+2>>1,la=ka+-1+2>>1,ma=ha-1,ua=da-1;d=23}var ra=d==23?ua:da;ka=d==23?la:ka;var ta=d==23?ma:ha;ga=d==23?wa:ga;ha=IHEAP[V];ha=ha>ia;IHEAP[i+4]=IHEAP[g+4]+-1+(1<>ia;IHEAP[i+8]=IHEAP[g+8]+-1+(1<>ia;IHEAP[i+12]=IHEAP[g+12]+-1+(1<>ia}else{IHEAP[i]=Ra-Ca*Ya+-1+(1<>ea;IHEAP[i+4]=IHEAP[g+4]-$a*d+-1+(1<>ea;IHEAP[i+ 8]=IHEAP[g+8]-xa*Ca+-1+(1<>ea;IHEAP[i+12]=IHEAP[g+12]-db*d+-1+(1<>ea}j=va?0:j;Ca=IHEAP[i+16];Ra=IHEAP[$]==0|Ca==0;e:do if(Ra)d=54;else{if(Ca==1){d=52;break e}else if(Ca==2){d=52;break e}d=31}while(0);Ca=1+IHEAP[U+4*j*2]/2048;d=_ldexp(1,(d==54?0:d==31?2:d==52?1:1)+IHEAP[IHEAP[S]+48*O+24]-IHEAP[fa+8*j]);FHEAP[i+28]=Ca*d;IHEAP[i+24]=IHEAP[ca+8*j]+-1+IHEAP[Y];d=_malloc(IHEAP[h+16]*108*IHEAP[h+20]);IHEAP[i+20]=d;if(0Aa?a:Aa;a=IHEAP[i+4];IHEAP[j+4]=Ia>a?Ia:a;Ia=IHEAP[i+8];IHEAP[j+8]=Sa> ha<>da<>da<>ha<>ha;IHEAP[j+20]=d-Ia>>da;d=_calloc(IHEAP[j+20]*IHEAP[j+16],48);IHEAP[j+24]=d;d=_tgt_create(IHEAP[j+16],IHEAP[j+20]);IHEAP[j+28]=d;d=_tgt_create(IHEAP[j+16],IHEAP[j+20]);IHEAP[j+32]=d;if(0Qa?La:Qa;La=IHEAP[j+4];IHEAP[a+48*Da+16]=Ea>La?Ea:La;Ea=IHEAP[j+8];IHEAP[a+48*Da+20]=HaH?K:H;K=IHEAP[q]*F+IHEAP[r];H=IHEAP[u];IHEAP[L+4]=K>H?K:H;G=IHEAP[t]*(G+1)+IHEAP[s];K=IHEAP[v];IHEAP[L+8]=G>ea+ja;IHEAP[h+4]=IHEAP[g+4]+-1+(1<>ea+ja;IHEAP[h+8]=IHEAP[g+8]+-1+(1<> ea+ja;IHEAP[h+12]=IHEAP[g+12]+-1+(1<>ea+ja;IHEAP[h+24]=W==0?1:3;if((IHEAP[R]&1)!=0){var oa=IHEAP[aa],pa=IHEAP[X];d=16}else d=15;var da=d==16?pa:15,ha=d==16?oa:15;aa=IHEAP[h]>>ha<>da<>da<>ha<>ha;IHEAP[h+20]=qa-X>>da;if(W==0)d=18;else{var wa=aa+-1+2>>1,la=X+-1+2>>1,ma=ha-1,ua=da-1;d=20}var ra=d==20?ua:da;X=d==20?la:X;var ta=d==20?ma:ha;aa=d==20?wa:aa;ha=IHEAP[T];ha=ha>ja;IHEAP[i+4]=IHEAP[g+ 4]+-1+(1<>ja;IHEAP[i+8]=IHEAP[g+8]+-1+(1<>ja;IHEAP[i+12]=IHEAP[g+12]+-1+(1<>ja}else{IHEAP[i]=Ka-Ga*Ya+-1+(1<>ga;IHEAP[i+4]=IHEAP[g+4]-$a*d+-1+(1<>ga;IHEAP[i+8]=IHEAP[g+8]-xa*Ga+-1+(1<>ga;IHEAP[i+12]=IHEAP[g+12]-db*d+-1+(1<>ga}j=va?0:j;Ga=IHEAP[i+16];Ka=IHEAP[U]==0|Ga==0;e:do if(Ka)d=54;else{if(Ga==1){d=51;break e}else if(Ga==2){d=51;break e}d=28}while(0);Ga=1+IHEAP[V+4*j*2]/2048;d=_ldexp(1,(d==54?0:d==28?2:d==51?1:1)+IHEAP[IHEAP[Q]+48*I+24]-IHEAP[ba+8*j]);FHEAP[i+ 28]=Ga*d;IHEAP[i+24]=IHEAP[ca+8*j]+-1+IHEAP[Z];if(0Ea?a:Ea;a=IHEAP[i+4];IHEAP[j+4]=Aa>a?Aa:a;Aa=IHEAP[i+8];IHEAP[j+8]=La>ha<>da<>da<>ha<>ha;IHEAP[j+20]=d-Aa>>da;_free(IHEAP[j+24]);d=_calloc(IHEAP[j+20]*IHEAP[j+16],48);IHEAP[j+24]=d;if(IHEAP[j+28]!=0){d=IHEAP[j+28];_free(IHEAP[d+12]);_free(d)}if(IHEAP[j+32]!=0){d=IHEAP[j+32];_free(IHEAP[d+12]);_free(d)}d=_tgt_create(IHEAP[j+16],IHEAP[j+20]);IHEAP[j+28]=d;d=_tgt_create(IHEAP[j+16],IHEAP[j+20]);IHEAP[j+32]=d;if(0eb?Ha:eb;Ha=IHEAP[j+4];IHEAP[a+48*za+16]=Qa>Ha?Qa:Ha;Qa=IHEAP[j+8];IHEAP[a+48*za+20]=DaJ?D:J;D=IHEAP[e+60]*z+IHEAP[e+52];J=IHEAP[d]; IHEAP[A+4]=D>J?D:J;B=IHEAP[e+56]*(B+1)+IHEAP[e+48];D=IHEAP[g];IHEAP[A+8]=BG?L:G;var F=IHEAP[a+32*w+12];F=M>F?M:F;a=10}var L=a==8?N:G,K=a==8?A:S,H=a==8?E:P,M=a==8?Q:F,I=I+1;if(c>t;IHEAP[IHEAP[o]+48*w+8]=T-O+-1+(1<>ba;IHEAP[IHEAP[p]+48*w+12]=t;IHEAP[IHEAP[r]+48*w+16]=O;IHEAP[IHEAP[q]+48*w+20]=R;var ba=s+1;if(C>G+S;IHEAP[i+4]=IHEAP[h+4]+-1+(1<>G+S;IHEAP[i+8]=IHEAP[h+8]+-1+ (1<>G+S;IHEAP[i+12]=IHEAP[h+12]+-1+(1<>G+S;IHEAP[i+24]=J==0?1:3;if((IHEAP[y]&1)!=0){var F=IHEAP[N],L=IHEAP[E];d=4}else d=3;var K=d==4?L:15,H=d==4?F:15;N=IHEAP[i]>>H<>K<>H<>K<>H;d=6}IHEAP[i+16]=d==6?O:0;if(IHEAP[i+4]==IHEAP[i+12])d=43;else{var R=I-E>>K;d=8}IHEAP[i+20]=d==8?R:0;if(J==0)d=10;else{var T=N+-1+2>>1,V=E+-1+2>>1,ba=H-1,fa=K-1;d=12}var ca=d==12?fa:K;E=d==12?V: E;var U=d==12?ba:H;N=d==12?T:N;H=IHEAP[x];H=H>S;IHEAP[j+4]=IHEAP[h+4]+-1+(1<>S;IHEAP[j+8]=IHEAP[h+8]+-1+(1<>S;IHEAP[j+12]=IHEAP[h+12]+-1+(1<>S}else{IHEAP[j]=d-da*ga+-1+(1<>G;IHEAP[j+4]=IHEAP[h+4]-ja*qa+-1+(1<>G;IHEAP[j+8]=IHEAP[h+8]-ka*da+-1+(1<>G;IHEAP[j+12]=IHEAP[h+12]-ia*qa+-1+(1<>G}k=M?0:k;da=IHEAP[B]==0;qa=IHEAP[j+16];d:do if(da)d=41;else{if(qa==0){d=22;break d}if(qa==1){d=24;break d}else if(qa==2){d=24;break d}d=25}while(0);da=1+IHEAP[C+4*k*2]/2048;qa=_ldexp(1,(d==41?0:d==25?2:d==22? 0:d==24?1:1)+IHEAP[IHEAP[f]+48*s+24]-IHEAP[z+8*k]);FHEAP[j+28]=da*qa*0.5;IHEAP[j+24]=IHEAP[A+8*k]+-1+IHEAP[D];k=_malloc(IHEAP[i+16]*36*IHEAP[i+20]);IHEAP[j+20]=k;if(0ma?a:ma;a=IHEAP[j+4];IHEAP[k+4]=wa>a?wa:a;wa=IHEAP[j+8];IHEAP[k+8]=la> H<>K<>K<>H<>H;IHEAP[k+20]=d-wa>>K;d=_malloc(IHEAP[k+16]*44*IHEAP[k+20]);IHEAP[k+24]=d;d=_tgt_create(IHEAP[k+16],IHEAP[k+20]);IHEAP[k+28]=d;d=_tgt_create(IHEAP[k+16],IHEAP[k+20]);IHEAP[k+32]=d;if(0va?ua:va;ua=IHEAP[k+4];IHEAP[ma+44*na+12]=ra>ua?ra:ua;ra=IHEAP[k+8];IHEAP[ma+44*na+16]=ta1?d:1,y=s+32*q+16;d=2;b:for(;;){D=d==2?0:D;if(t){d=IHEAP[y];var x=d>1?d:1;for(d=4;;){B=d==4?0:B;d=c+D*120+B*12+4;var w=c+D* 120+B*12+8,C=IHEAP[g],z=IHEAP[IHEAP[IHEAP[m]+24]+48*q+24]/16,A=(B+D*IHEAP[y])*3;IHEAP[c+D*120+B*12]=IHEAP[C+4*(A+0)]*z|0;IHEAP[d]=IHEAP[C+4*(A+1)]*z|0;IHEAP[w]=IHEAP[C+4*(A+2)]*z|0;var B=B+1;if(B!=x)d=5;else break}}var D=D+1;if(D!=v)d=8;else break b}}if(0=P?0:O;d=19}else{var R=P-IHEAP[E];if(!(I>=IHEAP[J])){d=21;break f}var T=0-(0-IHEAP[A])+(0-I)+R;if(!(T<0)){d=22;break f}d=24}while(0); d=d==21?R:d==24?0:d==22?T:O;if(n)IHEAP[H+48*U+40]=0;if(IHEAP[H+48*U+40]==0)if(d!=0){var V=d*3+-2+IHEAP[H+48*U+40];d=26}else{var ba=IHEAP[H+48*U+40];d=28}else{var fa=IHEAP[H+48*U+40]+d*3;d=29}d=d==26?V:d==28?ba:fa;IHEAP[M]=d-IHEAP[H+48*U+40];I=IHEAP[M]!=0;f:do if(I){var ca=IHEAP[IHEAP[H+48*U+8]+20*(d-1)];if(IHEAP[H+48*U+40]==0){IHEAP[M+4]=ca;IHEAP[M+16]=IHEAP[H+48*U]}else{IHEAP[M+4]=ca-IHEAP[IHEAP[H+48*U+8]+20*(IHEAP[H+48*U+40]-1)];IHEAP[M+16]=IHEAP[H+48*U]+IHEAP[IHEAP[H+48*U+8]+20*(IHEAP[H+48*U+40]- 1)]}if(!e)break f;IHEAP[H+48*U+40]=d}while(0);var U=U+1;if(KN?d:N)-B;d=11;f:for(;;){R=d==11?0:R;I=d==11?A:I;O=d==11?B:O;var S=B+R;d=D+20*S+4;var P=N+R,G=IHEAP[D+20*S];if(I==0){var F=FHEAP[d];d=13}else{var L=G-IHEAP[IHEAP[J]+20*(I-1)],K=FHEAP[d]-FHEAP[IHEAP[E]+20*(I- 1)+4];d=15}S=d==15?K:F;G=d==15?L:G;var H=G!=0;g:do if(H){if(!(S/G>=e)){d=20;break g}var M=O+1;d=21}else{if(S==0){d=16;break g}d=17}while(0);var I=d==20?I:d==21?M:d==16?I:P,O=O+1,R=R+1;if(R!=Q)d=18;else break f}d=22}else d=40;d=d==22?I:A;IHEAP[z]=d-IHEAP[h+40];A=IHEAP[z]!=0;f:do if(A){B=IHEAP[IHEAP[h+8]+20*(d-1)];if(IHEAP[h+40]==0){IHEAP[z+4]=B;IHEAP[z+16]=IHEAP[h];FHEAP[z+8]=FHEAP[IHEAP[h+8]+20*(d-1)+4]}else{IHEAP[z+4]=B-IHEAP[IHEAP[h+8]+20*(IHEAP[h+40]-1)];IHEAP[z+16]=IHEAP[h]+IHEAP[IHEAP[h+8]+20* (IHEAP[h+40]-1)];FHEAP[z+8]=FHEAP[IHEAP[h+8]+20*(d-1)+4]-FHEAP[IHEAP[h+8]+20*(IHEAP[h+40]-1)+4]}FHEAP[j]+=FHEAP[z+8];if(!c)break f;IHEAP[h+40]=d}else FHEAP[z+8]=0;while(0);h=w+1;if(C1?g:1,H=F+48*W+8;g=10;f:for(;;){ca=g==10?Y:ca;U=g==10?Z:U;$=g==10?0:$;g=L+20*$+4;var M=$+-1,I=IHEAP[L+20*$];if($==0){var O=FHEAP[g];g=12}else{var R=I-IHEAP[IHEAP[H]+20*M],T=FHEAP[g]-FHEAP[IHEAP[H]+20*$+-16];g=14}M=g==14?T:O;I=g==14?R:I;var V=I==0;g:do if(V)g=71;else{var ba=M/I,fa=baU)){g=15;break g}g=16}while(0);var ca=g==15?fa:g==16?fa:ca,U=g==15?U:g==16?ba:U,$=$+1;if($!=K)g=17;else break f}g=19}else g=9;var Y=g==19?ca:Y,Z=g==19?U:Z;IHEAP[n]+=(IHEAP[F+48*W+24]-IHEAP[F+48* W+16])*(IHEAP[F+48*W+20]-IHEAP[F+48*W+12]);IHEAP[v]+=(IHEAP[F+48*W+24]-IHEAP[F+48*W+16])*(IHEAP[F+48*W+20]-IHEAP[F+48*W+12]);var W=W+1;if(G0?40:41;break b}else d=41;while(0);b:do if(d==41){if(IHEAP[da]!=1){g=41;d=43;break b}if(FHEAP[l+h*4]>0){g=42;d=40}else{g=42;d=43}break b}while(0);b:do if(d==40){g=IHEAP[b+20];x=IHEAP[b+28];var la=_malloc(12);if(la!=0){IHEAP[la]=g;IHEAP[la+4]=x;IHEAP[la+8]=k;g=44}else g=40;x=g==44?la:0;g=46;c:for(;;){na=g==46?0:na;Na=g== 46?0:Na;ya=g==46?O:ya;Ba=g==46?o:Ba;var ma=(Ba+ya)/2;_tcd_makelayer(b,h,ma,0);la=IHEAP[i]!=0;d:do if(la)if(IHEAP[k]!=0){if(_t2_encode_packets(x,IHEAP[b+44],m,h+1,f,t,c,IHEAP[b+8],IHEAP[b],IHEAP[b+16],0,IHEAP[b+12])==-999){g=48;break d}if(h==0){var ua=FHEAP[p];g=51}else{var ra=FHEAP[a+(h-1)*8]+FHEAP[j+h*8];g=53}if((g==51?ua:ra)0)IHEAP[IHEAP[IHEAP[b+40]+5584]+1076*m+20]==1?_dwt_decode(l,n):_dwt_decode_real(l,n);m+=1;g=24}if(g==26){_gettimeofday(k,0);m=IHEAP[k]+IHEAP[k+4]/1E6;if(FHEAP[_opj_clock_last]<0)FHEAP[_opj_clock_last]=m;k=m-FHEAP[_opj_clock_last];FHEAP[_opj_clock_last]=m;h=k- h;_opj_event_msg(IHEAP[b+20],4,__str2366,Pointer_make([h,0,0,0,0,0,0,0],0,ALLOC_STACK));if(IHEAP[IHEAP[b+40]+16]!=0){h=(IHEAP[IHEAP[j+20]+12]-IHEAP[IHEAP[j+20]+4])*(IHEAP[IHEAP[j+20]+8]-IHEAP[IHEAP[j+20]]);m=IHEAP[IHEAP[j+20]+24];IHEAP[IHEAP[IHEAP[b+40]+5584]+20]==1?_mct_decode(m,IHEAP[IHEAP[j+20]+32+24],IHEAP[IHEAP[j+20]+64+24],h):_mct_decode_real(m,IHEAP[IHEAP[j+20]+32+24],IHEAP[IHEAP[j+20]+64+24],h)}m=0;g=m>h;h=IHEAP[p+40];S=IHEAP[p+20]+-1+(1<>h;if(IHEAP[p+44]==0){h=_malloc(IHEAP[p+8]*4*IHEAP[p+12]);IHEAP[p+44]=h}u=IHEAP[IHEAP[IHEAP[b+40]+5584]+1076*m+20]==1;s=IHEAP[l+ 4];t=sf){h=52;break e}h=54}while(0);IHEAP[IHEAP[P]+4*I]=h==54?R:h==51?q:f;var V=V+1;if(Of){h=64;break e}h=66}while(0);IHEAP[IHEAP[P]+4*I]=h==66?R:h==63?q:f;var fa=fa+1;if(O1)a=2;else break a}IHEAP[j]=h;n=m;if(IHEAP[k+8]==0){_free(k);d=0}else{a=_calloc(IHEAP[k+8],16);IHEAP[k+12]= a;if(IHEAP[k+12]!=0){h=IHEAP[k+12];j=i=IHEAP[k+12]+16*IHEAP[k+4]*IHEAP[k];m=0;c=m=0){v=i;c=h;a=a;h=a+-2;i=a+-1;for(a=8;;){t=a==8?0:t;s=a==8?c:s;var q=t*-2;p=h+q;a=i+q;r=v+16*t;q=v+16*(t+1);IHEAP[s]=r;s=s+16;if(a>=0){IHEAP[s]=r;var u=s+16;a=10}else a=9;var s=a==10?u:s,t=t+1;if(p>=0)a=12;else break}h=s;i=q}a=(l&1)!=0;c:do if(a)c=15;else{if(l==IHEAP[g+m*4]-1){c=15;break c}i= j;j+=16*IHEAP[e+m*4];c=18;break c}while(0);if(c==15)j=i;l+=1;var v=m;if(le))break;IHEAP[f+4]=e;var a=IHEAP[f];c=4}}_tgt_setvalue.__index__=Runtime.getFunctionIndex(_tgt_setvalue,"_tgt_setvalue"); function _tgt_encode(b,f,e,c){var a=STACKTOP;STACKTOP+=124;_memset(a,0,124);var d,g=null;g=a;f=IHEAP[f+12]+16*e;if(IHEAP[f]!=0){f=f;e=g;for(g=0;;){d=g==0?0:j;g=g==0?f:i;var h=e+4*(d+1);IHEAP[e+4*d]=g;var i=IHEAP[g],j=d+1;if(IHEAP[i]!=0)d=g=1;else{d=2;break}}g=h;f=i}h=f;i=g;g=4;a:for(;;){p=g==18?p:0;o=g==18?o:h;e=g==18?l:0;g=p*-1;j=i+4*g;f=i+4*(g+-1);g=o+8;if(e>IHEAP[o+8]){IHEAP[g]=e;g=6}else{var k=IHEAP[g];g=8}e=g==8?k:e;var m=o+4;g=9;b:for(;;){d=g==9?0:n;var l=e+d;if(!(l=IHEAP[m]){d= 13;break b}_bio_write(b,0,1);var n=d+1;g=14;d=10}b:do if(d==13){if(IHEAP[o+12]!=0)break b;_bio_write(b,1,1);IHEAP[o+12]=1}while(0);IHEAP[o+8]=l;if(j==a)break a;var o=IHEAP[f],p=p+1;g=18;d=5}STACKTOP=a}_tgt_encode.__index__=Runtime.getFunctionIndex(_tgt_encode,"_tgt_encode"); function _tgt_decode(b,f,e,c){var a=STACKTOP;STACKTOP+=124;_memset(a,0,124);var d=null;d=a;f=IHEAP[f+12]+16*e;if(IHEAP[f]!=0){f=f;e=d;for(d=0;;){i=d==0?0:i;d=d==0?f:h;var g=e+4*(i+1);IHEAP[e+4*i]=d;var h=IHEAP[d],i=i+1;if(IHEAP[h]!=0)d=1;else break}d=g;f=h}g=f;h=d;d=4;a:for(;;){p=d==17?p:0;var j=d==17?o:g;f=d==17?l:0;d=p*-1;o=h+4*d;i=h+4*(d+-1);d=j+8;if(f>IHEAP[j+8]){IHEAP[d]=f;d=6}else{var k=IHEAP[d];d=8}f=d==8?k:f;e=j+4;var m=j+4;for(d=9;;){var l=d==9?f:d==15?n:l;if(!(l=0){c=3;e=4}else{c= 3;e=5}a:for(;;)if(e==4){_fprintf(c==4?d:a,__str429,1<=0)e=c=4;else{c=4;e=5}}else if(e==5){_fputc(10,c==3?a:d);_fprintf(a,__str328,IHEAP[b+76]);_fprintf(a,__str328,IHEAP[b+80]);_fprintf(a,__str328,IHEAP[b+84]);_fwrite(__str631,15,1,a);_fwrite(__str732,44,1,a);e=l!=0?6:7;break a}e==6&&_fwrite(__str833,14,1,a);n!=0&&_fwrite(__str934,10,1,a);d=l!=0;a:do if(d){if(n==0)break a;_fwrite(__str1035,13,1,a)}while(0);_fputc(10,a);d= 0;o=dIHEAP[IHEAP[b+60]+4*g])break e;var Q=IHEAP[IHEAP[b+88]+572*d+152+i*4]*IHEAP[IHEAP[b+88]+572*d+20+i*4];j=0;if(jIHEAP[IHEAP[b+60]+4*g])break e;E=IHEAP[IHEAP[b+88]+572*d+152+i*4]*IHEAP[IHEAP[b+88]+572*d+20+i*4];j=0;if(jIHEAP[IHEAP[b+60]+4*g])break e;f:do if(M){ka=ba*ca;var U=V*fa;c=70;for(;;){aa=c==70?0:aa;X=c==70?T:X;var $=ka==R+aa;h:do if($){e=Q;if(eja?c:ja;i+=1;if(i=c|Q^1; f:do if(ca)c=96;else{U=V*fa;$=R*ba;c=98;for(;;){da=c==98?0:da;pa=c==98?ha:pa;Y=U==I+da;h:do if(Y){e=B;if(ela?g:la;i+=1;if(i=c|ba^1;g:do if(ma)c=121;else{var ua=$*ia,ra=U*Y;c=123;for(;;){Na=c==123?0:Na;Ba=c==123?Pa:Ba;var ta=ua==fa+Na;i:do if(ta){e=D;if(e8){_fwrite(__str54122,57,1,IHEAP[_stderr]);h=0}else{IHEAP[a]=(IHEAP[d+19]&32)!=0^1;a=(IHEAP[d+8]/8|0)*IHEAP[d+6];if(a>0){_fwrite(__str155,44,1,IHEAP[_stderr]);_fseek(b,a, 1)}h=1}g=6;break a}else g=1;while(0);if(g==1)h=0;b=h;STACKTOP=d;return b}_tga_readheader.__index__=Runtime.getFunctionIndex(_tga_readheader,"_tga_readheader"); function _tga_writeheader(b,f,e,c,a){var d=STACKTOP;STACKTOP+=20;_memset(d,0,20);var g,h,i=f!=0;a:do if(i){if(e==0){g=1;break a}if(c==0){g=1;break a}_llvm_memset_p0i8_i32(d,0,18,1,0);IHEAP[d+18]=f&255;IHEAP[d+14]=e&65535;IHEAP[d+16]=c&65535;IHEAP[d+2]=2;IHEAP[d+19]=8;if(a!=0){f=d+19;IHEAP[f]=(IHEAP[f]|32)&255}_fwrite(d,18,1,b);h=1;g=5;break a}else g=1;while(0);if(g==1)h=0;b=h;STACKTOP=d;return b}_tga_writeheader.__index__=Runtime.getFunctionIndex(_tga_writeheader,"_tga_writeheader"); function _tgatoimage(b,f){var e=STACKTOP;STACKTOP+=167;_memset(e,0,167);var c,a=null,d,g=e+4,h=e+8,i=e+12,j=e+16,k,m,l,n=e+160,o=e+161,p=e+162,r=e+163,q=e+164,u=e+165,s=e+166;IHEAP[i]=0;d=_fopen(b,__str73);if(d!=0)if(_tga_readheader(d,h,e,g,i)!=0)if(IHEAP[h]==24|IHEAP[h]==32){_llvm_memset_p0i8_i32(j,0,144,1,0);var t=IHEAP[h]==8;a:do{if(t)c=m=1;else{a=IHEAP[h];m=l=a==16;if(a==16){a=2;c=3}else{a=2;c=1}}break a}while(0);if(c==1){k=IHEAP[h]==32;var v=m;a=1}h=a==1?v:l;a=a==2?1:k;if(h!=0){h=2;k=a!=0?2: 1}else{k=a!=0?4:3;h=1}m=IHEAP[f+18188];l=IHEAP[f+18192];if(01?a:1)-0;for(a=6;;){a=a==6?0:B;B=0+a;var y=j+B*36+12,x=j+B*36+8,w=j+B*36+4,C=j+B*36,z=j+B*36+32,A=j+B*36+28;IHEAP[j+B*36+24]=8;IHEAP[A]=8;IHEAP[z]=0;IHEAP[C]=m;IHEAP[w]=l;IHEAP[x]=v;IHEAP[y]=c;var B=a+1;if(B!=t)a=7;else break}}j=_opj_image_create(k,j,h);if(j!=0){IHEAP[j]=IHEAP[f+18180];IHEAP[j+4]=IHEAP[f+18184];if(IHEAP[j]!=0){var D=IHEAP[j]+1+(IHEAP[e]-1)*m;a=12}else{var J=(IHEAP[e]-1)*m+1;a=10}IHEAP[j+ 8]=a==10?J:D;if(IHEAP[j+4]!=0){var E=IHEAP[j+4]+1+(IHEAP[g]-1)*l;a=15}else{var N=(IHEAP[g]-1)*l+1;a=13}IHEAP[j+12]=a==13?N:E;if(01?a:1,r=0*a,q=(e>1?e:1)-0;c=11;a:for(;;){var u=c==11?0:C,s=r+a*u;if(o){c=12;e=13}else{c=12;e=14}for(;;)if(e==13){w=c==19?w:0;e=s+w;var t=IHEAP[IHEAP[IHEAP[i]+44]+4*e];if(IHEAP[j]>2){var v=IHEAP[IHEAP[IHEAP[k]+48+44]+4*e],y=IHEAP[IHEAP[IHEAP[m]+96+44]+4*e];c=15}else c=13;var x=c==15?v:t;_fputc(Math.floor((c==15?y:t)*g),h);_fputc(Math.floor(x*g),h); _fputc(Math.floor(t*g),h);l&&_fputc(Math.floor(IHEAP[IHEAP[IHEAP[n]+48*d+44]+4*e]*g),h);var w=w+1;if(w!=p){c=19;e=13}else{c=20;e=14}}else if(e==14){var C=u+1;if(C!=q){c=14;continue a}else break a}}}a=0}else a=1}else if(e==5){_fwrite(__str761,63,1,IHEAP[_stderr]);a=1}}else{_fprintf(IHEAP[_stderr],__str660,f);a=1}return a}_imagetotga.__index__=Runtime.getFunctionIndex(_imagetotga,"_imagetotga"); function _bmptoimage(b,f){var e=STACKTOP;STACKTOP+=164;_memset(e,0,164);var c,a=null,d,g,h,i,j,k,m,l,n=e+108,o=e+124,p,r,q,u,s,t,v,y,x,w;g=IHEAP[f+18188];h=IHEAP[f+18192];j=0;t=s=1;y=v=0;l=_fopen(b,__str73);var C=l!=0;a:do if(C){d=__IO_getc(l)&65535;IHEAP[n]=d;d=__IO_getc(l)*256;IHEAP[n]=IHEAP[n]+d&65535;if(IHEAP[n]!=19778){_fwrite(__str862,23,1,IHEAP[_stderr]);d=0}else{d=__IO_getc(l);IHEAP[n+4]=d;d=__IO_getc(l)*256;IHEAP[n+4]=d+IHEAP[n+4];d=__IO_getc(l)*65536;IHEAP[n+4]=d+IHEAP[n+4];d=__IO_getc(l)* 16777216;IHEAP[n+4]=d+IHEAP[n+4];d=__IO_getc(l)&65535;IHEAP[n+8]=d;d=__IO_getc(l)*256;IHEAP[n+8]=IHEAP[n+8]+d&65535;d=__IO_getc(l)&65535;IHEAP[n+10]=d;d=__IO_getc(l)*256;IHEAP[n+10]=IHEAP[n+10]+d&65535;d=__IO_getc(l);IHEAP[n+12]=d;d=__IO_getc(l)*256;IHEAP[n+12]=d+IHEAP[n+12];d=__IO_getc(l)*65536;IHEAP[n+12]=d+IHEAP[n+12];d=__IO_getc(l)*16777216;IHEAP[n+12]=d+IHEAP[n+12];d=__IO_getc(l);IHEAP[o]=d;d=__IO_getc(l)*256;IHEAP[o]=d+IHEAP[o];d=__IO_getc(l)*65536;IHEAP[o]=d+IHEAP[o];d=__IO_getc(l)*16777216; IHEAP[o]=d+IHEAP[o];d=__IO_getc(l);IHEAP[o+4]=d;d=__IO_getc(l)*256;IHEAP[o+4]=d+IHEAP[o+4];d=__IO_getc(l)*65536;IHEAP[o+4]=d+IHEAP[o+4];d=__IO_getc(l)*16777216;IHEAP[o+4]=d+IHEAP[o+4];d=IHEAP[o+4];k=__IO_getc(l);IHEAP[o+8]=k;k=__IO_getc(l)*256;IHEAP[o+8]=k+IHEAP[o+8];k=__IO_getc(l)*65536;IHEAP[o+8]=k+IHEAP[o+8];k=__IO_getc(l)*16777216;IHEAP[o+8]=k+IHEAP[o+8];k=IHEAP[o+8];p=__IO_getc(l)&65535;IHEAP[o+12]=p;p=__IO_getc(l)*256;IHEAP[o+12]=IHEAP[o+12]+p&65535;p=__IO_getc(l)&65535;IHEAP[o+14]=p;p=__IO_getc(l)* 256;IHEAP[o+14]=IHEAP[o+14]+p&65535;p=__IO_getc(l);IHEAP[o+16]=p;p=__IO_getc(l)*256;IHEAP[o+16]=p+IHEAP[o+16];p=__IO_getc(l)*65536;IHEAP[o+16]=p+IHEAP[o+16];p=__IO_getc(l)*16777216;IHEAP[o+16]=p+IHEAP[o+16];p=__IO_getc(l);IHEAP[o+20]=p;p=__IO_getc(l)*256;IHEAP[o+20]=p+IHEAP[o+20];p=__IO_getc(l)*65536;IHEAP[o+20]=p+IHEAP[o+20];p=__IO_getc(l)*16777216;IHEAP[o+20]=p+IHEAP[o+20];p=__IO_getc(l);IHEAP[o+24]=p;p=__IO_getc(l)*256;IHEAP[o+24]=p+IHEAP[o+24];p=__IO_getc(l)*65536;IHEAP[o+24]=p+IHEAP[o+24];p= __IO_getc(l)*16777216;IHEAP[o+24]=p+IHEAP[o+24];p=__IO_getc(l);IHEAP[o+28]=p;p=__IO_getc(l)*256;IHEAP[o+28]=p+IHEAP[o+28];p=__IO_getc(l)*65536;IHEAP[o+28]=p+IHEAP[o+28];p=__IO_getc(l)*16777216;IHEAP[o+28]=p+IHEAP[o+28];p=__IO_getc(l);IHEAP[o+32]=p;p=__IO_getc(l)*256;IHEAP[o+32]=p+IHEAP[o+32];p=__IO_getc(l)*65536;IHEAP[o+32]=p+IHEAP[o+32];p=__IO_getc(l)*16777216;IHEAP[o+32]=p+IHEAP[o+32];p=__IO_getc(l);IHEAP[o+36]=p;p=__IO_getc(l)*256;IHEAP[o+36]=p+IHEAP[o+36];p=__IO_getc(l)*65536;IHEAP[o+36]=p+IHEAP[o+ 36];p=__IO_getc(l)*16777216;IHEAP[o+36]=p+IHEAP[o+36];var z=IHEAP[o+14]==24;b:do if(z){j=3;m=1;_llvm_memset_p0i8_i32(e,0,108,1,0);i=0;if(ii?a:i)-x;for(a=1;;){E=a==1?0:E;c=x+E;a=e+c*36+12;w=e+c*36+8;var A=e+c*36+4,B=e+c*36,D=e+c*36+32,J=e+c*36+28;IHEAP[e+c*36+24]=8;IHEAP[J]=8;IHEAP[D]=0;IHEAP[B]=p;IHEAP[A]=r;IHEAP[w]=q;IHEAP[a]=u;var E=E+1;if(E!=i)c=a=2;else{c=3;break}}}j=p=_opj_image_create(j,e,m);if(p!=0){IHEAP[j]=IHEAP[f+18180];IHEAP[j+4]=IHEAP[f+18184];if(IHEAP[j]!= 0){var N=IHEAP[j]+1+(d-1)*g;a=8}else{var Q=(d-1)*g+1;a=6}IHEAP[j+8]=a==6?Q:N;if(IHEAP[j+4]!=0){var S=IHEAP[j+4]+1+(k-1)*h;a=11}else{var P=(k-1)*h+1;a=9}IHEAP[j+12]=a==9?P:S;_fseek(l,0,0);_fseek(l,IHEAP[n+12],0);x=IHEAP[o+4];w=IHEAP[o+8];if(x*3%4!=0){var G=4-x*3%4;a=12}else a=114;r=a==12?G:0;m=_malloc((x*3+r)*w);_fread(m,1,(x*3+r)*w,l);u=0;p=m;if(01?q:1)-0;m=w+-1-0;a=14;c:for(;;){K=a==14?0:K;c=a==14?p:F;a=m+K*-1;i=x;if(0B?a:B)-i;for(a=34;;){T=a==34?0:T;a=i+T;D=e+a*36+12;J=e+a*36+8;H=e+a*36+4;var I=e+a*36,O=e+a*36+32,R=e+a*36+28;IHEAP[e+a*36+24]=8;IHEAP[R]=8;IHEAP[O]=0;IHEAP[I]=c;IHEAP[H]=z;IHEAP[J]=u;IHEAP[D]=A;var T=T+1;if(T!=B)a=35;else break}}j=c=_opj_image_create(j,e,m);if(c!=0){IHEAP[j]=IHEAP[f+18180];IHEAP[j+4]=IHEAP[f+18184];if(IHEAP[j]!=0){var V=IHEAP[j]+1+(d-1)*g;a=40}else{var ba=(d-1)*g+1;a=38}IHEAP[j+8]=a==38?ba:V;if(IHEAP[j+4]!=0){var fa=IHEAP[j+4]+1+(k-1)*h;a=43}else{var ca=(k-1)* h+1;a=41}IHEAP[j+12]=a==41?ca:fa;m=_malloc(w*x);_fread(m,1,w*x,l);d=s!=0;i=u=0;k=iD?a:D)-i;for(a=68;;){U=a==68?0:U;c=i+U; a=e+c*36+12;J=e+c*36+8;H=e+c*36+4;I=e+c*36;O=e+c*36+32;R=e+c*36+28;IHEAP[e+c*36+24]=8;IHEAP[R]=8;IHEAP[O]=0;IHEAP[I]=x;IHEAP[H]=w;IHEAP[J]=A;IHEAP[a]=B;var U=U+1;if(U!=D)c=a=69;else{c=70;break}}}j=a=_opj_image_create(j,e,m);if(a!=0){IHEAP[j]=IHEAP[f+18180];IHEAP[j+4]=IHEAP[f+18184];if(IHEAP[j]!=0){var $=IHEAP[j]+1+(d-1)*g;a=74}else{var Y=(d-1)*g+1;a=72}IHEAP[j+8]=a==72?Y:$;if(IHEAP[j+4]!=0){var Z=IHEAP[j+4]+1+(k-1)*h;a=77}else{var W=(k-1)*h+1;a=75}IHEAP[j+12]=a==75?W:Z;_fseek(l,0,0);_fseek(l,IHEAP[n+ 12],0);m=_malloc(IHEAP[o+8]*IHEAP[o+4]);x=o+4;w=m;A=o+4;B=m;D=v;J=y;H=t;a=78;d:for(;;){i=a==78?H:a==91?aa:a==92?aa:a==87?aa:a==83?aa:aa;var X=a==78?J:a==91?ha:a==92?ha:a==87?0:a==83?X:ea;I=a==78?D:a==91?ka:a==92?ka:a==87?qa:a==83?ka:ka;a=79;e:for(;;){c=a==79?0:ia;var aa=a==79?i:0,ka=I+c;if(aa==0){c=82;break d}var ga=__IO_getc(l)&255;O=ga!=0;var ja=__IO_getc(l)&255;if(O){c=83;break e}O=ja;if(O==0){c=87;break e}else if(O!=1)if(O==2){c=106;break d}else{c=107;break e}var ia=c+1;a=88;c=80}if(c==83){i= 0;if(!(i>8&255&255,(d*(e%2)+d*e)*3+54>>16&255&255,(d*(e%2)+d*e)*3+54>>24&255&255);_fprintf(h,__str1266,0,0,0,0);_fprintf(h,__str1266,54,0,0,0);_fprintf(h,__str1266,40,0,0,0);_fprintf(h,__str1266,e&255&255,e>>8&255&255,e>>16&255&255,e>>24&255&255);_fprintf(h,__str1266,d&255&255,d>>8&255&255,d>>16&255&255,d>>24&255&255);_fprintf(h,__str1367,1,0);_fprintf(h,__str1367,24,0);_fprintf(h,__str1266, 0,0,0,0);_fprintf(h,__str1266,(d*(e%2)+d*e)*3&255&255,(d*(e%2)+d*e)*3>>8&255&255,(d*(e%2)+d*e)*3>>16&255&255,(d*(e%2)+d*e)*3>>24&255&255);_fprintf(h,__str1266,154,30,0,0);_fprintf(h,__str1266,154,30,0,0);_fprintf(h,__str1266,0,0,0,0);_fprintf(h,__str1266,0,0,0,0);if(IHEAP[IHEAP[b+24]+24]>8){i=IHEAP[IHEAP[b+24]+24]-8;_printf(__str1468,IHEAP[IHEAP[b+24]+24])}else i=0;if(IHEAP[IHEAP[b+24]+48+24]>8){j=IHEAP[IHEAP[b+24]+48+24]-8;_printf(__str1569,IHEAP[IHEAP[b+24]+48+24])}else j=0;if(IHEAP[IHEAP[b+24]+ 96+24]>8){c=IHEAP[IHEAP[b+24]+96+24]-8;_printf(__str1670,IHEAP[IHEAP[b+24]+96+24])}else c=0;g=0;if(g>i)%2+(c>>k)&255;var r=IHEAP[IHEAP[IHEAP[b+24]+48+44]+4*(0-((g/e|0)+1)*e+d*e+g%e)];if(IHEAP[IHEAP[b+24]+48+32]!=0){var q=1<>j)%2+(c>>m)&255;var u=IHEAP[IHEAP[IHEAP[b+24]+96+44]+4*(0-((g/e|0)+1)*e+d*e+g%e)];if(IHEAP[IHEAP[b+24]+96+32]!=0){var s=1<>n)%2+(c>>l)&255,r,o);o=(g+1)%e==0;c:do if(o){if(e*3%4==0)break c;r=4-e*3%4;if(r>0)c=20;else break c;for(;;){t=c==22?t:0;_fputc(0,h);var t=t+1;if(t!=r)c=22;else break c}}while(0);g+=1;if(!(g>8&255&255,e*d+1078+e%2*d>>16&255&255,e*d+1078+e%2*e>>24&255&255);_fprintf(h,__str1266,0,0,0,0);_fprintf(h,__str1266,54,4,0,0);_fprintf(h,__str1266,40,0,0,0);_fprintf(h,__str1266,e&255&255,e>>8&255&255,e>>16&255&255,e>>24&255&255);_fprintf(h,__str1266,d&255&255,d>>8&255&255,d>>16&255&255,d>>24&255&255);_fprintf(h,__str1367,1,0);_fprintf(h, __str1367,8,0);_fprintf(h,__str1266,0,0,0,0);_fprintf(h,__str1266,e%2*d+e*d&255&255,e%2*d+e*d>>8&255&255,e%2*d+e*d>>16&255&255,e%2*d+e*d>>24&255&255);_fprintf(h,__str1266,154,30,0,0);_fprintf(h,__str1266,154,30,0,0);_fprintf(h,__str1266,0,1,0,0);_fprintf(h,__str1266,0,1,0,0);if(IHEAP[IHEAP[b+24]+24]>8){i=IHEAP[IHEAP[b+24]+24]-8;_printf(__str1468,IHEAP[IHEAP[b+24]+24])}else i=0;g=0;b:for(;;){_fprintf(h,__str1266,g,g,g,0);g=p=g+1;if(!(p<256))break b}g=0;if(g>q)%2+(s>>p)&255,h);s=(g+1)%e==0;c:do if(s){if(e%4==0)break c;t=4-e%4;if(t>0)c=34;else break c;for(;;){y=c==36?y:0;_fputc(0,h);var y=y+1;if(y!=t)c=36;else break c}}while(0);g+=1;if(!(gM?a:M;IHEAP[IHEAP[A]+4*S]=a;var I=I+1;if(Q1){d=d;g=g+1;for(a=31;;){T=a==31?0:T;var O=g+T,R=(a==31?d:R)>>1,T=T+1;if(R>1)a=32;else break}g=O}IHEAP[c+28]=g+1;h=h}else{_fclose(i);h=0}}else{_fprintf(IHEAP[_stderr],__str1973,b);h=0}while(0);i=h;STACKTOP= e;return i}_pgxtoimage.__index__=Runtime.getFunctionIndex(_pgxtoimage,"_pgxtoimage"); function _imagetopgx(b,f){var e=STACKTOP;STACKTOP+=256;_memset(e,0,256);var c,a=null,d,g=b+16,h=b+24,i=b+16,j=b+24,k=b+24,m=b+24;a=0;a:for(;;){c=a==25?C:0;C=0+c;if(!(C256){var p=_malloc(o+1);a=7}else a=5;var r=a==7?p:e;_strncpy(r,f,n);a=r+n;IHEAP[i]>1?_sprintf(a,__str2377,C):_llvm_memcpy_p0i8_p0i8_i32(a,__str2478,5,1,0);n=_fopen(r,__str559);if(n==0){c=11;break a}o>256&&_free(r);o=IHEAP[IHEAP[j]+48*C+8]; var q=IHEAP[IHEAP[k]+48*C+12];_fprintf(n,__str2579,IHEAP[l+48*C+32]!=0?45:43,IHEAP[l+48*C+24],o,q);var u=IHEAP[l+48*C+24]<=8;b:do if(u)a=26;else{if(IHEAP[l+48*C+24]<=16){a=13;break b}a=15}while(0);l=a==15?4:a==26?1:2;if(0=0;b:do if(u){var s=l*8+-8,t=q*o;a=17;for(;;){x=a==17?0:x;var v=IHEAP[IHEAP[IHEAP[m]+48*C+44]+4*x];for(a=18;;){y=a==18?0:y;_fputc(v>>s+y*-8&255,n);var y=y+1;if(y!=l)a=19;else break}var x=x+1;if(x!=t)a=20;else break b}}else{s=q*o;for(a=22;;){var w=(a==22?0:w)+1;if(w!=s)a= 23;else break b}}while(0)}_fclose(n);var C=c+1;a=25;c=1}if(c==3)d=0;else if(c==4){_fwrite(__str2276,27,1,IHEAP[_stderr]);d=1}else if(c==11){d=r;_fprintf(IHEAP[_stderr],__str660,d);d=1}d=d;STACKTOP=e;return d}_imagetopgx.__index__=Runtime.getFunctionIndex(_imagetopgx,"_imagetopgx"); function _pnmtoimage(b,f){var e=STACKTOP;STACKTOP+=121;_memset(e,0,121);var c,a=null,d,g,h,i,j,k,m=e+4,l,n=e+8,o,p=e+116,r=e+120;g=IHEAP[f+18188];h=IHEAP[f+18192];i=_fopen(b,__str73);var q=i!=0;a:do if(q)if(_fgetc(i)!=80)d=0;else{j=d=_fgetc(i)&255;c=j==50?27:j==53?27:j==51?28:j==54?28:29;if(c==29){_fclose(i);d=0;break a}else if(c==27){k=1;l=2}else if(c==28){k=3;l=1}_fgetc(i);j=_fgetc(i)==35;b:do if(j)for(o=a=i;;)if(_fgetc(a)==10)if(_fgetc(o)!=35)break b;while(0);_fseek(i,-1,1);___01__isoc99_fscanf_(i, __str2680,e,m);_fgetc(i);_llvm_memset_p0i8_i32(n,0,108,1,0);j=0;if(jt?a:t)-j;for(a=6;;){A=a==6?0:A;a=j+A;var v=n+a*36+12,y=n+a*36+8,x=n+a*36+4,w=n+a*36,C=n+a*36+32,z=n+a*36+28;IHEAP[n+a*36+24]=8;IHEAP[z]=8;IHEAP[C]=0;IHEAP[w]=o;IHEAP[x]=c;IHEAP[y]=u;IHEAP[v]=s;var A=A+1;if(A!=t)a=7;else break}}o=j=_opj_image_create(k,n,l);if(j!=0){IHEAP[o]=IHEAP[f+18180];IHEAP[o+4]=IHEAP[f+18184];IHEAP[o+8]=IHEAP[f+18180]+1+(IHEAP[e]-1)*g;IHEAP[o+12]=IHEAP[f+ 18184]+1+(IHEAP[m]-1)*h;j=d==50;b:do if(j)c=10;else{if(d==51){c=10;break b}if(d!=53)if(d!=54){c=13;break b}j=0;if(!(j1?u:1;for(a=22;;){B=a==23?B:a==22?0:0;IHEAP[r]=0;_fread(r,1,1,d);IHEAP[IHEAP[IHEAP[c]+48*B+44]+4*j]=IHEAP[r];var B=B+1;if(B!=t)a=23;else{j+=1;if(j1?s:1;for(a=14;;){D=a==15?D:a==14?0:0;IHEAP[p]=0;___01__isoc99_fscanf_(d,__str2781,p);IHEAP[IHEAP[IHEAP[u]+48*D+44]+4*j]=IHEAP[p];var D=D+1;if(D!=v)c=a=15;else{j+=1;if(j8)a=58;else{g=(1<>g;g=IHEAP[IHEAP[b+24]+20];o=IHEAP[IHEAP[b+24]+4];c=IHEAP[b+4];d=o;o=IHEAP[IHEAP[b+24]+40];c=g-((c+-1+d)/d|0);g=o;IHEAP[IHEAP[b+24]+20]=c+-1+(1<>g;_fprintf(m,__str2882,i,j,a);if(IHEAP[IHEAP[b+24]+24]>8){g=IHEAP[IHEAP[b+24]+24]-8;_printf(__str2983,IHEAP[IHEAP[b+24]+24])}else g=0;if(IHEAP[IHEAP[b+24]+48+24]>8){d=IHEAP[IHEAP[b+24]+48+24]-8;_printf(__str3084,IHEAP[IHEAP[b+24]+48+24])}else d=0;if(IHEAP[IHEAP[b+24]+96+24]>8){a=IHEAP[IHEAP[b+24]+96+24]-8;_printf(__str3185,IHEAP[IHEAP[b+ 24]+96+24])}else a=0;if(01?a:1)-0;for(a=20;;){v=a==20?0:v;j=0+v;var u=IHEAP[IHEAP[IHEAP[b+24]+44]+4*j];if(IHEAP[IHEAP[b+24]+32]!=0){k=1<>g)%2+(a>>c)&255;var s=IHEAP[IHEAP[IHEAP[b+24]+48+44]+4*j];if(IHEAP[IHEAP[b+24]+48+32]!=0){n=1<>d)%2+(a>>o)&255;j=IHEAP[IHEAP[IHEAP[b+24]+96+44]+4*j];if(IHEAP[IHEAP[b+24]+96+32]!=0){var t= 1<>r)%2+(a>>p)&255);var v=v+1;if(v!=i)a=28;else break}}_fclose(m);c=31}else{_fprintf(IHEAP[_stderr],__str660,f);h=1;c=14}break a}while(0);a:do if(c==5){k=l==103;b:do if(k)a=5;else{if(l==71){a=32;c=33;break b}var y=IHEAP[b+16];a=34}while(0);k=n=a==34?y:a==32?1:1;if(IHEAP[b+16]>k){_fwrite(__str3286,48,1,IHEAP[_stderr]);_fwrite(__str3387,34,1,IHEAP[_stderr]);var x=n;a=36}else a=33;n=a==36?x:k;k=0;t=n>1;m=e;v=f;i=e; j=f;b:for(;;){if(!(k8)a=43;else{var w=(1<>p;d=IHEAP[IHEAP[b+24]+48*k+4]; p=IHEAP[IHEAP[b+24]+48*k+40];IHEAP[IHEAP[b+24]+48*k+20]=IHEAP[IHEAP[b+24]+48*k+20]-((IHEAP[b+4]+-1+d)/d|0)+-1+(1<>p;_fprintf(c,__str36125,g,o,a);if(IHEAP[IHEAP[b+24]+48*k+24]>8){var C=IHEAP[IHEAP[b+24]+24]-8;_printf(__str3788,k,IHEAP[IHEAP[b+24]+48*k+24]);a=47}else a=72;d=a==47?C:0;if(0>p)%2+(a>>d)&255, c);var A=A+1;if(A!=g)a=53;else break}}_fclose(c);k+=1;c=39}if(c==41){c=31;break a}else if(c==44){_fprintf(IHEAP[_stderr],__str660,e);h=1;c=14;break a}}while(0);if(c==31)h=0;h=h;STACKTOP=e;return h}_imagetopnm.__index__=Runtime.getFunctionIndex(_imagetopnm,"_imagetopnm"); function _imagetotif(b,f){var e,c=null,a,d,g,h,i,j,k,m,l,n;i=0;var o=IHEAP[b+16]==3;a:do if(o){if(IHEAP[IHEAP[b+24]]!=IHEAP[IHEAP[b+24]+48]){e=1;break a}if(IHEAP[IHEAP[b+24]+48]!=IHEAP[IHEAP[b+24]+96]){e=1;break a}if(IHEAP[IHEAP[b+24]+4]!=IHEAP[IHEAP[b+24]+48+4]){e=1;break a}if(IHEAP[IHEAP[b+24]+48+4]!=IHEAP[IHEAP[b+24]+96+4]){e=1;break a}if(IHEAP[IHEAP[b+24]+24]!=IHEAP[IHEAP[b+24]+48+24]){e=1;break a}if(IHEAP[IHEAP[b+24]+48+24]!=IHEAP[IHEAP[b+24]+96+24]){e=1;break a}j=_TIFFOpen(f,__str559);if(j!= 0){d=IHEAP[IHEAP[b+24]+8];c=IHEAP[IHEAP[b+24]+12];g=c*d;h=IHEAP[IHEAP[b+24]+24];_TIFFSetField(j,256,d);_TIFFSetField(j,257,c);_TIFFSetField(j,277,3);_TIFFSetField(j,258,h);_TIFFSetField(j,274,1);_TIFFSetField(j,284,1);_TIFFSetField(j,262,2);_TIFFSetField(j,278,1);k=_TIFFStripSize(j);h=__TIFFmalloc(k);d=0;if(IHEAP[IHEAP[b+24]+32]!=0){var p=1<>4&255;IHEAP[m+(l+1)]=(E>>8&15|(c&15)<<4)&255;IHEAP[m+ (l+2)]=E&255;IHEAP[m+(l+3)]=M>>4&255;IHEAP[m+(l+4)]=(I>>8&15|(M&15)<<4)&255;IHEAP[m+(l+5)]=I&255;IHEAP[m+(l+6)]=G>>4&255;IHEAP[m+(l+7)]=(J>>8&15|(G&15)<<4)&255;IHEAP[m+(l+8)]=J&255;d+=2;var ca=l+9;l+=9;c=39}if(!(H>4&255;if(!(l+1>8&15|(E&15)<<4)&255;if(!(l+2>4&255;if(!(l+4>8&15|(U&15)<<4)&255;if(!(l+5>4&255;if(!(l+7>8&15|(G&15)<<4)&255;if(!(l+8>8&255;IHEAP[m+(l+2)]=E&255;IHEAP[m+(l+3)]=E>>8&255;IHEAP[m+(l+4)]=J&255;IHEAP[m+(l+5)]=J>>8&255;d+=1;var ea=l+6;l+=6;c=63}if(!(ka>8&255;if(!(l+2>8&255;if(!(l+4>8&255;d+=1;l+=6;c=75}}while(0);var ha=c==35?H:c==59?ka:c==17?D:c==42?H:c==53?H:c==52?H:c==51?H:c==50?H:c==49?H:c==48?H:c==47?H:c==46?H:c==41?H:c==65?ka:c==70?ka:c==71?ka:c==72?ka:c==73?ka:c==74?ka:c==66?ka:c==24?D:c==29?D:c==30?D:D;_TIFFWriteEncodedStrip(j,A,s,k);var qa= e+1;c=23;e=11}if(e==13){__TIFFfree(h);_TIFFClose(j);e=76;break a}else if(e==56){_fprintf(IHEAP[_stderr],__str38126,IHEAP[IHEAP[b+24]+24]);_fwrite(__str39127,9,1,IHEAP[_stderr]);a=1;e=7;break a}}else{_fprintf(IHEAP[_stderr],__str660,f);a=1;e=7;break a}}else e=1;while(0);a:do if(e==1)if(IHEAP[b+16]==1){j=_TIFFOpen(f,__str559);if(j!=0){d=IHEAP[IHEAP[b+24]+8];c=IHEAP[IHEAP[b+24]+12];g=c*d;h=IHEAP[IHEAP[b+24]+24];_TIFFSetField(j,256,d);_TIFFSetField(j,257,c);_TIFFSetField(j,277,1);_TIFFSetField(j,258, h);_TIFFSetField(j,274,1);_TIFFSetField(j,284,1);_TIFFSetField(j,262,1);_TIFFSetField(j,278,1);k=_TIFFStripSize(j);h=__TIFFmalloc(k);c=d=0;o=h;p=g;D=h;N=k;S=Q=g;F=c;c=77;b:for(;;){L=c==83?na:0;K=F+L;c=_TIFFNumberOfStrips(j);if(!(K>4&255;IHEAP[T]=(ba>>8&15|(ra&15)<<4)&255;IHEAP[R]=ba&255;d+=2;var ra=O+1;c=93}else{if(IHEAP[IHEAP[b+24]+24]==16)c=94;else{e=96;break b}for(;;){O=c==101?va:0;c= O*2;R=o+(c+1);T=o+c;V=_TIFFStripSize(j);if(!(c>8&255;d+=1;var va=O+1;c=101}}while(0);_TIFFWriteEncodedStrip(j,K,D,N);var na=L+1;c=83;e=78}if(e==80){__TIFFfree(o);_TIFFClose(j);e=76;break a}else if(e==96){_fprintf(IHEAP[_stderr],__str40128,IHEAP[IHEAP[b+24]+24]);_fwrite(__str39127,9,1,IHEAP[_stderr]);a=1;e=7;break a}}else{_fprintf(IHEAP[_stderr], __str660,f);a=1;e=7;break a}}else{_fwrite(__str4189,80,1,IHEAP[_stderr]);_fwrite(__str39127,9,1,IHEAP[_stderr]);a=1;e=7;break a}while(0);if(e==76)a=0;return a}_imagetotif.__index__=Runtime.getFunctionIndex(_imagetotif,"_imagetotif"); function _tiftoimage(b,f){var e=STACKTOP;STACKTOP+=128;_memset(e,0,128);var c,a=null,d,g,h,i,j,k,m,l,n=e+20,o,p;g=IHEAP[f+18188];h=IHEAP[f+18192];i=_TIFFOpen(b,__str42129);var r=i!=0;a:do if(r){_TIFFGetField(i,256,e);_TIFFGetField(i,257,e+4);_TIFFGetField(i,258,e+12);_TIFFGetField(i,339,e+14);_TIFFGetField(i,277,e+16);IHEAP[e+8]=0;_TIFFGetField(i,262,e+8);_TIFFGetField(i,284,e+18);j=IHEAP[e];m=IHEAP[e+4];if(IHEAP[e+8]==2){d=3;l=1;_llvm_memset_p0i8_i32(n,0,108,1,0);if(01?a:1)-0;for(a=1;;){A=a==1?0:A;p=0+A;c=n+p*36+24;a=n+p*36+28;var w=n+p*36+12;o=n+p*36+8;var C=n+p*36+4,z=n+p*36;p=n+p*36+32;if(IHEAP[k]!=0){IHEAP[c]=12;IHEAP[a]=12}else{IHEAP[c]=IHEAP[v];IHEAP[a]=IHEAP[y]}IHEAP[p]=0;IHEAP[z]=q;IHEAP[C]=u;IHEAP[o]=s;IHEAP[w]=t;var A=A+1;if(A!=x){a=4;c=2}else{c=5;break}}}d=a=_opj_image_create(d,n,l);if(a!=0){IHEAP[d]=IHEAP[f+18180];IHEAP[d+4]=IHEAP[f+18184];if(IHEAP[d]!=0){var B=IHEAP[d]+1+(j-1)*g;a=10}else{var D=(j-1)*g+1;a=8}IHEAP[d+ 8]=a==8?D:B;if(IHEAP[d+4]!=0){var J=IHEAP[d+4]+1+(m-1)*h;a=13}else{var E=(m-1)*h+1;a=11}IHEAP[d+12]=a==11?E:J;j=_TIFFStripSize(i);j=__TIFFmalloc(j);k=_TIFFStripSize(i);m=0;o=IHEAP[IHEAP[d+24]+12]*IHEAP[IHEAP[d+24]+8];a=0;l=j;k=k;q=j;u=e+12;t=s=o;v=e+12;y=o;x=f+18676;w=e+12;o=o;C=f+18676;z=a;a=14;b:for(;;){c=a==20?S:0;a=z+c;p=_TIFFNumberOfStrips(i);if(!(a>4|IHEAP[a+p]<<4;IHEAP[IHEAP[IHEAP[d+24]+48+44]+4*m]=IHEAP[a+(p+2)]|(IHEAP[a+(p+1)]&15)<<8;IHEAP[IHEAP[IHEAP[d+24]+96+44]+4*m]=IHEAP[a+(p+4)]>>4|IHEAP[a+(p+3)]<<4;IHEAP[IHEAP[IHEAP[d+24]+44]+4*(m+1)]=IHEAP[a+(p+5)]|(IHEAP[a+(p+4)]&15)<<8;IHEAP[IHEAP[IHEAP[d+24]+48+44]+4*(m+1)]=IHEAP[a+(p+7)]>>4|IHEAP[a+(p+6)]<<4;IHEAP[IHEAP[IHEAP[d+24]+96+44]+4*(m+1)]=IHEAP[a+(p+8)]|(IHEAP[a+(p+7)]&15)<<8;m+=2;p+=9}else if(IHEAP[v]==16)for(p=0;;){if(!(p>4;IHEAP[IHEAP[IHEAP[d+24]+48+44]+4*m]=IHEAP[IHEAP[IHEAP[d+24]+48+44]+4*m]+8>>4;IHEAP[IHEAP[IHEAP[d+24]+96+44]+4*m]=IHEAP[IHEAP[IHEAP[d+24]+96+44]+4*m]+8>>4}m+=1;p+=6}else{if(IHEAP[w]!=8){c=27;break b}for(p=0;;){if(!(p>4|IHEAP[q+z]<<4;IHEAP[IHEAP[IHEAP[d+24]+44]+4*(m+1)]=IHEAP[p]|(IHEAP[N]&15)<<8;m+=2;var K=a+1;a=46}else if(IHEAP[t]== 16)for(a=73;;){a=a==49?H:0;z=a*2;if(!(zr?p:r)-c;for(c=6;;){q=c==6?0:q;_fputc(n&IHEAP[j+4*q]&255,o);var q=q+1;if(q!=p)c=7;else break}j=j+4*p}i+=1;if(!(ir?p:r)-c;for(c=12;;){u=c==12?0:u;_fputc(n&IHEAP[j+4*u]&255,o);var u=u+1;if(u!=p)c=13;else break}j=j+4*p}i+=1;if(!(it?r:t)-c;for(c=19;;){v=c==19?0:v;c=n&IHEAP[j+4*v]&65535;_fputc(c>>8&255,o);_fputc(c&255,p);var v=v+1;if(v!=r)c=20;else break}j= j+4*r}i+=1;if(!(it?r:t)-c;for(c=25;;){y=c==25?0:y;c=n&IHEAP[j+4*y]&65535;_fputc(c>>8&255,o);_fputc(c&255,p);var y=y+1;if(y!=r)c=26;else break}j=j+4*r}i+=1;if(!(iP?a:P)-o;for(a=19;;){M=a==19?0:M;a=o+M;c=y+a*36+12;var G=y+a*36+8,F=y+a*36+4,L=y+a*36,K=y+a*36+32,H=y+a*36+28;IHEAP[y+a*36+24]=E;IHEAP[H]=A;IHEAP[K]=0;IHEAP[L]=C;IHEAP[F]=z;IHEAP[G]=Q;IHEAP[c]=S;var M=M+1;if(M!=P)c=a=20;else{c=21;break}}}v=o=_opj_image_create(v,y,1);if(o==0){c= 4;break a}IHEAP[v]=IHEAP[f+18180];IHEAP[v+4]=IHEAP[f+18184];IHEAP[v+8]=IHEAP[v]+1+(IHEAP[p]-1)*x+IHEAP[v];IHEAP[v+12]=IHEAP[v+4]+1+(IHEAP[r]-1)*w+IHEAP[v+4];C=IHEAP[IHEAP[v+24]+44];z=IHEAP[IHEAP[v+24]+48+44];a=IHEAP[IHEAP[v+24]+96+44];A=IHEAP[IHEAP[v+24]+144+44];o=0;if(!(o8&w<16){w=16;x=1}if(w!=1&w!=2&w!=4&w!=8&w!=16)_fprintf(IHEAP[_stderr],__str62146,f,w);else{d=_fopen(f,__str559);if(d!=0){n=IHEAP[g]=0;var J=_png_create_write_struct(__str61145,0,0,0);IHEAP[e]=J;J=IHEAP[e]==0;a:do if(!J){var E=_png_create_info_struct(IHEAP[e]);IHEAP[g]=E;E=IHEAP[g]==0;b:do if(!E){if(__setjmp(IHEAP[e])!= 0)break b;_png_init_io(IHEAP[e],d);_png_set_compression_level(IHEAP[e],9);r=w==16;c:do if(r)A=-1;else if(w==8)A=255;else if(w==4)A=15;else if(w==2)A=3;else{if(w!=1)break c;A=1}while(0);var N=IHEAP[b+16];r=N;o=N>=3;c:do if(o){o=IHEAP[IHEAP[b+24]]==IHEAP[IHEAP[b+24]+48];d:do if(o){if(IHEAP[IHEAP[b+24]+48]!=IHEAP[IHEAP[b+24]+96])break d;if(IHEAP[IHEAP[b+24]+4]!=IHEAP[IHEAP[b+24]+48+4])break d;if(IHEAP[IHEAP[b+24]+48+4]!=IHEAP[IHEAP[b+24]+96+4])break d;if(IHEAP[IHEAP[b+24]+24]!=IHEAP[IHEAP[b+24]+48+24])break d; if(IHEAP[IHEAP[b+24]+48+24]!=IHEAP[IHEAP[b+24]+96+24])break d;n=r>3;y=w==16;o=IHEAP[IHEAP[b+24]+8];p=IHEAP[IHEAP[b+24]+12];h=IHEAP[IHEAP[b+24]+44];i=IHEAP[IHEAP[b+24]+48+44];j=IHEAP[IHEAP[b+24]+96+44];q=w&255;IHEAP[B+2]=q;IHEAP[B+1]=q;IHEAP[B]=q;if(n!=0){IHEAP[B+4]=w&255;k=IHEAP[IHEAP[b+24]+144+44];q=6}else{k=IHEAP[B+4]=0;q=2}_png_set_sBIT(IHEAP[e],IHEAP[g],B);_png_set_IHDR(IHEAP[e],IHEAP[g],o,p,w,q,0,0,0);_png_write_info(IHEAP[e],IHEAP[g]);D<8&&_png_set_packing(IHEAP[e]);if(x!=0){C=16-D;z=D-C}if(IHEAP[IHEAP[b+ 24]+32]!=0){var Q=1<ea?ka:ea)-a;a=24;g:for(;;){Ba=a==24?0:Ba;ya=a==24?i:ya;na=a==24?j:na;va=a==24?k:va;ta=a==24?h:ta;ea=M+IHEAP[ta];h:do if(Na){a=ea;var oa=ta+4;if(I)a=(a>>R)+(a<>8&255,da=l;l=da+1;IHEAP[da]=pa;pa=a&255;da=l;l=da+1;IHEAP[da]=pa;a=T+IHEAP[ya];pa=ya+4;if(V)a=(a>>fa)+(a<>8&255;var ha=l;l=ha+1;IHEAP[ha]=da;da=a&255;a=l;l=a+1;IHEAP[a]=da;a=ca+IHEAP[na];da=na+4;if(U)a=(a>>Y)+(a<<$);ha=a>>8&255;var qa=l;l=qa+1;IHEAP[qa]=ha;a=a&255;ha=l;l=ha+1;IHEAP[ha]=a;if(!Z){a= 29;break h}var wa=va+4;a=IHEAP[va];if(W)a=(a>>aa)+(a<>8&255;qa=l;l=qa+1;IHEAP[qa]=ha;a=a&255;ha=l;l=ha+1;IHEAP[ha]=a;a=33}else{var la=L&ea&255,ma=l;l=ma+1;IHEAP[ma]=la;la=ta+4;ma=K&ga+IHEAP[ya]&255;var ua=l;l=ua+1;IHEAP[ua]=ma;ma=ya+4;ua=H&ja+IHEAP[na]&255;a=l;l=a+1;IHEAP[a]=ua;ua=na+4;if(!ia){a=35;break h}var ra=c&IHEAP[va]&255;a=l;l=a+1;IHEAP[a]=ra;ra=va+4;a=36}while(0);var ta=a==35?la:a==36?la:a==29?oa:oa,va=a==35?va:a==36?ra:a==29?va:wa,na=a==35?ua:a==36?ua:a==29?da:da,ya=a==35?ma:a== 36?ma:a==29?pa:pa,Ba=Ba+1;if(Ba!=ka)a=31;else break g}i=ya;j=na;k=va;h=ta}_png_write_row(IHEAP[e],m);t+=1;var Na=m;if(t8){m=_malloc(m*2*t);t=0;y=m;if(tO?G:O)-I;if(x!=0)if(M){if(c){a=56;c=57}else{a=56;c=58}for(;;)if(c==57){Ya=a==57?Ya:0;c=a==57?xa:s;xa=za+IHEAP[u+4*Ya];xa=(xa>>L)+(xa<>8&255;I=l;l=I+1;IHEAP[I]=M;xa=xa&255&255;M=l;l=M+1;IHEAP[M]=xa;var xa=c+4;c=IHEAP[c];c=(c>>H)+(c<>8&255;I=l;l=I+1;IHEAP[I]=M;c=c&255&255;M=l;l=M+ 1;IHEAP[M]=c;var Ya=Ya+1;if(Ya!=G)c=a=57;else{a=57;c=59;break}}else if(c==58){$a=a==58?$a:0;c=za+IHEAP[u+4*$a];c=(c>>L)+(c<>8&255;I=l;l=I+1;IHEAP[I]=M;c=c&255&255;M=l;l=M+1;IHEAP[M]=c;var $a=$a+1;if($a!=G)c=a=58;else{a=58;c=61;break}}if(c==59){var db=u+4*G;a=59}else if(c==61){var Ta=u+4*G;a=61}}else{if(c){a=62;c=63}else{a=62;c=64}for(;;)if(c==63){Ga=a==63?Ga:0;K=a==63?Ma:s;Ma=za+IHEAP[u+4*Ga];Ma=(Ma>>L)+(Ma<>8&255;c=l;l=c+1;IHEAP[c]=H;Ma=Ma&255&255;H=l;l=H+1;IHEAP[H]=Ma;var Ma=K+ 4;K=IHEAP[K];H=K>>8&255;c=l;l=c+1;IHEAP[c]=H;K=K&255&255;H=l;l=H+1;IHEAP[H]=K;var Ga=Ga+1;if(Ga!=G)c=a=63;else{a=63;c=65;break}}else if(c==64){Ca=a==64?Ca:0;K=za+IHEAP[u+4*Ca];K=(K>>L)+(K<>8&255;c=l;l=c+1;IHEAP[c]=H;K=K&255&255;H=l;l=H+1;IHEAP[H]=K;var Ca=Ca+1;if(Ca!=G)c=a=64;else{a=64;c=66;break}}if(c==65){var Ka=u+4*G;a=65}else if(c==66){var Ra=u+4*G;a=66}}else if(M){if(c){a=67;c=68}else{a=67;c=69}for(;;)if(c==68){Ia=a==68?Ia:0;F=a==68?Oa:s;Oa=za+IHEAP[u+4*Ia];L=Oa>>8&255;c=l;l=c+1;IHEAP[c]= L;Oa=Oa&255&255;L=l;l=L+1;IHEAP[L]=Oa;var Oa=F+4;F=IHEAP[F];F=(F>>H)+(F<>8&255;c=l;l=c+1;IHEAP[c]=L;F=F&255&255;L=l;l=L+1;IHEAP[L]=F;var Ia=Ia+1;if(Ia!=G)c=a=68;else{a=68;c=70;break}}else if(c==69){Sa=a==69?Sa:0;F=za+IHEAP[u+4*Sa];L=F>>8&255;c=l;l=c+1;IHEAP[c]=L;F=F&255&255;L=l;l=L+1;IHEAP[L]=F;var Sa=Sa+1;if(Sa!=G)c=a=69;else{a=69;c=71;break}}if(c==70){var Aa=u+4*G;a=70}else if(c==71){var La=u+4*G;a=71}}else{if(c){a=72;c=73}else{a=72;c=74}for(;;)if(c==73){Ha=a==73?Ha:0;F=a==73?Ea:s;Ea=za+ IHEAP[u+4*Ha];L=Ea>>8&255;K=l;l=K+1;IHEAP[K]=L;Ea=Ea&255&255;L=l;l=L+1;IHEAP[L]=Ea;var Ea=F+4;F=IHEAP[F];L=F>>8&255;K=l;l=K+1;IHEAP[K]=L;F=F&255&255;L=l;l=L+1;IHEAP[L]=F;var Ha=Ha+1;if(Ha!=G)c=a=73;else{a=73;c=75;break}}else if(c==74){Qa=a==74?Qa:0;F=za+IHEAP[u+4*Qa];L=F>>8&255;K=l;l=K+1;IHEAP[K]=L;F=F&255&255;L=l;l=L+1;IHEAP[L]=F;var Qa=Qa+1;if(Qa!=G)c=a=74;else{a=74;c=76;break}}if(c==75){var Da=u+4*G;a=75}else if(c==76){var eb=u+4*G;a=76}}l=a==61?Ta:a==59?db:a==66?Ra:a==65?Ka:a==71?La:a==70?Aa: a==76?eb:Da;k=a==61?s:a==59?xa:a==66?s:a==65?Ma:a==71?s:a==70?Oa:a==76?s:Ea;h=l}_png_write_row(IHEAP[e],m);t+=1;var za=m;if(tc?K:c)-H;if(n!=0){a=81;c=82}else{a=81;c=83}for(;;)if(c==82){Ua=a==82?Ua:0;Wa=a==82?Wa:L;H=s&jb+IHEAP[F+4*Ua]&255;c=l;l=c+1;IHEAP[c]=H;H=G&IHEAP[Wa]&255;c=l;l=c+1;IHEAP[c]=H;var Wa=Wa+ 4,Ua=Ua+1;if(Ua!=K)c=a=82;else{a=82;c=84;break}}else if(c==83){ab=a==83?ab:0;H=s&jb+IHEAP[F+4*ab]&255;c=l;l=c+1;IHEAP[c]=H;var ab=ab+1;if(ab!=K)c=a=83;else{a=83;c=86;break}}if(c==84){var tb=F+4*K;a=84}else if(c==86){var Ab=F+4*K;a=86}l=a==86?Ab:tb;k=a==86?L:Wa;h=l}_png_write_row(IHEAP[e],m);t+=1;var jb=m;if(te?E:e)-N;e=19;c:for(;;){N=e==19?0:h;M=e==19?J:a;I=e==19?w:d;O=e==19?C:g;R=e==19?v:p;T=e==19?y:r;V=e==19?x:k;if(xa){e=20;f=21}else{e=20;f=22}for(;;)if(f==21){n=e==21?n:0;i=n+1;c=I+4*i;i=O+4*i;e=n*2;j=e+1;ba=M+4*j;fa=R+4*j;ca=T+4*j;f=V+4*j;U=e+2;j=M+4*U;o=R+4*U;m=T+4*U;l=V+4*U;K=I+4*n;H=O+4*n;_sycc_to_rgb(Ka, Ra,IHEAP[M+4*e],IHEAP[K],IHEAP[H],R+4*e,T+4*e,V+4*e);_sycc_to_rgb(B,D,IHEAP[ba],IHEAP[K],IHEAP[H],fa,ca,f);n=n+1;if(Ue?n:e)-o;for(e=31;;){n=e==31?0:q;_sycc_to_rgb(p,r,IHEAP[k+4*n],IHEAP[m+4*n],IHEAP[l+4*n],h+4*n,i+4*n,j+4*n);q=n+1;if(q!=o)e=32;else break}}_free(IHEAP[IHEAP[c+24]+44]);IHEAP[IHEAP[c+24]+44]=a;_free(IHEAP[IHEAP[c+24]+48+44]);IHEAP[IHEAP[c+24]+48+44]=d;_free(IHEAP[IHEAP[c+ 24]+96+44]);IHEAP[IHEAP[c+24]+96+44]=g;break a}while(0);_fprintf(IHEAP[_stderr],__str96,__str197,256);return}while(0);IHEAP[b+20]=1}}_color_sycc_to_rgb.__index__=Runtime.getFunctionIndex(_color_sycc_to_rgb,"_color_sycc_to_rgb"); function _sycc_to_rgb(b,f,e,c,a,d,g,h){c=c;a=a;c-=b;a-=b;b=(1.402*a|0)+e;var i=b<0;a:do if(i)b=0;else{if(!(b>f))break a;b=f}while(0);IHEAP[d]=b;d=b=e-(0.344*c+0.714*a|0);b=b<0;a:do if(b)d=0;else{if(!(d>f))break a;d=f}while(0);IHEAP[g]=d;e=g=(1.772*c|0)+e;g=g<0;a:do if(g)e=0;else{if(!(e>f))break a;e=f}while(0);IHEAP[h]=e}_sycc_to_rgb.__index__=Runtime.getFunctionIndex(_sycc_to_rgb,"_sycc_to_rgb");function _reset_options_reading(){IHEAP[_opterr]=1;IHEAP[_optind]=1} _reset_options_reading.__index__=Runtime.getFunctionIndex(_reset_options_reading,"_reset_options_reading"); function _getopt(b,f,e){var c,a,d,g=IHEAP[_optreset]!=0;a:do if(g)c=1;else{c=IHEAP[IHEAP[_getopt_place]]!=0?0:1;break a}while(0);a:do if(c==1){IHEAP[_optreset]=0;c=IHEAP[_optind]>=b;b:do if(!c){c=IHEAP[f+4*IHEAP[_optind]];IHEAP[_getopt_place]=c;if(IHEAP[c]!=45)break b;if(IHEAP[IHEAP[_getopt_place]+1]==0){c=0;break a}c=IHEAP[_getopt_place]+1;IHEAP[_getopt_place]=c;if(IHEAP[c]!=45){c=0;break a}IHEAP[_optind]+=1;IHEAP[_getopt_place]=__str98;a=-1;c=4;break a}while(0);IHEAP[_getopt_place]=__str98;a=-1; c=4;break a}while(0);a:do if(c==0){c=IHEAP[_getopt_place];IHEAP[_getopt_place]=c+1;c=IHEAP[c];IHEAP[_optopt]=c;a=c==58;b:do if(a)c=10;else{c=IHEAP[_optopt];d=a=_strchr(e,c);if(a!=0){c=7;break b}if(c!=45){c=10;break b}a=-1;break a}while(0);b:do if(c==10){if(IHEAP[IHEAP[_getopt_place]]==0)IHEAP[_optind]+=1;if(IHEAP[_opterr]==0){c=7;break b}if(IHEAP[e]==58){c=7;break b}_fprintf(IHEAP[_stderr],__str199,IHEAP[f],IHEAP[_optopt]);a=63;break a}while(0);d=a=d+1;a=IHEAP[a]!=58;b:do{if(a){IHEAP[_optarg]=0;if(IHEAP[IHEAP[_getopt_place]]!= 0){c=14;break b}}else{g=IHEAP[IHEAP[_getopt_place]]!=0;c:do if(g)IHEAP[_optarg]=IHEAP[_getopt_place];else{var h=b,i=IHEAP[_optind]+1;IHEAP[_optind]=i;if(h<=i){IHEAP[_getopt_place]=__str98;if(IHEAP[e]==58)a=58;else{if(IHEAP[_opterr]==0){c=19;break c}_fprintf(IHEAP[_stderr],__str2100,IHEAP[f],IHEAP[_optopt]);a=63}break a}else IHEAP[_optarg]=IHEAP[f+4*IHEAP[_optind]]}while(0);IHEAP[_getopt_place]=__str98}IHEAP[_optind]+=1}while(0);a=IHEAP[_optopt]}while(0);return a} _getopt.__index__=Runtime.getFunctionIndex(_getopt,"_getopt"); function _getopt_long(b,f,e,c,a){var d,g=null,h,i,j,k=b-1;g=0;a:for(;;){d=g==40?l:1;if(IHEAP[_optind]>=b){d=2;break a}if(IHEAP[f+4*IHEAP[_optind]]==0){d=2;break a}if(IHEAP[IHEAP[f+4*IHEAP[_optind]]]!=45){d=2;break a}var m=IHEAP[IHEAP[f+4*IHEAP[_optind]]]==45;b:do if(m){if(IHEAP[IHEAP[f+4*IHEAP[_optind]]+1]!=0){g=7;break b}if(IHEAP[_optind]>=k){g=8;break b}if(IHEAP[IHEAP[f+4*(IHEAP[_optind]+1)]]==45){g=10;break b}g=11}else g=5;while(0);var l=g==11?2:g==7?d:g==5?d:g==8?0:0;m=IHEAP[_optind];if(l==0){d= 13;break a}if(IHEAP[IHEAP[f+4*m]]!=45){d=16;break a}j=c;i=16;var n=IHEAP[_optind];if(l>1){var o=IHEAP[f+4*(n+1)];IHEAP[_optind]+=1;g=17}else{var p=IHEAP[f+4*n]+1;g=19}n=g==19?p:o;if(_strlen(n)>1){d=20;break a}if(IHEAP[e]==58){d=35;break a}if(IHEAP[_getopt_long_lastidx]!=IHEAP[_optind]){IHEAP[_getopt_long_lastidx]=IHEAP[_optind];IHEAP[_getopt_long_lastofs]=0}IHEAP[_optopt]=IHEAP[IHEAP[f+4*IHEAP[_optind]]+(IHEAP[_getopt_long_lastofs]+1)];var r=_strchr(e,IHEAP[_optopt]);if(r==0){d=39;break a}if(IHEAP[r]!= 0){d=41;break a}IHEAP[_optind]+=1;g=40;d=1}a:do if(d==2)h=-1;else if(d==13){IHEAP[_optind]=m+1;h=63}else if(d==16){_fwrite(__str7105,15,1,IHEAP[_stderr]);IHEAP[_optind]+=1;h=63}else if(d==20){b=n;e=a;c=b;k=i;o=j;g=20;b:for(;;){d=g==25?u:0;var q=o+16*d;g=q;if(!(0+k*d