Message-Id: <3.0.5.32.19981223172811.00aa0bc0@ics.u-strasbg.fr> X-Sender: muller AT ics DOT u-strasbg DOT fr X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Wed, 23 Dec 1998 17:28:11 +0100 To: djgpp-workers AT delorie DOT com From: Pierre Muller Subject: debug GDB with itself Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_914426891==_" Reply-To: djgpp-workers AT delorie DOT com --=====================_914426891==_ Content-Type: text/plain; charset="us-ascii" Following Eli Zaretskii proposals I send you I context diff for include/debug/dbgcom.h and src/debug/common/dbgcom.c After a question from Hans-Bernhard Broeker , I quicky wrote something to enable FPU inspection this is in two commands : "info all-registers" will show the current FPU stack if not empty and "info float" will print out FPU control and status information ! You can normally change the value of a fpu register, but you can not yet change the stack ( no push nor pop !) These fixes explain why also the dbgcom.h is changed !! (NOTE these are relative to version 2.02 !!) Concerning the diffs for the GDB sources these are quite big and are in the second file (note that this patch has been made by cvs using cvs rdiff -r official-v4.16-version-of-gdb > allgdb.dif (the base directory is gnu/gdb-4.16 for patching ! I don't have the whole DJGPP tree on cvs, sorry !) NOTE : running "make" in gdb-4.16/gdb after my patch will create gdbpas.exe file (not gdb) this is because it supports pascal language also (remember that this is my first goal !) make gdb.exe will probably fail miserabily !! Apart from pascal specific stuff, the following features are modified : - attempts to read unallowed memory region are stated instead of writing random values (in FPC the cs and ds selectors limits are not -1 by default !) - exceptions are redirected according to cs selector, this allows gdb to debug itself quite correctly (One remaining bug is that sometimes the second level program finished without gdb (level2) cleaning up correctly thus you get a message like program ended without ... further excution probably impossible !) But you can run the same program again without problems If you wan to try debugging gdb with itself remember to change the prompt in one level to know very you are if you set breakpoints inside gdb !! - xx command " xx $ss:$esp" will allow you to look at the stack even if outside program data segment (this is useful for exceptions mainly !) I don't garanty you that all works correctly and I several times froze Windows95 during debugging of gdbpas !! (One funny thin was that sometimes the was apparently a hardware breakpoint leftover from an interrupted gdb session : this created Trap exceptions in other programs (like GNU ld) even after closing the Dos window and opening it again !! Only a restart could remove this trap !! If anybody uses GPC I would be very interested to know if debugging works also with this pascal compiler (I am codevelopper of FPC and I never really had time to try seriously GPC !) Any comments on my modifications are very welcome, but please note that I am leaving for chrismas holidays in one hour and I will touch no computer before january 4th !! I wish you all a mery chrismas and a happy new year ! --=====================_914426891==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="debug.dif" *** include/debug/dbgcomh.ori Tue Aug 13 01:08:04 1996 --- include/debug/dbgcom.h Tue Dec 22 13:12:54 1998 *************** *** 23,28 **** --- 23,46 ---- extern ExternalDebuggerInfo edi; + /* structure of FPU env */ + /* plus space from the FPU stack */ + + #define FPU_TOP_MASK 0x3800 + #define FPU_TOP_SHIFT 11 + + typedef struct { + unsigned short control,res1,status,res2,tag,res3; + unsigned long instofs; + unsigned short instsel,opcode; + unsigned long operandofs; + unsigned short operandsel,res4; + char isvalid[8]; + long double st[8]; + } FPUEnvironment; + + extern FPUEnvironment fpue; + void run_child(void); int read_child(unsigned child_addr, void *buf, unsigned len); int write_child(unsigned child_addr, void *buf, unsigned len); *** src/debug/common/dbgcomc.ori Sun Jun 28 22:37:44 1998 --- src/debug/common/dbgcom.c Wed Dec 23 14:52:46 1998 *************** *** 1,3 **** --- 1,6 ---- + /* $Id: dbgcom.c,v 1.3 1998/12/21 11:03:01 pierre Exp $ */ + /* modified for use with FPC and */ + /* exception handling support by Pierre Muller */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ *************** *** 12,18 **** #include #include #include ! #include #include #include #include --- 15,21 ---- #include #include #include ! #include /* */ "dbgcom.h" #include #include #include *************** *** 25,35 **** --- 28,65 ---- #define MEM_HANDLE_COUNT 256 #define DESCRIPTOR_COUNT 128 #define DOS_DESCRIPTOR_COUNT 128 + #define DPMI_EXCEPTION_COUNT 18 + + #define USE_FSEXT + #define CLOSE_UNREGISTERED_FILES + + #ifdef FPC + #undef CLOSE_UNREGISTERED_FILES + #endif + /* debug splitted into 3 parts */ + #define DEBUG_ALL_DBGCOM + + #ifdef DEBUG_ALL_DBGCOM + /* general debug infos */ + #define DEBUG_DBGCOM + /* files open/close infos */ + #define DEBUG_DBGCOM_FILES + /* exceptions infos */ + #define DEBUG_EXCEPTIONS + #endif /* DEBUG_ALL_DBGCOM */ long mem_handles[MEM_HANDLE_COUNT]; unsigned short descriptors[DESCRIPTOR_COUNT]; unsigned short dos_descriptors[DOS_DESCRIPTOR_COUNT]; + /* these all need to be static because + ss can be different from ds in dbgsig !! */ + static int excep_stack[1000]; + static int errcode,cs,eflags,eip,ss,esp,ret_cs,ret_eip; + static void *cur_pos; + static int child_exception_level; + + /* ARGSUSED */ char ** __crt0_glob_function(char *foo) *************** *** 40,52 **** ExternalDebuggerInfo edi; TSS a_tss; static jmp_buf jumper; ! static int my_ds,my_cs,app_cs; static jmp_buf load_state; static int nset, breakhandle[4]; static int _DPMIsetBreak(unsigned short sizetype, unsigned vaddr) { int handle; --- 70,151 ---- ExternalDebuggerInfo edi; TSS a_tss; + FPUEnvironment fpue; + static jmp_buf jumper; ! static int my_ds,my_cs,app_cs,app_exit_cs,app_ds; static jmp_buf load_state; static int nset, breakhandle[4]; + static __dpmi_paddr our_handler[DPMI_EXCEPTION_COUNT],app_handler[DPMI_EXCEPTION_COUNT]; + + #ifdef DEBUG_EXCEPTIONS + typedef + struct { + short excp_cs; + int excp_eip; + short excp_nb; + } texcp_info; + + static texcp_info excp_info[20]; + static int excp_index; + static int excp_count; + static int redir_excp_count; + #endif + + static void store_fpu_env (void) + { + unsigned char top; + int i; + int valid_nb = 0; + long double d; + asm("fstenv %0" : "=g" (fpue)); + top = (fpue.status & FPU_TOP_MASK) >> FPU_TOP_SHIFT; + for (i=0;i<8;i++) + { + /* tag is a array of 8 2 bits that contain info about FPU registers + st(0) is register(top) and st(1) is register (top+1) ... */ + fpue.isvalid[i] = ((fpue.tag >> ((((8+top)+i) & 7) << 1)) & 3) != 3; + } + /* to store the fpu registers we use fstpt and push them again after */ + /* this code assumes that the only valid regs are + from top to base, is this allways true ? + for me it is the very definition of a stack */ + for (i=0;i<8;i++) + if (fpue.isvalid[i]) + { + asm("fstpt %0" : "=g" (d)); + fpue.st[i]=d; + } + for (i=7;i>=0;i--) + if (fpue.isvalid[i]) + { + d=fpue.st[i]; + asm("fldt %0" : : "g" (d)); + } + } + + static void restore_fpu_env (void) + { + int i; + long double d; + /* to store the fpu registers we use fstpt and push them again after */ + for (i=0;i<8;i++) + if (fpue.isvalid[i]) + { + asm("fstpt %0" : "=g" (d)); + } + for (i=7;i>=0;i--) + if (fpue.isvalid[i]) + { + d=fpue.st[i]; + asm("fldt %0" : : "g" (d)); + } + asm("fldenv %0" : : "g" (fpue)); + } + static int _DPMIsetBreak(unsigned short sizetype, unsigned vaddr) { int handle; *************** *** 145,156 **** edi.dr[6] = bt; } ! static __dpmi_paddr old_i31,old_i21; static int user_int_set = 0; static __dpmi_paddr my_i9,user_i9,my_i8,user_i8; static void hook_dpmi(void) { __dpmi_paddr new_int; extern void i21_hook(void),i31_hook(void); --- 244,256 ---- edi.dr[6] = bt; } ! static __dpmi_paddr old_i31,old_i21,user_i31,user_i21; static int user_int_set = 0; static __dpmi_paddr my_i9,user_i9,my_i8,user_i8; static void hook_dpmi(void) { + int i; __dpmi_paddr new_int; extern void i21_hook(void),i31_hook(void); *************** *** 172,180 **** --- 272,367 ---- { __dpmi_set_protected_mode_interrupt_vector(0x09, &user_i9); __dpmi_set_protected_mode_interrupt_vector(0x08, &user_i8); + __dpmi_set_protected_mode_interrupt_vector(0x21, &user_i21); + __dpmi_set_protected_mode_interrupt_vector(0x31, &user_i31); + } + for (i=0;i__cs != my_cs || sig == SIGTRAP) { *load_state = *__djgpp_exception_state; /* exception was in other process */ longjmp(jumper, 1); } } void run_child(void) --- 762,859 ---- /* Now restore our interrupt vectors */ __dpmi_set_protected_mode_interrupt_vector(0x09, &my_i9); __dpmi_set_protected_mode_interrupt_vector(0x08, &my_i8); + for (i=0;i__eip; ! excp_info[excp_index].excp_cs=__djgpp_exception_state->__cs; ! excp_info[excp_index].excp_nb=__djgpp_exception_state->__signum; ! excp_index++; ! excp_count++; ! if (excp_index==20) ! excp_index=0; ! #endif ! if(__djgpp_exception_state->__cs == app_cs /* || sig == SIGTRAP */) ! { *load_state = *__djgpp_exception_state; /* exception was in other process */ longjmp(jumper, 1); } + else + { + extern int invalid_sel_addr(short sel, unsigned a, unsigned len, char for_write); + + int signum = __djgpp_exception_state->__signum; + if ( + (app_handler[signum].offset32) && + (app_handler[signum].selector) && + !invalid_sel_addr(app_handler[signum].selector, + app_handler[signum].offset32,1,0) && + ((app_handler[signum].offset32 != + our_handler[signum].offset32) || + (app_handler[signum].selector != + our_handler[signum].selector))) + { + extern void exception_return(void); + #ifdef DEBUG_EXCEPTIONS + redir_excp_count++; + #endif + *load_state = *__djgpp_exception_state; /* exception was in other process */ + eip = load_state->__eip; + cs = load_state->__cs; + esp = load_state->__esp; + /* reset the debug trace bit */ + /* we should only do this under certain specific conditions + but which ones ?? */ + eflags = load_state->__eflags; + /* if (signum!=1) + eflags &= 0xfffffeff; */ + /* we don't want to step inside the exception_table code */ + load_state->__eflags &= 0xfffffeff; + ss = load_state->__ss; + errcode = load_state->__sigmask; + load_state->__eip=app_handler[signum].offset32; + load_state->__cs=app_handler[signum].selector; + /* use our own exception stack */ + child_exception_level++; + memset(&excep_stack,0xAB,sizeof(excep_stack)); + cur_pos = &excep_stack[1000-40]; + cur_pos -= 8*4; + load_state->__ss = my_ds; + load_state->__esp= (int) cur_pos; + /* where to return */ + ret_cs = my_cs; + ret_eip = (int) &exception_return; + memcpy(cur_pos,&ret_eip,4); + cur_pos+=4; + memcpy(cur_pos,&ret_cs,4); + cur_pos+=4; + memcpy(cur_pos,&errcode,4); + cur_pos+=4; + memcpy(cur_pos,&eip,4); + cur_pos+=4; + memcpy(cur_pos,&cs,4); + cur_pos+=4; + memcpy(cur_pos,&eflags,4); + cur_pos+=4; + memcpy(cur_pos,&esp,4); + cur_pos+=4; + memcpy(cur_pos,&ss,4); + cur_pos+=4; + longjmp(load_state, load_state->__eax); + } + /* else + { + *load_state = *__djgpp_exception_state; + longjmp(jumper, 1); + } */ + } } void run_child(void) *************** *** 543,548 **** --- 878,884 ---- /* jump to tss */ _set_break_DPMI(); hook_dpmi(); + restore_fpu_env(); longjmp(load_state, load_state->__eax); /* we never return here, execption routine will longjump */ } *************** *** 565,570 **** --- 901,907 ---- a_tss.tss_ebp = load_state->__ebp; a_tss.tss_irqn = load_state->__signum; a_tss.tss_error = load_state->__sigmask; + store_fpu_env(); unhook_dpmi(); _clear_break_DPMI(); } *************** *** 604,609 **** --- 941,1007 ---- return 0; } + int invalid_sel_addr(short sel, unsigned a, unsigned len, char for_write) + { + /* Here we assume expand up writable code. We could check the rights to + be sure, but that's a waste unless *_child routines fixed to know about + different selectors. */ + + unsigned limit; + char read_allowed = 0; + char write_allowed = 0; + + asm(" + movw %2,%%ax + verr %%ax + jnz .Ldoes_not_has_read_right + movb $1,%0 + .Ldoes_not_has_read_right: + verrw %%ax + jnz .Ldoes_not_has_write_right + movb $1,%1 + .Ldoes_not_has_write_right: " + : "=g" (read_allowed), "=g" (write_allowed) + : "g" (sel) + ); + if (for_write) + { + if (!write_allowed) + return 1; + } + else + if (!read_allowed) + return 1; + + limit = __dpmi_get_segment_limit(sel); + /* some selectors don't have zero page protection + like the protected interrupt stack */ + if(/*a >= 4096 && */ (a+len-1) <= limit) + return 0; + /* printf("Invalid access to child, address %#x length %#x limit: %#x\n", a, len, limit); + if (can_longjmp) + longjmp(debugger_jmpbuf, 1); */ + return 1; + } + + int read_sel_addr(unsigned child_addr, void *buf, unsigned len, unsigned sel) + { + /* first clear memory */ + memcpy(buf,0,len); + if (invalid_sel_addr(sel, child_addr, len, 0)) + return 1; + movedata(sel, child_addr, my_ds, (int)buf, len); + return 0; + } + + int write_sel_addr(unsigned sel, unsigned child_addr, void *buf, unsigned len) + { + if (invalid_sel_addr(sel, child_addr, len, 1)) + return 1; + movedata(my_ds, (int)buf, sel, child_addr, len); + return 0; + } + static _GO32_StubInfo si; static void (*oldTRAP)(int); *************** *** 613,623 **** --- 1011,1027 ---- void edi_init(jmp_buf start_state) { + int i; my_ds = 0; asm("mov %%ds,%0" : "=g" (my_ds) ); my_cs = 0; asm("mov %%cs,%0" : "=g" (my_cs) ); + for (i=0;i__cs; a_tss.tss_ss = load_state->__ss; *************** *** 632,637 **** --- 1036,1042 ---- __djgpp_app_DS = a_tss.tss_ds; app_cs = a_tss.tss_cs; edi.app_base = 0; + memset(&fpue,0,sizeof(fpue)); /* Save all the changed signal handlers */ oldTRAP = signal(SIGTRAP, dbgsig); oldSEGV = signal(SIGSEGV, dbgsig); *************** *** 645,650 **** --- 1050,1056 ---- descriptors[1] = si.ds_selector; descriptors[2] = __djgpp_app_DS; descriptors[3] = app_cs; + app_exit_cs=si.cs_selector; memset(dos_descriptors,0,sizeof(dos_descriptors)); dos_descriptors[0] = _farpeekw(si.psp_selector,0x2c); dos_descriptors[1] = si.psp_selector; *************** *** 656,664 **** --- 1062,1110 ---- { int i; + /* restore __djgpp_app_DS for Ctrl-C !! */ + __djgpp_app_DS = __djgpp_our_DS; + #ifdef DEBUG_EXCEPTIONS + fprintf(stderr,"excp_count = %d\n",excp_count); + fprintf(stderr,"redir_excp_count = %d\n",redir_excp_count); + fprintf(stderr,"excp_index = %d\n",excp_index); + fprintf(stderr,"app_cs %04x\tapp_ds %04x\n",app_cs,app_ds); + fprintf(stderr,"my_cs %04x\tmy_ds %04x\n",my_cs,my_ds); + for (i=0;i %d\n",retval); #endif in_dbg_fsext--; if (retval != -1) --- 1234,1241 ---- attrib = va_arg(_args,int); in_dbg_fsext++; retval = _creat(filename,attrib); ! #ifdef DEBUG_DBGCOM_FILES ! fprintf(stderr,"_creat(%s) => %d\n",filename,retval); #endif in_dbg_fsext--; if (retval != -1) *************** *** 790,796 **** oflag = va_arg(_args,int); in_dbg_fsext++; retval = _open(filename,oflag); ! #ifdef DEBUG_DBGCOM fprintf(stderr,"_open(%s) => %d\n",filename,retval); #endif in_dbg_fsext--; --- 1249,1255 ---- oflag = va_arg(_args,int); in_dbg_fsext++; retval = _open(filename,oflag); ! #ifdef DEBUG_DBGCOM_FILES fprintf(stderr,"_open(%s) => %d\n",filename,retval); #endif in_dbg_fsext--; *************** *** 803,809 **** case __FSEXT_close: handle = va_arg(_args,int); in_dbg_fsext++; ! #ifdef DEBUG_DBGCOM fprintf(stderr,"_close(%d)\n",handle); #endif retval = _close(handle); --- 1262,1268 ---- case __FSEXT_close: handle = va_arg(_args,int); in_dbg_fsext++; ! #ifdef DEBUG_DBGCOM_FILES fprintf(stderr,"_close(%d)\n",handle); #endif retval = _close(handle); *************** *** 853,855 **** --- 1312,1322 ---- /* enable the fsext function */ in_dbg_fsext = 0; } + #endif /* def USE_FSEXT */ + + /* + $Log: dbgcom.c,v $ + Revision 1.3 1998/12/21 11:03:01 pierre + * problems of FSEXT_dbg solved + + */ \ No newline at end of file --=====================_914426891==_ Content-Type: application/octet-stream; name="gdbdif.dif"; x-mac-type="42494E41"; x-mac-creator="5843454C" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gdbdif.dif" SW5kZXg6IGdkYi9jLXR5cGVwci5jDQpkaWZmIC1jIGdkYi9jLXR5cGVwci5jOjEuMS4xLjEgZ2Ri L2MtdHlwZXByLmM6MS4yDQoqKiogZ2RiL2MtdHlwZXByLmM6MS4xLjEuMQlGcmkgRGVjIDA0IDEw OjUxOjAyIDE5OTgNCi0tLSBnZGIvYy10eXBlcHIuYwlGcmkgRGVjIDA0IDExOjMxOjM0IDE5OTgN CioqKioqKioqKioqKioqKg0KKioqIDg1LDkwICoqKioNCi0tLSA4NSwxMDAgLS0tLQ0KICAgICAg ICB0eXBlX3ByaW50KHR5cGUsIiIsc3RyZWFtLDApOw0KICAgICAgICBicmVhazsNCiAgI2VuZGlm D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V4Y2VwdGlvbiBoYW5kbGVyICovDQorIC8qIHN0b3JlcyBpdCBpbnRvIGFwcF9oYW5k bGVyIGlmIHNlbGVjdG9yIGlzIGFwcF9jcyAgKi8NCisgDQorIGFzbSgiXG5cDQorICAgICAgICAg LnRleHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIFxuXA0KKyAgICAgICAgIC5hbGlnbiAgMiwweDkwICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgX2NoYW5nZV9leGNlcHRpb25faGFu ZGxlcjogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQor ICAgICAgICAgcHVzaGwgICAlZWF4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIHB1c2ggICAgJWVzICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICBwdXNo ICAgICVkcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXG5cDQorICAgICAgICAgLmJ5dGUgICAweDJlICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIG1vdncgICAgX215X2RzLCVh eCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAg ICAgICBtb3Z3ICAgICVheCwlZHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgXG5cDQorICAgICAgICAgbW92dyAgICAlYXgsJWVzICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIG1vdnpibCAl YmwsJWVheCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc blwNCisgICAgICAgICBpbXVsbCAgJDgsJWVheCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgYWRkbCAgJF9hcHBfaGFuZGxlciwl ZWF4ICAvKiBvbmx5IHJldGFpbiBoYW5kbGVycyAqLyAgICAgICAgICAgIFxuXA0KKyAgICAgICAg IGNtcHcgICBfYXBwX2NzLCVjeCAvKiBmb3IgdGhlIG1haW4gYXBwICAgICAqLyAgICAgICAgICAg ICAgICAgICBcblwNCisgICAgICAgICBqbmUgICAgX25vdF9pbl9jdXJyZW50X2FwcCAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgbW92bCAgJWVjeCw0 KCVlYXgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0K KyAgICAgICAgIG1vdmwgICVlZHgsKCVlYXgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBcblwNCisgX25vdF9pbl9jdXJyZW50X2FwcDogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgc3Vi bCAgJF9hcHBfaGFuZGxlciwlZWF4IC8qIGFsbHdheXMgcmVzdG9yZSBvdXIgaGFuZGxlciAqLyAg ICAgIFxuXA0KKyAgICAgICAgIGFkZGwgICRfb3VyX2hhbmRsZXIsJWVheCAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgbW92bCAgNCglZWF4KSwl ZWN4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAg ICAgICAgIG1vdmwgKCVlYXgpLCVlZHggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBcblwNCisgICAgICAgICBwb3AgICAlZHMgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgcG9wICAg JWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFxuXA0KKyAgICAgICAgIHBvcGwgICVlYXggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICByZXQgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4iDQorICk7DQor IA0KKyAvKiBHZXQgYW4gZXhjZXB0aW9uIGhhbmRsZXIgKi8NCisgLyogKHJldHVybnMgYXBwX2hh bmRsZXIgaWYgc2V0IGRpc2FibGVkIGJlY2F1c2UgY3JlYXRlcyBwcm9ibGVtcyAoUE0pKSAgKi8N CisgDQorIGFzbSgiXG5cDQorICAgICAgICAgLnRleHQgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIC5hbGlnbiAg MiwweDkwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc blwNCisgX2dldF9leGNlcHRpb25faGFuZGxlcjogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgLmJ5dGUgMHgyZSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAg IGxqbXAgX29sZF9pMzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBcblwNCisgICAgICAgICAiKTsNCisgDQorIC8qIHRoaXMgY3JlYXRlcyBwcm9ibGVt cyAhIFdIWSA/Pw0KKyBhc20oIlxuXA0KKyAgICAgICAgIC50ZXh0ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICAu YWxpZ24gIDIsMHg5MCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgXG5cDQorIF9nZXRfZXhjZXB0aW9uX2hhbmRsZXI6ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIHB1c2hsICAgJWVheCAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisg ICAgICAgICBwdXNoICAgICVlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgcHVzaCAgICAlZHMgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIC5ieXRl ICAgMHgyZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBcblwNCisgICAgICAgICBtb3Z3ICAgIF9teV9kcywlYXggICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgbW92dyAgICAlYXgsJWRzICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAg ICAgIG1vdncgICAgJWF4LCVlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBcblwNCisgICAgICAgICBtb3Z6YmwgJWJsLCVlYXggICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgaW11bGwgICQ4 LCVlYXggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxu XA0KKyAgICAgICAgIGFkZGwgICRfYXBwX2hhbmRsZXIsJWVheCAgIG9ubHkgcmV0YWluIGhhbmRs ZXJzICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIGNtcHcgICQwLDQoJWVheCkgICAgICAgICAg IGZvciB0aGUgbWFpbiBhcHAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIGplICAgIF9h cHBfZXhjZXB0aW9uX25vdF9zZXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc blwNCisgICAgICAgICBjbXBsICAkMCwoJWVheCkgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgamUgICAgX2FwcF9leGNlcHRpb25f bm90X3NldCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAg IG1vdmwgICglZWF4KSwlZWR4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBcblwNCisgICAgICAgICBtb3Z3ICA0KCVlYXgpLCVjeCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgcG9wICAgICVkcyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0K KyAgICAgICAgIHBvcCAgICAlZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICBwb3BsICAgJWVheCAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgcmV0 ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIFxuXA0KKyBfYXBwX2V4Y2VwdGlvbl9ub3Rfc2V0OiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICBwb3AgICAlZHMgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAg ICAgICAgcG9wICAgJWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIHBvcGwgICVlYXggICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICAuYnl0ZSAw eDJlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg XG5cDQorICAgICAgICAgbGptcCBfb2xkX2kzMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIHJldCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiINCisgKTsgKi8N CisgDQorIC8qIENoYW5nZSBhIGhhbmRsZSBpbiB0aGUgbGlzdDogRUFYIGlzIHRoZSBvbGQgaGFu ZGxlLCBFRFggaXMgdGhlIG5ldyAqLw0KKyAvKiBmb3IgY2hhbmdpbmcgYSB2YWx1ZSwgd2UgbmVl ZCBvdXIgZHMsIGJlY2F1c2UgY3MgaGFzIG5vIHdyaXRlIGFjY2VzcyAqLw0KKyBhc20oCQkJCQkJ ICAgICAgIAkJCSJcblwNCisgCS50ZXh0CQkJCQkJCQlcblwNCisgCS5hbGlnbiAgMiwweDkwCQkJ CQkJCVxuXA0KKyBfY2hhbmdlX2hhbmRsZToJCQkJCQkJCVxuXA0KKyAJcHVzaGwJJWVjeAkJCQkJ CQlcblwNCisgCXhvcmwJJWVjeCwlZWN4CQkJCQkJXG5cDQorIENMMToJCQkJCQkJCQlcblwNCisg CS5ieXRlCTB4MmUgCQkJCQkJCVxuXA0KKyAJY21wbAklZWF4LF9tZW1faGFuZGxlcygsJWVjeCw0 K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3RseSByZXR1cm4gdG8NCisgICAgICAgICAgICAgIHRoZSBjb2RlIGJlZm9yZSBp bnRlcnJ1cHRpb24gbm8gbWF0dGVyIGF0IHdoaWNoIGxldmVsKQ0KKyAgICAgICAgICAgICAgKHBh c3NpbmcgdG8gbmV4dCB3b3VsZCBiZSBwb3NzaWJsZSBidXQgdGhlbiB3ZSB3b3VsZCBnZXQgYQ0K KyAgICAgICAgICAgICAgIGludGVycnVwdGlvbiBpbiBhbGwgbGV2ZWxzICEhKQ0KKyAgIDB4MDIx MCAgIDogX19kcG1pX2dldF9leHRlbmRlZF9leGNlcHRpb25faGFuZGxlcl92ZWN0b3JfcG0NCisg ICAweDAyMTIgICA6IF9fZHBtaV9zZXRfZXh0ZW5kZWRfZXhjZXB0aW9uX2hhbmRsZXJfdmVjdG9y X3BtDQorICAgDQorICAgMHgwNTAxICAgOiBfX2RwbWlfYWxsb2NhdGVfbWVtb3J5DQorICAgMHgw NTAxICAgOiBfX2RwbWlfZnJlZV9tZW1vcnkNCisgICAweDA1MDMgICA6IF9fZHBtaV9yZXNpemVf bWVtb3J5DQorICAgDQorICovIA0KKyBhc20oCQkgICAgICAgIAkJICAgICAgIAkJCSAgICAgICAg IlxuXA0KKyAJLnRleHQJCQkJCQkJCVxuXA0KKyAJLmFsaWduICAyLDB4OTAJCQkJCQkJXG5cDQor ICAgICAgICAgLmdsb2JsICBfZGJnY29tX2hvb2tfaTMxICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFxuXA0KKyBfZGJnY29tX2hvb2tfaTMxOiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgX2kzMV9ob29rOgkJ CQkJCQkJXG5cDQorIAljbXB3CSQweDAwMDAsJWF4CQkJCQkJXG5cDQorIAlqZQlMYzMxX2FsbG9j X2Rlc2NyaXB0b3JzCQkJCQlcblwNCisgCWNtcHcJJDB4MDAwMSwlYXgJCQkJCQlcblwNCisgCWpl CUxjMzFfZnJlZV9kZXNjcmlwdG9yCQkJCQlcblwNCisgCWNtcHcJJDB4MDAwNywlYXgJCQkJCQlc blwNCisgCWplCUxjMzFfc2V0X3NlbGVjdG9yX2Jhc2VfYWRkcmVzcwkJCQlcblwNCisgCWNtcHcJ JDB4MDAwQSwlYXgJCQkJCQlcblwNCisgCWplCUxjMzFfY3JlYXRlX2FsaWFzX2Rlc2NyaXB0b3IJ CQkJXG5cDQorIAljbXB3CSQweDAxMDAsJWF4CQkJCQkJXG5cDQorIAlqZQlMYzMxX2FsbG9jYXRl X2Rvc19tZW1vcnkJCQkJXG5cDQorIAljbXB3CSQweDAxMDEsJWF4CQkJCQkJXG5cDQorIAlqZQlM YzMxX2ZyZWVfZG9zX21lbW9yeQkJCQkJXG5cDQorICAgICAgICAgY21wdyAgICAkMHgwMjAyLCVh eCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAg ICAgIGplICAgICAgX2dldF9leGNlcHRpb25faGFuZGxlciAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBcblwNCisgICAgICAgICBjbXB3ICAgICQweDAyMDMsJWF4ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgamUgICAgICBM YzMxX3NldF9leGNlcHRpb25faGFuZGxlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxu XA0KKyAJY21wdwkkMHgwMjA1LCVheAkJCQkJCVxuXA0KKyAJamUJTGMzMV9zZXRfcHJvdGVjdGVk X21vZGVfaW50ZXJydXB0CQkJXG5cDQorICAgICAgICAgY21wdyAgICAkMHgwMjEwLCVheCAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIGpl ICAgICAgX2dldF9leGNlcHRpb25faGFuZGxlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBcblwNCisgICAgICAgICBjbXB3ICAgICQweDAyMTIsJWF4ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgamUgICAgICBMYzMxX3Nl dF9leGNlcHRpb25faGFuZGxlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAJ Y21wdwkkMHgwNTAxLCVheAkJCQkJCVxuXA0KKyAJamUJTGMzMV9hbGxvY19tZW0JCQkJCQlcblwN CisgCWNtcHcJJDB4MDUwMiwlYXgJCQkJCQlcblwNCisgCWplCUxjMzFfZnJlZV9tZW0JCQkJCQlc blwNCisgCWNtcHcJJDB4MDUwMywlYXgJCQkJCQlcblwNCisgCWplCUxjMzFfcmVzaXplX21lbQkJ CQkJCVxuXA0KKyBMX2ptcF90b19vbGRfaTMxOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICAuYnl0ZQkweDJlCQkJCQkJ CVxuXA0KKyAJbGptcAlfb2xkX2kzMQkJCQkJCVxuXA0KKyBMYzMxX3NldF9mbGFnc19hbmRfaXJl dDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisg ICAgICAgICBwdXNobAklZWF4CQkJCSAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAJcHVz aGYJCQkJCQkJCVxuXA0KKyAJcG9wbAklZWF4CQkvKiBzdG9yZSB0aGUgcmlnaHQgZmxhZ3MgZm9y IGlyZXQgKi8JXG5cDQorIAltb3ZsCSVlYXgsMTIoJWVzcCkJCQkJCQlcblwNCisgCXBvcGwJJWVh eAkJCQkJCQlcblwNCisgTGMzMV9pcmV0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgaXJldAkJCQkJCQkJ XG5cDQorIExjMzFfc2V0X3NlbGVjdG9yX2Jhc2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V9kb3Nf ZGVzY3JpcHRvcgkJCQkJXG5cDQorIAlwb3BsCSVlYXgJCQkJCQkJXG5cDQorIAljbGMJCQkJCQkJ CVxuXA0KKyAJam1wCUxjMzFfc2V0X2ZsYWdzX2FuZF9pcmV0CQkJCQlcblwNCisgTGMzMV9mcmVl X2Rvc19tZW1vcnk6CQkJCQkJCVxuXA0KKyAJcHVzaGwJJWVkeAkJCQkJCQlcblwNCisgCXB1c2hm CQkJCQkJCQlcblwNCisgCS5ieXRlCTB4MmUJCQkJCQkJXG5cDQorIAlsY2FsbAlfb2xkX2kzMQkJ CQkJCVxuXA0KKyAJcG9wbAklZWF4CQkJCQkJCVxuXA0KKyAJamMJTGMzMV9zZXRfZmxhZ3NfYW5k X2lyZXQJCQkJCVxuXA0KKyAJeG9ydwklZHgsJWR4CQkJCQkJCVxuXA0KKyAJY2FsbAlfY2hhbmdl X2Rvc19kZXNjcmlwdG9yCQkJCQlcblwNCisgCWNsYwkJCQkJCQkJXG5cDQorIAlqbXAJTGMzMV9z ZXRfZmxhZ3NfYW5kX2lyZXQJCQkJCVxuXA0KKyBMYzMxX3NldF9leGNlcHRpb25faGFuZGxlcjog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAg ICBwdXNobCAgJWVheCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgXG5cDQorICAgICAgICAgcHVzaGwgICVlYnggICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIHB1c2hsICAlZWN4 ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwN CisgICAgICAgICBwdXNobCAgJWVkeCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgcHVzaGYgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIC5i eXRlICAweDJlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBcblwNCisgICAgICAgICBsY2FsbCAgIF9vbGRfaTMxICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgamMgICBMYzMxX3NldF9m bGFnc19hbmRfaXJldCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyAg ICAgICAgIHBvcGwgICAlZWR4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBcblwNCisgICAgICAgICBwb3BsICAgJWVjeCAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAgICAgcG9wbCAg ICVlYnggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFxuXA0KKyAgICAgICAgIHBvcGwgICAlZWF4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICBjYWxsICAgX2NoYW5nZV9leGNl cHRpb25faGFuZGxlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5cDQorICAgICAg ICAgcHVzaGYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIFxuXA0KKyAgICAgICAgIC5ieXRlICAweDJlICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICBsY2FsbCAgIF9v bGRfaTMxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5c DQorICAgICAgICAgam1wIExjMzFfc2V0X2ZsYWdzX2FuZF9pcmV0ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFxuXA0KKyAgICAgICAgIC5hbGlnbiAgMiwweDkwICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcblwNCisgICAgICAgICAu Z2xvYmwgIF9kYmdjb21faG9va19pMjEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgXG5cDQorIF9kYmdjb21faG9va19pMjE6ICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuXA0KKyBfaTIxX2hvb2s6CQkJCQkJCQlcblwN CisgCWNtcGIJJDB4NGMsJWFoCQkJCQkJXG5cDQorIAlqZQlMYzIxCQkJCQkJCVxuXA0KKyBMYzIx X2ptcF90b19vbGQ6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBcblwNCisgICAgICAgICAuYnl0ZQkweDJlCQkJCQkJCVxuXA0KKyAJbGptcAlf b2xkX2kyMQkJCQkJCVxuXA0KKyBMYzIxOglwdXNoCSVlYXgJCQkJCQkJXG5cDQorIAltb3ZsCTgo JWVzcCksJWVheAkJCQkJCVxuXA0KKyAJY3MJCQkJCQkJCVxuXA0KKyAJY21wdwlfYXBwX2V4aXRf Y3MsJWF4CQkJCQlcblwNCisgCXBvcAklZWF4CQkJCQkJCVxuXA0KKyAJam5lCUxjMjFfam1wX3Rv X29sZAkJCQkJCVxuXA0KKyAJY2FsbAlfX19kamdwcF9zYXZlX2ludGVycnVwdF9yZWdzCQkJCVxu XA0KKyAJbW92bAlfX19kamdwcF9leGNlcHRpb25fc3RhdGVfcHRyLCVlc2kJCQlcblwNCisgCW1v dmwJJDB4MjEsNTYoJWVzaSkJCQkJCQlcblwNCisgCW1vdmwJJF9sb2FkX3N0YXRlLCVlZGkJCQkJ CVxuXA0KKyAJbW92bAkkNDMsJWVjeAkJCQkJCVxuXA0KKyAJcmVwC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w0KKyAgICAgZm9yIChpPTA7aTxleGNwX2NvdW50 O2krKykNCisgICAgICAgew0KKyAgICAgICAgZnByaW50ZihzdGRlcnIsIiBleGNlcCAlMDR4OiUw OHhcdHNpZ25hbCAlMDh4XG4iLA0KKyAgICAgICAgICBleGNwX2luZm9baV0uZXhjcF9jcywNCisg ICAgICAgICAgZXhjcF9pbmZvW2ldLmV4Y3BfZWlwLA0KKyAgICAgICAgICBleGNwX2luZm9baV0u ZXhjcF9uYik7DQorICAgICAgICAgIGV4Y3BfaW5mb1tpXS5leGNwX2VpcD0wOw0KKyAgICAgICAg ICBleGNwX2luZm9baV0uZXhjcF9jcz0wOw0KKyAgICAgICAgICBleGNwX2luZm9baV0uZXhjcF9u Yj0wOw0KKyAgICAgICB9DQorICAgICBleGNwX2NvdW50PTA7DQorICAgICByZWRpcl9leGNwX2Nv dW50PTA7DQorICAgICBleGNwX2luZGV4PTA7DQorICAgZm9yIChpPTA7aTxEUE1JX0VYQ0VQVElP Tl9DT1VOVDtpKyspDQorICAgICB7DQorICAgICAgIGZwcmludGYoc3RkZXJyLCIgYXBwICVkIGhh bmRsZXIgPSAlMDR4OiUwOGx4XG4iLA0KKyAgICAgICAgICAgICAgIGksYXBwX2hhbmRsZXJbaV0u c2VsZWN0b3IsYXBwX2hhbmRsZXJbaV0ub2Zmc2V0MzIpOw0KKyAgICAgfQ0KKyAgIGZvciAoaT0w O2k8REVTQ1JJUFRPUl9DT1VOVDtpKyspDQorICAgew0KKyAgICAgaWYgKGRlc2NyaXB0b3JzW2ld KQ0KKyAgICAgew0KKyAgICAgICBmcHJpbnRmKHN0ZGVyciwidXNlZCBkZXNjcmlwdG9yOiAlMDh4 XG4iLGRlc2NyaXB0b3JzW2ldKTsNCisgICAgIH0NCisgICB9DQorICNlbmRpZg0KKyAgIGZvciAo aT0wO2k8RFBNSV9FWENFUFRJT05fQ09VTlQ7aSsrKQ0KKyAgICAgew0KKyAgICAgICBhcHBfaGFu ZGxlcltpXS5vZmZzZ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EFSQU1TICgoaW50IHJl Z25vLCBMT05HRVNUIHZhbCwgaW50IHBpZCkpOw0KICANCiAgLyogQmFzaWMgYnl0ZS1zd2FwcGlu ZyByb3V0aW5lcy4gIEdEQiBoYXMgbmVlZGVkIHRoZXNlIGZvciBhIGxvbmcgdGltZS4uLg0KKioq KioqKioqKioqKioqDQoqKiogMjk5LDMwNSAqKioqDQogICAgICAgIFNXQVBfRkxPQVRJTkcgKCZy ZXR2YWwsIHNpemVvZiAocmV0dmFsKSk7DQogICAgICAgIHJldHVybiByZXR2YWw7DQogICAgICB9 DQohICAgZWxzZSBpZiAobGVuID09IHNpemVvZiAoRE9VQkxFU1QpKQ0KICAgICAgew0KICAgICAg ICBET1VCTEVTVCByZXR2YWw7DQogICAgICAgIG1lbWNweSAoJnJldHZhbCwgYWRkciwgc2l6ZW9m IChyZXR2YWwpKTsNCi0tLSAzMDMsMzA5IC0tLS0NCiAgICAgICAgU1dBUF9GTE9BVElORyAoJnJl dHZhbCwgc2l6ZW9mIChyZXR2YWwpKTsNCiAgICAgICAgcmV0dXJuIHJldHZhbDsNCiAgICAgIH0N CiEgICBlbHNlIGlmICgobGVuID09IHNpemVvZiAoRE9VQkxFU1QpKSB8fCAobGVuID09IEFMVEVS TkFURV9MT05HX0RPVUJMRV9TSVpFKSkNCiAgICAgIHsNCiAgICAgICAgRE9VQkxFU1QgcmV0dmFs Ow0KICAgICAgICBtZW1jcHkgKCZyZXR2YWwsIGFkZHIsIHNpemVvZiAocmV0dmFsKSk7DQoqKioq KioqKioqKioqKioNCioqKiAzMzEsMzM3ICoqKioNCiAgICAgICAgU1dBUF9GTE9BVElORyAoJmRv dWJsZXZhbCwgc2l6ZW9mIChkb3VibGV2YWwpKTsNCiAgICAgICAgbWVtY3B5IChhZGRyLCAmZG91 YmxldmFsLCBzaXplb2YgKGRvdWJsZXZhbCkpOw0KICAgICAgfQ0KISAgIGVsc2UgaWYgKGxlbiA9 PSBzaXplb2YgKERPVUJMRVNUKSkNCiAg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ExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMQgKi8N DQohIA0NCiEgc3RhdGljIHZvaWQgZ28zMl9jbG9zZShpbnQgcXVpdHRpbmcpDQ0KISB7DQ0KISAg IC8qcHJpbnRmX3VuZmlsdGVyZWQoImdvMzJfY2xvc2UgY2FsbGVkXG4iKTsqLw0NCiEgfQ0NCiEg DQ0KISAvKiDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExCAqLw0NCiEgDQ0KISBzdGF0aWMgdm9pZA0NCiEg Z28zMl9hdHRhY2goY2hhciAqYXJncywgaW50IGZyb21fdHR5KQ0NCiEgew0NCiEgICBwcmludGZf dW5maWx0ZXJlZCgiVXNlIHRoZSBgcnVuJyBjb21tYW5kIHRvIHJ1biBnbzMyIHByb2dyYW1zXG4i KTsNDQohIH0NDQohIA0NCiEgLyogxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMQgKi8NDQohIA0NCiEgc3Rh dGljIHZvaWQNDQohIGdvMzJfZGV0YWNoKGNoYXIgKmFyZ3MsIGludCBmcm9tX3R0eSkNDQohIHsN DQohICAgLypwcmludGZfdW5maWx0ZXJlZCgiZ28zMl9kZXRhY2ggY2FsbGVkXG4iKTsqLw0NCiEg fQ0NCiEgDQ0KISAvKiDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExCAqLw0NCiEgDQ0KISBzdGF0aWMgaW50 IHJlc3VtZV9pc19zdGVwOw0NCiEgDQ0KISBzdGF0aWMgdm9pZA0NCiEgZ28zMl9yZXN1bWUoaW50 IHBpZCwgaW50IHN0ZXAsIGVudW0gdGFyZ2V0X3NpZ25hbCBzaWdnbmFsKQ0NCiEgew0NCiEgI2lm IDANDQohICAgcHJp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vX21hcHBpbmdbcmVnbm9dLnRzc19vZnMpOw0NCiEgICAgICAgICAgYnJl YWs7DQ0KISAgICAgICBkZWZhdWx0OgkvKnVua25vd24gcmVnaXN0ZXIgc2l6ZSovDQ0KISAgICAg ICAgICBwcmludGZfdW5maWx0ZXJlZCgiSW52YWxpZCByZWdpc3RlciBzaXplICVkIGJ5dGVzIGlu IGdvMzJfZmV0Y2hfcmVnaXN0ZXIoKSIsIHJlZ25vX21hcHBpbmdbcmVnbm9dLnNpemUpOw0NCiEg ICAgICAgICAgZXhpdCgxKTsNDQohICAgICAgfQ0NCiEgICB9DQ0KISB9DQ0KISANDQohIC8qIMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTEICovDQ0KISANDQohIHN0YXRpYyB2b2lkIHN0b3JlX3JlZ2lzdGVy KGludCByZWdubykNDQohIHsNDQohICAgY2hhciAqcnAgPSAoY2hhciAqKSZhX3RzcyArIHJlZ25v X21hcHBpbmdbcmVnbm9dLnRzc19vZnM7DQ0KISAgIGludCB2ID0gKihpbnQgKikoJnJlZ2lzdGVy c1tSRUdJU1RFUl9CWVRFKHJlZ25vKV0pOw0NCiEgICBzd2l0Y2ggKHJlZ25vX21hcHBpbmdbcmVn bm9dLnNpemUpDQ0KISAgIHsNDQohICAgICBjYXNlIDQ6DQ0KISAgICAgICAqKGludCAqKXJwID0g djsNDQohICAgICAgIGJyZWFrOw0NCiEgICAgIGNhc2UgMjoNDQohICAgICAgICooc2hvcnQgKily cCA9IHY7DQ0KISAgICAgICBicmVhazsNDQohICAgIGRlZmF1bHQ6CS8qdW5rbm93biByZWdpc3Rl ciBzaXplKi8NDQohICAgICAgIHByaW50Zl91bmZpbHRlcmVkKCJJbnZhbGlkIHJlZ2lzdGVyIHNp emUgJWQgYnl0ZXMgaW4gc3RvcmVfcmVnaXN0ZXIoKSIsIHJlZ25vX21hcHBpbmdbcmVnbm9dLnNp emU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dGFyZ2V0KQ0NCiEgew0NCiEgI2lm IDANDQohICAgcHJpbnRmX3VuZmlsdGVyZWQoImdvMzJfeGZlcl9tZW1vcnkgJXggJXggJWQgJWRc biIsIG1lbWFkZHIsIG15YWRkciwgbGVuLCB3cml0ZSk7DQ0KISAjZW5kaWYNDQohICAgaWYgKHdy aXRlKQ0NCiEgICAgIHdyaXRlX2NoaWxkKG1lbWFkZHIsIG15YWRkciwgbGVuKTsNDQohICAgZWxz ZQ0NCiEgICAgIHJlYWRfY2hpbGQobWVtYWRkciwgbXlhZGRyLCBsZW4pOw0NCiEgICByZXR1cm4g bGVuOw0NCiEgfQ0NCiEgDQ0KISAvKiDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExCAqLw0NCiEgDQ0KISBz dGF0aWMgdm9pZA0NCiEgZ28zMl9maWxlc19pbmZvKHN0cnVjdCB0YXJnZXRfb3BzICp0YXJnZXQp DQ0KISB7DQ0KISAgIHByaW50Zl91bmZpbHRlcmVkKCJZb3UgYXJlIHJ1bm5pbmcgYSBESkdQUCBW MiBwcm9ncmFtXG4iKTsNDQohIH0NDQohIA0NCiEgLyogxMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMQgKi8N DQohIA0NCiEgc3RhdGljIHZvaWQgZ28zMl9zdG9wKCkNDQohIHsNDQohICAgLypwcmludGZfdW5m aWx0ZXJlZCgiZ28zMl9zdG9wIGNhbGxlZFxuIik7Ki8NDQohICAgbm9ybWFsX3N0b3AoKTsNDQoh ICAgY2xlYW51cF9jbGllbnQoKTsNDQohICAgaW5mZXJpb3JfcGlkID0gMDsNDQohICAgcHJvZ19o YXNfc3RhcnRlZCA9IDA7DQ0KISB9DQ0KISANDQohIHN0YXRpYyB2b2lkDQ0KISBnbzMyX2tpbGxf aW5mZXJpb3Iodm9pZCkNDQoh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TsNDQohICAg ICBwcmludGZfdW5maWx0ZXJlZCgiTG9hZCBmYWlsZWQgZm9yIGltYWdlICVzXG4iLCBleGVjX2Zp bGUpOw0NCiEgICAgIGV4aXQoMSk7DQ0KISAgIH0NDQohICAgZW52aXJvbiA9IGVudl9zYXZlOw0N CiEgDQ0KISAgIGVkaV9pbml0KHN0YXJ0X3N0YXRlKTsNDQohIA0NCiEgICBpbmZlcmlvcl9waWQg PSBTT01FX1BJRDsNDQohICAgcHVzaF90YXJnZXQoJmdvMzJfb3BzKTsNDQohICAgY2xlYXJfcHJv Y2VlZF9zdGF0dXMoKTsNDQohICAgaW5zZXJ0X2JyZWFrcG9pbnRzKCk7DQ0KISAgIHByb2NlZWQo KENPUkVfQUREUikgLTEsIFRBUkdFVF9TSUdOQUxfMCwgMCk7DQ0KISB9DQ0KISANDQohIC8qIMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTEICovDQ0KISANDQohIHN0YXRpYyB2b2lkDQ0KISBnbzMyX21vdXJu X2luZmVyaW9yKHZvaWQpDQ0KISB7DQ0KISAgIC8qcHJpbnRmX2ZpbHRlcmVkKCJnbzMyX21vdXJu X2luZmVyaW9yIGNhbGxlZFxuIik7Ki8NDQohICAgZ28zMl9raWxsX2luZmVyaW9yKCk7DQ0KISAg IGdlbmVyaWNfbW91cm5faW5mZXJpb3IoKTsNDQohIH0NDQohIA0NCiEgLyogxMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMQgKi8NDQohIA0NCiEgc3RhdGljIGludCBnbzMyX2Nhbl9ydW4odm9pZCkNDQohIHsN DQohICAgcmV0dXJuIDE7DQ0KISB9DQ0KISANDQohIC8qIMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExM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nQgKHBpZCwgd2FkZHIsIGFkZHIsIHNpemUsIHJ3KTsNDQohICAg ICAgIGlmIChydikNDQohIAl7DQ0KISAJICBnbzMyX3JlbW92ZV93YXRjaHBvaW50IChwaWQsIHdh ZGRyLCBzaXplKTsNDQohIAkgIHJldHVybiBydjsNDQohIAl9DQ0KISAgICAgICBhZGRyICs9IHNp emU7DQ0KISAgICAgICBsZW4gLT0gc2l6ZTsNDQohICAgICB9DQ0KISAgIHJldHVybiBydjsNDQoh IH0NDQohIA0NCiEgLyogUmVtb3ZlIGEgd2F0Y2hwb2ludC4gICovDQ0KISANDQohIGludA0NCiEg Z28zMl9yZW1vdmVfd2F0Y2hwb2ludCAocGlkLCBhZGRyLCBsZW4pDQ0KISAgICAgIGludCBwaWQ7 DQ0KISAgICAgIENPUkVfQUREUiBhZGRyOw0NCiEgICAgICBpbnQgbGVuOw0NCiEgew0NCiEgICBp bnQgaTsNDQohICAgZm9yIChpID0gMDsgaSA8PSAzOyBpKyspDQ0KISAgICAgew0NCiEgICAgICAg aWYgKERfUkVHU1tpXSA9PSBhZGRyKQ0NCiEgCXsNDQohIAkgIERJU0FCTEVfUkVHKGkpOw0NCiEg CX0NDQohICAgICB9DQ0KISBfU0hPV19EUihyZW1vdmVfd2F0Y2gpOw0NCiEgICByZXR1cm4gMDsN DQohIH0NDQohIA0NCiEgLyogQ2hlY2sgaWYgc3RvcHBlZCBieSBhIHdhdGNocG9pbnQuICAqLw0N CiEgDQ0KISBDT1JFX0FERFINDQohIGdvMzJfc3RvcHBlZF9ieV93YXRjaHBvaW50IChwaWQpDQ0K ISAgICAgaW50IHBpZDsNDQohIHsNDQohICAgaW50IGkscmV0PTA7DQ0KISAgIGludCBzdGF0dXM7 DQ0KISANDQohICAgc3RhdHVzID0gZWRpLmRyW0RSX1NUQVRVU107DQ0KISBfU0hPV19EUihzdG9w cGVkX2J5KTsNDQohICAgZm9yIChpID0gMDsgaSA8PSAzOyBpKyspDQ0KISAgICAgew0NCiEgICAg IC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TSUdOQUxfU0VHViwNCiEg ICAxMiwgVEFSR0VUX1NJR05BTF9TRUdWLA0KISAgIDEzLCBUQVJHRVRfU0lHTkFMX1NFR1YsDQoh ICAgMTQsIFRBUkdFVF9TSUdOQUxfU0VHViwNCiEgICAxNiwgVEFSR0VUX1NJR05BTF9GUEUsDQoh ICAgMzEsIFRBUkdFVF9TSUdOQUxfSUxMLA0KISAweDc1LCBUQVJHRVRfU0lHTkFMX0ZQRSwNCiEg MHg3OSwgVEFSR0VUX1NJR05BTF9JTlQsDQohIDB4MWIsIFRBUkdFVF9TSUdOQUxfSU5ULA0KISAg IC0xLC0xDQohIH07DQohIA0KISB2b2lkDQohIGluaXRfZ28zMl9leHRkZWJ1ZyhpbnQgKmFyZ2Ms IGNoYXIgKioqYXJndngpDQohIHsNCiEgICBpbnQgaTsNCiEgICBjaGFyICoqYXJndjsNCiEgICBj aGFyIGNtZGxpbmVbMTI4XTsNCiEgfQ0KISANCiEgLyogxMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMQgKi8N CiEgDQohIHN0YXRpYyB2b2lkDQohIGdvMzJfb3BlbihjaGFyICpuYW1lLCBpbnQgZnJvbV90dHkp DQohIHsNCiEgICBwcmludGZfdW5maWx0ZXJlZCgiVXNlIHRoZSBgcnVuJyBjb21tYW5kIHRvIHJ1 biBnbzMyIHByb2dyYW1zXG4iKTsNCiEgfQ0KISANCiEgLyogxMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMQg Ki8NCiEgDQohIHN0YXRpYyB2b2lkIGdvMzJfY2xvc2UoaW50IHF1aXR0aW5nKQ0KISB7DQohICAg LypwcmludGZfdW5maWx0ZXJlZCgiZ28zMl9jbG9zZSBjYWxsZWRcbiIpOyovDQohIH0NCiEgDQoh IC8qIMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTEICovDQohIA0KISBzdGF0aWMgdm9pZA0KISBnbzMyX2F0 dGFjaChjaGFyICphcmdzLCBpbnQgZnJvbV90dHkpDQohIHsNCiEgICBwcmludGZfdW5maWx0ZXJl ZCgiVXNlIHRoZSBgcnVuJyBjb21tYW5kIHRvIHJ1biBnbzMyIHByb2dyYW1zXG4iKTsNCiEgfQ0K ISANCiEgLyogxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMQgKi8NCiEgDQohIHN0YXRpYyB2b2lkDQohIGdv MzJfZGV0YWNoKGNoYXIgKmFyZ3MsIGludCBmcm9tX3R0eSkNCiEgew0KISAgIC8qcHJpbnRmX3Vu ZmlsdGVyZWQoImdvMzJfZGV0YWNoIGNhbGxlZFxuIik7Ki8NCiEgfQ0KISANCiEgLyogxMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMQgKi8NCiEgDQohIHN0YXRpYyBpbnQgcmVzdW1lX2lzX3N0ZXA7DQohIA0K ISBzdGF0aWMgdm9pZA0KISBnbzMyX3Jlc3VtZShpbnQgcGlkLCBpbnQgc3RlcCwgZW51bSB0YXJn ZXRfc2lnbmFsIHNpZ2duYWwpDQohIHsNCiEgI2lmIDANCiEgICBwcmludGZfdW5maWx0ZXJlZCgi Z28zMl9yZXN1bWUgY2FsbGVkXG4iKTsNCiEgI2VuZGlmDQohICAgcmVzdW1lX2lzX3N0ZXAgPSBz dGVwOw0KISB9DQohIA0KISAvKiDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExCAqLw0KISANCiEgc3RhdGlj IGludA0KISBnbzMyX3dhaXQoaW50IHBpZCwgc3RydWN0IHRhcmdldF93YWl0c3RhdHVzICpzdGF0 dXMpDQohIHsNCiEgI2lmIDANCiEgICBwcmludGZfdW5maWx0ZXJlZCgiZ28zMl93YWl0ICVkXG4i LCBwaWQpOw0KISAjZW5kaWYNCiEgICBpZiAocmVzdW1lX2lzX3N0ZXApDQohICAgICBhX3Rzcy50 c3NfZWZsYWdzIHw9IDB4MDEwMDsNCiEgICBlbHNlDQohICAgICBhX3Rzcy50c3NfZWZsYWdzICY9 IDB4ZmVmZjsNCiEgICBydW5fY2hpbGQoKTsNCiEgICBpZiAoYV90c3MudHNzX2lycW4gPT0gMHgy MSkNCiEgICB7DQohICAgICBzdGF0dXMtPmtpbmQgPSBUQVJHRVRfV0FJVEtJTkRfRVhJVEVEOw0K ISAgICAgc3RhdHVzLT52YWx1ZS5pbnRlZ2VyID0gYV90c3MudHNzX2VheCAmIDB4ZmY7DQohICAg fQ0KISAgIGVsc2UNCiEgICB7DQohICAgICBpbnQgaTsNCiEgICAgIHN0YXR1cy0+dmFsdWUuc2ln ID0gVEFSR0VUX1NJR05BTF9VTktOT1dOOw0KISAgICAgZm9yIChpPTA7IHNpZ19tYXBbaV0uZ28z Ml9zaWcgIT0gLTE7IGkrKykNCiEgICAgICAgaWYgKGFfdHNzLnRzc19pcnFuID09IHNpZ19tYXBb aV0uZ28zMl9zaWcpDQohICAgICAgIHsNCiEgICAgICAgICBzdGF0dXMtPnZhbHVlLnNpZyA9IHNp Z19tYXBbaV0uZ2RiX3NpZzsNCiEgICAgICAgICBicmVhazsNCiEgICAgICAgfQ0KISAgICAgc3Rh dHVzLT5raW5kID0gVEFSR0VUX1dBSVRLSU5EX1NUT1BQRUQ7DQohICAgfQ0KISAgIHJldHVybiBT T01FX1BJRDsNCiEgfQ0KISANCiEgLyogxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMQgKi8NCiEgDQohIHN0 YXRpYyB2b2lkDQohIGdvMzJf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yB1c2VkIGZv ciBzb21ldGhpbmcgZWxzZSAqLw0KISAgICAgICAgICByZWdpc3Rlcl92YWxpZFtyZWdub10gPSAx Ow0KISAgICAgICAgICBtZW1jcHkgKCZyZWdpc3RlcnNbUkVHSVNURVJfQllURSAocmVnbm8pXSwg JmQsIFJFR0lTVEVSX1JBV19TSVpFIChyZWdubykpOw0KISAgICAgICAgICBpZiAoZW5kX3JlZz09 cmVnbm8rMSkNCiEgICAgICAgICAgICB7DQohICAgICAgICAgICAgIHByaW50Zl91bmZpbHRlcmVk KCJzdCglZCkgYWJvdmUgc3RhY2sgZW5kIiwgcmVnbm8tMTYpOw0KISAgICAgICAgICAgIH0NCiEg ICAgICAgIH0NCiEgICAgICBpZiAocmVnbm8+MTUpDQohICAgICAgICByZXR1cm47DQohICAgICB9 DQohIA0KISAgIGZvciAoOyByZWdubzxlbmRfcmVnOyByZWdubysrKSB7DQohICAgICAgc3dpdGNo IChyZWdub19tYXBwaW5nW3JlZ25vXS5zaXplKQ0KISAgICAgIHsNCiEgICAgICAgIGNhc2UgNDoN CiEgICAgICAgIGNhc2UgMjoNCiEgICAgICAgICAgc3VwcGx5X3JlZ2lzdGVyKHJlZ25vLCAoY2hh ciAqKSZhX3RzcyArIHJlZ25vX21hcHBpbmdbcmVnbm9dLnRzc19vZnMpOw0KISAgICAgICAgICBi cmVhazsNCiEgICAgICAgZGVmYXVsdDoJLyp1bmtub3duIHJlZ2lzdGVyIHNpemUqLw0KISAgICAg ICAgICBwcmludGZfdW5maWx0ZXJlZCgiSW52YWxpZCByZWdpc3RlciBzaXplICVkIGJ5dGVzIGlu IGdvMzJfZmV0Y2hfcmVnaXN0ZXIoKSIsIHJlZ25vX21hcHBpbmdbcmVnbm9dLnNpemUpOw0KISAg ICAgICAgICBleGl0KDEpOw0KISAgICAgIH0NCiEgICB9DQohIH0NCiEgDQohIC8qIMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTEICovDQohIA0KISBzdGF0aWMgdm9pZCBzdG9yZV9yZWdpc3RlcihpbnQgcmVn bm8pDQohIHsNCiEgICBjaGFyICpycCA9IChjaGFyICopJmFfdHNzICsgcmVnbm9fbWFwcGluZ1ty ZWdub10udHNzX29mczsNCiEgICBpbnQgdiA9ICooaW50ICopKCZyZWdpc3RlcnNbUkVHSVNURVJf QllURShyZWdubyldKTsNCiEgICAvKiBGUFUgdHJlYXRlZCBzZXBhcmF0ZWx5ICovDQohICAgaWYg KHJlZ25vPjE1KSB7DQohIA0KISAgICAgIGxvbmcgZG91YmxlIGQgPSAqKGxvbmcgZG91YmxlICop ICgmcmVnaXN0ZXJzW1JFR0lTVEVSX0JZVEUocmVnbm8pXSk7DQohICAgICAgZnB1ZS5zdFtyZWdu by0xNl09ZDsNCiEgICAgICByZXR1cm47DQohICAgICB9DQohIA0KISAgIHN3aXRjaCAocmVnbm9f bWFwcGluZ1tyZWdub10uc2l6ZSkNCiEgICB7DQohICAgICBjYXNlIDQ6DQohICAgICAgICooaW50 ICopcnAgPSB2Ow0KISAgICAgICBicmVhazsNCiEgICAgIGNhc2UgMjoNCiEgICAgICAgKihzaG9y dCAqKXJwID0gdjsNCiEgICAgICAgYnJlYWs7DQohICAgIGRlZmF1bHQ6CS8qdW5rbm93biByZWdp c3RlciBzaXplKi8NCiEgICAgICAgcHJpbnRmX3VuZmlsdGVyZWQoIkludmFsaWQgcmVnaXN0ZXIg c2l6ZSAlZCBieXRlcyBpbiBzdG9yZV9yZWdpc3RlcigpIiwgcmVnbm9fbWFwcGluZ1tyZWdub10u c2l6ZSk7DQohICAgICAgIGV4aXQoMSk7DQohICAgfQ0KISB9DQohIA0KISBzdGF0aWMgdm9pZA0K ISBnbzMyX3N0b3JlX3JlZ2lzdGVycyhpbnQgcmVnbm8pDQohIHsNCiEgI2lmIDANCiEgICBwcmlu dGZfdW5maWx0ZXJlZCgiZ28zMl9zdG9yZV9yZWdpc3RlcnMgY2FsbGVkXG4iKTsNCiEgI2VuZGlm DQohICAgaWYgKHJlZ25vID49IDApDQohICAgICBzdG9yZV9yZWdpc3RlcihyZWdubyk7DQohICAg ZWxzZQ0KISAgIHsNCiEgICAgIGludCByOw0KISAgICAgZm9yIChyPTA7IHI8c2l6ZW9mKHJlZ25v X21hcHBpbmcpL3NpemVvZihyZWdub19tYXBwaW5nWzBdKTsgcisrKQ0KISAgICAgICBzdG9yZV9y ZWdpc3RlcihyKTsNCiEgICB9DQohIH0NCiEgDQohIC8qIMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEICov DQohIA0KISBzdGF0aWMgdm9pZA0KISBnbzMyX3ByZXBhcmVfdG9fc3RvcmUodm9pZCkNCiEgew0K ISAjaWYgMA0KISAgIHByaW50Zl91bmZpbHRlcmVkKCJnbzMyX3ByZXBhcmVfdG9fc3RvcmUgY2Fs bGVkXG4iKTsNCiEgI2VuZGlmDQohIH0NCiEgDQohIC8qIMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEICov DQohIA0KISBzdGF0aWMgaW50DQohIGdvMzJfeGZlcl9tZW1vcnkoQ09SRV9BRERSIG1lbWFkZHIs IGNoYXIgKm15YWRkciwgaW50IGxlbiwgaW50IHdyaXRlLA0KISAJCSBzdHJ1Y3QgdGFyZ2V0X29w cyAqdGFyZ2V0KQ0KISB7DQohICAgaW50IHJlczsNCiEgI2lmIDANCiEgICBwcmludGZfdW5maWx0 ZXJlZCgiZ28zMl94ZmVyX21lbW9yeSAleCAleCAlZCAlZFxuIiwgbWVtYWRkciwgbXlhZGRyLCBs ZW4sIHdyaXRlKTsNCiEgI2VuZGlmDQohICAgaWYgKHdyaXRlKQ0KISAgICAgcmVzPXdyaXRlX2No aWxkKG1lbWFkZHIsIG15YWRkciwgbGVuKTsNCiEgICBlbHNlDQohICAgICByZXM9cmVhZF9jaGls ZChtZW1hZGRyLCBteWFkZHIsIGxlbik7DQohICAgaWYgKCFyZXMpDQohICAgICByZXR1cm4gbGVu Ow0KISAgIGVsc2UNCiEgICAgIHJldHVybiAtMTsNCiEgfQ0KISANCiEgLyogxMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMQgKi8NCiEgDQohIHN0YXRpYyB2b2lkDQohIGdvMzJfZmlsZXNfaW5mbyhzdHJ1Y3Qg dGFyZ2V0X29wcyAqdGFyZ2V0KQ0KISB7DQohICAgcHJpbnRmX3VuZmlsdGVyZWQoIllvdSBhcmUg cnVubmluZyBhIERKR1BQIFYyIHByb2dyYW1cbiIpOw0KISB9DQohIA0KISAvKiDExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExCAqLw0KISANCiEgc3RhdGljIHZvaWQgZ28zMl9zdG9wKCkNCiEgew0KISAgIC8q cHJpbnRmX3VuZmlsdGVyZWQoImdvMzJfc3RvcCBjYWxsZWRcbiIpOyovDQohICAgbm9ybWFsX3N0 b3AoKTsNCiEgICBjbGVhbnVwX2NsaWVudCgpOw0KISAgIGluZmVyaW9yX3BpZCA9IDA7DQohICAg cHJvZ19oYXNfc3RhcnRlZCA9IDA7DQohIH0NCiEgDQohIHN0YXRpYyB2b2lkDQohIGdvMzJfa2ls bF9pbmZlcmlvcih2b2lkKQ0KISB7DQohICAgLypwcmludGZfdW5maWx0ZXJlZCgiZ28zMl9raWxs X2luZmVyaW9yIGNhbGxlZFxuIik7Ki8NCiEgICBnbzMyX3N0b3AoKTsNCiEgICB1bnB1c2hfdGFy Z2V0KCZnbzMyX29wcyk7DQohIH0NCiEgDQohIC8qIMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMT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NCiEgICBjbGVhcl9wcm9jZWVkX3N0YXR1cygpOw0KISAgIGluc2VydF9icmVha3BvaW50cygp Ow0KISAgIHByb2NlZWQoKENPUkVfQUREUikgLTEsIFRBUkdFVF9TSUdOQUxfMCwgMCk7DQohIH0N CiEgDQohIC8qIMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEICovDQohIA0KISBzdGF0aWMgdm9pZA0KISBn bzMyX21vdXJuX2luZmVyaW9yKHZvaWQpDQohIHsNCiEgICAvKnByaW50Zl9maWx0ZXJlZCgiZ28z Ml9tb3Vybl9pbmZlcmlvciBjYWxsZWRcbiIpOyovDQohICAgZ28zMl9raWxsX2luZmVyaW9yKCk7 DQohICAgZ2VuZXJpY19tb3Vybl9pbmZlcmlvcigpOw0KISB9DQohIA0KISAvKiDExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExCAqLw0KISANCiEgc3RhdGljIGludCBnbzMyX2Nhbl9ydW4odm9pZCkNCiEgew0K ISAgIHJldHVybiAxOw0KISB9DQohIA0KISAvKiDExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExCAqLw0KISAN CiEgdm9pZCBnbzMyX3NlbF9pbmZvKGludCBzZWwpDQohIHsNCiEgICBjaGFyIHJlYWRfYWxsb3dl ZCA9IDA7DQohICAgY2hhciB3cml0ZV9hbGxvd2VkID0gMDsNCiEgICB1bnNpZ25lZCBsb25nIGxp bWl0LHZiYXNlOw0KISAgIA0KISAgIGFzbSgiDQohICAgICAgIG1vdncgICUyLCUlYXgNCiEgICAg ICAgdmVyciAgJSVheA0KISAgICAgICBqbnogICAuTGRvZXNfbm90X2hhc19yZWFkX3JpZ2h0DQoh ICAgICAgIG1vdmIgICQxLCUwDQohIC5MZG9lc19ub3RfaGFzX3JlYWRfcmlnaHQ6DQohICAgICAg IHZlcnJ3ICUlYXgNCiEgICAgICAgam56ICAgLkxkb2VzX25vdF9oYXNfd3JpdGVfcmlnaHQNCiEg ICAgICAgbW92YiAgJDEsJTENCiEgLkxkb2VzX25vdF9oYXNfd3JpdGVfcmlnaHQ6ICINCiEgICAg ICA6ICI9ZyIgKHJlYWRfYWxsb3dlZCksICI9ZyIgKHdyaXRlX2FsbG93ZWQpDQohICAgICAgOiAi ZyIgKHNlbCkNCiEgICAgICApOw0KISAgIGlmICghcmVhZF9hbGxvd2VkICYmICF3cml0ZV9hbGxv d2VkKQ0KISAgICAgew0KISAgICAgICBwcmludGZfdW5maWx0ZXJlZCgiSW52YWxpZCBzZWxlY3Rv ciAlMDR4XG4iLCBzZWwpOw0KISAgICAgICByZXR1cm47DQohICAgICB9DQohICAgaWYgKHJlYWRf YWxsb3dlZCkNCiEgICAgIHByaW50Zl91bmZpbHRlcmVkKCJSIik7DQohICAgZWxzZQ0KISAgICAg cHJpbnRmX3VuZmlsdGVyZWQoIiAiKTsNCiEgICBpZiAod3JpdGVfYWxsb3dlZCkNCiEgICAgIHBy aW50Zl91bmZpbHRlcmVkKCJXICIpOw0KISAgIGVsc2UNCiEgICAgIHByaW50Zl91bmZpbHRlcmVk KCIgICIpOw0KISAgIF9fZHBtaV9nZXRfc2VnbWVudF9iYXNlX2FkZHJlc3Moc2VsLCAmdmJhc2Up Ow0KISAgIGxpbWl0PV9fZHBtaV9nZXRfc2VnbWVudF9saW1pdChzZWwpOw0KISAgIHByaW50Zl91 bmZpbHRlcmVkKCIgYmFzZSAlMDh4XHQgbGltaXQgJTA4eFxuIix2YmFzZSxsaW1pdCk7DQohIH0N CiEgDQohIC8qIMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTE xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEICovDQohIA0KISBzdGF0aWMgdm9pZCBpZ25v cmUodm9pZCkge30NC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XA0KISAg IGRvIHtcDQohICAgICBTRVRfQlJFQUsoaW5kZXgsYWRkcmVzcyk7XA0KISAgICAgQ09OVFJPTCB8 PSAobGVuIHwgcncpIDw8IChEUl9DT05UUk9MX1NISUZUICsgRFJfQ09OVFJPTF9TSVpFICogaW5k ZXgpO1wNCiEgICB9IHdoaWxlICgwKQ0KISAgIA0KISAjZGVmaW5lIFdBVENIX0hJVChpbmRleCkg XA0KISAgIChcDQohICAgIChTVEFUVVMgJiAoMSA8PCBpbmRleCkpICYmIFwNCiEgICAgKENPTlRS T0wgJiAoRFJfQ09OVFJPTF9NQVNLIDw8IChEUl9DT05UUk9MX1NISUZUICsgRFJfQ09OVFJPTF9T SVpFICogaW5kZXgpKSlcDQohICAgKQ0KISANCiEgc3RhdGljIGludA0KISBnbzMyX2luc2VydF9h bGlnbmVkX3dhdGNocG9pbnQgUEFSQU1TICgoaW50LCBDT1JFX0FERFIsIENPUkVfQUREUiwgaW50 LA0KISAJCQkJCSAgIGludCkpOw0KISANCiEgc3RhdGljIGludA0KISBnbzMyX2luc2VydF9ub25h bGlnbmVkX3dhdGNocG9pbnQgUEFSQU1TICgoaW50LCBDT1JFX0FERFIsIENPUkVfQUREUiwgaW50 LA0KISAJCQkJCSAgIGludCkpOw0KISANCiEgLyogSW5zZXJ0IGEgd2F0Y2hwb2ludC4gICovDQoh IA0KISAjZGVmaW5lIFNIT1dfRFIodGV4dCkgXA0KISBkbyB7XA0KISAgIGZwcmludGYoc3RkZXJy LCIlMDh4ICUwOHggIixlZGkuZHJbN10sZWRpLmRyWzZdKTtcDQohICAgZnByaW50ZihzdGRlcnIs IiUwOHggJTA4eCAiLGVkaS5kclswXSxlZGkuZHJbMV0pO1wNCiEgICBmcHJpbnRmKHN0ZGVyciwi JTA4eCAlMDh4ICIsZWRpLmRyWzJdLGVkaS5kclszXSk7XA0KISAgIGZwcmludGYoc3RkZXJyLCIo JXMpXG4iLCN0ZXh0KTtcDQohIH0gd2hpbGUgKDApDQohIA0KIS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QohIA0KISAgIGlmIChsZW4gPT0gMSkNCiEgICAgIGxlbl9iaXRzID0gRFJfTEVO XzE7DQohICAgZWxzZSBpZiAobGVuID09IDIpDQohICAgICB7DQohICAgICAgIGlmIChhZGRyICUg MikNCiEgCXJldHVybiBnbzMyX2luc2VydF9ub25hbGlnbmVkX3dhdGNocG9pbnQgKHBpZCwgd2Fk ZHIsIGFkZHIsIGxlbiwgcncpOw0KISAgICAgICBsZW5fYml0cyA9IERSX0xFTl8yOw0KISAgICAg fQ0KISANCiEgICBlbHNlIGlmIChsZW4gPT0gNCkNCiEgICAgIHsNCiEgICAgICAgaWYgKGFkZHIg JSA0KQ0KISAJcmV0dXJuIGdvMzJfaW5zZXJ0X25vbmFsaWduZWRfd2F0Y2hwb2ludCAocGlkLCB3 YWRkciwgYWRkciwgbGVuLCBydyk7DQohICAgICAgIGxlbl9iaXRzID0gRFJfTEVOXzQ7DQohICAg ICB9DQohICAgZWxzZQ0KISAgICAgcmV0dXJuIGdvMzJfaW5zZXJ0X25vbmFsaWduZWRfd2F0Y2hw b2ludCAocGlkLCB3YWRkciwgYWRkciwgbGVuLCBydyk7DQohICAgDQohICAgU0VUX1dBVENIKGks YWRkcixyZWFkX3dyaXRlX2JpdHMsbGVuX2JpdHMpOw0KISAgIExPQ0FMX0VOQUJMRV9SRUcoaSk7 DQohICAgU0VUX0xPQ0FMX0VYQUNUKCk7DQohIH0NCiEgDQohIHN0YXRpYyBpbnQNCiEgZ28zMl9p bnNlcnRfbm9uYWxpZ25lZF93YXRjaHBvaW50IChwaWQsIHdhZGRyLCBhZGRyLCBsZW4sIHJ3KQ0K ISAgICAgIGludCBwaWQ7DQohICAgICAgQ09SRV9BRERSIHdhZGRyOw0KISAgICAgIENPUkVfQURE UiBhZGRyOw0KISAgICAgIGludCBsZW47DQohICAgICAgaW50IHJ3Ow0KISB7DQohICAgaW50IGFs aWduOw0KISAgIGludCBzaXplOw0KISAgIGludCBydjsNCiEgDQohICAgc3RhdGljIGludCBza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NzQgKioqKg0KICAJc2NtLWV4cC5vIHNjbS1sYW5nLm8gc2NtLXZhbHByaW50Lm8g Y29tcGxhaW50cy5vIHR5cGVwcmludC5vIFwNCiAgCWMtdHlwZXByaW50Lm8gY2gtdHlwZXByaW50 Lm8gZi10eXBlcHJpbnQubyBtMi10eXBlcHJpbnQubyBcDQogIAljLXZhbHByaW50Lm8gY3AtdmFs cHJpbnQubyBjaC12YWxwcmludC5vIGYtdmFscHJpbnQubyBtMi12YWxwcmludC5vIFwNCiEgCW5s bXJlYWQubyBzZXJpYWwubyBtZGVidWdyZWFkLm8gb3M5a3JlYWQubyB0b3AubyB1dGlscy5vIGNh bGxiYWNrLm8NCiAgDQogIE9CUyA9ICQoQ09NTU9OX09CUykgJChBTk5PVEFURV9PQlMpIG1haW4u bw0KICANCi0tLSA0NzMsNDgwIC0tLS0NCiAgCXNjbS1leHAubyBzY20tbGFuZy5vIHNjbS12YWxw cmludC5vIGNvbXBsYWludHMubyB0eXBlcHJpbnQubyBcDQogIAljLXR5cGVwcmludC5vIGNoLXR5 cGVwcmludC5vIGYtdHlwZXByaW50Lm8gbTItdHlwZXByaW50Lm8gXA0KICAJYy12YWxwcmludC5v IGNwLXZhbHByaW50Lm8gY2gtdmFscHJpbnQubyBmLXZhbHByaW50Lm8gbTItdmFscHJpbnQubyBc DQohIAlubG1yZWFkLm8gc2VyaWFsLm8gbWRlYnVncmVhZC5vIG9zOWtyZWFkLm8gdG9wLm8gdXRp bHMubyBjYWxsYmFjay5vIFwNCiEgCXAtbGFuZy5vIHAtdmFscHJpbnQubyBwLXR5cGVwcmludC5v DQogIA0KICBPQlMgPSAkKENPTU1PTl9PQlMpICQoQU5OT1RBVEVfT0JTKSBtYWluLm8NCiAgDQoq KioqKioqKioqKioqKioNCioqKiA0ODMsNDkwICoqKioNCiAgU1VCRElSUz1kb2MNCiAgDQogICMg Rm9yIG5vdywgc2hvcnRjdXQgdGhlICJjb25maWd1cmUgR0RCIGZvciBmZXdlciBsYW5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ZWUgaWYgaXQgaGFzIGBmJyBvciBgbCcgc3VmZml4IChmbG9hdCBvciBsb25nIGRvdWJsZSku ICAqLw0KKyANCisgICAgICAgYyA9IHRvbG93ZXIgKHBbbGVuIC0gMV0pOw0KKyANCisgICAgICAg aWYgKGMgPT0gJ2YnKQ0KKyAJcHV0aXRoZXJlLT50eXBlZF92YWxfZmxvYXQudHlwZSA9IGJ1aWx0 aW5fdHlwZV9mbG9hdDsNCisgICAgICAgZWxzZSBpZiAoYyA9PSAnbCcpDQorIAlwdXRpdGhlcmUt PnR5cGVkX3ZhbF9mbG9hdC50eXBlID0gYnVpbHRpbl90eXBlX2xvbmdfZG91YmxlOw0KKyAgICAg ICBlbHNlIGlmIChpc2RpZ2l0IChjKSB8fCBjID09ICcuJykNCisgCXB1dGl0aGVyZS0+dHlwZWRf dmFsX2Zsb2F0LnR5cGUgPSBidWlsdGluX3R5cGVfZG91YmxlOw0KKyAgICAgICBlbHNlDQorIAly ZXR1cm4gRVJST1I7DQorIA0KKyAgICAgICByZXR1cm4gRkxPQVQ7DQorICAgICB9DQorIA0KKyAg IC8qIEhhbmRsZSBiYXNlLXN3aXRjaGluZyBwcmVmaXhlcyAweCwgMHQsIDBkLCAwICovDQorICAg aWYgKHBbMF0gPT0gJzAnKQ0KKyAgICAgc3dpdGNoIChwWzFdKQ0KKyAgICAgICB7DQorICAgICAg IGNhc2UgJ3gnOg0KKyAgICAgICBjYXNlICdYJzoNCisgCWlmIChsZW4gPj0gMykNCisgCSAgew0K KyAJICAgIHAgKz0gMjsNCisgCSAgICBiYXNlID0gMTY7DQorIAkgICAgbGVuIC09IDI7DQorIAkg IH0NCisgCWJyZWFrOw0KKyANCisgICAgICAgY2FzZSAndCc6DQorICAgICAgIGNhc2UgJ1QnOg0K KyAgICAgICBjYXNlICdkJzoNCisgICAgICAgY2FzZSAnRCc6DQorIAlpZiAobGVuID49IDMpDQor IAkgIHsNCisgCSAgICBwICs9IDI7DQorIAkgICAgYmFzZSA9IDEwOw0KKyAJICAgIGxlbiAtPSAy Ow0KKyAJICB9DQorIAlicmVhazsNCisgDQorICAgICAgIGRlZmF1bHQ6DQorIAliYXNlID0gODsN CisgCWJyZWFrOw0KKyAgICAgICB9DQorIA0KKyAgIHdoaWxlIChsZW4tLSA+IDApDQorICAgICB7 DQorICAgICAgIGMgPSAqcCsrOw0KKyAgICAgICBpZiAoYyA+PSAnQScgJiYgYyA8PSAnWicpDQor IAljICs9ICdhJyAtICdBJzsNCisgICAgICAgaWYgKGMgIT0gJ2wnICYmIGMgIT0gJ3UnKQ0KKyAJ biAqPSBiYXNlOw0KKyAgICAgICBpZiAoYyA+PSAnMCcgJiYgYyA8PSAnOScpDQorIAl7DQorIAkg IGlmIChmb3VuZF9zdWZmaXgpDQorIAkgICAgcmV0dXJuIEVSUk9SOw0KKyAJICBuICs9IGkgPSBj IC0gJzAnOw0KKyAJfQ0KKyAgICAgICBlbHNlDQorIAl7DQorIAkgIGlmIChiYXNlID4gMTAgJiYg YyA+PSAnYScgJiYgYyA8PSAnZicpDQorIAkgICAgew0KKyAJICAgICAgaWYgKGZvdW5kX3N1ZmZp eCkNCisgCQlyZXR1cm4gRVJST1I7DQorIAkgICAgICBuICs9IGkgPSBjIC0gJ2EnICsgMTA7DQor IAkgICAgfQ0KKyAJICBlbHNlIGlmIChjID09ICdsJykNCisgCSAgICB7DQorIAkgICAgICArK2xv bmdfcDsNCisgCSAgICAgIGZvdW5kX3N1ZmZpeCA9IDE7DQorIAkgICAgfQ0KKyAJICBlbHNlIGlm IChjID09ICd1JykNCisgCSAgICB7DQorIAkgICAgICB1bnNpZ25lZF9wID0gMTsNCisgCSAgICAg IGZvdW5kX3N1ZmZpeCA9IDE7DQorIAkgICAgfQ0KKyAJICBlbHNlDQorIAkgICAgcmV0dXJuIEVS Uk9SOwkvKiBDaGFyIG5vdCBhIGRpZ2l0ICovDQorIAl9DQorICAgICAgIGlmIChpID49IGJhc2Up DQorIAlyZXR1cm4gRVJST1I7CQkvKiBJb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ICB7ImFuZCIsIEFO REFORCwgQklOT1BfRU5EfSwNCisgICAgIHsiZGl2IiwgRElWLCBCSU5PUF9FTkR9LA0KKyAgICAg eyJub3QiLCBOT1QsIEJJTk9QX0VORH0sDQorICAgICB7Im1vZCIsIE1PRCwgQklOT1BfRU5EfSwN CisgICAgIHsiaW5jIiwgSU5DUkVNRU5ULCBCSU5PUF9FTkR9LA0KKyAgICAgeyJkZWMiLCBERUNS RU1FTlQsIEJJTk9QX0VORH0sDQorICAgICB7InhvciIsIFhPUiwgQklOT1BfRU5EfQ0KKyAgIH07 DQorIA0KKyBzdGF0aWMgY29uc3Qgc3RydWN0IHRva2VuIHRva2VudGFiMltdID0NCisgICB7DQor ICAgICB7Im9yIiwgT1IsIEJJTk9QX0VORH0sDQorICAgICB7Ijw+IiwgTk9URVFVQUwsIEJJTk9Q X0VORH0sDQorICAgICB7Ijw9IiwgTEVRLCBCSU5PUF9FTkR9LA0KKyAgICAgeyI+PSIsIEdFUSwg QklOT1BfRU5EfSwNCisgICAgIHsiOj0iLCBBU1NJR04sIEJJTk9QX0VORH0NCisgICB9Ow0KKyAN CisgLyogUmVhZCBvbmUgdG9rZW4sIGdldHRpbmcgY2hhcmFjdGVycyB0aHJvdWdoIGxleHB0ci4g ICovDQorIA0KKyBzdGF0aWMgaW50DQorIHl5bGV4ICgpDQorIHsNCisgICBpbnQgYzsNCisgICBp bnQgbmFtZWxlbjsNCisgICB1bnNpZ25lZCBpbnQgaTsNCisgICBjaGFyICp0b2tzdGFydDsNCisg ICBjaGFyICp1cHRva3N0YXJ0Ow0KKyAgIGNoYXIgKnRva3B0cjsNCisgICBjaGFyICpwOw0KKyAg IGludCB0ZW1wYnVmaW5kZXg7DQorICAgc3RhdGljIGNoYXIgKnRlbXBidWY7DQorICAgc3RhdGlj IGludCB0ZW1wYnVmc2l6ZTsNCisgICANCisgIHJldHJ5Og0KKyANCisgICB0b2tzdGFydCA9IGxl eHB0cjsNCisgICAvKiBTZWUgaWYgaXQgaX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ZvciBleGFtcGxlKQ0K KyAJIG9yIHdlIGhhdmUgYSBxdW90ZWQgc3ltYm9sIHJlZmVyZW5jZSAoJ2ZvbyhpbnQsaW50KScg aW4gQysrDQorIAkgZm9yIGV4YW1wbGUpLiAqLw0KKyAgICAgICBsZXhwdHIrKzsNCisgICAgICAg YyA9ICpsZXhwdHIrKzsNCisgICAgICAgaWYgKGMgPT0gJ1xcJykNCisgCWMgPSBwYXJzZV9lc2Nh cGUgKCZsZXhwdHIpOw0KKyAgICAgICBlbHNlIGlmIChjID09ICdcJycpDQorIAllcnJvciAoIkVt cHR5IGNoYXJhY3RlciBjb25zdGFudC4iKTsNCisgDQorICAgICAgIHl5bHZhbC50eXBlZF92YWxf aW50LnZhbCA9IGM7DQorICAgICAgIHl5bHZhbC50eXBlZF92YWxfaW50LnR5cGUgPSBidWlsdGlu X3R5cGVfY2hhcjsNCisgDQorICAgICAgIGMgPSAqbGV4cHRyKys7DQorICAgICAgIGlmIChjICE9 ICdcJycpDQorIAl7DQorIAkgIG5hbWVsZW4gPSBza2lwX3F1b3RlZCAodG9rc3RhcnQpIC0gdG9r c3RhcnQ7DQorIAkgIGlmIChuYW1lbGVuID4gMikNCisgCSAgICB7DQorIAkgICAgICBsZXhwdHIg PSB0b2tzdGFydCArIG5hbWVsZW47DQorIAkgICAgICBpZiAobGV4cHRyWy0xXSAhPSAnXCcnKQ0K KyAJCWVycm9yICgiVW5tYXRjaGVkIHNpbmdsZSBxdW90ZS4iKTsNCisgCSAgICAgIG5hbWVsZW4g LT0gMjsNCisgCSAgICAgIHRva3N0YXJ0Kys7DQorIAkgICAgICBnb3RvIHRyeW5hbWU7DQorIAkg ICAgfQ0KKyAJICBlcnJvciAoIkludmFsaWQgY2hhcmFjdGVyIGNvbnN0YW50LiIpOw0KKyAJfQ0K KyAgICAgICByZXR1cm4gSU5UOw0KKyANCisgICAgIGNhc2UgJygnOg0KKyAgICAgICBwYXJlbl9k ZXB0aCsrOw0KKyAgICAgICBsZXhwdHIrKzsNCisgICAgICAgcmV0dXJuIGM7DQorIA0KKyAgICAg Y2FzZSAnKSc6DQorICAgICAgIGlmIChwYXJlbl9kZXB0aCA9PSAwKQ0KKyAJcmV0dXJuIDA7DQor ICAgICAgIHBhcmVuX2RlcHRoLS07DQorICAgICAgIGxleHB0cisrOw0KKyAgICAgICByZXR1cm4g YzsNCisgDQorICAgICBjYXNlICcsJzoNCisgICAgICAgaWYgKGNvbW1hX3Rlcm1pbmF0ZXMgJiYg cGFyZW5fZGVwdGggPT0gMCkNCisgCXJldHVybiAwOw0KKyAgICAgICBsZXhwdHIrKzsNCisgICAg ICAgcmV0dXJuIGM7DQorIA0KKyAgICAgY2FzZSAnLic6DQorICAgICAgIC8qIE1pZ2h0IGJlIGEg ZmxvYXRpbmcgcG9pbnQgbnVtYmVyLiAgKi8NCisgICAgICAgaWYgKGxleHB0clsxXSA8ICcwJyB8 fCBsZXhwdHJbMV0gPiAnOScpDQorIAlnb3RvIHN5bWJvbDsJCS8qIE5vcGUsIG11c3QgYmUgYSBz eW1ib2wuICovDQorICAgICAgIC8qIEZBTEwgVEhSVSBpbnRvIG51bWJlciBjYXNlLiAgKi8NCisg DQorICAgICBjYXNlICcwJzoNCisgICAgIGNhc2UgJzEnOg0KKyAgICAgY2FzZSAnMic6DQorICAg ICBjYXNlICczJzoNCisgICAgIGNhc2UgJzQnOg0KKyAgICAgY2FzZSAnNSc6DQorICAgICBjYXNl ICc2JzoNCisgICAgIGNhc2UgJzcnOg0KKyAgICAgY2FzZSAnOCc6DQorICAgICBjYXNlICc5JzoN CisgICAgICAgew0KKyAJLyogSXQncyBhIG51bWJlci4gICovDQorIAlpbnQgZ290X2RvdCA9IDAs IGdvdF9lID0gMCwgdG9rdHlwZTsNCisgCXJlZ2lzdGVyIGNoYXIgKnAgPSB0b2tzdGFydDsNCisg CWludCBoZXggPSBpbnB1dF9yYWRpeCA+IDEwOw0KKyANCisgCWlmIChjID09ICcwJyAmJiAocFsx XSA9PSAneCcgfHw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3Npb24gYW5kIGlzIE5PVCAN CisgICAgICByZW1vdmVkIGZyb20gdGhlIGlucHV0IHN0cmVhbS4gICovDQorICAgaWYgKG5hbWVs ZW4gPT0gMiAmJiB1cHRva3N0YXJ0WzBdID09ICdJJyAmJiB1cHRva3N0YXJ0WzFdID09ICdGJykN CisgICAgIHsNCisgICAgICAgcmV0dXJuIDA7DQorICAgICB9DQorIA0KKyAgIGxleHB0ciArPSBu YW1lbGVuOw0KKyANCisgICB0cnluYW1lOg0KKyANCisgICAvKiBDYXRjaCBzcGVjaWZpYyBrZXl3 b3Jkcy4gIFNob3VsZCBiZSBkb25lIHdpdGggYSBkYXRhIHN0cnVjdHVyZS4gICovDQorICAgc3dp dGNoIChuYW1lbGVuKQ0KKyAgICAgew0KKyAgICAgY2FzZSA2Og0KKyAgICAgICBpZiAoU1RSRVFO ICh1cHRva3N0YXJ0LCAiT0JKRUNUIiwgNikpDQorIAlyZXR1cm4gQ0xBU1M7DQorICAgICAgIGlm IChTVFJFUU4gKHVwdG9rc3RhcnQsICJSRUNPUkQiLCA2KSkNCisgCXJldHVybiBTVFJVQ1Q7DQor ICAgICAgIGlmIChTVFJFUU4gKHVwdG9rc3RhcnQsICJTSVpFT0YiLCA2KSkNCisgCXJldHVybiBT SVpFT0Y7DQorICAgICAgIGJyZWFrOw0KKyAgICAgY2FzZSA1Og0KKyAgICAgICBpZiAoU1RSRVFO ICh1cHRva3N0YXJ0LCAiQ0xBU1MiLCA1KSkNCisgCXJldHVybiBDTEFTUzsNCisgICAgICAgaWYg KFNUUkVRTiAodXB0b2tzdGFydCwgIkZBTFNFIiwgNSkpDQorIAl7DQorICAgICAgICAgICB5eWx2 YWwubHZhbCA9IDA7DQorICAgICAgICAgICByZXR1cm4gRkFMU0U7DQorICAgICAgICAgfQ0KKyAg ICAgICBicmVhazsNCisgICAgIGNhc2UgNDoNCisgICAgICAgaWYgKFNUUkVRTiAodXB0b2tzdGFy dCwgIlRSVUUiLCA0KSkNCisgCXsNCisg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DE7DQorICAg ICAgIC8qIE51bWJlciBvZiByZXBldGl0aW9ucyB3ZSBoYXZlIGRldGVjdGVkIHNvIGZhci4gICov DQorICAgICAgIHVuc2lnbmVkIGludCByZXBzOw0KKyANCisgICAgICAgUVVJVDsNCisgDQorICAg ICAgIGlmIChuZWVkX2NvbW1hKQ0KKyAJew0KKyAJICBmcHV0c19maWx0ZXJlZCAoIiwgIiwgc3Ry ZWFtKTsNCisgCSAgbmVlZF9jb21tYSA9IDA7DQorIAl9DQorIA0KKyAgICAgICByZXAxID0gaSAr IDE7DQorICAgICAgIHJlcHMgPSAxOw0KKyAgICAgICB3aGlsZSAocmVwMSA8IGxlbmd0aCAmJiBz dHJpbmdbcmVwMV0gPT0gc3RyaW5nW2ldKQ0KKyAJew0KKyAJICArK3JlcDE7DQorIAkgICsrcmVw czsNCisgCX0NCisgDQorICAgICAgIGlmIChyZXBzID4gcmVwZWF0X2NvdW50X3RocmVzaG9sZCkN CisgCXsNCisgCSAgaWYgKGluX3F1b3RlcykNCisgCSAgICB7DQorIAkgICAgICBpZiAoaW5zcGVj dF9pdCkNCisgCQlmcHV0c19maWx0ZXJlZCAoIlxcXCIsICIsIHN0cmVhbSk7DQorIAkgICAgICBl bHNlDQorIAkJZnB1dHNfZmlsdGVyZWQgKCJcIiwgIiwgc3RyZWFtKTsNCisgCSAgICAgIGluX3F1 b3RlcyA9IDA7DQorIAkgICAgfQ0KKyAJICBwYXNfcHJpbnRjaGFyIChzdHJpbmdbaV0sIHN0cmVh bSk7DQorIAkgIGZwcmludGZfZmlsdGVyZWQgKHN0cmVhbSwgIiA8cmVwZWF0cyAldSB0aW1lcz4i LCByZXBzKTsNCisgCSAgaSA9IHJlcDEgLSAxOw0KKyAJICB0aGluZ3NfcHJpbnRlZCArPSByZXBl YXRfY291bnRfdGhyZXNob2xkOw0KKyAJICBuZWVkX2NvbW1hID0gMTsNCisgCX0NCisgICAgICAg ZWxzZQ0KKyAJew0KKyAJICBpZiAoIWluX3F1b3Rl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ZV9jb2RlIGNvZGU7DQorICAgaW50IGRlbWFu Z2xlZF9hcmdzOw0KKyANCisgICBpZiAoc2hvdyA+IDApDQorICAgICBDSEVDS19UWVBFREVGICh0 eXBlKTsNCisgDQorICAgLyogZmlyc3QgcHJlZml4ICovDQorICAgDQorICAgY29kZSA9IFRZUEVf Q09ERSAodHlwZSk7DQorICAgaWYgKCh2YXJzdHJpbmcgIT0gTlVMTCAmJiAqdmFyc3RyaW5nICE9 ICdcMCcpDQorICAgICAgIHx8DQorICAgICAgIC8qIE5lZWQgYSBzcGFjZSBpZiBnb2luZyB0byBw cmludCBzdGFycyBvciBicmFja2V0czsNCisgCSBidXQgbm90IGlmIHdlIHdpbGwgcHJpbnQganVz dCBhIHR5cGUgbmFtZS4gICovDQorICAgICAgICgoc2hvdyA+IDAgfHwgVFlQRV9OQU1FICh0eXBl KSA9PSAwKQ0KKyAgICAgICAgJiYNCisgICAgICAgICggICBjb2RlID09IFRZUEVfQ09ERV9QVFIN CisgICAgICAgICB8fCBjb2RlID09IFRZUEVfQ09ERV9GVU5DDQorIAl8fCBjb2RlID09IFRZUEVf Q09ERV9NRVRIT0QNCisgCXx8IGNvZGUgPT0gVFlQRV9DT0RFX0FSUkFZDQorIAl8fCBjb2RlID09 IFRZUEVfQ09ERV9NRU1CRVINCisgCXx8IGNvZGUgPT0gVFlQRV9DT0RFX1JFRikpKQ0KKyAgICAg ZnB1dHNfZmlsdGVyZWQgKCIgIiwgc3RyZWFtKTsNCisgICBwYXNfdHlwZV9wcmludF92YXJzcGVj X3ByZWZpeCAodHlwZSwgc3RyZWFtLCBzaG93LCAwKTsNCisgDQorICAgLyogc2Vjb25kIHRoZSBu YW1lICovDQorICAgZnB1dHNfZmlsdGVyZWQgKHZhcnN0cmluZywgc3RyZWFtKTsNCisgDQorICAg aWYgKCh2YXJzdHJpbmcgIT0gTlVMTCAmJiAqdmFyc3RyaW5nICE9ICdcMCcpICYmDQorICAgICAg ICEoY29kZSA9PSBUWVBFX0NPRE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XRzX2ZpbHRlcmVkICgiICgiLCBz dHJlYW0pOw0KKyAgICAgICAvKiB3ZSBtdXN0IGRlbWFuZ2xlIHRoaXMgKi8NCisgICAgICAgd2hp bGUgaXNkaWdpdChwaHlzbmFtZVswXSkNCisgICAgICAgICB7DQorICAgICAgICAgIHdoaWxlIGlz ZGlnaXQgKHBoeXNuYW1lW2xlbl0pDQorICAgICAgICAgICAgew0KKyAgICAgICAgICAgICBsZW4r KzsNCisgICAgICAgICAgICB9DQorICAgICAgICAgIGkgPSBzdHJ0b2wocGh5c25hbWUsJmFyZ25h bWUsMCk7DQorICAgICAgICAgIHBoeXNuYW1lKz1sZW47DQorICAgICAgICAgIHN0b3JlYyA9IHBo eXNuYW1lW2ldOw0KKyAgICAgICAgICBwaHlzbmFtZVtpXSA9IDA7DQorICAgICAgICAgIGZwdXRz X2ZpbHRlcmVkIChwaHlzbmFtZSwgc3RyZWFtKTsNCisgICAgICAgICAgcGh5c25hbWVbaV0gPSBz dG9yZWM7DQorICAgICAgICAgIHBoeXNuYW1lKz1pOw0KKyAgICAgICAgICBpZiAocGh5c25hbWVb MF0gIT0gMCkNCisgICAgICAgICAgICB7DQorICAgICAgICAgICAgIGZwdXRzX2ZpbHRlcmVkICgi LCAiLCBzdHJlYW0pOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgICB9DQorICAgICAgIGZwdXRz X2ZpbHRlcmVkICgiKSIsIHN0cmVhbSk7DQorICAgICB9DQorIH0NCisgICANCisgLyogUHJpbnQg YW55IGFzdGVyaXNrcyBvciBvcGVuLXBhcmVudGhlc2VzIG5lZWRlZCBiZWZvcmUgdGhlDQorICAg IHZhcmlhYmxlIG5hbWUgKHRvIGRlc2NyaWJlIGl0cyB0eXBlKS4NCisgDQorICAgIE9uIG91dGVy bW9zdCBjYWxsLCBwYXNzIDAgZm9yIFBBU1NFRF9BX1BUUi4NCisgICAgT24gb3V0ZXJtb3N0IGNh bGwsIFNIT1cgPiAwIG1lYW5zIHNob3VsZCBpZ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ZSksIHN0cmVhbSwgMCwgMCk7DQorICAgICAgIGZwcmludGZfZmlsdGVyZWQgKHN0cmVhbSwg IiAiKTsNCisgICAgICAgbmFtZSA9IHR5cGVfbmFtZV9ub190YWcgKFRZUEVfRE9NQUlOX1RZUEUg KHR5cGUpKTsNCisgICAgICAgaWYgKG5hbWUpDQorIAlmcHV0c19maWx0ZXJlZCAobmFtZSwgc3Ry ZWFtKTsNCisgICAgICAgZWxzZQ0KKyAgICAgICAgIHBhc190eXBlX3ByaW50X2Jhc2UgKFRZUEVf RE9NQUlOX1RZUEUgKHR5cGUpLCBzdHJlYW0sIDAsIHBhc3NlZF9hX3B0cik7DQorICAgICAgIGZw cmludGZfZmlsdGVyZWQgKHN0cmVhbSwgIjo6Iik7DQorICAgICAgIGJyZWFrOw0KKyANCisgICAg IGNhc2UgVFlQRV9DT0RFX01FVEhPRDoNCisgICAgICAgaWYgKHBhc3NlZF9hX3B0cikNCisgCWZw cmludGZfZmlsdGVyZWQgKHN0cmVhbSwgIigiKTsNCisgICAgICAgaWYgKCBUWVBFX0NPREUoVFlQ RV9UQVJHRVRfVFlQRSAodHlwZSkpICE9IFRZUEVfQ09ERV9WT0lEKQ0KKyAgICAgICAgICB7DQor ICAgICAgICAgICBmcHJpbnRmX2ZpbHRlcmVkIChzdHJlYW0sICJmdW5jdGlvbiAgIik7DQorICAg ICAgICAgIH0NCisgICAgICAgZWxzZQ0KKyAgICAgICAgICB7DQorICAgICAgICAgICBmcHJpbnRm X2ZpbHRlcmVkIChzdHJlYW0sICJwcm9jZWR1cmUgIik7DQorICAgICAgICAgIH0NCisgICAgICAg DQorICAgICAgIGlmIChwYXNzZWRfYV9wdHIpDQorIAl7DQorIAkgIGZwcmludGZfZmlsdGVyZWQg KHN0cmVhbSwgIiAiKTsNCisgCSAgcGFzX3R5cGVfcHJpbnRfYmFzZSAoVFlQRV9ET01BSU5fVFlQ RSAodHlwZSksIHN0cmVhbSwgMCwgcGFzc2VkX2FfcHRyKTsNCisgCSAgZnByaW50Zl9maWx0ZXJl ZCAoc3RyZWFtLCAiOjoiKTsNCisgCX0NCisgICAgICAgYnJlYWs7DQorIA0KKyAgICAgY2FzZSBU WVBFX0NPREVfUkVGOg0KKyAgICAgICBwYXNfdHlwZV9wcmludF92YXJzcGVjX3ByZWZpeCAoVFlQ RV9UQVJHRVRfVFlQRSAodHlwZSksIHN0cmVhbSwgMCwgMSk7DQorICAgICAgIGZwcmludGZfZmls dGVyZWQgKHN0cmVhbSwgIiYiKTsNCisgICAgICAgYnJlYWs7DQorIA0KKyAgICAgY2FzZSBUWVBF X0NPREVfRlVOQzoNCisgICAgICAgaWYgKHBhc3NlZF9hX3B0cikNCisgCWZwcmludGZfZmlsdGVy ZWQgKHN0cmVhbSwgIigiKTsNCisgDQorICAgICAgIGlmICggVFlQRV9DT0RFKFRZUEVfVEFSR0VU X1RZUEUgKHR5cGUpKSAhPSBUWVBFX0NPREVfVk9JRCkNCisgICAgICAgICAgew0KKyAgICAgICAg ICAgZnByaW50Zl9maWx0ZXJlZCAoc3RyZWFtLCAiZnVuY3Rpb24gICIpOw0KKyAgICAgICAgICB9 DQorICAgICAgIGVsc2UNCisgICAgICAgICAgew0KKyAgICAgICAgICAgZnByaW50Zl9maWx0ZXJl ZCAoc3RyZWFtLCAicHJvY2VkdXJlICIpOw0KKyAgICAgICAgICB9DQorICAgICAgIA0KKyAgICAg ICBicmVhazsNCisgDQorICAgICBjYXNlIFRZUEVfQ09ERV9BUlJBWToNCisgICAgICAgaWYgKHBh c3NlZF9hX3B0cikNCisgCWZwcmludGZfZmlsdGVyZWQgKHN0cmVhbSwgIigiKTsNCisgICAgICAg ZnByaW50Zl9maWx0ZXJlZCAoc3RyZWFtLCAiYXJyYXkgIik7DQorICAgICAgIGlmIChUWVBFX0xF TkdUSCAodHlwZSkgPj0gMCAmJiBUWVBFX0xFTkdUSCAoVFlQRV9UQVJHRVRfVFlQRSAodHlwZSkp ID4gMA0KKyAJICAmJiBUWVBFX0FSUkFZX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0xLCAwKTsNCisgCSAgICAgIGlmIChhcmdzW2krMV0gPT0g TlVMTCkNCisgCQl7DQorIAkJICBmcHJpbnRmX2ZpbHRlcmVkIChzdHJlYW0sICIuLi4iKTsNCisg CQl9DQorIAkgICAgICBlbHNlIGlmIChhcmdzW2krMV0tPmNvZGUgIT0gVFlQRV9DT0RFX1ZPSUQp DQorIAkJew0KKyAJCSAgZnByaW50Zl9maWx0ZXJlZCAoc3RyZWFtLCAiLCIpOw0KKyAJCSAgd3Jh cF9oZXJlICgiICAgICIpOw0KKyAJCX0NCisgCSAgICB9DQorIAl9DQorICAgICAgIGlmICgoYXJn c1sxXSAhPSBOVUxMICYmIGFyZ3NbMV0tPmNvZGUgIT0gVFlQRV9DT0RFX1ZPSUQpIHx8DQorICAg ICAgICAgIChhcmdzWzJdICE9IE5VTEwpKQ0KKyAgICAgICAgew0KKyAgICAgICAgIGZwcmludGZf ZmlsdGVyZWQgKHN0cmVhbSwgIikiKTsNCisgICAgICAgIH0NCisgICAgIH0NCisgfQ0KKyANCisg c3RhdGljIHZvaWQNCisgcGFzX3ByaW50X2Z1bmNfYXJncyAoc3RydWN0IHR5cGUgKnR5cGUsIEdE Ql9GSUxFICpzdHJlYW0pDQorICAgICAgeyBpbnQgaSwgbGVuID0gVFlQRV9ORklFTERTICh0eXBl KTsNCisgICAgICAgIGlmIChsZW4pDQorICAgICAgICAgICAgICAgICB7DQorICAgICAgICAgICAg ICAgICAgZnByaW50Zl9maWx0ZXJlZCAoc3RyZWFtLCAiKCIpOw0KKyAgICAgICAgICAgICAgICAg fQ0KKyAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKQ0KKyAgICAgICAgICB7DQorICAg ICAgICAgICAgaWYgKGkgPiAwKQ0KKyAgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgZnB1 dHNfZmlsdGVyZWQgKCIsICIsIHN0cmVhbSk7DQorICAgICAgICAgICAgICAgd3JhcF9oZXJlICgi ICAgICIpOw0KKyAgICAgICAgICAgICB9DQorICAgICAgICAgICAgICAgICAgIC8qICBjYW4gd2Ug ZmluZCBpZiBpdCBpcyBhIHZhciBwYXJhbWV0ZXIgPz8NCisgICAgICAgICAgICAgICAgICAgaWYg KCBUWVBFX0ZJRUxEKHR5cGUsIGkpID09ICkNCisgICAgICAgICAgICAgICAgICAgICB7DQorICAg ICAgICAgICAgICAgICAgICAgIGZwcmludGZfZmlsdGVyZWQgKHN0cmVhbSwgInZhciAiKTsNCisg ICAgICAgICAgICAgICAgICAgICB9ICovDQorICAgICAgICAgICAgcGFzX3ByaW50X3R5cGUgKFRZ UEVfRklFTERfVFlQRSAodHlwZSwgaSksICIiIC8qIFRZUEVfRklFTERfTkFNRSBzZWVtcyBpbnZh bGlkICEgKi8NCisgICAgICAgICAgICAgICwgc3RyZWFtLCAtMSwgMCk7DQorICAgICAgICAgIH0N CisgICAgICAgIGlmIChsZW4pDQorICAgICAgICAgIHsNCisgICAgICAgICAgICBmcHJpbnRmX2Zp bHRlcmVkIChzdHJlYW0sICIpIik7DQorICAgICAgICAgIH0NCisgICAgICB9DQorICAgICAgDQor IC8qIFByaW50IGFueSBhcnJheSBzaXplcywgZnVuY3Rpb24gYXJndW1lbnRzIG9yIGNsb3NlIHBh cmVudGhlc2VzDQorICAgIG5lZWRlZCBhZnRlciB0aGUgdmFyaWFibGUgbmFtZSAodG8gZGVzY3Jp YmUgaXRzIHR5cGUpLg0KKyAgICBBcmdzIHdvcmsgbGlrZSBwYXNfdHlwZV9wcmludF92YXJzcGVj X3ByZWZpeC4gICovDQorIA0KKyBzdGF0aWMgdm9pZA0KKyBwYXNfdHlwZV9wcmludF92YXJzcGVj X3N1ZmZpeCAodHlwZSwgc3RyZWFtLCBzaG93LCBwYXNzZWRfYV9wdHIsIGRlbWFuZ2xlZF9hcmdz KQ0KKyAgICAgIHN0cnVjdCB0eXBlICp0eXBlOw0KKyAgICAgIEdEQl9GSUxFICpzdHJlYW07DQor ICAgICAgaW50IHNob3c7DQorICA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bnQgYnkuDQor ICAgIFdlIGluY3JlYXNlIGl0IGZvciBzb21lIHJlY3Vyc2l2ZSBjYWxscy4gICovDQorIA0KKyB2 b2lkDQorIHBhc190eXBlX3ByaW50X2Jhc2UgKHR5cGUsIHN0cmVhbSwgc2hvdywgbGV2ZWwpDQor ICAgICAgc3RydWN0IHR5cGUgKnR5cGU7DQorICAgICAgR0RCX0ZJTEUgKnN0cmVhbTsNCisgICAg ICBpbnQgc2hvdzsNCisgICAgICBpbnQgbGV2ZWw7DQorIHsNCisgICByZWdpc3RlciBpbnQgaTsN CisgICByZWdpc3RlciBpbnQgbGVuOw0KKyAgIHJlZ2lzdGVyIGludCBsYXN0dmFsOw0KKyAgIGVu dW0ge3Nfbm9uZSwgc19wdWJsaWMsIHNfcHJpdmF0ZSwgc19wcm90ZWN0ZWR9IHNlY3Rpb25fdHlw ZTsNCisgICBRVUlUOw0KKyANCisgICB3cmFwX2hlcmUgKCIgICAgIik7DQorICAgaWYgKHR5cGUg PT0gTlVMTCkNCisgICAgIHsNCisgICAgICAgZnB1dHNfZmlsdGVyZWQgKCI8dHlwZSB1bmtub3du PiIsIHN0cmVhbSk7DQorICAgICAgIHJldHVybjsNCisgICAgIH0NCisgDQorICAgLyogdm9pZCBw b2ludGVyICovDQorICAgaWYgKChUWVBFX0NPREUgKHR5cGUpID09IFRZUEVfQ09ERV9QVFIpICYm IChUWVBFX0NPREUgKFRZUEVfVEFSR0VUX1RZUEUgKHR5cGUpKSA9PSBUWVBFX0NPREVfVk9JRCkp DQorICAgICB7DQorICAgICAgIGZwcmludGZfZmlsdGVyZWQgKHN0cmVhbSwNCisgICAgICAgICBU WVBFX05BTUUgKHR5cGUpID8gVFlQRV9OQU1FICh0eXBlKSA6ICJwb2ludGVyIik7DQorICAgICAg IHJldHVybjsNCisgICAgIH0NCisgICAvKiBXaGVuIFNIT1cgaXMgemVybyBvciBsZXNzLCBhbmQg dGhlcmUgaXMgYSB2YWxpZCB0eXBlIG5hbWUsIHRoZW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Aoc3RyZWFtLCAic3RhdGljICIpOw0KKyAJCSAgaWYgKFRZ UEVfVEFSR0VUX1RZUEUgKFRZUEVfRk5fRklFTERfVFlQRSAoZiwgaikpID09IDApDQorIAkJICAg IHsNCisgCQkgICAgICAvKiBLZWVwIEdEQiBmcm9tIGNyYXNoaW5nIGhlcmUuICAqLw0KKyAJCSAg ICAgIGZwcmludGZfZmlsdGVyZWQgKHN0cmVhbSwgIjx1bmRlZmluZWQgdHlwZT4gJXM7XG4iLA0K KyAJCQkgICAgICAgVFlQRV9GTl9GSUVMRF9QSFlTTkFNRSAoZiwgaikpOw0KKyAJCSAgICAgIGJy ZWFrOw0KKyAJCSAgICB9DQorIA0KKyAgICAgICAgICAgICAgICAgICBpZiAoaXNfY29uc3RydWN0 b3IpDQorICAgICAgICAgICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ZnByaW50Zl9maWx0ZXJlZChzdHJlYW0sImNvbnN0cnVjdG9yICIpOw0KKyAgICAgICAgICAgICAg ICAgICAgIH0NCisgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoaXNfZGVzdHJ1Y3RvcikNCisg ICAgICAgICAgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgICAgICAgICAgICBmcHJpbnRm X2ZpbHRlcmVkKHN0cmVhbSwiZGVzdHJ1Y3RvciAgIik7DQorICAgICAgICAgICAgICAgICAgICAg fQ0KKyAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChUWVBFX1RBUkdFVF9UWVBFIChUWVBFX0ZO X0ZJRUxEX1RZUEUgKGYsIGopKSAhPSAwICYmDQorICAgICAgICAgICAgICAgICAgICAgICAgIFRZ UEVfQ09ERShUWVBFX1RBUkdFVF9UWVBFIChUWVBFX0ZOX0ZJRUxEX1RZUEUgKGYsIGopKSkgIT0g VFlQRV9DT0RFX1ZPSUQpDQorICAgICAgICAgICAgICAgICAgICAgICAgIHsNCisgICAgICAgICAg ICAgICAgICAgICAgICAgIGZwcmludGZfZmlsdGVyZWQoc3RyZWFtLCJmdW5jdGlvbiAgIik7DQor ICAgICAgICAgICAgICAgICAgICAgICAgIH0NCisgICAgICAgICAgICAgICAgICAgZWxzZQ0KKyAg ICAgICAgICAgICAgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgICAgICAgICAgICBmcHJp bnRmX2ZpbHRlcmVkKHN0cmVhbSwicHJvY2VkdXJlICIpOw0KKyAgICAgICAgICAgICAgICAgICAg ICAgICB9DQorICAgICAgICAgICAgICAgICAgIC8qIHRoaXMgZG9lcyBub3Qgd29yaywgbm8gaWRl YSB3aHkgISEgKi8NCisgICAgICAgICAgICAgICAgICAgDQorICAgICAgICAgICAgICAgICAgIHBh c190eXBlX3ByaW50X21ldGhvZF9hcmdzIChwaHlzbmFtZSwNCisgCQkJCQkgICAgICAgbWV0aG9k X25hbWUsDQorIAkJCQkJICAgICAgIHN0cmVhbSk7DQorICAgICAgICAgICAgICAgICAgIA0KKyAg ICAgICAgICAgICAgICAgICBpZiAoVFlQRV9UQVJHRVRfVFlQRSAoVFlQRV9GTl9GSUVMRF9UWVBF IChmLCBqKSkgIT0gMCAmJg0KKyAgICAgICAgICAgICAgICAgICAgICAgICBUWVBFX0NPREUoVFlQ RV9UQVJHRVRfVFlQRSAoVFlQRV9GTl9GSUVMRF9UWVBFIChmLCBqKSkpICE9IFRZUEVfQ09ERV9W T0lEKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICB7DQorICAgCQkgICAgICAgICBmcHV0c19m aWx0ZXJlZCAoIiA6ICIsIHN0cmVhbSk7DQorIAkJICAgICAgICAgdHlwZV9wcmludCAoVFlQRV9U QVJHRVRfVFlQRSAoVFlQRV9GTl9GSUVMRF9UWVBFIChmLCBqKSksDQorIAkJCQkgICIiLCBzdHJl YW0sIC0xKTsNCisgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KKyAJCSAgaWYgKFRZUEVfRk5f RklFTERfVklSVFVBTF9QIChmLCBqKSkNCisgCQkgICAgZnByaW50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CiEgICAg ICBzdHJ1Y3QgZG9zX3R0eXN0YXRlICpwb3J0Ow0KISB7DQohICAgICBpZiAocG9ydC0+Y291bnQg Pj0gQ0JTSVpFIC0gMSkNCiEgCXJldHVybiAtMTsNCiEgICAgIHBvcnQtPmNidWZbKHBvcnQtPmZp cnN0ICsgcG9ydC0+Y291bnQpICYgKENCU0laRSAtIDEpXSA9IGM7DQohICAgICBwb3J0LT5jb3Vu dCsrOw0KISAgICAgcmV0dXJuIDA7DQohIH0NCiEgDQohIAwNCiEgDQohIHN0YXRpYyB2b2lkDQoh IGRvc19jb21pc3IgKGlycSkNCiEgICAgICBpbnQgaXJxOw0KISB7DQohICAgc3RydWN0IGRvc190 dHlzdGF0ZSAqcG9ydDsNCiEgICB1bnNpZ25lZCBjaGFyIGlpciwgbHNyLCBjOw0KISANCiEgICBk aXNhYmxlICgpOwkJCS8qIFBhcmFub2lhICovDQohICAgb3V0cG9ydGIgKElDVV9PQ1cyLCAweDIw KTsJLyogRW5kLU9mLUludGVycnVwdCAqLw0KISAjaWZkZWYgRE9TX1NUQVRTDQohICAgKytpbnRy Y250Ow0KISAjZW5kaWYNCiEgDQohICAgcG9ydCA9IGludHJ1cHRzW2lycV0ucG9ydDsNCiEgICBp ZiAoIXBvcnQpIA0KISAgICAgew0KISAgICAgICBDT1VOVCAoQ05UX1NUUkFZKTsNCiEgICAgICAg cmV0dXJuOwkJLyogbm90IG9wZW4gKi8NCiEgICAgIH0NCiEgDQohICAgd2hpbGUgKDEpDQohICAg ICB7DQohICAgICAgIGlpciA9IGluYiAocG9ydCwgY29tX2lpcikgJiBJSVJfSU1BU0s7DQohICAg ICAgIHN3aXRjaCAoaWlyKSANCiEgCXsNCiEgCSAgDQohIAljYXNlIElJUl9STFM6DQohIAkgIGxz ciA9IGluYiAocG9ydCwgY29tX2xzcik7DQohIAkgIGdvdG8gcng7DQohIAkgIA0KISAJY2FzZSBJ SVJfUlhUT1VUOg0KISAJY2FzZSBJSVJfUlhSRFk6DQoh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W5leHBlY3RlZCBpbnRlcnJ1cHQsIGlnbm9yZSAqLw0KISAJICBicmVhazsNCiEg CX0NCiEgICAgICAgQ09VTlQgKGlpcik7DQohICAgICB9IA0KISB9DQohIA0KISAjaWZkZWYgX19T VERDX18NCiEgI2RlZmluZSBJU1JOQU1FKHgpIGRvc19jb21pc3IjI3gNCiEgI2Vsc2UNCiEgI2Rl ZmluZSBJU1JOQU1FKHgpIGRvc19jb21pc3IvKioveA0KISAjZW5kaWYNCiEgI2RlZmluZSBJU1Io eCkgc3RhdGljIHZvaWQgSVNSTkFNRSh4KSgpIHtkb3NfY29taXNyKHgpO30NCiEgDQohIElTUigw KSBJU1IoMSkgSVNSKDIpIElTUigzKQ0KISBJU1IoNCkgSVNSKDUpIElTUig2KSBJU1IoNykNCiEg DQohIHR5cGVkZWYgdm9pZCAoKmlzcl90KSgpOw0KISANCiEgc3RhdGljIGlzcl90IGlzcnNbTklO VFJdID0gew0KISAgIElTUk5BTUUoMCksIElTUk5BTUUoMSksIElTUk5BTUUoMiksIElTUk5BTUUo MyksDQohICAgSVNSTkFNRSg0KSwgSVNSTkFNRSg1KSwgSVNSTkFNRSg2KSwgSVNSTkFNRSg3KQ0K ISB9Ow0KISANCiEgDA0KISANCiEgc3RhdGljIHN0cnVjdCBpbnRydXB0ICoNCiEgZG9zX2hvb2tp cnEgKGlycSkNCiEgICAgICB1bnNpZ25lZCBpbnQgaXJxOw0KISB7DQohICAgc3RydWN0IGludHJ1 cHQgKmludHI7DQohICAgdW5zaWduZWQgaW50IHZlYzsNCiEgICBpc3JfdCBpc3I7DQohIA0KISAg IGlmIChpcnEgPj0gTklOVFIpDQohICAgICByZXR1cm4gMDsNCiEgDQohICAgaW50ciA9ICZpbnRy dXB0c1tpcnFdOw0KISAgIGlmIChpbnRyLT5pbnVzZSkNCiEgICAgIHJldHVybiAwOw0KISAgIA0K ISAgIHZlYyA9IDB4MDggKyBpcnE7DQohICAgaXNyID0gaXNyc1tpcnFdOw0KISANCiEgIC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ICAgfQ0KISAgICAgZW5hYmxlICgp Ow0KISANCiEgICAgIHJldHVybiAwOw0KISB9DQohIA0KISBzdGF0aWMgaW50DQohIGRvc193cml0 ZSAoc2NiLCBzdHIsIGxlbikNCiEgICAgICBzZXJpYWxfdCBzY2I7DQohICAgICAgY29uc3QgY2hh ciAqc3RyOw0KISAgICAgIGludCBsZW47DQohIHsNCiEgICB2b2xhdGlsZSBzdHJ1Y3QgZG9zX3R0 eXN0YXRlICpwb3J0ID0gJnBvcnRzW3NjYi0+ZmRdOw0KISAgIGludCBmaWZvc2l6ZSA9IHBvcnQt PmZpZm8gPyAxNiA6IDE7DQohICAgbG9uZyB0aGVuOw0KISAgIGludCBjbnQ7DQohIA0KISAgICB3 aGlsZSAobGVuID4gMCkgDQohICAgICAgew0KISAJLyogc2VuZCB0aGUgZGF0YSwgZmlmb3NpemUg Ynl0ZXMgYXQgYSB0aW1lICovDQohIAljbnQgPSBmaWZvc2l6ZSA+IGxlbiA/IGxlbiA6IGZpZm9z aXplOw0KISAJcG9ydC0+dHhidXN5ID0gMTsNCiEgCW91dHBvcnRzYiAocG9ydC0+YmFzZSArIGNv bV9kYXRhLCBzdHIsIGNudCk7DQohIAlzdHIgKz0gY250Ow0KISAJbGVuIC09IGNudDsNCiEgI2lm ZGVmIERPU19TVEFUUw0KISAJY250c1tDTlRfVFhdICs9IGNudDsNCiEgI2VuZGlmDQohIAkvKiB3 YWl0IGZvciB0cmFuc21pc3Npb24gdG8gY29tcGxldGUgKG1heCAxIHNlYykgKi8NCiEgCXRoZW4g PSByYXdjbG9jaygpICsgUkFXSFo7DQohIAl3aGlsZSAocG9ydC0+dHhidXN5KQ0KISAJICB7DQoh IAkgICAgaWYgKChyYXdjbG9jayAoKSAtIHRoZW4pID49IDApDQohIAkgICAgICB7DQohIAkJICBl cnJubyA9IEVJTzsNCiEgCQkgIHJldHVybiBTRVJJQUxfRVJST1I7DQohIAkgICAgICB9DQohIAkg IH0NCiEgICAgIH0NCiEgICByZXR1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ZSAoYnVpbHRpbl90eXBl X3ZvaWQpIDogYnVpbHRpbl90eXBlX2ludCkNCisgDQorICNlbmRpZiAvKiBub3QgVVNFX0ZQVSAq Lw0KICANCiAgLyogU3RvcmUgdGhlIGFkZHJlc3Mgb2YgdGhlIHBsYWNlIGluIHdoaWNoIHRvIGNv cHkgdGhlIHN0cnVjdHVyZSB0aGUNCiAgICAgc3Vicm91dGluZSB3aWxsIHJldHVybi4gIFRoaXMg aXMgY2FsbGVkIGZyb20gY2FsbF9mdW5jdGlvbi4gKi8NCkluZGV4OiBnZGIvY29uZmlnL2kzODYv eG0tZ28zMi5oDQpkaWZmIC1jIGdkYi9jb25maWcvaTM4Ni94bS1nbzMyLmg6MS4xLjEuMSBnZGIv Y29uZmlnL2kzODYveG0tZ28zMi5oOjEuMg0KKioqIGdkYi9jb25maWcvaTM4Ni94bS1nbzMyLmg6 MS4xLjEuMQlGcmkgRGVjIDA0IDEwOjUxOjA4IDE5OTgNCi0tLSBnZGIvY29uZmlnL2kzODYveG0t Z28zMi5oCVdlZCBEZWMgMjMgMTY6NTM6MDggMTk5OA0KKioqKioqKioqKioqKioqDQoqKiogMjEs MjcgKioqKg0KICAjaW5jbHVkZSAiZm9wZW4tYmluLmgiDQogIA0KICAvKiBEZWZpbmUgdGhpcyBs c2VlayhuKSAhPSBudGggYnl0ZSBvZiBmaWxlICovDQohICNkZWZpbmUgTFNFRUtfTk9UX0xJTkVB Ug0KICANCiAgI2RlZmluZSBDQU5UX0ZPUksNCiAgDQotLS0gMjEsMjcgLS0tLQ0KICAjaW5jbHVk ZSAiZm9wZW4tYmluLmgiDQogIA0KICAvKiBEZWZpbmUgdGhpcyBsc2VlayhuKSAhPSBudGggYnl0 ZSBvZiBmaWxlICovDQohIC8qICNkZWZpbmUgTFNFRUtfTk9UX0xJTkVBUiBub3QgYW55bW9yZSAq Lw0KICANCiAgI2RlZmluZSBDQU5UX0ZPUksNCiAgDQo= --=====================_914426891==_ Content-Type: text/plain; charset="us-ascii" |\ Pierre Muller |/ Institut Charles Sadron 6, rue Boussingault |\ F 67083 STRASBOURG CEDEX |/ Phone : (33)(0)3-88-41-40-07 Fax : (33)(0)3-88-41-40-99 |\ e-mail : muller AT ics DOT u-strasbg DOT fr --=====================_914426891==_--