index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
25,700
utf8rchr
xtate/src/util-data/../util-data/utf8.h
utf8_constexpr14_impl utf8_int8_t *utf8rchr(const utf8_int8_t *src, int chr) { utf8_int8_t *match = utf8_null; utf8_int8_t c[5] = {'\0', '\0', '\0', '\0', '\0'}; if (0 == chr) { /* being asked to return position of null terminating byte, so * just run s to the end, and return! */ while ('\0' != *src) { src++; } return (utf8_int8_t *)src; } else if (0 == ((int)0xffffff80 & chr)) { /* 1-byte/7-bit ascii * (0b0xxxxxxx) */ c[0] = (utf8_int8_t)chr; } else if (0 == ((int)0xfffff800 & chr)) { /* 2-byte/11-bit utf8 code point * (0b110xxxxx 0b10xxxxxx) */ c[0] = (utf8_int8_t)(0xc0 | (utf8_int8_t)(chr >> 6)); c[1] = (utf8_int8_t)(0x80 | (utf8_int8_t)(chr & 0x3f)); } else if (0 == ((int)0xffff0000 & chr)) { /* 3-byte/16-bit utf8 code point * (0b1110xxxx 0b10xxxxxx 0b10xxxxxx) */ c[0] = (utf8_int8_t)(0xe0 | (utf8_int8_t)(chr >> 12)); c[1] = (utf8_int8_t)(0x80 | (utf8_int8_t)((chr >> 6) & 0x3f)); c[2] = (utf8_int8_t)(0x80 | (utf8_int8_t)(chr & 0x3f)); } else { /* if (0 == ((int)0xffe00000 & chr)) { */ /* 4-byte/21-bit utf8 code point * (0b11110xxx 0b10xxxxxx 0b10xxxxxx 0b10xxxxxx) */ c[0] = (utf8_int8_t)(0xf0 | (utf8_int8_t)(chr >> 18)); c[1] = (utf8_int8_t)(0x80 | (utf8_int8_t)((chr >> 12) & 0x3f)); c[2] = (utf8_int8_t)(0x80 | (utf8_int8_t)((chr >> 6) & 0x3f)); c[3] = (utf8_int8_t)(0x80 | (utf8_int8_t)(chr & 0x3f)); } /* we've created a 2 utf8 codepoint string in c that is * the utf8 character asked for by chr, and a null * terminating byte */ while ('\0' != *src) { size_t offset = 0; while ((src[offset] == c[offset]) && ('\0' != src[offset])) { offset++; } if ('\0' == c[offset]) { /* we found a matching utf8 code point */ match = (utf8_int8_t *)src; src += offset; if ('\0' == *src) { break; } } else { src += offset; /* need to march s along to next utf8 codepoint start * (the next byte that doesn't match 0b10xxxxxx) */ if ('\0' != *src) { do { src++; } while (0x80 == (0xc0 & *src)); } } } /* return the last match we found (or 0 if no match was found) */ return match; }
O3
c
utf8rchr: movb $0x0, -0x4(%rsp) movl $0x0, -0x8(%rsp) testl %esi, %esi je 0x4e671 cmpl $0x7f, %esi ja 0x4e682 movb %sil, -0x8(%rsp) jmp 0x4e701 decq %rdi leaq 0x1(%rdi), %rax cmpb $0x0, 0x1(%rdi) movq %rax, %rdi jne 0x4e674 retq movl %esi, %eax cmpl $0x7ff, %esi # imm = 0x7FF ja 0x4e6a4 shrl $0x6, %eax orb $-0x40, %al movb %al, -0x8(%rsp) andb $0x3f, %sil orb $-0x80, %sil movb %sil, -0x7(%rsp) jmp 0x4e701 cmpl $0xffff, %esi # imm = 0xFFFF ja 0x4e6d1 shrl $0xc, %eax orb $-0x20, %al movb %al, -0x8(%rsp) movl %esi, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movb %al, -0x7(%rsp) andb $0x3f, %sil orb $-0x80, %sil movb %sil, -0x6(%rsp) jmp 0x4e701 shrl $0x12, %eax orb $-0x10, %al movb %al, -0x8(%rsp) movl %esi, %eax shrl $0xc, %eax andb $0x3f, %al orb $-0x80, %al movb %al, -0x7(%rsp) movl %esi, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movb %al, -0x6(%rsp) andb $0x3f, %sil orb $-0x80, %sil movb %sil, -0x5(%rsp) cmpb $0x0, (%rdi) je 0x4e765 xorl %ecx, %ecx leaq -0x8(%rsp), %rdx movq %rdi, %rax leaq -0x1(%rax), %rdi movq %rdx, %r8 movb 0x1(%rdi), %sil incq %rdi movb (%r8), %r9b testb %sil, %sil je 0x4e72e incq %r8 cmpb %r9b, %sil je 0x4e717 testb %r9b, %r9b je 0x4e754 testb %sil, %sil je 0x4e761 movq %rdi, %rax movb 0x1(%rax), %sil incq %rax movl %esi, %edi andb $-0x40, %dil negb %dil jo 0x4e73b testb %sil, %sil jne 0x4e710 jmp 0x4e761 movq %rax, %rcx testb %sil, %sil jne 0x4e70d jmp 0x4e681 movq %rcx, %rax retq xorl %eax, %eax retq
utf8rchr: mov [rsp+var_4], 0 mov [rsp+var_8], 0 test esi, esi jz short loc_4E671 cmp esi, 7Fh ja short loc_4E682 mov byte ptr [rsp+var_8], sil jmp loc_4E701 loc_4E671: dec rdi loc_4E674: lea rax, [rdi+1] cmp byte ptr [rdi+1], 0 mov rdi, rax jnz short loc_4E674 locret_4E681: retn loc_4E682: mov eax, esi cmp esi, 7FFh ja short loc_4E6A4 shr eax, 6 or al, 0C0h mov byte ptr [rsp+var_8], al and sil, 3Fh or sil, 80h mov byte ptr [rsp+var_8+1], sil jmp short loc_4E701 loc_4E6A4: cmp esi, 0FFFFh ja short loc_4E6D1 shr eax, 0Ch or al, 0E0h mov byte ptr [rsp+var_8], al mov eax, esi shr eax, 6 and al, 3Fh or al, 80h mov byte ptr [rsp+var_8+1], al and sil, 3Fh or sil, 80h mov byte ptr [rsp+var_8+2], sil jmp short loc_4E701 loc_4E6D1: shr eax, 12h or al, 0F0h mov byte ptr [rsp+var_8], al mov eax, esi shr eax, 0Ch and al, 3Fh or al, 80h mov byte ptr [rsp+var_8+1], al mov eax, esi shr eax, 6 and al, 3Fh or al, 80h mov byte ptr [rsp+var_8+2], al and sil, 3Fh or sil, 80h mov byte ptr [rsp+var_8+3], sil loc_4E701: cmp byte ptr [rdi], 0 jz short loc_4E765 xor ecx, ecx lea rdx, [rsp+var_8] loc_4E70D: mov rax, rdi loc_4E710: lea rdi, [rax-1] mov r8, rdx loc_4E717: mov sil, [rdi+1] inc rdi mov r9b, [r8] test sil, sil jz short loc_4E72E inc r8 cmp sil, r9b jz short loc_4E717 loc_4E72E: test r9b, r9b jz short loc_4E754 test sil, sil jz short loc_4E761 mov rax, rdi loc_4E73B: mov sil, [rax+1] inc rax mov edi, esi and dil, 0C0h neg dil jo short loc_4E73B test sil, sil jnz short loc_4E710 jmp short loc_4E761 loc_4E754: mov rcx, rax test sil, sil jnz short loc_4E70D jmp locret_4E681 loc_4E761: mov rax, rcx retn loc_4E765: xor eax, eax retn
_BYTE * utf8rchr(_BYTE *a1, unsigned int a2) { _BYTE *v2; // rdi _BYTE *result; // rax _BYTE *v5; // rcx char *v6; // r8 char v7; // si char v8; // r9 char v9; // si int v10; // [rsp+0h] [rbp-8h] BYREF char v11; // [rsp+4h] [rbp-4h] v11 = 0; v10 = 0; if ( a2 ) { if ( a2 > 0x7F ) { if ( a2 > 0x7FF ) { if ( a2 > 0xFFFF ) { LOBYTE(v10) = (a2 >> 18) | 0xF0; BYTE1(v10) = (a2 >> 12) & 0x3F | 0x80; BYTE2(v10) = (a2 >> 6) & 0x3F | 0x80; HIBYTE(v10) = a2 & 0x3F | 0x80; } else { LOBYTE(v10) = (a2 >> 12) | 0xE0; BYTE1(v10) = (a2 >> 6) & 0x3F | 0x80; BYTE2(v10) = a2 & 0x3F | 0x80; } } else { LOBYTE(v10) = (a2 >> 6) | 0xC0; BYTE1(v10) = a2 & 0x3F | 0x80; } } else { LOBYTE(v10) = a2; } if ( *a1 ) { v5 = 0LL; while ( 2 ) { result = a1; while ( 1 ) { a1 = result - 1; v6 = (char *)&v10; do { v7 = *++a1; v8 = *v6; if ( !v7 ) break; ++v6; } while ( v7 == v8 ); if ( !v8 ) break; if ( v7 ) { result = a1; do v9 = *++result; while ( __OFSUB__(-(v9 & 0xC0), 1) ); if ( v9 ) continue; } return v5; } v5 = result; if ( v7 ) continue; break; } } else { return 0LL; } } else { v2 = a1 - 1; do result = v2 + 1; while ( *++v2 != 0 ); } return result; }
utf8rchr: MOV byte ptr [RSP + -0x4],0x0 MOV dword ptr [RSP + -0x8],0x0 TEST ESI,ESI JZ 0x0014e671 CMP ESI,0x7f JA 0x0014e682 MOV byte ptr [RSP + -0x8],SIL JMP 0x0014e701 LAB_0014e671: DEC RDI LAB_0014e674: LEA RAX,[RDI + 0x1] CMP byte ptr [RDI + 0x1],0x0 MOV RDI,RAX JNZ 0x0014e674 LAB_0014e681: RET LAB_0014e682: MOV EAX,ESI CMP ESI,0x7ff JA 0x0014e6a4 SHR EAX,0x6 OR AL,0xc0 MOV byte ptr [RSP + -0x8],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RSP + -0x7],SIL JMP 0x0014e701 LAB_0014e6a4: CMP ESI,0xffff JA 0x0014e6d1 SHR EAX,0xc OR AL,0xe0 MOV byte ptr [RSP + -0x8],AL MOV EAX,ESI SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOV byte ptr [RSP + -0x7],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RSP + -0x6],SIL JMP 0x0014e701 LAB_0014e6d1: SHR EAX,0x12 OR AL,0xf0 MOV byte ptr [RSP + -0x8],AL MOV EAX,ESI SHR EAX,0xc AND AL,0x3f OR AL,0x80 MOV byte ptr [RSP + -0x7],AL MOV EAX,ESI SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOV byte ptr [RSP + -0x6],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RSP + -0x5],SIL LAB_0014e701: CMP byte ptr [RDI],0x0 JZ 0x0014e765 XOR ECX,ECX LEA RDX,[RSP + -0x8] LAB_0014e70d: MOV RAX,RDI LAB_0014e710: LEA RDI,[RAX + -0x1] MOV R8,RDX LAB_0014e717: MOV SIL,byte ptr [RDI + 0x1] INC RDI MOV R9B,byte ptr [R8] TEST SIL,SIL JZ 0x0014e72e INC R8 CMP SIL,R9B JZ 0x0014e717 LAB_0014e72e: TEST R9B,R9B JZ 0x0014e754 TEST SIL,SIL JZ 0x0014e761 MOV RAX,RDI LAB_0014e73b: MOV SIL,byte ptr [RAX + 0x1] INC RAX MOV EDI,ESI AND DIL,0xc0 NEG DIL JO 0x0014e73b TEST SIL,SIL JNZ 0x0014e710 JMP 0x0014e761 LAB_0014e754: MOV RCX,RAX TEST SIL,SIL JNZ 0x0014e70d JMP 0x0014e681 LAB_0014e761: MOV RAX,RCX RET LAB_0014e765: XOR EAX,EAX RET
char * utf8rchr(char *param_1,uint param_2) { char *pcVar1; char cVar2; uint uVar3; char *pcVar4; int1 uVar5; char *pcVar6; char *pcVar7; uint *puVar8; uint local_8; int1 local_4; local_4 = 0; if (param_2 == 0) { pcVar6 = param_1 + -1; do { pcVar4 = pcVar6 + 1; pcVar1 = pcVar6 + 1; pcVar6 = pcVar4; } while (*pcVar1 != '\0'); } else { uVar5 = (int1)param_2; if (param_2 < 0x80) { local_8 = param_2 & 0xff; } else if (param_2 < 0x800) { local_8 = (ushort)(CONCAT11(uVar5,(char)(param_2 >> 6)) | 0xc0) & 0xffff3fff | 0x8000; } else if (param_2 < 0x10000) { local_8 = (CONCAT12(uVar5,CONCAT11((char)(param_2 >> 6),(char)(param_2 >> 0xc))) & 0xff3fff | 0x80e0) & 0xff3fffff | 0x800000; } else { local_8 = CONCAT13(uVar5,CONCAT12((char)(param_2 >> 6), CONCAT11((char)(param_2 >> 0xc),(char)(param_2 >> 0x12)))) & 0x3f3f3fff | 0x808080f0; } if (*param_1 == '\0') { return (char *)0x0; } pcVar6 = (char *)0x0; LAB_0014e710: do { pcVar4 = param_1; pcVar1 = pcVar4 + -1; puVar8 = &local_8; do { pcVar7 = pcVar1; cVar2 = pcVar7[1]; uVar3 = *puVar8; if (cVar2 == '\0') break; puVar8 = (uint *)((long)puVar8 + 1); pcVar1 = pcVar7 + 1; } while (cVar2 == (char)uVar3); if ((char)uVar3 != '\0') { if ((cVar2 == '\0') || (param_1 = pcVar7 + 2, pcVar7[2] == '\0')) { return pcVar6; } goto LAB_0014e710; } param_1 = pcVar7 + 1; pcVar6 = pcVar4; } while (cVar2 != '\0'); } return pcVar4; }
25,701
fn_format
eloqsql/mysys/mf_format.c
char * fn_format(char * to, const char *name, const char *dir, const char *extension, uint flag) { char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; const char *ext; reg1 size_t length; size_t dev_length; DBUG_ENTER("fn_format"); DBUG_ASSERT(name != NULL); DBUG_ASSERT(extension != NULL); DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d", name,dir,extension,flag)); /* Copy and skip directory */ name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length)); if (length == 0 || (flag & MY_REPLACE_DIR)) { /* Use given directory */ convert_dirname(dev,dir,NullS); /* Fix to this OS */ } else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev)) { /* Put 'dir' before the given path */ strmake_buf(buff, dev); pos=convert_dirname(dev,dir,NullS); strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev)); } if (flag & MY_PACK_FILENAME) pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ if (flag & MY_UNPACK_FILENAME) (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ if (!(flag & MY_APPEND_EXT) && (pos= (char*) strchr(name,FN_EXTCHAR)) != NullS) { if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */ { length=strlength(name); /* Use old extension */ ext = ""; } else { length= (size_t) (pos-(char*) name); /* Change extension */ ext= extension; } } else { length=strlength(name); /* No ext, use the now one */ ext=extension; } if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) { /* To long path, return original or NULL */ size_t tmp_length; if (flag & MY_SAFE_PATH) DBUG_RETURN(NullS); tmp_length= strlength(startpos); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext, (uint) length)); (void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1)); } else { if (to == startpos) { bmove(buff,(uchar*) name,length); /* Save name for last copy */ name=buff; } pos=strmake(strmov(to,dev),name,length); (void) strmov(pos,ext); /* Don't convert extension */ } if (flag & MY_RETURN_REAL_PATH) (void) my_realpath(to, to, MYF(0)); else if (flag & MY_RESOLVE_SYMLINKS) { strmov(buff,to); (void) my_readlink(to, buff, MYF(0)); } DBUG_RETURN(to); }
O0
c
fn_format: pushq %rbp movq %rsp, %rbp subq $0x6a0, %rsp # imm = 0x6A0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x620(%rbp) movq %rsi, -0x628(%rbp) movq %rdx, -0x630(%rbp) movq %rcx, -0x638(%rbp) movl %r8d, -0x63c(%rbp) jmp 0xe0b7d jmp 0xe0b7f jmp 0xe0b81 jmp 0xe0b83 jmp 0xe0b85 leaq -0x210(%rbp), %rdi movq -0x628(%rbp), %rsi movq %rsi, -0x650(%rbp) leaq -0x668(%rbp), %rdx callq 0xe0a20 movq %rax, -0x660(%rbp) addq -0x628(%rbp), %rax movq %rax, -0x628(%rbp) cmpq $0x0, -0x660(%rbp) je 0xe0bd3 movl -0x63c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xe0bef leaq -0x210(%rbp), %rdi movq -0x630(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xe0a80 jmp 0xe0c9f movl -0x63c(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xe0c9d leaq -0x210(%rbp), %rdi callq 0xf1760 cmpl $0x0, %eax jne 0xe0c9d leaq -0x610(%rbp), %rdi xorl %esi, %esi movl $0x200, %edx # imm = 0x200 callq 0x2a2c0 movb $0x2, -0x610(%rbp) leaq -0x410(%rbp), %rdi leaq -0x210(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x14f1e0 movq %rax, -0x670(%rbp) leaq -0x210(%rbp), %rdi movq -0x630(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xe0a80 movq %rax, -0x648(%rbp) movq -0x648(%rbp), %rdi leaq -0x410(%rbp), %rsi movq -0x648(%rbp), %rax leaq -0x210(%rbp), %rcx subq %rcx, %rax cltq movl $0x1ff, %edx # imm = 0x1FF subq %rax, %rdx callq 0x14f1e0 jmp 0xe0c9f movl -0x63c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xe0cc0 leaq -0x210(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0xe9ca0 movl -0x63c(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0xe0ce1 leaq -0x210(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0xea720 movl -0x63c(%rbp), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0xe0d68 movq -0x628(%rbp), %rdi movl $0x2e, %esi callq 0x2a410 movq %rax, -0x648(%rbp) cmpq $0x0, %rax je 0xe0d68 movl -0x63c(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0xe0d40 movq -0x628(%rbp), %rdi callq 0xe0f90 movq %rax, -0x660(%rbp) leaq 0x78256(%rip), %rax # 0x158f8d movq %rax, -0x658(%rbp) jmp 0xe0d66 movq -0x648(%rbp), %rax movq -0x628(%rbp), %rcx subq %rcx, %rax movq %rax, -0x660(%rbp) movq -0x638(%rbp), %rax movq %rax, -0x658(%rbp) jmp 0xe0d89 movq -0x628(%rbp), %rdi callq 0xe0f90 movq %rax, -0x660(%rbp) movq -0x638(%rbp), %rax movq %rax, -0x658(%rbp) leaq -0x210(%rbp), %rdi callq 0x2a350 addq -0x660(%rbp), %rax movq %rax, -0x680(%rbp) movq -0x658(%rbp), %rdi callq 0x2a350 movq %rax, %rcx movq -0x680(%rbp), %rax addq %rcx, %rax cmpq $0x200, %rax # imm = 0x200 jae 0xe0dd5 cmpq $0x100, -0x660(%rbp) # imm = 0x100 jb 0xe0e6d movl -0x63c(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0xe0df5 jmp 0xe0de5 movq $0x0, -0x618(%rbp) jmp 0xe0f59 movq -0x650(%rbp), %rdi callq 0xe0f90 movq %rax, -0x678(%rbp) jmp 0xe0e0a movq -0x620(%rbp), %rax movq %rax, -0x690(%rbp) movq -0x650(%rbp), %rax movq %rax, -0x688(%rbp) cmpq $0x1ff, -0x678(%rbp) # imm = 0x1FF jae 0xe0e43 movq -0x678(%rbp), %rax movq %rax, -0x698(%rbp) jmp 0xe0e51 movl $0x1ff, %eax # imm = 0x1FF movq %rax, -0x698(%rbp) jmp 0xe0e51 movq -0x688(%rbp), %rsi movq -0x690(%rbp), %rdi movq -0x698(%rbp), %rdx callq 0x14f1e0 jmp 0xe0ee8 movq -0x620(%rbp), %rax cmpq -0x650(%rbp), %rax jne 0xe0ea5 leaq -0x410(%rbp), %rdi movq -0x628(%rbp), %rsi movq -0x660(%rbp), %rdx callq 0x2a130 leaq -0x410(%rbp), %rax movq %rax, -0x628(%rbp) movq -0x620(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x2a730 movq %rax, %rdi movq -0x628(%rbp), %rsi movq -0x660(%rbp), %rdx callq 0x14f1e0 movq %rax, -0x648(%rbp) movq -0x648(%rbp), %rdi movq -0x658(%rbp), %rsi callq 0x2a730 movl -0x63c(%rbp), %eax andl $0x20, %eax cmpl $0x0, %eax je 0xe0f0f movq -0x620(%rbp), %rdi movq -0x620(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xf6400 jmp 0xe0f49 movl -0x63c(%rbp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xe0f47 leaq -0x410(%rbp), %rdi movq -0x620(%rbp), %rsi callq 0x2a730 movq -0x620(%rbp), %rdi leaq -0x410(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xf6200 jmp 0xe0f49 jmp 0xe0f4b movq -0x620(%rbp), %rax movq %rax, -0x618(%rbp) movq -0x618(%rbp), %rax movq %rax, -0x6a0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xe0f89 movq -0x6a0(%rbp), %rax addq $0x6a0, %rsp # imm = 0x6A0 popq %rbp retq callq 0x2a270 nop
fn_format: push rbp mov rbp, rsp sub rsp, 6A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_620], rdi mov [rbp+var_628], rsi mov [rbp+var_630], rdx mov [rbp+var_638], rcx mov [rbp+var_63C], r8d jmp short $+2 loc_E0B7D: jmp short $+2 loc_E0B7F: jmp short $+2 loc_E0B81: jmp short $+2 loc_E0B83: jmp short $+2 loc_E0B85: lea rdi, [rbp+var_210] mov rsi, [rbp+var_628] mov [rbp+var_650], rsi lea rdx, [rbp+var_668] call dirname_part mov [rbp+var_660], rax add rax, [rbp+var_628] mov [rbp+var_628], rax cmp [rbp+var_660], 0 jz short loc_E0BD3 mov eax, [rbp+var_63C] and eax, 1 cmp eax, 0 jz short loc_E0BEF loc_E0BD3: lea rdi, [rbp+var_210] mov rsi, [rbp+var_630] xor eax, eax mov edx, eax call convert_dirname jmp loc_E0C9F loc_E0BEF: mov eax, [rbp+var_63C] and eax, 80h cmp eax, 0 jz loc_E0C9D lea rdi, [rbp+var_210] call test_if_hard_path cmp eax, 0 jnz loc_E0C9D lea rdi, [rbp+var_610] xor esi, esi mov edx, 200h call _memset mov [rbp+var_610], 2 lea rdi, [rbp+var_410] lea rsi, [rbp+var_210] mov edx, 1FFh call strmake mov [rbp+var_670], rax lea rdi, [rbp+var_210] mov rsi, [rbp+var_630] xor eax, eax mov edx, eax call convert_dirname mov [rbp+var_648], rax mov rdi, [rbp+var_648] lea rsi, [rbp+var_410] mov rax, [rbp+var_648] lea rcx, [rbp+var_210] sub rax, rcx cdqe mov edx, 1FFh sub rdx, rax call strmake loc_E0C9D: jmp short $+2 loc_E0C9F: mov eax, [rbp+var_63C] and eax, 8 cmp eax, 0 jz short loc_E0CC0 lea rdi, [rbp+var_210] lea rsi, [rbp+var_210] call pack_dirname loc_E0CC0: mov eax, [rbp+var_63C] and eax, 4 cmp eax, 0 jz short loc_E0CE1 lea rdi, [rbp+var_210] lea rsi, [rbp+var_210] call unpack_dirname loc_E0CE1: mov eax, [rbp+var_63C] and eax, 100h cmp eax, 0 jnz short loc_E0D68 mov rdi, [rbp+var_628] mov esi, 2Eh ; '.' call _strchr mov [rbp+var_648], rax cmp rax, 0 jz short loc_E0D68 mov eax, [rbp+var_63C] and eax, 2 cmp eax, 0 jnz short loc_E0D40 mov rdi, [rbp+var_628] call strlength mov [rbp+var_660], rax lea rax, asc_158F89+4; "" mov [rbp+var_658], rax jmp short loc_E0D66 loc_E0D40: mov rax, [rbp+var_648] mov rcx, [rbp+var_628] sub rax, rcx mov [rbp+var_660], rax mov rax, [rbp+var_638] mov [rbp+var_658], rax loc_E0D66: jmp short loc_E0D89 loc_E0D68: mov rdi, [rbp+var_628] call strlength mov [rbp+var_660], rax mov rax, [rbp+var_638] mov [rbp+var_658], rax loc_E0D89: lea rdi, [rbp+var_210] call _strlen add rax, [rbp+var_660] mov [rbp+var_680], rax mov rdi, [rbp+var_658] call _strlen mov rcx, rax mov rax, [rbp+var_680] add rax, rcx cmp rax, 200h jnb short loc_E0DD5 cmp [rbp+var_660], 100h jb loc_E0E6D loc_E0DD5: mov eax, [rbp+var_63C] and eax, 40h cmp eax, 0 jz short loc_E0DF5 jmp short $+2 loc_E0DE5: mov [rbp+var_618], 0 jmp loc_E0F59 loc_E0DF5: mov rdi, [rbp+var_650] call strlength mov [rbp+var_678], rax jmp short $+2 loc_E0E0A: mov rax, [rbp+var_620] mov [rbp+var_690], rax mov rax, [rbp+var_650] mov [rbp+var_688], rax cmp [rbp+var_678], 1FFh jnb short loc_E0E43 mov rax, [rbp+var_678] mov [rbp+var_698], rax jmp short loc_E0E51 loc_E0E43: mov eax, 1FFh mov [rbp+var_698], rax jmp short $+2 loc_E0E51: mov rsi, [rbp+var_688] mov rdi, [rbp+var_690] mov rdx, [rbp+var_698] call strmake jmp short loc_E0EE8 loc_E0E6D: mov rax, [rbp+var_620] cmp rax, [rbp+var_650] jnz short loc_E0EA5 lea rdi, [rbp+var_410] mov rsi, [rbp+var_628] mov rdx, [rbp+var_660] call _memmove lea rax, [rbp+var_410] mov [rbp+var_628], rax loc_E0EA5: mov rdi, [rbp+var_620] lea rsi, [rbp+var_210] call _stpcpy mov rdi, rax mov rsi, [rbp+var_628] mov rdx, [rbp+var_660] call strmake mov [rbp+var_648], rax mov rdi, [rbp+var_648] mov rsi, [rbp+var_658] call _stpcpy loc_E0EE8: mov eax, [rbp+var_63C] and eax, 20h cmp eax, 0 jz short loc_E0F0F mov rdi, [rbp+var_620] mov rsi, [rbp+var_620] xor eax, eax mov edx, eax call my_realpath jmp short loc_E0F49 loc_E0F0F: mov eax, [rbp+var_63C] and eax, 10h cmp eax, 0 jz short loc_E0F47 lea rdi, [rbp+var_410] mov rsi, [rbp+var_620] call _stpcpy mov rdi, [rbp+var_620] lea rsi, [rbp+var_410] xor eax, eax mov edx, eax call my_readlink loc_E0F47: jmp short $+2 loc_E0F49: jmp short $+2 loc_E0F4B: mov rax, [rbp+var_620] mov [rbp+var_618], rax loc_E0F59: mov rax, [rbp+var_618] mov [rbp+var_6A0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_E0F89 mov rax, [rbp+var_6A0] add rsp, 6A0h pop rbp retn loc_E0F89: call ___stack_chk_fail
_BYTE * fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, int a5) { long long v5; // rax long long v6; // rax unsigned long long v8; // [rsp+20h] [rbp-680h] unsigned long long v9; // [rsp+28h] [rbp-678h] long long v10; // [rsp+38h] [rbp-668h] BYREF unsigned long long v11; // [rsp+40h] [rbp-660h] char *v12; // [rsp+48h] [rbp-658h] _BYTE *v13; // [rsp+50h] [rbp-650h] _BYTE *v14; // [rsp+58h] [rbp-648h] int v15; // [rsp+64h] [rbp-63Ch] char *v16; // [rsp+68h] [rbp-638h] long long v17; // [rsp+70h] [rbp-630h] _BYTE *v18; // [rsp+78h] [rbp-628h] _BYTE *v19; // [rsp+80h] [rbp-620h] char v21[512]; // [rsp+90h] [rbp-610h] BYREF _BYTE v22[512]; // [rsp+290h] [rbp-410h] BYREF _BYTE v23[520]; // [rsp+490h] [rbp-210h] BYREF unsigned long long v24; // [rsp+698h] [rbp-8h] v24 = __readfsqword(0x28u); v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v13 = a2; v11 = dirname_part((long long)v23, a2, &v10); v18 += v11; if ( v11 && (v15 & 1) == 0 ) { if ( (v15 & 0x80) != 0 && !(unsigned int)test_if_hard_path(v23) ) { memset(v21, 0LL, sizeof(v21)); v21[0] = 2; strmake(v22, v23, 511LL); v14 = convert_dirname(v23, v17, 0LL); strmake(v14, v22, 511LL - (int)((_DWORD)v14 - (unsigned int)v23)); } } else { convert_dirname(v23, v17, 0LL); } if ( (v15 & 8) != 0 ) pack_dirname(v23, v23); if ( (v15 & 4) != 0 ) unpack_dirname(v23, v23); if ( (v15 & 0x100) != 0 || (v14 = (_BYTE *)strchr(v18, 46LL)) == 0LL ) { v11 = strlength(v18); v12 = v16; } else if ( (v15 & 2) != 0 ) { v11 = v14 - v18; v12 = v16; } else { v11 = strlength(v18); v12 = ""; } v5 = strlen(v23); v8 = v11 + v5; if ( strlen(v12) + v8 < 0x200 && v11 < 0x100 ) { if ( v19 == v13 ) { memmove(v22, v18, v11); v18 = v22; } v6 = stpcpy(v19, v23); v14 = (_BYTE *)strmake(v6, v18, v11); stpcpy(v14, v12); } else { if ( (v15 & 0x40) != 0 ) return 0LL; v9 = strlength(v13); if ( v9 >= 0x1FF ) strmake(v19, v13, 511LL); else strmake(v19, v13, v9); } if ( (v15 & 0x20) != 0 ) { my_realpath(v19, v19, 0LL); } else if ( (v15 & 0x10) != 0 ) { stpcpy(v22, v19); my_readlink(v19, v22, 0LL); } return v19; }
fn_format: PUSH RBP MOV RBP,RSP SUB RSP,0x6a0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x620],RDI MOV qword ptr [RBP + -0x628],RSI MOV qword ptr [RBP + -0x630],RDX MOV qword ptr [RBP + -0x638],RCX MOV dword ptr [RBP + -0x63c],R8D JMP 0x001e0b7d LAB_001e0b7d: JMP 0x001e0b7f LAB_001e0b7f: JMP 0x001e0b81 LAB_001e0b81: JMP 0x001e0b83 LAB_001e0b83: JMP 0x001e0b85 LAB_001e0b85: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x628] MOV qword ptr [RBP + -0x650],RSI LEA RDX,[RBP + -0x668] CALL 0x001e0a20 MOV qword ptr [RBP + -0x660],RAX ADD RAX,qword ptr [RBP + -0x628] MOV qword ptr [RBP + -0x628],RAX CMP qword ptr [RBP + -0x660],0x0 JZ 0x001e0bd3 MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001e0bef LAB_001e0bd3: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x630] XOR EAX,EAX MOV EDX,EAX CALL 0x001e0a80 JMP 0x001e0c9f LAB_001e0bef: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x80 CMP EAX,0x0 JZ 0x001e0c9d LEA RDI,[RBP + -0x210] CALL 0x001f1760 CMP EAX,0x0 JNZ 0x001e0c9d LEA RDI,[RBP + -0x610] XOR ESI,ESI MOV EDX,0x200 CALL 0x0012a2c0 MOV byte ptr [RBP + -0x610],0x2 LEA RDI,[RBP + -0x410] LEA RSI,[RBP + -0x210] MOV EDX,0x1ff CALL 0x0024f1e0 MOV qword ptr [RBP + -0x670],RAX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x630] XOR EAX,EAX MOV EDX,EAX CALL 0x001e0a80 MOV qword ptr [RBP + -0x648],RAX MOV RDI,qword ptr [RBP + -0x648] LEA RSI,[RBP + -0x410] MOV RAX,qword ptr [RBP + -0x648] LEA RCX,[RBP + -0x210] SUB RAX,RCX CDQE MOV EDX,0x1ff SUB RDX,RAX CALL 0x0024f1e0 LAB_001e0c9d: JMP 0x001e0c9f LAB_001e0c9f: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x8 CMP EAX,0x0 JZ 0x001e0cc0 LEA RDI,[RBP + -0x210] LEA RSI,[RBP + -0x210] CALL 0x001e9ca0 LAB_001e0cc0: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x4 CMP EAX,0x0 JZ 0x001e0ce1 LEA RDI,[RBP + -0x210] LEA RSI,[RBP + -0x210] CALL 0x001ea720 LAB_001e0ce1: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x100 CMP EAX,0x0 JNZ 0x001e0d68 MOV RDI,qword ptr [RBP + -0x628] MOV ESI,0x2e CALL 0x0012a410 MOV qword ptr [RBP + -0x648],RAX CMP RAX,0x0 JZ 0x001e0d68 MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x2 CMP EAX,0x0 JNZ 0x001e0d40 MOV RDI,qword ptr [RBP + -0x628] CALL 0x001e0f90 MOV qword ptr [RBP + -0x660],RAX LEA RAX,[0x258f8d] MOV qword ptr [RBP + -0x658],RAX JMP 0x001e0d66 LAB_001e0d40: MOV RAX,qword ptr [RBP + -0x648] MOV RCX,qword ptr [RBP + -0x628] SUB RAX,RCX MOV qword ptr [RBP + -0x660],RAX MOV RAX,qword ptr [RBP + -0x638] MOV qword ptr [RBP + -0x658],RAX LAB_001e0d66: JMP 0x001e0d89 LAB_001e0d68: MOV RDI,qword ptr [RBP + -0x628] CALL 0x001e0f90 MOV qword ptr [RBP + -0x660],RAX MOV RAX,qword ptr [RBP + -0x638] MOV qword ptr [RBP + -0x658],RAX LAB_001e0d89: LEA RDI,[RBP + -0x210] CALL 0x0012a350 ADD RAX,qword ptr [RBP + -0x660] MOV qword ptr [RBP + -0x680],RAX MOV RDI,qword ptr [RBP + -0x658] CALL 0x0012a350 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x680] ADD RAX,RCX CMP RAX,0x200 JNC 0x001e0dd5 CMP qword ptr [RBP + -0x660],0x100 JC 0x001e0e6d LAB_001e0dd5: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x40 CMP EAX,0x0 JZ 0x001e0df5 JMP 0x001e0de5 LAB_001e0de5: MOV qword ptr [RBP + -0x618],0x0 JMP 0x001e0f59 LAB_001e0df5: MOV RDI,qword ptr [RBP + -0x650] CALL 0x001e0f90 MOV qword ptr [RBP + -0x678],RAX JMP 0x001e0e0a LAB_001e0e0a: MOV RAX,qword ptr [RBP + -0x620] MOV qword ptr [RBP + -0x690],RAX MOV RAX,qword ptr [RBP + -0x650] MOV qword ptr [RBP + -0x688],RAX CMP qword ptr [RBP + -0x678],0x1ff JNC 0x001e0e43 MOV RAX,qword ptr [RBP + -0x678] MOV qword ptr [RBP + -0x698],RAX JMP 0x001e0e51 LAB_001e0e43: MOV EAX,0x1ff MOV qword ptr [RBP + -0x698],RAX JMP 0x001e0e51 LAB_001e0e51: MOV RSI,qword ptr [RBP + -0x688] MOV RDI,qword ptr [RBP + -0x690] MOV RDX,qword ptr [RBP + -0x698] CALL 0x0024f1e0 JMP 0x001e0ee8 LAB_001e0e6d: MOV RAX,qword ptr [RBP + -0x620] CMP RAX,qword ptr [RBP + -0x650] JNZ 0x001e0ea5 LEA RDI,[RBP + -0x410] MOV RSI,qword ptr [RBP + -0x628] MOV RDX,qword ptr [RBP + -0x660] CALL 0x0012a130 LEA RAX,[RBP + -0x410] MOV qword ptr [RBP + -0x628],RAX LAB_001e0ea5: MOV RDI,qword ptr [RBP + -0x620] LEA RSI,[RBP + -0x210] CALL 0x0012a730 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x628] MOV RDX,qword ptr [RBP + -0x660] CALL 0x0024f1e0 MOV qword ptr [RBP + -0x648],RAX MOV RDI,qword ptr [RBP + -0x648] MOV RSI,qword ptr [RBP + -0x658] CALL 0x0012a730 LAB_001e0ee8: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x20 CMP EAX,0x0 JZ 0x001e0f0f MOV RDI,qword ptr [RBP + -0x620] MOV RSI,qword ptr [RBP + -0x620] XOR EAX,EAX MOV EDX,EAX CALL 0x001f6400 JMP 0x001e0f49 LAB_001e0f0f: MOV EAX,dword ptr [RBP + -0x63c] AND EAX,0x10 CMP EAX,0x0 JZ 0x001e0f47 LEA RDI,[RBP + -0x410] MOV RSI,qword ptr [RBP + -0x620] CALL 0x0012a730 MOV RDI,qword ptr [RBP + -0x620] LEA RSI,[RBP + -0x410] XOR EAX,EAX MOV EDX,EAX CALL 0x001f6200 LAB_001e0f47: JMP 0x001e0f49 LAB_001e0f49: JMP 0x001e0f4b LAB_001e0f4b: MOV RAX,qword ptr [RBP + -0x620] MOV qword ptr [RBP + -0x618],RAX LAB_001e0f59: MOV RAX,qword ptr [RBP + -0x618] MOV qword ptr [RBP + -0x6a0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001e0f89 MOV RAX,qword ptr [RBP + -0x6a0] ADD RSP,0x6a0 POP RBP RET LAB_001e0f89: CALL 0x0012a270
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5) { int iVar1; size_t sVar2; long lVar3; char *pcVar4; long in_FS_OFFSET; ulong local_6a0; int1 local_670 [8]; ulong local_668; char *local_660; char *local_658; char *local_650; uint local_644; char *local_640; int8 local_638; char *local_630; char *local_628; char *local_620; int1 local_618 [512]; char local_418 [512]; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_658 = param_2; local_644 = param_5; local_640 = param_4; local_638 = param_3; local_630 = param_2; local_628 = param_1; local_668 = dirname_part(local_218,param_2,local_670); local_630 = local_630 + local_668; if ((local_668 == 0) || ((local_644 & 1) != 0)) { convert_dirname(local_218,local_638,0); } else if (((local_644 & 0x80) != 0) && (iVar1 = test_if_hard_path(local_218), iVar1 == 0)) { memset(local_618,0,0x200); local_618[0] = 2; strmake(local_418,local_218,0x1ff); local_650 = (char *)convert_dirname(local_218,local_638,0); strmake(local_650,local_418,0x1ff - (long)((int)local_650 - (int)local_218)); } if ((local_644 & 8) != 0) { pack_dirname(local_218,local_218); } if ((local_644 & 4) != 0) { unpack_dirname(local_218,local_218); } if (((local_644 & 0x100) == 0) && (local_650 = strchr(local_630,0x2e), local_650 != (char *)0x0)) { if ((local_644 & 2) == 0) { local_668 = strlength(local_630); local_660 = ""; } else { local_668 = (long)local_650 - (long)local_630; local_660 = local_640; } } else { local_668 = strlength(local_630); local_660 = local_640; } sVar2 = strlen(local_218); lVar3 = sVar2 + local_668; sVar2 = strlen(local_660); if ((lVar3 + sVar2 < 0x200) && (local_668 < 0x100)) { if (local_628 == local_658) { memmove(local_418,local_630,local_668); local_630 = local_418; } pcVar4 = stpcpy(local_628,local_218); local_650 = (char *)strmake(pcVar4,local_630,local_668); stpcpy(local_650,local_660); } else { if ((local_644 & 0x40) != 0) { local_620 = (char *)0x0; goto LAB_001e0f59; } local_6a0 = strlength(local_658); if (0x1fe < local_6a0) { local_6a0 = 0x1ff; } strmake(local_628,local_658,local_6a0); } if ((local_644 & 0x20) == 0) { if ((local_644 & 0x10) != 0) { stpcpy(local_418,local_628); my_readlink(local_628,local_418,0); } } else { my_realpath(local_628,local_628,0); } local_620 = local_628; LAB_001e0f59: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_620; }
25,702
fn_format
eloqsql/mysys/mf_format.c
char * fn_format(char * to, const char *name, const char *dir, const char *extension, uint flag) { char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; const char *ext; reg1 size_t length; size_t dev_length; DBUG_ENTER("fn_format"); DBUG_ASSERT(name != NULL); DBUG_ASSERT(extension != NULL); DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d", name,dir,extension,flag)); /* Copy and skip directory */ name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length)); if (length == 0 || (flag & MY_REPLACE_DIR)) { /* Use given directory */ convert_dirname(dev,dir,NullS); /* Fix to this OS */ } else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev)) { /* Put 'dir' before the given path */ strmake_buf(buff, dev); pos=convert_dirname(dev,dir,NullS); strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev)); } if (flag & MY_PACK_FILENAME) pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ if (flag & MY_UNPACK_FILENAME) (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ if (!(flag & MY_APPEND_EXT) && (pos= (char*) strchr(name,FN_EXTCHAR)) != NullS) { if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */ { length=strlength(name); /* Use old extension */ ext = ""; } else { length= (size_t) (pos-(char*) name); /* Change extension */ ext= extension; } } else { length=strlength(name); /* No ext, use the now one */ ext=extension; } if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) { /* To long path, return original or NULL */ size_t tmp_length; if (flag & MY_SAFE_PATH) DBUG_RETURN(NullS); tmp_length= strlength(startpos); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext, (uint) length)); (void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1)); } else { if (to == startpos) { bmove(buff,(uchar*) name,length); /* Save name for last copy */ name=buff; } pos=strmake(strmov(to,dev),name,length); (void) strmov(pos,ext); /* Don't convert extension */ } if (flag & MY_RETURN_REAL_PATH) (void) my_realpath(to, to, MYF(0)); else if (flag & MY_RESOLVE_SYMLINKS) { strmov(buff,to); (void) my_readlink(to, buff, MYF(0)); } DBUG_RETURN(to); }
O3
c
fn_format: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x428, %rsp # imm = 0x428 movl %r8d, %r14d movq %rcx, -0x438(%rbp) movq %rdx, %r12 movq %rsi, %r15 movq %rdi, -0x440(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x230(%rbp), %rdi leaq -0x448(%rbp), %rdx callq 0x95855 movq %rax, %r13 testq %rax, %rax setne %al testb $0x1, %r14b sete %cl testb %al, %cl je 0x959c7 testb %r14b, %r14b jns 0x959d8 leaq -0x230(%rbp), %rdi callq 0x9f6e2 testl %eax, %eax jne 0x959d8 leaq -0x430(%rbp), %rdi leaq -0x230(%rbp), %rsi movl $0x1ff, %ebx # imm = 0x1FF movl $0x1ff, %edx # imm = 0x1FF callq 0xd8104 leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x958a7 movl %eax, %ecx leaq -0x230(%rbp), %rdx subl %edx, %ecx movslq %ecx, %rcx subq %rcx, %rbx movq %rax, %rdi leaq -0x430(%rbp), %rsi movq %rbx, %rdx callq 0xd8104 jmp 0x959d8 leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x958a7 testb $0x8, %r14b je 0x959ed leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x9be5c testb $0x4, %r14b je 0x95a02 leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x9c3e2 addq %r15, %r13 btl $0x8, %r14d jb 0x95a67 movq %r13, %rdi movl $0x2e, %esi callq 0x29440 testq %rax, %rax je 0x95a67 movq %rax, %r12 testb $0x2, %r14b jne 0x95ac4 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x95a52 movzbl %al, %eax testl %eax, %eax je 0x95ab3 movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x95aa3 cmpl $0x20, %eax jne 0x95a40 movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x95a55 movq %r12, %rcx movq %rdx, %r12 jmp 0x95a35 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x95a8e movzbl %al, %eax testl %eax, %eax je 0x95ac1 movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x95ac4 cmpl $0x20, %eax jne 0x95a7c movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x95a91 movq %r12, %rcx movq %rdx, %r12 jmp 0x95a71 leaq 0x4b64f(%rip), %rax # 0xe10f9 movq %rax, -0x438(%rbp) jmp 0x95ac4 leaq 0x4b63f(%rip), %rax # 0xe10f9 movq %rax, -0x438(%rbp) movq %rcx, %r12 subq %r13, %r12 leaq -0x230(%rbp), %rdi callq 0x29350 movq %rax, %rbx movq -0x438(%rbp), %rdi callq 0x29350 cmpq $0xff, %r12 ja 0x95b54 addq %r12, %rbx addq %rax, %rbx cmpq $0x200, %rbx # imm = 0x200 jae 0x95b54 movq -0x440(%rbp), %rax cmpq %r15, %rax movq %rax, %r15 jne 0x95b26 leaq -0x430(%rbp), %rbx movl $0x200, %ecx # imm = 0x200 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x294c0 movq %rbx, %r13 leaq -0x230(%rbp), %rsi movq %r15, %rdi callq 0x29780 movq %rax, %rdi movq %r13, %rsi movq %r12, %rdx callq 0xd8104 movq %rax, %rdi movq -0x438(%rbp), %rsi callq 0x29360 jmp 0x95bbe testb $0x40, %r14b jne 0x95b95 movb (%r15), %cl movq %r15, %rdx movq %r15, %rax cmpb $0x20, %cl je 0x95b7f movzbl %cl, %ecx testl %ecx, %ecx je 0x95b9d movzbl 0x1(%rax), %ecx incq %rax testl %ecx, %ecx je 0x95b9a cmpl $0x20, %ecx jne 0x95b6f movq %rax, %rsi movb 0x1(%rsi), %cl incq %rsi cmpb $0x20, %cl je 0x95b82 movq %rax, %rdx movq %rsi, %rax jmp 0x95b63 xorl %r15d, %r15d jmp 0x95bf8 movq %rax, %rdx subq %r15, %rdx movl $0x1ff, %eax # imm = 0x1FF cmpq %rax, %rdx cmovaeq %rax, %rdx movq -0x440(%rbp), %rdi movq %r15, %rsi movq %rdi, %r15 callq 0xd8104 testb $0x20, %r14b jne 0x95beb testb $0x10, %r14b je 0x95bf8 leaq -0x430(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x29360 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0xa1bf4 jmp 0x95bf8 movq %r15, %rdi movq %r15, %rsi xorl %edx, %edx callq 0xa1d51 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x95c1c movq %r15, %rax addq $0x428, %rsp # imm = 0x428 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
fn_format: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 428h mov r14d, r8d mov [rbp+var_438], rcx mov r12, rdx mov r15, rsi mov [rbp+var_440], rdi mov rax, fs:28h mov [rbp+var_30], rax lea rdi, [rbp+var_230] lea rdx, [rbp+var_448] call dirname_part mov r13, rax test rax, rax setnz al test r14b, 1 setz cl test cl, al jz short loc_959C7 test r14b, r14b jns short loc_959D8 lea rdi, [rbp+var_230] call test_if_hard_path test eax, eax jnz short loc_959D8 lea rdi, [rbp+var_430] lea rsi, [rbp+var_230] mov ebx, 1FFh mov edx, 1FFh call strmake lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname mov ecx, eax lea rdx, [rbp+var_230] sub ecx, edx movsxd rcx, ecx sub rbx, rcx mov rdi, rax lea rsi, [rbp+var_430] mov rdx, rbx call strmake jmp short loc_959D8 loc_959C7: lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname loc_959D8: test r14b, 8 jz short loc_959ED lea rdi, [rbp+var_230] mov rsi, rdi call pack_dirname loc_959ED: test r14b, 4 jz short loc_95A02 lea rdi, [rbp+var_230] mov rsi, rdi call unpack_dirname loc_95A02: add r13, r15 bt r14d, 8 jb short loc_95A67 mov rdi, r13 mov esi, 2Eh ; '.' call _strchr test rax, rax jz short loc_95A67 mov r12, rax test r14b, 2 jnz loc_95AC4 mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_95A35: cmp al, 20h ; ' ' jz short loc_95A52 movzx eax, al test eax, eax jz short loc_95AB3 loc_95A40: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_95AA3 cmp eax, 20h ; ' ' jnz short loc_95A40 loc_95A52: mov rdx, r12 loc_95A55: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_95A55 mov rcx, r12 mov r12, rdx jmp short loc_95A35 loc_95A67: mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_95A71: cmp al, 20h ; ' ' jz short loc_95A8E movzx eax, al test eax, eax jz short loc_95AC1 loc_95A7C: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_95AC4 cmp eax, 20h ; ' ' jnz short loc_95A7C loc_95A8E: mov rdx, r12 loc_95A91: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_95A91 mov rcx, r12 mov r12, rdx jmp short loc_95A71 loc_95AA3: lea rax, asc_E10F5+4; "" mov [rbp+var_438], rax jmp short loc_95AC4 loc_95AB3: lea rax, asc_E10F5+4; "" mov [rbp+var_438], rax loc_95AC1: mov r12, rcx loc_95AC4: sub r12, r13 lea rdi, [rbp+var_230] call _strlen mov rbx, rax mov rdi, [rbp+var_438] call _strlen cmp r12, 0FFh ja short loc_95B54 add rbx, r12 add rbx, rax cmp rbx, 200h jnb short loc_95B54 mov rax, [rbp+var_440] cmp rax, r15 mov r15, rax jnz short loc_95B26 lea rbx, [rbp+var_430] mov ecx, 200h mov rdi, rbx mov rsi, r13 mov rdx, r12 call ___memmove_chk mov r13, rbx loc_95B26: lea rsi, [rbp+var_230] mov rdi, r15 call _stpcpy mov rdi, rax mov rsi, r13 mov rdx, r12 call strmake mov rdi, rax mov rsi, [rbp+var_438] call _strcpy jmp short loc_95BBE loc_95B54: test r14b, 40h jnz short loc_95B95 mov cl, [r15] mov rdx, r15 mov rax, r15 loc_95B63: cmp cl, 20h ; ' ' jz short loc_95B7F movzx ecx, cl test ecx, ecx jz short loc_95B9D loc_95B6F: movzx ecx, byte ptr [rax+1] inc rax test ecx, ecx jz short loc_95B9A cmp ecx, 20h ; ' ' jnz short loc_95B6F loc_95B7F: mov rsi, rax loc_95B82: mov cl, [rsi+1] inc rsi cmp cl, 20h ; ' ' jz short loc_95B82 mov rdx, rax mov rax, rsi jmp short loc_95B63 loc_95B95: xor r15d, r15d jmp short loc_95BF8 loc_95B9A: mov rdx, rax loc_95B9D: sub rdx, r15 mov eax, 1FFh cmp rdx, rax cmovnb rdx, rax mov rdi, [rbp+var_440] mov rsi, r15 mov r15, rdi call strmake loc_95BBE: test r14b, 20h jnz short loc_95BEB test r14b, 10h jz short loc_95BF8 lea rbx, [rbp+var_430] mov rdi, rbx mov rsi, r15 call _strcpy mov rdi, r15 mov rsi, rbx xor edx, edx call my_readlink jmp short loc_95BF8 loc_95BEB: mov rdi, r15 mov rsi, r15 xor edx, edx call my_realpath loc_95BF8: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_95C1C mov rax, r15 add rsp, 428h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_95C1C: call ___stack_chk_fail
_BYTE * fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, __int16 a5) { long long v8; // r13 _WORD *v9; // rax _BYTE *v10; // r13 long long v11; // rax _BYTE *v12; // r12 char v13; // al _BYTE *v14; // rcx int v15; // eax _BYTE *v16; // rdx char v17; // al int v18; // eax _BYTE *v19; // rdx unsigned long long v20; // r12 long long v21; // rbx long long v22; // rax _BYTE *v23; // r15 long long v24; // rax long long v25; // rax char v26; // cl _BYTE *v27; // rdx _BYTE *v28; // rax int v29; // ecx _BYTE *v30; // rsi unsigned long long v31; // rdx _BYTE *v32; // rsi long long v34; // [rsp+8h] [rbp-448h] BYREF _BYTE *v35; // [rsp+10h] [rbp-440h] char *v36; // [rsp+18h] [rbp-438h] _BYTE v37[512]; // [rsp+20h] [rbp-430h] BYREF _WORD v38[256]; // [rsp+220h] [rbp-230h] BYREF unsigned long long v39; // [rsp+420h] [rbp-30h] long long savedregs; // [rsp+450h] [rbp+0h] BYREF v36 = a4; v35 = a1; v39 = __readfsqword(0x28u); v8 = dirname_part((long long)v38, a2, &v34); if ( v8 != 0 && (a5 & 1) == 0 ) { if ( (a5 & 0x80u) != 0 && !(unsigned int)test_if_hard_path(v38) ) { strmake(v37, v38, 511LL); v9 = convert_dirname(v38, a3, 0LL); strmake(v9, v37, 511LL - (int)((_DWORD)v9 - ((unsigned int)&savedregs - 560))); } } else { convert_dirname(v38, a3, 0LL); } if ( (a5 & 8) != 0 ) pack_dirname(v38, v38); if ( (a5 & 4) != 0 ) unpack_dirname(v38, v38); v10 = &a2[v8]; if ( (a5 & 0x100) == 0 ) { v11 = strchr(v10, 46LL); if ( v11 ) { v12 = (_BYTE *)v11; if ( (a5 & 2) != 0 ) goto LABEL_32; v13 = *v10; v14 = v10; v12 = v10; while ( v13 == 32 ) { LABEL_18: v16 = v12; do v13 = *++v16; while ( v13 == 32 ); v14 = v12; v12 = v16; } if ( v13 ) { while ( 1 ) { v15 = (unsigned __int8)*++v12; if ( !v15 ) break; if ( v15 == 32 ) goto LABEL_18; } v36 = ""; goto LABEL_32; } v36 = ""; LABEL_31: v12 = v14; goto LABEL_32; } } v17 = *v10; v14 = v10; v12 = v10; while ( v17 == 32 ) { LABEL_26: v19 = v12; do v17 = *++v19; while ( v17 == 32 ); v14 = v12; v12 = v19; } if ( !v17 ) goto LABEL_31; while ( 1 ) { v18 = (unsigned __int8)*++v12; if ( !v18 ) break; if ( v18 == 32 ) goto LABEL_26; } LABEL_32: v20 = v12 - v10; v21 = strlen(v38); v22 = strlen(v36); if ( v20 > 0xFF || v22 + v20 + v21 >= 0x200 ) { if ( (a5 & 0x40) != 0 ) return 0LL; v26 = *a2; v27 = a2; v28 = a2; while ( v26 == 32 ) { LABEL_43: v30 = v28; do v26 = *++v30; while ( v26 == 32 ); v27 = v28; v28 = v30; } if ( v26 ) { while ( 1 ) { v29 = (unsigned __int8)*++v28; if ( !v29 ) break; if ( v29 == 32 ) goto LABEL_43; } v27 = v28; } v31 = v27 - a2; if ( v31 >= 0x1FF ) v31 = 511LL; v32 = a2; v23 = v35; strmake(v35, v32, v31); } else { v23 = v35; if ( v35 == a2 ) { __memmove_chk(v37, v10, v20, 512LL); v10 = v37; } v24 = stpcpy(v23, v38); v25 = strmake(v24, v10, v20); strcpy(v25, v36); } if ( (a5 & 0x20) != 0 ) { my_realpath(v23, v23, 0LL); } else if ( (a5 & 0x10) != 0 ) { strcpy(v37, v23); my_readlink(v23, v37, 0LL); } return v23; }
fn_format: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x428 MOV R14D,R8D MOV qword ptr [RBP + -0x438],RCX MOV R12,RDX MOV R15,RSI MOV qword ptr [RBP + -0x440],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x230] LEA RDX,[RBP + -0x448] CALL 0x00195855 MOV R13,RAX TEST RAX,RAX SETNZ AL TEST R14B,0x1 SETZ CL TEST CL,AL JZ 0x001959c7 TEST R14B,R14B JNS 0x001959d8 LEA RDI,[RBP + -0x230] CALL 0x0019f6e2 TEST EAX,EAX JNZ 0x001959d8 LEA RDI,[RBP + -0x430] LEA RSI,[RBP + -0x230] MOV EBX,0x1ff MOV EDX,0x1ff CALL 0x001d8104 LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x001958a7 MOV ECX,EAX LEA RDX,[RBP + -0x230] SUB ECX,EDX MOVSXD RCX,ECX SUB RBX,RCX MOV RDI,RAX LEA RSI,[RBP + -0x430] MOV RDX,RBX CALL 0x001d8104 JMP 0x001959d8 LAB_001959c7: LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x001958a7 LAB_001959d8: TEST R14B,0x8 JZ 0x001959ed LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x0019be5c LAB_001959ed: TEST R14B,0x4 JZ 0x00195a02 LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x0019c3e2 LAB_00195a02: ADD R13,R15 BT R14D,0x8 JC 0x00195a67 MOV RDI,R13 MOV ESI,0x2e CALL 0x00129440 TEST RAX,RAX JZ 0x00195a67 MOV R12,RAX TEST R14B,0x2 JNZ 0x00195ac4 MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_00195a35: CMP AL,0x20 JZ 0x00195a52 MOVZX EAX,AL TEST EAX,EAX JZ 0x00195ab3 LAB_00195a40: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x00195aa3 CMP EAX,0x20 JNZ 0x00195a40 LAB_00195a52: MOV RDX,R12 LAB_00195a55: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x00195a55 MOV RCX,R12 MOV R12,RDX JMP 0x00195a35 LAB_00195a67: MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_00195a71: CMP AL,0x20 JZ 0x00195a8e MOVZX EAX,AL TEST EAX,EAX JZ 0x00195ac1 LAB_00195a7c: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x00195ac4 CMP EAX,0x20 JNZ 0x00195a7c LAB_00195a8e: MOV RDX,R12 LAB_00195a91: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x00195a91 MOV RCX,R12 MOV R12,RDX JMP 0x00195a71 LAB_00195aa3: LEA RAX,[0x1e10f9] MOV qword ptr [RBP + -0x438],RAX JMP 0x00195ac4 LAB_00195ab3: LEA RAX,[0x1e10f9] MOV qword ptr [RBP + -0x438],RAX LAB_00195ac1: MOV R12,RCX LAB_00195ac4: SUB R12,R13 LEA RDI,[RBP + -0x230] CALL 0x00129350 MOV RBX,RAX MOV RDI,qword ptr [RBP + -0x438] CALL 0x00129350 CMP R12,0xff JA 0x00195b54 ADD RBX,R12 ADD RBX,RAX CMP RBX,0x200 JNC 0x00195b54 MOV RAX,qword ptr [RBP + -0x440] CMP RAX,R15 MOV R15,RAX JNZ 0x00195b26 LEA RBX,[RBP + -0x430] MOV ECX,0x200 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x001294c0 MOV R13,RBX LAB_00195b26: LEA RSI,[RBP + -0x230] MOV RDI,R15 CALL 0x00129780 MOV RDI,RAX MOV RSI,R13 MOV RDX,R12 CALL 0x001d8104 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x438] CALL 0x00129360 JMP 0x00195bbe LAB_00195b54: TEST R14B,0x40 JNZ 0x00195b95 MOV CL,byte ptr [R15] MOV RDX,R15 MOV RAX,R15 LAB_00195b63: CMP CL,0x20 JZ 0x00195b7f MOVZX ECX,CL TEST ECX,ECX JZ 0x00195b9d LAB_00195b6f: MOVZX ECX,byte ptr [RAX + 0x1] INC RAX TEST ECX,ECX JZ 0x00195b9a CMP ECX,0x20 JNZ 0x00195b6f LAB_00195b7f: MOV RSI,RAX LAB_00195b82: MOV CL,byte ptr [RSI + 0x1] INC RSI CMP CL,0x20 JZ 0x00195b82 MOV RDX,RAX MOV RAX,RSI JMP 0x00195b63 LAB_00195b95: XOR R15D,R15D JMP 0x00195bf8 LAB_00195b9a: MOV RDX,RAX LAB_00195b9d: SUB RDX,R15 MOV EAX,0x1ff CMP RDX,RAX CMOVNC RDX,RAX MOV RDI,qword ptr [RBP + -0x440] MOV RSI,R15 MOV R15,RDI CALL 0x001d8104 LAB_00195bbe: TEST R14B,0x20 JNZ 0x00195beb TEST R14B,0x10 JZ 0x00195bf8 LEA RBX,[RBP + -0x430] MOV RDI,RBX MOV RSI,R15 CALL 0x00129360 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX CALL 0x001a1bf4 JMP 0x00195bf8 LAB_00195beb: MOV RDI,R15 MOV RSI,R15 XOR EDX,EDX CALL 0x001a1d51 LAB_00195bf8: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00195c1c MOV RAX,R15 ADD RSP,0x428 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00195c1c: CALL 0x00129270
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5) { char *pcVar1; char *pcVar2; char cVar3; int iVar4; long lVar5; int8 uVar6; char *pcVar7; size_t sVar8; size_t sVar9; char *pcVar10; ulong uVar11; char *pcVar12; long in_FS_OFFSET; int1 local_450 [8]; char *local_448; char *local_440; char local_438 [512]; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_448 = param_1; local_440 = param_4; lVar5 = dirname_part(local_238,param_2,local_450); if ((param_5 & 1) == 0 && lVar5 != 0) { if (((char)param_5 < '\0') && (iVar4 = test_if_hard_path(local_238), iVar4 == 0)) { strmake(local_438,local_238,0x1ff); uVar6 = convert_dirname(local_238,param_3,0); strmake(uVar6,local_438,0x1ff - (long)((int)uVar6 - (int)local_238)); } } else { convert_dirname(local_238,param_3,0); } if ((param_5 & 8) != 0) { pack_dirname(local_238,local_238); } if ((param_5 & 4) != 0) { unpack_dirname(local_238,local_238); } pcVar12 = param_2 + lVar5; if (((param_5 >> 8 & 1) != 0) || (pcVar7 = strchr(pcVar12,0x2e), pcVar7 == (char *)0x0)) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_00195ac4; do { pcVar1 = pcVar10 + 1; pcVar10 = pcVar10 + 1; pcVar7 = pcVar10; if (*pcVar1 == '\0') goto LAB_00195ac4; pcVar2 = pcVar10; } while (*pcVar1 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } if ((param_5 & 2) == 0) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') { local_440 = ""; break; } do { pcVar7 = pcVar10 + 1; pcVar10 = pcVar10 + 1; if (*pcVar7 == '\0') { local_440 = ""; pcVar7 = pcVar10; goto LAB_00195ac4; } pcVar2 = pcVar10; } while (*pcVar7 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } LAB_00195ac4: uVar11 = (long)pcVar7 - (long)pcVar12; sVar8 = strlen(local_238); sVar9 = strlen(local_440); pcVar7 = local_448; if ((0xff < uVar11) || (0x1ff < sVar8 + uVar11 + sVar9)) { if ((param_5 & 0x40) == 0) { cVar3 = *param_2; pcVar12 = param_2; pcVar10 = param_2; do { pcVar2 = pcVar12; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_00195b9d; do { pcVar1 = pcVar12 + 1; pcVar12 = pcVar12 + 1; pcVar10 = pcVar12; if (*pcVar1 == '\0') goto LAB_00195b9d; pcVar2 = pcVar12; } while (*pcVar1 != ' '); } do { pcVar10 = pcVar2; cVar3 = pcVar12[1]; pcVar12 = pcVar12 + 1; pcVar2 = pcVar10; } while (cVar3 == ' '); } while( true ); } pcVar7 = (char *)0x0; goto LAB_00195bf8; } pcVar10 = pcVar12; if (local_448 == param_2) { pcVar10 = local_438; __memmove_chk(pcVar10,pcVar12,uVar11,0x200); } pcVar12 = stpcpy(pcVar7,local_238); pcVar12 = (char *)strmake(pcVar12,pcVar10,uVar11); strcpy(pcVar12,local_440); LAB_00195bbe: if ((param_5 & 0x20) == 0) { if ((param_5 & 0x10) != 0) { strcpy(local_438,pcVar7); my_readlink(pcVar7,local_438,0); } } else { my_realpath(pcVar7,pcVar7,0); } LAB_00195bf8: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return pcVar7; LAB_00195b9d: uVar11 = (long)pcVar10 - (long)param_2; if (0x1fe < uVar11) { uVar11 = 0x1ff; } strmake(local_448,param_2,uVar11); goto LAB_00195bbe; }
25,703
check_mb_ujis
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_ujis(const char *start, const char *end) { if (*(uchar*)start < 0x80) { return 0; /* invalid ujis character */ } if (valid_ujis(*(start)) && valid_ujis(*((start)+1))) { return 2; } if (valid_ujis_ss2(*(start)) && valid_ujis_kata(*((start)+1))) { return 2; } if (valid_ujis_ss3(*(start)) && (end-start) > 2 && valid_ujis(*((start)+1)) && valid_ujis(*((start)+2))) { return 3; } return 0; }
O3
c
check_mb_ujis: pushq %rbp movq %rsp, %rbp movb (%rdi), %cl xorl %eax, %eax testb %cl, %cl jns 0x2f9b2 leal 0x1(%rcx), %eax cmpb $-0x5e, %al jae 0x2f973 cmpb $-0x72, %cl jne 0x2f984 movb 0x1(%rdi), %cl addb $0x5f, %cl movl $0x2, %eax cmpb $0x3f, %cl jae 0x2f9b0 jmp 0x2f9b2 movb 0x1(%rdi), %cl incb %cl movl $0x2, %eax cmpb $-0x5e, %cl jb 0x2f9b0 jmp 0x2f9b2 cmpb $-0x71, %cl setne %al subq %rdi, %rsi cmpq $0x3, %rsi setl %cl orb %al, %cl jne 0x2f9b0 movb 0x1(%rdi), %al incb %al cmpb $-0x5e, %al jb 0x2f9b0 movb 0x2(%rdi), %cl incb %cl movl $0x3, %eax cmpb $-0x5f, %cl ja 0x2f9b2 xorl %eax, %eax popq %rbp retq
check_mb_ujis: push rbp mov rbp, rsp mov cl, [rdi] xor eax, eax test cl, cl jns short loc_2F9B2 lea eax, [rcx+1] cmp al, 0A2h jnb short loc_2F973 cmp cl, 8Eh jnz short loc_2F984 mov cl, [rdi+1] add cl, 5Fh ; '_' mov eax, 2 cmp cl, 3Fh ; '?' jnb short loc_2F9B0 jmp short loc_2F9B2 loc_2F973: mov cl, [rdi+1] inc cl mov eax, 2 cmp cl, 0A2h jb short loc_2F9B0 jmp short loc_2F9B2 loc_2F984: cmp cl, 8Fh setnz al sub rsi, rdi cmp rsi, 3 setl cl or cl, al jnz short loc_2F9B0 mov al, [rdi+1] inc al cmp al, 0A2h jb short loc_2F9B0 mov cl, [rdi+2] inc cl mov eax, 3 cmp cl, 0A1h ja short loc_2F9B2 loc_2F9B0: xor eax, eax loc_2F9B2: pop rbp retn
long long check_mb_ujis(char *a1, long long a2) { char v2; // cl long long result; // rax v2 = *a1; result = 0LL; if ( *a1 < 0 ) { if ( (unsigned __int8)(v2 + 1) >= 0xA2u ) { result = 2LL; if ( (unsigned __int8)(a1[1] + 1) < 0xA2u ) return 0LL; } else { if ( v2 == -114 ) { result = 2LL; if ( (unsigned __int8)(a1[1] + 95) < 0x3Fu ) return result; return 0LL; } if ( v2 != -113 || a2 - (long long)a1 < 3 ) return 0LL; if ( (unsigned __int8)(a1[1] + 1) < 0xA2u ) return 0LL; result = 3LL; if ( (unsigned __int8)(a1[2] + 1) <= 0xA1u ) return 0LL; } } return result; }
check_mb_ujis: PUSH RBP MOV RBP,RSP MOV CL,byte ptr [RDI] XOR EAX,EAX TEST CL,CL JNS 0x0012f9b2 LEA EAX,[RCX + 0x1] CMP AL,0xa2 JNC 0x0012f973 CMP CL,0x8e JNZ 0x0012f984 MOV CL,byte ptr [RDI + 0x1] ADD CL,0x5f MOV EAX,0x2 CMP CL,0x3f JNC 0x0012f9b0 JMP 0x0012f9b2 LAB_0012f973: MOV CL,byte ptr [RDI + 0x1] INC CL MOV EAX,0x2 CMP CL,0xa2 JC 0x0012f9b0 JMP 0x0012f9b2 LAB_0012f984: CMP CL,0x8f SETNZ AL SUB RSI,RDI CMP RSI,0x3 SETL CL OR CL,AL JNZ 0x0012f9b0 MOV AL,byte ptr [RDI + 0x1] INC AL CMP AL,0xa2 JC 0x0012f9b0 MOV CL,byte ptr [RDI + 0x2] INC CL MOV EAX,0x3 CMP CL,0xa1 JA 0x0012f9b2 LAB_0012f9b0: XOR EAX,EAX LAB_0012f9b2: POP RBP RET
int8 check_mb_ujis(char *param_1,long param_2) { char cVar1; int8 uVar2; cVar1 = *param_1; if (-1 < cVar1) { return 0; } if ((byte)(cVar1 + 1U) < 0xa2) { if (cVar1 == -0x72) { if (0x3e < (byte)(param_1[1] + 0x5fU)) { return 0; } return 2; } if (param_2 - (long)param_1 < 3 || cVar1 != -0x71) { return 0; } if ((byte)(param_1[1] + 1U) < 0xa2) { return 0; } cVar1 = param_1[2]; uVar2 = 3; } else { cVar1 = param_1[1]; uVar2 = 2; } if ((byte)(cVar1 + 1U) < 0xa2) { return 0; } return uVar2; }
25,704
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [8], 0>(char const (&) [8])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [8], 0>(char const (&) [8]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x951ff movq %r14, %rdi movq %rbx, %rsi callq 0x3a932 testb %al, %al jne 0x951fc addq $0x30, %r14 jmp 0x951de movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_951DE: mov rax, [r15+8] cmp r14, rax jz short loc_951FF mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_951FC add r14, 30h ; '0' jmp short loc_951DE loc_951FC: mov rax, r14 loc_951FF: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_001951de: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x001951ff MOV RDI,R14 MOV RSI,RBX CALL 0x0013a932 TEST AL,AL JNZ 0x001951fc ADD R14,0x30 JMP 0x001951de LAB_001951fc: MOV RAX,R14 LAB_001951ff: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
25,705
bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)
hkr04[P]cpp-mcp/common/httplib.h
bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status, Progress progress, ContentReceiverWithProgress receiver, bool decompress) { return prepare_content_receiver( x, status, std::move(receiver), decompress, [&](const ContentReceiverWithProgress &out) { auto ret = true; auto exceed_payload_max_length = false; if (is_chunked_transfer_encoding(x.headers)) { ret = read_content_chunked(strm, x, out); } else if (!has_header(x.headers, "Content-Length")) { ret = read_content_without_length(strm, out); } else { auto is_invalid_value = false; auto len = get_header_value_u64( x.headers, "Content-Length", (std::numeric_limits<uint64_t>::max)(), 0, is_invalid_value); if (is_invalid_value) { ret = false; } else if (len > payload_max_length) { exceed_payload_max_length = true; skip_content_with_length(strm, len); ret = false; } else if (len > 0) { ret = read_content_with_length(strm, len, std::move(progress), out); } } if (!ret) { status = exceed_payload_max_length ? StatusCode::PayloadTooLarge_413 : StatusCode::BadRequest_400; } return ret; }); }
O0
c
bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool): subq $0xe8, %rsp movq %r9, 0x28(%rsp) movq %r8, 0x38(%rsp) movq %rsi, %rax movq 0x28(%rsp), %rsi movq %rax, 0x30(%rsp) movq %rdi, %r9 movq 0x30(%rsp), %rdi movb 0xf0(%rsp), %al movq %r9, 0xe0(%rsp) movq %rdi, 0xd8(%rsp) movq %rdx, 0xd0(%rsp) movq %rcx, 0xc8(%rsp) movq %r8, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) andb $0x1, %al movb %al, 0xb7(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x40(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x90(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0x5ac00 movq 0x38(%rsp), %r8 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0xd8(%rsp), %rax movzbl 0xb7(%rsp), %ecx movq %rax, 0x68(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0x70(%rsp) leaq 0xd0(%rsp), %rax movq %rax, 0x78(%rsp) movq %r8, 0x80(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %r8 movq %rsp, %rax movq %r8, 0x20(%rax) movups 0x68(%rsp), %xmm0 movups 0x78(%rsp), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) andl $0x1, %ecx callq 0x9fa20 movb %al, 0x5b(%rsp) jmp 0x9383b leaq 0x90(%rsp), %rdi callq 0x36020 movb 0x5b(%rsp), %al andb $0x1, %al addq $0xe8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0x90(%rsp), %rdi callq 0x36020 movq 0x60(%rsp), %rdi callq 0xbe10 nopl (%rax,%rax)
_ZN7httplib6detail12read_contentINS_8ResponseEEEbRNS_6StreamERT_mRiSt8functionIFbmmEES8_IFbPKcmmmEEb: sub rsp, 0E8h mov [rsp+0E8h+var_C0], r9 mov [rsp+0E8h+var_B0], r8 mov rax, rsi mov rsi, [rsp+0E8h+var_C0] mov [rsp+0E8h+var_B8], rax mov r9, rdi mov rdi, [rsp+0E8h+var_B8] mov al, [rsp+0E8h+arg_0] mov [rsp+0E8h+var_8], r9 mov [rsp+0E8h+var_10], rdi mov [rsp+0E8h+var_18], rdx mov [rsp+0E8h+var_20], rcx mov [rsp+0E8h+var_28], r8 mov [rsp+0E8h+var_30], rsi and al, 1 mov [rsp+0E8h+var_31], al mov rax, [rsp+0E8h+var_10] mov [rsp+0E8h+var_A8], rax mov rax, [rsp+0E8h+var_20] mov [rsp+0E8h+var_A0], rax lea rdi, [rsp+0E8h+var_58] mov [rsp+0E8h+var_98], rdi call _ZNSt8functionIFbPKcmmmEEC2EOS3_; std::function<bool ()(char const*,ulong,ulong,ulong)>::function(std::function<bool ()(char const*,ulong,ulong,ulong)>&&) mov r8, [rsp+0E8h+var_B0] mov rdi, [rsp+0E8h+var_A8] mov rsi, [rsp+0E8h+var_A0] mov rdx, [rsp+0E8h+var_98] mov rax, [rsp+0E8h+var_10] movzx ecx, [rsp+0E8h+var_31] mov qword ptr [rsp+0E8h+var_80], rax mov rax, [rsp+0E8h+var_8] mov qword ptr [rsp+0E8h+var_80+8], rax lea rax, [rsp+0E8h+var_18] mov qword ptr [rsp+0E8h+var_70], rax mov qword ptr [rsp+0E8h+var_70+8], r8 mov rax, [rsp+0E8h+var_20] mov [rsp+0E8h+var_60], rax mov r8, [rsp+0E8h+var_60] mov rax, rsp mov [rax+20h], r8 movups xmm0, [rsp+0E8h+var_80] movups xmm1, [rsp+0E8h+var_70] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 and ecx, 1 call _ZN7httplib6detail24prepare_content_receiverINS_8ResponseEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiSt8functionIFbmmEES9_IFbPKcmmmEEbEUlRKSF_E_EEbS7_S8_SF_bT0_; httplib::detail::prepare_content_receiver<httplib::Response,httplib::detail::read_content<httplib::Response>(httplib::Stream &,httplib::Response &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}>(httplib::Response &,int &,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool,httplib::detail::read_content<httplib::Response>(httplib::Stream &,httplib::Response &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}) mov [rsp+0E8h+var_8D], al jmp short $+2 loc_9383B: lea rdi, [rsp+0E8h+var_58] call _ZNSt8functionIFbPKcmmmEED2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::~function() mov al, [rsp+0E8h+var_8D] and al, 1 add rsp, 0E8h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_88] call _ZNSt8functionIFbPKcmmmEED2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::~function() mov rdi, [rsp+arg_58] call __Unwind_Resume
char httplib::detail::read_content<httplib::Response>( long long a1, long long a2, long long a3, long long a4, long long a5, _QWORD *a6, char a7) { int v7; // r9d int v9; // [rsp+28h] [rbp-C0h] int v10; // [rsp+38h] [rbp-B0h] int v11; // [rsp+48h] [rbp-A0h] char v12; // [rsp+5Bh] [rbp-8Dh] _BYTE v13[39]; // [rsp+90h] [rbp-58h] BYREF char v14; // [rsp+B7h] [rbp-31h] _QWORD *v15; // [rsp+B8h] [rbp-30h] long long v16; // [rsp+C0h] [rbp-28h] long long v17; // [rsp+C8h] [rbp-20h] long long v18; // [rsp+D0h] [rbp-18h] BYREF long long v19; // [rsp+D8h] [rbp-10h] long long v20; // [rsp+E0h] [rbp-8h] v9 = (int)a6; v10 = a5; v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = a6; v14 = a7 & 1; v11 = a4; std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::function( (std::_Function_base *)v13, a6); v12 = httplib::detail::prepare_content_receiver<httplib::Response,bool httplib::detail::read_content<httplib::Response>(httplib::Stream &,httplib::Response &,unsigned long,int &,std::function<bool ()(unsigned long,unsigned long)>,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>,bool)::{lambda(std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)> const&)#1}>( a2, v11, (unsigned int)v13, v14 & 1, v17, v7, v19, v20, (unsigned int)&v18, v10, v17, v9, a2, v10, a2, v11, (unsigned int)v13); std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::~function((std::_Function_base *)v13); return v12 & 1; }
read_content<httplib::Response>: SUB RSP,0xe8 MOV qword ptr [RSP + 0x28],R9 MOV qword ptr [RSP + 0x38],R8 MOV RAX,RSI MOV RSI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x30],RAX MOV R9,RDI MOV RDI,qword ptr [RSP + 0x30] MOV AL,byte ptr [RSP + 0xf0] MOV qword ptr [RSP + 0xe0],R9 MOV qword ptr [RSP + 0xd8],RDI MOV qword ptr [RSP + 0xd0],RDX MOV qword ptr [RSP + 0xc8],RCX MOV qword ptr [RSP + 0xc0],R8 MOV qword ptr [RSP + 0xb8],RSI AND AL,0x1 MOV byte ptr [RSP + 0xb7],AL MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x90] MOV qword ptr [RSP + 0x50],RDI CALL 0x0015ac00 MOV R8,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0xd8] MOVZX ECX,byte ptr [RSP + 0xb7] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x70],RAX LEA RAX,[RSP + 0xd0] MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],R8 MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x88],RAX LAB_0019380d: MOV R8,qword ptr [RSP + 0x88] MOV RAX,RSP MOV qword ptr [RAX + 0x20],R8 MOVUPS XMM0,xmmword ptr [RSP + 0x68] MOVUPS XMM1,xmmword ptr [RSP + 0x78] MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 AND ECX,0x1 CALL 0x0019fa20 LAB_00193835: MOV byte ptr [RSP + 0x5b],AL JMP 0x0019383b LAB_0019383b: LEA RDI,[RSP + 0x90] CALL 0x00136020 MOV AL,byte ptr [RSP + 0x5b] AND AL,0x1 ADD RSP,0xe8 RET
/* bool httplib::detail::read_content<httplib::Response>(httplib::Stream&, httplib::Response&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool) */ bool httplib::detail::read_content<httplib::Response> (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,function *param_6,byte param_7) { bool bVar1; function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)> local_58 [39]; byte local_31; function *local_30; int8 local_28; int8 local_20; int8 local_18; int8 local_10; int8 local_8; local_31 = param_7 & 1; local_30 = param_6; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::function (local_58,param_6); /* try { // try from 0019380d to 00193834 has its CatchHandler @ 00193856 */ bVar1 = prepare_content_receiver<httplib::Response,httplib::detail::read_content<httplib::Response>(httplib::Stream&,httplib::Response&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::_lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)_1_> (param_2,param_4,local_58,local_31 & 1); std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::~function(local_58); return bVar1; }
25,706
bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)
hkr04[P]cpp-mcp/common/httplib.h
bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status, Progress progress, ContentReceiverWithProgress receiver, bool decompress) { return prepare_content_receiver( x, status, std::move(receiver), decompress, [&](const ContentReceiverWithProgress &out) { auto ret = true; auto exceed_payload_max_length = false; if (is_chunked_transfer_encoding(x.headers)) { ret = read_content_chunked(strm, x, out); } else if (!has_header(x.headers, "Content-Length")) { ret = read_content_without_length(strm, out); } else { auto is_invalid_value = false; auto len = get_header_value_u64( x.headers, "Content-Length", (std::numeric_limits<uint64_t>::max)(), 0, is_invalid_value); if (is_invalid_value) { ret = false; } else if (len > payload_max_length) { exceed_payload_max_length = true; skip_content_with_length(strm, len); ret = false; } else if (len > 0) { ret = read_content_with_length(strm, len, std::move(progress), out); } } if (!ret) { status = exceed_payload_max_length ? StatusCode::PayloadTooLarge_413 : StatusCode::BadRequest_400; } return ret; }); }
O2
c
bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool): pushq %rbx subq $0x80, %rsp movb 0x90(%rsp), %al movq %rdx, 0x50(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) andq $0x0, 0x40(%rsp) movq 0x18(%r9), %rdx movq %rdx, 0x48(%rsp) movq 0x10(%r9), %rdx testq %rdx, %rdx je 0x185a2 movups (%r9), %xmm1 addq $0x10, %r9 movaps %xmm1, 0x30(%rsp) movq %rdx, 0x40(%rsp) movups %xmm0, (%r9) movq %rsi, 0x58(%rsp) movq %rdi, 0x60(%rsp) leaq 0x50(%rsp), %rdx movq %rdx, 0x68(%rsp) movq %r8, 0x70(%rsp) movq %rcx, 0x78(%rsp) movq 0x78(%rsp), %rdx movq %rdx, 0x20(%rsp) movups 0x58(%rsp), %xmm0 movups 0x68(%rsp), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movzbl %al, %eax leaq 0x30(%rsp), %rdx movq %rsi, %rdi movq %rcx, %rsi movl %eax, %ecx callq 0x28297 movl %eax, %ebx leaq 0x30(%rsp), %rdi callq 0x35882 movl %ebx, %eax addq $0x80, %rsp popq %rbx retq movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x35882 movq %rbx, %rdi callq 0x89c0
_ZN7httplib6detail12read_contentINS_8ResponseEEEbRNS_6StreamERT_mRiSt8functionIFbmmEES8_IFbPKcmmmEEb: push rbx sub rsp, 80h mov al, [rsp+88h+arg_0] mov [rsp+88h+var_38], rdx xorps xmm0, xmm0 movaps [rsp+88h+var_58], xmm0 and [rsp+88h+var_48], 0 mov rdx, [r9+18h] mov [rsp+88h+var_40], rdx mov rdx, [r9+10h] test rdx, rdx jz short loc_185A2 movups xmm1, xmmword ptr [r9] add r9, 10h movaps [rsp+88h+var_58], xmm1 mov [rsp+88h+var_48], rdx movups xmmword ptr [r9], xmm0 loc_185A2: mov qword ptr [rsp+88h+var_30], rsi mov qword ptr [rsp+88h+var_30+8], rdi lea rdx, [rsp+88h+var_38] mov qword ptr [rsp+88h+var_20], rdx mov qword ptr [rsp+88h+var_20+8], r8 mov [rsp+88h+var_10], rcx mov rdx, [rsp+88h+var_10] mov [rsp+88h+var_68], rdx movups xmm0, [rsp+88h+var_30] movups xmm1, [rsp+88h+var_20] movups [rsp+88h+var_78], xmm1 movups [rsp+88h+var_88], xmm0 movzx eax, al lea rdx, [rsp+88h+var_58] mov rdi, rsi mov rsi, rcx mov ecx, eax call _ZN7httplib6detail24prepare_content_receiverINS_8ResponseEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiSt8functionIFbmmEES9_IFbPKcmmmEEbEUlRKSF_E_EEbS7_S8_SF_bT0_; httplib::detail::prepare_content_receiver<httplib::Response,httplib::detail::read_content<httplib::Response>(httplib::Stream &,httplib::Response &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}>(httplib::Response &,int &,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool,httplib::detail::read_content<httplib::Response>(httplib::Stream &,httplib::Response &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}) mov ebx, eax lea rdi, [rsp+88h+var_58]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov eax, ebx add rsp, 80h pop rbx retn mov rbx, rax lea rdi, [rsp+arg_28]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, rbx call __Unwind_Resume
long long httplib::detail::read_content<httplib::Response>( long long a1, long long a2, long long a3, long long a4, long long a5, __int128 *a6, unsigned __int8 a7) { long long v7; // rdx __int128 v8; // xmm1 unsigned int v9; // ebx __int128 v11; // [rsp+30h] [rbp-58h] BYREF long long v12; // [rsp+40h] [rbp-48h] long long v13; // [rsp+48h] [rbp-40h] _QWORD v14[7]; // [rsp+50h] [rbp-38h] BYREF v14[0] = a3; v11 = 0LL; v12 = 0LL; v13 = *((_QWORD *)a6 + 3); v7 = *((_QWORD *)a6 + 2); if ( v7 ) { v8 = *a6++; v11 = v8; v12 = v7; *a6 = 0LL; } v14[1] = a2; v14[2] = a1; v14[3] = v14; v14[4] = a5; v14[5] = a4; v9 = httplib::detail::prepare_content_receiver<httplib::Response,bool httplib::detail::read_content<httplib::Response>(httplib::Stream &,httplib::Response &,unsigned long,int &,std::function<bool ()(unsigned long,unsigned long)>,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>,bool)::{lambda(std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)> const&)#1}>( a2, a4, (unsigned int)&v11, a7, a5, (_DWORD)a6, a2, a1, (unsigned int)v14, a5, a4); std::_Function_base::~_Function_base((std::_Function_base *)&v11); return v9; }
read_content<httplib::Response>: PUSH RBX SUB RSP,0x80 MOV AL,byte ptr [RSP + 0x90] MOV qword ptr [RSP + 0x50],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 AND qword ptr [RSP + 0x40],0x0 MOV RDX,qword ptr [R9 + 0x18] MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [R9 + 0x10] TEST RDX,RDX JZ 0x001185a2 MOVUPS XMM1,xmmword ptr [R9] ADD R9,0x10 MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOV qword ptr [RSP + 0x40],RDX MOVUPS xmmword ptr [R9],XMM0 LAB_001185a2: MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDI LEA RDX,[RSP + 0x50] MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x70],R8 MOV qword ptr [RSP + 0x78],RCX LAB_001185c0: MOV RDX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x20],RDX MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS XMM1,xmmword ptr [RSP + 0x68] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOVZX EAX,AL LEA RDX,[RSP + 0x30] MOV RDI,RSI MOV RSI,RCX MOV ECX,EAX CALL 0x00128297 LAB_001185f2: MOV EBX,EAX LEA RDI,[RSP + 0x30] CALL 0x00135882 MOV EAX,EBX ADD RSP,0x80 POP RBX RET
/* bool httplib::detail::read_content<httplib::Response>(httplib::Stream&, httplib::Response&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool) */ bool httplib::detail::read_content<httplib::Response> (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 *param_6,int1 param_7) { long lVar1; int4 uVar2; int4 uVar3; int4 uVar4; bool bVar5; int8 *puVar6; int8 local_58; int8 uStack_50; long local_48; int8 local_40; int8 local_38; int8 local_30; int8 uStack_28; int8 *local_20; int8 uStack_18; int8 local_10; local_58 = 0; uStack_50 = 0; local_48 = 0; local_40 = param_6[3]; lVar1 = param_6[2]; puVar6 = param_6; if (lVar1 != 0) { local_58 = *param_6; uStack_50 = param_6[1]; puVar6 = param_6 + 2; *puVar6 = 0; param_6[3] = 0; local_48 = lVar1; } local_20 = &local_38; /* try { // try from 001185c0 to 001185f1 has its CatchHandler @ 00118609 */ local_30._0_4_ = (int4)param_2; uStack_28._0_4_ = (int4)param_1; uStack_18._0_4_ = (int4)param_5; local_38 = param_3; uVar2 = (int4)local_30; local_30 = param_2; uVar3 = (int4)uStack_28; uStack_28 = param_1; uVar4 = (int4)uStack_18; uStack_18 = param_5; local_10 = param_4; bVar5 = prepare_content_receiver<httplib::Response,httplib::detail::read_content<httplib::Response>(httplib::Stream&,httplib::Response&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::_lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)_1_> (param_2,param_4,&local_58,param_7,param_5,puVar6,uVar2,uVar3,local_20._0_4_, uVar4,param_4); std::_Function_base::~_Function_base((_Function_base *)&local_58); return bVar5; }
25,707
list_builtin_chat_templates[abi:cxx11]()
monkey531[P]llama/common/arg.cpp
static std::string list_builtin_chat_templates() { std::vector<const char *> supported_tmpl; int32_t res = llama_chat_builtin_templates(nullptr, 0); supported_tmpl.resize(res); res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size()); std::ostringstream msg; for (auto & tmpl : supported_tmpl) { msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", "); } return msg.str(); }
O0
cpp
list_builtin_chat_templates[abi:cxx11](): subq $0x218, %rsp # imm = 0x218 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x210(%rsp) leaq 0x1f8(%rsp), %rdi callq 0xfa940 xorl %eax, %eax movl %eax, %esi movq %rsi, %rdi callq 0x5ed90 movl %eax, 0x44(%rsp) jmp 0xbcb6b movl 0x44(%rsp), %eax movl %eax, 0x1f4(%rsp) movslq 0x1f4(%rsp), %rsi leaq 0x1f8(%rsp), %rdi callq 0xfa950 jmp 0xbcb8d leaq 0x1f8(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xfa9f0 movq 0x18(%rsp), %rdi movq %rax, 0x20(%rsp) callq 0xc5c00 movq 0x20(%rsp), %rdi movq %rax, %rsi callq 0x5ed90 movl %eax, 0x2c(%rsp) jmp 0xbcbc1 movl 0x2c(%rsp), %eax movl %eax, 0x1f4(%rsp) leaq 0x68(%rsp), %rdi callq 0x5f120 jmp 0xbcbd8 leaq 0x1f8(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rdi callq 0xc5b20 movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rdi callq 0xc5b50 movq %rax, 0x50(%rsp) leaq 0x58(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0xc5b80 testb $0x1, %al jne 0xbcc1b jmp 0xbccca leaq 0x58(%rsp), %rdi callq 0xc5bc0 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq (%rax), %rsi leaq 0x68(%rsp), %rdi callq 0x5ea60 movq %rax, 0x10(%rsp) jmp 0xbcc43 movq 0x48(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x1f8(%rsp), %rdi callq 0xc5c20 movq 0x10(%rsp), %rdi movq %rax, %rcx movq 0x8(%rsp), %rax subq %rcx, %rax leaq 0x15f4fd(%rip), %rax # 0x21c16e leaq 0x162542(%rip), %rsi # 0x21f1ba cmoveq %rax, %rsi callq 0x5ea60 jmp 0xbcc83 jmp 0xbcc85 leaq 0x58(%rsp), %rdi callq 0xc5c60 jmp 0xbcc03 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) jmp 0xbccff movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) leaq 0x68(%rsp), %rdi callq 0x5f020 jmp 0xbccff movq 0x30(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x5f4b0 jmp 0xbccdb leaq 0x68(%rsp), %rdi callq 0x5f020 leaq 0x1f8(%rsp), %rdi callq 0xd6370 movq 0x38(%rsp), %rax addq $0x218, %rsp # imm = 0x218 retq leaq 0x1f8(%rsp), %rdi callq 0xd6370 movq 0x1e8(%rsp), %rdi callq 0x5ebf0 nopl (%rax)
_ZL27list_builtin_chat_templatesB5cxx11v: sub rsp, 218h mov [rsp+218h+var_1E8], rdi mov rax, rdi mov [rsp+218h+var_1E0], rax mov [rsp+218h+var_8], rdi lea rdi, [rsp+218h+var_20] call _ZNSt6vectorIPKcSaIS1_EEC2Ev; std::vector<char const*>::vector(void) xor eax, eax mov esi, eax mov rdi, rsi call _llama_chat_builtin_templates mov [rsp+218h+var_1D4], eax jmp short $+2 loc_BCB6B: mov eax, [rsp+218h+var_1D4] mov [rsp+218h+var_24], eax movsxd rsi, [rsp+218h+var_24] lea rdi, [rsp+218h+var_20] call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong) jmp short $+2 loc_BCB8D: lea rdi, [rsp+218h+var_20] mov [rsp+218h+var_200], rdi call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void) mov rdi, [rsp+218h+var_200] mov [rsp+218h+var_1F8], rax call _ZNKSt6vectorIPKcSaIS1_EE4sizeEv; std::vector<char const*>::size(void) mov rdi, [rsp+218h+var_1F8] mov rsi, rax call _llama_chat_builtin_templates mov [rsp+218h+var_1EC], eax jmp short $+2 loc_BCBC1: mov eax, [rsp+218h+var_1EC] mov [rsp+218h+var_24], eax lea rdi, [rsp+218h+var_1B0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) jmp short $+2 loc_BCBD8: lea rax, [rsp+218h+var_20] mov [rsp+218h+var_1B8], rax mov rdi, [rsp+218h+var_1B8] call _ZNSt6vectorIPKcSaIS1_EE5beginEv; std::vector<char const*>::begin(void) mov [rsp+218h+var_1C0], rax mov rdi, [rsp+218h+var_1B8] call _ZNSt6vectorIPKcSaIS1_EE3endEv; std::vector<char const*>::end(void) mov [rsp+218h+var_1C8], rax loc_BCC03: lea rdi, [rsp+218h+var_1C0] lea rsi, [rsp+218h+var_1C8] call _ZN9__gnu_cxxneIPPKcSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<char const**,std::vector<char const*>>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&,__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&) test al, 1 jnz short loc_BCC1B jmp loc_BCCCA loc_BCC1B: lea rdi, [rsp+218h+var_1C0] call _ZNK9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(void) mov [rsp+218h+var_1D0], rax mov rax, [rsp+218h+var_1D0] mov rsi, [rax] lea rdi, [rsp+218h+var_1B0] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+218h+var_208], rax jmp short $+2 loc_BCC43: mov rax, [rsp+218h+var_1D0] mov [rsp+218h+var_210], rax lea rdi, [rsp+218h+var_20] call _ZNSt6vectorIPKcSaIS1_EE4backEv; std::vector<char const*>::back(void) mov rdi, [rsp+218h+var_208] mov rcx, rax mov rax, [rsp+218h+var_210] sub rax, rcx lea rax, aExampleSpecifi+27h; "" lea rsi, aZuD+6; ", " cmovz rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_BCC83: jmp short $+2 loc_BCC85: lea rdi, [rsp+218h+var_1C0] call _ZN9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(void) jmp loc_BCC03 mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax jmp short loc_BCCFF mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax lea rdi, [rsp+arg_60] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() jmp short loc_BCCFF loc_BCCCA: mov rdi, [rsp+218h+var_1E8] lea rsi, [rsp+218h+var_1B0] call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void) jmp short $+2 loc_BCCDB: lea rdi, [rsp+218h+var_1B0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+218h+var_20]; void * call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector() mov rax, [rsp+218h+var_1E0] add rsp, 218h retn loc_BCCFF: lea rdi, [rsp+arg_1F0]; void * call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector() mov rdi, [rsp+arg_1E0] call __Unwind_Resume
long long list_builtin_chat_templates[abi:cxx11](long long a1) { long long v1; // rdi char *v2; // rsi long long v4; // [rsp+20h] [rbp-1F8h] int v7; // [rsp+44h] [rbp-1D4h] _QWORD *v8; // [rsp+48h] [rbp-1D0h] long long v9; // [rsp+50h] [rbp-1C8h] BYREF _QWORD v10[2]; // [rsp+58h] [rbp-1C0h] BYREF _BYTE v11[396]; // [rsp+68h] [rbp-1B0h] BYREF int v12; // [rsp+1F4h] [rbp-24h] _BYTE v13[24]; // [rsp+1F8h] [rbp-20h] BYREF long long v14; // [rsp+210h] [rbp-8h] v14 = a1; std::vector<char const*>::vector(v13); v7 = llama_chat_builtin_templates(0LL); std::vector<char const*>::resize(v13, v7); v4 = std::vector<char const*>::data(); std::vector<char const*>::size(v13); v12 = llama_chat_builtin_templates(v4); std::ostringstream::basic_ostringstream(v11); v10[1] = v13; v10[0] = std::vector<char const*>::begin(v13); v9 = std::vector<char const*>::end(v13); while ( (__gnu_cxx::operator!=<char const**,std::vector<char const*>>(v10, &v9) & 1) != 0 ) { v8 = (_QWORD *)__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(v10); v1 = std::operator<<<std::char_traits<char>>(v11, *v8); v2 = ", "; if ( v8 == (_QWORD *)std::vector<char const*>::back(v13) ) v2 = ""; std::operator<<<std::char_traits<char>>(v1, v2); __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(v10); } std::ostringstream::str(a1, v11); std::ostringstream::~ostringstream(v11); std::vector<char const*>::~vector(v13); return a1; }
list_builtin_chat_templates[abi:cxx11]: SUB RSP,0x218 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x210],RDI LEA RDI,[RSP + 0x1f8] CALL 0x001fa940 LAB_001bcb59: XOR EAX,EAX MOV ESI,EAX MOV RDI,RSI CALL 0x0015ed90 MOV dword ptr [RSP + 0x44],EAX JMP 0x001bcb6b LAB_001bcb6b: MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x1f4],EAX MOVSXD RSI,dword ptr [RSP + 0x1f4] LEA RDI,[RSP + 0x1f8] CALL 0x001fa950 JMP 0x001bcb8d LAB_001bcb8d: LEA RDI,[RSP + 0x1f8] MOV qword ptr [RSP + 0x18],RDI CALL 0x001fa9f0 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x20],RAX CALL 0x001c5c00 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,RAX CALL 0x0015ed90 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001bcbc1 LAB_001bcbc1: MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x1f4],EAX LEA RDI,[RSP + 0x68] CALL 0x0015f120 JMP 0x001bcbd8 LAB_001bcbd8: LEA RAX,[RSP + 0x1f8] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x001c5b20 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x001c5b50 MOV qword ptr [RSP + 0x50],RAX LAB_001bcc03: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x50] CALL 0x001c5b80 TEST AL,0x1 JNZ 0x001bcc1b JMP 0x001bccca LAB_001bcc1b: LEA RDI,[RSP + 0x58] CALL 0x001c5bc0 MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RAX] LAB_001bcc32: LEA RDI,[RSP + 0x68] CALL 0x0015ea60 MOV qword ptr [RSP + 0x10],RAX JMP 0x001bcc43 LAB_001bcc43: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x1f8] CALL 0x001c5c20 MOV RDI,qword ptr [RSP + 0x10] MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] SUB RAX,RCX LEA RAX,[0x31c16e] LEA RSI,[0x31f1ba] CMOVZ RSI,RAX CALL 0x0015ea60 JMP 0x001bcc83 LAB_001bcc83: JMP 0x001bcc85 LAB_001bcc85: LEA RDI,[RSP + 0x58] CALL 0x001c5c60 JMP 0x001bcc03 LAB_001bccca: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x68] CALL 0x0015f4b0 LAB_001bccd9: JMP 0x001bccdb LAB_001bccdb: LEA RDI,[RSP + 0x68] CALL 0x0015f020 LEA RDI,[RSP + 0x1f8] CALL 0x001d6370 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x218 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* list_builtin_chat_templates[abi:cxx11]() */ int8 list_builtin_chat_templates_abi_cxx11_(void) { bool bVar1; int8 uVar2; int8 uVar3; int8 *puVar4; ostream *poVar5; int8 *puVar6; char *pcVar7; int8 in_RDI; int8 local_1c8; int8 local_1c0; vector<char_const*,std::allocator<char_const*>> *local_1b8; ostringstream local_1b0 [396]; int local_24; vector<char_const*,std::allocator<char_const*>> local_20 [32]; std::vector<char_const*,std::allocator<char_const*>>::vector(local_20); /* try { // try from 001bcb59 to 001bcbd5 has its CatchHandler @ 001bcc94 */ local_24 = llama_chat_builtin_templates(0); std::vector<char_const*,std::allocator<char_const*>>::resize(local_20,(long)local_24); uVar2 = std::vector<char_const*,std::allocator<char_const*>>::data(local_20); uVar3 = std::vector<char_const*,std::allocator<char_const*>>::size(local_20); local_24 = llama_chat_builtin_templates(uVar2,uVar3); std::__cxx11::ostringstream::ostringstream(local_1b0); local_1b8 = local_20; local_1c0 = std::vector<char_const*,std::allocator<char_const*>>::begin(local_1b8); local_1c8 = std::vector<char_const*,std::allocator<char_const*>>::end(local_1b8); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1c0,(__normal_iterator *)&local_1c8); if (!bVar1) break; puVar4 = (int8 *) __gnu_cxx:: __normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>:: operator*((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>> *)&local_1c0); /* try { // try from 001bcc32 to 001bccd8 has its CatchHandler @ 001bccaa */ poVar5 = std::operator<<((ostream *)local_1b0,(char *)*puVar4); puVar6 = (int8 *)std::vector<char_const*,std::allocator<char_const*>>::back(local_20); pcVar7 = ", "; if (puVar4 == puVar6) { pcVar7 = ""; } std::operator<<(poVar5,pcVar7); __gnu_cxx::__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>> ::operator++((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>> *)&local_1c0); } std::__cxx11::ostringstream::str(); std::__cxx11::ostringstream::~ostringstream(local_1b0); std::vector<char_const*,std::allocator<char_const*>>::~vector(local_20); return in_RDI; }
25,708
bf_set_si
bluesky950520[P]quickjs/libbf.c
int bf_set_si(bf_t *r, int64_t a) { int ret; if (a < 0) { ret = bf_set_ui(r, -a); r->sign = 1; } else { ret = bf_set_ui(r, a); } return ret; }
O2
c
bf_set_si: pushq %rbx movq %rdi, %rbx testq %rsi, %rsi js 0x6f5fe movq %rbx, %rdi popq %rbx jmp 0x6f556 negq %rsi movq %rbx, %rdi callq 0x6f556 movl $0x1, 0x8(%rbx) popq %rbx retq
bf_set_si: push rbx mov rbx, rdi test rsi, rsi js short loc_6F5FE mov rdi, rbx pop rbx jmp bf_set_ui loc_6F5FE: neg rsi mov rdi, rbx call bf_set_ui mov dword ptr [rbx+8], 1 pop rbx retn
long long bf_set_si(long long a1, signed long long a2) { long long result; // rax if ( a2 >= 0 ) return bf_set_ui(a1, a2); result = bf_set_ui(a1, -a2); *(_DWORD *)(a1 + 8) = 1; return result; }
bf_set_si: PUSH RBX MOV RBX,RDI TEST RSI,RSI JS 0x0016f5fe MOV RDI,RBX POP RBX JMP 0x0016f556 LAB_0016f5fe: NEG RSI MOV RDI,RBX CALL 0x0016f556 MOV dword ptr [RBX + 0x8],0x1 POP RBX RET
void bf_set_si(long param_1,long param_2) { if (-1 < param_2) { bf_set_ui(param_1); return; } bf_set_ui(param_1,-param_2); *(int4 *)(param_1 + 8) = 1; return; }
25,709
bf_set_si
bluesky950520[P]quickjs/libbf.c
int bf_set_si(bf_t *r, int64_t a) { int ret; if (a < 0) { ret = bf_set_ui(r, -a); r->sign = 1; } else { ret = bf_set_ui(r, a); } return ret; }
O3
c
bf_set_si: pushq %rbx movq %rdi, %rbx testq %rsi, %rsi js 0x87638 movq %rbx, %rdi popq %rbx jmp 0x87504 negq %rsi movq %rbx, %rdi callq 0x87504 movl $0x1, 0x8(%rbx) popq %rbx retq
bf_set_si: push rbx mov rbx, rdi test rsi, rsi js short loc_87638 mov rdi, rbx pop rbx jmp bf_set_ui loc_87638: neg rsi mov rdi, rbx call bf_set_ui mov dword ptr [rbx+8], 1 pop rbx retn
long long bf_set_si(long long a1, signed long long a2) { long long result; // rax if ( a2 >= 0 ) return bf_set_ui((_QWORD **)a1, a2); result = bf_set_ui((_QWORD **)a1, -a2); *(_DWORD *)(a1 + 8) = 1; return result; }
bf_set_si: PUSH RBX MOV RBX,RDI TEST RSI,RSI JS 0x00187638 MOV RDI,RBX POP RBX JMP 0x00187504 LAB_00187638: NEG RSI MOV RDI,RBX CALL 0x00187504 MOV dword ptr [RBX + 0x8],0x1 POP RBX RET
void bf_set_si(long param_1,long param_2) { if (-1 < param_2) { bf_set_ui(param_1); return; } bf_set_ui(param_1,-param_2); *(int4 *)(param_1 + 8) = 1; return; }
25,710
google::protobuf::MessageLite::GetArenaForAllocation() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.h
Arena* GetArenaForAllocation() const { return _internal_metadata_.arena(); }
O0
c
google::protobuf::MessageLite::GetArenaForAllocation() const: subq $0x38, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax addq $0x8, %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x801d6 movq 0x8(%rsp), %rdi callq 0x801f0 movq (%rax), %rax movq %rax, 0x20(%rsp) jmp 0x801e5 movq 0x8(%rsp), %rdi callq 0x80210 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x38, %rsp retq nop
_ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv: sub rsp, 38h mov [rsp+38h+var_28], rdi mov rax, [rsp+38h+var_28] add rax, 8 mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_20] mov [rsp+38h+var_30], rax mov [rsp+38h+var_10], rax mov rax, [rsp+38h+var_10] mov [rsp+38h+var_8], rax mov rax, [rsp+38h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_801D6 mov rdi, [rsp+38h+var_30] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_13ContainerBaseEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(void) mov rax, [rax] mov [rsp+38h+var_18], rax jmp short loc_801E5 loc_801D6: mov rdi, [rsp+38h+var_30] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS0_5ArenaEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::Arena>(void) mov [rsp+38h+var_18], rax loc_801E5: mov rax, [rsp+38h+var_18] add rsp, 38h retn
long long google::protobuf::MessageLite::GetArenaForAllocation(google::protobuf::MessageLite *this) { char *v2; // [rsp+8h] [rbp-30h] v2 = (char *)this + 8; if ( (*((_QWORD *)this + 1) & 1LL) != 0 ) return *(_QWORD *)google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(v2); else return google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::Arena>(v2); }
GetArenaForAllocation: SUB RSP,0x38 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x8 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001801d6 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001801f0 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX JMP 0x001801e5 LAB_001801d6: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00180210 MOV qword ptr [RSP + 0x20],RAX LAB_001801e5: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x38 RET
/* google::protobuf::MessageLite::GetArenaForAllocation() const */ Arena * __thiscall google::protobuf::MessageLite::GetArenaForAllocation(MessageLite *this) { InternalMetadata *this_00; ContainerBase *pCVar1; Arena *local_18; this_00 = (InternalMetadata *)(this + 8); if ((*(ulong *)this_00 & 1) == 0) { local_18 = internal::InternalMetadata::PtrValue<google::protobuf::Arena>(this_00); } else { pCVar1 = internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(this_00); local_18 = *(Arena **)pCVar1; } return local_18; }
25,711
update_backward_delete_link
eloqsql/storage/maria/ma_dynrec.c
static my_bool update_backward_delete_link(MARIA_HA *info, my_off_t delete_block, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_ma_get_block_info(info, &block_info, info->dfile.file, delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O3
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rsi je 0x3dfe8 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 leaq -0x78(%rbp), %rsi movl $0x0, 0x50(%rsi) movl 0x480(%rdi), %edx movq %rbx, %rcx callq 0x3da10 testb $0x4, %al jne 0x3dfb6 movq %r14, %rdi movl $0x7f, %esi callq 0x36a4c movb $0x1, %al jmp 0x3dfea bswapq %r15 leaq -0x80(%rbp), %rsi movq %r15, (%rsi) movq (%r14), %rax addq $0xc, %rbx movl $0x8, %edx movl $0x4, %r8d movq %r14, %rdi movq %rbx, %rcx callq *0x6e8(%rax) movq %rax, %rcx movb $0x1, %al testq %rcx, %rcx jne 0x3dfea xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x3e004 addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29270
update_backward_delete_link: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_3DFE8 mov r15, rdx mov rbx, rsi mov r14, rdi lea rsi, [rbp+var_78] mov dword ptr [rsi+50h], 0 mov edx, [rdi+480h] mov rcx, rbx call _ma_get_block_info test al, 4 jnz short loc_3DFB6 mov rdi, r14 mov esi, 7Fh call _ma_set_fatal_error mov al, 1 jmp short loc_3DFEA loc_3DFB6: bswap r15 lea rsi, [rbp+var_80] mov [rsi], r15 mov rax, [r14] add rbx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, r14 mov rcx, rbx call qword ptr [rax+6E8h] mov rcx, rax mov al, 1 test rcx, rcx jnz short loc_3DFEA loc_3DFE8: xor eax, eax loc_3DFEA: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_3E004 add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_3E004: call ___stack_chk_fail
char update_backward_delete_link( _DWORD *a1, long long a2, unsigned long long a3, long long a4, long long a5, int a6) { long long v7; // rdx long long v8; // rcx long long v9; // r8 int v10; // r9d char result; // al long long v12; // rcx unsigned long long v13; // [rsp+0h] [rbp-80h] BYREF unsigned __int8 v14[80]; // [rsp+8h] [rbp-78h] BYREF int v15; // [rsp+58h] [rbp-28h] unsigned long long v16; // [rsp+60h] [rbp-20h] v16 = __readfsqword(0x28u); if ( a2 == -1 ) return 0; v15 = 0; if ( (ma_get_block_info((long long)a1, v14, (unsigned int)a1[288], a2, a5, a6) & 4) == 0 ) { ma_set_fatal_error(a1, 127LL, v7, v8, v9, v10); return 1; } v13 = _byteswap_uint64(a3); v12 = (*(long long ( **)(_DWORD *, unsigned long long *, long long, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, &v13, 8LL, a2 + 12, 4LL); result = 1; if ( !v12 ) return 0; return result; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,-0x1 JZ 0x0013dfe8 MOV R15,RDX MOV RBX,RSI MOV R14,RDI LEA RSI,[RBP + -0x78] MOV dword ptr [RSI + 0x50],0x0 MOV EDX,dword ptr [RDI + 0x480] MOV RCX,RBX CALL 0x0013da10 TEST AL,0x4 JNZ 0x0013dfb6 MOV RDI,R14 MOV ESI,0x7f CALL 0x00136a4c MOV AL,0x1 JMP 0x0013dfea LAB_0013dfb6: BSWAP R15 LEA RSI,[RBP + -0x80] MOV qword ptr [RSI],R15 MOV RAX,qword ptr [R14] ADD RBX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x6e8] MOV RCX,RAX MOV AL,0x1 TEST RCX,RCX JNZ 0x0013dfea LAB_0013dfe8: XOR EAX,EAX LAB_0013dfea: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x0013e004 ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_0013e004: CALL 0x00129270
int8 update_backward_delete_link(long *param_1,long param_2,ulong param_3) { ulong uVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; ulong local_88; int1 local_80 [80]; int4 local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_30 = 0; uVar1 = _ma_get_block_info(param_1,local_80,(int)param_1[0x90],param_2); if ((uVar1 & 4) == 0) { _ma_set_fatal_error(param_1,0x7f); uVar2 = 1; goto LAB_0013dfea; } local_88 = param_3 >> 0x38 | (param_3 & 0xff000000000000) >> 0x28 | (param_3 & 0xff0000000000) >> 0x18 | (param_3 & 0xff00000000) >> 8 | (param_3 & 0xff000000) << 8 | (param_3 & 0xff0000) << 0x18 | (param_3 & 0xff00) << 0x28 | param_3 << 0x38; lVar3 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_88,8,param_2 + 0xc,4); uVar2 = 1; if (lVar3 != 0) goto LAB_0013dfea; } uVar2 = 0; LAB_0013dfea: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,712
mi_cmp_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_cmp_dynamic_record(register MI_INFO *info, register const uchar *record) { uint flag,reclength,b_type; my_off_t filepos; uchar *buffer; MI_BLOCK_INFO block_info; DBUG_ENTER("_mi_cmp_dynamic_record"); if (info->opt_flag & WRITE_CACHE_USED) { info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK); if (flush_io_cache(&info->rec_cache)) DBUG_RETURN(-1); } info->rec_cache.seek_not_done=1; /* If nobody have touched the database we don't have to test rec */ buffer=info->rec_buff; if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ if (info->s->base.blobs) { if (!(buffer=(uchar*) my_alloca(info->s->base.pack_reclength+ _mi_calc_total_blob_length(info,record)))) DBUG_RETURN(-1); } reclength=_mi_rec_pack(info,buffer,record); record= buffer; filepos=info->lastpos; flag=block_info.second_read=0; block_info.next_filepos=filepos; while (reclength > 0) { if ((b_type=_mi_get_block_info(&block_info,info->dfile, block_info.next_filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_CHANGED; goto err; } if (flag == 0) /* First block */ { flag=1; if (reclength != block_info.rec_len) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } } else if (reclength < block_info.data_len) { my_errno=HA_ERR_WRONG_IN_RECORD; goto err; } reclength-=block_info.data_len; if (_mi_cmp_buffer(info->dfile,record,block_info.filepos, block_info.data_len)) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } flag=1; record+=block_info.data_len; } } my_errno=0; err: if (buffer != info->rec_buff) my_afree((uchar*) buffer); DBUG_RETURN(my_errno); }
O3
c
mi_cmp_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20e8, %rsp # imm = 0x20E8 movq %rsi, %r14 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x1c8(%rdi), %eax testb $0x10, %al je 0x79508 andb $-0xa, 0x1d1(%r12) leaq 0x220(%r12), %rdi movl $0x1, %esi callq 0x95539 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x79886 movl 0x1c8(%r12), %eax movl $0x1, 0x300(%r12) movq 0x120(%r12), %rbx xorl %r15d, %r15d testb $0x4, %al je 0x79865 movq (%r12), %rax cmpl $0x0, 0x188(%rax) je 0x79561 movq 0x148(%rax), %rbx movq %r12, %rdi movq %r14, %rsi callq 0x77a04 addq %rax, %rbx xorl %edi, %edi movq %rbx, %rsi xorl %edx, %edx callq 0x9fd89 movq %rax, %rbx testq %rax, %rax je 0x798a7 movq %r12, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x770ca movl %eax, %r14d movq 0x170(%r12), %rax movl $0x0, -0x2038(%rbp) movq %rax, -0x2048(%rbp) testl %r14d, %r14d je 0x79865 movb $0x1, %r15b leaq -0x2088(%rbp), %rdi movq %rbx, %r13 movq %r12, -0x2098(%rbp) movq %rbx, -0x2090(%rbp) movl 0x1c0(%r12), %esi movq -0x2048(%rbp), %rdx callq 0x783eb cmpl $0x4, %eax jae 0x798ae movl %r14d, %eax testb $0x1, %r15b je 0x795eb cmpq %rax, -0x2070(%rbp) jne 0x798c2 movq -0x2068(%rbp), %rdx jmp 0x795fb movq -0x2068(%rbp), %rdx cmpq %rax, %rdx ja 0x798ba movl %r14d, -0x209c(%rbp) movl 0x1c0(%r12), %ebx movq -0x2050(%rbp), %r14 cmpl $0x2001, %edx # imm = 0x2001 movq %r13, -0x20b8(%rbp) movq %rdx, -0x20b0(%rbp) jb 0x79743 movl %r14d, %ecx andl $0xfff, %ecx # imm = 0xFFF movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movq %r13, %r15 movl %edx, %r13d movq %r15, -0x20c0(%rbp) movl %eax, %r12d leaq 0x30c9be(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x2108(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x796d2 movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa0638 movq %rax, %r15 testq %r15, %r15 movq -0x20c0(%rbp), %r15 jne 0x79851 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r12, %rdx callq 0x29560 testl %eax, %eax jne 0x79851 addq %r12, %r14 addq %r12, %r15 subl %r12d, %r13d movl $0x2000, %eax # imm = 0x2000 cmpl $0x2000, %r13d # imm = 0x2000 ja 0x79641 jmp 0x79749 movq %rax, %rcx leaq 0x30c934(%rip), %rax # 0x386010 movq (%rax), %rax movq %rcx, -0x20a8(%rbp) movq %rcx, %rdi movq %r12, %rsi leaq 0x624b7(%rip), %rdx # 0xdbbaa movl $0x67e, %ecx # imm = 0x67E callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa0638 movq %rax, %r15 testq %rax, %rax movl $0x0, %esi cmoveq %r12, %rsi leaq 0x30c8e2(%rip), %rax # 0x386010 movq (%rax), %rax movq -0x20a8(%rbp), %rdi callq *0x218(%rax) jmp 0x7968b movq %r13, %r15 movl %edx, %r13d movl %r13d, %r13d leaq 0x30c8bd(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x2108(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x797eb movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %r14, %rcx callq 0xa0638 movq %rax, %rbx testq %rbx, %rbx jne 0x79851 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r13, %rdx callq 0x29560 testl %eax, %eax jne 0x79851 movq -0x20b8(%rbp), %r13 addq -0x2068(%rbp), %r13 xorl %r15d, %r15d movl -0x209c(%rbp), %r14d subl -0x20b0(%rbp), %r14d movq -0x2098(%rbp), %r12 movq -0x2090(%rbp), %rbx leaq -0x2088(%rbp), %rdi jne 0x795af jmp 0x79865 movq %rax, %r12 leaq 0x30c81b(%rip), %rax # 0x386010 movq (%rax), %rax movq %r12, %rdi movq %r13, %rsi leaq 0x623a5(%rip), %rdx # 0xdbbaa movl $0x686, %ecx # imm = 0x686 callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %r14, %rcx callq 0xa0638 movq %rax, %rbx testq %rax, %rax movl $0x0, %esi cmoveq %r13, %rsi leaq 0x30c7d0(%rip), %rax # 0x386010 movq (%rax), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x7978c movl $0x7b, %r15d movq -0x2098(%rbp), %r12 movq -0x2090(%rbp), %rbx callq 0xa1afa movl %r15d, (%rax) cmpq 0x120(%r12), %rbx je 0x7987f movq %rbx, %rdi callq 0x9ffb6 callq 0xa1afa movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x798ca addq $0x20e8, %rsp # imm = 0x20E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x79886 movl $0x7b, %r15d testb $0x14, %al jne 0x79865 jmp 0x7986d movl $0x7f, %r15d jmp 0x79865 movl $0x7b, %r15d jmp 0x79865 callq 0x29270
_mi_cmp_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 20E8h mov r14, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rdi+1C8h] test al, 10h jz short loc_79508 and byte ptr [r12+1D1h], 0F6h lea rdi, [r12+220h] mov esi, 1 call my_b_flush_io_cache mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz loc_79886 mov eax, [r12+1C8h] loc_79508: mov dword ptr [r12+300h], 1 mov rbx, [r12+120h] xor r15d, r15d test al, 4 jz loc_79865 mov rax, [r12] cmp dword ptr [rax+188h], 0 jz short loc_79561 mov rbx, [rax+148h] mov rdi, r12 mov rsi, r14 call _mi_calc_total_blob_length add rbx, rax xor edi, edi mov rsi, rbx xor edx, edx call my_malloc mov rbx, rax test rax, rax jz loc_798A7 loc_79561: mov rdi, r12 mov rsi, rbx mov rdx, r14 call _mi_rec_pack mov r14d, eax mov rax, [r12+170h] mov [rbp+var_2038], 0 mov [rbp+var_2048], rax test r14d, r14d jz loc_79865 mov r15b, 1 lea rdi, [rbp+var_2088] mov r13, rbx mov [rbp+var_2098], r12 mov [rbp+var_2090], rbx loc_795AF: mov esi, [r12+1C0h] mov rdx, [rbp+var_2048] call _mi_get_block_info cmp eax, 4 jnb loc_798AE mov eax, r14d test r15b, 1 jz short loc_795EB cmp [rbp+var_2070], rax jnz loc_798C2 mov rdx, [rbp+var_2068] jmp short loc_795FB loc_795EB: mov rdx, [rbp+var_2068] cmp rdx, rax ja loc_798BA loc_795FB: mov [rbp+var_209C], r14d mov ebx, [r12+1C0h] mov r14, [rbp+var_2050] cmp edx, 2001h mov [rbp+var_20B8], r13 mov [rbp+var_20B0], rdx jb loc_79743 mov ecx, r14d and ecx, 0FFFh mov eax, 2000h sub eax, ecx mov r15, r13 mov r13d, edx loc_79641: mov [rbp+var_20C0], r15 mov r12d, eax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2108] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_796D2 mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, r14 call my_pread mov r15, rax loc_7968B: test r15, r15 mov r15, [rbp+var_20C0] jnz loc_79851 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r12 call _bcmp test eax, eax jnz loc_79851 add r14, r12 add r15, r12 sub r13d, r12d mov eax, 2000h cmp r13d, 2000h ja loc_79641 jmp short loc_79749 loc_796D2: mov rcx, rax lea rax, PSI_server mov rax, [rax] mov [rbp+var_20A8], rcx mov rdi, rcx mov rsi, r12 lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 67Eh call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, r14 call my_pread mov r15, rax test rax, rax mov esi, 0 cmovz rsi, r12 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_20A8] call qword ptr [rax+218h] jmp loc_7968B loc_79743: mov r15, r13 mov r13d, edx loc_79749: mov r13d, r13d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2108] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_797EB mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, r14 call my_pread mov rbx, rax loc_7978C: test rbx, rbx jnz loc_79851 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r13 call _bcmp test eax, eax jnz loc_79851 mov r13, [rbp+var_20B8] add r13, [rbp+var_2068] xor r15d, r15d mov r14d, [rbp+var_209C] sub r14d, dword ptr [rbp+var_20B0] mov r12, [rbp+var_2098] mov rbx, [rbp+var_2090] lea rdi, [rbp+var_2088] jnz loc_795AF jmp short loc_79865 loc_797EB: mov r12, rax lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r13 lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 686h call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, r14 call my_pread mov rbx, rax test rax, rax mov esi, 0 cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, r12 call qword ptr [rax+218h] jmp loc_7978C loc_79851: mov r15d, 7Bh ; '{' mov r12, [rbp+var_2098] mov rbx, [rbp+var_2090] loc_79865: call _my_thread_var mov [rax], r15d loc_7986D: cmp rbx, [r12+120h] jz short loc_7987F mov rdi, rbx call my_free loc_7987F: call _my_thread_var mov eax, [rax] loc_79886: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_798CA add rsp, 20E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_798A7: mov eax, 0FFFFFFFFh jmp short loc_79886 loc_798AE: mov r15d, 7Bh ; '{' test al, 14h jnz short loc_79865 jmp short loc_7986D loc_798BA: mov r15d, 7Fh jmp short loc_79865 loc_798C2: mov r15d, 7Bh ; '{' jmp short loc_79865 loc_798CA: call ___stack_chk_fail
long long mi_cmp_dynamic_record(unsigned long long a1, unsigned long long a2) { char *v2; // r14 long long v3; // r12 int v4; // eax int v5; // ecx long long result; // rax _BYTE *v7; // rbx int v8; // r15d long long v9; // rbx long long v10; // rax unsigned int v11; // r14d long long v12; // rax _BYTE *v13; // r13 unsigned int block_info; // eax unsigned long long v15; // rdx unsigned int v16; // ebx long long v17; // r14 unsigned int v18; // eax _BYTE *v19; // r15 unsigned int v20; // r13d unsigned long long v21; // r12 long long v22; // rax long long v23; // r15 bool v24; // zf _BYTE *v25; // r15 long long v26; // rax long long v27; // rbx _BYTE *v28; // r12 _BYTE v29[72]; // [rsp+8h] [rbp-2108h] BYREF _BYTE *v30; // [rsp+50h] [rbp-20C0h] _BYTE *v31; // [rsp+58h] [rbp-20B8h] unsigned long long v32; // [rsp+60h] [rbp-20B0h] _BYTE *v33; // [rsp+68h] [rbp-20A8h] unsigned int v34; // [rsp+74h] [rbp-209Ch] long long v35; // [rsp+78h] [rbp-2098h] _BYTE *v36; // [rsp+80h] [rbp-2090h] _BYTE v37[24]; // [rsp+88h] [rbp-2088h] BYREF long long v38; // [rsp+A0h] [rbp-2070h] unsigned long long v39; // [rsp+A8h] [rbp-2068h] long long v40; // [rsp+C0h] [rbp-2050h] long long v41; // [rsp+C8h] [rbp-2048h] int v42; // [rsp+D8h] [rbp-2038h] _BYTE v43[8192]; // [rsp+E0h] [rbp-2030h] BYREF unsigned long long v44; // [rsp+20E0h] [rbp-30h] v2 = (char *)a2; v3 = a1; v44 = __readfsqword(0x28u); v4 = *(_DWORD *)(a1 + 456); if ( (v4 & 0x10) != 0 ) { *(_BYTE *)(a1 + 465) &= 0xF6u; a1 += 544LL; a2 = 1LL; v5 = my_b_flush_io_cache(a1, 1LL); result = 0xFFFFFFFFLL; if ( v5 ) return result; v4 = *(_DWORD *)(v3 + 456); } *(_DWORD *)(v3 + 768) = 1; v7 = *(_BYTE **)(v3 + 288); v8 = 0; if ( (v4 & 4) == 0 ) goto LABEL_36; if ( *(_DWORD *)(*(_QWORD *)v3 + 392LL) ) { v9 = *(_QWORD *)(*(_QWORD *)v3 + 328LL); v10 = mi_calc_total_blob_length((_QWORD *)v3, (long long)v2); v7 = (_BYTE *)my_malloc(0LL, v10 + v9, 0LL); if ( !v7 ) return 0xFFFFFFFFLL; } a1 = v3; a2 = (unsigned long long)v7; v11 = mi_rec_pack(v3, v7, v2); v12 = *(_QWORD *)(v3 + 368); v42 = 0; v41 = v12; if ( v11 ) { LOBYTE(v8) = 1; a1 = (unsigned long long)v37; v13 = v7; v35 = v3; v36 = v7; while ( 1 ) { a2 = *(unsigned int *)(v3 + 448); block_info = mi_get_block_info((long long)v37, a2, v41); if ( block_info >= 4 ) break; if ( (v8 & 1) != 0 ) { if ( v38 != v11 ) { v8 = 123; goto LABEL_36; } v15 = v39; } else { v15 = v39; if ( v39 > v11 ) { v8 = 127; goto LABEL_36; } } v34 = v11; v16 = *(_DWORD *)(v3 + 448); v17 = v40; v31 = v13; v32 = v15; if ( (unsigned int)v15 >= 0x2001 ) { v18 = 0x2000 - (v40 & 0xFFF); v19 = v13; v20 = v15; while ( 1 ) { v30 = v19; v21 = v18; v22 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v29, v16, 6LL); if ( v22 ) { v33 = (_BYTE *)v22; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v22, v21, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1662LL); v23 = my_pread(v16, v43, v21, v17, 4LL); a2 = 0LL; if ( !v23 ) a2 = v21; a1 = (unsigned long long)v33; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v33, a2); } else { a1 = v16; a2 = (unsigned long long)v43; v23 = my_pread(v16, v43, v21, v17, 4LL); } v24 = v23 == 0; v25 = v30; if ( !v24 ) break; a1 = (unsigned long long)v30; a2 = (unsigned long long)v43; if ( (unsigned int)bcmp(v30, v43, v21) ) break; v17 += v21; v19 = &v25[v21]; v20 -= v21; v18 = 0x2000; if ( v20 <= 0x2000 ) goto LABEL_26; } LABEL_35: v8 = 123; v3 = v35; v7 = v36; goto LABEL_36; } v19 = v13; v20 = v15; LABEL_26: v26 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v29, v16, 6LL); if ( v26 ) { v28 = (_BYTE *)v26; ((void ( *)(long long, _QWORD, const char *, long long))PSI_server[66])( v26, v20, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1670LL); v27 = my_pread(v16, v43, v20, v17, 4LL); a2 = 0LL; if ( !v27 ) a2 = v20; a1 = (unsigned long long)v28; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v28, a2); } else { a1 = v16; a2 = (unsigned long long)v43; v27 = my_pread(v16, v43, v20, v17, 4LL); } if ( v27 ) goto LABEL_35; a1 = (unsigned long long)v19; a2 = (unsigned long long)v43; if ( (unsigned int)bcmp(v19, v43, v20) ) goto LABEL_35; v13 = &v31[v39]; v8 = 0; v11 = v34 - v32; v3 = v35; v7 = v36; a1 = (unsigned long long)v37; if ( v34 == (_DWORD)v32 ) goto LABEL_36; } v8 = 123; if ( (block_info & 0x14) != 0 ) goto LABEL_36; } else { LABEL_36: *(_DWORD *)my_thread_var(a1, (const char *)a2) = v8; } if ( v7 != *(_BYTE **)(v3 + 288) ) { a1 = (unsigned long long)v7; my_free(v7); } return *(unsigned int *)my_thread_var(a1, (const char *)a2); }
_mi_cmp_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20e8 MOV R14,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RDI + 0x1c8] TEST AL,0x10 JZ 0x00179508 AND byte ptr [R12 + 0x1d1],0xf6 LEA RDI,[R12 + 0x220] MOV ESI,0x1 CALL 0x00195539 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x00179886 MOV EAX,dword ptr [R12 + 0x1c8] LAB_00179508: MOV dword ptr [R12 + 0x300],0x1 MOV RBX,qword ptr [R12 + 0x120] XOR R15D,R15D TEST AL,0x4 JZ 0x00179865 MOV RAX,qword ptr [R12] CMP dword ptr [RAX + 0x188],0x0 JZ 0x00179561 MOV RBX,qword ptr [RAX + 0x148] MOV RDI,R12 MOV RSI,R14 CALL 0x00177a04 ADD RBX,RAX XOR EDI,EDI MOV RSI,RBX XOR EDX,EDX CALL 0x0019fd89 MOV RBX,RAX TEST RAX,RAX JZ 0x001798a7 LAB_00179561: MOV RDI,R12 MOV RSI,RBX MOV RDX,R14 CALL 0x001770ca MOV R14D,EAX MOV RAX,qword ptr [R12 + 0x170] MOV dword ptr [RBP + -0x2038],0x0 MOV qword ptr [RBP + -0x2048],RAX TEST R14D,R14D JZ 0x00179865 MOV R15B,0x1 LEA RDI,[RBP + -0x2088] MOV R13,RBX MOV qword ptr [RBP + -0x2098],R12 MOV qword ptr [RBP + -0x2090],RBX LAB_001795af: MOV ESI,dword ptr [R12 + 0x1c0] MOV RDX,qword ptr [RBP + -0x2048] CALL 0x001783eb CMP EAX,0x4 JNC 0x001798ae MOV EAX,R14D TEST R15B,0x1 JZ 0x001795eb CMP qword ptr [RBP + -0x2070],RAX JNZ 0x001798c2 MOV RDX,qword ptr [RBP + -0x2068] JMP 0x001795fb LAB_001795eb: MOV RDX,qword ptr [RBP + -0x2068] CMP RDX,RAX JA 0x001798ba LAB_001795fb: MOV dword ptr [RBP + -0x209c],R14D MOV EBX,dword ptr [R12 + 0x1c0] MOV R14,qword ptr [RBP + -0x2050] CMP EDX,0x2001 MOV qword ptr [RBP + -0x20b8],R13 MOV qword ptr [RBP + -0x20b0],RDX JC 0x00179743 MOV ECX,R14D AND ECX,0xfff MOV EAX,0x2000 SUB EAX,ECX MOV R15,R13 MOV R13D,EDX LAB_00179641: MOV qword ptr [RBP + -0x20c0],R15 MOV R12D,EAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2108] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001796d2 MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,R14 CALL 0x001a0638 MOV R15,RAX LAB_0017968b: TEST R15,R15 MOV R15,qword ptr [RBP + -0x20c0] JNZ 0x00179851 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R12 CALL 0x00129560 TEST EAX,EAX JNZ 0x00179851 ADD R14,R12 ADD R15,R12 SUB R13D,R12D MOV EAX,0x2000 CMP R13D,0x2000 JA 0x00179641 JMP 0x00179749 LAB_001796d2: MOV RCX,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20a8],RCX MOV RDI,RCX MOV RSI,R12 LEA RDX,[0x1dbbaa] MOV ECX,0x67e CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,R14 CALL 0x001a0638 MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R12 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x20a8] CALL qword ptr [RAX + 0x218] JMP 0x0017968b LAB_00179743: MOV R15,R13 MOV R13D,EDX LAB_00179749: MOV R13D,R13D LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2108] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001797eb MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,R14 CALL 0x001a0638 MOV RBX,RAX LAB_0017978c: TEST RBX,RBX JNZ 0x00179851 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R13 CALL 0x00129560 TEST EAX,EAX JNZ 0x00179851 MOV R13,qword ptr [RBP + -0x20b8] ADD R13,qword ptr [RBP + -0x2068] XOR R15D,R15D MOV R14D,dword ptr [RBP + -0x209c] SUB R14D,dword ptr [RBP + -0x20b0] MOV R12,qword ptr [RBP + -0x2098] MOV RBX,qword ptr [RBP + -0x2090] LEA RDI,[RBP + -0x2088] JNZ 0x001795af JMP 0x00179865 LAB_001797eb: MOV R12,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R13 LEA RDX,[0x1dbbaa] MOV ECX,0x686 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,R14 CALL 0x001a0638 MOV RBX,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R13 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x0017978c LAB_00179851: MOV R15D,0x7b MOV R12,qword ptr [RBP + -0x2098] MOV RBX,qword ptr [RBP + -0x2090] LAB_00179865: CALL 0x001a1afa MOV dword ptr [RAX],R15D LAB_0017986d: CMP RBX,qword ptr [R12 + 0x120] JZ 0x0017987f MOV RDI,RBX CALL 0x0019ffb6 LAB_0017987f: CALL 0x001a1afa MOV EAX,dword ptr [RAX] LAB_00179886: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001798ca ADD RSP,0x20e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001798a7: MOV EAX,0xffffffff JMP 0x00179886 LAB_001798ae: MOV R15D,0x7b TEST AL,0x14 JNZ 0x00179865 JMP 0x0017986d LAB_001798ba: MOV R15D,0x7f JMP 0x00179865 LAB_001798c2: MOV R15D,0x7b JMP 0x00179865 LAB_001798ca: CALL 0x00129270
int4 _mi_cmp_dynamic_record(long *param_1,int8 param_2) { int iVar1; uint uVar2; uint uVar3; long lVar4; void *pvVar5; int4 *puVar6; void *pvVar7; ulong uVar8; ulong uVar9; ulong uVar10; long lVar11; bool bVar12; int4 uVar13; long in_FS_OFFSET; int1 local_2110 [72]; void *local_20c8; void *local_20c0; ulong local_20b8; long local_20b0; uint local_20a4; long *local_20a0; void *local_2098; int1 local_2090 [24]; ulong local_2078; ulong local_2070; long local_2058; long local_2050; int4 local_2040; int1 local_2038 [8192]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *(uint *)(param_1 + 0x39); if ((uVar2 & 0x10) != 0) { *(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xf6; iVar1 = my_b_flush_io_cache(param_1 + 0x44,1); uVar13 = 0xffffffff; if (iVar1 != 0) goto LAB_00179886; uVar2 = *(uint *)(param_1 + 0x39); } *(int4 *)(param_1 + 0x60) = 1; pvVar5 = (void *)param_1[0x24]; uVar13 = 0; pvVar7 = pvVar5; if ((uVar2 & 4) != 0) { if (*(int *)(*param_1 + 0x188) != 0) { lVar11 = *(long *)(*param_1 + 0x148); lVar4 = _mi_calc_total_blob_length(param_1,param_2); pvVar5 = (void *)my_malloc(0,lVar11 + lVar4,0); if (pvVar5 == (void *)0x0) { uVar13 = 0xffffffff; goto LAB_00179886; } } uVar2 = _mi_rec_pack(param_1,pvVar5,param_2); local_2050 = param_1[0x2e]; local_2040 = 0; pvVar7 = pvVar5; if (uVar2 != 0) { bVar12 = true; local_20a0 = param_1; local_2098 = pvVar5; do { pvVar7 = local_2098; param_1 = local_20a0; uVar3 = _mi_get_block_info(local_2090,(int)local_20a0[0x38],local_2050); if (3 < uVar3) { uVar13 = 0x7b; if ((uVar3 & 0x14) == 0) goto LAB_0017986d; break; } if (bVar12) { if (local_2078 != uVar2) { uVar13 = 0x7b; break; } } else if (uVar2 < local_2070) { uVar13 = 0x7f; break; } uVar13 = (int4)param_1[0x38]; uVar3 = (uint)local_2070; local_20b8 = local_2070; lVar11 = local_2058; local_20c0 = pvVar5; local_20a4 = uVar2; if (0x2000 < uVar3) { uVar2 = 0x2000 - ((uint)local_2058 & 0xfff); uVar10 = local_2070 & 0xffffffff; do { uVar9 = (ulong)uVar2; local_20c8 = pvVar5; lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6); if (lVar4 == 0) { lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4); } else { local_20b0 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,uVar9, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x67e ); lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4); uVar8 = 0; if (lVar4 == 0) { uVar8 = uVar9; } (**(code **)(PSI_server + 0x218))(local_20b0,uVar8); } pvVar5 = local_20c8; if ((lVar4 != 0) || (iVar1 = bcmp(local_20c8,local_2038,uVar9), iVar1 != 0)) goto LAB_00179851; lVar11 = lVar11 + uVar9; pvVar5 = (void *)((long)pvVar5 + uVar9); uVar3 = (int)uVar10 - uVar2; uVar10 = (ulong)uVar3; uVar2 = 0x2000; } while (0x2000 < uVar3); } uVar10 = (ulong)uVar3; lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6); if (lVar4 == 0) { lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4); } else { (**(code **)(PSI_server + 0x210)) (lVar4,uVar10, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x686); lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4); uVar9 = 0; if (lVar11 == 0) { uVar9 = uVar10; } (**(code **)(PSI_server + 0x218))(lVar4,uVar9); } if ((lVar11 != 0) || (iVar1 = bcmp(pvVar5,local_2038,uVar10), iVar1 != 0)) { LAB_00179851: uVar13 = 0x7b; pvVar7 = local_2098; param_1 = local_20a0; break; } pvVar5 = (void *)((long)local_20c0 + local_2070); bVar12 = false; uVar13 = 0; uVar2 = local_20a4 - (int)local_20b8; pvVar7 = local_2098; param_1 = local_20a0; } while (uVar2 != 0); } } puVar6 = (int4 *)_my_thread_var(); *puVar6 = uVar13; LAB_0017986d: if (pvVar7 != (void *)param_1[0x24]) { my_free(pvVar7); } puVar6 = (int4 *)_my_thread_var(); uVar13 = *puVar6; LAB_00179886: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar13; }
25,713
testing::internal::MarkAsIgnored::MarkAsIgnored(char const*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
MarkAsIgnored::MarkAsIgnored(const char* test_suite) { GetIgnoredParameterizedTestSuites()->insert(test_suite); }
O1
cpp
testing::internal::MarkAsIgnored::MarkAsIgnored(char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx callq 0x19012 movl $0x1a0, %r14d # imm = 0x1A0 addq 0x40196(%rip), %r14 # 0x597b0 leaq 0x10(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x81e0 movq %r14, %rdi movq %r15, %rsi callq 0x3a474 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x19655 movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1967d movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZN7testing8internal13MarkAsIgnoredC2EPKc: push r15; Alternative name is 'testing::internal::MarkAsIgnored::MarkAsIgnored(char const*)' push r14 push rbx sub rsp, 30h mov rbx, rsi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov r14d, 1A0h add r14, cs:qword_597B0 lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] mov rdi, r15 mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) mov rdi, r14 mov rsi, r15 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string>(std::string &&) lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_19655 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_19655: add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1967D mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1967D: mov rdi, rbx call __Unwind_Resume
void testing::internal::MarkAsIgnored::MarkAsIgnored(testing::internal::MarkAsIgnored *this, const char *a2) { char *v2; // r14 char v3; // [rsp+Fh] [rbp-39h] BYREF void *v4[2]; // [rsp+10h] [rbp-38h] BYREF long long v5; // [rsp+20h] [rbp-28h] BYREF testing::UnitTest::GetInstance(this); v2 = (char *)qword_597B0 + 416; std::string::basic_string(v4, a2, &v3); std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string>( v2, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); }
MarkAsIgnored: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI CALL 0x00119012 MOV R14D,0x1a0 ADD R14,qword ptr [0x001597b0] LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,R15 MOV RSI,RBX CALL 0x001081e0 LAB_0011962f: MOV RDI,R14 MOV RSI,R15 CALL 0x0013a474 LAB_0011963a: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00119655 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001084e0 LAB_00119655: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* testing::internal::MarkAsIgnored::MarkAsIgnored(char const*) */ void __thiscall testing::internal::MarkAsIgnored::MarkAsIgnored(MarkAsIgnored *this,char *param_1) { _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *this_00; allocator local_39; long *local_38 [2]; long local_28 [2]; UnitTest::GetInstance(); this_00 = (_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(UnitTest::GetInstance()::instance._64_8_ + 0x1a0); std::__cxx11::string::string((string *)local_38,param_1,&local_39); /* try { // try from 0011962f to 00119639 has its CatchHandler @ 0011965f */ std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::_M_insert_unique<std::__cxx11::string>(this_00,(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return; }
25,714
uf_blob
eloqsql/storage/myisam/mi_packrec.c
static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((uchar*) to,(end-to)); else { ulong length=get_bits(bit_buff,rec->space_length_bits); uint pack_length=(uint) (end-to)-portable_sizeof_char_ptr; if (bit_buff->blob_pos+length > bit_buff->blob_end) { bit_buff->error=1; bzero((uchar*) to,(end-to)); return; } decode_bytes(rec,bit_buff,bit_buff->blob_pos,bit_buff->blob_pos+length); _mi_store_blob_length((uchar*) to,pack_length,length); memcpy(to+pack_length, &bit_buff->blob_pos, sizeof(char*)); bit_buff->blob_pos+=length; } }
O0
c
uf_blob: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbdaf7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbdb1b jmp 0xbdb36 movq -0x10(%rbp), %rdi callq 0xbc370 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbdb36 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x2a2c0 jmp 0xbdc35 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbdb79 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x201acf(%rip), %rcx # 0x2bf640 andl (%rcx,%rdx,4), %eax movl %eax, -0x30(%rbp) jmp 0xbdb8c movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbab20 movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, %eax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax subl $0x8, %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax addq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x20(%rcx), %rax jbe 0xbdbdf movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x2a2c0 jmp 0xbdc35 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx addq -0x28(%rbp), %rcx callq 0xbca80 movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x28(%rbp), %rax movl %eax, %edx callq 0xab740 movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx movq -0x10(%rbp), %rdx movq 0x18(%rdx), %rdx movq %rdx, (%rax,%rcx) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
uf_blob_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BDAF7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BDB1B jmp short loc_BDB36 loc_BDAF7: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BDB36 loc_BDB1B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax xor esi, esi call _memset jmp loc_BDC35 loc_BDB36: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BDB79 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_30], eax jmp short loc_BDB8C loc_BDB79: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_30], eax loc_BDB8C: mov eax, [rbp+var_30] mov eax, eax mov [rbp+var_28], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx sub eax, 8 mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov rax, [rax+18h] add rax, [rbp+var_28] mov rcx, [rbp+var_10] cmp rax, [rcx+20h] jbe short loc_BDBDF mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax xor esi, esi call _memset jmp short loc_BDC35 loc_BDBDF: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+18h] mov rax, [rbp+var_10] mov rcx, [rax+18h] add rcx, [rbp+var_28] call decode_bytes_0 mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov rax, [rbp+var_28] mov edx, eax call _mi_store_blob_length mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] mov rdx, [rbp+var_10] mov rdx, [rdx+18h] mov [rax+rcx], rdx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] add rcx, [rax+18h] mov [rax+18h], rcx loc_BDC35: add rsp, 30h pop rbp retn
long long uf_blob_0(long long a1, long long a2, _BYTE *a3, long long a4) { int v4; // eax int v5; // ecx long long result; // rax unsigned int v7; // eax int v8; // ecx unsigned int bits_0; // [rsp+0h] [rbp-30h] unsigned int v10; // [rsp+4h] [rbp-2Ch] if ( *(_DWORD *)(a2 + 4) ) { v4 = *(_DWORD *)a2; v5 = *(_DWORD *)(a2 + 4) - 1; *(_DWORD *)(a2 + 4) = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 0LL, a4 - (_QWORD)a3); } fill_buffer_0(a2); *(_DWORD *)(a2 + 4) = 31; if ( *(int *)a2 < 0 ) return memset(a3, 0LL, a4 - (_QWORD)a3); LABEL_6: if ( *(_DWORD *)(a2 + 4) < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0((_DWORD *)a2, *(_DWORD *)(a1 + 28)); } else { v7 = *(_DWORD *)a2; v8 = *(_DWORD *)(a2 + 4) - *(_DWORD *)(a1 + 28); *(_DWORD *)(a2 + 4) = v8; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v8); } v10 = a4 - (_DWORD)a3 - 8; if ( (unsigned long long)bits_0 + *(_QWORD *)(a2 + 24) <= *(_QWORD *)(a2 + 32) ) { decode_bytes_0(a1, a2, *(_BYTE **)(a2 + 24), (_BYTE *)(bits_0 + *(_QWORD *)(a2 + 24))); mi_store_blob_length(a3, v10, bits_0); *(_QWORD *)&a3[v10] = *(_QWORD *)(a2 + 24); result = a2; *(_QWORD *)(a2 + 24) += bits_0; } else { *(_DWORD *)(a2 + 40) = 1; return memset(a3, 0LL, a4 - (_QWORD)a3); } return result; }
uf_blob: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bdaf7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bdb1b JMP 0x001bdb36 LAB_001bdaf7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bc370 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bdb36 LAB_001bdb1b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX XOR ESI,ESI CALL 0x0012a2c0 JMP 0x001bdc35 LAB_001bdb36: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bdb79 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3bf640] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x30],EAX JMP 0x001bdb8c LAB_001bdb79: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bab20 MOV dword ptr [RBP + -0x30],EAX LAB_001bdb8c: MOV EAX,dword ptr [RBP + -0x30] MOV EAX,EAX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SUB EAX,0x8 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] ADD RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x20] JBE 0x001bdbdf MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX XOR ESI,ESI CALL 0x0012a2c0 JMP 0x001bdc35 LAB_001bdbdf: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,qword ptr [RBP + -0x28] CALL 0x001bca80 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x28] MOV EDX,EAX CALL 0x001ab740 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + RCX*0x1],RDX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_001bdc35: ADD RSP,0x30 POP RBP RET
void uf_blob(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; ulong uVar2; uint local_38; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_38 = fill_and_get_bits(param_2); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_38 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } uVar2 = (ulong)local_38; uVar1 = ((int)param_4 - (int)param_3) - 8; if (*(ulong *)(param_2 + 8) < *(long *)(param_2 + 6) + uVar2) { param_2[10] = 1; memset(param_3,0,param_4 - (long)param_3); } else { decode_bytes(param_1,param_2,*(int8 *)(param_2 + 6),*(long *)(param_2 + 6) + uVar2); _mi_store_blob_length(param_3,uVar1,uVar2); *(int8 *)((long)param_3 + (ulong)uVar1) = *(int8 *)(param_2 + 6); *(ulong *)(param_2 + 6) = uVar2 + *(long *)(param_2 + 6); } } else { memset(param_3,0,param_4 - (long)param_3); } return; }
25,715
ma_tls_read
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length) { int rc; MARIADB_PVIO *pvio= ctls->pvio; while ((rc= SSL_read((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0) { int error= SSL_get_error((SSL *)ctls->ssl, rc); if (error != SSL_ERROR_WANT_READ) break; if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.read_timeout) < 1) break; } if (rc <= 0) { MYSQL *mysql= SSL_get_app_data(ctls->ssl); ma_tls_set_error(mysql); } return rc; }
O3
c
ma_tls_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq 0x8(%rdi), %r13 movq 0x10(%r15), %rdi movq %r12, %rsi movl %ebx, %edx callq 0x14070 movl %eax, %r14d testl %eax, %eax jg 0x39d40 movq 0x10(%r15), %rdi movl %r14d, %esi callq 0x14050 cmpl $0x2, %eax jne 0x39d2d movq 0x40(%r13), %rax movq 0x48(%r13), %rcx movl 0x394(%rax), %edx movq %r13, %rdi movl $0x1, %esi callq *0x30(%rcx) testl %eax, %eax jg 0x39cea movq 0x10(%r15), %rdi xorl %esi, %esi callq 0x14160 movq %rax, %rdi callq 0x39ac0 movslq %r14d, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r12, rsi mov r15, rdi mov r13, [rdi+8] loc_39CEA: mov rdi, [r15+10h] mov rsi, r12 mov edx, ebx call _SSL_read mov r14d, eax test eax, eax jg short loc_39D40 mov rdi, [r15+10h] mov esi, r14d call _SSL_get_error cmp eax, 2 jnz short loc_39D2D mov rax, [r13+40h] mov rcx, [r13+48h] mov edx, [rax+394h] mov rdi, r13 mov esi, 1 call qword ptr [rcx+30h] test eax, eax jg short loc_39CEA loc_39D2D: mov rdi, [r15+10h] xor esi, esi call _SSL_get_ex_data mov rdi, rax call ma_tls_set_error loc_39D40: movsxd rax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_read(long long a1, long long a2, unsigned int a3) { long long v4; // r13 int v5; // eax int v6; // r14d long long *v7; // rax v4 = *(_QWORD *)(a1 + 8); while ( 1 ) { v5 = SSL_read(*(_QWORD *)(a1 + 16), a2, a3); v6 = v5; if ( v5 > 0 ) break; if ( (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v5) != 2 || (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v4 + 72) + 48LL))( v4, 1LL, *(unsigned int *)(*(_QWORD *)(v4 + 64) + 916LL)) <= 0 ) { v7 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL); ma_tls_set_error(v7); return v6; } } return v6; }
ma_tls_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV R13,qword ptr [RDI + 0x8] LAB_00139cea: MOV RDI,qword ptr [R15 + 0x10] MOV RSI,R12 MOV EDX,EBX CALL 0x00114070 MOV R14D,EAX TEST EAX,EAX JG 0x00139d40 MOV RDI,qword ptr [R15 + 0x10] MOV ESI,R14D CALL 0x00114050 CMP EAX,0x2 JNZ 0x00139d2d MOV RAX,qword ptr [R13 + 0x40] MOV RCX,qword ptr [R13 + 0x48] MOV EDX,dword ptr [RAX + 0x394] MOV RDI,R13 MOV ESI,0x1 CALL qword ptr [RCX + 0x30] TEST EAX,EAX JG 0x00139cea LAB_00139d2d: MOV RDI,qword ptr [R15 + 0x10] XOR ESI,ESI CALL 0x00114160 MOV RDI,RAX CALL 0x00139ac0 LAB_00139d40: MOVSXD RAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_tls_read(long param_1,void *param_2,int param_3) { long lVar1; int ret_code; int iVar2; void *pvVar3; lVar1 = *(long *)(param_1 + 8); do { ret_code = SSL_read(*(SSL **)(param_1 + 0x10),param_2,param_3); if (0 < ret_code) goto LAB_00139d40; iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code); if (iVar2 != 2) break; iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30)) (lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x394)); } while (0 < iVar2); pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0); ma_tls_set_error(pvVar3); LAB_00139d40: return (long)ret_code; }
25,716
my_wc_mb_filename
eloqsql/strings/ctype-utf8.c
static int my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; static const char hex[]= "0123456789abcdef"; if (s >= e) return MY_CS_TOOSMALL; if (wc < 128 && filename_safe_char[wc]) { *s= (uchar) wc; return 1; } if (s + 3 > e) return MY_CS_TOOSMALL3; *s++= MY_FILENAME_ESCAPE; if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) || (wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) || (wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) || (wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) || (wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20]))) { *s++= (code / 80) + 0x30; *s++= (code % 80) + 0x30; return 3; } /* Non letter */ if (s + 4 > e) return MY_CS_TOOSMALL5; *s++= hex[(wc >> 12) & 15]; *s++= hex[(wc >> 8) & 15]; *s++= hex[(wc >> 4) & 15]; *s++= hex[(wc) & 15]; return 5; }
O3
c
my_wc_mb_filename: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x52372 cmpq $0x7f, %rsi ja 0x522d2 leaq 0x281eb1(%rip), %rax # 0x2d4170 cmpb $0x0, (%rsi,%rax) je 0x522d2 movb %sil, (%rdx) movl $0x1, %eax jmp 0x52372 leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0x52372 movb $0x40, (%rdx) leaq -0xc0(%rsi), %rax cmpq $0x53f, %rax # imm = 0x53F ja 0x5230a leaq 0x285413(%rip), %rax # 0x2d7710 movzwl -0x180(%rax,%rsi,2), %eax testw %ax, %ax jne 0x5234d movq %rsi, %rax andq $-0x200, %rax # imm = 0xFE00 cmpq $0x1e00, %rax # imm = 0x1E00 jne 0x5232f leaq 0x284eae(%rip), %rax # 0x2d71d0 movzwl -0x3c00(%rax,%rsi,2), %eax testw %ax, %ax jne 0x5234d movq %rsi, %rax andq $-0x20, %rax cmpq $0x2160, %rax # imm = 0x2160 jne 0x52374 leaq 0x28528b(%rip), %rax # 0x2d75d0 movzwl -0x42c0(%rax,%rsi,2), %eax movzwl %ax, %ecx imull $0xcccd, %ecx, %ecx # imm = 0xCCCD shrl $0x16, %ecx leal 0x30(%rcx), %esi movb %sil, 0x1(%rdx) shll $0x4, %ecx leal (%rcx,%rcx,4), %ecx subl %ecx, %eax addb $0x30, %al movb %al, 0x2(%rdx) movl $0x3, %eax popq %rbp retq leaq -0x24b0(%rsi), %rax cmpq $0x3f, %rax ja 0x5239f leaq -0x24ea(%rsi), %rax cmpq $-0x34, %rax jb 0x523cd leaq 0x28527b(%rip), %rax # 0x2d7610 movzwl -0x4960(%rax,%rsi,2), %eax jmp 0x5234d leaq -0xff20(%rsi), %rax cmpq $0x3f, %rax ja 0x523cd movabsq $-0x7fffffe07ffffff, %rdi # imm = 0xF8000001F8000001 btq %rax, %rdi jb 0x523cd leaq 0x2852cd(%rip), %rax # 0x2d7690 movzwl -0x1fe40(%rax,%rsi,2), %eax jmp 0x5234d leaq 0x5(%rdx), %rdi movl $0xffffff97, %eax # imm = 0xFFFFFF97 cmpq %rcx, %rdi ja 0x52372 movl %esi, %eax shrl $0xc, %eax andl $0xf, %eax leaq 0x285da6(%rip), %rcx # 0x2d8190 movb (%rax,%rcx), %al movb %al, 0x1(%rdx) movl %esi, %eax shrl $0x8, %eax andl $0xf, %eax movb (%rax,%rcx), %al movb %al, 0x2(%rdx) movl %esi, %eax shrl $0x4, %eax andl $0xf, %eax movb (%rax,%rcx), %al movb %al, 0x3(%rdx) andl $0xf, %esi movb (%rsi,%rcx), %al movb %al, 0x4(%rdx) movl $0x5, %eax jmp 0x52372
my_wc_mb_filename: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_52372 cmp rsi, 7Fh ja short loc_522D2 lea rax, filename_safe_char cmp byte ptr [rsi+rax], 0 jz short loc_522D2 mov [rdx], sil mov eax, 1 jmp loc_52372 loc_522D2: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_52372 mov byte ptr [rdx], 40h ; '@' lea rax, [rsi-0C0h] cmp rax, 53Fh ja short loc_5230A lea rax, uni_0C00_05FF movzx eax, word ptr [rax+rsi*2-180h] test ax, ax jnz short loc_5234D loc_5230A: mov rax, rsi and rax, 0FFFFFFFFFFFFFE00h cmp rax, 1E00h jnz short loc_5232F lea rax, uni_1E00_1FFF movzx eax, word ptr [rax+rsi*2-3C00h] test ax, ax jnz short loc_5234D loc_5232F: mov rax, rsi and rax, 0FFFFFFFFFFFFFFE0h cmp rax, 2160h jnz short loc_52374 lea rax, uni_2160_217F movzx eax, word ptr [rax+rsi*2-42C0h] loc_5234D: movzx ecx, ax imul ecx, 0CCCDh shr ecx, 16h lea esi, [rcx+30h] mov [rdx+1], sil shl ecx, 4 lea ecx, [rcx+rcx*4] sub eax, ecx add al, 30h ; '0' mov [rdx+2], al mov eax, 3 loc_52372: pop rbp retn loc_52374: lea rax, [rsi-24B0h] cmp rax, 3Fh ; '?' ja short loc_5239F lea rax, [rsi-24EAh] cmp rax, 0FFFFFFFFFFFFFFCCh jb short loc_523CD lea rax, uni_24B0_24EF movzx eax, word ptr [rax+rsi*2-4960h] jmp short loc_5234D loc_5239F: lea rax, [rsi-0FF20h] cmp rax, 3Fh ; '?' ja short loc_523CD mov rdi, 0F8000001F8000001h bt rdi, rax jb short loc_523CD lea rax, uni_FF20_FF5F movzx eax, word ptr [rax+rsi*2-1FE40h] jmp short loc_5234D loc_523CD: lea rdi, [rdx+5] mov eax, 0FFFFFF97h cmp rdi, rcx ja short loc_52372 mov eax, esi shr eax, 0Ch and eax, 0Fh lea rcx, my_wc_mb_filename_hex; "0123456789abcdef" mov al, [rax+rcx] mov [rdx+1], al mov eax, esi shr eax, 8 and eax, 0Fh mov al, [rax+rcx] mov [rdx+2], al mov eax, esi shr eax, 4 and eax, 0Fh mov al, [rax+rcx] mov [rdx+3], al and esi, 0Fh mov al, [rsi+rcx] mov [rdx+4], al mov eax, 5 jmp loc_52372
long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax unsigned __int16 v5; // ax unsigned long long v6; // rdi result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 <= 0x7F && filename_safe_char[a2] ) { *a3 = a2; return 1LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) <= a4 ) { *a3 = 64; if ( a2 - 192 <= 0x53F ) { v5 = uni_0C00_05FF[a2 - 192]; if ( v5 ) goto LABEL_12; } if ( (a2 & 0xFFFFFFFFFFFFFE00LL) == 0x1E00 ) { v5 = uni_1E00_1FFF[a2 - 7680]; if ( v5 ) goto LABEL_12; } if ( (a2 & 0xFFFFFFFFFFFFFFE0LL) == 0x2160 ) { v5 = uni_2160_217F[a2 - 8544]; LABEL_12: a3[1] = v5 / 0x50u + 48; a3[2] = v5 % 0x50u + 48; return 3LL; } if ( a2 - 9392 > 0x3F ) { if ( a2 - 65312 <= 0x3F ) { v6 = 0xF8000001F8000001LL; if ( !_bittest64((const long long *)&v6, a2 - 65312) ) { v5 = uni_FF20_FF5F[a2 - 65312]; goto LABEL_12; } } } else if ( a2 - 9450 >= 0xFFFFFFFFFFFFFFCCLL ) { v5 = uni_24B0_24EF[a2 - 9392]; goto LABEL_12; } result = 4294967191LL; if ( (unsigned long long)(a3 + 5) <= a4 ) { a3[1] = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12]; a3[2] = my_wc_mb_filename_hex[((unsigned int)a2 >> 8) & 0xF]; a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4]; a3[4] = my_wc_mb_filename_hex[a2 & 0xF]; return 5LL; } } } return result; }
my_wc_mb_filename: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00152372 CMP RSI,0x7f JA 0x001522d2 LEA RAX,[0x3d4170] CMP byte ptr [RSI + RAX*0x1],0x0 JZ 0x001522d2 MOV byte ptr [RDX],SIL MOV EAX,0x1 JMP 0x00152372 LAB_001522d2: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x00152372 MOV byte ptr [RDX],0x40 LEA RAX,[RSI + -0xc0] CMP RAX,0x53f JA 0x0015230a LEA RAX,[0x3d7710] MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x180] TEST AX,AX JNZ 0x0015234d LAB_0015230a: MOV RAX,RSI AND RAX,-0x200 CMP RAX,0x1e00 JNZ 0x0015232f LEA RAX,[0x3d71d0] MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x3c00] TEST AX,AX JNZ 0x0015234d LAB_0015232f: MOV RAX,RSI AND RAX,-0x20 CMP RAX,0x2160 JNZ 0x00152374 LEA RAX,[0x3d75d0] MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x42c0] LAB_0015234d: MOVZX ECX,AX IMUL ECX,ECX,0xcccd SHR ECX,0x16 LEA ESI,[RCX + 0x30] MOV byte ptr [RDX + 0x1],SIL SHL ECX,0x4 LEA ECX,[RCX + RCX*0x4] SUB EAX,ECX ADD AL,0x30 MOV byte ptr [RDX + 0x2],AL MOV EAX,0x3 LAB_00152372: POP RBP RET LAB_00152374: LEA RAX,[RSI + -0x24b0] CMP RAX,0x3f JA 0x0015239f LEA RAX,[RSI + -0x24ea] CMP RAX,-0x34 JC 0x001523cd LEA RAX,[0x3d7610] MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x4960] JMP 0x0015234d LAB_0015239f: LEA RAX,[RSI + -0xff20] CMP RAX,0x3f JA 0x001523cd MOV RDI,-0x7fffffe07ffffff BT RDI,RAX JC 0x001523cd LEA RAX,[0x3d7690] MOVZX EAX,word ptr [RAX + RSI*0x2 + -0x1fe40] JMP 0x0015234d LAB_001523cd: LEA RDI,[RDX + 0x5] MOV EAX,0xffffff97 CMP RDI,RCX JA 0x00152372 MOV EAX,ESI SHR EAX,0xc AND EAX,0xf LEA RCX,[0x3d8190] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RDX + 0x1],AL MOV EAX,ESI SHR EAX,0x8 AND EAX,0xf MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RDX + 0x2],AL MOV EAX,ESI SHR EAX,0x4 AND EAX,0xf MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RDX + 0x3],AL AND ESI,0xf MOV AL,byte ptr [RSI + RCX*0x1] MOV byte ptr [RDX + 0x4],AL MOV EAX,0x5 JMP 0x00152372
int8 my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort uVar1; if (param_4 <= param_3) { return 0xffffff9b; } if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) { *param_3 = (char)param_2; return 1; } if (param_4 < param_3 + 3) { return 0xffffff99; } *param_3 = 0x40; if (((0x53f < param_2 - 0xc0) || (uVar1 = *(ushort *)(uni_1E00_1FFF + param_2 * 2 + 0x3c0), uVar1 == 0)) && (((param_2 & 0xfffffffffffffe00) != 0x1e00 || (uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x1f780), uVar1 == 0)))) { if ((param_2 & 0xffffffffffffffe0) == 0x2160) { uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x1f4c0); } else if (param_2 - 0x24b0 < 0x40) { if (param_2 - 0x24ea < 0xffffffffffffffcc) { LAB_001523cd: if (param_4 < param_3 + 5) { return 0xffffff97; } param_3[1] = "0123456789abcdef"[(uint)(param_2 >> 0xc) & 0xf]; param_3[2] = "0123456789abcdef"[(uint)(param_2 >> 8) & 0xf]; param_3[3] = "0123456789abcdef"[(uint)(param_2 >> 4) & 0xf]; param_3[4] = "0123456789abcdef"[(uint)param_2 & 0xf]; return 5; } uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x1ee60); } else { if ((0x3f < param_2 - 0xff20) || ((0xf8000001f8000001U >> (param_2 - 0xff20 & 0x3f) & 1) != 0) ) goto LAB_001523cd; uVar1 = *(ushort *)(unicode_to_jisx0212_eucjp + param_2 * 2 + 0x3a00); } } param_3[1] = (char)(uVar1 / 0x50) + '0'; param_3[2] = (char)uVar1 + (char)(uVar1 / 0x50 << 4) * -5 + '0'; return 3; }
25,717
maria_ft_parse_internal
eloqsql/storage/maria/ma_ft_parser.c
static int maria_ft_parse_internal(MYSQL_FTPARSER_PARAM *param, const char *doc_arg, int doc_len) { uchar *doc= (uchar*) doc_arg; uchar *end= doc + doc_len; MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam; TREE *wtree= ft_param->wtree; FT_WORD w; DBUG_ENTER("maria_ft_parse_internal"); while (maria_ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE)) if (param->mysql_add_word(param, (char*)w.pos, w.len, 0)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
maria_ft_parse_internal: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movslq -0x1c(%rbp), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq 0x230(%rax), %rdi movq -0x30(%rbp), %rdx leaq -0x28(%rbp), %rsi leaq -0x58(%rbp), %rcx movl $0x1, %r8d callq 0x4ce30 cmpb $0x0, %al je 0x4d230 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rdi movq -0x58(%rbp), %rsi movl -0x50(%rbp), %edx xorl %ecx, %ecx callq *%rax cmpl $0x0, %eax je 0x4d22e jmp 0x4d225 movl $0x1, -0x4(%rbp) jmp 0x4d239 jmp 0x4d1e1 jmp 0x4d232 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_ft_parse_internal: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_28] movsxd rcx, [rbp+var_1C] add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_40], rax loc_4D1E1: mov rax, [rbp+var_40] mov rdi, [rax+230h] mov rdx, [rbp+var_30] lea rsi, [rbp+var_28] lea rcx, [rbp+var_58] mov r8d, 1 call maria_ft_simple_get_word cmp al, 0 jz short loc_4D230 mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rbp+var_10] mov rsi, [rbp+var_58] mov edx, [rbp+var_50] xor ecx, ecx call rax cmp eax, 0 jz short loc_4D22E jmp short $+2 loc_4D225: mov [rbp+var_4], 1 jmp short loc_4D239 loc_4D22E: jmp short loc_4D1E1 loc_4D230: jmp short $+2 loc_4D232: mov [rbp+var_4], 0 loc_4D239: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long maria_ft_parse_internal(long long a1, _BYTE *a2, int a3) { long long v4; // [rsp+8h] [rbp-58h] BYREF unsigned int v5; // [rsp+10h] [rbp-50h] long long v6; // [rsp+20h] [rbp-40h] long long *v7; // [rsp+28h] [rbp-38h] _BYTE *v8; // [rsp+30h] [rbp-30h] _BYTE *v9; // [rsp+38h] [rbp-28h] BYREF int v10; // [rsp+44h] [rbp-1Ch] _BYTE *v11; // [rsp+48h] [rbp-18h] long long v12; // [rsp+50h] [rbp-10h] v12 = a1; v11 = a2; v10 = a3; v9 = a2; v8 = &a2[a3]; v7 = *(long long **)(a1 + 24); v6 = *v7; while ( maria_ft_simple_get_word(*(_QWORD *)(v6 + 560), &v9, (unsigned long long)v8, (long long)&v4, 1) ) { if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(v12 + 8))(v12, v4, v5, 0LL) ) return 1; } return 0; }
maria_ft_parse_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x1c] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX LAB_0014d1e1: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x230] MOV RDX,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x28] LEA RCX,[RBP + -0x58] MOV R8D,0x1 CALL 0x0014ce30 CMP AL,0x0 JZ 0x0014d230 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x58] MOV EDX,dword ptr [RBP + -0x50] XOR ECX,ECX CALL RAX CMP EAX,0x0 JZ 0x0014d22e JMP 0x0014d225 LAB_0014d225: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014d239 LAB_0014d22e: JMP 0x0014d1e1 LAB_0014d230: JMP 0x0014d232 LAB_0014d232: MOV dword ptr [RBP + -0x4],0x0 LAB_0014d239: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 maria_ft_parse_internal(long param_1,long param_2,int param_3) { char cVar1; int iVar2; int8 local_60; int4 local_58; long local_48; long *local_40; long local_38; long local_30; int local_24; long local_20; long local_18; local_38 = param_2 + param_3; local_40 = *(long **)(param_1 + 0x18); local_48 = *local_40; local_30 = param_2; local_24 = param_3; local_20 = param_2; local_18 = param_1; do { cVar1 = maria_ft_simple_get_word (*(int8 *)(local_48 + 0x230),&local_30,local_38,&local_60,1); if (cVar1 == '\0') { return 0; } iVar2 = (**(code **)(local_18 + 8))(local_18,local_60,local_58,0); } while (iVar2 == 0); return 1; }
25,718
ulp
eloqsql/strings/dtoa.c
static double ulp(U *x) { register Long L; U u; L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1; word0(&u) = L; word1(&u) = 0; return dval(&u); }
O0
c
ulp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax andl $0x7ff00000, %eax # imm = 0x7FF00000 subl $0x3400000, %eax # imm = 0x3400000 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) movl $0x0, -0x18(%rbp) movsd -0x18(%rbp), %xmm0 popq %rbp retq
ulp: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+4] and eax, 7FF00000h sub eax, 3400000h mov [rbp+var_C], eax mov eax, [rbp+var_C] mov dword ptr [rbp+var_18+4], eax mov dword ptr [rbp+var_18], 0 movsd xmm0, [rbp+var_18] pop rbp retn
double ulp(long long a1) { double v2; // [rsp+0h] [rbp-18h] HIDWORD(v2) = (*(_DWORD *)(a1 + 4) & 0x7FF00000) - 54525952; LODWORD(v2) = 0; return v2; }
ulp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x7ff00000 SUB EAX,0x3400000 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX MOV dword ptr [RBP + -0x18],0x0 MOVSD XMM0,qword ptr [RBP + -0x18] POP RBP RET
long ulp(long param_1) { return (ulong)((*(uint *)(param_1 + 4) & 0x7ff00000) + 0xfcc00000) << 0x20; }
25,719
fileToMemory
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_resource.c
static void* _fileToMemory(FILE* fp, const char* filename, size_t* filesize) { // open file *filesize = 0; // find size if (fseek(fp, 0, SEEK_END) != 0) { fclose(fp); mju_warning("Failed to calculate size for '%s'", filename); return NULL; } // ensure file size fits in int long long_filesize = ftell(fp); // NOLINT(runtime/int) if (long_filesize > INT_MAX) { fclose(fp); mju_warning("File size over 2GB is not supported. File: '%s'", filename); return NULL; } else if (long_filesize < 0) { fclose(fp); mju_warning("Failed to calculate size for '%s'", filename); return NULL; } *filesize = long_filesize; // go back to start of file if (fseek(fp, 0, SEEK_SET) != 0) { fclose(fp); mju_warning("Read error while reading '%s'", filename); return NULL; } // allocate and read void* buffer = mju_malloc(*filesize); if (!buffer) { mjERROR("could not allocate memory"); } size_t bytes_read = fread(buffer, 1, *filesize, fp); // check that read data matches file size if (bytes_read != *filesize) { // SHOULD NOT OCCUR if (ferror(fp)) { fclose(fp); mju_free(buffer); *filesize = 0; mju_warning("Read error while reading '%s'", filename); return NULL; } else if (feof(fp)) { *filesize = bytes_read; } } // close file, return contents fclose(fp); return buffer; }
O3
c
fileToMemory: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x400, %rsp # imm = 0x400 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r15 movq $0x0, (%rdx) xorl %esi, %esi movl $0x2, %edx callq 0x2e180 testl %eax, %eax je 0x8ec32 movq %r15, %rdi callq 0x2dd80 leaq 0x13f26a(%rip), %rdi # 0x1cde9a jmp 0x8ec7d movq %r15, %rdi callq 0x2e190 movl $0x80000000, %ecx # imm = 0x80000000 cmpq %rcx, %rax jl 0x8ec55 movq %r15, %rdi callq 0x2dd80 leaq 0x13f269(%rip), %rdi # 0x1cdebc jmp 0x8ec7d testq %rax, %rax js 0x8ec21 movq %rax, (%r12) movq %r15, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x2e180 testl %eax, %eax je 0x8ec9e movq %r15, %rdi callq 0x2dd80 leaq 0x13f26f(%rip), %rdi # 0x1cdeec xorl %r14d, %r14d movq %rbx, %rsi xorl %eax, %eax callq 0x2d270 movq %r14, %rax addq $0x400, %rsp # imm = 0x400 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq (%r12), %rdi callq 0x2dd20 movq %rax, %r14 testq %rax, %rax jne 0x8ecea leaq 0x13f254(%rip), %rsi # 0x1cdf0a movq %rsp, %r13 movl $0x400, %edx # imm = 0x400 movq %r13, %rdi callq 0x2d240 vmovups 0x13f0fb(%rip), %xmm0 # 0x1cddc9 vmovups %xmm0, 0xd(%r13) vmovups 0x13f0f9(%rip), %xmm0 # 0x1cddd5 vmovups %xmm0, 0x19(%r13) movq %r13, %rdi callq 0x2d260 movq (%r12), %rdx movl $0x1, %esi movq %r14, %rdi movq %r15, %rcx callq 0x2e1a0 cmpq (%r12), %rax jne 0x8ed11 movq %r15, %rdi callq 0x2dd80 jmp 0x8ec8a movq %rax, %r13 movq %r15, %rdi callq 0x2e1b0 testl %eax, %eax je 0x8ed3d movq %r15, %rdi callq 0x2dd80 movq %r14, %rdi callq 0x2dd10 movq $0x0, (%r12) jmp 0x8ec76 movq %r15, %rdi callq 0x2e1c0 testl %eax, %eax je 0x8ed04 movq %r13, (%r12) jmp 0x8ed04
_fileToMemory: push r15 push r14 push r13 push r12 push rbx sub rsp, 400h mov r12, rdx mov rbx, rsi mov r15, rdi mov qword ptr [rdx], 0 xor esi, esi mov edx, 2 call _fseek test eax, eax jz short loc_8EC32 loc_8EC21: mov rdi, r15 call _fclose lea rdi, aFailedToCalcul; "Failed to calculate size for '%s'" jmp short loc_8EC7D loc_8EC32: mov rdi, r15 call _ftell mov ecx, 80000000h cmp rax, rcx jl short loc_8EC55 mov rdi, r15 call _fclose lea rdi, aFileSizeOver2g; "File size over 2GB is not supported. Fi"... jmp short loc_8EC7D loc_8EC55: test rax, rax js short loc_8EC21 mov [r12], rax mov rdi, r15 xor esi, esi xor edx, edx call _fseek test eax, eax jz short loc_8EC9E mov rdi, r15 call _fclose loc_8EC76: lea rdi, aReadErrorWhile; "Read error while reading '%s'" loc_8EC7D: xor r14d, r14d mov rsi, rbx xor eax, eax call _mju_warning loc_8EC8A: mov rax, r14 add rsp, 400h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_8EC9E: mov rdi, [r12] call _mju_malloc mov r14, rax test rax, rax jnz short loc_8ECEA lea rsi, aFiletomemory; "_fileToMemory" mov r13, rsp mov edx, 400h mov rdi, r13 call _strncpy vmovups xmm0, cs:xmmword_1CDDC9 vmovups xmmword ptr [r13+0Dh], xmm0 vmovups xmm0, cs:xmmword_1CDDC9+0Ch vmovups xmmword ptr [r13+19h], xmm0 mov rdi, r13 call _mju_error_raw loc_8ECEA: mov rdx, [r12] mov esi, 1 mov rdi, r14 mov rcx, r15 call _fread cmp rax, [r12] jnz short loc_8ED11 loc_8ED04: mov rdi, r15 call _fclose jmp loc_8EC8A loc_8ED11: mov r13, rax mov rdi, r15 call _ferror test eax, eax jz short loc_8ED3D mov rdi, r15 call _fclose mov rdi, r14 call _mju_free mov qword ptr [r12], 0 jmp loc_8EC76 loc_8ED3D: mov rdi, r15 call _feof test eax, eax jz short loc_8ED04 mov [r12], r13 jmp short loc_8ED04
long long fileToMemory(long long a1, int a2, long long *a3) { int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d const char *v8; // rdi long long v9; // rax long long v10; // r14 long long v15; // rax long long v16; // r13 _BYTE v17[1064]; // [rsp+0h] [rbp-428h] BYREF *a3 = 0LL; if ( !(unsigned int)fseek(a1, 0LL, 2LL) ) { v9 = ftell(a1); if ( v9 >= 0x80000000LL ) { fclose(a1); v8 = "File size over 2GB is not supported. File: '%s'"; goto LABEL_9; } if ( v9 >= 0 ) { *a3 = v9; if ( (unsigned int)fseek(a1, 0LL, 0LL) ) { fclose(a1); LABEL_8: v8 = "Read error while reading '%s'"; goto LABEL_9; } v10 = mju_malloc(*a3); if ( !v10 ) { _R13 = v17; strncpy(v17, "_fileToMemory", 1024LL); __asm { vmovups xmm0, cs:xmmword_1CDDC9 vmovups xmmword ptr [r13+0Dh], xmm0 vmovups xmm0, cs:xmmword_1CDDC9+0Ch vmovups xmmword ptr [r13+19h], xmm0 } mju_error_raw(v17); } v15 = fread(v10, 1LL, *a3, a1); if ( v15 != *a3 ) { v16 = v15; if ( (unsigned int)ferror(a1) ) { fclose(a1); mju_free(v10); *a3 = 0LL; goto LABEL_8; } if ( (unsigned int)feof(a1) ) *a3 = v16; } fclose(a1); return v10; } } fclose(a1); v8 = "Failed to calculate size for '%s'"; LABEL_9: v10 = 0LL; mju_warning((_DWORD)v8, a2, v4, v5, v6, v7); return v10; }
_fileToMemory: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x400 MOV R12,RDX MOV RBX,RSI MOV R15,RDI MOV qword ptr [RDX],0x0 XOR ESI,ESI MOV EDX,0x2 CALL 0x0012e180 TEST EAX,EAX JZ 0x0018ec32 LAB_0018ec21: MOV RDI,R15 CALL 0x0012dd80 LEA RDI,[0x2cde9a] JMP 0x0018ec7d LAB_0018ec32: MOV RDI,R15 CALL 0x0012e190 MOV ECX,0x80000000 CMP RAX,RCX JL 0x0018ec55 MOV RDI,R15 CALL 0x0012dd80 LEA RDI,[0x2cdebc] JMP 0x0018ec7d LAB_0018ec55: TEST RAX,RAX JS 0x0018ec21 MOV qword ptr [R12],RAX MOV RDI,R15 XOR ESI,ESI XOR EDX,EDX CALL 0x0012e180 TEST EAX,EAX JZ 0x0018ec9e MOV RDI,R15 CALL 0x0012dd80 LAB_0018ec76: LEA RDI,[0x2cdeec] LAB_0018ec7d: XOR R14D,R14D MOV RSI,RBX XOR EAX,EAX CALL 0x0012d270 LAB_0018ec8a: MOV RAX,R14 ADD RSP,0x400 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0018ec9e: MOV RDI,qword ptr [R12] CALL 0x0012dd20 MOV R14,RAX TEST RAX,RAX JNZ 0x0018ecea LEA RSI,[0x2cdf0a] MOV R13,RSP MOV EDX,0x400 MOV RDI,R13 CALL 0x0012d240 VMOVUPS XMM0,xmmword ptr [0x002cddc9] VMOVUPS xmmword ptr [R13 + 0xd],XMM0 VMOVUPS XMM0,xmmword ptr [0x002cddd5] VMOVUPS xmmword ptr [R13 + 0x19],XMM0 MOV RDI,R13 CALL 0x0012d260 LAB_0018ecea: MOV RDX,qword ptr [R12] MOV ESI,0x1 MOV RDI,R14 MOV RCX,R15 CALL 0x0012e1a0 CMP RAX,qword ptr [R12] JNZ 0x0018ed11 LAB_0018ed04: MOV RDI,R15 CALL 0x0012dd80 JMP 0x0018ec8a LAB_0018ed11: MOV R13,RAX MOV RDI,R15 CALL 0x0012e1b0 TEST EAX,EAX JZ 0x0018ed3d MOV RDI,R15 CALL 0x0012dd80 MOV RDI,R14 CALL 0x0012dd10 MOV qword ptr [R12],0x0 JMP 0x0018ec76 LAB_0018ed3d: MOV RDI,R15 CALL 0x0012e1c0 TEST EAX,EAX JZ 0x0018ed04 MOV qword ptr [R12],R13 JMP 0x0018ed04
void * _fileToMemory(FILE *param_1,int8 param_2,size_t *param_3) { int iVar1; size_t sVar2; void *__ptr; char *pcVar3; char acStack_428 [13]; char local_41b [8]; char acStack_413 [4]; char acStack_40f [4]; char acStack_40b [4]; char acStack_407 [991]; *param_3 = 0; iVar1 = fseek(param_1,0,2); if (iVar1 == 0) { sVar2 = ftell(param_1); if (0x7fffffff < (long)sVar2) { fclose(param_1); pcVar3 = "File size over 2GB is not supported. File: \'%s\'"; goto LAB_0018ec7d; } if (-1 < (long)sVar2) { *param_3 = sVar2; iVar1 = fseek(param_1,0,0); if (iVar1 == 0) { __ptr = (void *)mju_malloc(*param_3); if (__ptr == (void *)0x0) { strncpy(acStack_428,"_fileToMemory",0x400); local_41b[0] = s___could_not_allocate_memory_002cddc9[0]; local_41b[1] = s___could_not_allocate_memory_002cddc9[1]; local_41b[2] = s___could_not_allocate_memory_002cddc9[2]; local_41b[3] = s___could_not_allocate_memory_002cddc9[3]; local_41b[4] = s___could_not_allocate_memory_002cddc9[4]; local_41b[5] = s___could_not_allocate_memory_002cddc9[5]; local_41b[6] = s___could_not_allocate_memory_002cddc9[6]; local_41b[7] = s___could_not_allocate_memory_002cddc9[7]; acStack_413[0] = s___could_not_allocate_memory_002cddc9[8]; acStack_413[1] = s___could_not_allocate_memory_002cddc9[9]; acStack_413[2] = s___could_not_allocate_memory_002cddc9[10]; acStack_413[3] = s___could_not_allocate_memory_002cddc9[0xb]; acStack_40f[0] = s___could_not_allocate_memory_002cddc9[0xc]; acStack_40f[1] = s___could_not_allocate_memory_002cddc9[0xd]; acStack_40f[2] = s___could_not_allocate_memory_002cddc9[0xe]; acStack_40f[3] = s___could_not_allocate_memory_002cddc9[0xf]; acStack_40b[0] = s___could_not_allocate_memory_002cddc9[0x10]; acStack_40b[1] = s___could_not_allocate_memory_002cddc9[0x11]; acStack_40b[2] = s___could_not_allocate_memory_002cddc9[0x12]; acStack_40b[3] = s___could_not_allocate_memory_002cddc9[0x13]; acStack_407[0] = s___could_not_allocate_memory_002cddc9[0x14]; acStack_407[1] = s___could_not_allocate_memory_002cddc9[0x15]; acStack_407[2] = s___could_not_allocate_memory_002cddc9[0x16]; acStack_407[3] = s___could_not_allocate_memory_002cddc9[0x17]; acStack_407[4] = s___could_not_allocate_memory_002cddc9[0x18]; acStack_407[5] = s___could_not_allocate_memory_002cddc9[0x19]; acStack_407[6] = s___could_not_allocate_memory_002cddc9[0x1a]; acStack_407[7] = s___could_not_allocate_memory_002cddc9[0x1b]; mju_error_raw(acStack_428); } sVar2 = fread(__ptr,1,*param_3,param_1); if (sVar2 == *param_3) { LAB_0018ed04: fclose(param_1); return __ptr; } iVar1 = ferror(param_1); if (iVar1 == 0) { iVar1 = feof(param_1); if (iVar1 != 0) { *param_3 = sVar2; } goto LAB_0018ed04; } fclose(param_1); mju_free(__ptr); *param_3 = 0; } else { fclose(param_1); } pcVar3 = "Read error while reading \'%s\'"; goto LAB_0018ec7d; } } fclose(param_1); pcVar3 = "Failed to calculate size for \'%s\'"; LAB_0018ec7d: mju_warning(pcVar3,param_2); return (void *)0x0; }
25,720
skip_trailing_space
eloqsql/strings/strings_def.h
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len) { const uchar *end= ptr + len; if (len > 20) { const uchar *end_words= (const uchar *)(intptr) (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT); const uchar *start_words= (const uchar *)(intptr) ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT); DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT); if (end_words > ptr) { while (end > end_words && end[-1] == 0x20) end--; if (end[-1] == 0x20 && start_words < end_words) while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT) end -= SIZEOF_INT; } } while (end > ptr && end[-1] == 0x20) end--; return (end); }
O0
c
skip_trailing_space: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x14, -0x10(%rbp) jbe 0xda79a movq -0x18(%rbp), %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax addq $0x4, %rax subq $0x1, %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0xda6fd movq -0x20(%rbp), %rax cmpq -0x8(%rbp), %rax jbe 0xda798 jmp 0xda70d movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x29(%rbp) jbe 0xda72d movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0xda736 jmp 0xda744 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0xda70d movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax jne 0xda796 movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xda796 jmp 0xda75d movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x2a(%rbp) jbe 0xda77d movq -0x18(%rbp), %rax cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 sete %al movb %al, -0x2a(%rbp) movb -0x2a(%rbp), %al testb $0x1, %al jne 0xda786 jmp 0xda794 movq -0x18(%rbp), %rax addq $-0x4, %rax movq %rax, -0x18(%rbp) jmp 0xda75d jmp 0xda796 jmp 0xda798 jmp 0xda79a jmp 0xda79c movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x8(%rbp), %rcx movb %al, -0x2b(%rbp) jbe 0xda7bc movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x2b(%rbp) movb -0x2b(%rbp), %al testb $0x1, %al jne 0xda7c5 jmp 0xda7d3 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0xda79c movq -0x18(%rbp), %rax popq %rbp retq nopl (%rax)
skip_trailing_space: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_18], rax cmp [rbp+var_10], 14h jbe loc_DA79A mov rax, [rbp+var_18] shr rax, 2 shl rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_8] add rax, 4 sub rax, 1 shr rax, 2 shl rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_DA6FD: mov rax, [rbp+var_20] cmp rax, [rbp+var_8] jbe loc_DA798 jmp short $+2 loc_DA70D: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_29], al jbe short loc_DA72D mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_29], al loc_DA72D: mov al, [rbp+var_29] test al, 1 jnz short loc_DA736 jmp short loc_DA744 loc_DA736: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_DA70D loc_DA744: mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' jnz short loc_DA796 mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb short loc_DA796 jmp short $+2 loc_DA75D: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_2A], al jbe short loc_DA77D mov rax, [rbp+var_18] cmp dword ptr [rax-4], 20202020h setz al mov [rbp+var_2A], al loc_DA77D: mov al, [rbp+var_2A] test al, 1 jnz short loc_DA786 jmp short loc_DA794 loc_DA786: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_18], rax jmp short loc_DA75D loc_DA794: jmp short $+2 loc_DA796: jmp short $+2 loc_DA798: jmp short $+2 loc_DA79A: jmp short $+2 loc_DA79C: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_8] mov [rbp+var_2B], al jbe short loc_DA7BC mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_2B], al loc_DA7BC: mov al, [rbp+var_2B] test al, 1 jnz short loc_DA7C5 jmp short loc_DA7D3 loc_DA7C5: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_DA79C loc_DA7D3: mov rax, [rbp+var_18] pop rbp retn
unsigned long long skip_trailing_space(unsigned long long a1, unsigned long long a2) { bool v3; // [rsp+1h] [rbp-2Bh] bool v4; // [rsp+2h] [rbp-2Ah] bool v5; // [rsp+3h] [rbp-29h] unsigned long long v6; // [rsp+4h] [rbp-28h] unsigned long long v7; // [rsp+Ch] [rbp-20h] unsigned long long v8; // [rsp+14h] [rbp-18h] v8 = a2 + a1; if ( a2 > 0x14 ) { v7 = 4 * (v8 >> 2); v6 = 4 * ((a1 + 3) >> 2); if ( v7 > a1 ) { while ( 1 ) { v5 = 0; if ( v8 > v7 ) v5 = *(_BYTE *)(v8 - 1) == 32; if ( !v5 ) break; --v8; } if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 ) { while ( 1 ) { v4 = 0; if ( v8 > v6 ) v4 = *(_DWORD *)(v8 - 4) == 538976288; if ( !v4 ) break; v8 -= 4LL; } } } } while ( 1 ) { v3 = 0; if ( v8 > a1 ) v3 = *(_BYTE *)(v8 - 1) == 32; if ( !v3 ) break; --v8; } return v8; }
skip_trailing_space: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x10],0x14 JBE 0x001da79a MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 SUB RAX,0x1 SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x001da6fd LAB_001da6fd: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x8] JBE 0x001da798 JMP 0x001da70d LAB_001da70d: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x29],AL JBE 0x001da72d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001da72d: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x001da736 JMP 0x001da744 LAB_001da736: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001da70d LAB_001da744: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 JNZ 0x001da796 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001da796 JMP 0x001da75d LAB_001da75d: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x2a],AL JBE 0x001da77d MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + -0x4],0x20202020 SETZ AL MOV byte ptr [RBP + -0x2a],AL LAB_001da77d: MOV AL,byte ptr [RBP + -0x2a] TEST AL,0x1 JNZ 0x001da786 JMP 0x001da794 LAB_001da786: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x001da75d LAB_001da794: JMP 0x001da796 LAB_001da796: JMP 0x001da798 LAB_001da798: JMP 0x001da79a LAB_001da79a: JMP 0x001da79c LAB_001da79c: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x8] MOV byte ptr [RBP + -0x2b],AL JBE 0x001da7bc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x2b],AL LAB_001da7bc: MOV AL,byte ptr [RBP + -0x2b] TEST AL,0x1 JNZ 0x001da7c5 JMP 0x001da7d3 LAB_001da7c5: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001da79c LAB_001da7d3: MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
ulong skip_trailing_space(ulong param_1,ulong param_2) { ulong uVar1; ulong uVar2; bool bVar3; ulong local_20; local_20 = param_1 + param_2; if (0x14 < param_2) { uVar1 = local_20 & 0xfffffffffffffffc; uVar2 = param_1 + 3 & 0xfffffffffffffffc; if (param_1 < uVar1) { while( true ) { bVar3 = false; if (uVar1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) { while( true ) { bVar3 = false; if (uVar2 < local_20) { bVar3 = *(int *)(local_20 - 4) == 0x20202020; } if (!bVar3) break; local_20 = local_20 - 4; } } } } while( true ) { bVar3 = false; if (param_1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } return local_20; }
25,721
lf_alloc_init
eloqsql/mysys/lf_alloc-pin.c
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset) { lf_pinbox_init(&allocator->pinbox, free_ptr_offset, (lf_pinbox_free_func *)alloc_free, allocator); allocator->top= 0; allocator->mallocs= 0; allocator->element_size= size; allocator->constructor= 0; allocator->destructor= 0; DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset); }
O0
c
lf_alloc_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rcx leaq 0x4c(%rip), %rdx # 0x5bb80 callq 0x5b470 movq -0x8(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x54(%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) jmp 0x5bb74 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
lf_alloc_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rdi, [rbp+var_8] mov esi, [rbp+var_10] mov rcx, [rbp+var_8] lea rdx, alloc_free call lf_pinbox_init mov rax, [rbp+var_8] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+54h], 0 mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+50h], ecx mov rax, [rbp+var_8] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+60h], 0 jmp short $+2 loc_5BB74: add rsp, 10h pop rbp retn
long long lf_alloc_init(long long a1, int a2, int a3) { long long result; // rax lf_pinbox_init(a1, a3, (long long)alloc_free, a1); *(_QWORD *)(a1 + 72) = 0LL; *(_DWORD *)(a1 + 84) = 0; *(_DWORD *)(a1 + 80) = a2; *(_QWORD *)(a1 + 88) = 0LL; result = a1; *(_QWORD *)(a1 + 96) = 0LL; return result; }
lf_alloc_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] LEA RDX,[0x15bb80] CALL 0x0015b470 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x54],0x0 MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 JMP 0x0015bb74 LAB_0015bb74: ADD RSP,0x10 POP RBP RET
void lf_alloc_init(long param_1,int4 param_2,int4 param_3) { lf_pinbox_init(param_1,param_3,alloc_free,param_1); *(int8 *)(param_1 + 0x48) = 0; *(int4 *)(param_1 + 0x54) = 0; *(int4 *)(param_1 + 0x50) = param_2; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; return; }
25,722
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O0
c
my_printv_error: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x214(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movq %rcx, -0x230(%rbp) jmp 0x75885 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rdx movq -0x230(%rbp), %rcx movl $0x200, %esi # imm = 0x200 callq 0x6e300 leaq 0x3176b5(%rip), %rax # 0x38cf60 movq (%rax), %rax movl -0x214(%rbp), %edi leaq -0x210(%rbp), %rsi movq -0x228(%rbp), %rdx callq *%rax jmp 0x758c6 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x758e1 addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x2a2e0 nopw %cs:(%rax,%rax)
my_printv_error: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_214], edi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_230], rcx jmp short $+2 loc_75885: lea rdi, [rbp+var_210] mov rdx, [rbp+var_220] mov rcx, [rbp+var_230] mov esi, 200h call my_vsnprintf lea rax, error_handler_hook mov rax, [rax] mov edi, [rbp+var_214] lea rsi, [rbp+var_210] mov rdx, [rbp+var_228] call rax jmp short $+2 loc_758C6: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_758E1 add rsp, 230h pop rbp retn loc_758E1: call ___stack_chk_fail
unsigned long long my_printv_error(long long a1, char *a2, long long a3, int *a4) { _BYTE v5[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v6; // [rsp+228h] [rbp-8h] v6 = __readfsqword(0x28u); my_vsnprintf(v5, 512LL, a2, a4); error_handler_hook(); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x214],EDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV qword ptr [RBP + -0x230],RCX JMP 0x00175885 LAB_00175885: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] MOV ESI,0x200 CALL 0x0016e300 LEA RAX,[0x48cf60] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x214] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] CALL RAX JMP 0x001758c6 LAB_001758c6: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001758e1 ADD RSP,0x230 POP RBP RET LAB_001758e1: CALL 0x0012a2e0
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4) { long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_218,0x200,param_2,param_4); (*(code *)error_handler_hook)(param_1,local_218,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,723
rlReadTexturePixels
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void *rlReadTexturePixels(unsigned int id, int width, int height, int format) { void *pixels = NULL; #if defined(GRAPHICS_API_OPENGL_11) || defined(GRAPHICS_API_OPENGL_33) glBindTexture(GL_TEXTURE_2D, id); // NOTE: Using texture id, we can retrieve some texture info (but not on OpenGL ES 2.0) // Possible texture info: GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE //int width, height, format; //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format); // NOTE: Each row written to or read from by OpenGL pixel operations like glGetTexImage are aligned to a 4 byte boundary by default, which may add some padding // Use glPixelStorei to modify padding with the GL_[UN]PACK_ALIGNMENT setting // GL_PACK_ALIGNMENT affects operations that read from OpenGL memory (glReadPixels, glGetTexImage, etc.) // GL_UNPACK_ALIGNMENT affects operations that write to OpenGL memory (glTexImage, etc.) glPixelStorei(GL_PACK_ALIGNMENT, 1); unsigned int glInternalFormat, glFormat, glType; rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType); unsigned int size = rlGetPixelDataSize(width, height, format); if ((glInternalFormat != 0) && (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB)) { pixels = RL_MALLOC(size); glGetTexImage(GL_TEXTURE_2D, 0, glFormat, glType, pixels); } else TRACELOG(RL_LOG_WARNING, "TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", id, format); glBindTexture(GL_TEXTURE_2D, 0); #endif #if defined(GRAPHICS_API_OPENGL_ES2) // glGetTexImage() is not available on OpenGL ES 2.0 // Texture width and height are required on OpenGL ES 2.0, there is no way to get it from texture id // Two possible Options: // 1 - Bind texture to color fbo attachment and glReadPixels() // 2 - Create an fbo, activate it, render quad with texture, glReadPixels() // We are using Option 1, just need to care for texture format on retrieval // NOTE: This behaviour could be conditioned by graphic driver... unsigned int fboId = rlLoadFramebuffer(); glBindFramebuffer(GL_FRAMEBUFFER, fboId); glBindTexture(GL_TEXTURE_2D, 0); // Attach our texture to FBO glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0); // We read data as RGBA because FBO texture is configured as RGBA, despite binding another texture format pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); glBindFramebuffer(GL_FRAMEBUFFER, 0); // Clean up temporal fbo rlUnloadFramebuffer(fboId); #endif return pixels; }
O0
c
rlReadTexturePixels: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) movl %edx, -0xc(%rbp) movl %ecx, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq 0x161e4d(%rip), %rax # 0x218360 movl -0x4(%rbp), %esi movl $0xde1, %edi # imm = 0xDE1 callq *%rax movl $0xd05, %edi # imm = 0xD05 movl $0x1, %esi callq *0x162f33(%rip) # 0x219460 movl -0x10(%rbp), %edi leaq -0x1c(%rbp), %rsi leaq -0x20(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0xb58b0 movl -0x8(%rbp), %edi movl -0xc(%rbp), %esi movl -0x10(%rbp), %edx callq 0xb5780 movl %eax, -0x28(%rbp) cmpl $0x0, -0x1c(%rbp) je 0xb6588 cmpl $0xe, -0x10(%rbp) jge 0xb6588 movl -0x28(%rbp), %eax movl %eax, %edi callq 0xa6e0 movq %rax, -0x18(%rbp) movq 0x162935(%rip), %rax # 0x218ea8 movl -0x20(%rbp), %edx movl -0x24(%rbp), %ecx movq -0x18(%rbp), %r8 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *%rax jmp 0xb65a1 movl -0x4(%rbp), %edx movl -0x10(%rbp), %ecx movl $0x4, %edi leaq 0xfe7ac(%rip), %rsi # 0x1b4d46 movb $0x0, %al callq 0x182c40 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *0x161db2(%rip) # 0x218360 movq -0x18(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
rlReadTexturePixels: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_C], edx mov [rbp+var_10], ecx mov [rbp+var_18], 0 mov rax, cs:glad_glBindTexture mov esi, [rbp+var_4] mov edi, 0DE1h call rax ; glad_glBindTexture mov edi, 0D05h mov esi, 1 call cs:glad_glPixelStorei mov edi, [rbp+var_10] lea rsi, [rbp+var_1C] lea rdx, [rbp+var_20] lea rcx, [rbp+var_24] call rlGetGlTextureFormats mov edi, [rbp+var_8] mov esi, [rbp+var_C] mov edx, [rbp+var_10] call rlGetPixelDataSize mov [rbp+var_28], eax cmp [rbp+var_1C], 0 jz short loc_B6588 cmp [rbp+var_10], 0Eh jge short loc_B6588 mov eax, [rbp+var_28] mov edi, eax call _malloc mov [rbp+var_18], rax mov rax, cs:glad_glGetTexImage mov edx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_18] mov edi, 0DE1h xor esi, esi call rax ; glad_glGetTexImage jmp short loc_B65A1 loc_B6588: mov edx, [rbp+var_4] mov ecx, [rbp+var_10] mov edi, 4 lea rsi, aTextureIdIData; "TEXTURE: [ID %i] Data retrieval not sup"... mov al, 0 call TraceLog loc_B65A1: mov edi, 0DE1h xor esi, esi call cs:glad_glBindTexture mov rax, [rbp+var_18] add rsp, 30h pop rbp retn
long long rlReadTexturePixels(unsigned int a1, int a2, int a3, int a4) { int v4; // r8d int v5; // r9d int v6; // r8d int v7; // r9d unsigned int PixelDataSize; // [rsp+8h] [rbp-28h] unsigned int v10; // [rsp+Ch] [rbp-24h] BYREF unsigned int v11; // [rsp+10h] [rbp-20h] BYREF int v12; // [rsp+14h] [rbp-1Ch] BYREF long long v13; // [rsp+18h] [rbp-18h] int v14; // [rsp+20h] [rbp-10h] int v15; // [rsp+24h] [rbp-Ch] int v16; // [rsp+28h] [rbp-8h] unsigned int v17; // [rsp+2Ch] [rbp-4h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = 0LL; glad_glBindTexture(3553LL, a1); glad_glPixelStorei(3333LL, 1LL); rlGetGlTextureFormats(v14, &v12, &v11, &v10, v4, v5); PixelDataSize = rlGetPixelDataSize(v16, v15, v14); if ( v12 && v14 < 14 ) { v13 = malloc(PixelDataSize); glad_glGetTexImage(3553LL, 0LL, v11, v10, v13); } else { TraceLog(4, (unsigned int)"TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", v17, v14, v6, v7); } glad_glBindTexture(3553LL, 0LL); return v13; }
rlReadTexturePixels: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV dword ptr [RBP + -0xc],EDX MOV dword ptr [RBP + -0x10],ECX MOV qword ptr [RBP + -0x18],0x0 MOV RAX,qword ptr [0x00318360] MOV ESI,dword ptr [RBP + -0x4] MOV EDI,0xde1 CALL RAX MOV EDI,0xd05 MOV ESI,0x1 CALL qword ptr [0x00319460] MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[RBP + -0x1c] LEA RDX,[RBP + -0x20] LEA RCX,[RBP + -0x24] CALL 0x001b58b0 MOV EDI,dword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] CALL 0x001b5780 MOV dword ptr [RBP + -0x28],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x001b6588 CMP dword ptr [RBP + -0x10],0xe JGE 0x001b6588 MOV EAX,dword ptr [RBP + -0x28] MOV EDI,EAX CALL 0x0010a6e0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [0x00318ea8] MOV EDX,dword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x18] MOV EDI,0xde1 XOR ESI,ESI CALL RAX JMP 0x001b65a1 LAB_001b6588: MOV EDX,dword ptr [RBP + -0x4] MOV ECX,dword ptr [RBP + -0x10] MOV EDI,0x4 LEA RSI,[0x2b4d46] MOV AL,0x0 CALL 0x00282c40 LAB_001b65a1: MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [0x00318360] MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x30 POP RBP RET
void * rlReadTexturePixels(int4 param_1,int4 param_2,int4 param_3,int param_4) { uint uVar1; int4 local_2c; int4 local_28; int local_24; void *local_20; int local_18; int4 local_14; int4 local_10; int4 local_c; local_20 = (void *)0x0; local_18 = param_4; local_14 = param_3; local_10 = param_2; local_c = param_1; (*glad_glBindTexture)(0xde1,param_1); (*glad_glPixelStorei)(0xd05,1); rlGetGlTextureFormats(local_18,&local_24,&local_28,&local_2c); uVar1 = rlGetPixelDataSize(local_10,local_14,local_18); if ((local_24 == 0) || (0xd < local_18)) { TraceLog(4,"TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)",local_c,local_18 ); } else { local_20 = malloc((ulong)uVar1); (*glad_glGetTexImage)(0xde1,0,local_28,local_2c,local_20); } (*glad_glBindTexture)(0xde1,0); return local_20; }
25,724
rlReadTexturePixels
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void *rlReadTexturePixels(unsigned int id, int width, int height, int format) { void *pixels = NULL; #if defined(GRAPHICS_API_OPENGL_11) || defined(GRAPHICS_API_OPENGL_33) glBindTexture(GL_TEXTURE_2D, id); // NOTE: Using texture id, we can retrieve some texture info (but not on OpenGL ES 2.0) // Possible texture info: GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE //int width, height, format; //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format); // NOTE: Each row written to or read from by OpenGL pixel operations like glGetTexImage are aligned to a 4 byte boundary by default, which may add some padding // Use glPixelStorei to modify padding with the GL_[UN]PACK_ALIGNMENT setting // GL_PACK_ALIGNMENT affects operations that read from OpenGL memory (glReadPixels, glGetTexImage, etc.) // GL_UNPACK_ALIGNMENT affects operations that write to OpenGL memory (glTexImage, etc.) glPixelStorei(GL_PACK_ALIGNMENT, 1); unsigned int glInternalFormat, glFormat, glType; rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType); unsigned int size = rlGetPixelDataSize(width, height, format); if ((glInternalFormat != 0) && (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB)) { pixels = RL_MALLOC(size); glGetTexImage(GL_TEXTURE_2D, 0, glFormat, glType, pixels); } else TRACELOG(RL_LOG_WARNING, "TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", id, format); glBindTexture(GL_TEXTURE_2D, 0); #endif #if defined(GRAPHICS_API_OPENGL_ES2) // glGetTexImage() is not available on OpenGL ES 2.0 // Texture width and height are required on OpenGL ES 2.0, there is no way to get it from texture id // Two possible Options: // 1 - Bind texture to color fbo attachment and glReadPixels() // 2 - Create an fbo, activate it, render quad with texture, glReadPixels() // We are using Option 1, just need to care for texture format on retrieval // NOTE: This behaviour could be conditioned by graphic driver... unsigned int fboId = rlLoadFramebuffer(); glBindFramebuffer(GL_FRAMEBUFFER, fboId); glBindTexture(GL_TEXTURE_2D, 0); // Attach our texture to FBO glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0); // We read data as RGBA because FBO texture is configured as RGBA, despite binding another texture format pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); glBindFramebuffer(GL_FRAMEBUFFER, 0); // Clean up temporal fbo rlUnloadFramebuffer(fboId); #endif return pixels; }
O2
c
rlReadTexturePixels: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl %ecx, %ebx movl %edx, %r14d movl %esi, %r15d movl %edi, %ebp movl $0xde1, %edi # imm = 0xDE1 movl %ebp, %esi callq *0xd0582(%rip) # 0x1252c0 pushq $0x1 popq %rsi movl $0xd05, %edi # imm = 0xD05 callq *0xd1674(%rip) # 0x1263c0 leaq 0x14(%rsp), %rsi leaq 0x10(%rsp), %rdx leaq 0xc(%rsp), %rcx movl %ebx, %edi callq 0x5451a cmpl $0xd, %ebx jg 0x54d9f cmpl $0x0, 0x14(%rsp) je 0x54d9f movl %r15d, %edi movl %r14d, %esi movl %ebx, %edx callq 0x544c2 movl %eax, %edi callq 0x96e0 movq %rax, %r14 movl 0x10(%rsp), %edx movl 0xc(%rsp), %ecx movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi movq %rax, %r8 callq *0xd106b(%rip) # 0x125e08 jmp 0x54db7 leaq 0x706c8(%rip), %rsi # 0xc546e xorl %r14d, %r14d pushq $0x4 popq %rdi movl %ebp, %edx movl %ebx, %ecx xorl %eax, %eax callq 0xa128b movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *0xd04fc(%rip) # 0x1252c0 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
rlReadTexturePixels: push rbp push r15 push r14 push rbx sub rsp, 18h mov ebx, ecx mov r14d, edx mov r15d, esi mov ebp, edi mov edi, 0DE1h mov esi, ebp call cs:glad_glBindTexture push 1 pop rsi mov edi, 0D05h call cs:glad_glPixelStorei lea rsi, [rsp+38h+var_24] lea rdx, [rsp+38h+var_28] lea rcx, [rsp+38h+var_2C] mov edi, ebx call rlGetGlTextureFormats cmp ebx, 0Dh jg short loc_54D9F cmp [rsp+38h+var_24], 0 jz short loc_54D9F mov edi, r15d mov esi, r14d mov edx, ebx call rlGetPixelDataSize mov edi, eax call _malloc mov r14, rax mov edx, [rsp+38h+var_28] mov ecx, [rsp+38h+var_2C] mov edi, 0DE1h xor esi, esi mov r8, rax call cs:glad_glGetTexImage jmp short loc_54DB7 loc_54D9F: lea rsi, aTextureIdIData; "TEXTURE: [ID %i] Data retrieval not sup"... xor r14d, r14d push 4 pop rdi mov edx, ebp mov ecx, ebx xor eax, eax call TraceLog loc_54DB7: mov edi, 0DE1h xor esi, esi call cs:glad_glBindTexture mov rax, r14 add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long rlReadTexturePixels(unsigned int a1, int a2, int a3, int a4) { int v6; // r8d int v7; // r9d int v8; // r8d int v9; // r9d unsigned int PixelDataSize; // eax long long v11; // r14 unsigned int v13; // [rsp+Ch] [rbp-2Ch] BYREF unsigned int v14; // [rsp+10h] [rbp-28h] BYREF _DWORD v15[9]; // [rsp+14h] [rbp-24h] BYREF glad_glBindTexture(3553LL, a1); glad_glPixelStorei(3333LL, 1LL); rlGetGlTextureFormats(a4, v15, &v14, &v13, v6, v7); if ( a4 <= 13 && v15[0] ) { PixelDataSize = rlGetPixelDataSize(a2, a3, a4); v11 = malloc(PixelDataSize); glad_glGetTexImage(3553LL, 0LL, v14, v13, v11); } else { v11 = 0LL; TraceLog(4, (unsigned int)"TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", a1, a4, v8, v9); } glad_glBindTexture(3553LL, 0LL); return v11; }
rlReadTexturePixels: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV EBX,ECX MOV R14D,EDX MOV R15D,ESI MOV EBP,EDI MOV EDI,0xde1 MOV ESI,EBP CALL qword ptr [0x002252c0] PUSH 0x1 POP RSI MOV EDI,0xd05 CALL qword ptr [0x002263c0] LEA RSI,[RSP + 0x14] LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0xc] MOV EDI,EBX CALL 0x0015451a CMP EBX,0xd JG 0x00154d9f CMP dword ptr [RSP + 0x14],0x0 JZ 0x00154d9f MOV EDI,R15D MOV ESI,R14D MOV EDX,EBX CALL 0x001544c2 MOV EDI,EAX CALL 0x001096e0 MOV R14,RAX MOV EDX,dword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV EDI,0xde1 XOR ESI,ESI MOV R8,RAX CALL qword ptr [0x00225e08] JMP 0x00154db7 LAB_00154d9f: LEA RSI,[0x1c546e] XOR R14D,R14D PUSH 0x4 POP RDI MOV EDX,EBP MOV ECX,EBX XOR EAX,EAX CALL 0x001a128b LAB_00154db7: MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [0x002252c0] MOV RAX,R14 ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
void * rlReadTexturePixels(int4 param_1,int4 param_2,int4 param_3,int param_4) { uint uVar1; void *pvVar2; int4 local_2c; int4 local_28; int local_24; (*glad_glBindTexture)(0xde1,param_1); (*glad_glPixelStorei)(0xd05,1); rlGetGlTextureFormats(param_4,&local_24,&local_28,&local_2c); if ((param_4 < 0xe) && (local_24 != 0)) { uVar1 = rlGetPixelDataSize(param_2,param_3,param_4); pvVar2 = malloc((ulong)uVar1); (*glad_glGetTexImage)(0xde1,0,local_28,local_2c,pvVar2); } else { pvVar2 = (void *)0x0; TraceLog(4,"TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)",param_1,param_4) ; } (*glad_glBindTexture)(0xde1,0); return pvVar2; }
25,725
rlReadTexturePixels
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void *rlReadTexturePixels(unsigned int id, int width, int height, int format) { void *pixels = NULL; #if defined(GRAPHICS_API_OPENGL_11) || defined(GRAPHICS_API_OPENGL_33) glBindTexture(GL_TEXTURE_2D, id); // NOTE: Using texture id, we can retrieve some texture info (but not on OpenGL ES 2.0) // Possible texture info: GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, GL_TEXTURE_ALPHA_SIZE //int width, height, format; //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); //glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format); // NOTE: Each row written to or read from by OpenGL pixel operations like glGetTexImage are aligned to a 4 byte boundary by default, which may add some padding // Use glPixelStorei to modify padding with the GL_[UN]PACK_ALIGNMENT setting // GL_PACK_ALIGNMENT affects operations that read from OpenGL memory (glReadPixels, glGetTexImage, etc.) // GL_UNPACK_ALIGNMENT affects operations that write to OpenGL memory (glTexImage, etc.) glPixelStorei(GL_PACK_ALIGNMENT, 1); unsigned int glInternalFormat, glFormat, glType; rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType); unsigned int size = rlGetPixelDataSize(width, height, format); if ((glInternalFormat != 0) && (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB)) { pixels = RL_MALLOC(size); glGetTexImage(GL_TEXTURE_2D, 0, glFormat, glType, pixels); } else TRACELOG(RL_LOG_WARNING, "TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", id, format); glBindTexture(GL_TEXTURE_2D, 0); #endif #if defined(GRAPHICS_API_OPENGL_ES2) // glGetTexImage() is not available on OpenGL ES 2.0 // Texture width and height are required on OpenGL ES 2.0, there is no way to get it from texture id // Two possible Options: // 1 - Bind texture to color fbo attachment and glReadPixels() // 2 - Create an fbo, activate it, render quad with texture, glReadPixels() // We are using Option 1, just need to care for texture format on retrieval // NOTE: This behaviour could be conditioned by graphic driver... unsigned int fboId = rlLoadFramebuffer(); glBindFramebuffer(GL_FRAMEBUFFER, fboId); glBindTexture(GL_TEXTURE_2D, 0); // Attach our texture to FBO glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0); // We read data as RGBA because FBO texture is configured as RGBA, despite binding another texture format pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); glBindFramebuffer(GL_FRAMEBUFFER, 0); // Clean up temporal fbo rlUnloadFramebuffer(fboId); #endif return pixels; }
O3
c
rlReadTexturePixels: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl %ecx, %ebx movl %edx, %r14d movl %esi, %r15d movl %edi, %ebp movl $0xde1, %edi # imm = 0xDE1 movl %ebp, %esi callq *0xd4670(%rip) # 0x1392a0 movl $0xd05, %edi # imm = 0xD05 movl $0x1, %esi callq *0xd5760(%rip) # 0x13a3a0 leaq 0x14(%rsp), %rsi leaq 0x10(%rsp), %rdx leaq 0xc(%rsp), %rcx movl %ebx, %edi callq 0x6441e cmpl $0xd, %ebx jg 0x64c93 cmpl $0x0, 0x14(%rsp) je 0x64c93 movl %r15d, %edi movl %r14d, %esi movl %ebx, %edx callq 0x643c0 movl %eax, %edi callq 0xa6f0 movq %rax, %r14 movl 0x10(%rsp), %edx movl 0xc(%rsp), %ecx movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi movq %rax, %r8 callq *0xd5157(%rip) # 0x139de8 jmp 0x64cad leaq 0x7a64c(%rip), %rsi # 0xdf2e6 xorl %r14d, %r14d movl $0x4, %edi movl %ebp, %edx movl %ebx, %ecx xorl %eax, %eax callq 0xb9db7 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *0xd45e6(%rip) # 0x1392a0 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
rlReadTexturePixels: push rbp push r15 push r14 push rbx sub rsp, 18h mov ebx, ecx mov r14d, edx mov r15d, esi mov ebp, edi mov edi, 0DE1h mov esi, ebp call cs:glad_glBindTexture mov edi, 0D05h mov esi, 1 call cs:glad_glPixelStorei lea rsi, [rsp+38h+var_24] lea rdx, [rsp+38h+var_28] lea rcx, [rsp+38h+var_2C] mov edi, ebx call rlGetGlTextureFormats cmp ebx, 0Dh jg short loc_64C93 cmp [rsp+38h+var_24], 0 jz short loc_64C93 mov edi, r15d mov esi, r14d mov edx, ebx call rlGetPixelDataSize mov edi, eax call _malloc mov r14, rax mov edx, [rsp+38h+var_28] mov ecx, [rsp+38h+var_2C] mov edi, 0DE1h xor esi, esi mov r8, rax call cs:glad_glGetTexImage jmp short loc_64CAD loc_64C93: lea rsi, aTextureIdIData; "TEXTURE: [ID %i] Data retrieval not sup"... xor r14d, r14d mov edi, 4 mov edx, ebp mov ecx, ebx xor eax, eax call TraceLog loc_64CAD: mov edi, 0DE1h xor esi, esi call cs:glad_glBindTexture mov rax, r14 add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long rlReadTexturePixels(unsigned int a1, int a2, int a3, int a4) { int v6; // r8d int v7; // r9d int v8; // r8d int v9; // r9d unsigned int PixelDataSize; // eax long long v11; // r14 unsigned int v13; // [rsp+Ch] [rbp-2Ch] BYREF unsigned int v14; // [rsp+10h] [rbp-28h] BYREF _DWORD v15[9]; // [rsp+14h] [rbp-24h] BYREF glad_glBindTexture(3553LL, a1); glad_glPixelStorei(3333LL, 1LL); rlGetGlTextureFormats(a4, v15, &v14, &v13, v6, v7); if ( a4 <= 13 && v15[0] ) { PixelDataSize = rlGetPixelDataSize(a2, a3, a4); v11 = malloc(PixelDataSize); glad_glGetTexImage(3553LL, 0LL, v14, v13, v11); } else { v11 = 0LL; TraceLog(4, (unsigned int)"TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", a1, a4, v8, v9); } glad_glBindTexture(3553LL, 0LL); return v11; }
rlReadTexturePixels: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV EBX,ECX MOV R14D,EDX MOV R15D,ESI MOV EBP,EDI MOV EDI,0xde1 MOV ESI,EBP CALL qword ptr [0x002392a0] MOV EDI,0xd05 MOV ESI,0x1 CALL qword ptr [0x0023a3a0] LEA RSI,[RSP + 0x14] LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0xc] MOV EDI,EBX CALL 0x0016441e CMP EBX,0xd JG 0x00164c93 CMP dword ptr [RSP + 0x14],0x0 JZ 0x00164c93 MOV EDI,R15D MOV ESI,R14D MOV EDX,EBX CALL 0x001643c0 MOV EDI,EAX CALL 0x0010a6f0 MOV R14,RAX MOV EDX,dword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV EDI,0xde1 XOR ESI,ESI MOV R8,RAX CALL qword ptr [0x00239de8] JMP 0x00164cad LAB_00164c93: LEA RSI,[0x1df2e6] XOR R14D,R14D MOV EDI,0x4 MOV EDX,EBP MOV ECX,EBX XOR EAX,EAX CALL 0x001b9db7 LAB_00164cad: MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [0x002392a0] MOV RAX,R14 ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
void * rlReadTexturePixels(int4 param_1,int4 param_2,int4 param_3,int param_4) { uint uVar1; void *pvVar2; int4 local_2c; int4 local_28; int local_24; (*glad_glBindTexture)(0xde1,param_1); (*glad_glPixelStorei)(0xd05,1); rlGetGlTextureFormats(param_4,&local_24,&local_28,&local_2c); if ((param_4 < 0xe) && (local_24 != 0)) { uVar1 = rlGetPixelDataSize(param_2,param_3,param_4); pvVar2 = malloc((ulong)uVar1); (*glad_glGetTexImage)(0xde1,0,local_28,local_2c,pvVar2); } else { pvVar2 = (void *)0x0; TraceLog(4,"TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)",param_1,param_4) ; } (*glad_glBindTexture)(0xde1,0); return pvVar2; }
25,726
maria_rtree_real_delete
eloqsql/storage/maria/ma_rt_index.c
my_bool maria_rtree_real_delete(MARIA_HA *info, MARIA_KEY *key, my_off_t *root) { uint page_size; stPageList ReinsertList; my_off_t old_root; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo= key->keyinfo; uint key_data_length= key->data_length; my_bool buff_alloced= 0; uchar *page_buf= 0; DBUG_ENTER("maria_rtree_real_delete"); if ((old_root= share->state.key_root[keyinfo->key_nr]) == HA_OFFSET_ERROR) { my_errno= HA_ERR_END_OF_FILE; DBUG_RETURN(1); /* purecov: inspected */ } DBUG_PRINT("rtree", ("starting deletion at root page: %lu", (ulong) old_root)); ReinsertList.pages= NULL; ReinsertList.n_pages= 0; ReinsertList.m_pages= 0; switch (maria_rtree_delete_req(info, key, old_root, &page_size, &ReinsertList, 0)) { case 2: /* empty */ { *root= HA_OFFSET_ERROR; break; } case 0: /* deleted */ { uint nod_flag; ulong i; MARIA_PAGE page; MARIA_KEY tmp_key; tmp_key.keyinfo= key->keyinfo; tmp_key.data_length= key->data_length; tmp_key.ref_length= key->ref_length; tmp_key.flag= 0; /* Safety */ if (ReinsertList.n_pages) { alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced, keyinfo->block_length); if (!page_buf) { my_errno= HA_ERR_OUT_OF_MEM; goto err; } for (i= 0; i < ReinsertList.n_pages; ++i) { uchar *k, *last; if (_ma_fetch_keypage(&page, info, keyinfo, ReinsertList.pages[i].offs, PAGECACHE_LOCK_WRITE, DFLT_INIT_HITS, page_buf, 0)) goto err; nod_flag= page.node; DBUG_PRINT("rtree", ("reinserting keys from " "page: %lu level: %d nod_flag: %u", (ulong) ReinsertList.pages[i].offs, ReinsertList.pages[i].level, nod_flag)); k= rt_PAGE_FIRST_KEY(share, page.buff, nod_flag); last= rt_PAGE_END(&page); for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key_data_length, nod_flag)) { int res; tmp_key.data= k; if ((res= maria_rtree_insert_level(info, &tmp_key, ReinsertList.pages[i].level, root)) == -1) goto err; if (res) { uint j; DBUG_PRINT("rtree", ("root has been split, adjust levels")); for (j= i; j < ReinsertList.n_pages; j++) { ReinsertList.pages[j].level++; DBUG_PRINT("rtree", ("keys from page: %lu now level: %d", (ulong) ReinsertList.pages[i].offs, ReinsertList.pages[i].level)); } } } page_mark_changed(info, &page); if (_ma_dispose(info, page.pos, 0)) goto err; } } /* check for redundant root (not leaf, 1 child) and eliminate */ if ((old_root= *root) == HA_OFFSET_ERROR) goto err; if (_ma_fetch_keypage(&page, info, keyinfo, old_root, PAGECACHE_LOCK_WRITE, DFLT_INIT_HITS, info->buff, 0)) goto err; nod_flag= page.node; if (nod_flag && (page.size == share->keypage_header + key_data_length + nod_flag)) { *root= _ma_kpos(nod_flag, rt_PAGE_FIRST_KEY(share, info->buff, nod_flag)); page_mark_changed(info, &page); if (_ma_dispose(info, page.pos, 0)) goto err; } info->update= HA_STATE_DELETED; break; } case 1: /* not found */ { my_errno= HA_ERR_KEY_NOT_FOUND; goto err; } case -1: /* error */ default: goto err; /* purecov: inspected */ } my_free(ReinsertList.pages); stack_alloc_free(page_buf, buff_alloced); DBUG_RETURN(0); err: my_free(ReinsertList.pages); stack_alloc_free(page_buf, buff_alloced); DBUG_RETURN(1); }
O3
c
maria_rtree_real_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdx, -0x48(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x8(%rsi), %r12 movq %rax, -0x70(%rbp) movq 0x118(%rax), %rax movzbl 0xa5(%r12), %ecx movq (%rax,%rcx,8), %rdx cmpq $-0x1, %rdx je 0x6d1be movq %rsi, %r15 movq %rdi, %rbx movl 0x10(%rsi), %r14d xorps %xmm0, %xmm0 leaq -0x60(%rbp), %r8 movaps %xmm0, (%r8) leaq -0xa4(%rbp), %rcx xorl %r9d, %r9d callq 0x6d532 testl %eax, %eax je 0x6d1e2 cmpl $0x1, %eax je 0x6d1ce cmpl $0x2, %eax jne 0x6d1d9 movq -0x48(%rbp), %rax movq $-0x1, (%rax) movq -0x58(%rbp), %rdi callq 0xa0f0a xorl %eax, %eax jmp 0x6d479 callq 0xa2a4e movl $0x89, (%rax) jmp 0x6d477 callq 0xa2a4e movl $0x78, (%rax) movq -0x58(%rbp), %rdi jmp 0x6d472 movq 0x8(%r15), %rax movq %rax, -0xf8(%rbp) movq 0x10(%r15), %rax movq %rax, -0xf0(%rbp) movl $0x0, -0xe8(%rbp) movl -0x60(%rbp), %eax movq %rax, -0x68(%rbp) testq %rax, %rax je 0x6d3f4 movzwl 0xa6(%r12), %esi leaq -0x108(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%rbx), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x6d268 cmpq $0x10000, %rax # imm = 0x10000 ja 0x6d24c cmpl $0x1000, %esi # imm = 0x1000 jb 0x6d268 cmpq $0x8001, %rax # imm = 0x8001 jb 0x6d268 movq %rsp, %rcx addl $0xf, %esi andl $-0x10, %esi subq %rsi, %rcx movq %rcx, -0x40(%rbp) movq %rcx, %rsp movl $0x0, -0x34(%rbp) jmp 0x6d286 movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xa0cdd movq %rax, -0x40(%rbp) testq %rax, %rax je 0x6d452 movb $0x1, %al movl %eax, -0x34(%rbp) movq -0x58(%rbp), %rax xorl %r13d, %r13d movq -0x68(%rbp), %rcx movq %rcx, -0x88(%rbp) movq %rax, -0x78(%rbp) movq %rax, -0x80(%rbp) movq %r14, -0x98(%rbp) movq %r12, -0xa0(%rbp) movq %r13, %r15 shlq $0x4, %r15 movq -0x78(%rbp), %rax movq 0x8(%rax,%r15), %rcx leaq -0xe0(%rbp), %rdi movq %rbx, %rsi movq %r12, %rdx movl $0x4, %r8d movl $0x3, %r9d pushq $0x0 pushq -0x40(%rbp) callq 0x59e2a addq $0x10, %rsp testb %al, %al jne 0x6d43e movq %r13, -0x90(%rbp) movq %rbx, %r14 movl -0xb8(%rbp), %r12d movq -0xd0(%rbp), %rax movq -0x70(%rbp), %rcx movl 0x744(%rcx), %r13d addq %rax, %r13 addq %r12, %r13 movl -0xc0(%rbp), %ebx addq %rax, %rbx cmpq %rbx, %r13 jae 0x6d396 addq -0x78(%rbp), %r15 movq %r13, -0x100(%rbp) movl (%r15), %edx movq %r14, %rdi leaq -0x100(%rbp), %rsi movq -0x48(%rbp), %rcx callq 0x6c6ce testl %eax, %eax je 0x6d375 cmpl $-0x1, %eax je 0x6d43e movq -0x90(%rbp), %rax cmpq -0x68(%rbp), %rax jae 0x6d375 movq -0x88(%rbp), %rax movq -0x80(%rbp), %rcx incl (%rcx) addq $0x10, %rcx decq %rax jne 0x6d36a movq %r12, %rax testl %r12d, %r12d jne 0x6d387 movq -0x70(%rbp), %rax movl 0x3e0(%rax), %eax addq -0x98(%rbp), %r13 addq %rax, %r13 cmpq %rbx, %r13 jb 0x6d328 movq %r14, %rbx movq 0x2e8(%r14), %rax movl -0xb0(%rbp), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movq -0xc8(%rbp), %rsi movq %r14, %rdi xorl %edx, %edx callq 0x5a031 testl %eax, %eax jne 0x6d43e movq -0x90(%rbp), %r13 incq %r13 addq $0x10, -0x80(%rbp) decq -0x88(%rbp) cmpq -0x68(%rbp), %r13 movq -0x98(%rbp), %r14 movq -0xa0(%rbp), %r12 jne 0x6d2ae jmp 0x6d403 movq $0x0, -0x40(%rbp) movl $0x0, -0x34(%rbp) movq -0x48(%rbp), %rax movq (%rax), %rcx cmpq $-0x1, %rcx je 0x6d43e leaq -0xe0(%rbp), %rdi movq %rbx, %rsi movq %r12, %rdx movl $0x4, %r8d movl $0x3, %r9d pushq $0x0 pushq 0x378(%rbx) callq 0x59e2a addq $0x10, %rsp testb %al, %al je 0x6d49b movl -0x34(%rbp), %r15d movq -0x58(%rbp), %rdi callq 0xa0f0a testb %r15b, %r15b jne 0x6d46e jmp 0x6d477 callq 0xa2a4e movl $0x80, (%rax) movq -0x58(%rbp), %rdi callq 0xa0f0a movq $0x0, -0x40(%rbp) movq -0x40(%rbp), %rdi callq 0xa0f0a movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x6d52d leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl -0xb8(%rbp), %edi testq %rdi, %rdi movl -0x34(%rbp), %r15d je 0x6d508 movq -0x70(%rbp), %rax movl 0x744(%rax), %esi addl %edi, %r14d addl %esi, %r14d cmpl %r14d, -0xc0(%rbp) jne 0x6d508 addq 0x378(%rbx), %rsi addq %rdi, %rsi callq 0x57e3b movq -0x48(%rbp), %rcx movq %rax, (%rcx) movq 0x2e8(%rbx), %rax movl -0xb0(%rbp), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) movq -0xc8(%rbp), %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x5a031 testl %eax, %eax jne 0x6d442 movl $0x8, 0x624(%rbx) movq -0x58(%rbp), %rdi callq 0xa0f0a testb %r15b, %r15b je 0x6d1b7 movq -0x40(%rbp), %rdi jmp 0x6d1b2 callq 0x29270
maria_rtree_real_delete: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rbp+var_48], rdx mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov r12, [rsi+8] mov [rbp+var_70], rax mov rax, [rax+118h] movzx ecx, byte ptr [r12+0A5h] mov rdx, [rax+rcx*8] cmp rdx, 0FFFFFFFFFFFFFFFFh jz short loc_6D1BE mov r15, rsi mov rbx, rdi mov r14d, [rsi+10h] xorps xmm0, xmm0 lea r8, [rbp+var_60] movaps xmmword ptr [r8], xmm0 lea rcx, [rbp+var_A4] xor r9d, r9d call maria_rtree_delete_req test eax, eax jz short loc_6D1E2 cmp eax, 1 jz short loc_6D1CE cmp eax, 2 jnz short loc_6D1D9 mov rax, [rbp+var_48] mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh mov rdi, [rbp+var_58] loc_6D1B2: call my_free loc_6D1B7: xor eax, eax jmp loc_6D479 loc_6D1BE: call _my_thread_var mov dword ptr [rax], 89h jmp loc_6D477 loc_6D1CE: call _my_thread_var mov dword ptr [rax], 78h ; 'x' loc_6D1D9: mov rdi, [rbp+var_58] jmp loc_6D472 loc_6D1E2: mov rax, [r15+8] mov [rbp+var_F8], rax mov rax, [r15+10h] mov [rbp+var_F0], rax mov [rbp+var_E8], 0 mov eax, [rbp+var_60] mov [rbp+var_68], rax test rax, rax jz loc_6D3F4 movzx esi, word ptr [r12+0A6h] lea rcx, [rbp+var_108] mov [rcx], rsi mov rax, [rbx+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_6D268 cmp rax, offset stru_10000 ja short loc_6D24C cmp esi, 1000h jb short loc_6D268 cmp rax, 8001h jb short loc_6D268 loc_6D24C: mov rcx, rsp add esi, 0Fh and esi, 0FFFFFFF0h sub rcx, rsi mov [rbp+var_40], rcx mov rsp, rcx mov [rbp+var_34], 0 jmp short loc_6D286 loc_6D268: mov edx, 10010h xor edi, edi call my_malloc mov [rbp+var_40], rax test rax, rax jz loc_6D452 mov al, 1 mov [rbp+var_34], eax loc_6D286: mov rax, [rbp+var_58] xor r13d, r13d mov rcx, [rbp+var_68] mov [rbp+var_88], rcx mov [rbp+var_78], rax mov [rbp+var_80], rax mov [rbp+var_98], r14 mov [rbp+var_A0], r12 loc_6D2AE: mov r15, r13 shl r15, 4 mov rax, [rbp+var_78] mov rcx, [rax+r15+8] lea rdi, [rbp+var_E0] mov rsi, rbx mov rdx, r12 mov r8d, 4 mov r9d, 3 push 0 push [rbp+var_40] call _ma_fetch_keypage add rsp, 10h test al, al jnz loc_6D43E mov [rbp+var_90], r13 mov r14, rbx mov r12d, [rbp+var_B8] mov rax, [rbp+var_D0] mov rcx, [rbp+var_70] mov r13d, [rcx+744h] add r13, rax add r13, r12 mov ebx, [rbp+var_C0] add rbx, rax cmp r13, rbx jnb short loc_6D396 add r15, [rbp+var_78] loc_6D328: mov [rbp+var_100], r13 mov edx, [r15] mov rdi, r14 lea rsi, [rbp+var_100] mov rcx, [rbp+var_48] call maria_rtree_insert_level test eax, eax jz short loc_6D375 cmp eax, 0FFFFFFFFh jz loc_6D43E mov rax, [rbp+var_90] cmp rax, [rbp+var_68] jnb short loc_6D375 mov rax, [rbp+var_88] mov rcx, [rbp+var_80] loc_6D36A: inc dword ptr [rcx] add rcx, 10h dec rax jnz short loc_6D36A loc_6D375: mov rax, r12 test r12d, r12d jnz short loc_6D387 mov rax, [rbp+var_70] mov eax, [rax+3E0h] loc_6D387: add r13, [rbp+var_98] add r13, rax cmp r13, rbx jb short loc_6D328 loc_6D396: mov rbx, r14 mov rax, [r14+2E8h] mov ecx, [rbp+var_B0] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov rsi, [rbp+var_C8] mov rdi, r14 xor edx, edx call _ma_dispose test eax, eax jnz short loc_6D43E mov r13, [rbp+var_90] inc r13 add [rbp+var_80], 10h dec [rbp+var_88] cmp r13, [rbp+var_68] mov r14, [rbp+var_98] mov r12, [rbp+var_A0] jnz loc_6D2AE jmp short loc_6D403 loc_6D3F4: mov [rbp+var_40], 0 mov [rbp+var_34], 0 loc_6D403: mov rax, [rbp+var_48] mov rcx, [rax] cmp rcx, 0FFFFFFFFFFFFFFFFh jz short loc_6D43E lea rdi, [rbp+var_E0] mov rsi, rbx mov rdx, r12 mov r8d, 4 mov r9d, 3 push 0 push qword ptr [rbx+378h] call _ma_fetch_keypage add rsp, 10h test al, al jz short loc_6D49B loc_6D43E: mov r15d, [rbp+var_34] loc_6D442: mov rdi, [rbp+var_58] call my_free test r15b, r15b jnz short loc_6D46E jmp short loc_6D477 loc_6D452: call _my_thread_var mov dword ptr [rax], 80h mov rdi, [rbp+var_58] call my_free mov [rbp+var_40], 0 loc_6D46E: mov rdi, [rbp+var_40] loc_6D472: call my_free loc_6D477: mov al, 1 loc_6D479: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_6D52D lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6D49B: mov edi, [rbp+var_B8] test rdi, rdi mov r15d, [rbp+var_34] jz short loc_6D508 mov rax, [rbp+var_70] mov esi, [rax+744h] add r14d, edi add r14d, esi cmp [rbp+var_C0], r14d jnz short loc_6D508 add rsi, [rbx+378h] add rsi, rdi call _ma_kpos mov rcx, [rbp+var_48] mov [rcx], rax mov rax, [rbx+2E8h] mov ecx, [rbp+var_B0] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 mov rsi, [rbp+var_C8] mov rdi, rbx xor edx, edx call _ma_dispose test eax, eax jnz loc_6D442 loc_6D508: mov dword ptr [rbx+624h], 8 mov rdi, [rbp+var_58] call my_free test r15b, r15b jz loc_6D1B7 mov rdi, [rbp+var_40] jmp loc_6D1B2 loc_6D52D: call ___stack_chk_fail
char maria_rtree_real_delete(long long a1, long long a2, long long *a3) { long long v3; // r12 long long v4; // rdx long long v5; // rbx long long v6; // r14 int v7; // eax long long v8; // rdi long long v10; // rdi const char *v11; // rsi unsigned long long v12; // rax bool v13; // cc unsigned long long v14; // rax long long v15; // rax unsigned long long v16; // r13 long long v17; // r15 long long *v18; // r14 long long v19; // r12 unsigned long long v20; // r13 unsigned long long v21; // rbx unsigned int *v22; // r15 int inserted; // eax unsigned long long v24; // rax _DWORD *v25; // rcx long long v26; // rax char v27; // r15 long long v28; // rsi long long v29; // rax long long v30; // [rsp+0h] [rbp-110h] BYREF const char *v31; // [rsp+8h] [rbp-108h] BYREF _QWORD v32[3]; // [rsp+10h] [rbp-100h] BYREF int v33; // [rsp+28h] [rbp-E8h] _BYTE v34[16]; // [rsp+30h] [rbp-E0h] BYREF long long v35; // [rsp+40h] [rbp-D0h] unsigned long long v36; // [rsp+48h] [rbp-C8h] unsigned int v37; // [rsp+50h] [rbp-C0h] unsigned int v38; // [rsp+58h] [rbp-B8h] unsigned int v39; // [rsp+60h] [rbp-B0h] _BYTE v40[4]; // [rsp+6Ch] [rbp-A4h] BYREF long long v41; // [rsp+70h] [rbp-A0h] long long v42; // [rsp+78h] [rbp-98h] unsigned long long v43; // [rsp+80h] [rbp-90h] unsigned long long v44; // [rsp+88h] [rbp-88h] _DWORD *v45; // [rsp+90h] [rbp-80h] long long v46; // [rsp+98h] [rbp-78h] long long v47; // [rsp+A0h] [rbp-70h] unsigned long long v48; // [rsp+A8h] [rbp-68h] __int128 v49; // [rsp+B0h] [rbp-60h] BYREF long long *v50; // [rsp+C8h] [rbp-48h] long long v51; // [rsp+D0h] [rbp-40h] int v52; // [rsp+DCh] [rbp-34h] unsigned long long v53; // [rsp+E0h] [rbp-30h] v50 = a3; v53 = __readfsqword(0x28u); v3 = *(_QWORD *)(a2 + 8); v47 = *(_QWORD *)a1; v4 = *(_QWORD *)(*(_QWORD *)(v47 + 280) + 8LL * *(unsigned __int8 *)(v3 + 165)); if ( v4 != -1 ) { v5 = a1; v6 = *(unsigned int *)(a2 + 16); v49 = 0LL; v7 = maria_rtree_delete_req(a1, a2, v4, v40, &v49, 0LL); if ( v7 ) { if ( v7 == 1 ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 120; } else if ( v7 == 2 ) { *v50 = -1LL; v8 = *((_QWORD *)&v49 + 1); goto LABEL_6; } v10 = *((_QWORD *)&v49 + 1); goto LABEL_42; } v32[1] = *(_QWORD *)(a2 + 8); v32[2] = *(_QWORD *)(a2 + 16); v33 = 0; v48 = (unsigned int)v49; if ( (_DWORD)v49 ) { v11 = (const char *)*(unsigned __int16 *)(v3 + 166); v31 = v11; v12 = **(_QWORD **)(a1 + 120) - (_QWORD)&v31; v13 = v12 <= (unsigned long long)v11; v14 = v12 - (_QWORD)v11; if ( v13 || v14 <= (unsigned long long)&stru_10000 && ((unsigned int)v11 < 0x1000 || v14 < 0x8001) ) { v15 = my_malloc(0LL, v11, 65552LL); v51 = v15; if ( !v15 ) { *(_DWORD *)my_thread_var(0LL, v11) = 128; my_free(*((_QWORD *)&v49 + 1)); v51 = 0LL; LABEL_41: v10 = v51; LABEL_42: my_free(v10); return 1; } LOBYTE(v15) = 1; v52 = v15; } else { v51 = (long long)&v30 - (((_DWORD)v11 + 15) & 0xFFFFFFF0); v52 = 0; } v16 = 0LL; v44 = v48; v46 = *((_QWORD *)&v49 + 1); v45 = (_DWORD *)*((_QWORD *)&v49 + 1); v42 = v6; v41 = v3; while ( 1 ) { v17 = 16 * v16; if ( ma_fetch_keypage((long long)v34, v5, v3, *(_QWORD *)(v46 + 16 * v16 + 8), 4u, 3, v51) ) break; v43 = v16; v18 = (long long *)v5; v19 = v38; v20 = v38 + v35 + *(unsigned int *)(v47 + 1860); v21 = v35 + v37; if ( v20 < v21 ) { v22 = (unsigned int *)(v46 + v17); do { v32[0] = v20; inserted = maria_rtree_insert_level(v18, (long long)v32, *v22, v50); if ( inserted ) { if ( inserted == -1 ) goto LABEL_37; if ( v43 < v48 ) { v24 = v44; v25 = v45; do { ++*v25; v25 += 4; --v24; } while ( v24 ); } } v26 = v19; if ( !(_DWORD)v19 ) v26 = *(unsigned int *)(v47 + 992); v20 += v26 + v42; } while ( v20 < v21 ); } v5 = (long long)v18; *(_BYTE *)(v18[93] + 24LL * v39 + 16) = 1; if ( (unsigned int)ma_dispose(v18, v36, 0) ) break; v16 = v43 + 1; v45 += 4; --v44; LODWORD(v6) = v42; v3 = v41; if ( v43 + 1 == v48 ) goto LABEL_35; } } else { v51 = 0LL; v52 = 0; LABEL_35: if ( *v50 != -1 && !ma_fetch_keypage((long long)v34, v5, v3, *v50, 4u, 3, *(_QWORD *)(v5 + 888)) ) { v27 = v52; if ( !v38 || (v28 = *(unsigned int *)(v47 + 1860), v37 != (_DWORD)v28 + v38 + (_DWORD)v6) || (v29 = ma_kpos(v38, v38 + *(_QWORD *)(v5 + 888) + v28), *v50 = v29, *(_BYTE *)(*(_QWORD *)(v5 + 744) + 24LL * v39 + 16) = 1, !(unsigned int)ma_dispose((_QWORD *)v5, v36, 0)) ) { *(_DWORD *)(v5 + 1572) = 8; my_free(*((_QWORD *)&v49 + 1)); if ( !v27 ) return 0; v8 = v51; LABEL_6: my_free(v8); return 0; } LABEL_38: my_free(*((_QWORD *)&v49 + 1)); if ( !v27 ) return 1; goto LABEL_41; } } LABEL_37: v27 = v52; goto LABEL_38; } *(_DWORD *)my_thread_var(a1, (const char *)a2) = 137; return 1; }
maria_rtree_real_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RBP + -0x48],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV R12,qword ptr [RSI + 0x8] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RAX + 0x118] MOVZX ECX,byte ptr [R12 + 0xa5] MOV RDX,qword ptr [RAX + RCX*0x8] CMP RDX,-0x1 JZ 0x0016d1be MOV R15,RSI MOV RBX,RDI MOV R14D,dword ptr [RSI + 0x10] XORPS XMM0,XMM0 LEA R8,[RBP + -0x60] MOVAPS xmmword ptr [R8],XMM0 LEA RCX,[RBP + -0xa4] XOR R9D,R9D CALL 0x0016d532 TEST EAX,EAX JZ 0x0016d1e2 CMP EAX,0x1 JZ 0x0016d1ce CMP EAX,0x2 JNZ 0x0016d1d9 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX],-0x1 MOV RDI,qword ptr [RBP + -0x58] LAB_0016d1b2: CALL 0x001a0f0a LAB_0016d1b7: XOR EAX,EAX JMP 0x0016d479 LAB_0016d1be: CALL 0x001a2a4e MOV dword ptr [RAX],0x89 JMP 0x0016d477 LAB_0016d1ce: CALL 0x001a2a4e MOV dword ptr [RAX],0x78 LAB_0016d1d9: MOV RDI,qword ptr [RBP + -0x58] JMP 0x0016d472 LAB_0016d1e2: MOV RAX,qword ptr [R15 + 0x8] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBP + -0xf0],RAX MOV dword ptr [RBP + -0xe8],0x0 MOV EAX,dword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x68],RAX TEST RAX,RAX JZ 0x0016d3f4 MOVZX ESI,word ptr [R12 + 0xa6] LEA RCX,[RBP + -0x108] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [RBX + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x0016d268 CMP RAX,0x10000 JA 0x0016d24c CMP ESI,0x1000 JC 0x0016d268 CMP RAX,0x8001 JC 0x0016d268 LAB_0016d24c: MOV RCX,RSP ADD ESI,0xf AND ESI,0xfffffff0 SUB RCX,RSI MOV qword ptr [RBP + -0x40],RCX MOV RSP,RCX MOV dword ptr [RBP + -0x34],0x0 JMP 0x0016d286 LAB_0016d268: MOV EDX,0x10010 XOR EDI,EDI CALL 0x001a0cdd MOV qword ptr [RBP + -0x40],RAX TEST RAX,RAX JZ 0x0016d452 MOV AL,0x1 MOV dword ptr [RBP + -0x34],EAX LAB_0016d286: MOV RAX,qword ptr [RBP + -0x58] XOR R13D,R13D MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x88],RCX MOV qword ptr [RBP + -0x78],RAX MOV qword ptr [RBP + -0x80],RAX MOV qword ptr [RBP + -0x98],R14 MOV qword ptr [RBP + -0xa0],R12 LAB_0016d2ae: MOV R15,R13 SHL R15,0x4 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + R15*0x1 + 0x8] LEA RDI,[RBP + -0xe0] MOV RSI,RBX MOV RDX,R12 MOV R8D,0x4 MOV R9D,0x3 PUSH 0x0 PUSH qword ptr [RBP + -0x40] CALL 0x00159e2a ADD RSP,0x10 TEST AL,AL JNZ 0x0016d43e MOV qword ptr [RBP + -0x90],R13 MOV R14,RBX MOV R12D,dword ptr [RBP + -0xb8] MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x70] MOV R13D,dword ptr [RCX + 0x744] ADD R13,RAX ADD R13,R12 MOV EBX,dword ptr [RBP + -0xc0] ADD RBX,RAX CMP R13,RBX JNC 0x0016d396 ADD R15,qword ptr [RBP + -0x78] LAB_0016d328: MOV qword ptr [RBP + -0x100],R13 MOV EDX,dword ptr [R15] MOV RDI,R14 LEA RSI,[RBP + -0x100] MOV RCX,qword ptr [RBP + -0x48] CALL 0x0016c6ce TEST EAX,EAX JZ 0x0016d375 CMP EAX,-0x1 JZ 0x0016d43e MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x68] JNC 0x0016d375 MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x80] LAB_0016d36a: INC dword ptr [RCX] ADD RCX,0x10 DEC RAX JNZ 0x0016d36a LAB_0016d375: MOV RAX,R12 TEST R12D,R12D JNZ 0x0016d387 MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x3e0] LAB_0016d387: ADD R13,qword ptr [RBP + -0x98] ADD R13,RAX CMP R13,RBX JC 0x0016d328 LAB_0016d396: MOV RBX,R14 MOV RAX,qword ptr [R14 + 0x2e8] MOV ECX,dword ptr [RBP + -0xb0] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV RSI,qword ptr [RBP + -0xc8] MOV RDI,R14 XOR EDX,EDX CALL 0x0015a031 TEST EAX,EAX JNZ 0x0016d43e MOV R13,qword ptr [RBP + -0x90] INC R13 ADD qword ptr [RBP + -0x80],0x10 DEC qword ptr [RBP + -0x88] CMP R13,qword ptr [RBP + -0x68] MOV R14,qword ptr [RBP + -0x98] MOV R12,qword ptr [RBP + -0xa0] JNZ 0x0016d2ae JMP 0x0016d403 LAB_0016d3f4: MOV qword ptr [RBP + -0x40],0x0 MOV dword ptr [RBP + -0x34],0x0 LAB_0016d403: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX] CMP RCX,-0x1 JZ 0x0016d43e LEA RDI,[RBP + -0xe0] MOV RSI,RBX MOV RDX,R12 MOV R8D,0x4 MOV R9D,0x3 PUSH 0x0 PUSH qword ptr [RBX + 0x378] CALL 0x00159e2a ADD RSP,0x10 TEST AL,AL JZ 0x0016d49b LAB_0016d43e: MOV R15D,dword ptr [RBP + -0x34] LAB_0016d442: MOV RDI,qword ptr [RBP + -0x58] CALL 0x001a0f0a TEST R15B,R15B JNZ 0x0016d46e JMP 0x0016d477 LAB_0016d452: CALL 0x001a2a4e MOV dword ptr [RAX],0x80 MOV RDI,qword ptr [RBP + -0x58] CALL 0x001a0f0a MOV qword ptr [RBP + -0x40],0x0 LAB_0016d46e: MOV RDI,qword ptr [RBP + -0x40] LAB_0016d472: CALL 0x001a0f0a LAB_0016d477: MOV AL,0x1 LAB_0016d479: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0016d52d LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016d49b: MOV EDI,dword ptr [RBP + -0xb8] TEST RDI,RDI MOV R15D,dword ptr [RBP + -0x34] JZ 0x0016d508 MOV RAX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RAX + 0x744] ADD R14D,EDI ADD R14D,ESI CMP dword ptr [RBP + -0xc0],R14D JNZ 0x0016d508 ADD RSI,qword ptr [RBX + 0x378] ADD RSI,RDI CALL 0x00157e3b MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBX + 0x2e8] MOV ECX,dword ptr [RBP + -0xb0] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 MOV RSI,qword ptr [RBP + -0xc8] MOV RDI,RBX XOR EDX,EDX CALL 0x0015a031 TEST EAX,EAX JNZ 0x0016d442 LAB_0016d508: MOV dword ptr [RBX + 0x624],0x8 MOV RDI,qword ptr [RBP + -0x58] CALL 0x001a0f0a TEST R15B,R15B JZ 0x0016d1b7 MOV RDI,qword ptr [RBP + -0x40] JMP 0x0016d1b2 LAB_0016d52d: CALL 0x00129270
int8 maria_rtree_real_delete(long *param_1,long param_2,long *param_3) { ushort uVar1; uint uVar2; long lVar3; long *plVar4; char cVar5; int iVar6; int4 *puVar7; ulong uVar8; int8 uVar9; long lVar10; int *piVar11; ulong uVar12; int *piVar13; int *piVar14; ulong uVar15; ulong uVar16; uint uVar17; long in_FS_OFFSET; int aiStack_118 [2]; ulong local_110; ulong local_108; int8 local_100; int8 local_f8; int4 local_f0; int1 local_e8 [16]; long local_d8; int8 local_d0; uint local_c8; uint local_c0; uint local_b8; long local_a8; ulong local_a0; ulong local_98; ulong local_90; int *local_88; int *local_80; long local_78; ulong local_70; ulong local_68; int *piStack_60; long *local_50; int *local_48; int4 local_3c; long local_38; piVar14 = aiStack_118; piVar13 = aiStack_118; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_78 = *param_1; lVar10 = *(long *)(param_2 + 8); local_50 = param_3; if (*(long *)(*(long *)(local_78 + 0x118) + (ulong)*(byte *)(lVar10 + 0xa5) * 8) == -1) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x89; piVar13 = aiStack_118; } else { uVar17 = *(uint *)(param_2 + 0x10); local_68 = 0; piStack_60 = (int *)0x0; iVar6 = maria_rtree_delete_req(); if (iVar6 == 0) { local_100 = *(int8 *)(param_2 + 8); local_f8 = *(int8 *)(param_2 + 0x10); local_f0 = 0; local_70 = local_68 & 0xffffffff; if (local_70 == 0) { local_48 = (int *)0x0; local_3c = 0; } else { uVar1 = *(ushort *)(lVar10 + 0xa6); local_110 = (ulong)uVar1; uVar8 = (*(long *)param_1[0xf] - (long)&local_110) - local_110; if ((local_110 < (ulong)(*(long *)param_1[0xf] - (long)&local_110)) && ((0x10000 < uVar8 || ((0xfff < uVar1 && (0x8000 < uVar8)))))) { local_48 = (int *)((long)aiStack_118 - (ulong)(uVar1 + 0xf & 0xfffffff0)); local_3c = 0; piVar13 = local_48; } else { local_48 = (int *)my_malloc(0,local_110,0x10010); if (local_48 == (int *)0x0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x80; my_free(piStack_60); local_48 = (int *)0x0; piVar14 = aiStack_118; piVar11 = local_48; goto LAB_0016d472; } local_3c = (int4)CONCAT71((int7)((ulong)local_48 >> 8),1); piVar13 = aiStack_118; } uVar8 = 0; local_90 = local_70; local_80 = piStack_60; local_88 = piStack_60; local_a8 = lVar10; local_a0 = (ulong)uVar17; do { lVar10 = local_a8; uVar9 = *(int8 *)(local_80 + uVar8 * 4 + 2); piVar13[-2] = 0; piVar13[-1] = 0; *(int **)(piVar13 + -4) = local_48; piVar13[-6] = 0x16d2e1; piVar13[-5] = 0; cVar5 = _ma_fetch_keypage(local_e8,param_1,lVar10,uVar9,4,3); uVar17 = local_c0; if (cVar5 != '\0') goto LAB_0016d43e; uVar15 = (ulong)local_c0; uVar16 = (ulong)*(uint *)(local_78 + 0x744) + local_d8 + uVar15; uVar12 = (ulong)local_c8 + local_d8; local_98 = uVar8; if (uVar16 < uVar12) { piVar14 = local_80 + uVar8 * 4; do { plVar4 = local_50; iVar6 = *piVar14; local_108 = uVar16; piVar13[-2] = 0x16d345; piVar13[-1] = 0; iVar6 = maria_rtree_insert_level(param_1,&local_108,iVar6,plVar4); if (iVar6 != 0) { if (iVar6 == -1) goto LAB_0016d43e; uVar8 = local_90; piVar11 = local_88; if (local_98 < local_70) { do { *piVar11 = *piVar11 + 1; uVar8 = uVar8 - 1; piVar11 = piVar11 + 4; } while (uVar8 != 0); } } uVar8 = uVar15; if (uVar17 == 0) { uVar8 = (ulong)*(uint *)(local_78 + 0x3e0); } uVar16 = uVar16 + local_a0 + uVar8; } while (uVar16 < uVar12); } uVar9 = local_d0; *(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_b8 * 0x18) = 1; piVar13[-2] = 0x16d3c0; piVar13[-1] = 0; iVar6 = _ma_dispose(param_1,uVar9,0); if (iVar6 != 0) goto LAB_0016d43e; uVar8 = local_98 + 1; local_88 = local_88 + 4; local_90 = local_90 - 1; uVar17 = (uint)local_a0; lVar10 = local_a8; } while (uVar8 != local_70); } lVar3 = *local_50; if (lVar3 == -1) { LAB_0016d43e: cVar5 = (char)local_3c; } else { *(int8 *)((long)piVar13 + -8) = 0; *(long *)((long)piVar13 + -0x10) = param_1[0x6f]; *(int8 *)((long)piVar13 + -0x18) = 0x16d436; cVar5 = _ma_fetch_keypage(local_e8,param_1,lVar10,lVar3,4,3); if (cVar5 != '\0') goto LAB_0016d43e; uVar8 = (ulong)local_c0; cVar5 = (char)local_3c; if ((uVar8 == 0) || (uVar2 = *(uint *)(local_78 + 0x744), local_c8 != uVar17 + local_c0 + uVar2)) { LAB_0016d508: piVar14 = piStack_60; *(int4 *)((long)param_1 + 0x624) = 8; *(int8 *)((long)piVar13 + -8) = 0x16d51b; my_free(piVar14); piVar14 = local_48; if (cVar5 != '\0') goto LAB_0016d1b2; goto LAB_0016d1b7; } lVar10 = param_1[0x6f]; *(int8 *)((long)piVar13 + -8) = 0x16d4d2; lVar10 = _ma_kpos(uVar8,(ulong)uVar2 + lVar10 + uVar8); *local_50 = lVar10; *(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_b8 * 0x18) = 1; *(int8 *)((long)piVar13 + -8) = 0x16d500; iVar6 = _ma_dispose(param_1,local_d0,0); if (iVar6 == 0) goto LAB_0016d508; } piVar14 = piStack_60; *(int8 *)((long)piVar13 + -8) = 0x16d44b; my_free(piVar14); piVar14 = piVar13; piVar11 = local_48; if (cVar5 == '\0') goto LAB_0016d477; } else if (iVar6 == 1) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x78; piVar11 = piStack_60; } else { piVar14 = aiStack_118; piVar11 = piStack_60; if (iVar6 == 2) { *local_50 = -1; piVar13 = aiStack_118; piVar14 = piStack_60; LAB_0016d1b2: *(int8 *)((long)piVar13 + -8) = 0x16d1b7; my_free(piVar14); LAB_0016d1b7: uVar9 = 0; goto LAB_0016d479; } } LAB_0016d472: *(int8 *)((long)piVar14 + -8) = 0x16d477; my_free(piVar11); piVar13 = piVar14; } LAB_0016d477: uVar9 = 1; LAB_0016d479: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)((long)piVar13 + -8) = maria_rtree_delete_req; __stack_chk_fail(); } return uVar9; }
25,727
setup_actor_hash_get_key(unsigned char const*, unsigned long*, char)
eloqsql/storage/perfschema/pfs_setup_actor.cc
C_MODE_START static uchar *setup_actor_hash_get_key(const uchar *entry, size_t *length, my_bool) { const PFS_setup_actor * const *typed_entry; const PFS_setup_actor *setup_actor; const void *result; typed_entry= reinterpret_cast<const PFS_setup_actor* const *> (entry); assert(typed_entry != NULL); setup_actor= *typed_entry; assert(setup_actor != NULL); *length= setup_actor->m_key.m_key_length; result= setup_actor->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); }
O3
cpp
setup_actor_hash_get_key(unsigned char const*, unsigned long*, char): pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movl 0x2c8(%rax), %ecx addq $0x4, %rax movq %rcx, (%rsi) popq %rbp retq
_ZL24setup_actor_hash_get_keyPKhPmc: push rbp mov rbp, rsp mov rax, [rdi] mov ecx, [rax+2C8h] add rax, 4 mov [rsi], rcx pop rbp retn
long long setup_actor_hash_get_key(const unsigned __int8 *a1, unsigned long long *a2) { long long result; // rax result = *(_QWORD *)a1 + 4LL; *a2 = *(unsigned int *)(*(_QWORD *)a1 + 712LL); return result; }
setup_actor_hash_get_key: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV ECX,dword ptr [RAX + 0x2c8] ADD RAX,0x4 MOV qword ptr [RSI],RCX POP RBP RET
/* setup_actor_hash_get_key(unsigned char const*, unsigned long*, char) */ long setup_actor_hash_get_key(uchar *param_1,ulong *param_2,char param_3) { long lVar1; lVar1 = *(long *)param_1; *param_2 = (ulong)*(uint *)(lVar1 + 0x2c8); return lVar1 + 4; }
25,728
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) { std::string text; text.resize(std::max(text.capacity(), tokens.size())); int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special); if (n_chars < 0) { text.resize(-n_chars); n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special); GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization } text.resize(n_chars); // NOTE: the original tokenizer decodes bytes after collecting the pieces. return text; }
O2
cpp
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rdx), %rax subq (%rdx), %rax sarq $0x2, %rax cmpq $0x10, %rax pushq $0xf popq %rsi cmovaeq %rax, %rsi callq 0x24c00 movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx shrq $0x2, %rdx movq (%rbx), %rcx movl 0x8(%rbx), %r8d movzbl %bpl, %ebp movl %ebp, (%rsp) movq %r14, %rdi xorl %r9d, %r9d callq 0x240c0 testl %eax, %eax jns 0x57290 negl %eax movq %rbx, %rdi movq %rax, %rsi callq 0x24c00 movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx shrq $0x2, %rdx movq (%rbx), %rcx movl 0x8(%rbx), %r8d movl %ebp, (%rsp) movq %r14, %rdi xorl %r9d, %r9d callq 0x240c0 cmpl 0x8(%rbx), %eax jg 0x572a9 movslq %eax, %rsi movq %rbx, %rdi callq 0x24c00 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x5d7f1(%rip), %rdi # 0xb4aa1 leaq 0x5a9cf(%rip), %rdx # 0xb1c86 leaq 0x5de88(%rip), %rcx # 0xb5146 movl $0x6e2, %esi # imm = 0x6E2 xorl %eax, %eax callq 0x24ea0 jmp 0x572cc movq %rax, %r14 movq %rbx, %rdi callq 0x251d8 movq %r14, %rdi callq 0x24f80
_Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb: push rbp push r15 push r14 push rbx push rax mov ebp, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax, [rdx+8] sub rax, [rdx] sar rax, 2 cmp rax, 10h push 0Fh pop rsi cmovnb rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi shr rdx, 2 mov rcx, [rbx] mov r8d, [rbx+8] movzx ebp, bpl mov [rsp+28h+var_28], ebp mov rdi, r14 xor r9d, r9d call _llama_detokenize test eax, eax jns short loc_57290 neg eax mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi shr rdx, 2 mov rcx, [rbx] mov r8d, [rbx+8] mov [rsp+28h+var_28], ebp mov rdi, r14 xor r9d, r9d call _llama_detokenize cmp eax, [rbx+8] jg short loc_572A9 loc_57290: movsxd rsi, eax mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_572A9: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()" mov esi, 6E2h xor eax, eax call _ggml_abort jmp short $+2 loc_572CC: mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
_QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, unsigned __int8 a4) { long long v4; // rax long long v8; // rsi int v9; // eax long long v10; // rdx long long v12; // r14 long long v13; // [rsp+0h] [rbp-28h] long long v14; // [rsp+0h] [rbp-28h] HIDWORD(v13) = HIDWORD(v4); *a1 = a1 + 2; a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; v8 = 15LL; if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 ) v8 = (long long)(a3[1] - *a3) >> 2; std::string::resize(a1, v8, a3); LODWORD(v13) = a4; v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v13); if ( v9 < 0 ) { std::string::resize(a1, (unsigned int)-v9, v10); LODWORD(v14) = a4; v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v14); if ( v9 > *((_DWORD *)a1 + 2) ) { v12 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1762LL, "GGML_ASSERT(%s) failed", "n_chars <= (int32_t)text.size()"); std::string::~string(a1); _Unwind_Resume(v12); } } std::string::resize(a1, v9, v10); return a1; }
common_detokenize[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RDX + 0x8] SUB RAX,qword ptr [RDX] SAR RAX,0x2 CMP RAX,0x10 PUSH 0xf POP RSI CMOVNC RSI,RAX LAB_0015722b: CALL 0x00124c00 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI SHR RDX,0x2 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RBX + 0x8] LAB_00157245: MOVZX EBP,BPL MOV dword ptr [RSP],EBP MOV RDI,R14 XOR R9D,R9D CALL 0x001240c0 TEST EAX,EAX JNS 0x00157290 NEG EAX MOV RDI,RBX MOV RSI,RAX CALL 0x00124c00 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI SHR RDX,0x2 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RBX + 0x8] MOV dword ptr [RSP],EBP MOV RDI,R14 XOR R9D,R9D CALL 0x001240c0 CMP EAX,dword ptr [RBX + 0x8] JG 0x001572a9 LAB_00157290: MOVSXD RSI,EAX MOV RDI,RBX CALL 0x00124c00 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001572a9: LEA RDI,[0x1b4aa1] LEA RDX,[0x1b1c86] LEA RCX,[0x1b5146] MOV ESI,0x6e2 XOR EAX,EAX CALL 0x00124ea0
/* common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int> > const&, bool) */ llama_vocab * common_detokenize_abi_cxx11_(llama_vocab *param_1,vector *param_2,bool param_3) { int iVar1; int8 in_RAX; int4 uVar2; int4 in_ECX; int7 in_register_00000011; long *plVar3; ulong uVar4; uVar2 = (int4)((ulong)in_RAX >> 0x20); plVar3 = (long *)CONCAT71(in_register_00000011,param_3); *(llama_vocab **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (llama_vocab)0x0; /* try { // try from 0015722b to 0015722f has its CatchHandler @ 001572ca */ std::__cxx11::string::resize((ulong)param_1); /* try { // try from 00157245 to 001572c9 has its CatchHandler @ 001572cc */ uVar4 = CONCAT44(uVar2,in_ECX) & 0xffffffff000000ff; iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,*(int8 *)param_1, *(int4 *)(param_1 + 8),0,uVar4); uVar2 = (int4)(uVar4 >> 0x20); if (iVar1 < 0) { std::__cxx11::string::resize((ulong)param_1); iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2, *(int8 *)param_1,*(int4 *)(param_1 + 8),0, CONCAT44(uVar2,in_ECX) & 0xffffffff000000ff); if (*(int *)(param_1 + 8) < iVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6e2 ,"GGML_ASSERT(%s) failed","n_chars <= (int32_t)text.size()"); } } std::__cxx11::string::resize((ulong)param_1); return param_1; }
25,729
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the population of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } for (int eIndex = 0; eIndex < 3; ++eIndex) { CornerTopology const & c0 = _corners[eIndex]; CornerTopology const & c1 = _corners[(eIndex + 1) % 3]; bool isBoundaryEdge = c0.epOnBoundary && c1.emOnBoundary; bool isDartEdge = c0.epOnBoundary != c1.emOnBoundary; if (isBoundaryEdge || (c0.isRegular && c1.isRegular && !isDartEdge)) { assignRegularMidEdgePoint(eIndex, matrix); } else { computeIrregularMidEdgePoint(eIndex, matrix, weightBuffer, indexBuffer); } } promoteCubicEdgePointsToQuartic(matrix, weightBuffer, indexBuffer); if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O0
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp movq %rsp, %rbp subq $0x6f0, %rsp # imm = 0x6F0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x688(%rbp) testb $0x1, 0x8(%rax) je 0x1254bc movq -0x688(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0xc(%rdi), %edx movl 0x10(%rdi), %ecx callq 0xc6b20 jmp 0x1254cc movq -0x688(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xc7560 movq -0x688(%rbp), %rax movl 0x4(%rax), %ecx incl %ecx movl %ecx, -0x14(%rbp) movl -0x14(%rbp), %edx movl %edx, %ecx leal (%rcx,%rcx,2), %ecx movl %ecx, -0x1c(%rbp) movl (%rax), %eax addl %eax, %eax movl %eax, -0x20(%rbp) leaq -0x1c(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0xd2720 movl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %esi leaq -0x438(%rbp), %rdi callq 0xcd150 movl -0x18(%rbp), %esi leaq -0x650(%rbp), %rdi callq 0xcf750 jmp 0x12551f movl $0x0, -0x660(%rbp) cmpl $0x3, -0x660(%rbp) jge 0x125622 movq -0x688(%rbp), %rax addq $0x18, %rax movslq -0x660(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x3, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x1255bc movq -0x688(%rbp), %rdi movl -0x660(%rbp), %esi movq -0x10(%rbp), %rdx callq 0xd5cb0 jmp 0x12557d jmp 0x12560c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x658(%rbp) movl %eax, -0x65c(%rbp) jmp 0x1259db movq %rax, %rcx movl %edx, %eax movq %rcx, -0x658(%rbp) movl %eax, -0x65c(%rbp) leaq -0x650(%rbp), %rdi callq 0xccc30 jmp 0x1259db movl -0x660(%rbp), %eax movl %eax, -0x69c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x698(%rbp) leaq -0x438(%rbp), %rdi callq 0xce390 movq %rax, -0x690(%rbp) jmp 0x1255e8 movq -0x690(%rbp), %rcx movq -0x698(%rbp), %rdx movl -0x69c(%rbp), %esi movq -0x688(%rbp), %rdi callq 0xd2700 jmp 0x12560a jmp 0x12560c jmp 0x12560e movl -0x660(%rbp), %eax addl $0x1, %eax movl %eax, -0x660(%rbp) jmp 0x125529 movl $0x0, -0x664(%rbp) cmpl $0x3, -0x664(%rbp) jge 0x125784 movq -0x688(%rbp), %rax addq $0x18, %rax movslq -0x664(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x125697 movq -0x688(%rbp), %rax addq $0x18, %rax movslq -0x664(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x9, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x1256b1 movq -0x688(%rbp), %rdi movl -0x664(%rbp), %esi movq -0x10(%rbp), %rdx callq 0xc9a10 jmp 0x1256af jmp 0x1256b1 movq -0x688(%rbp), %rax addq $0x18, %rax movslq -0x664(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x12570f movq -0x688(%rbp), %rax addq $0x18, %rax movslq -0x664(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x9, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x12576e movl -0x664(%rbp), %eax movl %eax, -0x6b4(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x6b0(%rbp) leaq -0x438(%rbp), %rdi callq 0xce390 movq %rax, -0x6a8(%rbp) jmp 0x12573b leaq -0x650(%rbp), %rdi callq 0xd0e30 movq -0x688(%rbp), %rdi movl -0x6b4(%rbp), %esi movq -0x6b0(%rbp), %rdx movq -0x6a8(%rbp), %rcx movq %rax, %r8 callq 0xd0af0 jmp 0x12576c jmp 0x12576e jmp 0x125770 movl -0x664(%rbp), %eax addl $0x1, %eax movl %eax, -0x664(%rbp) jmp 0x12562c movl $0x0, -0x668(%rbp) cmpl $0x3, -0x668(%rbp) jge 0x125955 movq -0x688(%rbp), %rax movq %rax, %rcx addq $0x18, %rcx movslq -0x668(%rbp), %rdx imulq $0xb0, %rdx, %rdx addq %rdx, %rcx movq %rcx, -0x670(%rbp) addq $0x18, %rax movq %rax, -0x6c0(%rbp) movl -0x668(%rbp), %eax addl $0x1, %eax movl $0x3, %ecx cltd idivl %ecx movq -0x6c0(%rbp), %rax movslq %edx, %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movq %rax, -0x678(%rbp) movq -0x670(%rbp), %rax movw (%rax), %ax shrw $0x6, %ax andw $0x1, %ax movzwl %ax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x6b5(%rbp) je 0x12583b movq -0x678(%rbp), %rax movw (%rax), %ax shrw $0x7, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax setne %al movb %al, -0x6b5(%rbp) movb -0x6b5(%rbp), %al andb $0x1, %al movb %al, -0x679(%rbp) movq -0x670(%rbp), %rax movw (%rax), %ax shrw $0x6, %ax andw $0x1, %ax movzwl %ax, %eax movq -0x678(%rbp), %rcx movw (%rcx), %cx shrw $0x7, %cx andw $0x1, %cx movzwl %cx, %ecx cmpl %ecx, %eax setne %al andb $0x1, %al movb %al, -0x67a(%rbp) testb $0x1, -0x679(%rbp) jne 0x1258c6 movq -0x670(%rbp), %rax movw (%rax), %ax shrw $0x3, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x1258e0 movq -0x678(%rbp), %rax movw (%rax), %ax shrw $0x3, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x1258e0 testb $0x1, -0x67a(%rbp) jne 0x1258e0 movq -0x688(%rbp), %rdi movl -0x668(%rbp), %esi movq -0x10(%rbp), %rdx callq 0xd5260 jmp 0x1258de jmp 0x12593f movl -0x668(%rbp), %eax movl %eax, -0x6d4(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x6d0(%rbp) leaq -0x438(%rbp), %rdi callq 0xce390 movq %rax, -0x6c8(%rbp) jmp 0x12590c leaq -0x650(%rbp), %rdi callq 0xd0e30 movq -0x688(%rbp), %rdi movl -0x6d4(%rbp), %esi movq -0x6d0(%rbp), %rdx movq -0x6c8(%rbp), %rcx movq %rax, %r8 callq 0xc6470 jmp 0x12593d jmp 0x12593f jmp 0x125941 movl -0x668(%rbp), %eax addl $0x1, %eax movl %eax, -0x668(%rbp) jmp 0x12578e movq -0x10(%rbp), %rax movq %rax, -0x6e8(%rbp) leaq -0x438(%rbp), %rdi callq 0xce390 movq %rax, -0x6e0(%rbp) jmp 0x125975 leaq -0x650(%rbp), %rdi callq 0xd0e30 movq -0x688(%rbp), %rdi movq -0x6e8(%rbp), %rsi movq -0x6e0(%rbp), %rdx movq %rax, %rcx callq 0xcf660 jmp 0x1259a0 movq -0x688(%rbp), %rax testb $0x1, 0x9(%rax) je 0x1259ba movq -0x10(%rbp), %rdi callq 0x11c220 jmp 0x1259b8 jmp 0x1259ba leaq -0x650(%rbp), %rdi callq 0xccc30 leaq -0x438(%rbp), %rdi callq 0xc63b0 addq $0x6f0, %rsp # imm = 0x6F0 popq %rbp retq leaq -0x438(%rbp), %rdi callq 0xc63b0 movq -0x658(%rbp), %rdi callq 0xd58b0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE7ConvertERNS1_12SparseMatrixIdEE: push rbp mov rbp, rsp sub rsp, 6F0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_688], rax test byte ptr [rax+8], 1 jz short loc_1254BC mov rdi, [rbp+var_688] mov rsi, [rbp+var_10] mov edx, [rdi+0Ch] mov ecx, [rdi+10h] call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIdEEii; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int,int) jmp short loc_1254CC loc_1254BC: mov rdi, [rbp+var_688] mov rsi, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE22resizeMatrixUnisolatedERNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_1254CC: mov rax, [rbp+var_688] mov ecx, [rax+4] inc ecx mov [rbp+var_14], ecx mov edx, [rbp+var_14] mov ecx, edx lea ecx, [rcx+rcx*2] mov [rbp+var_1C], ecx mov eax, [rax] add eax, eax mov [rbp+var_20], eax lea rdi, [rbp+var_1C] lea rsi, [rbp+var_20] call __ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&) mov eax, [rax] mov [rbp+var_18], eax mov esi, [rbp+var_18] lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::StackBuffer(uint) mov esi, [rbp+var_18] lea rdi, [rbp+var_650] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(uint) jmp short $+2 loc_12551F: mov [rbp+var_660], 0 loc_125529: cmp [rbp+var_660], 3 jge loc_125622 mov rax, [rbp+var_688] add rax, 18h movsxd rcx, [rbp+var_660] imul rcx, 0B0h add rax, rcx mov ax, [rax] shr ax, 3 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_1255BC mov rdi, [rbp+var_688] mov esi, [rbp+var_660] mov rdx, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularEdgePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short $+2 loc_12557D: jmp loc_12560C mov rcx, rax mov eax, edx mov [rbp+var_658], rcx mov [rbp+var_65C], eax jmp loc_1259DB mov rcx, rax mov eax, edx mov [rbp+var_658], rcx mov [rbp+var_65C], eax lea rdi, [rbp+var_650] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::~StackBuffer() jmp loc_1259DB loc_1255BC: mov eax, [rbp+var_660] mov [rbp+var_69C], eax mov rax, [rbp+var_10] mov [rbp+var_698], rax lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEcvPdEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(void) mov [rbp+var_690], rax jmp short $+2 loc_1255E8: mov rcx, [rbp+var_690] mov rdx, [rbp+var_698] mov esi, [rbp+var_69C] mov rdi, [rbp+var_688] call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIdEEPd; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *) jmp short $+2 loc_12560A: jmp short $+2 loc_12560C: jmp short $+2 loc_12560E: mov eax, [rbp+var_660] add eax, 1 mov [rbp+var_660], eax jmp loc_125529 loc_125622: mov [rbp+var_664], 0 loc_12562C: cmp [rbp+var_664], 3 jge loc_125784 mov rax, [rbp+var_688] add rax, 18h movsxd rcx, [rbp+var_664] imul rcx, 0B0h add rax, rcx mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_125697 mov rax, [rbp+var_688] add rax, 18h movsxd rcx, [rbp+var_664] imul rcx, 0B0h add rax, rcx mov ax, [rax] shr ax, 9 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_1256B1 loc_125697: mov rdi, [rbp+var_688] mov esi, [rbp+var_664] mov rdx, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short $+2 loc_1256AF: jmp short $+2 loc_1256B1: mov rax, [rbp+var_688] add rax, 18h movsxd rcx, [rbp+var_664] imul rcx, 0B0h add rax, rcx mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_12570F mov rax, [rbp+var_688] add rax, 18h movsxd rcx, [rbp+var_664] imul rcx, 0B0h add rax, rcx mov ax, [rax] shr ax, 9 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_12576E loc_12570F: mov eax, [rbp+var_664] mov [rbp+var_6B4], eax mov rax, [rbp+var_10] mov [rbp+var_6B0], rax lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEcvPdEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(void) mov [rbp+var_6A8], rax jmp short $+2 loc_12573B: lea rdi, [rbp+var_650] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEcvPiEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(void) mov rdi, [rbp+var_688] mov esi, [rbp+var_6B4] mov rdx, [rbp+var_6B0] mov rcx, [rbp+var_6A8] mov r8, rax call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) jmp short $+2 loc_12576C: jmp short $+2 loc_12576E: jmp short $+2 loc_125770: mov eax, [rbp+var_664] add eax, 1 mov [rbp+var_664], eax jmp loc_12562C loc_125784: mov [rbp+var_668], 0 loc_12578E: cmp [rbp+var_668], 3 jge loc_125955 mov rax, [rbp+var_688] mov rcx, rax add rcx, 18h movsxd rdx, [rbp+var_668] imul rdx, 0B0h add rcx, rdx mov [rbp+var_670], rcx add rax, 18h mov [rbp+var_6C0], rax mov eax, [rbp+var_668] add eax, 1 mov ecx, 3 cdq idiv ecx mov rax, [rbp+var_6C0] movsxd rcx, edx imul rcx, 0B0h add rax, rcx mov [rbp+var_678], rax mov rax, [rbp+var_670] mov ax, [rax] shr ax, 6 and ax, 1 movzx ecx, ax xor eax, eax cmp ecx, 0 mov [rbp+var_6B5], al jz short loc_12583B mov rax, [rbp+var_678] mov ax, [rax] shr ax, 7 and ax, 1 movzx eax, ax cmp eax, 0 setnz al mov [rbp+var_6B5], al loc_12583B: mov al, [rbp+var_6B5] and al, 1 mov [rbp+var_679], al mov rax, [rbp+var_670] mov ax, [rax] shr ax, 6 and ax, 1 movzx eax, ax mov rcx, [rbp+var_678] mov cx, [rcx] shr cx, 7 and cx, 1 movzx ecx, cx cmp eax, ecx setnz al and al, 1 mov [rbp+var_67A], al test [rbp+var_679], 1 jnz short loc_1258C6 mov rax, [rbp+var_670] mov ax, [rax] shr ax, 3 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_1258E0 mov rax, [rbp+var_678] mov ax, [rax] shr ax, 3 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_1258E0 test [rbp+var_67A], 1 jnz short loc_1258E0 loc_1258C6: mov rdi, [rbp+var_688] mov esi, [rbp+var_668] mov rdx, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short $+2 loc_1258DE: jmp short loc_12593F loc_1258E0: mov eax, [rbp+var_668] mov [rbp+var_6D4], eax mov rax, [rbp+var_10] mov [rbp+var_6D0], rax lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEcvPdEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(void) mov [rbp+var_6C8], rax jmp short $+2 loc_12590C: lea rdi, [rbp+var_650] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEcvPiEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(void) mov rdi, [rbp+var_688] mov esi, [rbp+var_6D4] mov rdx, [rbp+var_6D0] mov rcx, [rbp+var_6C8] mov r8, rax call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) jmp short $+2 loc_12593D: jmp short $+2 loc_12593F: jmp short $+2 loc_125941: mov eax, [rbp+var_668] add eax, 1 mov [rbp+var_668], eax jmp loc_12578E loc_125955: mov rax, [rbp+var_10] mov [rbp+var_6E8], rax lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEcvPdEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(void) mov [rbp+var_6E0], rax jmp short $+2 loc_125975: lea rdi, [rbp+var_650] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEcvPiEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(void) mov rdi, [rbp+var_688] mov rsi, [rbp+var_6E8] mov rdx, [rbp+var_6E0] mov rcx, rax call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) jmp short $+2 loc_1259A0: mov rax, [rbp+var_688] test byte ptr [rax+9], 1 jz short loc_1259BA mov rdi, [rbp+var_10] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short $+2 loc_1259B8: jmp short $+2 loc_1259BA: lea rdi, [rbp+var_650] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::~StackBuffer() lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::~StackBuffer() add rsp, 6F0h pop rbp retn loc_1259DB: lea rdi, [rbp+var_438] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::~StackBuffer() mov rdi, [rbp+var_658] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(long long a1, long long a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v6; // [rsp+8h] [rbp-6E8h] long long v7; // [rsp+10h] [rbp-6E0h] long long v8; // [rsp+20h] [rbp-6D0h] long long v9; // [rsp+28h] [rbp-6C8h] bool v10; // [rsp+3Bh] [rbp-6B5h] long long v11; // [rsp+40h] [rbp-6B0h] long long v12; // [rsp+48h] [rbp-6A8h] long long v13; // [rsp+58h] [rbp-698h] long long v14; // [rsp+60h] [rbp-690h] _WORD *v15; // [rsp+78h] [rbp-678h] _WORD *v16; // [rsp+80h] [rbp-670h] int k; // [rsp+88h] [rbp-668h] int j; // [rsp+8Ch] [rbp-664h] int i; // [rsp+90h] [rbp-660h] _BYTE v20[536]; // [rsp+A0h] [rbp-650h] BYREF _BYTE v21[1048]; // [rsp+2B8h] [rbp-438h] BYREF int v22; // [rsp+6D0h] [rbp-20h] BYREF int v23; // [rsp+6D4h] [rbp-1Ch] BYREF unsigned int v24; // [rsp+6D8h] [rbp-18h] int v25; // [rsp+6DCh] [rbp-14h] long long v26; // [rsp+6E0h] [rbp-10h] long long v27; // [rsp+6E8h] [rbp-8h] v27 = a1; v26 = a2; if ( (*(_BYTE *)(a1 + 8) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixIsolatedIrregular( a1, v26, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixUnisolated(a1, v26); v25 = *(_DWORD *)(a1 + 4) + 1; v23 = 3 * v25; v22 = 2 * *(_DWORD *)a1; v24 = *(_DWORD *)std::max<int>(&v23, &v22); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::StackBuffer(v21, v24); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(v20, v24); for ( i = 0; i < 3; ++i ) { if ( ((*(_WORD *)(176LL * i + a1 + 24) >> 3) & 1) != 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularEdgePoints(a1, (unsigned int)i, v26); } else { v13 = v26; v14 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(v21); OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularEdgePoints(a1, (unsigned int)i, v13, v14); } } for ( j = 0; j < 3; ++j ) { if ( (*(_WORD *)(176LL * j + a1 + 24) & 0x100) != 0 || ((*(_WORD *)(176LL * j + a1 + 24) >> 9) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(a1, (unsigned int)j, v26); if ( (*(_WORD *)(176LL * j + a1 + 24) & 0x100) == 0 || ((*(_WORD *)(176LL * j + a1 + 24) >> 9) & 1) == 0 ) { v11 = v26; v12 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(v21); v2 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(v20); OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints( a1, (unsigned int)j, v11, v12, v2); } } for ( k = 0; k < 3; ++k ) { v16 = (_WORD *)(176LL * k + a1 + 24); v15 = (_WORD *)(176LL * ((k + 1) % 3) + a1 + 24); v10 = 0; if ( ((*v16 >> 6) & 1) != 0 ) v10 = ((*v15 >> 7) & 1) != 0; if ( v10 || ((*v16 >> 3) & 1) != 0 && ((*v15 >> 3) & 1) != 0 && ((*v16 >> 6) & 1) == ((*v15 >> 7) & 1) ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(a1, (unsigned int)k, v26); } else { v8 = v26; v9 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(v21); v3 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(v20); OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint( a1, (unsigned int)k, v8, v9, v3); } } v6 = v26; v7 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::operator double *(v21); v4 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(v20); OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(a1, v6, v7, v4); if ( (*(_BYTE *)(a1 + 9) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(v26); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::~StackBuffer(v20); return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::~StackBuffer(v21); }
25,730
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the population of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } for (int eIndex = 0; eIndex < 3; ++eIndex) { CornerTopology const & c0 = _corners[eIndex]; CornerTopology const & c1 = _corners[(eIndex + 1) % 3]; bool isBoundaryEdge = c0.epOnBoundary && c1.emOnBoundary; bool isDartEdge = c0.epOnBoundary != c1.emOnBoundary; if (isBoundaryEdge || (c0.isRegular && c1.isRegular && !isDartEdge)) { assignRegularMidEdgePoint(eIndex, matrix); } else { computeIrregularMidEdgePoint(eIndex, matrix, weightBuffer, indexBuffer); } } promoteCubicEdgePointsToQuartic(matrix, weightBuffer, indexBuffer); if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O1
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x638, %rsp # imm = 0x638 movq %rsi, %rbx movq %rdi, %r14 cmpb $0x1, 0x8(%rdi) jne 0x5a730 movl 0xc(%r14), %edx movl 0x10(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi callq 0x38d00 jmp 0x5a73b movq %r14, %rdi movq %rbx, %rsi callq 0x38f30 movl (%r14), %ebp movl 0x4(%r14), %eax leal (%rax,%rax,2), %eax addl $0x3, %eax addl %ebp, %ebp cmpl %ebp, %eax cmovgl %eax, %ebp leaq 0x230(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, -0x4(%rax) movq $0x0, 0x400(%rax) movl %ebp, %r15d cmpl $0x81, %ebp jb 0x5a79f leaq (,%r15,8), %rdi callq 0x3a230 movq %rax, 0x630(%rsp) movq %rax, 0x220(%rsp) movl %ebp, 0x22c(%rsp) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movl %ebp, -0x8(%r12) movl $0x80, -0x4(%r12) movq $0x0, 0x200(%r12) cmpl $0x81, %ebp jb 0x5a7e8 shlq $0x2, %r15 movq %r15, %rdi callq 0x3a230 movq %rax, 0x218(%rsp) movq %rax, 0x8(%rsp) movl %ebp, 0x14(%rsp) leaq 0x18(%r14), %r13 xorl %r15d, %r15d testb $0x8, (%r13) jne 0x5a80e movq 0x220(%rsp), %rcx movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3b2a0 jmp 0x5a81c movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3be30 incq %r15 addq $0xb0, %r13 cmpq $0x3, %r15 jne 0x5a7ef leaq 0x18(%r14), %r13 xorl %r15d, %r15d testb $0x3, 0x1(%r13) je 0x5a848 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x39680 movl (%r13), %eax notl %eax testl $0x300, %eax # imm = 0x300 je 0x5a870 movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3ad10 incq %r15 addq $0xb0, %r13 cmpq $0x3, %r15 jne 0x5a833 leaq 0x18(%r14), %r15 xorl %esi, %esi movq %r15, %r13 leaq 0x1(%rsi), %rbp cmpq $0x2, %rsi movl $0x0, %eax cmovneq %rbp, %rax imulq $0xb0, %rax, %rcx addq %r15, %rcx movzwl (%r13), %eax testb $0x40, %al je 0x5a8b2 testb $-0x80, (%rcx) jne 0x5a8d0 testb $0x8, %al je 0x5a8dd movzwl (%rcx), %ecx movl %ecx, %edx andl $0x8, %edx je 0x5a8dd movzwl %ax, %eax shrl $0x6, %eax shrl $0x7, %ecx xorl %eax, %ecx andl $0x1, %ecx jne 0x5a8dd movq %r14, %rdi movq %rbx, %rdx callq 0x3bc10 jmp 0x5a8f5 movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movq %rbx, %rdx callq 0x38b30 addq $0xb0, %r13 movq %rbp, %rsi cmpq $0x3, %rbp jne 0x5a889 movq 0x220(%rsp), %rdx movq 0x8(%rsp), %rcx movq %r14, %rdi movq %rbx, %rsi callq 0x3a8b0 cmpb $0x1, 0x9(%r14) jne 0x5a92c movq %rbx, %rdi callq 0x54eea movq 0x218(%rsp), %rdi callq 0x3a0c0 movq 0x630(%rsp), %rdi callq 0x3a0c0 addq $0x638, %rsp # imm = 0x638 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x5a980 jmp 0x5a963 jmp 0x5a963 jmp 0x5a963 movq %rax, %rbx movq 0x218(%rsp), %rdi callq 0x3a0c0 movq %r12, 0x8(%rsp) movl $0x80, 0x14(%rsp) movq 0x630(%rsp), %rdi callq 0x3a0c0 movq %rbx, %rdi callq 0x3bd70 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE7ConvertERNS1_12SparseMatrixIdEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 638h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi+8], 1 jnz short loc_5A730 mov edx, [r14+0Ch] mov ecx, [r14+10h] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIdEEii; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int,int) jmp short loc_5A73B loc_5A730: mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE22resizeMatrixUnisolatedERNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_5A73B: mov ebp, [r14] mov eax, [r14+4] lea eax, [rax+rax*2] add eax, 3 add ebp, ebp cmp eax, ebp cmovg ebp, eax lea rax, [rsp+668h+var_438] mov [rax-10h], rax mov [rax-8], ebp mov dword ptr [rax-4], 80h mov qword ptr [rax+400h], 0 mov r15d, ebp cmp ebp, 81h jb short loc_5A79F lea rdi, ds:0[r15*8]; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+668h+var_38], rax mov [rsp+668h+var_448], rax mov [rsp+668h+var_43C], ebp loc_5A79F: lea r12, [rsp+668h+var_650] mov [r12-10h], r12 mov [r12-8], ebp mov dword ptr [r12-4], 80h mov qword ptr [r12+200h], 0 cmp ebp, 81h jb short loc_5A7E8 shl r15, 2 mov rdi, r15; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+668h+var_450], rax mov [rsp+668h+var_660], rax mov [rsp+668h+var_654], ebp loc_5A7E8: lea r13, [r14+18h] xor r15d, r15d loc_5A7EF: test byte ptr [r13+0], 8 jnz short loc_5A80E mov rcx, [rsp+668h+var_448] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIdEEPd; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *) jmp short loc_5A81C loc_5A80E: mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularEdgePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_5A81C: inc r15 add r13, 0B0h cmp r15, 3 jnz short loc_5A7EF lea r13, [r14+18h] xor r15d, r15d loc_5A833: test byte ptr [r13+1], 3 jz short loc_5A848 mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_5A848: mov eax, [r13+0] not eax test eax, 300h jz short loc_5A870 mov rcx, [rsp+668h+var_448] mov r8, [rsp+668h+var_660] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) loc_5A870: inc r15 add r13, 0B0h cmp r15, 3 jnz short loc_5A833 lea r15, [r14+18h] xor esi, esi mov r13, r15 loc_5A889: lea rbp, [rsi+1] cmp rsi, 2 mov eax, 0 cmovnz rax, rbp imul rcx, rax, 0B0h add rcx, r15 movzx eax, word ptr [r13+0] test al, 40h jz short loc_5A8B2 test byte ptr [rcx], 80h jnz short loc_5A8D0 loc_5A8B2: test al, 8 jz short loc_5A8DD movzx ecx, word ptr [rcx] mov edx, ecx and edx, 8 jz short loc_5A8DD movzx eax, ax shr eax, 6 shr ecx, 7 xor ecx, eax and ecx, 1 jnz short loc_5A8DD loc_5A8D0: mov rdi, r14 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_5A8F5 loc_5A8DD: mov rcx, [rsp+668h+var_448] mov r8, [rsp+668h+var_660] mov rdi, r14 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) loc_5A8F5: add r13, 0B0h mov rsi, rbp cmp rbp, 3 jnz short loc_5A889 mov rdx, [rsp+668h+var_448] mov rcx, [rsp+668h+var_660] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) cmp byte ptr [r14+9], 1 jnz short loc_5A92C mov rdi, rbx call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_5A92C: mov rdi, [rsp+668h+var_450]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+668h+var_38]; void * call __ZdlPv; operator delete(void *) add rsp, 638h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_5A980 jmp short loc_5A963 jmp short loc_5A963 jmp short $+2 loc_5A963: mov rbx, rax mov rdi, [rsp+arg_210]; void * call __ZdlPv; operator delete(void *) mov [rsp+arg_0], r12 mov [rsp+arg_C], 80h loc_5A980: mov rdi, [rsp+arg_628]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(long long a1, int *a2) { unsigned int v3; // ebp _BYTE *v4; // r13 long long i; // r15 long long v6; // r13 long long j; // r15 long long v8; // rsi unsigned __int16 *v9; // r13 long long v10; // rbp long long v11; // rax char *v12; // rcx unsigned __int16 v13; // ax unsigned int v14; // ecx char *v15; // [rsp+8h] [rbp-660h] char v16; // [rsp+18h] [rbp-650h] BYREF void *v17; // [rsp+218h] [rbp-450h] char *v18; // [rsp+220h] [rbp-448h] unsigned int v19; // [rsp+228h] [rbp-440h] int v20; // [rsp+22Ch] [rbp-43Ch] char v21; // [rsp+230h] [rbp-438h] BYREF void *v22; // [rsp+630h] [rbp-38h] if ( *(_BYTE *)(a1 + 8) == 1 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixIsolatedIrregular( a1, a2, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixUnisolated(a1, a2); v3 = 2 * *(_DWORD *)a1; if ( 3 * *(_DWORD *)(a1 + 4) + 3 > (int)v3 ) v3 = 3 * *(_DWORD *)(a1 + 4) + 3; v18 = &v21; v19 = v3; v20 = 128; v22 = 0LL; if ( v3 >= 0x81 ) { v22 = (void *)operator new(8LL * v3); v18 = (char *)v22; v20 = v3; } v15 = &v16; v17 = 0LL; if ( v3 >= 0x81 ) { v17 = (void *)operator new(4LL * v3); v15 = (char *)v17; } v4 = (_BYTE *)(a1 + 24); for ( i = 0LL; i != 3; ++i ) { if ( (*v4 & 8) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularEdgePoints(a1, (unsigned int)i, a2); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularEdgePoints(a1, (unsigned int)i, a2, v18); v4 += 176; } v6 = a1 + 24; for ( j = 0LL; j != 3; ++j ) { if ( (*(_BYTE *)(v6 + 1) & 3) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(a1, (unsigned int)j, a2); if ( (~*(_DWORD *)v6 & 0x300) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints( a1, (unsigned int)j, a2, v18, v15); v6 += 176LL; } v8 = 0LL; v9 = (unsigned __int16 *)(a1 + 24); do { v10 = v8 + 1; v11 = 0LL; if ( v8 != 2 ) v11 = v8 + 1; v12 = (char *)(a1 + 24 + 176 * v11); v13 = *v9; if ( (*v9 & 0x40) != 0 && *v12 < 0 || (v13 & 8) != 0 && (v14 = *(unsigned __int16 *)v12, (v14 & 8) != 0) && (((unsigned __int8)(v13 >> 6) ^ (unsigned __int8)(v14 >> 7)) & 1) == 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(a1, v8, a2); } else { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(a1, v8, a2, v18, v15); } v9 += 88; ++v8; } while ( v10 != 3 ); OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(a1, a2, v18, v15); if ( *(_BYTE *)(a1 + 9) == 1 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(a2); operator delete(v17); operator delete(v22); }
Convert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x638 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI + 0x8],0x1 JNZ 0x0015a730 MOV EDX,dword ptr [R14 + 0xc] MOV ECX,dword ptr [R14 + 0x10] MOV RDI,R14 MOV RSI,RBX CALL 0x00138d00 JMP 0x0015a73b LAB_0015a730: MOV RDI,R14 MOV RSI,RBX CALL 0x00138f30 LAB_0015a73b: MOV EBP,dword ptr [R14] MOV EAX,dword ptr [R14 + 0x4] LEA EAX,[RAX + RAX*0x2] ADD EAX,0x3 ADD EBP,EBP CMP EAX,EBP CMOVG EBP,EAX LEA RAX,[RSP + 0x230] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV dword ptr [RAX + -0x4],0x80 MOV qword ptr [RAX + 0x400],0x0 MOV R15D,EBP CMP EBP,0x81 JC 0x0015a79f LEA RDI,[R15*0x8] CALL 0x0013a230 MOV qword ptr [RSP + 0x630],RAX MOV qword ptr [RSP + 0x220],RAX MOV dword ptr [RSP + 0x22c],EBP LAB_0015a79f: LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV dword ptr [R12 + -0x8],EBP MOV dword ptr [R12 + -0x4],0x80 MOV qword ptr [R12 + 0x200],0x0 CMP EBP,0x81 JC 0x0015a7e8 SHL R15,0x2 LAB_0015a7cf: MOV RDI,R15 CALL 0x0013a230 MOV qword ptr [RSP + 0x218],RAX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x14],EBP LAB_0015a7e8: LEA R13,[R14 + 0x18] XOR R15D,R15D LAB_0015a7ef: TEST byte ptr [R13],0x8 JNZ 0x0015a80e MOV RCX,qword ptr [RSP + 0x220] LAB_0015a7fe: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013b2a0 JMP 0x0015a81c LAB_0015a80e: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013be30 LAB_0015a81c: INC R15 ADD R13,0xb0 CMP R15,0x3 JNZ 0x0015a7ef LEA R13,[R14 + 0x18] XOR R15D,R15D LAB_0015a833: TEST byte ptr [R13 + 0x1],0x3 JZ 0x0015a848 LAB_0015a83a: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00139680 LAB_0015a848: MOV EAX,dword ptr [R13] NOT EAX TEST EAX,0x300 JZ 0x0015a870 MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013ad10 LAB_0015a870: INC R15 ADD R13,0xb0 CMP R15,0x3 JNZ 0x0015a833 LEA R15,[R14 + 0x18] XOR ESI,ESI MOV R13,R15 LAB_0015a889: LEA RBP,[RSI + 0x1] CMP RSI,0x2 MOV EAX,0x0 CMOVNZ RAX,RBP IMUL RCX,RAX,0xb0 ADD RCX,R15 MOVZX EAX,word ptr [R13] TEST AL,0x40 JZ 0x0015a8b2 TEST byte ptr [RCX],0x80 JNZ 0x0015a8d0 LAB_0015a8b2: TEST AL,0x8 JZ 0x0015a8dd MOVZX ECX,word ptr [RCX] MOV EDX,ECX AND EDX,0x8 JZ 0x0015a8dd MOVZX EAX,AX SHR EAX,0x6 SHR ECX,0x7 XOR ECX,EAX AND ECX,0x1 JNZ 0x0015a8dd LAB_0015a8d0: MOV RDI,R14 MOV RDX,RBX CALL 0x0013bc10 JMP 0x0015a8f5 LAB_0015a8dd: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV RDX,RBX CALL 0x00138b30 LAB_0015a8f5: ADD R13,0xb0 MOV RSI,RBP CMP RBP,0x3 JNZ 0x0015a889 MOV RDX,qword ptr [RSP + 0x220] MOV RCX,qword ptr [RSP + 0x8] LAB_0015a912: MOV RDI,R14 MOV RSI,RBX CALL 0x0013a8b0 CMP byte ptr [R14 + 0x9],0x1 JNZ 0x0015a92c MOV RDI,RBX CALL 0x00154eea LAB_0015a92c: MOV RDI,qword ptr [RSP + 0x218] CALL 0x0013a0c0 MOV RDI,qword ptr [RSP + 0x630] CALL 0x0013a0c0 ADD RSP,0x638 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert (GregoryTriConverter<double> *this,SparseMatrix *param_1) { long lVar1; ushort uVar2; ushort uVar3; uint uVar4; uint uVar5; long lVar6; GregoryTriConverter<double> *pGVar7; GregoryTriConverter<double> *pGVar8; long lVar9; int *local_660; int local_650 [128]; int *local_450; double *local_448; uint local_440; uint local_43c; double local_438 [128]; double *local_38; if (this[8] == (GregoryTriConverter<double>)0x1) { resizeMatrixIsolatedIrregular(this,param_1,*(int *)(this + 0xc),*(int *)(this + 0x10)); } else { resizeMatrixUnisolated(this,param_1); } uVar5 = *(int *)(this + 4) * 3 + 3; uVar4 = *(int *)this * 2; if (*(int *)this * 2 < (int)uVar5) { uVar4 = uVar5; } local_448 = local_438; local_43c = 0x80; local_38 = (double *)0x0; local_440 = uVar4; if (0x80 < uVar4) { local_448 = (double *)operator_new((ulong)uVar4 * 8); local_43c = uVar4; local_38 = local_448; } local_660 = local_650; local_450 = (int *)0x0; if (0x80 < uVar4) { /* try { // try from 0015a7cf to 0015a7d6 has its CatchHandler @ 0015a958 */ local_660 = (int *)operator_new((ulong)uVar4 << 2); local_450 = local_660; } pGVar7 = this + 0x18; lVar9 = 0; do { if (((byte)*pGVar7 & 8) == 0) { /* try { // try from 0015a7fe to 0015a81b has its CatchHandler @ 0015a961 */ computeIrregularEdgePoints(this,(int)lVar9,param_1,local_448); } else { assignRegularEdgePoints(this,(int)lVar9,param_1); } lVar9 = lVar9 + 1; pGVar7 = pGVar7 + 0xb0; } while (lVar9 != 3); pGVar7 = this + 0x18; lVar9 = 0; do { if (((byte)pGVar7[1] & 3) != 0) { /* try { // try from 0015a83a to 0015a86f has its CatchHandler @ 0015a963 */ assignRegularFacePoints(this,(int)lVar9,param_1); } if ((~*(uint *)pGVar7 & 0x300) != 0) { computeIrregularFacePoints(this,(int)lVar9,param_1,local_448,local_660); } lVar9 = lVar9 + 1; pGVar7 = pGVar7 + 0xb0; } while (lVar9 != 3); pGVar7 = this + 0x18; lVar9 = 0; pGVar8 = pGVar7; do { lVar1 = lVar9 + 1; lVar6 = 0; if (lVar9 != 2) { lVar6 = lVar1; } uVar2 = *(ushort *)pGVar8; if ((((uVar2 & 0x40) == 0) || (((byte)pGVar7[lVar6 * 0xb0] & 0x80) == 0)) && (((uVar2 & 8) == 0 || ((uVar3 = *(ushort *)(pGVar7 + lVar6 * 0xb0), (uVar3 & 8) == 0 || (((uVar3 >> 7 ^ uVar2 >> 6) & 1) != 0)))))) { computeIrregularMidEdgePoint(this,(int)lVar9,param_1,local_448,local_660); } else { /* try { // try from 0015a8d0 to 0015a8f4 has its CatchHandler @ 0015a95f */ assignRegularMidEdgePoint(this,(int)lVar9,param_1); } pGVar8 = pGVar8 + 0xb0; lVar9 = lVar1; } while (lVar1 != 3); /* try { // try from 0015a912 to 0015a92b has its CatchHandler @ 0015a95d */ promoteCubicEdgePointsToQuartic(this,param_1,local_448,local_660); if (this[9] == (GregoryTriConverter<double>)0x1) { (anonymous_namespace)::_removeValence2Duplicates<double>(param_1); } operator_delete(local_450); operator_delete(local_38); return; }
25,731
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the population of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } for (int eIndex = 0; eIndex < 3; ++eIndex) { CornerTopology const & c0 = _corners[eIndex]; CornerTopology const & c1 = _corners[(eIndex + 1) % 3]; bool isBoundaryEdge = c0.epOnBoundary && c1.emOnBoundary; bool isDartEdge = c0.epOnBoundary != c1.emOnBoundary; if (isBoundaryEdge || (c0.isRegular && c1.isRegular && !isDartEdge)) { assignRegularMidEdgePoint(eIndex, matrix); } else { computeIrregularMidEdgePoint(eIndex, matrix, weightBuffer, indexBuffer); } } promoteCubicEdgePointsToQuartic(matrix, weightBuffer, indexBuffer); if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O2
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x638, %rsp # imm = 0x638 movq %rsi, %rbx movq %rdi, %r14 cmpb $0x1, 0x8(%rdi) jne 0x6fc54 movl 0xc(%r14), %edx movl 0x10(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi callq 0x50400 jmp 0x6fc5f movq %r14, %rdi movq %rbx, %rsi callq 0x50780 movl (%r14), %ebp movl 0x4(%r14), %eax leal (%rax,%rax,2), %eax addl $0x3, %eax addl %ebp, %ebp cmpl %ebp, %eax cmovgl %eax, %ebp leaq 0x220(%rsp), %rdi movl %ebp, %esi callq 0x527b0 leaq 0x8(%rsp), %rdi movl %ebp, %esi callq 0x53300 leaq 0x18(%r14), %r12 xorl %r15d, %r15d movq %r12, %r13 cmpq $0x3, %r15 je 0x6fcd7 testb $0x8, (%r13) jne 0x6fcbd movq 0x220(%rsp), %rcx movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x54280 jmp 0x6fccb movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x55420 incq %r15 addq $0xb0, %r13 jmp 0x6fc98 xorl %r15d, %r15d movq %r12, %r13 cmpq $0x3, %r15 je 0x6fd2b testb $0x3, 0x1(%r13) je 0x6fd04 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x514a0 movl (%r13), %eax notl %eax testw $0x300, %ax # imm = 0x300 je 0x6fd1f movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x53980 incq %r15 addq $0xb0, %r13 jmp 0x6fcdd xorl %esi, %esi movq %r12, %r15 cmpq $0x3, %rsi je 0x6fdbd leaq 0x1(%rsi), %r13 cmpq $0x2, %rsi movl $0x0, %eax cmovneq %r13, %rax imulq $0xb0, %rax, %rax movzwl (%r15), %ecx movzwl (%r12,%rax), %eax testb $0x40, %cl je 0x6fd6a movl %eax, %edx andl $0x80, %edx jne 0x6fd89 testb $0x8, %cl je 0x6fd96 movl %eax, %edx andl $0x8, %edx je 0x6fd96 movzwl %cx, %ecx shrl $0x6, %ecx movzwl %ax, %eax shrl $0x7, %eax xorl %ecx, %eax andl $0x1, %eax jne 0x6fd96 movq %r14, %rdi movq %rbx, %rdx callq 0x550f0 jmp 0x6fdae movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movq %rbx, %rdx callq 0x50170 addq $0xb0, %r15 movq %r13, %rsi jmp 0x6fd30 movq 0x220(%rsp), %rdx movq 0x8(%rsp), %rcx movq %r14, %rdi movq %rbx, %rsi callq 0x53290 cmpb $0x1, 0x9(%r14) jne 0x6fde4 movq %rbx, %rdi callq 0x6b776 movq 0x218(%rsp), %rdi callq 0x524d0 movq 0x630(%rsp), %rdi callq 0x524d0 addq $0x638, %rsp # imm = 0x638 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x6fe2b jmp 0x6fe1b jmp 0x6fe1b jmp 0x6fe1b movq %rax, %rbx movq 0x218(%rsp), %rdi callq 0x524d0 movq 0x630(%rsp), %rdi callq 0x524d0 movq %rbx, %rdi callq 0x55300
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE7ConvertERNS1_12SparseMatrixIdEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 638h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi+8], 1 jnz short loc_6FC54 mov edx, [r14+0Ch] mov ecx, [r14+10h] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIdEEii; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int,int) jmp short loc_6FC5F loc_6FC54: mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE22resizeMatrixUnisolatedERNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_6FC5F: mov ebp, [r14] mov eax, [r14+4] lea eax, [rax+rax*2] add eax, 3 add ebp, ebp cmp eax, ebp cmovg ebp, eax lea rdi, [rsp+668h+var_448] mov esi, ebp call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::StackBuffer(uint) lea rdi, [rsp+668h+var_660] mov esi, ebp call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(uint) lea r12, [r14+18h] xor r15d, r15d mov r13, r12 loc_6FC98: cmp r15, 3 jz short loc_6FCD7 test byte ptr [r13+0], 8 jnz short loc_6FCBD mov rcx, [rsp+668h+var_448] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIdEEPd; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *) jmp short loc_6FCCB loc_6FCBD: mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularEdgePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_6FCCB: inc r15 add r13, 0B0h jmp short loc_6FC98 loc_6FCD7: xor r15d, r15d mov r13, r12 loc_6FCDD: cmp r15, 3 jz short loc_6FD2B test byte ptr [r13+1], 3 jz short loc_6FD04 mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) mov eax, [r13+0] not eax test ax, 300h jz short loc_6FD1F loc_6FD04: mov rcx, [rsp+668h+var_448] mov r8, [rsp+668h+var_660] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) loc_6FD1F: inc r15 add r13, 0B0h jmp short loc_6FCDD loc_6FD2B: xor esi, esi mov r15, r12 loc_6FD30: cmp rsi, 3 jz loc_6FDBD lea r13, [rsi+1] cmp rsi, 2 mov eax, 0 cmovnz rax, r13 imul rax, 0B0h movzx ecx, word ptr [r15] movzx eax, word ptr [r12+rax] test cl, 40h jz short loc_6FD6A mov edx, eax and edx, 80h jnz short loc_6FD89 loc_6FD6A: test cl, 8 jz short loc_6FD96 mov edx, eax and edx, 8 jz short loc_6FD96 movzx ecx, cx shr ecx, 6 movzx eax, ax shr eax, 7 xor eax, ecx and eax, 1 jnz short loc_6FD96 loc_6FD89: mov rdi, r14 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) jmp short loc_6FDAE loc_6FD96: mov rcx, [rsp+668h+var_448] mov r8, [rsp+668h+var_660] mov rdi, r14 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) loc_6FDAE: add r15, 0B0h mov rsi, r13 jmp loc_6FD30 loc_6FDBD: mov rdx, [rsp+668h+var_448] mov rcx, [rsp+668h+var_660] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) cmp byte ptr [r14+9], 1 jnz short loc_6FDE4 mov rdi, rbx call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_6FDE4: mov rdi, [rsp+668h+var_450]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+668h+var_38]; void * call __ZdlPv; operator delete(void *) add rsp, 638h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_6FE2B jmp short loc_6FE1B jmp short loc_6FE1B jmp short $+2 loc_6FE1B: mov rbx, rax mov rdi, [rsp+arg_210]; void * call __ZdlPv; operator delete(void *) loc_6FE2B: mov rdi, [rsp+arg_628]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(long long a1, unsigned int *a2) { unsigned int v3; // ebp long long v4; // r15 _BYTE *v5; // r13 long long v6; // r15 long long v7; // r13 long long v8; // rsi unsigned __int16 *v9; // r15 long long v10; // rax unsigned __int16 v11; // cx unsigned __int16 v12; // ax void *v13[67]; // [rsp+8h] [rbp-660h] BYREF void *v14[137]; // [rsp+220h] [rbp-448h] BYREF if ( *(_BYTE *)(a1 + 8) == 1 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixIsolatedIrregular( a1, a2, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::resizeMatrixUnisolated(a1, a2); v3 = 2 * *(_DWORD *)a1; if ( 3 * *(_DWORD *)(a1 + 4) + 3 > (int)v3 ) v3 = 3 * *(_DWORD *)(a1 + 4) + 3; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::StackBuffer(v14, v3); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(v13, v3); v4 = 0LL; v5 = (_BYTE *)(a1 + 24); while ( v4 != 3 ) { if ( (*v5 & 8) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularEdgePoints(a1, (unsigned int)v4, a2); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularEdgePoints(a1, (unsigned int)v4, a2, v14[0]); ++v4; v5 += 176; } v6 = 0LL; v7 = a1 + 24; while ( v6 != 3 ) { if ( (*(_BYTE *)(v7 + 1) & 3) == 0 || (OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(a1, (unsigned int)v6, a2), (~*(_WORD *)v7 & 0x300) != 0) ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints( a1, (unsigned int)v6, a2, v14[0], v13[0]); } ++v6; v7 += 176LL; } v8 = 0LL; v9 = (unsigned __int16 *)(a1 + 24); while ( v8 != 3 ) { v10 = 0LL; if ( v8 != 2 ) v10 = v8 + 1; v11 = *v9; v12 = *(_WORD *)(a1 + 24 + 176 * v10); if ( (*v9 & 0x40) != 0 && (v12 & 0x80) != 0 || (v11 & 8) != 0 && (v12 & 8) != 0 && (((unsigned __int8)(v11 >> 6) ^ (unsigned __int8)(v12 >> 7)) & 1) == 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(a1, v8, a2); } else { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(a1, v8, a2, v14[0], v13[0]); } v9 += 88; ++v8; } OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(a1, a2, v14[0], v13[0]); if ( *(_BYTE *)(a1 + 9) == 1 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(a2); operator delete(v13[66]); operator delete(v14[130]); }
Convert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x638 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI + 0x8],0x1 JNZ 0x0016fc54 MOV EDX,dword ptr [R14 + 0xc] MOV ECX,dword ptr [R14 + 0x10] MOV RDI,R14 MOV RSI,RBX CALL 0x00150400 JMP 0x0016fc5f LAB_0016fc54: MOV RDI,R14 MOV RSI,RBX CALL 0x00150780 LAB_0016fc5f: MOV EBP,dword ptr [R14] MOV EAX,dword ptr [R14 + 0x4] LEA EAX,[RAX + RAX*0x2] ADD EAX,0x3 ADD EBP,EBP CMP EAX,EBP CMOVG EBP,EAX LEA RDI,[RSP + 0x220] MOV ESI,EBP CALL 0x001527b0 LAB_0016fc82: LEA RDI,[RSP + 0x8] MOV ESI,EBP CALL 0x00153300 LEA R12,[R14 + 0x18] XOR R15D,R15D MOV R13,R12 LAB_0016fc98: CMP R15,0x3 JZ 0x0016fcd7 TEST byte ptr [R13],0x8 JNZ 0x0016fcbd MOV RCX,qword ptr [RSP + 0x220] LAB_0016fcad: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00154280 JMP 0x0016fccb LAB_0016fcbd: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00155420 LAB_0016fccb: INC R15 ADD R13,0xb0 JMP 0x0016fc98 LAB_0016fcd7: XOR R15D,R15D MOV R13,R12 LAB_0016fcdd: CMP R15,0x3 JZ 0x0016fd2b TEST byte ptr [R13 + 0x1],0x3 JZ 0x0016fd04 LAB_0016fcea: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001514a0 MOV EAX,dword ptr [R13] NOT EAX TEST AX,0x300 JZ 0x0016fd1f LAB_0016fd04: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00153980 LAB_0016fd1f: INC R15 ADD R13,0xb0 JMP 0x0016fcdd LAB_0016fd2b: XOR ESI,ESI MOV R15,R12 LAB_0016fd30: CMP RSI,0x3 JZ 0x0016fdbd LEA R13,[RSI + 0x1] CMP RSI,0x2 MOV EAX,0x0 CMOVNZ RAX,R13 IMUL RAX,RAX,0xb0 MOVZX ECX,word ptr [R15] MOVZX EAX,word ptr [R12 + RAX*0x1] TEST CL,0x40 JZ 0x0016fd6a MOV EDX,EAX AND EDX,0x80 JNZ 0x0016fd89 LAB_0016fd6a: TEST CL,0x8 JZ 0x0016fd96 MOV EDX,EAX AND EDX,0x8 JZ 0x0016fd96 MOVZX ECX,CX SHR ECX,0x6 MOVZX EAX,AX SHR EAX,0x7 XOR EAX,ECX AND EAX,0x1 JNZ 0x0016fd96 LAB_0016fd89: MOV RDI,R14 MOV RDX,RBX CALL 0x001550f0 JMP 0x0016fdae LAB_0016fd96: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV RDX,RBX CALL 0x00150170 LAB_0016fdae: ADD R15,0xb0 MOV RSI,R13 JMP 0x0016fd30 LAB_0016fdbd: MOV RDX,qword ptr [RSP + 0x220] MOV RCX,qword ptr [RSP + 0x8] LAB_0016fdca: MOV RDI,R14 MOV RSI,RBX CALL 0x00153290 CMP byte ptr [R14 + 0x9],0x1 JNZ 0x0016fde4 MOV RDI,RBX CALL 0x0016b776 LAB_0016fde4: MOV RDI,qword ptr [RSP + 0x218] CALL 0x001524d0 MOV RDI,qword ptr [RSP + 0x630] CALL 0x001524d0 ADD RSP,0x638 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert (GregoryTriConverter<double> *this,SparseMatrix *param_1) { GregoryTriConverter<double> *pGVar1; ushort uVar2; ushort uVar3; uint uVar4; uint uVar5; long lVar6; GregoryTriConverter<double> *pGVar7; long lVar8; int *local_660 [66]; void *local_450; double *local_448 [130]; void *local_38; if (this[8] == (GregoryTriConverter<double>)0x1) { resizeMatrixIsolatedIrregular(this,param_1,*(int *)(this + 0xc),*(int *)(this + 0x10)); } else { resizeMatrixUnisolated((SparseMatrix *)this); } uVar5 = *(int *)(this + 4) * 3 + 3; uVar4 = *(int *)this * 2; if (*(int *)this * 2 < (int)uVar5) { uVar4 = uVar5; } Vtr::internal::StackBuffer<double,128u,true>::StackBuffer ((StackBuffer<double,128u,true> *)local_448,uVar4); /* try { // try from 0016fc82 to 0016fc8d has its CatchHandler @ 0016fe10 */ Vtr::internal::StackBuffer<int,128u,true>::StackBuffer ((StackBuffer<int,128u,true> *)local_660,uVar4); pGVar1 = this + 0x18; pGVar7 = pGVar1; for (lVar8 = 0; lVar8 != 3; lVar8 = lVar8 + 1) { if (((byte)*pGVar7 & 8) == 0) { /* try { // try from 0016fcad to 0016fcca has its CatchHandler @ 0016fe19 */ computeIrregularEdgePoints(this,(int)lVar8,param_1,local_448[0]); } else { assignRegularEdgePoints(this,(int)lVar8,param_1); } pGVar7 = pGVar7 + 0xb0; } lVar8 = 0; pGVar7 = pGVar1; do { if (lVar8 == 3) { lVar8 = 0; pGVar7 = pGVar1; while (lVar8 != 3) { lVar6 = 0; if (lVar8 != 2) { lVar6 = lVar8 + 1; } uVar2 = *(ushort *)pGVar7; uVar3 = *(ushort *)(pGVar1 + lVar6 * 0xb0); if ((((uVar2 & 0x40) == 0) || ((uVar3 & 0x80) == 0)) && (((uVar2 & 8) == 0 || (((uVar3 & 8) == 0 || (((uVar3 >> 7 ^ uVar2 >> 6) & 1) != 0)))))) { computeIrregularMidEdgePoint(this,(int)lVar8,param_1,local_448[0],local_660[0]); } else { /* try { // try from 0016fd89 to 0016fdad has its CatchHandler @ 0016fe17 */ assignRegularMidEdgePoint(this,(int)lVar8,param_1); } pGVar7 = pGVar7 + 0xb0; lVar8 = lVar8 + 1; } /* try { // try from 0016fdca to 0016fde3 has its CatchHandler @ 0016fe15 */ promoteCubicEdgePointsToQuartic(this,param_1,local_448[0],local_660[0]); if (this[9] == (GregoryTriConverter<double>)0x1) { (anonymous_namespace)::_removeValence2Duplicates<double>(param_1); } operator_delete(local_450); operator_delete(local_38); return; } if (((byte)pGVar7[1] & 3) == 0) { LAB_0016fd04: computeIrregularFacePoints(this,(int)lVar8,param_1,local_448[0],local_660[0]); } else { /* try { // try from 0016fcea to 0016fd1e has its CatchHandler @ 0016fe1b */ assignRegularFacePoints(this,(int)lVar8,param_1); if ((~*(uint *)pGVar7 & 0x300) != 0) goto LAB_0016fd04; } lVar8 = lVar8 + 1; pGVar7 = pGVar7 + 0xb0; } while( true ); }
25,732
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the population of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 3; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } for (int eIndex = 0; eIndex < 3; ++eIndex) { CornerTopology const & c0 = _corners[eIndex]; CornerTopology const & c1 = _corners[(eIndex + 1) % 3]; bool isBoundaryEdge = c0.epOnBoundary && c1.emOnBoundary; bool isDartEdge = c0.epOnBoundary != c1.emOnBoundary; if (isBoundaryEdge || (c0.isRegular && c1.isRegular && !isDartEdge)) { assignRegularMidEdgePoint(eIndex, matrix); } else { computeIrregularMidEdgePoint(eIndex, matrix, weightBuffer, indexBuffer); } } promoteCubicEdgePointsToQuartic(matrix, weightBuffer, indexBuffer); if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O3
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x438, %rsp # imm = 0x438 movq %rsi, %rbx movq %rdi, %r14 cmpb $0x1, 0x8(%rdi) jne 0x596aa movl 0xc(%r14), %edx movl 0x10(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi callq 0x39780 jmp 0x596b5 movq %r14, %rdi movq %rbx, %rsi callq 0x3a070 movl (%r14), %ebp movl 0x4(%r14), %eax leal (%rax,%rax,2), %eax addl $0x3, %eax addl %ebp, %ebp cmpl %ebp, %eax cmovgl %eax, %ebp leaq 0x230(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, %ecx movl %ecx, -0x4(%rax) movq $0x0, 0x200(%rax) cmpl %ecx, %ebp jbe 0x5974e movl %ebp, %r15d shlq $0x2, %r15 movq %r15, %rdi callq 0x3a210 movq %rax, 0x430(%rsp) movq %rax, 0x220(%rsp) movl %ebp, 0x22c(%rsp) leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, -0x4(%rax) movq $0x0, 0x200(%rax) movq %r15, %rdi callq 0x3a210 movq %rax, 0x218(%rsp) movq %rax, 0x8(%rsp) movl %ebp, 0x14(%rsp) jmp 0x5976c leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, -0x4(%rax) movq $0x0, 0x200(%rax) leaq 0x18(%r14), %r12 xorl %r15d, %r15d movq %r12, %r13 testb $0x8, (%r13) jne 0x59795 movq 0x220(%rsp), %rcx movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3ba50 jmp 0x597a3 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3a800 incq %r15 addq $0xa8, %r13 cmpq $0x3, %r15 jne 0x59776 xorl %r15d, %r15d movq %r12, %r13 testb $0x3, 0x1(%r13) je 0x597db movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x39c40 movl (%r13), %eax notl %eax testl $0x300, %eax # imm = 0x300 je 0x597f6 movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x39170 incq %r15 addq $0xa8, %r13 cmpq $0x3, %r15 jne 0x597b9 xorl %esi, %esi movq %r12, %r15 leaq 0x1(%rsi), %r13 cmpq $0x2, %rsi movl $0x0, %eax cmovneq %r13, %rax imulq $0xa8, %rax, %rax movzwl (%r15), %ecx movzwl (%r12,%rax), %eax testb %al, %al setns %dl testb $0x40, %cl je 0x5983f testb %al, %al js 0x5984d movl %eax, %edx shrb $0x7, %dl testb $0x8, %cl je 0x5985a andl $0x8, %eax je 0x5985a testb %dl, %dl je 0x5985a movq %r14, %rdi movq %rbx, %rdx callq 0x3a480 jmp 0x59872 movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movq %rbx, %rdx callq 0x3c230 addq $0xa8, %r15 movq %r13, %rsi cmpq $0x3, %r13 jne 0x5980b movq 0x220(%rsp), %rdx movq 0x8(%rsp), %rcx movq %r14, %rdi movq %rbx, %rsi callq 0x3b350 cmpb $0x1, 0x9(%r14) jne 0x598a9 movq %rbx, %rdi callq 0x56c71 movq 0x218(%rsp), %rdi callq 0x3a0a0 movq 0x430(%rsp), %rdi callq 0x3a0a0 addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x598f8 jmp 0x598e0 jmp 0x598e0 jmp 0x598e0 movq %rax, %rbx movq 0x218(%rsp), %rdi callq 0x3a0a0 movl $0x80, 0x14(%rsp) movq 0x430(%rsp), %rdi callq 0x3a0a0 movq %rbx, %rdi callq 0x3bd30 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE7ConvertERNS1_12SparseMatrixIfEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 438h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi+8], 1 jnz short loc_596AA mov edx, [r14+0Ch] mov ecx, [r14+10h] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIfEEii; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,int,int) jmp short loc_596B5 loc_596AA: mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE22resizeMatrixUnisolatedERNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_596B5: mov ebp, [r14] mov eax, [r14+4] lea eax, [rax+rax*2] add eax, 3 add ebp, ebp cmp eax, ebp cmovg ebp, eax lea rax, [rsp+468h+var_238] mov [rax-10h], rax mov [rax-8], ebp mov ecx, 80h mov [rax-4], ecx mov qword ptr [rax+200h], 0 cmp ebp, ecx jbe short loc_5974E mov r15d, ebp shl r15, 2 mov rdi, r15; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+468h+var_38], rax mov [rsp+468h+var_248], rax mov [rsp+468h+var_23C], ebp lea rax, [rsp+468h+var_450] mov [rax-10h], rax mov [rax-8], ebp mov dword ptr [rax-4], 80h mov qword ptr [rax+200h], 0 mov rdi, r15; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+468h+var_250], rax mov [rsp+468h+var_460], rax mov [rsp+468h+var_454], ebp jmp short loc_5976C loc_5974E: lea rax, [rsp+468h+var_450] mov [rax-10h], rax mov [rax-8], ebp mov dword ptr [rax-4], 80h mov qword ptr [rax+200h], 0 loc_5976C: lea r12, [r14+18h] xor r15d, r15d mov r13, r12 loc_59776: test byte ptr [r13+0], 8 jnz short loc_59795 mov rcx, [rsp+468h+var_248] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIfEEPf; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *) jmp short loc_597A3 loc_59795: mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE23assignRegularEdgePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_597A3: inc r15 add r13, 0A8h cmp r15, 3 jnz short loc_59776 xor r15d, r15d mov r13, r12 loc_597B9: test byte ptr [r13+1], 3 jz short loc_597DB mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE23assignRegularFacePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) mov eax, [r13+0] not eax test eax, 300h jz short loc_597F6 loc_597DB: mov rcx, [rsp+468h+var_248] mov r8, [rsp+468h+var_460] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE26computeIrregularFacePointsEiRNS1_12SparseMatrixIfEEPfPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *,int *) loc_597F6: inc r15 add r13, 0A8h cmp r15, 3 jnz short loc_597B9 xor esi, esi mov r15, r12 loc_5980B: lea r13, [rsi+1] cmp rsi, 2 mov eax, 0 cmovnz rax, r13 imul rax, 0A8h movzx ecx, word ptr [r15] movzx eax, word ptr [r12+rax] test al, al setns dl test cl, 40h jz short loc_5983F test al, al js short loc_5984D mov edx, eax shr dl, 7 loc_5983F: test cl, 8 jz short loc_5985A and eax, 8 jz short loc_5985A test dl, dl jz short loc_5985A loc_5984D: mov rdi, r14 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) jmp short loc_59872 loc_5985A: mov rcx, [rsp+468h+var_248] mov r8, [rsp+468h+var_460] mov rdi, r14 mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIfEEPfPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *,int *) loc_59872: add r15, 0A8h mov rsi, r13 cmp r13, 3 jnz short loc_5980B mov rdx, [rsp+468h+var_248] mov rcx, [rsp+468h+var_460] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIfEEPfPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *,int *) cmp byte ptr [r14+9], 1 jnz short loc_598A9 mov rdi, rbx call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIfEEvRNS1_12SparseMatrixIT_EE_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_598A9: mov rdi, [rsp+468h+var_250]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+468h+var_38]; void * call __ZdlPv; operator delete(void *) add rsp, 438h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_598F8 jmp short loc_598E0 jmp short loc_598E0 jmp short $+2 loc_598E0: mov rbx, rax mov rdi, [rsp+arg_210]; void * call __ZdlPv; operator delete(void *) mov [rsp+arg_C], 80h loc_598F8: mov rdi, [rsp+arg_428]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::Convert(long long a1, int *a2) { unsigned int v3; // ebp long long v4; // r15 _BYTE *v5; // r13 long long v6; // r15 long long v7; // r13 long long v8; // rsi _WORD *v9; // r15 long long v10; // r13 long long v11; // rax __int16 v12; // ax char v13; // dl char *v14; // [rsp+8h] [rbp-460h] char v15; // [rsp+18h] [rbp-450h] BYREF void *v16; // [rsp+218h] [rbp-250h] char *v17; // [rsp+220h] [rbp-248h] unsigned int v18; // [rsp+228h] [rbp-240h] int v19; // [rsp+22Ch] [rbp-23Ch] char v20; // [rsp+230h] [rbp-238h] BYREF void *v21; // [rsp+430h] [rbp-38h] if ( *(_BYTE *)(a1 + 8) == 1 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::resizeMatrixIsolatedIrregular( a1, a2, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::resizeMatrixUnisolated(a1, a2); v3 = 2 * *(_DWORD *)a1; if ( 3 * *(_DWORD *)(a1 + 4) + 3 > (int)v3 ) v3 = 3 * *(_DWORD *)(a1 + 4) + 3; v17 = &v20; v18 = v3; v19 = 128; v21 = 0LL; if ( v3 <= 0x80 ) { v14 = &v15; v16 = 0LL; } else { v21 = (void *)operator new(4LL * v3); v17 = (char *)v21; v19 = v3; v16 = (void *)operator new(4LL * v3); v14 = (char *)v16; } v4 = 0LL; v5 = (_BYTE *)(a1 + 24); do { if ( (*v5 & 8) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularEdgePoints(a1, (unsigned int)v4, a2); else OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularEdgePoints(a1, (unsigned int)v4, a2, v17); ++v4; v5 += 168; } while ( v4 != 3 ); v6 = 0LL; v7 = a1 + 24; do { if ( (*(_BYTE *)(v7 + 1) & 3) == 0 || (OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(a1, (unsigned int)v6, a2), (~*(_DWORD *)v7 & 0x300) != 0) ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints( a1, (unsigned int)v6, a2, v17, v14); } ++v6; v7 += 168LL; } while ( v6 != 3 ); v8 = 0LL; v9 = (_WORD *)(a1 + 24); do { v10 = v8 + 1; v11 = 0LL; if ( v8 != 2 ) v11 = v8 + 1; v12 = *(_WORD *)(a1 + 24 + 168 * v11); v13 = (v12 & 0x80u) == 0; if ( (*v9 & 0x40) != 0 ) { if ( (v12 & 0x80u) != 0 ) goto LABEL_28; v13 = (unsigned __int8)v12 >> 7; } if ( (*v9 & 8) != 0 && (v12 & 8) != 0 && v13 ) { LABEL_28: OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(a1, v8, a2); goto LABEL_30; } OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(a1, v8, a2, v17, v14); LABEL_30: v9 += 84; ++v8; } while ( v10 != 3 ); OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::promoteCubicEdgePointsToQuartic(a1, a2, v17, v14); if ( *(_BYTE *)(a1 + 9) == 1 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(a2); operator delete(v16); operator delete(v21); }
Convert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x438 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI + 0x8],0x1 JNZ 0x001596aa MOV EDX,dword ptr [R14 + 0xc] MOV ECX,dword ptr [R14 + 0x10] MOV RDI,R14 MOV RSI,RBX CALL 0x00139780 JMP 0x001596b5 LAB_001596aa: MOV RDI,R14 MOV RSI,RBX CALL 0x0013a070 LAB_001596b5: MOV EBP,dword ptr [R14] MOV EAX,dword ptr [R14 + 0x4] LEA EAX,[RAX + RAX*0x2] ADD EAX,0x3 ADD EBP,EBP CMP EAX,EBP CMOVG EBP,EAX LEA RAX,[RSP + 0x230] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV ECX,0x80 MOV dword ptr [RAX + -0x4],ECX MOV qword ptr [RAX + 0x200],0x0 CMP EBP,ECX JBE 0x0015974e MOV R15D,EBP SHL R15,0x2 MOV RDI,R15 CALL 0x0013a210 MOV qword ptr [RSP + 0x430],RAX MOV qword ptr [RSP + 0x220],RAX MOV dword ptr [RSP + 0x22c],EBP LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV dword ptr [RAX + -0x4],0x80 MOV qword ptr [RAX + 0x200],0x0 LAB_00159733: MOV RDI,R15 CALL 0x0013a210 MOV qword ptr [RSP + 0x218],RAX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x14],EBP JMP 0x0015976c LAB_0015974e: LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV dword ptr [RAX + -0x4],0x80 MOV qword ptr [RAX + 0x200],0x0 LAB_0015976c: LEA R12,[R14 + 0x18] XOR R15D,R15D MOV R13,R12 LAB_00159776: TEST byte ptr [R13],0x8 JNZ 0x00159795 MOV RCX,qword ptr [RSP + 0x220] LAB_00159785: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013ba50 JMP 0x001597a3 LAB_00159795: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013a800 LAB_001597a3: INC R15 ADD R13,0xa8 CMP R15,0x3 JNZ 0x00159776 XOR R15D,R15D MOV R13,R12 LAB_001597b9: TEST byte ptr [R13 + 0x1],0x3 JZ 0x001597db LAB_001597c0: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00139c40 MOV EAX,dword ptr [R13] NOT EAX TEST EAX,0x300 JZ 0x001597f6 LAB_001597db: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00139170 LAB_001597f6: INC R15 ADD R13,0xa8 CMP R15,0x3 JNZ 0x001597b9 XOR ESI,ESI MOV R15,R12 LAB_0015980b: LEA R13,[RSI + 0x1] CMP RSI,0x2 MOV EAX,0x0 CMOVNZ RAX,R13 IMUL RAX,RAX,0xa8 MOVZX ECX,word ptr [R15] MOVZX EAX,word ptr [R12 + RAX*0x1] TEST AL,AL SETNS DL TEST CL,0x40 JZ 0x0015983f TEST AL,AL JS 0x0015984d MOV EDX,EAX SHR DL,0x7 LAB_0015983f: TEST CL,0x8 JZ 0x0015985a AND EAX,0x8 JZ 0x0015985a TEST DL,DL JZ 0x0015985a LAB_0015984d: MOV RDI,R14 MOV RDX,RBX CALL 0x0013a480 JMP 0x00159872 LAB_0015985a: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV RDX,RBX CALL 0x0013c230 LAB_00159872: ADD R15,0xa8 MOV RSI,R13 CMP R13,0x3 JNZ 0x0015980b MOV RDX,qword ptr [RSP + 0x220] MOV RCX,qword ptr [RSP + 0x8] LAB_0015988f: MOV RDI,R14 MOV RSI,RBX CALL 0x0013b350 CMP byte ptr [R14 + 0x9],0x1 JNZ 0x001598a9 MOV RDI,RBX CALL 0x00156c71 LAB_001598a9: MOV RDI,qword ptr [RSP + 0x218] CALL 0x0013a0a0 MOV RDI,qword ptr [RSP + 0x430] CALL 0x0013a0a0 ADD RSP,0x438 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::Convert (GregoryTriConverter<float> *this,SparseMatrix *param_1) { GregoryTriConverter<float> *pGVar1; long lVar2; uint uVar3; byte bVar4; uint uVar5; long lVar6; GregoryTriConverter<float> *pGVar7; long lVar8; bool bVar9; int *local_460; int local_450 [128]; int *local_250; float *local_248; uint local_240; uint local_23c; float local_238 [128]; float *local_38; if (this[8] == (GregoryTriConverter<float>)0x1) { resizeMatrixIsolatedIrregular(this,param_1,*(int *)(this + 0xc),*(int *)(this + 0x10)); } else { resizeMatrixUnisolated(this,param_1); } uVar5 = *(int *)(this + 4) * 3 + 3; uVar3 = *(int *)this * 2; if (*(int *)this * 2 < (int)uVar5) { uVar3 = uVar5; } local_248 = local_238; local_23c = 0x80; local_38 = (float *)0x0; local_240 = uVar3; if (uVar3 < 0x81) { local_460 = local_450; local_250 = (int *)0x0; } else { local_248 = (float *)operator_new((ulong)uVar3 << 2); local_250 = (int *)0x0; local_23c = uVar3; local_38 = local_248; /* try { // try from 00159733 to 0015973a has its CatchHandler @ 001598d5 */ local_460 = (int *)operator_new((ulong)uVar3 << 2); local_250 = local_460; } pGVar1 = this + 0x18; lVar8 = 0; pGVar7 = pGVar1; do { if (((byte)*pGVar7 & 8) == 0) { /* try { // try from 00159785 to 001597a2 has its CatchHandler @ 001598de */ computeIrregularEdgePoints(this,(int)lVar8,param_1,local_248); } else { assignRegularEdgePoints(this,(int)lVar8,param_1); } lVar8 = lVar8 + 1; pGVar7 = pGVar7 + 0xa8; } while (lVar8 != 3); lVar8 = 0; pGVar7 = pGVar1; do { if (((byte)pGVar7[1] & 3) == 0) { LAB_001597db: computeIrregularFacePoints(this,(int)lVar8,param_1,local_248,local_460); } else { /* try { // try from 001597c0 to 001597f5 has its CatchHandler @ 001598e0 */ assignRegularFacePoints(this,(int)lVar8,param_1); if ((~*(uint *)pGVar7 & 0x300) != 0) goto LAB_001597db; } lVar8 = lVar8 + 1; pGVar7 = pGVar7 + 0xa8; } while (lVar8 != 3); lVar8 = 0; pGVar7 = pGVar1; do { lVar2 = lVar8 + 1; lVar6 = 0; if (lVar8 != 2) { lVar6 = lVar2; } bVar4 = (byte)*(ushort *)(pGVar1 + lVar6 * 0xa8); bVar9 = -1 < (char)bVar4; if ((*(ushort *)pGVar7 & 0x40) == 0) { LAB_0015983f: if ((((*(ushort *)pGVar7 & 8) != 0) && ((*(ushort *)(pGVar1 + lVar6 * 0xa8) & 8) != 0)) && (bVar9 != false)) goto LAB_0015984d; computeIrregularMidEdgePoint(this,(int)lVar8,param_1,local_248,local_460); } else { if (-1 < (char)bVar4) { bVar9 = (bool)(bVar4 >> 7); goto LAB_0015983f; } LAB_0015984d: /* try { // try from 0015984d to 00159871 has its CatchHandler @ 001598dc */ assignRegularMidEdgePoint(this,(int)lVar8,param_1); } pGVar7 = pGVar7 + 0xa8; lVar8 = lVar2; if (lVar2 == 3) { /* try { // try from 0015988f to 001598a8 has its CatchHandler @ 001598da */ promoteCubicEdgePointsToQuartic(this,param_1,local_248,local_460); if (this[9] == (GregoryTriConverter<float>)0x1) { (anonymous_namespace)::_removeValence2Duplicates<float>(param_1); } operator_delete(local_250); operator_delete(local_38); return; } } while( true ); }
25,733
ggml_pool_1d
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_pool_1d( struct ggml_context * ctx, struct ggml_tensor * a, enum ggml_op_pool op, int k0, int s0, int p0) { const int64_t ne[4] = { ggml_calc_pool_output_size(a->ne[0], k0, s0, p0), a->ne[1], a->ne[2], a->ne[3], }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { op, k0, s0, p0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_POOL_1D; result->src[0] = a; return result; }
O0
c
ggml_pool_1d: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movl %edx, 0x54(%rsp) movl %ecx, 0x50(%rsp) movl %r8d, 0x4c(%rsp) movl %r9d, 0x48(%rsp) movq 0x58(%rsp), %rax movq 0x10(%rax), %rdi movl 0x50(%rsp), %esi movl 0x4c(%rsp), %edx cvtsi2ssl 0x48(%rsp), %xmm0 callq 0x511d0 movq %rax, 0x20(%rsp) movq 0x58(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x28(%rsp) movq 0x58(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x30(%rsp) movq 0x58(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x38(%rsp) movq 0x60(%rsp), %rdi leaq 0x20(%rsp), %rcx xorl %esi, %esi movl $0x4, %edx callq 0x40500 movq %rax, 0x18(%rsp) movl 0x54(%rsp), %eax movl %eax, (%rsp) movl 0x50(%rsp), %eax movl %eax, 0x4(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x8(%rsp) movl 0x48(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rdi movq %rsp, %rsi movl $0x10, %edx callq 0x4c4d0 movq 0x18(%rsp), %rax movl $0x35, 0x50(%rax) movq 0x58(%rsp), %rcx movq 0x18(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x18(%rsp), %rax addq $0x68, %rsp retq nop
ggml_pool_1d: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_14], edx mov [rsp+68h+var_18], ecx mov [rsp+68h+var_1C], r8d mov [rsp+68h+var_20], r9d mov rax, [rsp+68h+var_10] mov rdi, [rax+10h] mov esi, [rsp+68h+var_18] mov edx, [rsp+68h+var_1C] cvtsi2ss xmm0, [rsp+68h+var_20] call ggml_calc_pool_output_size mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_10] mov rax, [rax+18h] mov [rsp+68h+var_40], rax mov rax, [rsp+68h+var_10] mov rax, [rax+20h] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_10] mov rax, [rax+28h] mov [rsp+68h+var_30], rax mov rdi, [rsp+68h+var_8] lea rcx, [rsp+68h+var_48] xor esi, esi mov edx, 4 call _ggml_new_tensor mov [rsp+68h+var_50], rax mov eax, [rsp+68h+var_14] mov [rsp+68h+var_68], eax mov eax, [rsp+68h+var_18] mov [rsp+68h+var_64], eax mov eax, [rsp+68h+var_1C] mov [rsp+68h+var_60], eax mov eax, [rsp+68h+var_20] mov [rsp+68h+var_5C], eax mov rdi, [rsp+68h+var_50] mov rsi, rsp mov edx, 10h call ggml_set_op_params mov rax, [rsp+68h+var_50] mov dword ptr [rax+50h], 35h ; '5' mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_50] mov [rax+98h], rcx mov rax, [rsp+68h+var_50] add rsp, 68h retn
long long ggml_pool_1d(long long a1, _QWORD *a2, int a3, unsigned int a4, unsigned int a5, int a6) { _DWORD v7[6]; // [rsp+0h] [rbp-68h] BYREF long long v8; // [rsp+18h] [rbp-50h] _QWORD v9[5]; // [rsp+20h] [rbp-48h] BYREF int v10; // [rsp+48h] [rbp-20h] unsigned int v11; // [rsp+4Ch] [rbp-1Ch] unsigned int v12; // [rsp+50h] [rbp-18h] int v13; // [rsp+54h] [rbp-14h] _QWORD *v14; // [rsp+58h] [rbp-10h] long long v15; // [rsp+60h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v9[0] = ggml_calc_pool_output_size(a2[2], a4, a5, (float)a6); v9[1] = a2[3]; v9[2] = a2[4]; v9[3] = a2[5]; v8 = ggml_new_tensor(a1, 0, 4u, (long long)v9); v7[0] = v13; v7[1] = v12; v7[2] = v11; v7[3] = v10; ggml_set_op_params(v8, (long long)v7, 16LL); *(_DWORD *)(v8 + 80) = 53; *(_QWORD *)(v8 + 152) = v14; return v8; }
ggml_pool_1d: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV dword ptr [RSP + 0x54],EDX MOV dword ptr [RSP + 0x50],ECX MOV dword ptr [RSP + 0x4c],R8D MOV dword ptr [RSP + 0x48],R9D MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RAX + 0x10] MOV ESI,dword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] CVTSI2SS XMM0,dword ptr [RSP + 0x48] CALL 0x001511d0 MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x60] LEA RCX,[RSP + 0x20] XOR ESI,ESI MOV EDX,0x4 CALL 0x00140500 MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP],EAX MOV EAX,dword ptr [RSP + 0x50] MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RSP MOV EDX,0x10 CALL 0x0014c4d0 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x50],0x35 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x68 RET
long ggml_pool_1d(int8 param_1,long param_2,int4 param_3,int4 param_4, int4 param_5,int param_6) { int4 local_68; int4 local_64; int4 local_60; int local_5c; long local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int local_20; int4 local_1c; int4 local_18; int4 local_14; long local_10; int8 local_8; local_20 = param_6; local_1c = param_5; local_18 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; local_48 = ggml_calc_pool_output_size ((float)param_6,*(int8 *)(param_2 + 0x10),param_4,param_5); local_40 = *(int8 *)(local_10 + 0x18); local_38 = *(int8 *)(local_10 + 0x20); local_30 = *(int8 *)(local_10 + 0x28); local_50 = ggml_new_tensor(local_8,0,4,&local_48); local_68 = local_14; local_64 = local_18; local_60 = local_1c; local_5c = local_20; ggml_set_op_params(local_50,&local_68,0x10); *(int4 *)(local_50 + 0x50) = 0x35; *(long *)(local_50 + 0x98) = local_10; return local_50; }
25,734
stmt_set_error
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
void stmt_set_error(MYSQL_STMT *stmt, unsigned int error_nr, const char *sqlstate, const char *format, ...) { va_list ap; const char *error= NULL; if (error_nr >= CR_MIN_ERROR && error_nr <= CR_MYSQL_LAST_ERROR) error= ER(error_nr); else if (error_nr >= CER_MIN_ERROR && error_nr <= CR_MARIADB_LAST_ERROR) error= CER(error_nr); stmt->last_errno= error_nr; ma_strmake(stmt->sqlstate, sqlstate, SQLSTATE_LENGTH); va_start(ap, format); vsnprintf(stmt->last_error, MYSQL_ERRMSG_SIZE, format ? format : error ? error : "", ap); va_end(ap); return; }
O3
c
stmt_set_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rcx, %r14 movq %rdx, %rcx movq %rdi, %rbx movq %r8, -0xc0(%rbp) movq %r9, -0xb8(%rbp) testb %al, %al je 0x1e4dc movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) leal -0x7d0(%rsi), %eax cmpl $0x3e, %eax jae 0x1e4f0 leaq 0x2a5e2(%rip), %rdx # 0x48ad0 jmp 0x1e502 leal -0x1388(%rsi), %eax cmpl $0xf, %eax ja 0x1e50a leaq 0x2a7ce(%rip), %rdx # 0x48cd0 movl %eax, %eax movq (%rdx,%rax,8), %r15 jmp 0x1e50d xorl %r15d, %r15d movl %esi, 0x108(%rbx) leaq 0x30d(%rbx), %rdi movl $0x5, %edx movq %rcx, %rsi callq 0x252b3 movabsq $0x3000000020, %rax # imm = 0x3000000020 leaq -0x30(%rbp), %r9 movq %rax, (%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) leaq -0xe0(%rbp), %rax movq %rax, 0x10(%r9) testq %r15, %r15 leaq 0x1608a(%rip), %r8 # 0x345df cmovneq %r15, %r8 testq %r14, %r14 cmovneq %r14, %r8 addq $0x10c, %rbx # imm = 0x10C movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movl $0x1, %edx movq $-0x1, %rcx callq 0x13380 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
stmt_set_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov r14, rcx mov rcx, rdx mov rbx, rdi mov [rbp+var_C0], r8 mov [rbp+var_B8], r9 test al, al jz short loc_1E4DC movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_1E4DC: lea eax, [rsi-7D0h] cmp eax, 3Eh ; '>' jnb short loc_1E4F0 lea rdx, client_errors jmp short loc_1E502 loc_1E4F0: lea eax, [rsi-1388h] cmp eax, 0Fh ja short loc_1E50A lea rdx, mariadb_client_errors loc_1E502: mov eax, eax mov r15, [rdx+rax*8] jmp short loc_1E50D loc_1E50A: xor r15d, r15d loc_1E50D: mov [rbx+108h], esi lea rdi, [rbx+30Dh] mov edx, 5 mov rsi, rcx call ma_strmake mov rax, 3000000020h lea r9, [rbp+var_30] mov [r9], rax lea rax, [rbp+arg_0] mov [r9+8], rax lea rax, [rbp+var_E0] mov [r9+10h], rax test r15, r15 lea r8, aExecuteTestWit+29h; "" cmovnz r8, r15 test r14, r14 cmovnz r8, r14 add rbx, 10Ch mov esi, 200h mov rdi, rbx mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh call ___vsnprintf_chk add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long stmt_set_error(long long a1, int a2, long long a3, char *a4, ...) { int v6; // eax char **v7; // rdx char *v8; // r15 char *v9; // r8 va_list va; // [rsp+B0h] [rbp-30h] BYREF v6 = a2 - 2000; if ( (unsigned int)(a2 - 2000) < 0x3E ) { v7 = client_errors; LABEL_5: v8 = v7[v6]; goto LABEL_7; } v6 = a2 - 5000; if ( (unsigned int)(a2 - 5000) <= 0xF ) { v7 = mariadb_client_errors; goto LABEL_5; } v8 = 0LL; LABEL_7: *(_DWORD *)(a1 + 264) = a2; ma_strmake(a1 + 781, a3, 5LL); va_start(va, a4); v9 = ""; if ( v8 ) v9 = v8; if ( a4 ) v9 = a4; return __vsnprintf_chk(a1 + 268, 512LL, 1LL, -1LL, v9, va); }
stmt_set_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV R14,RCX MOV RCX,RDX MOV RBX,RDI MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xb8],R9 TEST AL,AL JZ 0x0011e4dc MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_0011e4dc: LEA EAX,[RSI + -0x7d0] CMP EAX,0x3e JNC 0x0011e4f0 LEA RDX,[0x148ad0] JMP 0x0011e502 LAB_0011e4f0: LEA EAX,[RSI + -0x1388] CMP EAX,0xf JA 0x0011e50a LEA RDX,[0x148cd0] LAB_0011e502: MOV EAX,EAX MOV R15,qword ptr [RDX + RAX*0x8] JMP 0x0011e50d LAB_0011e50a: XOR R15D,R15D LAB_0011e50d: MOV dword ptr [RBX + 0x108],ESI LEA RDI,[RBX + 0x30d] MOV EDX,0x5 MOV RSI,RCX CALL 0x001252b3 MOV RAX,0x3000000020 LEA R9,[RBP + -0x30] MOV qword ptr [R9],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX LEA RAX,[RBP + -0xe0] MOV qword ptr [R9 + 0x10],RAX TEST R15,R15 LEA R8,[0x1345df] CMOVNZ R8,R15 TEST R14,R14 CMOVNZ R8,R14 ADD RBX,0x10c MOV ESI,0x200 MOV RDI,RBX MOV EDX,0x1 MOV RCX,-0x1 CALL 0x00113380 ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void stmt_set_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long param_9,int param_10,int8 param_11,char *param_12,int8 param_13, int8 param_14) { char in_AL; uint uVar1; int **ppuVar2; char *pcVar3; char *pcVar4; int1 local_e8 [32]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } uVar1 = param_10 - 2000; if (uVar1 < 0x3e) { ppuVar2 = &client_errors; } else { uVar1 = param_10 - 5000; if (0xf < uVar1) { pcVar4 = (char *)0x0; goto LAB_0011e50d; } ppuVar2 = (int **)mariadb_client_errors; } pcVar4 = ppuVar2[uVar1]; LAB_0011e50d: *(int *)(param_9 + 0x108) = param_10; local_c8 = param_13; local_c0 = param_14; ma_strmake(param_9 + 0x30d,param_11,5); local_38 = 0x3000000020; local_30 = &stack0x00000008; local_28 = local_e8; pcVar3 = ""; if (pcVar4 != (char *)0x0) { pcVar3 = pcVar4; } if (param_12 != (char *)0x0) { pcVar3 = param_12; } __vsnprintf_chk(param_9 + 0x10c,0x200,1,0xffffffffffffffff,pcVar3); return; }
25,735
alaya::SQ4QuantizerTest_Constructor_Test::TestBody()
AlayaLite/tests/space/quant/sq4_test.cpp
TEST_F(SQ4QuantizerTest, Constructor) { EXPECT_EQ(quantizer_.dim_, dim_); EXPECT_EQ(quantizer_.min_vector_.size(), dim_); EXPECT_EQ(quantizer_.max_vector_.size(), dim_); }
O0
cpp
alaya::SQ4QuantizerTest_Constructor_Test::TestBody(): subq $0xd8, %rsp movq %rdi, 0xd0(%rsp) movq 0xd0(%rsp), %r8 movq %r8, 0x38(%rsp) movq %r8, %rcx addq $0x18, %rcx addq $0x10, %r8 leaq 0xf8c61(%rip), %rsi # 0x11509f leaq 0xf8c65(%rip), %rdx # 0x1150aa leaq 0xc0(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x1e010 movq 0x40(%rsp), %rdi callq 0x1e060 movb %al, 0x4f(%rsp) jmp 0x1c467 movb 0x4f(%rsp), %al testb $0x1, %al jne 0x1c471 jmp 0x1c48f jmp 0x1c550 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0x1c5c3 leaq 0xa8(%rsp), %rdi callq 0xc8d80 jmp 0x1c49e leaq 0xc0(%rsp), %rdi callq 0x1e070 movq %rax, 0x30(%rsp) jmp 0x1c4b2 movq 0x30(%rsp), %r8 leaq 0xf8b97(%rip), %rdx # 0x115055 leaq 0xa0(%rsp), %rdi movl $0x1, %esi movl $0x20, %ecx callq 0xc4b10 jmp 0x1c4d7 leaq 0xa0(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0xc1250 jmp 0x1c4ee leaq 0xa0(%rsp), %rdi callq 0xc4ba0 leaq 0xa8(%rsp), %rdi callq 0x1e080 jmp 0x1c550 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0x1c541 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) leaq 0xa0(%rsp), %rdi callq 0xc4ba0 leaq 0xa8(%rsp), %rdi callq 0x1e080 jmp 0x1c5c3 leaq 0xc0(%rsp), %rdi callq 0x1e090 movq 0x38(%rsp), %rdi addq $0x20, %rdi callq 0x1e100 movq 0x38(%rsp), %r8 movq %rax, 0x88(%rsp) addq $0x10, %r8 leaq 0xf8b2c(%rip), %rsi # 0x1150af leaq 0xf8b20(%rip), %rdx # 0x1150aa leaq 0x90(%rsp), %rdi movq %rdi, 0x20(%rsp) leaq 0x88(%rsp), %rcx callq 0x1e0b0 movq 0x20(%rsp), %rdi callq 0x1e060 movb %al, 0x2f(%rsp) jmp 0x1c5b4 movb 0x2f(%rsp), %al testb $0x1, %al jne 0x1c5be jmp 0x1c5ee jmp 0x1c6a3 leaq 0xc0(%rsp), %rdi callq 0x1e090 jmp 0x1c7f8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0x1c70d leaq 0x80(%rsp), %rdi callq 0xc8d80 jmp 0x1c5fd leaq 0x90(%rsp), %rdi callq 0x1e070 movq %rax, 0x18(%rsp) jmp 0x1c611 movq 0x18(%rsp), %r8 leaq 0xf8a38(%rip), %rdx # 0x115055 leaq 0x78(%rsp), %rdi movl $0x1, %esi movl $0x21, %ecx callq 0xc4b10 jmp 0x1c633 leaq 0x78(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0xc1250 jmp 0x1c647 leaq 0x78(%rsp), %rdi callq 0xc4ba0 leaq 0x80(%rsp), %rdi callq 0x1e080 jmp 0x1c6a3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0x1c694 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) leaq 0x78(%rsp), %rdi callq 0xc4ba0 leaq 0x80(%rsp), %rdi callq 0x1e080 jmp 0x1c70d leaq 0x90(%rsp), %rdi callq 0x1e090 movq 0x38(%rsp), %rdi addq $0x38, %rdi callq 0x1e100 movq 0x38(%rsp), %r8 movq %rax, 0x60(%rsp) addq $0x10, %r8 leaq 0xf89fa(%rip), %rsi # 0x1150cd leaq 0xf89d0(%rip), %rdx # 0x1150aa leaq 0x68(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x60(%rsp), %rcx callq 0x1e0b0 movq 0x8(%rsp), %rdi callq 0x1e060 movb %al, 0x17(%rsp) jmp 0x1c6fe movb 0x17(%rsp), %al testb $0x1, %al jne 0x1c708 jmp 0x1c738 jmp 0x1c7dc leaq 0x90(%rsp), %rdi callq 0x1e090 jmp 0x1c7f8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0x1c7ee leaq 0x58(%rsp), %rdi callq 0xc8d80 jmp 0x1c744 leaq 0x68(%rsp), %rdi callq 0x1e070 movq %rax, (%rsp) jmp 0x1c754 movq (%rsp), %r8 leaq 0xf88f6(%rip), %rdx # 0x115055 leaq 0x50(%rsp), %rdi movl $0x1, %esi movl $0x22, %ecx callq 0xc4b10 jmp 0x1c775 leaq 0x50(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0xc1250 jmp 0x1c786 leaq 0x50(%rsp), %rdi callq 0xc4ba0 leaq 0x58(%rsp), %rdi callq 0x1e080 jmp 0x1c7dc movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0x1c7d0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) leaq 0x50(%rsp), %rdi callq 0xc4ba0 leaq 0x58(%rsp), %rdi callq 0x1e080 jmp 0x1c7ee leaq 0x68(%rsp), %rdi callq 0x1e090 addq $0xd8, %rsp retq leaq 0x68(%rsp), %rdi callq 0x1e090 movq 0xb8(%rsp), %rdi callq 0x16cf0 nopw %cs:(%rax,%rax)
_ZN5alaya33SQ4QuantizerTest_Constructor_Test8TestBodyEv: sub rsp, 0D8h mov qword ptr [rsp+0D8h+var_8], rdi mov r8, qword ptr [rsp+0D8h+var_8] mov qword ptr [rsp+0D8h+var_A0], r8; int mov rcx, r8 add rcx, 18h add r8, 10h lea rsi, aQuantizerDim; "quantizer_.dim_" lea rdx, aQuantizerDim+0Bh; "dim_" lea rdi, [rsp+0D8h+var_18] mov qword ptr [rsp+0D8h+var_98], rdi; __int16 call _ZN7testing8internal8EqHelper7CompareIjjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ mov rdi, qword ptr [rsp+0D8h+var_98] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rsp+0D8h+var_89], al jmp short $+2 loc_1C467: mov al, [rsp+0D8h+var_89] test al, 1 jnz short loc_1C471 jmp short loc_1C48F loc_1C471: jmp loc_1C550 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp loc_1C5C3 loc_1C48F: lea rdi, [rsp+0D8h+var_30]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_1C49E: lea rdi, [rsp+0D8h+var_18]; this call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void) mov qword ptr [rsp+0D8h+var_A8], rax; int jmp short $+2 loc_1C4B2: mov r8, qword ptr [rsp+0D8h+var_A8]; int lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+0D8h+var_38]; int mov esi, 1; int mov ecx, 20h ; ' '; int call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_1C4D7: lea rdi, [rsp+0D8h+var_38]; char lea rsi, [rsp+0D8h+var_30]; int call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_1C4EE: lea rdi, [rsp+0D8h+var_38]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+0D8h+var_30]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_1C550 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_1C541 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax lea rdi, [rsp+arg_98]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_1C541: lea rdi, [rsp+arg_A0]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_1C5C3 loc_1C550: lea rdi, [rsp+0D8h+var_18]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, qword ptr [rsp+0D8h+var_A0] add rdi, 20h ; ' ' call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void) mov r8, qword ptr [rsp+0D8h+var_A0] mov [rsp+0D8h+var_50], rax add r8, 10h lea rsi, aQuantizerMinVe; "quantizer_.min_vector_.size()" lea rdx, aQuantizerDim+0Bh; "dim_" lea rdi, [rsp+0D8h+var_48] mov qword ptr [rsp+0D8h+var_B8], rdi; int lea rcx, [rsp+0D8h+var_50] call _ZN7testing8internal8EqHelper7CompareImjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ mov rdi, qword ptr [rsp+0D8h+var_B8] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rsp+0D8h+var_A9], al jmp short $+2 loc_1C5B4: mov al, [rsp+0D8h+var_A9] test al, 1 jnz short loc_1C5BE jmp short loc_1C5EE loc_1C5BE: jmp loc_1C6A3 loc_1C5C3: lea rdi, [rsp+arg_B8]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() jmp loc_1C7F8 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp loc_1C70D loc_1C5EE: lea rdi, [rsp+0D8h+var_58]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_1C5FD: lea rdi, [rsp+0D8h+var_48]; this call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void) mov qword ptr [rsp+0D8h+var_C0], rax; int jmp short $+2 loc_1C611: mov r8, qword ptr [rsp+0D8h+var_C0]; int lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+0D8h+var_60]; int mov esi, 1; int mov ecx, 21h ; '!'; int call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_1C633: lea rdi, [rsp+0D8h+var_60]; char lea rsi, [rsp+0D8h+var_58]; int call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_1C647: lea rdi, [rsp+0D8h+var_60]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+0D8h+var_58]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_1C6A3 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_1C694 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax lea rdi, [rsp+arg_70]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_1C694: lea rdi, [rsp+arg_78]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_1C70D loc_1C6A3: lea rdi, [rsp+0D8h+var_48]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, qword ptr [rsp+0D8h+var_A0] add rdi, 38h ; '8' call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void) mov r8, qword ptr [rsp+0D8h+var_A0] mov qword ptr [rsp+0D8h+var_78], rax; int add r8, 10h lea rsi, aQuantizerMaxVe; "quantizer_.max_vector_.size()" lea rdx, aQuantizerDim+0Bh; "dim_" lea rdi, [rsp+0D8h+var_70] mov qword ptr [rsp+0D8h+var_D0], rdi; int lea rcx, [rsp+0D8h+var_78] call _ZN7testing8internal8EqHelper7CompareImjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ mov rdi, qword ptr [rsp+0D8h+var_D0] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rsp+0D8h+var_C1], al jmp short $+2 loc_1C6FE: mov al, [rsp+0D8h+var_C1] test al, 1 jnz short loc_1C708 jmp short loc_1C738 loc_1C708: jmp loc_1C7DC loc_1C70D: lea rdi, [rsp+arg_88]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() jmp loc_1C7F8 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp loc_1C7EE loc_1C738: lea rdi, [rsp+0D8h+var_80]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_1C744: lea rdi, [rsp+0D8h+var_70]; this call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void) mov [rsp+0D8h+var_D8], rax; int jmp short $+2 loc_1C754: mov r8, [rsp+0D8h+var_D8]; int lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+0D8h+var_88]; int mov esi, 1; int mov ecx, 22h ; '"'; int call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_1C775: lea rdi, [rsp+0D8h+var_88]; char lea rsi, [rsp+0D8h+var_80]; int call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_1C786: lea rdi, [rsp+0D8h+var_88]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+0D8h+var_80]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_1C7DC mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_1C7D0 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax lea rdi, [rsp+arg_48]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_1C7D0: lea rdi, [rsp+arg_50]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_1C7EE loc_1C7DC: lea rdi, [rsp+0D8h+var_70]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() add rsp, 0D8h retn loc_1C7EE: lea rdi, [rsp+arg_60]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() loc_1C7F8: mov rdi, [rsp+arg_B0] call __Unwind_Resume
void alaya::SQ4QuantizerTest_Constructor_Test::TestBody(alaya::SQ4QuantizerTest_Constructor_Test *this) { int v1; // r9d int v2; // r9d int v3; // r9d void *v4; // [rsp+0h] [rbp-D8h] int v5; // [rsp+0h] [rbp-D8h] int v6; // [rsp+0h] [rbp-D8h] void *v7; // [rsp+0h] [rbp-D8h] int v8; // [rsp+0h] [rbp-D8h] int v9; // [rsp+8h] [rbp-D0h] int v10; // [rsp+8h] [rbp-D0h] int v11; // [rsp+8h] [rbp-D0h] int v12; // [rsp+8h] [rbp-D0h] long long v13; // [rsp+10h] [rbp-C8h] int v14; // [rsp+10h] [rbp-C8h] int v15; // [rsp+10h] [rbp-C8h] int v16; // [rsp+10h] [rbp-C8h] int v17; // [rsp+18h] [rbp-C0h] int v18; // [rsp+18h] [rbp-C0h] int v19; // [rsp+20h] [rbp-B8h] int *v20; // [rsp+20h] [rbp-B8h] int v21; // [rsp+28h] [rbp-B0h] int v22; // [rsp+30h] [rbp-A8h] int v23; // [rsp+30h] [rbp-A8h] alaya::SQ4QuantizerTest_Constructor_Test *v24; // [rsp+38h] [rbp-A0h] __int16 *v25; // [rsp+40h] [rbp-98h] long long v26; // [rsp+48h] [rbp-90h] char v27[8]; // [rsp+50h] [rbp-88h] BYREF int v28; // [rsp+58h] [rbp-80h] BYREF int v29[2]; // [rsp+60h] [rbp-78h] BYREF int v30; // [rsp+68h] [rbp-70h] BYREF char v31; // [rsp+70h] [rbp-68h] char v32[4]; // [rsp+78h] [rbp-60h] BYREF int v33; // [rsp+80h] [rbp-58h] BYREF long long v34; // [rsp+88h] [rbp-50h] BYREF int v35[4]; // [rsp+90h] [rbp-48h] BYREF char v36[4]; // [rsp+A0h] [rbp-38h] BYREF int v37[6]; // [rsp+A8h] [rbp-30h] BYREF __int16 v38[8]; // [rsp+C0h] [rbp-18h] BYREF int v39[2]; // [rsp+D0h] [rbp-8h] *(_QWORD *)v39 = this; v24 = this; v25 = v38; ZN7testing8internal8EqHelper7CompareIjjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_( v38, "quantizer_.dim_", "dim_", (char *)this + 24, (char *)this + 16); HIBYTE(v26) = testing::AssertionResult::operator bool(v38); if ( (v26 & 0x100000000000000LL) == 0 ) { testing::Message::Message((testing::Message *)v37); v23 = testing::AssertionResult::failure_message((testing::AssertionResult *)v38); testing::internal::AssertHelper::AssertHelper( (int)v36, 1, (int)"/workspace/llm4binary/github2025/AlayaLite/tests/space/quant/sq4_test.cpp", 32, v23, v1, v4, v9, v13); testing::internal::AssertHelper::operator=( (char)v36, (int)v37, v5, v10, v14, v17, v19, v21, v23, (int)this, (__int16)v38, v26, v27[0], v28, v29[0], v30, v31); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v36); testing::Message::~Message((testing::Message *)v37); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v38); v34 = std::vector<float>::size((char *)v24 + 32); v20 = v35; ZN7testing8internal8EqHelper7CompareImjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_( v35, "quantizer_.min_vector_.size()", "dim_", &v34, (char *)v24 + 16); if ( (testing::AssertionResult::operator bool(v35) & 1) == 0 ) { testing::Message::Message((testing::Message *)&v33); v18 = testing::AssertionResult::failure_message((testing::AssertionResult *)v35); testing::internal::AssertHelper::AssertHelper( (int)v32, 1, (int)"/workspace/llm4binary/github2025/AlayaLite/tests/space/quant/sq4_test.cpp", 33, v18, v2, v4, v9, v13); testing::internal::AssertHelper::operator=( (char)v32, (int)&v33, v6, v11, v15, v18, (int)v35, v21, v22, (int)v24, (__int16)v25, v26, v27[0], v28, v29[0], v30, v31); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v32); testing::Message::~Message((testing::Message *)&v33); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v35); *(_QWORD *)v29 = std::vector<float>::size((char *)v24 + 56); ZN7testing8internal8EqHelper7CompareImjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_( &v30, "quantizer_.max_vector_.size()", "dim_", v29, (char *)v24 + 16); HIBYTE(v13) = testing::AssertionResult::operator bool(&v30); if ( (v13 & 0x100000000000000LL) == 0 ) { testing::Message::Message((testing::Message *)&v28); v7 = (void *)testing::AssertionResult::failure_message((testing::AssertionResult *)&v30); testing::internal::AssertHelper::AssertHelper( (int)v27, 1, (int)"/workspace/llm4binary/github2025/AlayaLite/tests/space/quant/sq4_test.cpp", 34, (int)v7, v3, v7, (int)&v30, v13); testing::internal::AssertHelper::operator=( (char)v27, (int)&v28, v8, v12, v16, v17, (int)v20, v21, v22, (int)v24, (__int16)v25, v26, v27[0], v28, v29[0], v30, v31); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v27); testing::Message::~Message((testing::Message *)&v28); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)&v30); }
TestBody: SUB RSP,0xd8 MOV qword ptr [RSP + 0xd0],RDI MOV R8,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x38],R8 MOV RCX,R8 ADD RCX,0x18 ADD R8,0x10 LEA RSI,[0x21509f] LEA RDX,[0x2150aa] LEA RDI,[RSP + 0xc0] MOV qword ptr [RSP + 0x40],RDI CALL 0x0011e010 MOV RDI,qword ptr [RSP + 0x40] LAB_0011c45c: CALL 0x0011e060 MOV byte ptr [RSP + 0x4f],AL JMP 0x0011c467 LAB_0011c467: MOV AL,byte ptr [RSP + 0x4f] TEST AL,0x1 JNZ 0x0011c471 JMP 0x0011c48f LAB_0011c471: JMP 0x0011c550 LAB_0011c48f: LEA RDI,[RSP + 0xa8] CALL 0x001c8d80 JMP 0x0011c49e LAB_0011c49e: LEA RDI,[RSP + 0xc0] CALL 0x0011e070 MOV qword ptr [RSP + 0x30],RAX JMP 0x0011c4b2 LAB_0011c4b2: MOV R8,qword ptr [RSP + 0x30] LEA RDX,[0x215055] LEA RDI,[RSP + 0xa0] MOV ESI,0x1 MOV ECX,0x20 CALL 0x001c4b10 JMP 0x0011c4d7 LAB_0011c4d7: LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0xa8] CALL 0x001c1250 LAB_0011c4ec: JMP 0x0011c4ee LAB_0011c4ee: LEA RDI,[RSP + 0xa0] CALL 0x001c4ba0 LEA RDI,[RSP + 0xa8] CALL 0x0011e080 JMP 0x0011c550 LAB_0011c550: LEA RDI,[RSP + 0xc0] CALL 0x0011e090 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 CALL 0x0011e100 MOV R8,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x88],RAX ADD R8,0x10 LEA RSI,[0x2150af] LEA RDX,[0x2150aa] LEA RDI,[RSP + 0x90] MOV qword ptr [RSP + 0x20],RDI LEA RCX,[RSP + 0x88] CALL 0x0011e0b0 MOV RDI,qword ptr [RSP + 0x20] LAB_0011c5a9: CALL 0x0011e060 MOV byte ptr [RSP + 0x2f],AL JMP 0x0011c5b4 LAB_0011c5b4: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x0011c5be JMP 0x0011c5ee LAB_0011c5be: JMP 0x0011c6a3 LAB_0011c5ee: LEA RDI,[RSP + 0x80] CALL 0x001c8d80 JMP 0x0011c5fd LAB_0011c5fd: LEA RDI,[RSP + 0x90] CALL 0x0011e070 MOV qword ptr [RSP + 0x18],RAX JMP 0x0011c611 LAB_0011c611: MOV R8,qword ptr [RSP + 0x18] LEA RDX,[0x215055] LEA RDI,[RSP + 0x78] MOV ESI,0x1 MOV ECX,0x21 CALL 0x001c4b10 JMP 0x0011c633 LAB_0011c633: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x80] CALL 0x001c1250 LAB_0011c645: JMP 0x0011c647 LAB_0011c647: LEA RDI,[RSP + 0x78] CALL 0x001c4ba0 LEA RDI,[RSP + 0x80] CALL 0x0011e080 JMP 0x0011c6a3 LAB_0011c6a3: LEA RDI,[RSP + 0x90] CALL 0x0011e090 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x38 CALL 0x0011e100 MOV R8,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x60],RAX ADD R8,0x10 LEA RSI,[0x2150cd] LEA RDX,[0x2150aa] LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x8],RDI LEA RCX,[RSP + 0x60] CALL 0x0011e0b0 MOV RDI,qword ptr [RSP + 0x8] LAB_0011c6f3: CALL 0x0011e060 MOV byte ptr [RSP + 0x17],AL JMP 0x0011c6fe LAB_0011c6fe: MOV AL,byte ptr [RSP + 0x17] TEST AL,0x1 JNZ 0x0011c708 JMP 0x0011c738 LAB_0011c708: JMP 0x0011c7dc LAB_0011c738: LEA RDI,[RSP + 0x58] CALL 0x001c8d80 JMP 0x0011c744 LAB_0011c744: LEA RDI,[RSP + 0x68] CALL 0x0011e070 MOV qword ptr [RSP],RAX JMP 0x0011c754 LAB_0011c754: MOV R8,qword ptr [RSP] LEA RDX,[0x215055] LEA RDI,[RSP + 0x50] MOV ESI,0x1 MOV ECX,0x22 CALL 0x001c4b10 JMP 0x0011c775 LAB_0011c775: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x58] CALL 0x001c1250 LAB_0011c784: JMP 0x0011c786 LAB_0011c786: LEA RDI,[RSP + 0x50] CALL 0x001c4ba0 LEA RDI,[RSP + 0x58] CALL 0x0011e080 JMP 0x0011c7dc LAB_0011c7dc: LEA RDI,[RSP + 0x68] CALL 0x0011e090 ADD RSP,0xd8 RET
/* alaya::SQ4QuantizerTest_Constructor_Test::TestBody() */ void __thiscall alaya::SQ4QuantizerTest_Constructor_Test::TestBody(SQ4QuantizerTest_Constructor_Test *this) { int8 uVar1; bool bVar2; AssertHelper local_88 [8]; Message local_80 [8]; int8 local_78; AssertionResult local_70 [16]; AssertHelper local_60 [8]; Message local_58 [8]; int8 local_50; AssertionResult local_48 [16]; AssertHelper local_38 [8]; Message local_30 [24]; AssertionResult local_18 [16]; SQ4QuantizerTest_Constructor_Test *local_8; local_8 = this; _ZN7testing8internal8EqHelper7CompareIjjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ (local_18,"quantizer_.dim_","dim_",this + 0x18,this + 0x10); /* try { // try from 0011c45c to 0011c49b has its CatchHandler @ 0011c476 */ bVar2 = testing::AssertionResult::operator_cast_to_bool(local_18); if (!bVar2) { testing::Message::Message(local_30); /* try { // try from 0011c49e to 0011c4d4 has its CatchHandler @ 0011c50a */ uVar1 = testing::AssertionResult::failure_message(local_18); testing::internal::AssertHelper::AssertHelper (local_38,1, "/workspace/llm4binary/github2025/AlayaLite/tests/space/quant/sq4_test.cpp",0x20, uVar1); /* try { // try from 0011c4d7 to 0011c4eb has its CatchHandler @ 0011c520 */ testing::internal::AssertHelper::operator=(local_38,local_30); testing::internal::AssertHelper::~AssertHelper(local_38); testing::Message::~Message(local_30); } testing::AssertionResult::~AssertionResult(local_18); local_50 = std::vector<float,std::allocator<float>>::size ((vector<float,std::allocator<float>> *)(this + 0x20)); _ZN7testing8internal8EqHelper7CompareImjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ (local_48,"quantizer_.min_vector_.size()","dim_",&local_50,this + 0x10); /* try { // try from 0011c5a9 to 0011c5fa has its CatchHandler @ 0011c5d5 */ bVar2 = testing::AssertionResult::operator_cast_to_bool(local_48); if (!bVar2) { testing::Message::Message(local_58); /* try { // try from 0011c5fd to 0011c630 has its CatchHandler @ 0011c660 */ uVar1 = testing::AssertionResult::failure_message(local_48); testing::internal::AssertHelper::AssertHelper (local_60,1, "/workspace/llm4binary/github2025/AlayaLite/tests/space/quant/sq4_test.cpp",0x21, uVar1); /* try { // try from 0011c633 to 0011c644 has its CatchHandler @ 0011c676 */ testing::internal::AssertHelper::operator=(local_60,local_58); testing::internal::AssertHelper::~AssertHelper(local_60); testing::Message::~Message(local_58); } testing::AssertionResult::~AssertionResult(local_48); local_78 = std::vector<float,std::allocator<float>>::size ((vector<float,std::allocator<float>> *)(this + 0x38)); _ZN7testing8internal8EqHelper7CompareImjTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ (local_70,"quantizer_.max_vector_.size()","dim_",&local_78,this + 0x10); /* try { // try from 0011c6f3 to 0011c741 has its CatchHandler @ 0011c71f */ bVar2 = testing::AssertionResult::operator_cast_to_bool(local_70); if (!bVar2) { testing::Message::Message(local_80); /* try { // try from 0011c744 to 0011c772 has its CatchHandler @ 0011c79c */ uVar1 = testing::AssertionResult::failure_message(local_70); testing::internal::AssertHelper::AssertHelper (local_88,1, "/workspace/llm4binary/github2025/AlayaLite/tests/space/quant/sq4_test.cpp",0x22, uVar1); /* try { // try from 0011c775 to 0011c783 has its CatchHandler @ 0011c7b2 */ testing::internal::AssertHelper::operator=(local_88,local_80); testing::internal::AssertHelper::~AssertHelper(local_88); testing::Message::~Message(local_80); } testing::AssertionResult::~AssertionResult(local_70); return; }
25,736
unpack_dirname
eloqsql/mysys/mf_pack.c
size_t unpack_dirname(char * to, const char *from) { size_t length, h_length; char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion; DBUG_ENTER("unpack_dirname"); length= normalize_dirname(buff, from); if (buff[0] == FN_HOMELIB) { suffix=buff+1; tilde_expansion=expand_tilde(&suffix); if (tilde_expansion) { length-= (size_t) (suffix-buff)-1; if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN) { if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR)) h_length--; if (buff+h_length < suffix) bmove(buff+h_length,suffix,length); else bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length); bmove(buff,tilde_expansion,h_length); } } } #ifdef USE_SYMDIR if (my_use_symdir) symdirget(buff); #endif DBUG_RETURN(system_filename(to,buff)); /* Fix for open */ }
O3
c
unpack_dirname: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rdi, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x240(%rbp), %r13 movq %r13, %rdi callq 0x567a3 cmpb $0x7e, (%r13) jne 0x56965 movq %rax, %r14 leaq -0x23f(%rbp), %r15 cmpb $0x2f, (%r15) jne 0x56885 leaq 0x3581f5(%rip), %rbx # 0x3aea78 jmp 0x568de movq %r15, %rdi movl $0x2f, %esi callq 0x28100 movq %rax, %r12 testq %rax, %rax jne 0x568a5 movq %r15, %rdi callq 0x8f7f0 movq %rax, %r12 movb (%r12), %al movb %al, -0x241(%rbp) movb $0x0, (%r12) movq %r15, %rdi callq 0x28280 movq %rax, %rbx movb -0x241(%rbp), %al movb %al, (%r12) callq 0x283f0 testq %rbx, %rbx je 0x56965 addq $0x20, %rbx movq %r12, %r15 movq (%rbx), %r12 testq %r12, %r12 je 0x56965 addq %r13, %r14 subq %r15, %r14 movq %r12, %rdi callq 0x28130 movq %rax, %r13 addq %r14, %rax incq %rax cmpq $0x200, %rax # imm = 0x200 ja 0x56965 testq %r13, %r13 je 0x5691a xorl %eax, %eax cmpb $0x2f, -0x1(%r12,%r13) sete %al subq %rax, %r13 jmp 0x5691d xorl %r13d, %r13d incq %r14 leaq -0x240(,%r13), %rdi addq %rbp, %rdi cmpq %r15, %rdi jae 0x5693d movq %r15, %rsi movq %r14, %rdx callq 0x28610 jmp 0x5694e addq %r14, %rdi addq %r14, %r15 movq %r15, %rsi movq %r14, %rdx callq 0x63374 leaq -0x240(%rbp), %rdi movl $0x205, %ecx # imm = 0x205 movq %r12, %rsi movq %r13, %rdx callq 0x28290 leaq -0x240(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF movq -0x250(%rbp), %rbx movq %rbx, %rdi callq 0x8f838 movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x569a4 subq %rbx, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x283d0
unpack_dirname: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov [rbp+var_250], rdi mov rax, fs:28h mov [rbp+var_30], rax lea r13, [rbp+var_240] mov rdi, r13 call normalize_dirname cmp byte ptr [r13+0], 7Eh ; '~' jnz loc_56965 mov r14, rax lea r15, [rbp+var_23F] cmp byte ptr [r15], 2Fh ; '/' jnz short loc_56885 lea rbx, home_dir jmp short loc_568DE loc_56885: mov rdi, r15 mov esi, 2Fh ; '/' call _strchr mov r12, rax test rax, rax jnz short loc_568A5 mov rdi, r15 call strend mov r12, rax loc_568A5: mov al, [r12] mov [rbp+var_241], al mov byte ptr [r12], 0 mov rdi, r15 call _getpwnam mov rbx, rax mov al, [rbp+var_241] mov [r12], al call _endpwent test rbx, rbx jz loc_56965 add rbx, 20h ; ' ' mov r15, r12 loc_568DE: mov r12, [rbx] test r12, r12 jz short loc_56965 add r14, r13 sub r14, r15 mov rdi, r12 call _strlen mov r13, rax add rax, r14 inc rax cmp rax, 200h ja short loc_56965 test r13, r13 jz short loc_5691A xor eax, eax cmp byte ptr [r12+r13-1], 2Fh ; '/' setz al sub r13, rax jmp short loc_5691D loc_5691A: xor r13d, r13d loc_5691D: inc r14 lea rdi, ds:0FFFFFFFFFFFFFDC0h[r13] add rdi, rbp cmp rdi, r15 jnb short loc_5693D mov rsi, r15 mov rdx, r14 call _memmove jmp short loc_5694E loc_5693D: add rdi, r14 add r15, r14 mov rsi, r15 mov rdx, r14 call bmove_upp loc_5694E: lea rdi, [rbp+var_240] mov ecx, 205h mov rsi, r12 mov rdx, r13 call ___memmove_chk loc_56965: lea rsi, [rbp+var_240] mov edx, 1FFh mov rbx, [rbp+var_250] mov rdi, rbx call strmake mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_569A4 sub rax, rbx add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_569A4: call ___stack_chk_fail
long long unpack_dirname(long long a1, _BYTE *a2) { long long v2; // rax long long v3; // r14 char *v4; // r15 _QWORD *v5; // rbx char *v6; // r12 long long v7; // rbx long long v8; // r12 _BYTE *v9; // r14 long long v10; // r13 long long v11; // r13 _BYTE *v12; // r14 char *v13; // rdi char v16; // [rsp+Fh] [rbp-241h] char v17; // [rsp+10h] [rbp-240h] BYREF _BYTE v18[527]; // [rsp+11h] [rbp-23Fh] BYREF unsigned long long v19; // [rsp+220h] [rbp-30h] long long savedregs; // [rsp+250h] [rbp+0h] BYREF v19 = __readfsqword(0x28u); v2 = normalize_dirname((long long)&v17, a2); if ( v17 != 126 ) return strmake(a1, &v17, 511LL) - a1; v3 = v2; v4 = v18; if ( v18[0] == 47 ) { v5 = &home_dir; LABEL_8: v8 = *v5; if ( *v5 ) { v9 = (_BYTE *)(&v18[v3 - 1] - v4); v10 = strlen(*v5); if ( (unsigned long long)&v9[v10 + 1] <= 0x200 ) { if ( v10 ) v11 = v10 - (*(_BYTE *)(v8 + v10 - 1) == 47); else v11 = 0LL; v12 = v9 + 1; v13 = (char *)&savedregs + v11 - 576; if ( v13 >= v4 ) bmove_upp(&v13[(_QWORD)v12], &v4[(_QWORD)v12], v12); else memmove(v13, v4, v12); __memmove_chk(&v17, v8, v11, 517LL); } } return strmake(a1, &v17, 511LL) - a1; } v6 = (char *)strchr(v18, 47LL); if ( !v6 ) v6 = (char *)strend(v18); v16 = *v6; *v6 = 0; v7 = getpwnam(v18); *v6 = v16; endpwent(); if ( v7 ) { v5 = (_QWORD *)(v7 + 32); v4 = v6; goto LABEL_8; } return strmake(a1, &v17, 511LL) - a1; }
unpack_dirname: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV qword ptr [RBP + -0x250],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R13,[RBP + -0x240] MOV RDI,R13 CALL 0x001567a3 CMP byte ptr [R13],0x7e JNZ 0x00156965 MOV R14,RAX LEA R15,[RBP + -0x23f] CMP byte ptr [R15],0x2f JNZ 0x00156885 LEA RBX,[0x4aea78] JMP 0x001568de LAB_00156885: MOV RDI,R15 MOV ESI,0x2f CALL 0x00128100 MOV R12,RAX TEST RAX,RAX JNZ 0x001568a5 MOV RDI,R15 CALL 0x0018f7f0 MOV R12,RAX LAB_001568a5: MOV AL,byte ptr [R12] MOV byte ptr [RBP + -0x241],AL MOV byte ptr [R12],0x0 MOV RDI,R15 CALL 0x00128280 MOV RBX,RAX MOV AL,byte ptr [RBP + -0x241] MOV byte ptr [R12],AL CALL 0x001283f0 TEST RBX,RBX JZ 0x00156965 ADD RBX,0x20 MOV R15,R12 LAB_001568de: MOV R12,qword ptr [RBX] TEST R12,R12 JZ 0x00156965 ADD R14,R13 SUB R14,R15 MOV RDI,R12 CALL 0x00128130 MOV R13,RAX ADD RAX,R14 INC RAX CMP RAX,0x200 JA 0x00156965 TEST R13,R13 JZ 0x0015691a XOR EAX,EAX CMP byte ptr [R12 + R13*0x1 + -0x1],0x2f SETZ AL SUB R13,RAX JMP 0x0015691d LAB_0015691a: XOR R13D,R13D LAB_0015691d: INC R14 LEA RDI,[-0x240 + R13*0x1] ADD RDI,RBP CMP RDI,R15 JNC 0x0015693d MOV RSI,R15 MOV RDX,R14 CALL 0x00128610 JMP 0x0015694e LAB_0015693d: ADD RDI,R14 ADD R15,R14 MOV RSI,R15 MOV RDX,R14 CALL 0x00163374 LAB_0015694e: LEA RDI,[RBP + -0x240] MOV ECX,0x205 MOV RSI,R12 MOV RDX,R13 CALL 0x00128290 LAB_00156965: LEA RSI,[RBP + -0x240] MOV EDX,0x1ff MOV RBX,qword ptr [RBP + -0x250] MOV RDI,RBX CALL 0x0018f838 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001569a4 SUB RAX,RBX ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001569a4: CALL 0x001283d0
long unpack_dirname(long param_1) { char *pcVar1; long lVar2; char *__src; passwd *ppVar3; size_t sVar4; char **ppcVar5; char *__dest; long lVar6; char *__n; long in_FS_OFFSET; char acStack_48f [559]; code *pcStack_260; long local_258; char local_249; char local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcStack_260 = (code *)0x156861; local_258 = param_1; lVar2 = normalize_dirname(local_248); if (local_248[0] == '~') { pcVar1 = local_248 + 1; if (local_248[1] == '/') { ppcVar5 = (char **)&home_dir; __src = pcVar1; } else { pcStack_260 = (code *)0x156892; __src = strchr(pcVar1,0x2f); if (__src == (char *)0x0) { pcStack_260 = (code *)0x1568a2; __src = (char *)strend(pcVar1); } local_249 = *__src; *__src = '\0'; pcStack_260 = (code *)0x1568bc; ppVar3 = getpwnam(pcVar1); *__src = local_249; pcStack_260 = (code *)0x1568ce; endpwent(); if (ppVar3 == (passwd *)0x0) goto LAB_00156965; ppcVar5 = &ppVar3->pw_dir; } pcVar1 = *ppcVar5; if (pcVar1 != (char *)0x0) { pcStack_260 = (code *)0x1568f4; sVar4 = strlen(pcVar1); if (local_248 + sVar4 + (lVar2 - (long)__src) + 1 < (char *)0x201) { if (sVar4 == 0) { lVar6 = 0; } else { lVar6 = sVar4 - (pcVar1[sVar4 - 1] == '/'); } __n = local_248 + (lVar2 - (long)__src) + 1; __dest = local_248 + lVar6; if (__dest < __src) { pcStack_260 = (code *)0x15693b; memmove(__dest,__src,(size_t)__n); } else { pcStack_260 = (code *)0x15694e; bmove_upp(__dest + (long)__n,__src + (long)__n,__n); } pcStack_260 = (code *)0x156965; __memmove_chk(local_248,pcVar1,lVar6,0x205); } } } LAB_00156965: lVar2 = local_258; pcStack_260 = (code *)0x156980; lVar6 = strmake(local_258,local_248,0x1ff); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return lVar6 - lVar2; } /* WARNING: Subroutine does not return */ pcStack_260 = system_filename; __stack_chk_fail(); }
25,737
mz_zip_validate_file
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags) { mz_zip_archive_file_stat file_stat; mz_zip_internal_state *pState; const mz_uint8 *pCentral_dir_header; mz_bool found_zip64_ext_data_in_cdir = MZ_FALSE; mz_bool found_zip64_ext_data_in_ldir = MZ_FALSE; mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; mz_uint64 local_header_ofs = 0; mz_uint32 local_header_filename_len, local_header_extra_len, local_header_crc32; mz_uint64 local_header_comp_size, local_header_uncomp_size; mz_uint32 uncomp_crc32 = MZ_CRC32_INIT; mz_bool has_data_descriptor; mz_uint32 local_header_bit_flags; mz_zip_array file_data_array; mz_zip_array_init(&file_data_array, 1); if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (!pZip->m_pRead)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (file_index > pZip->m_total_files) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); pState = pZip->m_pState; pCentral_dir_header = mz_zip_get_cdh(pZip, file_index); if (!mz_zip_file_stat_internal(pZip, file_index, pCentral_dir_header, &file_stat, &found_zip64_ext_data_in_cdir)) return MZ_FALSE; /* A directory or zero length file */ if (file_stat.m_is_directory || (!file_stat.m_uncomp_size)) return MZ_TRUE; /* Encryption and patch files are not supported. */ if (file_stat.m_is_encrypted) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); /* This function only supports stored and deflate. */ if ((file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED)) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); if (!file_stat.m_is_supported) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); /* Read and parse the local directory entry. */ local_header_ofs = file_stat.m_local_header_ofs; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); local_header_filename_len = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS); local_header_extra_len = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); local_header_comp_size = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS); local_header_uncomp_size = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS); local_header_crc32 = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_CRC32_OFS); local_header_bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); has_data_descriptor = (local_header_bit_flags & 8) != 0; if (local_header_filename_len != strlen(file_stat.m_filename)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); if ((local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len + local_header_extra_len + file_stat.m_comp_size) > pZip->m_archive_size) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); if (!mz_zip_array_resize( pZip, &file_data_array, MZ_MAX(local_header_filename_len, local_header_extra_len), MZ_FALSE)) { mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); goto handle_failure; } if (local_header_filename_len) { if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE, file_data_array.m_p, local_header_filename_len) != local_header_filename_len) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } /* I've seen 1 archive that had the same pathname, but used backslashes in * the local dir and forward slashes in the central dir. Do we care about * this? For now, this case will fail validation. */ if (memcmp(file_stat.m_filename, file_data_array.m_p, local_header_filename_len) != 0) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } if ((local_header_extra_len) && ((local_header_comp_size == MZ_UINT32_MAX) || (local_header_uncomp_size == MZ_UINT32_MAX))) { mz_uint32 extra_size_remaining = local_header_extra_len; const mz_uint8 *pExtra_data = (const mz_uint8 *)file_data_array.m_p; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len, file_data_array.m_p, local_header_extra_len) != local_header_extra_len) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } do { mz_uint32 field_id, field_data_size, field_total_size; if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } field_id = MZ_READ_LE16(pExtra_data); field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); field_total_size = field_data_size + sizeof(mz_uint16) * 2; if (field_total_size > extra_size_remaining) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { const mz_uint8 *pSrc_field_data = pExtra_data + sizeof(mz_uint32); if (field_data_size < sizeof(mz_uint64) * 2) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } local_header_uncomp_size = MZ_READ_LE64(pSrc_field_data); local_header_comp_size = MZ_READ_LE64(pSrc_field_data + sizeof(mz_uint64)); found_zip64_ext_data_in_ldir = MZ_TRUE; break; } pExtra_data += field_total_size; extra_size_remaining -= field_total_size; } while (extra_size_remaining); } /* TODO: parse local header extra data when local_header_comp_size is * 0xFFFFFFFF! (big_descriptor.zip) */ /* I've seen zips in the wild with the data descriptor bit set, but proper * local header values and bogus data descriptors */ if ((has_data_descriptor) && (!local_header_comp_size) && (!local_header_crc32)) { mz_uint8 descriptor_buf[32]; mz_bool has_id; const mz_uint8 *pSrc; mz_uint32 file_crc32; mz_uint64 comp_size = 0, uncomp_size = 0; mz_uint32 num_descriptor_uint32s = ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) ? 6 : 4; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len + local_header_extra_len + file_stat.m_comp_size, descriptor_buf, sizeof(mz_uint32) * num_descriptor_uint32s) != (sizeof(mz_uint32) * num_descriptor_uint32s)) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } has_id = (MZ_READ_LE32(descriptor_buf) == MZ_ZIP_DATA_DESCRIPTOR_ID); pSrc = has_id ? (descriptor_buf + sizeof(mz_uint32)) : descriptor_buf; file_crc32 = MZ_READ_LE32(pSrc); if ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) { comp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32)); uncomp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32) + sizeof(mz_uint64)); } else { comp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32)); uncomp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32) + sizeof(mz_uint32)); } if ((file_crc32 != file_stat.m_crc32) || (comp_size != file_stat.m_comp_size) || (uncomp_size != file_stat.m_uncomp_size)) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } else { if ((local_header_crc32 != file_stat.m_crc32) || (local_header_comp_size != file_stat.m_comp_size) || (local_header_uncomp_size != file_stat.m_uncomp_size)) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } mz_zip_array_clear(pZip, &file_data_array); if ((flags & MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY) == 0) { if (!mz_zip_reader_extract_to_callback( pZip, file_index, mz_zip_compute_crc32_callback, &uncomp_crc32, 0)) return MZ_FALSE; /* 1 more check to be sure, although the extract checks too. */ if (uncomp_crc32 != file_stat.m_crc32) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); return MZ_FALSE; } } return MZ_TRUE; handle_failure: mz_zip_array_clear(pZip, &file_data_array); return MZ_FALSE; }
O1
c
mz_zip_validate_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4e8, %rsp # imm = 0x4E8 xorl %ebx, %ebx movl %ebx, 0x3c(%rsp) movl %ebx, 0x24(%rsp) testq %rdi, %rdi je 0x85c31 movq %rdi, %r14 movq 0x68(%rdi), %r12 testq %r12, %r12 je 0x85c24 cmpq $0x0, 0x28(%r14) je 0x85c24 cmpq $0x0, 0x30(%r14) je 0x85c24 cmpq $0x0, 0x48(%r14) je 0x85c24 movl %esi, %ebp movl 0x10(%r14), %eax cmpl %esi, %eax jb 0x85c29 movl %edx, %r15d xorl %ebx, %ebx cmpl %ebp, %eax jbe 0x85c45 movq 0x20(%r12), %rax movl %ebp, %ecx movl (%rax,%rcx,4), %edx addq (%r12), %rdx jmp 0x85c47 testq %r14, %r14 je 0x85c31 movl $0x18, 0x1c(%r14) movl %ebx, %eax addq $0x4e8, %rsp # imm = 0x4E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %edx, %edx leaq 0x90(%rsp), %rcx leaq 0x3c(%rsp), %r8 movq %r14, %rdi movl %ebp, %esi callq 0x8609d testl %eax, %eax je 0x85c31 cmpl $0x0, 0xdc(%rsp) movl $0x1, %ebx jne 0x85c31 cmpq $0x0, 0xc0(%rsp) je 0x85c31 cmpl $0x0, 0xe0(%rsp) je 0x85c90 movl $0x5, 0x1c(%r14) jmp 0x85ca7 movzwl 0xa6(%rsp), %eax testl $0xfff7, %eax # imm = 0xFFF7 je 0x85cab movl $0x4, 0x1c(%r14) xorl %ebx, %ebx jmp 0x85c31 cmpl $0x0, 0xe4(%rsp) je 0x85d66 movq 0xd0(%rsp), %r13 movq 0x60(%r14), %rdi leaq 0x40(%rsp), %rdx movl $0x1e, %ecx movq %r13, %rsi callq *0x48(%r14) cmpq $0x1e, %rax jne 0x85d73 cmpl $0x4034b50, 0x40(%rsp) # imm = 0x4034B50 jne 0x85d59 movzwl 0x5a(%rsp), %eax movq %rax, 0x8(%rsp) movzwl 0x5c(%rsp), %eax movq %rax, 0x18(%rsp) movl 0x52(%rsp), %eax movq %rax, 0x28(%rsp) movl 0x56(%rsp), %eax movq %rax, 0x30(%rsp) movl 0x4e(%rsp), %eax movl %eax, 0x20(%rsp) movzwl 0x46(%rsp), %eax movl %eax, 0x38(%rsp) leaq 0xe8(%rsp), %rdi callq 0xa240 movq 0x8(%rsp), %rsi cmpq %rsi, %rax jne 0x85d59 leaq (%rsi,%r13), %rdx addq $0x1e, %rdx movq 0x18(%rsp), %rdi leaq (%rdx,%rdi), %rcx movq 0xb8(%rsp), %rax addq %rcx, %rax cmpq (%r14), %rax jbe 0x85d80 movl $0x9, 0x1c(%r14) jmp 0x85ca7 movl $0x6, 0x1c(%r14) jmp 0x85ca7 movl $0x14, 0x1c(%r14) jmp 0x85ca7 movq %rdi, %rax movq %rdx, 0x60(%rsp) movq %rcx, 0x68(%rsp) cmpw %ax, %si cmoval %esi, %eax testl %eax, %eax je 0x85db6 movzwl %ax, %ecx movq 0x40(%r14), %rdi movl $0x1, %edx xorl %esi, %esi callq *0x38(%r14) movq %rax, 0x10(%rsp) testq %rax, %rax sete %al jmp 0x85dc1 movq $0x0, 0x10(%rsp) xorl %eax, %eax testb %al, %al je 0x85dd2 movl $0x10, 0x1c(%r14) jmp 0x8608b cmpq $0x0, 0x8(%rsp) je 0x85e27 addq $0x1e, %r13 movq 0x60(%r14), %rdi movq %r13, %rsi movq 0x10(%rsp), %rdx movq 0x8(%rsp), %r13 movq %r13, %rcx callq *0x48(%r14) cmpq %r13, %rax jne 0x85ef2 leaq 0xe8(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0xa600 testl %eax, %eax je 0x85e27 movl $0x1e, 0x1c(%r14) jmp 0x8608b movl $0x0, 0x8(%rsp) cmpl $0x0, 0x18(%rsp) je 0x85f2e cmpl $-0x1, 0x28(%rsp) sete %al cmpl $-0x1, 0x30(%rsp) sete %cl orb %al, %cl cmpb $0x1, %cl jne 0x85f2e movq 0x60(%r14), %rdi movq 0x60(%rsp), %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %r13 movq %r13, %rcx callq *0x48(%r14) cmpq %r13, %rax jne 0x85eff movl $0x0, 0x8(%rsp) movq 0x10(%rsp), %rax cmpl $0x3, 0x18(%rsp) jbe 0x85e9d movzwl 0x2(%rax), %ecx leaq 0x4(%rcx), %rsi movq 0x18(%rsp), %rdx subl %esi, %edx jae 0x85eb9 movl $0x9, 0x1c(%r14) movl $0x2, %ecx xorl %edx, %edx testl %ecx, %ecx jne 0x85f16 cmpl $0x0, 0x18(%rsp) jne 0x85e85 jmp 0x85f1d cmpw $0x1, (%rax) jne 0x85ee6 cmpw $0xf, %cx jbe 0x85e9d movq 0x4(%rax), %rcx movq %rcx, 0x30(%rsp) movq 0xc(%rax), %rcx movq %rcx, 0x28(%rsp) movl $0x1, 0x8(%rsp) movl $0x3, %ecx jmp 0x85eaa addq %rsi, %rax xorl %ecx, %ecx movq %rdx, 0x18(%rsp) jmp 0x85eaa movl $0x14, 0x1c(%r14) jmp 0x8608b movl $0x14, 0x1c(%r14) movl $0x0, 0x8(%rsp) movl $0x2, %edx jmp 0x85f1d cmpl $0x3, %ecx je 0x85f1d movl %ecx, %edx cmpl $0x2, %edx je 0x8608b testl %edx, %edx jne 0x85c31 testb $0x8, 0x38(%rsp) sete %al cmpq $0x0, 0x28(%rsp) setne %cl cmpl $0x0, 0x20(%rsp) setne %dl orb %cl, %dl orb %al, %dl je 0x85f89 movl 0x20(%rsp), %eax cmpl 0xb0(%rsp), %eax jne 0x85e1a movq 0x28(%rsp), %rax cmpq 0xb8(%rsp), %rax jne 0x85e1a movq 0x30(%rsp), %rax cmpq 0xc0(%rsp), %rax je 0x86030 jmp 0x85e1a xorl %eax, %eax movl 0x64(%r12), %ecx orl 0x8(%rsp), %ecx setne %al movq 0x60(%r14), %rdi movq 0x68(%rsp), %rsi addq 0xb8(%rsp), %rsi leaq 0x10(,%rax,8), %r13 leaq 0x70(%rsp), %rdx movq %r13, %rcx callq *0x48(%r14) movl $0x14, %esi cmpq %r13, %rax jne 0x86087 movl 0x70(%rsp), %esi movl 0x74(%rsp), %eax xorl %edx, %edx cmpl $0x8074b50, %esi # imm = 0x8074B50 movl %esi, %ecx cmovel %eax, %ecx cmovel 0x78(%rsp), %eax sete %dl movl 0x78(%rsp,%rdx,4), %edx movl 0x8(%rsp), %edi orl 0x64(%r12), %edi je 0x8600e xorl %edi, %edi cmpl $0x8074b50, %esi # imm = 0x8074B50 sete %dil shlq $0x20, %rdx orq %rdx, %rax movq 0x7c(%rsp,%rdi,4), %rdx movl $0x1e, %esi cmpl 0xb0(%rsp), %ecx jne 0x86087 cmpq 0xb8(%rsp), %rax jne 0x86087 cmpq 0xc0(%rsp), %rdx jne 0x86087 movq 0x40(%r14), %rdi movq 0x10(%rsp), %rsi callq *0x30(%r14) btl $0xd, %r15d jb 0x85c31 leaq 0x335(%rip), %rdx # 0x86384 leaq 0x24(%rsp), %rcx movq %r14, %rdi movl %ebp, %esi xorl %r8d, %r8d callq 0x84e07 testl %eax, %eax je 0x85ca7 movl 0x24(%rsp), %eax cmpl 0xb0(%rsp), %eax je 0x85c31 movl $0x1e, 0x1c(%r14) jmp 0x85ca7 movl %esi, 0x1c(%r14) movq 0x40(%r14), %rdi movq 0x10(%rsp), %rsi callq *0x30(%r14) jmp 0x85ca7
mz_zip_validate_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 4E8h xor ebx, ebx mov [rsp+518h+var_4DC], ebx mov [rsp+518h+var_4F4], ebx test rdi, rdi jz short loc_85C31 mov r14, rdi mov r12, [rdi+68h] test r12, r12 jz short loc_85C24 cmp qword ptr [r14+28h], 0 jz short loc_85C24 cmp qword ptr [r14+30h], 0 jz short loc_85C24 cmp qword ptr [r14+48h], 0 jz short loc_85C24 mov ebp, esi mov eax, [r14+10h] cmp eax, esi jb short loc_85C29 mov r15d, edx xor ebx, ebx cmp eax, ebp jbe short loc_85C45 mov rax, [r12+20h] mov ecx, ebp mov edx, [rax+rcx*4] add rdx, [r12] jmp short loc_85C47 loc_85C24: test r14, r14 jz short loc_85C31 loc_85C29: mov dword ptr [r14+1Ch], 18h loc_85C31: mov eax, ebx add rsp, 4E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_85C45: xor edx, edx loc_85C47: lea rcx, [rsp+518h+var_488] lea r8, [rsp+518h+var_4DC] mov rdi, r14 mov esi, ebp call mz_zip_file_stat_internal test eax, eax jz short loc_85C31 cmp [rsp+518h+var_43C], 0 mov ebx, 1 jnz short loc_85C31 cmp [rsp+518h+var_458], 0 jz short loc_85C31 cmp [rsp+518h+var_438], 0 jz short loc_85C90 mov dword ptr [r14+1Ch], 5 jmp short loc_85CA7 loc_85C90: movzx eax, [rsp+518h+var_472] test eax, 0FFF7h jz short loc_85CAB mov dword ptr [r14+1Ch], 4 loc_85CA7: xor ebx, ebx jmp short loc_85C31 loc_85CAB: cmp [rsp+518h+var_434], 0 jz loc_85D66 mov r13, [rsp+518h+var_448] mov rdi, [r14+60h] lea rdx, [rsp+518h+var_4D8] mov ecx, 1Eh mov rsi, r13 call qword ptr [r14+48h] cmp rax, 1Eh jnz loc_85D73 cmp [rsp+518h+var_4D8], 4034B50h jnz short loc_85D59 movzx eax, [rsp+518h+var_4BE] mov [rsp+518h+var_510], rax movzx eax, [rsp+518h+var_4BC] mov [rsp+518h+var_500], rax mov eax, [rsp+518h+var_4C6] mov [rsp+518h+var_4F0], rax mov eax, [rsp+518h+var_4C2] mov [rsp+518h+var_4E8], rax mov eax, [rsp+518h+var_4CA] mov [rsp+518h+var_4F8], eax movzx eax, [rsp+518h+var_4D2] mov [rsp+518h+var_4E0], eax lea rdi, [rsp+518h+var_430] call _strlen mov rsi, [rsp+518h+var_510] cmp rax, rsi jnz short loc_85D59 lea rdx, [rsi+r13] add rdx, 1Eh mov rdi, [rsp+518h+var_500] lea rcx, [rdx+rdi] mov rax, [rsp+518h+var_460] add rax, rcx cmp rax, [r14] jbe short loc_85D80 loc_85D59: mov dword ptr [r14+1Ch], 9 jmp loc_85CA7 loc_85D66: mov dword ptr [r14+1Ch], 6 jmp loc_85CA7 loc_85D73: mov dword ptr [r14+1Ch], 14h jmp loc_85CA7 loc_85D80: mov rax, rdi mov [rsp+518h+var_4B8], rdx mov [rsp+518h+var_4B0], rcx cmp si, ax cmova eax, esi test eax, eax jz short loc_85DB6 movzx ecx, ax mov rdi, [r14+40h] mov edx, 1 xor esi, esi call qword ptr [r14+38h] mov [rsp+518h+var_508], rax test rax, rax setz al jmp short loc_85DC1 loc_85DB6: mov [rsp+518h+var_508], 0 xor eax, eax loc_85DC1: test al, al jz short loc_85DD2 mov dword ptr [r14+1Ch], 10h jmp loc_8608B loc_85DD2: cmp [rsp+518h+var_510], 0 jz short loc_85E27 add r13, 1Eh mov rdi, [r14+60h] mov rsi, r13 mov rdx, [rsp+518h+var_508] mov r13, [rsp+518h+var_510] mov rcx, r13 call qword ptr [r14+48h] cmp rax, r13 jnz loc_85EF2 lea rdi, [rsp+518h+var_430] mov rsi, [rsp+518h+var_508] mov rdx, [rsp+518h+var_510] call _bcmp test eax, eax jz short loc_85E27 loc_85E1A: mov dword ptr [r14+1Ch], 1Eh jmp loc_8608B loc_85E27: mov dword ptr [rsp+518h+var_510], 0 cmp dword ptr [rsp+518h+var_500], 0 jz loc_85F2E cmp dword ptr [rsp+518h+var_4F0], 0FFFFFFFFh setz al cmp dword ptr [rsp+518h+var_4E8], 0FFFFFFFFh setz cl or cl, al cmp cl, 1 jnz loc_85F2E mov rdi, [r14+60h] mov rsi, [rsp+518h+var_4B8] mov rdx, [rsp+518h+var_508] mov r13, [rsp+518h+var_500] mov rcx, r13 call qword ptr [r14+48h] cmp rax, r13 jnz loc_85EFF mov dword ptr [rsp+518h+var_510], 0 mov rax, [rsp+518h+var_508] loc_85E85: cmp dword ptr [rsp+518h+var_500], 3 jbe short loc_85E9D movzx ecx, word ptr [rax+2] lea rsi, [rcx+4] mov rdx, [rsp+518h+var_500] sub edx, esi jnb short loc_85EB9 loc_85E9D: mov dword ptr [r14+1Ch], 9 mov ecx, 2 loc_85EAA: xor edx, edx test ecx, ecx jnz short loc_85F16 cmp dword ptr [rsp+518h+var_500], 0 jnz short loc_85E85 jmp short loc_85F1D loc_85EB9: cmp word ptr [rax], 1 jnz short loc_85EE6 cmp cx, 0Fh jbe short loc_85E9D mov rcx, [rax+4] mov [rsp+518h+var_4E8], rcx mov rcx, [rax+0Ch] mov [rsp+518h+var_4F0], rcx mov dword ptr [rsp+518h+var_510], 1 mov ecx, 3 jmp short loc_85EAA loc_85EE6: add rax, rsi xor ecx, ecx mov [rsp+518h+var_500], rdx jmp short loc_85EAA loc_85EF2: mov dword ptr [r14+1Ch], 14h jmp loc_8608B loc_85EFF: mov dword ptr [r14+1Ch], 14h mov dword ptr [rsp+518h+var_510], 0 mov edx, 2 jmp short loc_85F1D loc_85F16: cmp ecx, 3 jz short loc_85F1D mov edx, ecx loc_85F1D: cmp edx, 2 jz loc_8608B test edx, edx jnz loc_85C31 loc_85F2E: test byte ptr [rsp+518h+var_4E0], 8 setz al cmp [rsp+518h+var_4F0], 0 setnz cl cmp [rsp+518h+var_4F8], 0 setnz dl or dl, cl or dl, al jz short loc_85F89 mov eax, [rsp+518h+var_4F8] cmp eax, [rsp+518h+var_468] jnz loc_85E1A mov rax, [rsp+518h+var_4F0] cmp rax, [rsp+518h+var_460] jnz loc_85E1A mov rax, [rsp+518h+var_4E8] cmp rax, [rsp+518h+var_458] jz loc_86030 jmp loc_85E1A loc_85F89: xor eax, eax mov ecx, [r12+64h] or ecx, dword ptr [rsp+518h+var_510] setnz al mov rdi, [r14+60h] mov rsi, [rsp+518h+var_4B0] add rsi, [rsp+518h+var_460] lea r13, ds:10h[rax*8] lea rdx, [rsp+518h+var_4A8] mov rcx, r13 call qword ptr [r14+48h] mov esi, 14h cmp rax, r13 jnz loc_86087 mov esi, [rsp+518h+var_4A8] mov eax, [rsp+518h+var_4A4] xor edx, edx cmp esi, 8074B50h mov ecx, esi cmovz ecx, eax cmovz eax, [rsp+518h+var_4A0] setz dl mov edx, [rsp+rdx*4+518h+var_4A0] mov edi, dword ptr [rsp+518h+var_510] or edi, [r12+64h] jz short loc_8600E xor edi, edi cmp esi, 8074B50h setz dil shl rdx, 20h or rax, rdx mov rdx, [rsp+rdi*4+518h+var_49C] loc_8600E: mov esi, 1Eh cmp ecx, [rsp+518h+var_468] jnz short loc_86087 cmp rax, [rsp+518h+var_460] jnz short loc_86087 cmp rdx, [rsp+518h+var_458] jnz short loc_86087 loc_86030: mov rdi, [r14+40h] mov rsi, [rsp+518h+var_508] call qword ptr [r14+30h] bt r15d, 0Dh jb loc_85C31 lea rdx, mz_zip_compute_crc32_callback lea rcx, [rsp+518h+var_4F4] mov rdi, r14 mov esi, ebp xor r8d, r8d call mz_zip_reader_extract_to_callback test eax, eax jz loc_85CA7 mov eax, [rsp+518h+var_4F4] cmp eax, [rsp+518h+var_468] jz loc_85C31 mov dword ptr [r14+1Ch], 1Eh jmp loc_85CA7 loc_86087: mov [r14+1Ch], esi loc_8608B: mov rdi, [r14+40h] mov rsi, [rsp+518h+var_508] call qword ptr [r14+30h] jmp loc_85CA7
long long mz_zip_validate_file(long long a1, unsigned int a2, __int16 a3) { unsigned int v3; // ebx long long v4; // r12 unsigned int v6; // eax long long v8; // rdx long long v10; // r13 long long v11; // rdx int v12; // eax bool v13; // al long long v14; // rax long long v15; // rcx int v16; // edx int v17; // ecx int v18; // edx long long v19; // r13 int v20; // esi long long v21; // rax long long v22; // rdx unsigned int v23; // ecx long long v24; // rdx long long v25; // [rsp+8h] [rbp-510h] int v26; // [rsp+8h] [rbp-510h] long long v27; // [rsp+10h] [rbp-508h] long long v28; // [rsp+18h] [rbp-500h] int v29; // [rsp+20h] [rbp-4F8h] int v30; // [rsp+24h] [rbp-4F4h] BYREF long long v31; // [rsp+28h] [rbp-4F0h] long long v32; // [rsp+30h] [rbp-4E8h] int v33; // [rsp+38h] [rbp-4E0h] int v34; // [rsp+3Ch] [rbp-4DCh] BYREF int v35; // [rsp+40h] [rbp-4D8h] BYREF unsigned __int16 v36; // [rsp+46h] [rbp-4D2h] int v37; // [rsp+4Eh] [rbp-4CAh] unsigned int v38; // [rsp+52h] [rbp-4C6h] unsigned int v39; // [rsp+56h] [rbp-4C2h] unsigned __int16 v40; // [rsp+5Ah] [rbp-4BEh] unsigned __int16 v41; // [rsp+5Ch] [rbp-4BCh] long long v42; // [rsp+60h] [rbp-4B8h] long long v43; // [rsp+68h] [rbp-4B0h] unsigned int v44; // [rsp+70h] [rbp-4A8h] BYREF unsigned int v45; // [rsp+74h] [rbp-4A4h] _DWORD v46[6]; // [rsp+78h] [rbp-4A0h] _BYTE v47[22]; // [rsp+90h] [rbp-488h] BYREF __int16 v48; // [rsp+A6h] [rbp-472h] int v49; // [rsp+B0h] [rbp-468h] long long v50; // [rsp+B8h] [rbp-460h] long long v51; // [rsp+C0h] [rbp-458h] long long v52; // [rsp+D0h] [rbp-448h] int v53; // [rsp+DCh] [rbp-43Ch] int v54; // [rsp+E0h] [rbp-438h] int v55; // [rsp+E4h] [rbp-434h] _BYTE v56[1072]; // [rsp+E8h] [rbp-430h] BYREF v3 = 0; v34 = 0; v30 = 0; if ( !a1 ) return v3; v4 = *(_QWORD *)(a1 + 104); if ( !v4 || !*(_QWORD *)(a1 + 40) || !*(_QWORD *)(a1 + 48) || !*(_QWORD *)(a1 + 72) || (v6 = *(_DWORD *)(a1 + 16), v6 < a2) ) { *(_DWORD *)(a1 + 28) = 24; return v3; } v3 = 0; v8 = v6 <= a2 ? 0LL : *(_QWORD *)v4 + *(unsigned int *)(*(_QWORD *)(v4 + 32) + 4LL * a2); if ( !(unsigned int)mz_zip_file_stat_internal(a1, a2, v8, v47, &v34) ) return v3; v3 = 1; if ( v53 || !v51 ) return v3; if ( v54 ) { *(_DWORD *)(a1 + 28) = 5; return 0; } if ( (v48 & 0xFFF7) != 0 ) { *(_DWORD *)(a1 + 28) = 4; return 0; } if ( !v55 ) { *(_DWORD *)(a1 + 28) = 6; return 0; } v10 = v52; if ( (*(long long ( **)(_QWORD, long long, int *, long long))(a1 + 72))(*(_QWORD *)(a1 + 96), v52, &v35, 30LL) != 30 ) { *(_DWORD *)(a1 + 28) = 20; return 0; } if ( v35 != 67324752 || (v25 = v40, v28 = v41, v31 = v38, v32 = v39, v29 = v37, v33 = v36, strlen(v56) != v25) || (v11 = v25 + v10 + 30, (unsigned long long)(v11 + v28 + v50) > *(_QWORD *)a1) ) { *(_DWORD *)(a1 + 28) = 9; return 0; } v12 = v28; v42 = v25 + v10 + 30; v43 = v11 + v28; if ( (unsigned __int16)v25 > (unsigned __int16)v28 ) v12 = v25; if ( v12 ) { v27 = (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD))(a1 + 56))( *(_QWORD *)(a1 + 64), 0LL, 1LL, (unsigned __int16)v12); v13 = v27 == 0; } else { v27 = 0LL; v13 = 0; } if ( v13 ) { *(_DWORD *)(a1 + 28) = 16; goto LABEL_76; } if ( v25 ) { if ( (*(long long ( **)(_QWORD, long long, long long, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v10 + 30, v27, v25) != v25 ) { *(_DWORD *)(a1 + 28) = 20; goto LABEL_76; } if ( (unsigned int)bcmp(v56, v27) ) goto LABEL_38; } v26 = 0; if ( !(_DWORD)v28 || (_DWORD)v31 != -1 && (_DWORD)v32 != -1 ) goto LABEL_58; if ( (*(long long ( **)(_QWORD, long long, long long, long long))(a1 + 72))(*(_QWORD *)(a1 + 96), v42, v27, v28) != v28 ) { *(_DWORD *)(a1 + 28) = 20; v26 = 0; v18 = 2; goto LABEL_57; } v26 = 0; v14 = v27; while ( 1 ) { if ( (unsigned int)v28 <= 3 || (v15 = *(unsigned __int16 *)(v14 + 2), v16 = v28 - (v15 + 4), (unsigned int)v28 < (int)v15 + 4) ) { LABEL_45: *(_DWORD *)(a1 + 28) = 9; v17 = 2; goto LABEL_46; } if ( *(_WORD *)v14 == 1 ) { if ( (unsigned __int16)v15 <= 0xFu ) goto LABEL_45; v32 = *(_QWORD *)(v14 + 4); v31 = *(_QWORD *)(v14 + 12); v26 = 1; v17 = 3; } else { v14 += v15 + 4; v17 = 0; LODWORD(v28) = v16; } LABEL_46: v18 = 0; if ( v17 ) break; if ( !(_DWORD)v28 ) goto LABEL_57; } if ( v17 != 3 ) v18 = v17; LABEL_57: if ( v18 != 2 ) { LABEL_58: if ( (v33 & 8) == 0 || v31 != 0 || v29 != 0 ) { if ( v29 != v49 || v31 != v50 || v32 != v51 ) { LABEL_38: *(_DWORD *)(a1 + 28) = 30; goto LABEL_76; } LABEL_71: (*(void ( **)(_QWORD, long long))(a1 + 48))(*(_QWORD *)(a1 + 64), v27); if ( (a3 & 0x2000) == 0 ) { if ( !(unsigned int)mz_zip_reader_extract_to_callback( a1, a2, (long long ( *)(long long, unsigned long long, _BYTE *, unsigned long long))mz_zip_compute_crc32_callback, (long long)&v30, 0) ) return 0; if ( v30 != v49 ) { *(_DWORD *)(a1 + 28) = 30; return 0; } } return v3; } v19 = 8LL * ((v26 | *(_DWORD *)(v4 + 100)) != 0) + 16; v20 = 20; if ( (*(long long ( **)(_QWORD, long long, unsigned int *, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v50 + v43, &v44, v19) == v19 ) { v21 = v45; v22 = 0LL; v23 = v44; if ( v44 == 134695760 ) { v23 = v45; v21 = v46[0]; } LOBYTE(v22) = v44 == 134695760; v24 = (unsigned int)v46[v22]; if ( *(_DWORD *)(v4 + 100) | v26 ) { v21 |= v24 << 32; v24 = *(_QWORD *)&v46[(v44 == 134695760) + 1]; } v20 = 30; if ( v23 == v49 && v21 == v50 && v24 == v51 ) goto LABEL_71; } *(_DWORD *)(a1 + 28) = v20; } LABEL_76: (*(void ( **)(_QWORD, long long))(a1 + 48))(*(_QWORD *)(a1 + 64), v27); return 0; }
25,738
mz_zip_validate_file
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags) { mz_zip_archive_file_stat file_stat; mz_zip_internal_state *pState; const mz_uint8 *pCentral_dir_header; mz_bool found_zip64_ext_data_in_cdir = MZ_FALSE; mz_bool found_zip64_ext_data_in_ldir = MZ_FALSE; mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; mz_uint64 local_header_ofs = 0; mz_uint32 local_header_filename_len, local_header_extra_len, local_header_crc32; mz_uint64 local_header_comp_size, local_header_uncomp_size; mz_uint32 uncomp_crc32 = MZ_CRC32_INIT; mz_bool has_data_descriptor; mz_uint32 local_header_bit_flags; mz_zip_array file_data_array; mz_zip_array_init(&file_data_array, 1); if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (!pZip->m_pRead)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (file_index > pZip->m_total_files) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); pState = pZip->m_pState; pCentral_dir_header = mz_zip_get_cdh(pZip, file_index); if (!mz_zip_file_stat_internal(pZip, file_index, pCentral_dir_header, &file_stat, &found_zip64_ext_data_in_cdir)) return MZ_FALSE; /* A directory or zero length file */ if (file_stat.m_is_directory || (!file_stat.m_uncomp_size)) return MZ_TRUE; /* Encryption and patch files are not supported. */ if (file_stat.m_is_encrypted) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); /* This function only supports stored and deflate. */ if ((file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED)) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); if (!file_stat.m_is_supported) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); /* Read and parse the local directory entry. */ local_header_ofs = file_stat.m_local_header_ofs; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); local_header_filename_len = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS); local_header_extra_len = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); local_header_comp_size = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS); local_header_uncomp_size = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS); local_header_crc32 = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_CRC32_OFS); local_header_bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); has_data_descriptor = (local_header_bit_flags & 8) != 0; if (local_header_filename_len != strlen(file_stat.m_filename)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); if ((local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len + local_header_extra_len + file_stat.m_comp_size) > pZip->m_archive_size) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); if (!mz_zip_array_resize( pZip, &file_data_array, MZ_MAX(local_header_filename_len, local_header_extra_len), MZ_FALSE)) { mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); goto handle_failure; } if (local_header_filename_len) { if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE, file_data_array.m_p, local_header_filename_len) != local_header_filename_len) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } /* I've seen 1 archive that had the same pathname, but used backslashes in * the local dir and forward slashes in the central dir. Do we care about * this? For now, this case will fail validation. */ if (memcmp(file_stat.m_filename, file_data_array.m_p, local_header_filename_len) != 0) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } if ((local_header_extra_len) && ((local_header_comp_size == MZ_UINT32_MAX) || (local_header_uncomp_size == MZ_UINT32_MAX))) { mz_uint32 extra_size_remaining = local_header_extra_len; const mz_uint8 *pExtra_data = (const mz_uint8 *)file_data_array.m_p; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len, file_data_array.m_p, local_header_extra_len) != local_header_extra_len) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } do { mz_uint32 field_id, field_data_size, field_total_size; if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } field_id = MZ_READ_LE16(pExtra_data); field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); field_total_size = field_data_size + sizeof(mz_uint16) * 2; if (field_total_size > extra_size_remaining) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { const mz_uint8 *pSrc_field_data = pExtra_data + sizeof(mz_uint32); if (field_data_size < sizeof(mz_uint64) * 2) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } local_header_uncomp_size = MZ_READ_LE64(pSrc_field_data); local_header_comp_size = MZ_READ_LE64(pSrc_field_data + sizeof(mz_uint64)); found_zip64_ext_data_in_ldir = MZ_TRUE; break; } pExtra_data += field_total_size; extra_size_remaining -= field_total_size; } while (extra_size_remaining); } /* TODO: parse local header extra data when local_header_comp_size is * 0xFFFFFFFF! (big_descriptor.zip) */ /* I've seen zips in the wild with the data descriptor bit set, but proper * local header values and bogus data descriptors */ if ((has_data_descriptor) && (!local_header_comp_size) && (!local_header_crc32)) { mz_uint8 descriptor_buf[32]; mz_bool has_id; const mz_uint8 *pSrc; mz_uint32 file_crc32; mz_uint64 comp_size = 0, uncomp_size = 0; mz_uint32 num_descriptor_uint32s = ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) ? 6 : 4; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len + local_header_extra_len + file_stat.m_comp_size, descriptor_buf, sizeof(mz_uint32) * num_descriptor_uint32s) != (sizeof(mz_uint32) * num_descriptor_uint32s)) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } has_id = (MZ_READ_LE32(descriptor_buf) == MZ_ZIP_DATA_DESCRIPTOR_ID); pSrc = has_id ? (descriptor_buf + sizeof(mz_uint32)) : descriptor_buf; file_crc32 = MZ_READ_LE32(pSrc); if ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) { comp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32)); uncomp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32) + sizeof(mz_uint64)); } else { comp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32)); uncomp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32) + sizeof(mz_uint32)); } if ((file_crc32 != file_stat.m_crc32) || (comp_size != file_stat.m_comp_size) || (uncomp_size != file_stat.m_uncomp_size)) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } else { if ((local_header_crc32 != file_stat.m_crc32) || (local_header_comp_size != file_stat.m_comp_size) || (local_header_uncomp_size != file_stat.m_uncomp_size)) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } mz_zip_array_clear(pZip, &file_data_array); if ((flags & MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY) == 0) { if (!mz_zip_reader_extract_to_callback( pZip, file_index, mz_zip_compute_crc32_callback, &uncomp_crc32, 0)) return MZ_FALSE; /* 1 more check to be sure, although the extract checks too. */ if (uncomp_crc32 != file_stat.m_crc32) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); return MZ_FALSE; } } return MZ_TRUE; handle_failure: mz_zip_array_clear(pZip, &file_data_array); return MZ_FALSE; }
O2
c
mz_zip_validate_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x508, %rsp # imm = 0x508 andl $0x0, 0x3c(%rsp) andl $0x0, 0x24(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movl $0x1, 0x78(%rsp) xorl %ebx, %ebx testq %rdi, %rdi je 0x60291 movq %rdi, %r14 movq 0x68(%rdi), %r12 testq %r12, %r12 je 0x60289 cmpq $0x0, 0x28(%r14) je 0x60289 cmpq $0x0, 0x30(%r14) je 0x60289 cmpq $0x0, 0x48(%r14) je 0x60289 movl %esi, %ebp movl 0x10(%r14), %eax cmpl %esi, %eax jae 0x602a5 movl $0x18, 0x1c(%r14) movl %ebx, %eax addq $0x508, %rsp # imm = 0x508 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %edx, %r15d xorl %ebx, %ebx cmpl %ebp, %eax jbe 0x602be movq 0x20(%r12), %rax movl %ebp, %ecx movl (%rax,%rcx,4), %edx addq (%r12), %rdx jmp 0x602c0 xorl %edx, %edx leaq 0xb0(%rsp), %rcx leaq 0x3c(%rsp), %r8 movq %r14, %rdi movl %ebp, %esi callq 0x60733 testl %eax, %eax je 0x60291 cmpl $0x0, 0xfc(%rsp) pushq $0x1 popq %r13 jne 0x606e0 cmpq $0x0, 0xe0(%rsp) je 0x606e0 cmpl $0x0, 0x100(%rsp) je 0x60310 movl $0x5, 0x1c(%r14) jmp 0x60291 movzwl 0xc6(%rsp), %eax testw $0xfff7, %ax # imm = 0xFFF7 je 0x6032b movl $0x4, 0x1c(%r14) jmp 0x60291 cmpl $0x0, 0x104(%rsp) je 0x60407 movq 0xf0(%rsp), %rsi movq 0x60(%r14), %rdi leaq 0x80(%rsp), %rdx pushq $0x1e popq %rcx movq %rsi, 0x8(%rsp) callq *0x48(%r14) cmpq $0x1e, %rax jne 0x60414 cmpl $0x4034b50, 0x80(%rsp) # imm = 0x4034B50 jne 0x603fa movzwl 0x9a(%rsp), %eax movq %rax, 0x18(%rsp) movzwl 0x9c(%rsp), %eax movq %rax, 0x10(%rsp) movl 0x92(%rsp), %eax movq %rax, 0x28(%rsp) movl 0x96(%rsp), %eax movq %rax, 0x30(%rsp) movl 0x8e(%rsp), %eax movl %eax, 0x20(%rsp) movzwl 0x86(%rsp), %eax movl %eax, 0x38(%rsp) leaq 0x108(%rsp), %rdi callq 0xa220 movq 0x18(%rsp), %rsi cmpq %rsi, %rax jne 0x603fa movq 0x8(%rsp), %rax leaq (%rax,%rsi), %rdx addq $0x1e, %rdx movq 0x10(%rsp), %rdi leaq (%rdx,%rdi), %rcx movq 0xd8(%rsp), %rax addq %rcx, %rax cmpq (%r14), %rax jbe 0x60421 movl $0x9, 0x1c(%r14) jmp 0x60291 movl $0x6, 0x1c(%r14) jmp 0x60291 movl $0x14, 0x1c(%r14) jmp 0x60291 movq %rdi, %rax movq %rdx, 0xa0(%rsp) movq %rcx, 0xa8(%rsp) cmpw %ax, %si cmoval %esi, %eax testl %eax, %eax je 0x60458 movzwl %ax, %edx leaq 0x60(%rsp), %rsi movq %r14, %rdi xorl %ecx, %ecx callq 0x674f1 testl %eax, %eax je 0x605b3 cmpq $0x0, 0x18(%rsp) je 0x604b3 movq 0x8(%rsp), %rsi addq $0x1e, %rsi movq 0x60(%r14), %rdi movq 0x60(%rsp), %rdx movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rcx callq *0x48(%r14) cmpq 0x18(%rsp), %rax jne 0x605a6 leaq 0x108(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0xa620 testl %eax, %eax je 0x604b3 movl $0x1e, 0x1c(%r14) jmp 0x606ff cmpl $0x0, 0x10(%rsp) je 0x60543 cmpl $-0x1, 0x28(%rsp) sete %al cmpl $-0x1, 0x30(%rsp) sete %cl orb %al, %cl cmpb $0x1, %cl jne 0x60543 movq 0x60(%rsp), %rdx movq 0x60(%r14), %rdi movq 0xa0(%rsp), %rsi movq %rdx, 0x8(%rsp) movq 0x10(%rsp), %rcx callq *0x48(%r14) cmpq 0x10(%rsp), %rax jne 0x605a6 cmpl $0x3, 0x10(%rsp) jbe 0x606f7 movq 0x8(%rsp), %rax movzwl 0x2(%rax), %ecx leaq 0x4(%rcx), %rax cmpl %eax, 0x10(%rsp) jb 0x606f7 movq 0x8(%rsp), %rdx cmpw $0x1, (%rdx) je 0x606f1 addq %rax, 0x8(%rsp) movq 0x10(%rsp), %rcx subl %eax, %ecx movq %rcx, 0x10(%rsp) jne 0x604ff movl $0x0, 0x8(%rsp) testb $0x8, 0x38(%rsp) sete %al cmpq $0x0, 0x28(%rsp) setne %cl cmpl $0x0, 0x20(%rsp) setne %dl orb %cl, %dl orb %al, %dl je 0x605c0 movl 0x20(%rsp), %eax cmpl 0xd0(%rsp), %eax jne 0x604a6 movq 0x28(%rsp), %rax cmpq 0xd8(%rsp), %rax jne 0x604a6 movq 0x30(%rsp), %rax cmpq 0xe0(%rsp), %rax je 0x60686 jmp 0x604a6 movl $0x14, 0x1c(%r14) jmp 0x606ff movl $0x10, 0x1c(%r14) jmp 0x606ff xorl %eax, %eax cmpl $0x0, 0x64(%r12) setne %al movq 0x60(%r14), %rdi movq 0xa8(%rsp), %rsi addq 0xd8(%rsp), %rsi leaq 0x10(,%rax,8), %rax cmpb $0x0, 0x8(%rsp) pushq $0x18 popq %rcx cmoveq %rax, %rcx movq %rcx, 0x18(%rsp) leaq 0x40(%rsp), %rdx callq *0x48(%r14) cmpq 0x18(%rsp), %rax jne 0x606e8 movl 0x40(%rsp), %esi movl 0x44(%rsp), %eax cmpl $0x0, 0x64(%r12) sete %dil cmpl $0x8074b50, %esi # imm = 0x8074B50 movl %esi, %ecx cmovel %eax, %ecx movl 0x8(%rsp), %r8d notb %r8b movl 0x48(%rsp), %edx cmovel %edx, %eax cmovel 0x4c(%rsp), %edx testb %dil, %r8b jne 0x60666 shlq $0x20, %rdx orq %rdx, %rax cmpl $0x8074b50, %esi # imm = 0x8074B50 movl 0x50(%rsp), %edx movl 0x4c(%rsp), %esi cmovel %edx, %esi cmovel 0x54(%rsp), %edx shlq $0x20, %rdx orq %rsi, %rdx pushq $0x1e popq %rsi cmpl 0xd0(%rsp), %ecx jne 0x606eb cmpq 0xd8(%rsp), %rax jne 0x606eb cmpq 0xe0(%rsp), %rdx jne 0x606eb movq 0x40(%r14), %rdi movq 0x60(%rsp), %rsi callq *0x30(%r14) btl $0xd, %r15d jb 0x606e0 leaq 0x35c(%rip), %rdx # 0x609fd leaq 0x24(%rsp), %rcx xorl %ebx, %ebx movq %r14, %rdi movl %ebp, %esi xorl %r8d, %r8d callq 0x5f4ce testl %eax, %eax je 0x60291 movl 0x24(%rsp), %eax movl %r13d, %ebx cmpl 0xd0(%rsp), %eax je 0x60291 movl $0x1e, 0x1c(%r14) xorl %ebx, %ebx jmp 0x60291 movl %r13d, %ebx jmp 0x60291 pushq $0x14 popq %rsi movl %esi, 0x1c(%r14) jmp 0x606ff cmpw $0xf, %cx ja 0x60711 movl $0x9, 0x1c(%r14) movq 0x40(%r14), %rdi movq 0x60(%rsp), %rsi callq *0x30(%r14) jmp 0x60291 movq 0x8(%rsp), %rcx movq 0x4(%rcx), %rax movq %rax, 0x30(%rsp) movq 0xc(%rcx), %rax movq %rax, 0x28(%rsp) movb $0x1, %al movl %eax, 0x8(%rsp) jmp 0x6054b
mz_zip_validate_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 508h and [rsp+538h+var_4FC], 0 and [rsp+538h+var_514], 0 xorps xmm0, xmm0 movaps [rsp+538h+var_4C8], xmm0 movaps [rsp+538h+var_4D8], xmm0 mov dword ptr [rsp+538h+var_4C8+8], 1 xor ebx, ebx test rdi, rdi jz short loc_60291 mov r14, rdi mov r12, [rdi+68h] test r12, r12 jz short loc_60289 cmp qword ptr [r14+28h], 0 jz short loc_60289 cmp qword ptr [r14+30h], 0 jz short loc_60289 cmp qword ptr [r14+48h], 0 jz short loc_60289 mov ebp, esi mov eax, [r14+10h] cmp eax, esi jnb short loc_602A5 loc_60289: mov dword ptr [r14+1Ch], 18h loc_60291: mov eax, ebx add rsp, 508h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_602A5: mov r15d, edx xor ebx, ebx cmp eax, ebp jbe short loc_602BE mov rax, [r12+20h] mov ecx, ebp mov edx, [rax+rcx*4] add rdx, [r12] jmp short loc_602C0 loc_602BE: xor edx, edx loc_602C0: lea rcx, [rsp+538h+var_488] lea r8, [rsp+538h+var_4FC] mov rdi, r14 mov esi, ebp call mz_zip_file_stat_internal test eax, eax jz short loc_60291 cmp [rsp+538h+var_43C], 0 push 1 pop r13 jnz loc_606E0 cmp [rsp+538h+var_458], 0 jz loc_606E0 cmp [rsp+538h+var_438], 0 jz short loc_60310 mov dword ptr [r14+1Ch], 5 jmp short loc_60291 loc_60310: movzx eax, [rsp+538h+var_472] test ax, 0FFF7h jz short loc_6032B mov dword ptr [r14+1Ch], 4 jmp loc_60291 loc_6032B: cmp [rsp+538h+var_434], 0 jz loc_60407 mov rsi, [rsp+538h+var_448] mov rdi, [r14+60h] lea rdx, [rsp+538h+var_4B8] push 1Eh pop rcx mov [rsp+538h+var_530], rsi call qword ptr [r14+48h] cmp rax, 1Eh jnz loc_60414 cmp [rsp+538h+var_4B8], 4034B50h jnz loc_603FA movzx eax, [rsp+538h+var_49E] mov [rsp+538h+var_520], rax movzx eax, [rsp+538h+var_49C] mov [rsp+538h+var_528], rax mov eax, [rsp+538h+var_4A6] mov [rsp+538h+var_510], rax mov eax, [rsp+538h+var_4A2] mov [rsp+538h+var_508], rax mov eax, [rsp+538h+var_4AA] mov [rsp+538h+var_518], eax movzx eax, [rsp+538h+var_4B2] mov [rsp+538h+var_500], eax lea rdi, [rsp+538h+var_430] call _strlen mov rsi, [rsp+538h+var_520] cmp rax, rsi jnz short loc_603FA mov rax, [rsp+538h+var_530] lea rdx, [rax+rsi] add rdx, 1Eh mov rdi, [rsp+538h+var_528] lea rcx, [rdx+rdi] mov rax, [rsp+538h+var_460] add rax, rcx cmp rax, [r14] jbe short loc_60421 loc_603FA: mov dword ptr [r14+1Ch], 9 jmp loc_60291 loc_60407: mov dword ptr [r14+1Ch], 6 jmp loc_60291 loc_60414: mov dword ptr [r14+1Ch], 14h jmp loc_60291 loc_60421: mov rax, rdi mov [rsp+538h+var_498], rdx mov [rsp+538h+var_490], rcx cmp si, ax cmova eax, esi test eax, eax jz short loc_60458 movzx edx, ax lea rsi, [rsp+538h+var_4D8] mov rdi, r14 xor ecx, ecx call mz_zip_array_ensure_capacity test eax, eax jz loc_605B3 loc_60458: cmp [rsp+538h+var_520], 0 jz short loc_604B3 mov rsi, [rsp+538h+var_530] add rsi, 1Eh mov rdi, [r14+60h] mov rdx, qword ptr [rsp+538h+var_4D8] mov [rsp+538h+var_530], rdx mov rcx, [rsp+538h+var_520] call qword ptr [r14+48h] cmp rax, [rsp+538h+var_520] jnz loc_605A6 lea rdi, [rsp+538h+var_430] mov rsi, [rsp+538h+var_530] mov rdx, [rsp+538h+var_520] call _bcmp test eax, eax jz short loc_604B3 loc_604A6: mov dword ptr [r14+1Ch], 1Eh jmp loc_606FF loc_604B3: cmp dword ptr [rsp+538h+var_528], 0 jz loc_60543 cmp dword ptr [rsp+538h+var_510], 0FFFFFFFFh setz al cmp dword ptr [rsp+538h+var_508], 0FFFFFFFFh setz cl or cl, al cmp cl, 1 jnz short loc_60543 mov rdx, qword ptr [rsp+538h+var_4D8] mov rdi, [r14+60h] mov rsi, [rsp+538h+var_498] mov [rsp+538h+var_530], rdx mov rcx, [rsp+538h+var_528] call qword ptr [r14+48h] cmp rax, [rsp+538h+var_528] jnz loc_605A6 loc_604FF: cmp dword ptr [rsp+538h+var_528], 3 jbe loc_606F7 mov rax, [rsp+538h+var_530] movzx ecx, word ptr [rax+2] lea rax, [rcx+4] cmp dword ptr [rsp+538h+var_528], eax jb loc_606F7 mov rdx, [rsp+538h+var_530] cmp word ptr [rdx], 1 jz loc_606F1 add [rsp+538h+var_530], rax mov rcx, [rsp+538h+var_528] sub ecx, eax mov [rsp+538h+var_528], rcx jnz short loc_604FF loc_60543: mov dword ptr [rsp+538h+var_530], 0 loc_6054B: test byte ptr [rsp+538h+var_500], 8 setz al cmp [rsp+538h+var_510], 0 setnz cl cmp [rsp+538h+var_518], 0 setnz dl or dl, cl or dl, al jz short loc_605C0 mov eax, [rsp+538h+var_518] cmp eax, [rsp+538h+var_468] jnz loc_604A6 mov rax, [rsp+538h+var_510] cmp rax, [rsp+538h+var_460] jnz loc_604A6 mov rax, [rsp+538h+var_508] cmp rax, [rsp+538h+var_458] jz loc_60686 jmp loc_604A6 loc_605A6: mov dword ptr [r14+1Ch], 14h jmp loc_606FF loc_605B3: mov dword ptr [r14+1Ch], 10h jmp loc_606FF loc_605C0: xor eax, eax cmp dword ptr [r12+64h], 0 setnz al mov rdi, [r14+60h] mov rsi, [rsp+538h+var_490] add rsi, [rsp+538h+var_460] lea rax, ds:10h[rax*8] cmp byte ptr [rsp+538h+var_530], 0 push 18h pop rcx cmovz rcx, rax mov [rsp+538h+var_520], rcx lea rdx, [rsp+538h+var_4F8] call qword ptr [r14+48h] cmp rax, [rsp+538h+var_520] jnz loc_606E8 mov esi, [rsp+538h+var_4F8] mov eax, [rsp+538h+var_4F4] cmp dword ptr [r12+64h], 0 setz dil cmp esi, 8074B50h mov ecx, esi cmovz ecx, eax mov r8d, dword ptr [rsp+538h+var_530] not r8b mov edx, [rsp+538h+var_4F0] cmovz eax, edx cmovz edx, [rsp+538h+var_4EC] test r8b, dil jnz short loc_60666 shl rdx, 20h or rax, rdx cmp esi, 8074B50h mov edx, [rsp+538h+var_4E8] mov esi, [rsp+538h+var_4EC] cmovz esi, edx cmovz edx, [rsp+538h+var_4E4] shl rdx, 20h or rdx, rsi loc_60666: push 1Eh pop rsi cmp ecx, [rsp+538h+var_468] jnz short loc_606EB cmp rax, [rsp+538h+var_460] jnz short loc_606EB cmp rdx, [rsp+538h+var_458] jnz short loc_606EB loc_60686: mov rdi, [r14+40h] mov rsi, qword ptr [rsp+538h+var_4D8] call qword ptr [r14+30h] bt r15d, 0Dh jb short loc_606E0 lea rdx, mz_zip_compute_crc32_callback lea rcx, [rsp+538h+var_514] xor ebx, ebx mov rdi, r14 mov esi, ebp xor r8d, r8d call mz_zip_reader_extract_to_callback test eax, eax jz loc_60291 mov eax, [rsp+538h+var_514] mov ebx, r13d cmp eax, [rsp+538h+var_468] jz loc_60291 mov dword ptr [r14+1Ch], 1Eh xor ebx, ebx jmp loc_60291 loc_606E0: mov ebx, r13d jmp loc_60291 loc_606E8: push 14h pop rsi loc_606EB: mov [r14+1Ch], esi jmp short loc_606FF loc_606F1: cmp cx, 0Fh ja short loc_60711 loc_606F7: mov dword ptr [r14+1Ch], 9 loc_606FF: mov rdi, [r14+40h] mov rsi, qword ptr [rsp+538h+var_4D8] call qword ptr [r14+30h] jmp loc_60291 loc_60711: mov rcx, [rsp+538h+var_530] mov rax, [rcx+4] mov [rsp+538h+var_508], rax mov rax, [rcx+0Ch] mov [rsp+538h+var_510], rax mov al, 1 mov dword ptr [rsp+538h+var_530], eax jmp loc_6054B
long long mz_zip_validate_file(long long a1, unsigned int a2, __int16 a3) { unsigned int v3; // ebx long long v4; // r12 unsigned int v6; // eax long long v9; // rdx long long v10; // r8 long long v11; // r9 long long v12; // rdx int v13; // eax long long v14; // rsi long long v15; // rcx long long v16; // rax long long v17; // rcx long long v18; // rax unsigned int v19; // ecx long long v20; // rdx long long v21; // rdx long long v22; // rsi int v23; // esi long long v24; // [rsp+8h] [rbp-530h] long long v25; // [rsp+8h] [rbp-530h] long long v26; // [rsp+8h] [rbp-530h] char v27; // [rsp+8h] [rbp-530h] long long v28; // [rsp+10h] [rbp-528h] long long v29; // [rsp+18h] [rbp-520h] int v30; // [rsp+20h] [rbp-518h] int v31; // [rsp+24h] [rbp-514h] BYREF long long v32; // [rsp+28h] [rbp-510h] long long v33; // [rsp+30h] [rbp-508h] int v34; // [rsp+38h] [rbp-500h] int v35; // [rsp+3Ch] [rbp-4FCh] BYREF unsigned int v36; // [rsp+40h] [rbp-4F8h] BYREF unsigned int v37; // [rsp+44h] [rbp-4F4h] unsigned int v38; // [rsp+48h] [rbp-4F0h] unsigned int v39; // [rsp+4Ch] [rbp-4ECh] unsigned int v40; // [rsp+50h] [rbp-4E8h] unsigned int v41; // [rsp+54h] [rbp-4E4h] __int128 v42; // [rsp+60h] [rbp-4D8h] BYREF __int128 v43; // [rsp+70h] [rbp-4C8h] int v44; // [rsp+80h] [rbp-4B8h] BYREF unsigned __int16 v45; // [rsp+86h] [rbp-4B2h] int v46; // [rsp+8Eh] [rbp-4AAh] unsigned int v47; // [rsp+92h] [rbp-4A6h] unsigned int v48; // [rsp+96h] [rbp-4A2h] unsigned __int16 v49; // [rsp+9Ah] [rbp-49Eh] unsigned __int16 v50; // [rsp+9Ch] [rbp-49Ch] long long v51; // [rsp+A0h] [rbp-498h] long long v52; // [rsp+A8h] [rbp-490h] _BYTE v53[22]; // [rsp+B0h] [rbp-488h] BYREF __int16 v54; // [rsp+C6h] [rbp-472h] int v55; // [rsp+D0h] [rbp-468h] long long v56; // [rsp+D8h] [rbp-460h] long long v57; // [rsp+E0h] [rbp-458h] long long v58; // [rsp+F0h] [rbp-448h] int v59; // [rsp+FCh] [rbp-43Ch] int v60; // [rsp+100h] [rbp-438h] int v61; // [rsp+104h] [rbp-434h] _BYTE v62[1072]; // [rsp+108h] [rbp-430h] BYREF v35 = 0; v31 = 0; v43 = 0LL; v42 = 0LL; DWORD2(v43) = 1; v3 = 0; if ( a1 ) { v4 = *(_QWORD *)(a1 + 104); if ( !v4 || !*(_QWORD *)(a1 + 40) || !*(_QWORD *)(a1 + 48) || !*(_QWORD *)(a1 + 72) || (v6 = *(_DWORD *)(a1 + 16), v6 < a2) ) { *(_DWORD *)(a1 + 28) = 24; return v3; } v3 = 0; v9 = v6 <= a2 ? 0LL : *(_QWORD *)v4 + *(unsigned int *)(*(_QWORD *)(v4 + 32) + 4LL * a2); if ( (unsigned int)mz_zip_file_stat_internal(a1, a2, v9, v53, &v35) ) { if ( v59 || !v57 ) return 1; if ( v60 ) { *(_DWORD *)(a1 + 28) = 5; return v3; } if ( (v54 & 0xFFF7) != 0 ) { *(_DWORD *)(a1 + 28) = 4; return v3; } if ( !v61 ) { *(_DWORD *)(a1 + 28) = 6; return v3; } v24 = v58; if ( (*(long long ( **)(_QWORD, long long, int *, long long))(a1 + 72))(*(_QWORD *)(a1 + 96), v58, &v44, 30LL) != 30 ) { *(_DWORD *)(a1 + 28) = 20; return v3; } if ( v44 != 67324752 || (v29 = v49, v28 = v50, v32 = v47, v33 = v48, v30 = v46, v34 = v45, strlen(v62) != v29) || (v12 = v24 + v29 + 30, (unsigned long long)(v12 + v28 + v56) > *(_QWORD *)a1) ) { *(_DWORD *)(a1 + 28) = 9; return v3; } v13 = v28; v51 = v24 + v29 + 30; v52 = v12 + v28; if ( (unsigned __int16)v29 > (unsigned __int16)v28 ) v13 = v29; if ( v13 && !(unsigned int)mz_zip_array_ensure_capacity(a1, &v42, (unsigned __int16)v13, 0LL, v10, v11) ) { *(_DWORD *)(a1 + 28) = 16; goto LABEL_73; } if ( v29 ) { v14 = v24 + 30; v25 = v42; if ( (*(long long ( **)(_QWORD, long long, _QWORD, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v14, v42, v29) != v29 ) goto LABEL_48; if ( (unsigned int)bcmp(v62, v25, v29) ) { LABEL_34: *(_DWORD *)(a1 + 28) = 30; LABEL_73: (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), v42); return v3; } } if ( !(_DWORD)v28 || (_DWORD)v32 != -1 && (_DWORD)v33 != -1 ) { LABEL_42: v27 = 0; goto LABEL_43; } v26 = v42; if ( (*(long long ( **)(_QWORD, long long, _QWORD, long long))(a1 + 72))(*(_QWORD *)(a1 + 96), v51, v42, v28) == v28 ) { while ( 1 ) { if ( (unsigned int)v28 <= 3 ) goto LABEL_72; v15 = *(unsigned __int16 *)(v26 + 2); v16 = v15 + 4; if ( (unsigned int)v28 < (int)v15 + 4 ) goto LABEL_72; if ( *(_WORD *)v26 == 1 ) break; v26 += v16; LODWORD(v28) = v28 - v16; if ( !(_DWORD)v28 ) goto LABEL_42; } if ( (unsigned __int16)v15 <= 0xFu ) { LABEL_72: *(_DWORD *)(a1 + 28) = 9; goto LABEL_73; } v33 = *(_QWORD *)(v26 + 4); v32 = *(_QWORD *)(v26 + 12); v27 = 1; LABEL_43: if ( (v34 & 8) == 0 || v32 != 0 || v30 != 0 ) { if ( v30 != v55 || v32 != v56 || v33 != v57 ) goto LABEL_34; LABEL_64: (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), v42); if ( (a3 & 0x2000) == 0 ) { v3 = 0; if ( (unsigned int)mz_zip_reader_extract_to_callback( a1, a2, (long long ( *)(long long, _QWORD, long long))mz_zip_compute_crc32_callback, (long long)&v31, 0) ) { v3 = 1; if ( v31 != v55 ) { *(_DWORD *)(a1 + 28) = 30; return 0; } } return v3; } return 1; } v17 = 24LL; if ( !v27 ) v17 = 8LL * (*(_DWORD *)(v4 + 100) != 0) + 16; if ( (*(long long ( **)(_QWORD, long long, unsigned int *))(a1 + 72))( *(_QWORD *)(a1 + 96), v56 + v52, &v36) == v17 ) { v18 = v37; v19 = v36; if ( v36 == 134695760 ) v19 = v37; v20 = v38; if ( v36 == 134695760 ) { v18 = v38; v20 = v39; } if ( ((*(_DWORD *)(v4 + 100) == 0) & (unsigned __int8)~v27) == 0 ) { v18 |= v20 << 32; v21 = v40; v22 = v39; if ( v36 == 134695760 ) { v22 = v40; v21 = v41; } v20 = v22 | (v21 << 32); } v23 = 30; if ( v19 == v55 && v18 == v56 && v20 == v57 ) goto LABEL_64; } else { v23 = 20; } *(_DWORD *)(a1 + 28) = v23; goto LABEL_73; } LABEL_48: *(_DWORD *)(a1 + 28) = 20; goto LABEL_73; } } return v3; }
mz_zip_validate_file: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x508 AND dword ptr [RSP + 0x3c],0x0 AND dword ptr [RSP + 0x24],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOV dword ptr [RSP + 0x78],0x1 XOR EBX,EBX TEST RDI,RDI JZ 0x00160291 MOV R14,RDI MOV R12,qword ptr [RDI + 0x68] TEST R12,R12 JZ 0x00160289 CMP qword ptr [R14 + 0x28],0x0 JZ 0x00160289 CMP qword ptr [R14 + 0x30],0x0 JZ 0x00160289 CMP qword ptr [R14 + 0x48],0x0 JZ 0x00160289 MOV EBP,ESI MOV EAX,dword ptr [R14 + 0x10] CMP EAX,ESI JNC 0x001602a5 LAB_00160289: MOV dword ptr [R14 + 0x1c],0x18 LAB_00160291: MOV EAX,EBX ADD RSP,0x508 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001602a5: MOV R15D,EDX XOR EBX,EBX CMP EAX,EBP JBE 0x001602be MOV RAX,qword ptr [R12 + 0x20] MOV ECX,EBP MOV EDX,dword ptr [RAX + RCX*0x4] ADD RDX,qword ptr [R12] JMP 0x001602c0 LAB_001602be: XOR EDX,EDX LAB_001602c0: LEA RCX,[RSP + 0xb0] LEA R8,[RSP + 0x3c] MOV RDI,R14 MOV ESI,EBP CALL 0x00160733 TEST EAX,EAX JZ 0x00160291 CMP dword ptr [RSP + 0xfc],0x0 PUSH 0x1 POP R13 JNZ 0x001606e0 CMP qword ptr [RSP + 0xe0],0x0 JZ 0x001606e0 CMP dword ptr [RSP + 0x100],0x0 JZ 0x00160310 MOV dword ptr [R14 + 0x1c],0x5 JMP 0x00160291 LAB_00160310: MOVZX EAX,word ptr [RSP + 0xc6] TEST AX,0xfff7 JZ 0x0016032b MOV dword ptr [R14 + 0x1c],0x4 JMP 0x00160291 LAB_0016032b: CMP dword ptr [RSP + 0x104],0x0 JZ 0x00160407 MOV RSI,qword ptr [RSP + 0xf0] MOV RDI,qword ptr [R14 + 0x60] LEA RDX,[RSP + 0x80] PUSH 0x1e POP RCX MOV qword ptr [RSP + 0x8],RSI CALL qword ptr [R14 + 0x48] CMP RAX,0x1e JNZ 0x00160414 CMP dword ptr [RSP + 0x80],0x4034b50 JNZ 0x001603fa MOVZX EAX,word ptr [RSP + 0x9a] MOV qword ptr [RSP + 0x18],RAX MOVZX EAX,word ptr [RSP + 0x9c] MOV qword ptr [RSP + 0x10],RAX MOV EAX,dword ptr [RSP + 0x92] MOV qword ptr [RSP + 0x28],RAX MOV EAX,dword ptr [RSP + 0x96] MOV qword ptr [RSP + 0x30],RAX MOV EAX,dword ptr [RSP + 0x8e] MOV dword ptr [RSP + 0x20],EAX MOVZX EAX,word ptr [RSP + 0x86] MOV dword ptr [RSP + 0x38],EAX LEA RDI,[RSP + 0x108] CALL 0x0010a220 MOV RSI,qword ptr [RSP + 0x18] CMP RAX,RSI JNZ 0x001603fa MOV RAX,qword ptr [RSP + 0x8] LEA RDX,[RAX + RSI*0x1] ADD RDX,0x1e MOV RDI,qword ptr [RSP + 0x10] LEA RCX,[RDX + RDI*0x1] MOV RAX,qword ptr [RSP + 0xd8] ADD RAX,RCX CMP RAX,qword ptr [R14] JBE 0x00160421 LAB_001603fa: MOV dword ptr [R14 + 0x1c],0x9 JMP 0x00160291 LAB_00160407: MOV dword ptr [R14 + 0x1c],0x6 JMP 0x00160291 LAB_00160414: MOV dword ptr [R14 + 0x1c],0x14 JMP 0x00160291 LAB_00160421: MOV RAX,RDI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0xa8],RCX CMP SI,AX CMOVA EAX,ESI TEST EAX,EAX JZ 0x00160458 MOVZX EDX,AX LEA RSI,[RSP + 0x60] MOV RDI,R14 XOR ECX,ECX CALL 0x001674f1 TEST EAX,EAX JZ 0x001605b3 LAB_00160458: CMP qword ptr [RSP + 0x18],0x0 JZ 0x001604b3 MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x1e MOV RDI,qword ptr [R14 + 0x60] MOV RDX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x8],RDX MOV RCX,qword ptr [RSP + 0x18] CALL qword ptr [R14 + 0x48] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x001605a6 LEA RDI,[RSP + 0x108] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0010a620 TEST EAX,EAX JZ 0x001604b3 LAB_001604a6: MOV dword ptr [R14 + 0x1c],0x1e JMP 0x001606ff LAB_001604b3: CMP dword ptr [RSP + 0x10],0x0 JZ 0x00160543 CMP dword ptr [RSP + 0x28],-0x1 SETZ AL CMP dword ptr [RSP + 0x30],-0x1 SETZ CL OR CL,AL CMP CL,0x1 JNZ 0x00160543 MOV RDX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [R14 + 0x60] MOV RSI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x8],RDX MOV RCX,qword ptr [RSP + 0x10] CALL qword ptr [R14 + 0x48] CMP RAX,qword ptr [RSP + 0x10] JNZ 0x001605a6 LAB_001604ff: CMP dword ptr [RSP + 0x10],0x3 JBE 0x001606f7 MOV RAX,qword ptr [RSP + 0x8] MOVZX ECX,word ptr [RAX + 0x2] LEA RAX,[RCX + 0x4] CMP dword ptr [RSP + 0x10],EAX JC 0x001606f7 MOV RDX,qword ptr [RSP + 0x8] CMP word ptr [RDX],0x1 JZ 0x001606f1 ADD qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x10] SUB ECX,EAX MOV qword ptr [RSP + 0x10],RCX JNZ 0x001604ff LAB_00160543: MOV dword ptr [RSP + 0x8],0x0 LAB_0016054b: TEST byte ptr [RSP + 0x38],0x8 SETZ AL CMP qword ptr [RSP + 0x28],0x0 SETNZ CL CMP dword ptr [RSP + 0x20],0x0 SETNZ DL OR DL,CL OR DL,AL JZ 0x001605c0 MOV EAX,dword ptr [RSP + 0x20] CMP EAX,dword ptr [RSP + 0xd0] JNZ 0x001604a6 MOV RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0xd8] JNZ 0x001604a6 MOV RAX,qword ptr [RSP + 0x30] CMP RAX,qword ptr [RSP + 0xe0] JZ 0x00160686 JMP 0x001604a6 LAB_001605a6: MOV dword ptr [R14 + 0x1c],0x14 JMP 0x001606ff LAB_001605b3: MOV dword ptr [R14 + 0x1c],0x10 JMP 0x001606ff LAB_001605c0: XOR EAX,EAX CMP dword ptr [R12 + 0x64],0x0 SETNZ AL MOV RDI,qword ptr [R14 + 0x60] MOV RSI,qword ptr [RSP + 0xa8] ADD RSI,qword ptr [RSP + 0xd8] LEA RAX,[0x10 + RAX*0x8] CMP byte ptr [RSP + 0x8],0x0 PUSH 0x18 POP RCX CMOVZ RCX,RAX MOV qword ptr [RSP + 0x18],RCX LEA RDX,[RSP + 0x40] CALL qword ptr [R14 + 0x48] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x001606e8 MOV ESI,dword ptr [RSP + 0x40] MOV EAX,dword ptr [RSP + 0x44] CMP dword ptr [R12 + 0x64],0x0 SETZ DIL CMP ESI,0x8074b50 MOV ECX,ESI CMOVZ ECX,EAX MOV R8D,dword ptr [RSP + 0x8] NOT R8B MOV EDX,dword ptr [RSP + 0x48] CMOVZ EAX,EDX CMOVZ EDX,dword ptr [RSP + 0x4c] TEST R8B,DIL JNZ 0x00160666 SHL RDX,0x20 OR RAX,RDX CMP ESI,0x8074b50 MOV EDX,dword ptr [RSP + 0x50] MOV ESI,dword ptr [RSP + 0x4c] CMOVZ ESI,EDX CMOVZ EDX,dword ptr [RSP + 0x54] SHL RDX,0x20 OR RDX,RSI LAB_00160666: PUSH 0x1e POP RSI CMP ECX,dword ptr [RSP + 0xd0] JNZ 0x001606eb CMP RAX,qword ptr [RSP + 0xd8] JNZ 0x001606eb CMP RDX,qword ptr [RSP + 0xe0] JNZ 0x001606eb LAB_00160686: MOV RDI,qword ptr [R14 + 0x40] MOV RSI,qword ptr [RSP + 0x60] CALL qword ptr [R14 + 0x30] BT R15D,0xd JC 0x001606e0 LEA RDX,[0x1609fd] LEA RCX,[RSP + 0x24] XOR EBX,EBX MOV RDI,R14 MOV ESI,EBP XOR R8D,R8D CALL 0x0015f4ce TEST EAX,EAX JZ 0x00160291 MOV EAX,dword ptr [RSP + 0x24] MOV EBX,R13D CMP EAX,dword ptr [RSP + 0xd0] JZ 0x00160291 MOV dword ptr [R14 + 0x1c],0x1e XOR EBX,EBX JMP 0x00160291 LAB_001606e0: MOV EBX,R13D JMP 0x00160291 LAB_001606e8: PUSH 0x14 POP RSI LAB_001606eb: MOV dword ptr [R14 + 0x1c],ESI JMP 0x001606ff LAB_001606f1: CMP CX,0xf JA 0x00160711 LAB_001606f7: MOV dword ptr [R14 + 0x1c],0x9 LAB_001606ff: MOV RDI,qword ptr [R14 + 0x40] MOV RSI,qword ptr [RSP + 0x60] CALL qword ptr [R14 + 0x30] JMP 0x00160291 LAB_00160711: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RCX + 0x4] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RCX + 0xc] MOV qword ptr [RSP + 0x28],RAX MOV AL,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x0016054b
int8 mz_zip_validate_file(ulong *param_1,uint param_2,uint param_3) { long *plVar1; uint uVar2; bool bVar3; short *__s2; int iVar4; size_t sVar5; ulong uVar6; ulong uVar7; long lVar8; uint uVar9; long lVar10; int4 uVar11; bool bVar12; short *local_530; ulong local_528; uint local_514; ulong local_510; ulong local_508; uint local_500; int4 local_4fc; uint local_4f8; uint local_4f4; uint local_4f0; uint local_4ec; uint local_4e8; uint local_4e4; short *local_4d8; int8 uStack_4d0; int8 local_4c8; int8 uStack_4c0; int local_4b8; ushort local_4b2; uint local_4aa; uint local_4a6; uint local_4a2; ushort local_49e; ushort local_49c; long local_498; long local_490; int1 local_488 [22]; ushort local_472; uint local_468; ulong local_460; ulong local_458; long local_448; int local_43c; int local_438; int local_434; char local_430 [1024]; local_4fc = 0; local_514 = 0; local_4c8 = 0; local_4d8 = (short *)0x0; uStack_4d0 = 0; uStack_4c0 = 1; if (param_1 == (ulong *)0x0) { return 0; } plVar1 = (long *)param_1[0xd]; if ((((plVar1 == (long *)0x0) || (param_1[5] == 0)) || (param_1[6] == 0)) || ((param_1[9] == 0 || ((uint)param_1[2] < param_2)))) { *(int4 *)((long)param_1 + 0x1c) = 0x18; return 0; } if (param_2 < (uint)param_1[2]) { lVar10 = (ulong)*(uint *)(plVar1[4] + (ulong)param_2 * 4) + *plVar1; } else { lVar10 = 0; } iVar4 = mz_zip_file_stat_internal(param_1,param_2,lVar10,local_488,&local_4fc); if (iVar4 == 0) { return 0; } if (local_43c != 0) { return 1; } if (local_458 == 0) { return 1; } if (local_438 != 0) { *(int4 *)((long)param_1 + 0x1c) = 5; return 0; } if ((local_472 & 0xfff7) != 0) { *(int4 *)((long)param_1 + 0x1c) = 4; return 0; } if (local_434 == 0) { *(int4 *)((long)param_1 + 0x1c) = 6; return 0; } lVar10 = (*(code *)param_1[9])(param_1[0xc],local_448,&local_4b8,0x1e); if (lVar10 != 0x1e) { *(int4 *)((long)param_1 + 0x1c) = 0x14; return 0; } if (local_4b8 != 0x4034b50) { LAB_001603fa: *(int4 *)((long)param_1 + 0x1c) = 9; return 0; } uVar7 = (ulong)local_49e; local_528 = (ulong)local_49c; local_510 = (ulong)local_4a6; local_508 = (ulong)local_4a2; local_500 = (uint)local_4b2; sVar5 = strlen(local_430); if (sVar5 != uVar7) goto LAB_001603fa; local_498 = local_448 + uVar7 + 0x1e; local_490 = local_498 + local_528; if (*param_1 < local_460 + local_490) goto LAB_001603fa; uVar6 = local_528; if (local_49c < local_49e) { uVar6 = uVar7; } if (((int)uVar6 != 0) && (iVar4 = mz_zip_array_ensure_capacity(param_1,&local_4d8,uVar6,0), iVar4 == 0)) { *(int4 *)((long)param_1 + 0x1c) = 0x10; goto LAB_001606ff; } __s2 = local_4d8; if (uVar7 == 0) { LAB_001604b3: if (local_49c != 0) { if ((int)local_508 == -1 || (int)local_510 == -1) { local_530 = local_4d8; uVar7 = (*(code *)param_1[9])(param_1[0xc],local_498,local_4d8,local_528); if (uVar7 != local_528) goto LAB_001605a6; do { if ((uint)local_528 < 4) { LAB_001606f7: *(int4 *)((long)param_1 + 0x1c) = 9; goto LAB_001606ff; } lVar10 = (ulong)(ushort)local_530[1] + 4; uVar9 = (uint)lVar10; if ((uint)local_528 < uVar9) goto LAB_001606f7; if (*local_530 == 1) { if ((ushort)local_530[1] < 0x10) goto LAB_001606f7; local_508 = *(ulong *)(local_530 + 2); local_510 = *(ulong *)(local_530 + 6); bVar3 = true; goto LAB_0016054b; } local_530 = (short *)((long)local_530 + lVar10); uVar9 = (uint)local_528 - uVar9; local_528 = (ulong)uVar9; } while (uVar9 != 0); } } bVar3 = false; LAB_0016054b: if ((local_4aa == 0 && local_510 == 0) && (local_500 & 8) != 0) { lVar10 = 0x18; if (!bVar3) { lVar10 = (ulong)(*(int *)((long)plVar1 + 100) != 0) * 8 + 0x10; } lVar8 = (*(code *)param_1[9])(param_1[0xc],local_490 + local_460,&local_4f8); if (lVar8 == lVar10) { bVar12 = local_4f8 == 0x8074b50; uVar9 = local_4f8; if (bVar12) { uVar9 = local_4f4; } if (bVar12) { local_4f4 = local_4f0; } uVar7 = (ulong)local_4f4; if (bVar12) { local_4f0 = local_4ec; } uVar6 = (ulong)local_4f0; if (!(bool)(~bVar3 & *(int *)((long)plVar1 + 100) == 0)) { uVar7 = CONCAT44(local_4f0,local_4f4); uVar2 = local_4e8; if (local_4f8 == 0x8074b50) { uVar2 = local_4e4; local_4ec = local_4e8; } uVar6 = CONCAT44(uVar2,local_4ec); } uVar11 = 0x1e; if (((uVar9 == local_468) && (uVar7 == local_460)) && (uVar6 == local_458)) goto LAB_00160686; } else { uVar11 = 0x14; } *(int4 *)((long)param_1 + 0x1c) = uVar11; goto LAB_001606ff; } if (((local_4aa == local_468) && (local_510 == local_460)) && (local_508 == local_458)) { LAB_00160686: (*(code *)param_1[6])(param_1[8],local_4d8); if ((param_3 >> 0xd & 1) != 0) { return 1; } iVar4 = mz_zip_reader_extract_to_callback (param_1,param_2,mz_zip_compute_crc32_callback,&local_514,0); if (iVar4 != 0) { if (local_514 != local_468) { *(int4 *)((long)param_1 + 0x1c) = 0x1e; return 0; } return 1; } return 0; } } else { uVar6 = (*(code *)param_1[9])(param_1[0xc],local_448 + 0x1e,local_4d8,uVar7); if (uVar6 != uVar7) { LAB_001605a6: *(int4 *)((long)param_1 + 0x1c) = 0x14; goto LAB_001606ff; } iVar4 = bcmp(local_430,__s2,uVar7); if (iVar4 == 0) goto LAB_001604b3; } *(int4 *)((long)param_1 + 0x1c) = 0x1e; LAB_001606ff: (*(code *)param_1[6])(param_1[8],local_4d8); return 0; }
25,739
mz_zip_validate_file
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags) { mz_zip_archive_file_stat file_stat; mz_zip_internal_state *pState; const mz_uint8 *pCentral_dir_header; mz_bool found_zip64_ext_data_in_cdir = MZ_FALSE; mz_bool found_zip64_ext_data_in_ldir = MZ_FALSE; mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; mz_uint64 local_header_ofs = 0; mz_uint32 local_header_filename_len, local_header_extra_len, local_header_crc32; mz_uint64 local_header_comp_size, local_header_uncomp_size; mz_uint32 uncomp_crc32 = MZ_CRC32_INIT; mz_bool has_data_descriptor; mz_uint32 local_header_bit_flags; mz_zip_array file_data_array; mz_zip_array_init(&file_data_array, 1); if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (!pZip->m_pRead)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (file_index > pZip->m_total_files) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); pState = pZip->m_pState; pCentral_dir_header = mz_zip_get_cdh(pZip, file_index); if (!mz_zip_file_stat_internal(pZip, file_index, pCentral_dir_header, &file_stat, &found_zip64_ext_data_in_cdir)) return MZ_FALSE; /* A directory or zero length file */ if (file_stat.m_is_directory || (!file_stat.m_uncomp_size)) return MZ_TRUE; /* Encryption and patch files are not supported. */ if (file_stat.m_is_encrypted) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); /* This function only supports stored and deflate. */ if ((file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED)) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); if (!file_stat.m_is_supported) return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); /* Read and parse the local directory entry. */ local_header_ofs = file_stat.m_local_header_ofs; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); local_header_filename_len = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS); local_header_extra_len = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); local_header_comp_size = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS); local_header_uncomp_size = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS); local_header_crc32 = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_CRC32_OFS); local_header_bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); has_data_descriptor = (local_header_bit_flags & 8) != 0; if (local_header_filename_len != strlen(file_stat.m_filename)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); if ((local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len + local_header_extra_len + file_stat.m_comp_size) > pZip->m_archive_size) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); if (!mz_zip_array_resize( pZip, &file_data_array, MZ_MAX(local_header_filename_len, local_header_extra_len), MZ_FALSE)) { mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); goto handle_failure; } if (local_header_filename_len) { if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE, file_data_array.m_p, local_header_filename_len) != local_header_filename_len) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } /* I've seen 1 archive that had the same pathname, but used backslashes in * the local dir and forward slashes in the central dir. Do we care about * this? For now, this case will fail validation. */ if (memcmp(file_stat.m_filename, file_data_array.m_p, local_header_filename_len) != 0) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } if ((local_header_extra_len) && ((local_header_comp_size == MZ_UINT32_MAX) || (local_header_uncomp_size == MZ_UINT32_MAX))) { mz_uint32 extra_size_remaining = local_header_extra_len; const mz_uint8 *pExtra_data = (const mz_uint8 *)file_data_array.m_p; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len, file_data_array.m_p, local_header_extra_len) != local_header_extra_len) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } do { mz_uint32 field_id, field_data_size, field_total_size; if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } field_id = MZ_READ_LE16(pExtra_data); field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); field_total_size = field_data_size + sizeof(mz_uint16) * 2; if (field_total_size > extra_size_remaining) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { const mz_uint8 *pSrc_field_data = pExtra_data + sizeof(mz_uint32); if (field_data_size < sizeof(mz_uint64) * 2) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); goto handle_failure; } local_header_uncomp_size = MZ_READ_LE64(pSrc_field_data); local_header_comp_size = MZ_READ_LE64(pSrc_field_data + sizeof(mz_uint64)); found_zip64_ext_data_in_ldir = MZ_TRUE; break; } pExtra_data += field_total_size; extra_size_remaining -= field_total_size; } while (extra_size_remaining); } /* TODO: parse local header extra data when local_header_comp_size is * 0xFFFFFFFF! (big_descriptor.zip) */ /* I've seen zips in the wild with the data descriptor bit set, but proper * local header values and bogus data descriptors */ if ((has_data_descriptor) && (!local_header_comp_size) && (!local_header_crc32)) { mz_uint8 descriptor_buf[32]; mz_bool has_id; const mz_uint8 *pSrc; mz_uint32 file_crc32; mz_uint64 comp_size = 0, uncomp_size = 0; mz_uint32 num_descriptor_uint32s = ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) ? 6 : 4; if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + local_header_filename_len + local_header_extra_len + file_stat.m_comp_size, descriptor_buf, sizeof(mz_uint32) * num_descriptor_uint32s) != (sizeof(mz_uint32) * num_descriptor_uint32s)) { mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); goto handle_failure; } has_id = (MZ_READ_LE32(descriptor_buf) == MZ_ZIP_DATA_DESCRIPTOR_ID); pSrc = has_id ? (descriptor_buf + sizeof(mz_uint32)) : descriptor_buf; file_crc32 = MZ_READ_LE32(pSrc); if ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) { comp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32)); uncomp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32) + sizeof(mz_uint64)); } else { comp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32)); uncomp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32) + sizeof(mz_uint32)); } if ((file_crc32 != file_stat.m_crc32) || (comp_size != file_stat.m_comp_size) || (uncomp_size != file_stat.m_uncomp_size)) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } else { if ((local_header_crc32 != file_stat.m_crc32) || (local_header_comp_size != file_stat.m_comp_size) || (local_header_uncomp_size != file_stat.m_uncomp_size)) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); goto handle_failure; } } mz_zip_array_clear(pZip, &file_data_array); if ((flags & MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY) == 0) { if (!mz_zip_reader_extract_to_callback( pZip, file_index, mz_zip_compute_crc32_callback, &uncomp_crc32, 0)) return MZ_FALSE; /* 1 more check to be sure, although the extract checks too. */ if (uncomp_crc32 != file_stat.m_crc32) { mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); return MZ_FALSE; } } return MZ_TRUE; handle_failure: mz_zip_array_clear(pZip, &file_data_array); return MZ_FALSE; }
O3
c
mz_zip_validate_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4e8, %rsp # imm = 0x4E8 xorl %r14d, %r14d movl %r14d, 0x3c(%rsp) movl %r14d, 0x24(%rsp) testq %rdi, %rdi je 0x84bea movq %rdi, %rbx movq 0x68(%rdi), %r12 testq %r12, %r12 je 0x84be3 cmpq $0x0, 0x28(%rbx) je 0x84be3 cmpq $0x0, 0x30(%rbx) je 0x84be3 cmpq $0x0, 0x48(%rbx) je 0x84be3 movl %esi, %ebp movl 0x10(%rbx), %eax cmpl %esi, %eax jae 0x84bff movl $0x18, 0x1c(%rbx) movl %r14d, %eax addq $0x4e8, %rsp # imm = 0x4E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %edx, %r15d xorl %r14d, %r14d cmpl %ebp, %eax jbe 0x84c19 movq 0x20(%r12), %rax movl %ebp, %ecx movl (%rax,%rcx,4), %edx addq (%r12), %rdx jmp 0x84c1b xorl %edx, %edx leaq 0x90(%rsp), %rcx leaq 0x3c(%rsp), %r8 movq %rbx, %rdi movl %ebp, %esi callq 0x8504b testl %eax, %eax je 0x84bea cmpl $0x0, 0xdc(%rsp) movl $0x1, %r14d jne 0x84bea cmpq $0x0, 0xc0(%rsp) je 0x84bea cmpl $0x0, 0xe0(%rsp) je 0x84c64 movl $0x5, 0x1c(%rbx) jmp 0x84c7a movzwl 0xa6(%rsp), %eax testl $0xfff7, %eax # imm = 0xFFF7 je 0x84c82 movl $0x4, 0x1c(%rbx) xorl %r14d, %r14d jmp 0x84bea cmpl $0x0, 0xe4(%rsp) je 0x84d3b movq 0xd0(%rsp), %r13 movq 0x60(%rbx), %rdi leaq 0x60(%rsp), %rdx movl $0x1e, %ecx movq %r13, %rsi callq *0x48(%rbx) cmpq $0x1e, %rax jne 0x84d47 cmpl $0x4034b50, 0x60(%rsp) # imm = 0x4034B50 jne 0x84d2f movzwl 0x7a(%rsp), %eax movq %rax, 0x8(%rsp) movzwl 0x7c(%rsp), %eax movq %rax, 0x18(%rsp) movl 0x72(%rsp), %eax movq %rax, 0x28(%rsp) movl 0x76(%rsp), %eax movq %rax, 0x30(%rsp) movl 0x6e(%rsp), %eax movl %eax, 0x20(%rsp) movzwl 0x66(%rsp), %eax movl %eax, 0x38(%rsp) leaq 0xe8(%rsp), %rdi callq 0xa240 movq 0x8(%rsp), %rsi cmpq %rsi, %rax jne 0x84d2f leaq (%rsi,%r13), %rdx addq $0x1e, %rdx movq 0x18(%rsp), %rdi leaq (%rdx,%rdi), %rcx movq 0xb8(%rsp), %rax addq %rcx, %rax cmpq (%rbx), %rax jbe 0x84d53 movl $0x9, 0x1c(%rbx) jmp 0x84c7a movl $0x6, 0x1c(%rbx) jmp 0x84c7a movl $0x14, 0x1c(%rbx) jmp 0x84c7a movq %rdi, %rax movq %rdx, 0x80(%rsp) movq %rcx, 0x88(%rsp) cmpw %ax, %si cmoval %esi, %eax testl %eax, %eax je 0x84da0 movzwl %ax, %ecx movq 0x40(%rbx), %rdi movl $0x1, %edx xorl %esi, %esi callq *0x38(%rbx) movq %rax, 0x10(%rsp) testq %rax, %rax jne 0x84da9 movl $0x10, 0x1c(%rbx) movq $0x0, 0x10(%rsp) jmp 0x8501d movq $0x0, 0x10(%rsp) cmpq $0x0, 0x8(%rsp) je 0x84dfc addq $0x1e, %r13 movq 0x60(%rbx), %rdi movq %r13, %rsi movq 0x10(%rsp), %rdx movq 0x8(%rsp), %r13 movq %r13, %rcx callq *0x48(%rbx) cmpq %r13, %rax jne 0x84edf leaq 0xe8(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0xa5f0 testl %eax, %eax je 0x84dfc movl $0x1e, 0x1c(%rbx) jmp 0x8501d cmpl $0x0, 0x18(%rsp) je 0x84e7c cmpl $-0x1, 0x28(%rsp) sete %al cmpl $-0x1, 0x30(%rsp) sete %cl orb %al, %cl cmpb $0x1, %cl jne 0x84e7c movq 0x60(%rbx), %rdi movq 0x80(%rsp), %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %r13 movq %r13, %rcx callq *0x48(%rbx) cmpq %r13, %rax jne 0x84edf movq 0x10(%rsp), %rax cmpl $0x3, 0x18(%rsp) jbe 0x85016 movzwl 0x2(%rax), %edx leaq 0x4(%rdx), %rcx cmpl %ecx, 0x18(%rsp) jb 0x85016 cmpw $0x1, (%rax) je 0x85010 addq %rcx, %rax movq 0x18(%rsp), %rdx subl %ecx, %edx movq %rdx, 0x18(%rsp) jne 0x84e44 movl $0x0, 0x8(%rsp) testb $0x8, 0x38(%rsp) sete %al cmpq $0x0, 0x28(%rsp) setne %cl cmpl $0x0, 0x20(%rsp) setne %dl orb %cl, %dl orb %al, %dl je 0x84eeb movl 0x20(%rsp), %eax cmpl 0xb0(%rsp), %eax jne 0x84df0 movq 0x28(%rsp), %rax cmpq 0xb8(%rsp), %rax jne 0x84df0 movq 0x30(%rsp), %rax cmpq 0xc0(%rsp), %rax je 0x84fb6 jmp 0x84df0 movl $0x14, 0x1c(%rbx) jmp 0x8501d xorl %eax, %eax cmpl $0x0, 0x64(%r12) setne %al movq 0x60(%rbx), %rdi movq 0x88(%rsp), %rsi addq 0xb8(%rsp), %rsi leaq 0x10(,%rax,8), %rax cmpb $0x0, 0x8(%rsp) movl $0x18, %r13d cmoveq %rax, %r13 leaq 0x40(%rsp), %rdx movq %r13, %rcx callq *0x48(%rbx) movl $0x14, %esi cmpq %r13, %rax jne 0x8500b movl 0x40(%rsp), %esi movl 0x44(%rsp), %eax cmpl $0x0, 0x64(%r12) sete %dil cmpl $0x8074b50, %esi # imm = 0x8074B50 movl %esi, %ecx cmovel %eax, %ecx movl 0x8(%rsp), %r8d notb %r8b movl 0x48(%rsp), %edx cmovel %edx, %eax cmovel 0x4c(%rsp), %edx testb %dil, %r8b jne 0x84f94 shlq $0x20, %rdx orq %rdx, %rax cmpl $0x8074b50, %esi # imm = 0x8074B50 movl 0x50(%rsp), %edx movl 0x4c(%rsp), %esi cmovel %edx, %esi cmovel 0x54(%rsp), %edx shlq $0x20, %rdx orq %rsi, %rdx movl $0x1e, %esi cmpl 0xb0(%rsp), %ecx jne 0x8500b cmpq 0xb8(%rsp), %rax jne 0x8500b cmpq 0xc0(%rsp), %rdx jne 0x8500b movq 0x40(%rbx), %rdi movq 0x10(%rsp), %rsi callq *0x30(%rbx) btl $0xd, %r15d jb 0x84bea leaq 0x332(%rip), %rdx # 0x85306 leaq 0x24(%rsp), %rcx movq %rbx, %rdi movl %ebp, %esi xorl %r8d, %r8d callq 0x83e23 testl %eax, %eax je 0x84c7a movl 0x24(%rsp), %eax cmpl 0xb0(%rsp), %eax je 0x84bea movl $0x1e, 0x1c(%rbx) jmp 0x84c7a movl %esi, 0x1c(%rbx) jmp 0x8501d cmpw $0xf, %dx ja 0x8502e movl $0x9, 0x1c(%rbx) movq 0x40(%rbx), %rdi movq 0x10(%rsp), %rsi callq *0x30(%rbx) jmp 0x84c7a movq 0x4(%rax), %rcx movq %rcx, 0x30(%rsp) movq 0xc(%rax), %rax movq %rax, 0x28(%rsp) movb $0x1, %al movl %eax, 0x8(%rsp) jmp 0x84e84
mz_zip_validate_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 4E8h xor r14d, r14d mov [rsp+518h+var_4DC], r14d mov [rsp+518h+var_4F4], r14d test rdi, rdi jz short loc_84BEA mov rbx, rdi mov r12, [rdi+68h] test r12, r12 jz short loc_84BE3 cmp qword ptr [rbx+28h], 0 jz short loc_84BE3 cmp qword ptr [rbx+30h], 0 jz short loc_84BE3 cmp qword ptr [rbx+48h], 0 jz short loc_84BE3 mov ebp, esi mov eax, [rbx+10h] cmp eax, esi jnb short loc_84BFF loc_84BE3: mov dword ptr [rbx+1Ch], 18h loc_84BEA: mov eax, r14d add rsp, 4E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_84BFF: mov r15d, edx xor r14d, r14d cmp eax, ebp jbe short loc_84C19 mov rax, [r12+20h] mov ecx, ebp mov edx, [rax+rcx*4] add rdx, [r12] jmp short loc_84C1B loc_84C19: xor edx, edx loc_84C1B: lea rcx, [rsp+518h+var_488] lea r8, [rsp+518h+var_4DC] mov rdi, rbx mov esi, ebp call mz_zip_file_stat_internal test eax, eax jz short loc_84BEA cmp [rsp+518h+var_43C], 0 mov r14d, 1 jnz short loc_84BEA cmp [rsp+518h+var_458], 0 jz short loc_84BEA cmp [rsp+518h+var_438], 0 jz short loc_84C64 mov dword ptr [rbx+1Ch], 5 jmp short loc_84C7A loc_84C64: movzx eax, [rsp+518h+var_472] test eax, 0FFF7h jz short loc_84C82 mov dword ptr [rbx+1Ch], 4 loc_84C7A: xor r14d, r14d jmp loc_84BEA loc_84C82: cmp [rsp+518h+var_434], 0 jz loc_84D3B mov r13, [rsp+518h+var_448] mov rdi, [rbx+60h] lea rdx, [rsp+518h+var_4B8] mov ecx, 1Eh mov rsi, r13 call qword ptr [rbx+48h] cmp rax, 1Eh jnz loc_84D47 cmp [rsp+518h+var_4B8], 4034B50h jnz short loc_84D2F movzx eax, [rsp+518h+var_49E] mov [rsp+518h+var_510], rax movzx eax, [rsp+518h+var_49C] mov [rsp+518h+var_500], rax mov eax, [rsp+518h+var_4A6] mov [rsp+518h+var_4F0], rax mov eax, [rsp+518h+var_4A2] mov [rsp+518h+var_4E8], rax mov eax, [rsp+518h+var_4AA] mov [rsp+518h+var_4F8], eax movzx eax, [rsp+518h+var_4B2] mov [rsp+518h+var_4E0], eax lea rdi, [rsp+518h+var_430] call _strlen mov rsi, [rsp+518h+var_510] cmp rax, rsi jnz short loc_84D2F lea rdx, [rsi+r13] add rdx, 1Eh mov rdi, [rsp+518h+var_500] lea rcx, [rdx+rdi] mov rax, [rsp+518h+var_460] add rax, rcx cmp rax, [rbx] jbe short loc_84D53 loc_84D2F: mov dword ptr [rbx+1Ch], 9 jmp loc_84C7A loc_84D3B: mov dword ptr [rbx+1Ch], 6 jmp loc_84C7A loc_84D47: mov dword ptr [rbx+1Ch], 14h jmp loc_84C7A loc_84D53: mov rax, rdi mov [rsp+518h+var_498], rdx mov [rsp+518h+var_490], rcx cmp si, ax cmova eax, esi test eax, eax jz short loc_84DA0 movzx ecx, ax mov rdi, [rbx+40h] mov edx, 1 xor esi, esi call qword ptr [rbx+38h] mov [rsp+518h+var_508], rax test rax, rax jnz short loc_84DA9 mov dword ptr [rbx+1Ch], 10h mov [rsp+518h+var_508], 0 jmp loc_8501D loc_84DA0: mov [rsp+518h+var_508], 0 loc_84DA9: cmp [rsp+518h+var_510], 0 jz short loc_84DFC add r13, 1Eh mov rdi, [rbx+60h] mov rsi, r13 mov rdx, [rsp+518h+var_508] mov r13, [rsp+518h+var_510] mov rcx, r13 call qword ptr [rbx+48h] cmp rax, r13 jnz loc_84EDF lea rdi, [rsp+518h+var_430] mov rsi, [rsp+518h+var_508] mov rdx, [rsp+518h+var_510] call _bcmp test eax, eax jz short loc_84DFC loc_84DF0: mov dword ptr [rbx+1Ch], 1Eh jmp loc_8501D loc_84DFC: cmp dword ptr [rsp+518h+var_500], 0 jz short loc_84E7C cmp dword ptr [rsp+518h+var_4F0], 0FFFFFFFFh setz al cmp dword ptr [rsp+518h+var_4E8], 0FFFFFFFFh setz cl or cl, al cmp cl, 1 jnz short loc_84E7C mov rdi, [rbx+60h] mov rsi, [rsp+518h+var_498] mov rdx, [rsp+518h+var_508] mov r13, [rsp+518h+var_500] mov rcx, r13 call qword ptr [rbx+48h] cmp rax, r13 jnz loc_84EDF mov rax, [rsp+518h+var_508] loc_84E44: cmp dword ptr [rsp+518h+var_500], 3 jbe loc_85016 movzx edx, word ptr [rax+2] lea rcx, [rdx+4] cmp dword ptr [rsp+518h+var_500], ecx jb loc_85016 cmp word ptr [rax], 1 jz loc_85010 add rax, rcx mov rdx, [rsp+518h+var_500] sub edx, ecx mov [rsp+518h+var_500], rdx jnz short loc_84E44 loc_84E7C: mov dword ptr [rsp+518h+var_510], 0 loc_84E84: test byte ptr [rsp+518h+var_4E0], 8 setz al cmp [rsp+518h+var_4F0], 0 setnz cl cmp [rsp+518h+var_4F8], 0 setnz dl or dl, cl or dl, al jz short loc_84EEB mov eax, [rsp+518h+var_4F8] cmp eax, [rsp+518h+var_468] jnz loc_84DF0 mov rax, [rsp+518h+var_4F0] cmp rax, [rsp+518h+var_460] jnz loc_84DF0 mov rax, [rsp+518h+var_4E8] cmp rax, [rsp+518h+var_458] jz loc_84FB6 jmp loc_84DF0 loc_84EDF: mov dword ptr [rbx+1Ch], 14h jmp loc_8501D loc_84EEB: xor eax, eax cmp dword ptr [r12+64h], 0 setnz al mov rdi, [rbx+60h] mov rsi, [rsp+518h+var_490] add rsi, [rsp+518h+var_460] lea rax, ds:10h[rax*8] cmp byte ptr [rsp+518h+var_510], 0 mov r13d, 18h cmovz r13, rax lea rdx, [rsp+518h+var_4D8] mov rcx, r13 call qword ptr [rbx+48h] mov esi, 14h cmp rax, r13 jnz loc_8500B mov esi, [rsp+518h+var_4D8] mov eax, [rsp+518h+var_4D4] cmp dword ptr [r12+64h], 0 setz dil cmp esi, 8074B50h mov ecx, esi cmovz ecx, eax mov r8d, dword ptr [rsp+518h+var_510] not r8b mov edx, [rsp+518h+var_4D0] cmovz eax, edx cmovz edx, [rsp+518h+var_4CC] test r8b, dil jnz short loc_84F94 shl rdx, 20h or rax, rdx cmp esi, 8074B50h mov edx, [rsp+518h+var_4C8] mov esi, [rsp+518h+var_4CC] cmovz esi, edx cmovz edx, [rsp+518h+var_4C4] shl rdx, 20h or rdx, rsi loc_84F94: mov esi, 1Eh cmp ecx, [rsp+518h+var_468] jnz short loc_8500B cmp rax, [rsp+518h+var_460] jnz short loc_8500B cmp rdx, [rsp+518h+var_458] jnz short loc_8500B loc_84FB6: mov rdi, [rbx+40h] mov rsi, [rsp+518h+var_508] call qword ptr [rbx+30h] bt r15d, 0Dh jb loc_84BEA lea rdx, mz_zip_compute_crc32_callback lea rcx, [rsp+518h+var_4F4] mov rdi, rbx mov esi, ebp xor r8d, r8d call mz_zip_reader_extract_to_callback test eax, eax jz loc_84C7A mov eax, [rsp+518h+var_4F4] cmp eax, [rsp+518h+var_468] jz loc_84BEA mov dword ptr [rbx+1Ch], 1Eh jmp loc_84C7A loc_8500B: mov [rbx+1Ch], esi jmp short loc_8501D loc_85010: cmp dx, 0Fh ja short loc_8502E loc_85016: mov dword ptr [rbx+1Ch], 9 loc_8501D: mov rdi, [rbx+40h] mov rsi, [rsp+518h+var_508] call qword ptr [rbx+30h] jmp loc_84C7A loc_8502E: mov rcx, [rax+4] mov [rsp+518h+var_4E8], rcx mov rax, [rax+0Ch] mov [rsp+518h+var_4F0], rax mov al, 1 mov dword ptr [rsp+518h+var_510], eax jmp loc_84E84
long long mz_zip_validate_file(long long a1, unsigned int a2, __int16 a3) { unsigned int v3; // r14d long long v4; // r12 unsigned int v6; // eax long long v9; // rdx long long v10; // r13 long long v11; // rdx int v12; // eax long long v13; // rax long long v14; // rdx long long v15; // rcx long long v16; // r13 int v17; // esi long long v18; // rax unsigned int v19; // ecx long long v20; // rdx long long v21; // rdx long long v22; // rsi long long v23; // [rsp+8h] [rbp-510h] char v24; // [rsp+8h] [rbp-510h] long long v25; // [rsp+10h] [rbp-508h] long long v26; // [rsp+18h] [rbp-500h] int v27; // [rsp+20h] [rbp-4F8h] int v28; // [rsp+24h] [rbp-4F4h] BYREF long long v29; // [rsp+28h] [rbp-4F0h] long long v30; // [rsp+30h] [rbp-4E8h] int v31; // [rsp+38h] [rbp-4E0h] int v32; // [rsp+3Ch] [rbp-4DCh] BYREF unsigned int v33; // [rsp+40h] [rbp-4D8h] BYREF unsigned int v34; // [rsp+44h] [rbp-4D4h] unsigned int v35; // [rsp+48h] [rbp-4D0h] unsigned int v36; // [rsp+4Ch] [rbp-4CCh] unsigned int v37; // [rsp+50h] [rbp-4C8h] unsigned int v38; // [rsp+54h] [rbp-4C4h] int v39; // [rsp+60h] [rbp-4B8h] BYREF unsigned __int16 v40; // [rsp+66h] [rbp-4B2h] int v41; // [rsp+6Eh] [rbp-4AAh] unsigned int v42; // [rsp+72h] [rbp-4A6h] unsigned int v43; // [rsp+76h] [rbp-4A2h] unsigned __int16 v44; // [rsp+7Ah] [rbp-49Eh] unsigned __int16 v45; // [rsp+7Ch] [rbp-49Ch] long long v46; // [rsp+80h] [rbp-498h] long long v47; // [rsp+88h] [rbp-490h] _BYTE v48[22]; // [rsp+90h] [rbp-488h] BYREF __int16 v49; // [rsp+A6h] [rbp-472h] int v50; // [rsp+B0h] [rbp-468h] long long v51; // [rsp+B8h] [rbp-460h] long long v52; // [rsp+C0h] [rbp-458h] long long v53; // [rsp+D0h] [rbp-448h] int v54; // [rsp+DCh] [rbp-43Ch] int v55; // [rsp+E0h] [rbp-438h] int v56; // [rsp+E4h] [rbp-434h] _BYTE v57[1072]; // [rsp+E8h] [rbp-430h] BYREF v3 = 0; v32 = 0; v28 = 0; if ( a1 ) { v4 = *(_QWORD *)(a1 + 104); if ( !v4 || !*(_QWORD *)(a1 + 40) || !*(_QWORD *)(a1 + 48) || !*(_QWORD *)(a1 + 72) || (v6 = *(_DWORD *)(a1 + 16), v6 < a2) ) { *(_DWORD *)(a1 + 28) = 24; return v3; } v3 = 0; v9 = v6 <= a2 ? 0LL : *(_QWORD *)v4 + *(unsigned int *)(*(_QWORD *)(v4 + 32) + 4LL * a2); if ( (unsigned int)mz_zip_file_stat_internal(a1, a2, v9, v48, &v32) ) { v3 = 1; if ( !v54 ) { if ( v52 ) { if ( v55 ) { *(_DWORD *)(a1 + 28) = 5; return 0; } if ( (v49 & 0xFFF7) != 0 ) { *(_DWORD *)(a1 + 28) = 4; return 0; } if ( !v56 ) { *(_DWORD *)(a1 + 28) = 6; return 0; } v10 = v53; if ( (*(long long ( **)(_QWORD, long long, int *, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v53, &v39, 30LL) != 30 ) { *(_DWORD *)(a1 + 28) = 20; return 0; } if ( v39 != 67324752 || (v23 = v44, v26 = v45, v29 = v42, v30 = v43, v27 = v41, v31 = v40, strlen(v57) != v23) || (v11 = v23 + v10 + 30, (unsigned long long)(v11 + v26 + v51) > *(_QWORD *)a1) ) { *(_DWORD *)(a1 + 28) = 9; return 0; } v12 = v26; v46 = v23 + v10 + 30; v47 = v11 + v26; if ( (unsigned __int16)v23 > (unsigned __int16)v26 ) v12 = v23; if ( v12 ) { v25 = (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD))(a1 + 56))( *(_QWORD *)(a1 + 64), 0LL, 1LL, (unsigned __int16)v12); if ( !v25 ) { *(_DWORD *)(a1 + 28) = 16; (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), 0LL); return 0; } } else { v25 = 0LL; } if ( v23 ) { if ( (*(long long ( **)(_QWORD, long long, long long, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v10 + 30, v25, v23) != v23 ) goto LABEL_52; if ( (unsigned int)bcmp(v57, v25) ) { LABEL_37: *(_DWORD *)(a1 + 28) = 30; LABEL_74: (*(void ( **)(_QWORD, long long))(a1 + 48))(*(_QWORD *)(a1 + 64), v25); return 0; } } if ( !(_DWORD)v26 || (_DWORD)v29 != -1 && (_DWORD)v30 != -1 ) { LABEL_46: v24 = 0; goto LABEL_47; } if ( (*(long long ( **)(_QWORD, long long, long long, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v46, v25, v26) == v26 ) { v13 = v25; while ( 1 ) { if ( (unsigned int)v26 <= 3 ) goto LABEL_73; v14 = *(unsigned __int16 *)(v13 + 2); v15 = v14 + 4; if ( (unsigned int)v26 < (int)v14 + 4 ) goto LABEL_73; if ( *(_WORD *)v13 == 1 ) break; v13 += v15; LODWORD(v26) = v26 - v15; if ( !(_DWORD)v26 ) goto LABEL_46; } if ( (unsigned __int16)v14 <= 0xFu ) { LABEL_73: *(_DWORD *)(a1 + 28) = 9; goto LABEL_74; } v30 = *(_QWORD *)(v13 + 4); v29 = *(_QWORD *)(v13 + 12); v24 = 1; LABEL_47: if ( (v31 & 8) == 0 || v29 != 0 || v27 != 0 ) { if ( v27 != v50 || v29 != v51 || v30 != v52 ) goto LABEL_37; } else { v16 = 24LL; if ( !v24 ) v16 = 8LL * (*(_DWORD *)(v4 + 100) != 0) + 16; v17 = 20; if ( (*(long long ( **)(_QWORD, long long, unsigned int *, long long))(a1 + 72))( *(_QWORD *)(a1 + 96), v51 + v47, &v33, v16) != v16 ) goto LABEL_71; v18 = v34; v19 = v33; if ( v33 == 134695760 ) v19 = v34; v20 = v35; if ( v33 == 134695760 ) { v18 = v35; v20 = v36; } if ( ((*(_DWORD *)(v4 + 100) == 0) & (unsigned __int8)~v24) == 0 ) { v18 |= v20 << 32; v21 = v37; v22 = v36; if ( v33 == 134695760 ) { v22 = v37; v21 = v38; } v20 = v22 | (v21 << 32); } v17 = 30; if ( v19 != v50 || v18 != v51 || v20 != v52 ) { LABEL_71: *(_DWORD *)(a1 + 28) = v17; goto LABEL_74; } } (*(void ( **)(_QWORD, long long))(a1 + 48))(*(_QWORD *)(a1 + 64), v25); if ( (a3 & 0x2000) != 0 ) return v3; if ( (unsigned int)mz_zip_reader_extract_to_callback( a1, a2, (long long ( *)(long long, _QWORD, long long))mz_zip_compute_crc32_callback, (long long)&v28, 0) ) { if ( v28 == v50 ) return v3; *(_DWORD *)(a1 + 28) = 30; } return 0; } LABEL_52: *(_DWORD *)(a1 + 28) = 20; goto LABEL_74; } } } } return v3; }
25,740
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O0
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x241bf8(%rip), %rax # 0x2cdee0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x8, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x8c383 leaq 0x241bb2(%rip), %rax # 0x2cdee0 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xfd610 movq %rax, -0x38(%rbp) leaq 0x241b7b(%rip), %rax # 0x2cdee0 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x8c3a2 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xfd610 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
inline_mysql_file_seek_2: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 8 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_8C383 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_8C3A2 loc_8C383: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_8C3A2: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long inline_mysql_file_seek_2( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] long long v9; // [rsp+58h] [rbp-38h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL); if ( !v8 ) return my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14); v9 = my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL); return v9; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3cdee0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x8 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0018c383 LEA RAX,[0x3cdee0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fd610 MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x3cdee0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x0018c3a2 LAB_0018c383: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fd610 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0018c3a2: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
int8 inline_mysql_file_seek (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int8 local_40; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8); if (local_48 == 0) { local_10 = my_seek(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c); local_40 = my_seek(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,0); local_10 = local_40; } return local_10; }
25,741
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_NON_NULL(1) void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) { static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, "internal error: not enough precision"); JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // If the neighbors (and boundaries) of 'value' are always computed for double-precision // numbers, all float's can be recovered using strtod (and strtof). However, the resulting // decimal representations are not exactly "short". // // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) // says "value is converted to a string as if by std::sprintf in the default ("C") locale" // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' // does. // On the other hand, the documentation for 'std::to_chars' requires that "parsing the // representation using the corresponding std::from_chars function recovers value exactly". That // indicates that single precision floating-point numbers should be recovered using // 'std::strtof'. // // NB: If the neighbors are computed for single-precision numbers, there is a single float // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision // value is off by 1 ulp. #if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if) const boundaries w = compute_boundaries(static_cast<double>(value)); #else const boundaries w = compute_boundaries(value); #endif grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jge 0xb7f47 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0xb7f63 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0xb8200 movq 0x10(%r12), %rcx movl 0x18(%r12), %r8d movups (%r12), %xmm0 movups 0x20(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xb8359 addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x35ceb(%rip), %rdi # 0xedc39 leaq 0x35d2e(%rip), %rdx # 0xedc83 leaq 0x3b395(%rip), %rcx # 0xf32f1 movl $0x4589, %esi # imm = 0x4589 jmp 0xb7f7d leaq 0x35ccf(%rip), %rdi # 0xedc39 leaq 0x35d12(%rip), %rdx # 0xedc83 leaq 0x3b492(%rip), %rcx # 0xf340a movl $0x458a, %esi # imm = 0x458A xorl %eax, %eax callq 0x1be90
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_: push r15 push r14 push r12 push rbx sub rsp, 58h movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jge short loc_B7F47 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe short loc_B7F63 mov rbx, rdx mov r14, rsi mov r15, rdi lea r12, [rsp+78h+var_50] mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) mov rcx, [r12+10h] mov r8d, [r12+18h] movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+20h] movups [rsp+78h+var_68], xmm1 movups [rsp+78h+var_78], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn loc_B7F47: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 4589h jmp short loc_B7F7D loc_B7F63: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 458Ah loc_B7F7D: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>( long long a1, long long a2, long long a3, double a4) { long long v5; // r9 char *v7; // rsi int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d _QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF unsigned int v13; // [rsp+40h] [rbp-38h] long long v14; // [rsp+48h] [rbp-30h] long long v15; // [rsp+50h] [rbp-28h] if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v7 = (_BYTE *)(&stru_4588 + 1); ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17801LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); } else { if ( a4 > 0.0 ) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( a1, a2, a3, v12[2], v13, v5, v12[0], v12[1], v14, v15); } v7 = (_BYTE *)(&stru_4588 + 2); ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17802LL, "GGML_ASSERT(%s) failed", "value > 0"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v7, v8, v9, v10, v11); }
grisu2<double>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JGE 0x001b7f47 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x001b7f63 MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x001b8200 MOV RCX,qword ptr [R12 + 0x10] MOV R8D,dword ptr [R12 + 0x18] MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x20] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x001b8359 ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET LAB_001b7f47: LEA RDI,[0x1edc39] LEA RDX,[0x1edc83] LEA RCX,[0x1f32f1] MOV ESI,0x4589 JMP 0x001b7f7d LAB_001b7f63: LEA RDI,[0x1edc39] LEA RDX,[0x1edc83] LEA RCX,[0x1f340a] MOV ESI,0x458a LAB_001b7f7d: XOR EAX,EAX CALL 0x0011be90
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double> (char *param_1,int *param_2,int *param_3,double param_4) { char *pcVar1; int8 uVar2; int8 in_R9; int4 local_50 [2]; int4 uStack_48; int8 local_40; int4 local_38; int4 local_30; int4 uStack_28; if ((ulong)ABS(param_4) < 0x7ff0000000000000) { if (0.0 < param_4) { compute_boundaries<double>((dtoa_impl *)local_50,param_4); grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30, uStack_28); return; } pcVar1 = "value > 0"; uVar2 = 0x458a; } else { pcVar1 = "std::isfinite(value)"; uVar2 = 0x4589; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar2, "GGML_ASSERT(%s) failed",pcVar1); }
25,742
my_wc_mb_bin
eloqsql/strings/ctype-bin.c
int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (s >= e) return MY_CS_TOOSMALL; if (wc < 256) { s[0]= (char) wc; return 1; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_bin: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x375ef xorl %eax, %eax cmpq $0xff, %rsi ja 0x375ef movb %sil, (%rdx) movl $0x1, %eax popq %rbp retq
my_wc_mb_bin: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_375EF xor eax, eax cmp rsi, 0FFh ja short loc_375EF mov [rdx], sil mov eax, 1 loc_375EF: pop rbp retn
long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { result = 0LL; if ( a2 <= 0xFF ) { *a3 = a2; return 1LL; } } return result; }
my_wc_mb_bin: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001375ef XOR EAX,EAX CMP RSI,0xff JA 0x001375ef MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_001375ef: POP RBP RET
int8 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if ((param_3 < param_4) && (uVar1 = 0, param_2 < 0x100)) { *param_3 = (char)param_2; uVar1 = 1; } return uVar1; }
25,743
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const
monkey531[P]llama/common/json.hpp
size_type size() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return 0; } case value_t::array: { // delegate call to array_t::size() return m_data.m_value.array->size(); } case value_t::object: { // delegate call to object_t::size() return m_data.m_value.object->size(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have size 1 return 1; } } }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movzbl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0xb0ced movq 0x10(%rsp), %rax leaq 0x157023(%rip), %rcx # 0x207cd0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq $0x0, 0x20(%rsp) jmp 0xb0cf6 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xb0180 movq %rax, 0x20(%rsp) jmp 0xb0cf6 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xb0d80 movq %rax, 0x20(%rsp) jmp 0xb0cf6 jmp 0xb0ced movq $0x1, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax movzx eax, byte ptr [rax] mov [rsp+28h+var_18], rax sub rax, 9; switch 10 cases ja short def_B0CB4; jumptable 00000000000B0CB4 default case mov rax, [rsp+28h+var_18] lea rcx, jpt_B0CB4 movsxd rax, ds:(jpt_B0CB4 - 207CD0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B0CB6: mov [rsp+28h+var_8], 0; jumptable 00000000000B0CB4 case 0 jmp short loc_B0CF6 loc_B0CC1: mov rax, [rsp+28h+var_20]; jumptable 00000000000B0CB4 case 2 mov rdi, [rax+8] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void) mov [rsp+28h+var_8], rax jmp short loc_B0CF6 loc_B0CD6: mov rax, [rsp+28h+var_20]; jumptable 00000000000B0CB4 case 1 mov rdi, [rax+8] call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE4sizeEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::size(void) mov [rsp+28h+var_8], rax jmp short loc_B0CF6 loc_B0CEB: jmp short $+2; jumptable 00000000000B0CB4 cases 3-9 def_B0CB4: mov [rsp+28h+var_8], 1; jumptable 00000000000B0CB4 default case loc_B0CF6: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size( long long a1) { long long v2; // [rsp+20h] [rbp-8h] switch ( *(_BYTE *)a1 ) { case 0: v2 = 0LL; break; case 1: v2 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::size(*(_QWORD *)(a1 + 8)); break; case 2: v2 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD **)(a1 + 8)); break; default: v2 = 1LL; break; } return v2; }
size: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x9 JA 0x001b0ced MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x307cd0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV qword ptr [RSP + 0x20],0x0 JMP 0x001b0cf6 caseD_2: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001b0180 MOV qword ptr [RSP + 0x20],RAX JMP 0x001b0cf6 caseD_1: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001b0d80 MOV qword ptr [RSP + 0x20],RAX JMP 0x001b0cf6 caseD_3: JMP 0x001b0ced default: MOV qword ptr [RSP + 0x20],0x1 LAB_001b0cf6: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::size() const */ int8 __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { int8 local_8; switch(*this) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0: local_8 = 0; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1: local_8 = std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::size(*(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: local_8 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x4: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x9: default: local_8 = 1; } return local_8; }
25,744
reset_table_lock_waits_by_table_handle()
eloqsql/storage/perfschema/pfs_events_waits.cc
void reset_table_lock_waits_by_table_handle() { global_table_container.apply(fct_reset_table_lock_waits_by_table_handle); }
O3
cpp
reset_table_lock_waits_by_table_handle(): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx xorl %r14d, %r14d leaq 0x35d956(%rip), %r15 # 0x3a34e8 movq 0xa8(%r15,%r14,8), %rax testq %rax, %rax je 0x45bd5 movq 0x50(%rax), %rcx testq %rcx, %rcx jle 0x45bd5 movq 0x48(%rax), %rbx imulq $0x2440, %rcx, %r12 # imm = 0x2440 addq %rbx, %r12 movl 0x8(%rbx), %eax andl $0x3, %eax cmpl $0x2, %eax jne 0x45bc9 movq %rbx, %rdi callq 0x37d7e addq $0x2440, %rbx # imm = 0x2440 cmpq %r12, %rbx jb 0x45bb6 incq %r14 cmpq $0x400, %r14 # imm = 0x400 jne 0x45b92 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_Z38reset_table_lock_waits_by_table_handlev: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx xor r14d, r14d lea r15, global_table_container loc_45B92: mov rax, [r15+r14*8+0A8h] test rax, rax jz short loc_45BD5 mov rcx, [rax+50h] test rcx, rcx jle short loc_45BD5 mov rbx, [rax+48h] imul r12, rcx, 2440h add r12, rbx loc_45BB6: mov eax, [rbx+8] and eax, 3 cmp eax, 2 jnz short loc_45BC9 mov rdi, rbx; this call _ZN9PFS_table24sanitized_aggregate_lockEv; PFS_table::sanitized_aggregate_lock(void) loc_45BC9: add rbx, 2440h cmp rbx, r12 jb short loc_45BB6 loc_45BD5: inc r14 cmp r14, 400h jnz short loc_45B92 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long reset_table_lock_waits_by_table_handle(void) { long long i; // r14 long long result; // rax long long v2; // rcx unsigned long long v3; // rbx unsigned long long v4; // r12 for ( i = 0LL; i != 1024; ++i ) { result = global_table_container[i + 21]; if ( result ) { v2 = *(_QWORD *)(result + 80); if ( v2 > 0 ) { v3 = *(_QWORD *)(result + 72); v4 = v3 + 9280 * v2; do { result = *(_DWORD *)(v3 + 8) & 3; if ( (_DWORD)result == 2 ) result = (long long)PFS_table::sanitized_aggregate_lock((PFS_table_share **)v3); v3 += 9280LL; } while ( v3 < v4 ); } } } return result; }
reset_table_lock_waits_by_table_handle: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX XOR R14D,R14D LEA R15,[0x4a34e8] LAB_00145b92: MOV RAX,qword ptr [R15 + R14*0x8 + 0xa8] TEST RAX,RAX JZ 0x00145bd5 MOV RCX,qword ptr [RAX + 0x50] TEST RCX,RCX JLE 0x00145bd5 MOV RBX,qword ptr [RAX + 0x48] IMUL R12,RCX,0x2440 ADD R12,RBX LAB_00145bb6: MOV EAX,dword ptr [RBX + 0x8] AND EAX,0x3 CMP EAX,0x2 JNZ 0x00145bc9 MOV RDI,RBX CALL 0x00137d7e LAB_00145bc9: ADD RBX,0x2440 CMP RBX,R12 JC 0x00145bb6 LAB_00145bd5: INC R14 CMP R14,0x400 JNZ 0x00145b92 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* reset_table_lock_waits_by_table_handle() */ void reset_table_lock_waits_by_table_handle(void) { long lVar1; PFS_table *this; PFS_table *pPVar2; long lVar3; lVar3 = 0; do { lVar1 = *(long *)(global_table_container + lVar3 * 8 + 0xa8); if ((lVar1 != 0) && (0 < *(long *)(lVar1 + 0x50))) { this = *(PFS_table **)(lVar1 + 0x48); pPVar2 = this + *(long *)(lVar1 + 0x50) * 0x2440; do { if ((*(uint *)(this + 8) & 3) == 2) { PFS_table::sanitized_aggregate_lock(this); } this = this + 0x2440; } while (this < pPVar2); } lVar3 = lVar3 + 1; } while (lVar3 != 0x400); return; }
25,745
common_sampler_accept(common_sampler*, int, bool)
monkey531[P]llama/common/sampling.cpp
void common_sampler_accept(struct common_sampler * gsmpl, llama_token token, bool accept_grammar) { if (accept_grammar) { llama_sampler_accept(gsmpl->grmr, token); } llama_sampler_accept(gsmpl->chain, token); gsmpl->prev.push_back(token); }
O3
cpp
common_sampler_accept(common_sampler*, int, bool): pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx testl %edx, %edx je 0xcd051 movq 0x138(%rbx), %rdi movl %ebp, %esi callq 0x1a4c0 movq 0x140(%rbx), %rdi movl %ebp, %esi callq 0x1a4c0 movq 0x148(%rbx), %rcx movq 0x150(%rbx), %rsi cmpq %rcx, %rsi jne 0xcd08a movq 0x158(%rbx), %rax incq %rax xorl %edx, %edx divq %rsi movq %rdx, 0x158(%rbx) jmp 0xcd094 incq %rsi movq %rsi, 0x150(%rbx) movq 0x160(%rbx), %rax movq 0x168(%rbx), %rdx movl %ebp, (%rdx,%rax,4) incq %rax xorl %edx, %edx divq %rcx movq %rdx, 0x160(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
_Z21common_sampler_acceptP14common_samplerib: push rbp push rbx push rax mov ebp, esi mov rbx, rdi test edx, edx jz short loc_CD051 mov rdi, [rbx+138h] mov esi, ebp call _llama_sampler_accept loc_CD051: mov rdi, [rbx+140h] mov esi, ebp call _llama_sampler_accept mov rcx, [rbx+148h] mov rsi, [rbx+150h] cmp rsi, rcx jnz short loc_CD08A mov rax, [rbx+158h] inc rax xor edx, edx div rsi mov [rbx+158h], rdx jmp short loc_CD094 loc_CD08A: inc rsi mov [rbx+150h], rsi loc_CD094: mov rax, [rbx+160h] mov rdx, [rbx+168h] mov [rdx+rax*4], ebp inc rax xor edx, edx div rcx mov [rbx+160h], rdx add rsp, 8 pop rbx pop rbp retn
unsigned long long common_sampler_accept(_QWORD *a1, unsigned int a2, int a3) { unsigned long long v4; // rcx unsigned long long v5; // rsi long long v6; // rax unsigned long long result; // rax unsigned long long v8; // rtt if ( a3 ) llama_sampler_accept(a1[39], a2); llama_sampler_accept(a1[40], a2); v4 = a1[41]; v5 = a1[42]; if ( v5 == v4 ) a1[43] = (a1[43] + 1LL) % v5; else a1[42] = v5 + 1; v6 = a1[44]; *(_DWORD *)(a1[45] + 4 * v6) = a2; v8 = v6 + 1; result = (v6 + 1) / v4; a1[44] = v8 % v4; return result; }
common_sampler_accept: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI TEST EDX,EDX JZ 0x001cd051 MOV RDI,qword ptr [RBX + 0x138] MOV ESI,EBP CALL 0x0011a4c0 LAB_001cd051: MOV RDI,qword ptr [RBX + 0x140] MOV ESI,EBP CALL 0x0011a4c0 MOV RCX,qword ptr [RBX + 0x148] MOV RSI,qword ptr [RBX + 0x150] CMP RSI,RCX JNZ 0x001cd08a MOV RAX,qword ptr [RBX + 0x158] INC RAX XOR EDX,EDX DIV RSI MOV qword ptr [RBX + 0x158],RDX JMP 0x001cd094 LAB_001cd08a: INC RSI MOV qword ptr [RBX + 0x150],RSI LAB_001cd094: MOV RAX,qword ptr [RBX + 0x160] MOV RDX,qword ptr [RBX + 0x168] MOV dword ptr [RDX + RAX*0x4],EBP INC RAX XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x160],RDX ADD RSP,0x8 POP RBX POP RBP RET
/* common_sampler_accept(common_sampler*, int, bool) */ ulong common_sampler_accept(common_sampler *param_1,int param_2,bool param_3) { ulong uVar1; long lVar2; ulong uVar3; int7 in_register_00000011; if ((int)CONCAT71(in_register_00000011,param_3) != 0) { llama_sampler_accept(*(int8 *)(param_1 + 0x138),param_2); } llama_sampler_accept(*(int8 *)(param_1 + 0x140),param_2); uVar1 = *(ulong *)(param_1 + 0x148); uVar3 = *(ulong *)(param_1 + 0x150); if (uVar3 == uVar1) { *(ulong *)(param_1 + 0x158) = (*(long *)(param_1 + 0x158) + 1U) % uVar3; } else { *(ulong *)(param_1 + 0x150) = uVar3 + 1; } lVar2 = *(long *)(param_1 + 0x160); *(int *)(*(long *)(param_1 + 0x168) + lVar2 * 4) = param_2; uVar3 = lVar2 + 1; *(ulong *)(param_1 + 0x160) = uVar3 % uVar1; return uVar3 / uVar1; }
25,746
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
T& at(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it->second; } } JSON_THROW(std::out_of_range("key not found")); }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rbx cmpq 0x8(%r15), %rbx je 0x6e4f4 movq %rbx, %rdi movq %r14, %rsi callq 0x684bc testb %al, %al jne 0x6e4e7 addq $0x60, %rbx jmp 0x6e4cc addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x47db0(%rip), %rsi # 0xb62b6 movq %rax, %rdi callq 0x24100 movq 0x91aa3(%rip), %rsi # 0xfffb8 movq 0x91a7c(%rip), %rdx # 0xfff98 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_: push r15 push r14 push rbx mov r14, rsi mov r15, rdi mov rbx, [rdi] loc_6E4CC: cmp rbx, [r15+8] jz short loc_6E4F4 mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jnz short loc_6E4E7 add rbx, 60h ; '`' jmp short loc_6E4CC loc_6E4E7: add rbx, 10h mov rax, rbx pop rbx pop r14 pop r15 retn loc_6E4F4: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aKeyNotFound; "key not found" mov rdi, rax; this call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*) mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
unsigned __int8 * nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at( unsigned __int8 **a1, unsigned __int8 *a2, __m128d a3) { unsigned __int8 *i; // rbx std::out_of_range *exception; // rbx for ( i = *a1; ; i += 96 ) { if ( i == a1[1] ) { exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL); std::out_of_range::out_of_range(exception, "key not found"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))&std::out_of_range::~out_of_range); } if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) ) break; } return i + 16; }
at: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI MOV RBX,qword ptr [RDI] LAB_0016e4cc: CMP RBX,qword ptr [R15 + 0x8] JZ 0x0016e4f4 MOV RDI,RBX MOV RSI,R14 CALL 0x001684bc TEST AL,AL JNZ 0x0016e4e7 ADD RBX,0x60 JMP 0x0016e4cc LAB_0016e4e7: ADD RBX,0x10 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_0016e4f4: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016e4ff: LEA RSI,[0x1b62b6] MOV RDI,RAX CALL 0x00124100 LAB_0016e50e: MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff98] MOV RDI,RBX CALL 0x00124ee0
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { char cVar1; out_of_range *this_00; basic_json *pbVar2; pbVar2 = *(basic_json **)this; while( true ) { if (pbVar2 == *(basic_json **)(this + 8)) { this_00 = (out_of_range *)__cxa_allocate_exception(0x10); /* try { // try from 0016e4ff to 0016e50d has its CatchHandler @ 0016e524 */ std::out_of_range::out_of_range(this_00,"key not found"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fffb8,PTR__out_of_range_001fff98); } cVar1 = json_abi_v3_11_3::operator==(pbVar2,param_1); if (cVar1 != '\0') break; pbVar2 = pbVar2 + 0x60; } return pbVar2 + 0x10; }
25,747
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/./json.hpp
static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser( InputAdapterType adapter, detail::parser_callback_t<basic_json>cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false ) { return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter), std::move(cb), allow_exceptions, ignore_comments); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movq %rsi, 0x20(%rsp) movq %rdx, 0x28(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq 0x18(%rcx), %rax movq %rax, 0x18(%rsp) movq 0x10(%rcx), %rax testq %rax, %rax je 0x4463d movups (%rcx), %xmm1 addq $0x10, %rcx movaps %xmm1, (%rsp) movq %rax, 0x10(%rsp) movups %xmm0, (%rcx) movzbl %r8b, %ecx movzbl %r9b, %r8d leaq 0x20(%rsp), %rsi movq %rsp, %rdx movq %rbx, %rdi callq 0x44cf0 movq 0x10(%rsp), %rax testq %rax, %rax je 0x4466c movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x30, %rsp popq %rbx retq jmp 0x44699 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x44691 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x18b90 movq %rax, %rdi callq 0x2ad73 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb: push rbx sub rsp, 30h mov rbx, rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_10], rdx xorps xmm0, xmm0 movaps [rsp+38h+var_38], xmm0 mov [rsp+38h+var_28], 0 mov rax, [rcx+18h] mov [rsp+38h+var_20], rax mov rax, [rcx+10h] test rax, rax jz short loc_4463D movups xmm1, xmmword ptr [rcx] add rcx, 10h movaps [rsp+38h+var_38], xmm1 mov [rsp+38h+var_28], rax movups xmmword ptr [rcx], xmm0 loc_4463D: movzx ecx, r8b movzx r8d, r9b lea rsi, [rsp+38h+var_18] mov rdx, rsp mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>&&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) mov rax, [rsp+38h+var_28] test rax, rax jz short loc_4466C mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_4466C: mov rax, rbx add rsp, 30h pop rbx retn jmp short loc_44699 mov rbx, rax mov rax, [rsp+38h+var_28] test rax, rax jz short loc_44691 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_44691: mov rdi, rbx call __Unwind_Resume loc_44699: mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( long long a1, long long a2, long long a3, __int128 *a4, unsigned __int8 a5, unsigned __int8 a6) { void ( *v6)(__int128 *, __int128 *, long long); // rax __int128 v8; // [rsp+0h] [rbp-38h] BYREF void ( *v9)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-28h] long long v10; // [rsp+18h] [rbp-20h] _QWORD v11[3]; // [rsp+20h] [rbp-18h] BYREF v11[0] = a2; v11[1] = a3; v8 = 0LL; v9 = 0LL; v10 = *((_QWORD *)a4 + 3); v6 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a4 + 2); if ( v6 ) { v8 = *a4; v9 = v6; a4[1] = 0LL; } ((void ( *)(long long, _QWORD *, __int128 *, _QWORD, _QWORD))nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser)( a1, v11, &v8, a5, a6); if ( v9 ) v9(&v8, &v8, 3LL); return a1; }
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>: PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x28],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RCX + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RCX + 0x10] TEST RAX,RAX JZ 0x0014463d MOVUPS XMM1,xmmword ptr [RCX] ADD RCX,0x10 MOVAPS xmmword ptr [RSP],XMM1 MOV qword ptr [RSP + 0x10],RAX MOVUPS xmmword ptr [RCX],XMM0 LAB_0014463d: MOVZX ECX,R8B MOVZX R8D,R9B LEA RSI,[RSP + 0x20] MOV RDX,RSP MOV RDI,RBX CALL 0x00144cf0 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0014466c LAB_0014465f: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0014466c: MOV RAX,RBX ADD RSP,0x30 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> * nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *param_1,int8 param_2,int8 param_3,int8 *param_4,int1 param_5, int1 param_6) { code *pcVar1; int8 local_38; int8 uStack_30; code *local_28; int8 local_20; int8 local_18; int8 local_10; local_38 = 0; uStack_30 = 0; local_28 = (code *)0x0; local_20 = param_4[3]; pcVar1 = (code *)param_4[2]; if (pcVar1 != (code *)0x0) { local_38 = *param_4; uStack_30 = param_4[1]; param_4[2] = 0; param_4[3] = 0; local_28 = pcVar1; } /* try { // try from 0014463d to 00144654 has its CatchHandler @ 00144677 */ local_18 = param_2; local_10 = param_3; detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parser(param_1,&local_18,&local_38,param_5,param_6); if (local_28 != (code *)0x0) { /* try { // try from 0014465f to 0014466b has its CatchHandler @ 00144675 */ (*local_28)(&local_38,&local_38,3); } return param_1; }
25,748
pack_dirname
eloqsql/mysys/mf_pack.c
void pack_dirname(char * to, const char *from) { int cwd_err; size_t d_length,length,UNINIT_VAR(buff_length); char * start; char buff[FN_REFLEN + 1]; DBUG_ENTER("pack_dirname"); (void) intern_filename(to,from); /* Change to intern name */ #ifdef FN_DEVCHAR if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */ start++; else #endif start=to; if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0)))) { buff_length= strlen(buff); d_length= (size_t) (start-to); if ((start == to || (buff_length == d_length && !memcmp(buff,start,d_length))) && *start != FN_LIBCHAR && *start) { /* Put current dir before */ bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1); } } if ((d_length= cleanup_dirname(to,to)) != 0) { length=0; if (home_dir) { length= strlen(home_dir); if (home_dir[length-1] == FN_LIBCHAR) length--; /* Don't test last '/' */ } if (length > 1 && length < d_length) { /* test if /xx/yy -> ~/yy */ if (memcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR) { to[0]=FN_HOMELIB; /* Filename begins with ~ */ (void) strmov_overlapp(to+1,to+length); } } if (! cwd_err) { /* Test if cwd is ~/... */ if (length > 1 && length < buff_length) { if (memcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR) { buff[0]=FN_HOMELIB; (void) strmov_overlapp(buff+1,buff+length); } } if (is_prefix(to,buff)) { length= strlen(buff); if (to[length]) (void) strmov_overlapp(to,to+length); /* Remove everything before */ else { to[0]= FN_CURLIB; /* Put ./ instead of cwd */ to[1]= FN_LIBCHAR; to[2]= '\0'; } } } } DBUG_PRINT("exit",("to: '%s'",to)); DBUG_VOID_RETURN; }
O0
c
pack_dirname: pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0xea600 movq -0x218(%rbp), %rax movq %rax, -0x248(%rbp) leaq -0x210(%rbp), %rdi movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0xf1ac0 movl %eax, -0x224(%rbp) cmpl $0x0, %eax jne 0xea3c7 leaq -0x210(%rbp), %rdi callq 0x29310 movq %rax, -0x240(%rbp) movq -0x248(%rbp), %rax movq -0x218(%rbp), %rcx subq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x248(%rbp), %rax cmpq -0x218(%rbp), %rax je 0xea33b movq -0x240(%rbp), %rax cmpq -0x230(%rbp), %rax jne 0xea3c5 leaq -0x210(%rbp), %rdi movq -0x248(%rbp), %rsi movq -0x230(%rbp), %rdx callq 0x297a0 cmpl $0x0, %eax jne 0xea3c5 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0xea3c5 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xea3c5 movq -0x218(%rbp), %rax movq %rax, -0x268(%rbp) movq -0x230(%rbp), %rax movq %rax, -0x260(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x258(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x250(%rbp) movq -0x218(%rbp), %rdi callq 0x29310 movq -0x268(%rbp), %rdi movq -0x260(%rbp), %rsi movq -0x258(%rbp), %rdx movq -0x250(%rbp), %rcx movq %rax, %r8 addq $0x1, %r8 callq 0x10c620 jmp 0xea3c7 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi callq 0xea6f0 movq %rax, -0x230(%rbp) cmpq $0x0, %rax je 0xea5cd movq $0x0, -0x238(%rbp) leaq 0xb9a5fb(%rip), %rax # 0xc849f8 cmpq $0x0, (%rax) je 0xea44b leaq 0xb9a5ee(%rip), %rax # 0xc849f8 movq (%rax), %rdi callq 0x29310 movq %rax, -0x238(%rbp) leaq 0xb9a5d8(%rip), %rax # 0xc849f8 movq (%rax), %rax movq -0x238(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0xea449 movq -0x238(%rbp), %rax addq $-0x1, %rax movq %rax, -0x238(%rbp) jmp 0xea44b cmpq $0x1, -0x238(%rbp) jbe 0xea4c8 movq -0x238(%rbp), %rax cmpq -0x230(%rbp), %rax jae 0xea4c8 movq -0x218(%rbp), %rdi leaq 0xb9a585(%rip), %rax # 0xc849f8 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x297a0 cmpl $0x0, %eax jne 0xea4c6 movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0xea4c6 movq -0x218(%rbp), %rax movb $0x7e, (%rax) movq -0x218(%rbp), %rdi addq $0x1, %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x150f80 jmp 0xea4c8 cmpl $0x0, -0x224(%rbp) jne 0xea5cb cmpq $0x1, -0x238(%rbp) jbe 0xea54c movq -0x238(%rbp), %rax cmpq -0x240(%rbp), %rax jae 0xea54c leaq -0x210(%rbp), %rdi leaq 0xb9a4fb(%rip), %rax # 0xc849f8 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x297a0 cmpl $0x0, %eax jne 0xea54a movq -0x238(%rbp), %rax movsbl -0x210(%rbp,%rax), %eax cmpl $0x2f, %eax jne 0xea54a movb $0x7e, -0x210(%rbp) leaq -0x210(%rbp), %rdi addq $0x1, %rdi leaq -0x210(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x150f80 jmp 0xea54c movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x14bea0 cmpl $0x0, %eax je 0xea5c9 leaq -0x210(%rbp), %rdi callq 0x29310 movq %rax, -0x238(%rbp) movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0xea5a7 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x150f80 jmp 0xea5c7 movq -0x218(%rbp), %rax movb $0x2e, (%rax) movq -0x218(%rbp), %rax movb $0x2f, 0x1(%rax) movq -0x218(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0xea5c9 jmp 0xea5cb jmp 0xea5cd jmp 0xea5cf jmp 0xea5d1 jmp 0xea5d3 jmp 0xea5d5 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xea5f0 addq $0x270, %rsp # imm = 0x270 popq %rbp retq callq 0x29230 nopw %cs:(%rax,%rax)
pack_dirname: push rbp mov rbp, rsp sub rsp, 270h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_240] mov [rbp+var_240], rax mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] call intern_filename mov rax, [rbp+var_218] mov [rbp+var_248], rax lea rdi, [rbp+var_210] mov esi, 200h xor eax, eax mov edx, eax call my_getwd mov [rbp+var_224], eax cmp eax, 0 jnz loc_EA3C7 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_240], rax mov rax, [rbp+var_248] mov rcx, [rbp+var_218] sub rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_248] cmp rax, [rbp+var_218] jz short loc_EA33B mov rax, [rbp+var_240] cmp rax, [rbp+var_230] jnz loc_EA3C5 lea rdi, [rbp+var_210] mov rsi, [rbp+var_248] mov rdx, [rbp+var_230] call _memcmp cmp eax, 0 jnz loc_EA3C5 loc_EA33B: mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_EA3C5 mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_EA3C5 mov rax, [rbp+var_218] mov [rbp+var_268], rax mov rax, [rbp+var_230] mov [rbp+var_260], rax lea rax, [rbp+var_210] mov [rbp+var_258], rax mov rax, [rbp+var_240] mov [rbp+var_250], rax mov rdi, [rbp+var_218] call _strlen mov rdi, [rbp+var_268] mov rsi, [rbp+var_260] mov rdx, [rbp+var_258] mov rcx, [rbp+var_250] mov r8, rax add r8, 1 call bchange loc_EA3C5: jmp short $+2 loc_EA3C7: mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] call cleanup_dirname mov [rbp+var_230], rax cmp rax, 0 jz loc_EA5CD mov [rbp+var_238], 0 lea rax, home_dir cmp qword ptr [rax], 0 jz short loc_EA44B lea rax, home_dir mov rdi, [rax] call _strlen mov [rbp+var_238], rax lea rax, home_dir mov rax, [rax] mov rcx, [rbp+var_238] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_EA449 mov rax, [rbp+var_238] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_238], rax loc_EA449: jmp short $+2 loc_EA44B: cmp [rbp+var_238], 1 jbe short loc_EA4C8 mov rax, [rbp+var_238] cmp rax, [rbp+var_230] jnb short loc_EA4C8 mov rdi, [rbp+var_218] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_EA4C6 mov rax, [rbp+var_218] mov rcx, [rbp+var_238] movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_EA4C6 mov rax, [rbp+var_218] mov byte ptr [rax], 7Eh ; '~' mov rdi, [rbp+var_218] add rdi, 1 mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp loc_EA4C6: jmp short $+2 loc_EA4C8: cmp [rbp+var_224], 0 jnz loc_EA5CB cmp [rbp+var_238], 1 jbe short loc_EA54C mov rax, [rbp+var_238] cmp rax, [rbp+var_240] jnb short loc_EA54C lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_EA54A mov rax, [rbp+var_238] movsx eax, [rbp+rax+var_210] cmp eax, 2Fh ; '/' jnz short loc_EA54A mov [rbp+var_210], 7Eh ; '~' lea rdi, [rbp+var_210] add rdi, 1 lea rsi, [rbp+var_210] add rsi, [rbp+var_238] call strmov_overlapp loc_EA54A: jmp short $+2 loc_EA54C: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call is_prefix cmp eax, 0 jz short loc_EA5C9 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_238], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_238] cmp byte ptr [rax+rcx], 0 jz short loc_EA5A7 mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp jmp short loc_EA5C7 loc_EA5A7: mov rax, [rbp+var_218] mov byte ptr [rax], 2Eh ; '.' mov rax, [rbp+var_218] mov byte ptr [rax+1], 2Fh ; '/' mov rax, [rbp+var_218] mov byte ptr [rax+2], 0 loc_EA5C7: jmp short $+2 loc_EA5C9: jmp short $+2 loc_EA5CB: jmp short $+2 loc_EA5CD: jmp short $+2 loc_EA5CF: jmp short $+2 loc_EA5D1: jmp short $+2 loc_EA5D3: jmp short $+2 loc_EA5D5: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_EA5F0 add rsp, 270h pop rbp retn loc_EA5F0: call ___stack_chk_fail
unsigned long long pack_dirname(_BYTE *a1, long long a2) { long long v2; // rax unsigned long long v4; // [rsp+30h] [rbp-240h] unsigned long long v5; // [rsp+38h] [rbp-238h] long long v6; // [rsp+38h] [rbp-238h] long long v7; // [rsp+40h] [rbp-230h] unsigned long long v8; // [rsp+40h] [rbp-230h] int v9; // [rsp+4Ch] [rbp-224h] _BYTE *v10; // [rsp+58h] [rbp-218h] char v11; // [rsp+60h] [rbp-210h] BYREF _BYTE v12[527]; // [rsp+61h] [rbp-20Fh] BYREF *(_QWORD *)&v12[519] = __readfsqword(0x28u); v10 = a1; intern_filename(a1, a2); v9 = my_getwd(&v11, 512LL, 0LL); if ( !v9 ) { v4 = strlen(&v11); v7 = a1 - v10; if ( (a1 == v10 || v4 == v7 && !(unsigned int)memcmp(&v11, a1, v7)) && *a1 != 47 && *a1 ) { v2 = strlen(v10); bchange(v10, v7, &v11, v4, v2 + 1); } } v8 = cleanup_dirname(v10, v10); if ( v8 ) { v5 = 0LL; if ( home_dir ) { v5 = strlen(home_dir); if ( *(_BYTE *)(home_dir + v5 - 1) == 47 ) --v5; } if ( v5 > 1 && v5 < v8 && !(unsigned int)memcmp(v10, home_dir, v5) && v10[v5] == 47 ) { *v10 = 126; strmov_overlapp(v10 + 1, &v10[v5]); } if ( !v9 ) { if ( v5 > 1 && v5 < v4 && !(unsigned int)memcmp(&v11, home_dir, v5) && v12[v5 - 1] == 47 ) { v11 = 126; strmov_overlapp(v12, &v12[v5 - 1]); } if ( (unsigned int)is_prefix(v10, &v11) ) { v6 = strlen(&v11); if ( v10[v6] ) { strmov_overlapp(v10, &v10[v6]); } else { *v10 = 46; v10[1] = 47; v10[2] = 0; } } } } return __readfsqword(0x28u); }
pack_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x240],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] CALL 0x001ea600 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x248],RAX LEA RDI,[RBP + -0x210] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x001f1ac0 MOV dword ptr [RBP + -0x224],EAX CMP EAX,0x0 JNZ 0x001ea3c7 LEA RDI,[RBP + -0x210] CALL 0x00129310 MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x248] MOV RCX,qword ptr [RBP + -0x218] SUB RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x248] CMP RAX,qword ptr [RBP + -0x218] JZ 0x001ea33b MOV RAX,qword ptr [RBP + -0x240] CMP RAX,qword ptr [RBP + -0x230] JNZ 0x001ea3c5 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RBP + -0x230] CALL 0x001297a0 CMP EAX,0x0 JNZ 0x001ea3c5 LAB_001ea33b: MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x001ea3c5 MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001ea3c5 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x268],RAX MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x260],RAX LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x218] CALL 0x00129310 MOV RDI,qword ptr [RBP + -0x268] MOV RSI,qword ptr [RBP + -0x260] MOV RDX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x250] MOV R8,RAX ADD R8,0x1 CALL 0x0020c620 LAB_001ea3c5: JMP 0x001ea3c7 LAB_001ea3c7: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] CALL 0x001ea6f0 MOV qword ptr [RBP + -0x230],RAX CMP RAX,0x0 JZ 0x001ea5cd MOV qword ptr [RBP + -0x238],0x0 LEA RAX,[0xd849f8] CMP qword ptr [RAX],0x0 JZ 0x001ea44b LEA RAX,[0xd849f8] MOV RDI,qword ptr [RAX] CALL 0x00129310 MOV qword ptr [RBP + -0x238],RAX LEA RAX,[0xd849f8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x238] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x001ea449 MOV RAX,qword ptr [RBP + -0x238] ADD RAX,-0x1 MOV qword ptr [RBP + -0x238],RAX LAB_001ea449: JMP 0x001ea44b LAB_001ea44b: CMP qword ptr [RBP + -0x238],0x1 JBE 0x001ea4c8 MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x230] JNC 0x001ea4c8 MOV RDI,qword ptr [RBP + -0x218] LEA RAX,[0xd849f8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x001297a0 CMP EAX,0x0 JNZ 0x001ea4c6 MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x001ea4c6 MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x7e MOV RDI,qword ptr [RBP + -0x218] ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x00250f80 LAB_001ea4c6: JMP 0x001ea4c8 LAB_001ea4c8: CMP dword ptr [RBP + -0x224],0x0 JNZ 0x001ea5cb CMP qword ptr [RBP + -0x238],0x1 JBE 0x001ea54c MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x240] JNC 0x001ea54c LEA RDI,[RBP + -0x210] LEA RAX,[0xd849f8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x001297a0 CMP EAX,0x0 JNZ 0x001ea54a MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210] CMP EAX,0x2f JNZ 0x001ea54a MOV byte ptr [RBP + -0x210],0x7e LEA RDI,[RBP + -0x210] ADD RDI,0x1 LEA RSI,[RBP + -0x210] ADD RSI,qword ptr [RBP + -0x238] CALL 0x00250f80 LAB_001ea54a: JMP 0x001ea54c LAB_001ea54c: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x0024bea0 CMP EAX,0x0 JZ 0x001ea5c9 LEA RDI,[RBP + -0x210] CALL 0x00129310 MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x001ea5a7 MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x00250f80 JMP 0x001ea5c7 LAB_001ea5a7: MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x2e MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x1],0x2f MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x2],0x0 LAB_001ea5c7: JMP 0x001ea5c9 LAB_001ea5c9: JMP 0x001ea5cb LAB_001ea5cb: JMP 0x001ea5cd LAB_001ea5cd: JMP 0x001ea5cf LAB_001ea5cf: JMP 0x001ea5d1 LAB_001ea5d1: JMP 0x001ea5d3 LAB_001ea5d3: JMP 0x001ea5d5 LAB_001ea5d5: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001ea5f0 ADD RSP,0x270 POP RBP RET LAB_001ea5f0: CALL 0x00129230
/* WARNING: Removing unreachable block (ram,0x001ea304) */ /* WARNING: Removing unreachable block (ram,0x001ea318) */ void pack_dirname(char *param_1,int8 param_2) { int iVar1; int iVar2; size_t sVar3; ulong uVar4; long in_FS_OFFSET; ulong local_248; ulong local_240; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); intern_filename(param_1,param_2); iVar1 = my_getwd(local_218,0x200,0); if (((iVar1 == 0) && (local_248 = strlen(local_218), *param_1 != '/')) && (*param_1 != '\0')) { sVar3 = strlen(param_1); bchange(param_1,0,local_218,local_248,sVar3 + 1); } uVar4 = cleanup_dirname(param_1,param_1); if (uVar4 != 0) { local_240 = 0; if ((home_dir != (char *)0x0) && (local_240 = strlen(home_dir), home_dir[local_240 - 1] == '/')) { local_240 = local_240 - 1; } if (((1 < local_240) && (local_240 < uVar4)) && ((iVar2 = memcmp(param_1,home_dir,local_240), iVar2 == 0 && (param_1[local_240] == '/')))) { *param_1 = '~'; strmov_overlapp(param_1 + 1,param_1 + local_240); } if (iVar1 == 0) { if ((((1 < local_240) && (local_240 < local_248)) && (iVar1 = memcmp(local_218,home_dir,local_240), iVar1 == 0)) && (local_218[local_240] == '/')) { local_218[0] = '~'; strmov_overlapp(local_218 + 1,local_218 + local_240); } iVar1 = is_prefix(param_1,local_218); if (iVar1 != 0) { sVar3 = strlen(local_218); if (param_1[sVar3] == '\0') { *param_1 = '.'; param_1[1] = '/'; param_1[2] = '\0'; } else { strmov_overlapp(param_1,param_1 + sVar3); } } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,749
js_map_delete
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_delete(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSMapRecord *mr; JSValue key; if (!s) return JS_EXCEPTION; key = map_normalize_key(ctx, argv[0]); mr = map_find_record(ctx, s, key); if (!mr) return JS_FALSE; map_delete_record(ctx->rt, s, mr); return JS_TRUE; }
O2
c
js_map_delete: pushq %r15 pushq %r14 pushq %rbx movq %r8, %r15 movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x24db7 testq %rax, %rax je 0x483bf movq %rax, %r14 movq (%r15), %rdx movq 0x8(%r15), %rcx movl %ecx, %eax xorq $0x7, %rax movq %rdx, %rsi btrq $0x3f, %rsi xorl %r15d, %r15d orq %rax, %rsi cmoveq %r15, %rdx cmoveq %r15, %rcx movq %rbx, %rdi movq %r14, %rsi callq 0x413bd testq %rax, %rax je 0x483c7 movq 0x18(%rbx), %rdi movq %r14, %rsi movq %rax, %rdx callq 0x4871e pushq $0x1 popq %r15 movq %r15, %rdx jmp 0x483ca pushq $0x6 popq %rdx xorl %r15d, %r15d jmp 0x483ca pushq $0x1 popq %rdx movq %r15, %rax popq %rbx popq %r14 popq %r15 retq
js_map_delete: push r15 push r14 push rbx mov r15, r8 mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_483BF mov r14, rax mov rdx, [r15] mov rcx, [r15+8] mov eax, ecx xor rax, 7 mov rsi, rdx btr rsi, 3Fh ; '?' xor r15d, r15d or rsi, rax cmovz rdx, r15 cmovz rcx, r15 mov rdi, rbx mov rsi, r14 call map_find_record test rax, rax jz short loc_483C7 mov rdi, [rbx+18h] mov rsi, r14 mov rdx, rax call map_delete_record push 1 pop r15 mov rdx, r15 jmp short loc_483CA loc_483BF: push 6 pop rdx xor r15d, r15d jmp short loc_483CA loc_483C7: push 1 pop rdx loc_483CA: mov rax, r15 pop rbx pop r14 pop r15 retn
long long js_map_delete(long long a1, long long a2, int a3, __m128d a4, long long a5, long long a6, int a7) { long long Opaque2; // rax long long v9; // r14 _DWORD *v10; // rdx long long v11; // rcx long long v12; // rsi long long v13; // r15 long long record; // rax Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 35); if ( !Opaque2 ) return 0LL; v9 = Opaque2; v10 = *(_DWORD **)a6; v11 = *(_QWORD *)(a6 + 8); v12 = *(_QWORD *)a6 & 0x7FFFFFFFFFFFFFFFLL; v13 = 0LL; if ( !((unsigned int)v11 ^ 7LL | v12) ) { v10 = 0LL; v11 = 0LL; } record = map_find_record(a1, Opaque2, v10, v11, a4); if ( record ) { map_delete_record(*(_QWORD *)(a1 + 24), v9, record); return 1LL; } return v13; }
js_map_delete: PUSH R15 PUSH R14 PUSH RBX MOV R15,R8 MOV RBX,RDI LEA ECX,[R9 + 0x23] CALL 0x00124db7 TEST RAX,RAX JZ 0x001483bf MOV R14,RAX MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV EAX,ECX XOR RAX,0x7 MOV RSI,RDX BTR RSI,0x3f XOR R15D,R15D OR RSI,RAX CMOVZ RDX,R15 CMOVZ RCX,R15 MOV RDI,RBX MOV RSI,R14 CALL 0x001413bd TEST RAX,RAX JZ 0x001483c7 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,RAX CALL 0x0014871e PUSH 0x1 POP R15 MOV RDX,R15 JMP 0x001483ca LAB_001483bf: PUSH 0x6 POP RDX XOR R15D,R15D JMP 0x001483ca LAB_001483c7: PUSH 0x1 POP RDX LAB_001483ca: MOV RAX,R15 POP RBX POP R14 POP R15 RET
int1 [16] js_map_delete(long param_1) { long lVar1; long lVar2; ulong uVar3; ulong uVar4; ulong *in_R8; ulong uVar5; int1 auVar6 [16]; lVar1 = JS_GetOpaque2(); if (lVar1 == 0) { uVar4 = 6; uVar5 = 0; } else { uVar5 = 0; uVar3 = in_R8[1]; uVar4 = *in_R8; if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) { uVar3 = uVar5; uVar4 = uVar5; } lVar2 = map_find_record(param_1,lVar1,uVar4,uVar3); if (lVar2 == 0) { uVar4 = 1; } else { map_delete_record(*(int8 *)(param_1 + 0x18),lVar1,lVar2); uVar4 = 1; uVar5 = uVar4; } } auVar6._8_8_ = uVar4; auVar6._0_8_ = uVar5; return auVar6; }
25,750
ma_update_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_update_static_record(MARIA_HA *info, MARIA_RECORD_POS pos, const uchar *oldrec __attribute__ ((unused)), const uchar *record) { info->rec_cache.seek_not_done=1; /* We have done a seek */ return (info->s->file_write(info, record, info->s->base.reclength, pos, MYF(MY_NABP)) != 0); }
O3
c
ma_update_static_record: pushq %rbp movq %rsp, %rbp movq %rsi, %rax movl $0x1, 0x598(%rdi) movq (%rdi), %r9 movq 0x398(%r9), %rdx movl $0x4, %r8d movq %rcx, %rsi movq %rax, %rcx callq *0x6e8(%r9) testq %rax, %rax setne %al popq %rbp retq
_ma_update_static_record: push rbp mov rbp, rsp mov rax, rsi mov dword ptr [rdi+598h], 1 mov r9, [rdi] mov rdx, [r9+398h] mov r8d, 4 mov rsi, rcx mov rcx, rax call qword ptr [r9+6E8h] test rax, rax setnz al pop rbp retn
bool ma_update_static_record(_DWORD *a1, long long a2, long long a3, long long a4) { a1[358] = 1; return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, a4, *(_QWORD *)(*(_QWORD *)a1 + 920LL), a2, 4LL) != 0; }
_ma_update_static_record: PUSH RBP MOV RBP,RSP MOV RAX,RSI MOV dword ptr [RDI + 0x598],0x1 MOV R9,qword ptr [RDI] MOV RDX,qword ptr [R9 + 0x398] MOV R8D,0x4 MOV RSI,RCX MOV RCX,RAX CALL qword ptr [R9 + 0x6e8] TEST RAX,RAX SETNZ AL POP RBP RET
bool _ma_update_static_record (long *param_1,int8 param_2,int8 param_3,int8 param_4) { long lVar1; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8)) (param_1,param_4,*(int8 *)(*param_1 + 0x398),param_2,4); return lVar1 != 0; }
25,751
set_date_field
bluesky950520[P]quickjs/quickjs.c
static JSValue set_date_field(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _field(obj, first_field, end_field, args, is_local) double fields[9]; int res, first_field, end_field, is_local, i, n; double d, a; d = NAN; first_field = (magic >> 8) & 0x0F; end_field = (magic >> 4) & 0x0F; is_local = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, is_local, first_field == 0); if (res < 0) return JS_EXCEPTION; // Argument coercion is observable and must be done unconditionally. n = min_int(argc, end_field - first_field); for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) res = FALSE; fields[first_field + i] = trunc(a); } if (!res) return JS_NAN; if (argc > 0) d = set_date_fields(fields, is_local); return JS_SetThisTimeValue(ctx, this_val, d); }
O1
c
set_date_field: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, %r12d movq %r8, %r13 movl %ecx, 0x8(%rsp) movq %rdx, %r15 movq %rsi, %rbp movl %r9d, %ebx shrl $0x8, %ebx movl %r9d, %r8d andl $0xf, %r8d xorl %r9d, %r9d andl $0xf, %ebx sete %r9b leaq 0x30(%rsp), %rcx movq %rdi, 0x20(%rsp) movl %r8d, 0xc(%rsp) callq 0x56a69 movl $0x6, %edx testl %eax, %eax js 0x56724 movl %eax, %r14d movq %rbp, 0x10(%rsp) movq %r15, 0x18(%rsp) shrl $0x4, %r12d andl $0xf, %r12d subl %ebx, %r12d movl 0x8(%rsp), %eax cmpl %r12d, %eax cmovll %eax, %r12d testl %r12d, %r12d jle 0x56708 movl %r12d, %ebp movl %ebx, %eax leaq (%rsp,%rax,8), %rbx addq $0x30, %rbx shlq $0x3, %rbp xorl %r12d, %r12d xorl %r15d, %r15d movq (%r13,%r15,2), %rdx movq 0x8(%r13,%r15,2), %rcx movq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x27681 testl %eax, %eax jne 0x56729 movq 0x28(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax cmovgel %r12d, %r14d callq 0xe140 movq %xmm0, (%rbx,%r15) addq $0x8, %r15 cmpq %r15, %rbp jne 0x566b6 testl %r14d, %r14d je 0x56730 cmpl $0x0, 0x8(%rsp) jle 0x56741 leaq 0x30(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x56fc5 jmp 0x56749 xorl %r12d, %r12d jmp 0x56760 movl $0x6, %edx jmp 0x56760 movl $0x7, %edx movabsq $0x7ff8000000000000, %r12 # imm = 0x7FF8000000000000 jmp 0x56760 movq 0x4819f(%rip), %xmm0 # 0x9e8e8 movq 0x18(%rsp), %rdx movq 0x10(%rsp), %rsi movq 0x20(%rsp), %rdi callq 0x56f3c movq %rax, %r12 movq %r12, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
set_date_field: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r12d, r9d mov r13, r8 mov [rsp+0A8h+var_A0], ecx mov r15, rdx mov rbp, rsi mov ebx, r9d shr ebx, 8 mov r8d, r9d and r8d, 0Fh xor r9d, r9d and ebx, 0Fh setz r9b lea rcx, [rsp+0A8h+var_78] mov [rsp+0A8h+var_88], rdi mov [rsp+0A8h+var_9C], r8d call get_date_fields mov edx, 6 test eax, eax js loc_56724 mov r14d, eax mov [rsp+0A8h+var_98], rbp mov [rsp+0A8h+var_90], r15 shr r12d, 4 and r12d, 0Fh sub r12d, ebx mov eax, [rsp+0A8h+var_A0] cmp eax, r12d cmovl r12d, eax test r12d, r12d jle short loc_56708 mov ebp, r12d mov eax, ebx lea rbx, [rsp+rax*8+0A8h+var_A8] add rbx, 30h ; '0' shl rbp, 3 xor r12d, r12d xor r15d, r15d loc_566B6: mov rdx, [r13+r15*2+0] mov rcx, [r13+r15*2+8] mov rdi, [rsp+0A8h+var_88] lea rsi, [rsp+0A8h+var_80] call JS_ToFloat64 test eax, eax jnz short loc_56729 movq xmm0, [rsp+0A8h+var_80] movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx cmovge r14d, r12d call _trunc movq qword ptr [rbx+r15], xmm0 add r15, 8 cmp rbp, r15 jnz short loc_566B6 loc_56708: test r14d, r14d jz short loc_56730 cmp [rsp+0A8h+var_A0], 0 jle short loc_56741 lea rdi, [rsp+0A8h+var_78] mov esi, [rsp+0A8h+var_9C] call set_date_fields jmp short loc_56749 loc_56724: xor r12d, r12d jmp short loc_56760 loc_56729: mov edx, 6 jmp short loc_56760 loc_56730: mov edx, 7 mov r12, 7FF8000000000000h jmp short loc_56760 loc_56741: movq xmm0, cs:qword_9E8E8 loc_56749: mov rdx, [rsp+0A8h+var_90] mov rsi, [rsp+0A8h+var_98] mov rdi, [rsp+0A8h+var_88] call JS_SetThisTimeValue mov r12, rax loc_56760: mov rax, r12 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long set_date_field(long long a1, long long a2, long long a3, int a4, long long a5, unsigned int a6, double a7) { unsigned __int8 v7; // r12 int v10; // ebx int date_fields; // eax int v12; // r14d int v13; // r12d _QWORD *v14; // rbx long long v15; // rbp long long v16; // r12 unsigned long long v17; // r15 long long v18; // rdx unsigned int v21; // [rsp+Ch] [rbp-9Ch] long long v22; // [rsp+18h] [rbp-90h] long long v23; // [rsp+28h] [rbp-80h] BYREF _QWORD v24[15]; // [rsp+30h] [rbp-78h] BYREF v7 = a6; v10 = (a6 >> 8) & 0xF; v21 = a6 & 0xF; date_fields = get_date_fields(a1, a2, a3, v24, a6 & 0xF, v10 == 0); if ( date_fields < 0 ) return 0LL; v12 = date_fields; v22 = a3; v13 = (v7 >> 4) - v10; if ( a4 < v13 ) v13 = a4; if ( v13 <= 0 ) { LABEL_10: if ( v12 ) { if ( a4 <= 0 ) a7 = NAN; else set_date_fields(v24, v21); return JS_SetThisTimeValue(a1, a2, v22, a7); } else { return 0x7FF8000000000000LL; } } else { v14 = &v24[v10]; v15 = 8LL * (unsigned int)v13; v16 = 0LL; v17 = 0LL; while ( !(unsigned int)JS_ToFloat64(a1, (double *)&v23, *(_DWORD **)(a5 + 2 * v17), *(_QWORD *)(a5 + 2 * v17 + 8)) ) { if ( (v23 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) v12 = 0; a7 = trunc(a1, &v23, v18); *(double *)&v14[v17 / 8] = a7; v17 += 8LL; if ( v15 == v17 ) goto LABEL_10; } } return v16; }
set_date_field: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R12D,R9D MOV R13,R8 MOV dword ptr [RSP + 0x8],ECX MOV R15,RDX MOV RBP,RSI MOV EBX,R9D SHR EBX,0x8 MOV R8D,R9D AND R8D,0xf XOR R9D,R9D AND EBX,0xf SETZ R9B LEA RCX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0xc],R8D CALL 0x00156a69 MOV EDX,0x6 TEST EAX,EAX JS 0x00156724 MOV R14D,EAX MOV qword ptr [RSP + 0x10],RBP MOV qword ptr [RSP + 0x18],R15 SHR R12D,0x4 AND R12D,0xf SUB R12D,EBX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,R12D CMOVL R12D,EAX TEST R12D,R12D JLE 0x00156708 MOV EBP,R12D MOV EAX,EBX LEA RBX,[RSP + RAX*0x8] ADD RBX,0x30 SHL RBP,0x3 XOR R12D,R12D XOR R15D,R15D LAB_001566b6: MOV RDX,qword ptr [R13 + R15*0x2] MOV RCX,qword ptr [R13 + R15*0x2 + 0x8] MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x28] CALL 0x00127681 TEST EAX,EAX JNZ 0x00156729 MOVQ XMM0,qword ptr [RSP + 0x28] MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX CMOVGE R14D,R12D CALL 0x0010e140 MOVQ qword ptr [RBX + R15*0x1],XMM0 ADD R15,0x8 CMP RBP,R15 JNZ 0x001566b6 LAB_00156708: TEST R14D,R14D JZ 0x00156730 CMP dword ptr [RSP + 0x8],0x0 JLE 0x00156741 LEA RDI,[RSP + 0x30] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00156fc5 JMP 0x00156749 LAB_00156724: XOR R12D,R12D JMP 0x00156760 LAB_00156729: MOV EDX,0x6 JMP 0x00156760 LAB_00156730: MOV EDX,0x7 MOV R12,0x7ff8000000000000 JMP 0x00156760 LAB_00156741: MOVQ XMM0,qword ptr [0x0019e8e8] LAB_00156749: MOV RDX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x20] CALL 0x00156f3c MOV R12,RAX LAB_00156760: MOV RAX,R12 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 set_date_field(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5, uint param_6) { int iVar1; int iVar2; uint uVar3; uint uVar4; long lVar5; double dVar6; int8 uVar7; double local_80; double local_78 [9]; uVar3 = param_6 >> 8 & 0xf; iVar1 = get_date_fields(); if (iVar1 < 0) { uVar7 = 0; } else { uVar4 = (param_6 >> 4 & 0xf) - uVar3; if ((int)param_4 < (int)uVar4) { uVar4 = param_4; } if (0 < (int)uVar4) { lVar5 = 0; do { iVar2 = JS_ToFloat64(param_1,&local_80,*(int8 *)(param_5 + lVar5 * 2), *(int8 *)(param_5 + 8 + lVar5 * 2)); if (iVar2 != 0) { return 0; } if (0x7fefffffffffffff < (ulong)ABS(local_80)) { iVar1 = 0; } dVar6 = trunc(local_80); *(double *)((long)local_78 + lVar5 + (ulong)uVar3 * 8) = dVar6; lVar5 = lVar5 + 8; } while ((ulong)uVar4 << 3 != lVar5); } if (iVar1 == 0) { uVar7 = 0x7ff8000000000000; } else { uVar7 = DAT_0019e8e8; if (0 < (int)param_4) { uVar7 = set_date_fields(local_78,param_6 & 0xf); } uVar7 = JS_SetThisTimeValue(uVar7,param_1,param_2,param_3); } } return uVar7; }
25,752
common_log_entry::print(_IO_FILE*) const
monkey531[P]llama/common/log.cpp
void print(FILE * file = nullptr) const { FILE * fcur = file; if (!fcur) { // stderr displays DBG messages only when their verbosity level is not higher than the threshold // these messages will still be logged to a file if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) { return; } fcur = stdout; if (level != GGML_LOG_LEVEL_NONE) { fcur = stderr; } } if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) { if (timestamp) { // [M.s.ms.us] fprintf(fcur, "%s%d.%02d.%03d.%03d%s ", g_col[COMMON_LOG_COL_BLUE], (int) (timestamp / 1000000 / 60), (int) (timestamp / 1000000 % 60), (int) (timestamp / 1000 % 1000), (int) (timestamp % 1000), g_col[COMMON_LOG_COL_DEFAULT]); } switch (level) { case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break; case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break; case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break; case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break; default: break; } } fprintf(fcur, "%s", msg.data()); if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) { fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]); } fflush(fcur); }
O0
cpp
common_log_entry::print(_IO_FILE*) const: subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x80(%rsp) cmpq $0x0, 0x80(%rsp) jne 0x1c2f4a movq 0x78(%rsp), %rax cmpl $0x1, (%rax) jne 0x1c2f1a leaq 0xe46f8(%rip), %rax # 0x2a7608 cmpl $0x1, (%rax) jge 0x1c2f1a jmp 0x1c3246 movq 0x78(%rsp), %rax movq 0xe3012(%rip), %rcx # 0x2a5f38 movq (%rcx), %rcx movq %rcx, 0x80(%rsp) cmpl $0x0, (%rax) je 0x1c2f48 movq 0xe3003(%rip), %rax # 0x2a5f40 movq (%rax), %rax movq %rax, 0x80(%rsp) jmp 0x1c2f4a movq 0x78(%rsp), %rax cmpl $0x0, (%rax) je 0x1c31b7 movq 0x78(%rsp), %rax cmpl $0x5, (%rax) je 0x1c31b7 movq 0x78(%rsp), %rax testb $0x1, 0x4(%rax) je 0x1c31b7 movq 0x78(%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x1c3078 movq 0x80(%rsp), %rax movq %rax, 0x58(%rsp) leaq 0xe4677(%rip), %rdi # 0x2a7610 movl $0x5, %esi callq 0x1c3870 movq %rax, %rcx movq 0x78(%rsp), %rax movq (%rcx), %rcx movq %rcx, 0x60(%rsp) movq 0x8(%rax), %rax movl $0xf4240, %ecx # imm = 0xF4240 cqto idivq %rcx movl $0x3c, %ecx cqto idivq %rcx movq %rax, %rcx movq 0x78(%rsp), %rax movl %ecx, 0x68(%rsp) movq 0x8(%rax), %rax movl $0xf4240, %ecx # imm = 0xF4240 cqto idivq %rcx movl $0x3c, %ecx cqto idivq %rcx movq 0x78(%rsp), %rax movl %edx, %ecx movl %ecx, 0x6c(%rsp) movq 0x8(%rax), %rax movl $0x3e8, %ecx # imm = 0x3E8 cqto idivq %rcx movl $0x3e8, %ecx # imm = 0x3E8 cqto idivq %rcx movq 0x78(%rsp), %rax movl %edx, %ecx movl %ecx, 0x70(%rsp) movq 0x8(%rax), %rax movl $0x3e8, %ecx # imm = 0x3E8 cqto idivq %rcx movl %edx, %eax movl %eax, 0x74(%rsp) leaq 0xe45d8(%rip), %rdi # 0x2a7610 xorl %eax, %eax movl %eax, %esi callq 0x1c3870 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rdx movl 0x68(%rsp), %ecx movl 0x6c(%rsp), %r8d movl 0x70(%rsp), %r9d movl 0x74(%rsp), %r10d movq (%rax), %rax leaq 0x557c4(%rip), %rsi # 0x21882c movl %r10d, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x5a330 movq 0x78(%rsp), %rax movl (%rax), %eax decl %eax movl %eax, %ecx movq %rcx, 0x50(%rsp) subl $0x3, %eax ja 0x1c31b3 movq 0x50(%rsp), %rax leaq 0x5577f(%rip), %rcx # 0x21881c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x80(%rsp), %rax movq %rax, 0x40(%rsp) leaq 0xe4556(%rip), %rdi # 0x2a7610 movl $0x3, %esi callq 0x1c3870 movq (%rax), %rax movq %rax, 0x48(%rsp) leaq 0xe453d(%rip), %rdi # 0x2a7610 xorl %eax, %eax movl %eax, %esi callq 0x1c3870 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rdx movq (%rax), %rcx leaq 0x55753(%rip), %rsi # 0x218843 movb $0x0, %al callq 0x5a330 jmp 0x1c31b5 movq 0x80(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0xe4500(%rip), %rdi # 0x2a7610 movl $0x6, %esi callq 0x1c3870 movq 0x38(%rsp), %rdi movq (%rax), %rdx leaq 0x55721(%rip), %rsi # 0x21884a leaq 0x4bf87(%rip), %rcx # 0x20f0b7 movb $0x0, %al callq 0x5a330 jmp 0x1c31b5 movq 0x80(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0xe44c3(%rip), %rdi # 0x2a7610 movl $0x2, %esi callq 0x1c3870 movq 0x30(%rsp), %rdi movq (%rax), %rdx leaq 0x556eb(%rip), %rsi # 0x218851 leaq 0x4bf4a(%rip), %rcx # 0x20f0b7 movb $0x0, %al callq 0x5a330 jmp 0x1c31b5 movq 0x80(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0xe4486(%rip), %rdi # 0x2a7610 movl $0x4, %esi callq 0x1c3870 movq 0x28(%rsp), %rdi movq (%rax), %rdx leaq 0x556b5(%rip), %rsi # 0x218858 leaq 0x4bf0d(%rip), %rcx # 0x20f0b7 movb $0x0, %al callq 0x5a330 jmp 0x1c31b5 jmp 0x1c31b5 jmp 0x1c31b7 movq 0x78(%rsp), %rdi movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x10, %rdi callq 0x1c3890 movq 0x20(%rsp), %rdi movq %rax, %rdx leaq 0x4ae7b(%rip), %rsi # 0x20e05c movb $0x0, %al callq 0x5a330 movq 0x78(%rsp), %rax cmpl $0x3, (%rax) je 0x1c3206 movq 0x78(%rsp), %rax cmpl $0x4, (%rax) je 0x1c3206 movq 0x78(%rsp), %rax cmpl $0x1, (%rax) jne 0x1c3239 movq 0x80(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0xe43f6(%rip), %rdi # 0x2a7610 xorl %eax, %eax movl %eax, %esi callq 0x1c3870 movq 0x18(%rsp), %rdi movq (%rax), %rdx leaq 0x4ae2a(%rip), %rsi # 0x20e05c movb $0x0, %al callq 0x5a330 movq 0x80(%rsp), %rdi callq 0x5a8e0 addq $0x98, %rsp retq nop
_ZNK16common_log_entry5printEP8_IO_FILE: sub rsp, 98h mov [rsp+98h+var_8], rdi mov [rsp+98h+var_10], rsi mov rax, [rsp+98h+var_8] mov [rsp+98h+var_20], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_18], rax cmp [rsp+98h+var_18], 0 jnz short loc_1C2F4A mov rax, [rsp+98h+var_20] cmp dword ptr [rax], 1 jnz short loc_1C2F1A lea rax, common_log_verbosity_thold cmp dword ptr [rax], 1 jge short loc_1C2F1A jmp loc_1C3246 loc_1C2F1A: mov rax, [rsp+98h+var_20] mov rcx, cs:stdout_ptr mov rcx, [rcx] mov [rsp+98h+var_18], rcx cmp dword ptr [rax], 0 jz short loc_1C2F48 mov rax, cs:stderr_ptr mov rax, [rax] mov [rsp+98h+var_18], rax loc_1C2F48: jmp short $+2 loc_1C2F4A: mov rax, [rsp+98h+var_20] cmp dword ptr [rax], 0 jz loc_1C31B7 mov rax, [rsp+98h+var_20] cmp dword ptr [rax], 5 jz loc_1C31B7 mov rax, [rsp+98h+var_20] test byte ptr [rax+4], 1 jz loc_1C31B7 mov rax, [rsp+98h+var_20] cmp qword ptr [rax+8], 0 jz loc_1C3078 mov rax, [rsp+98h+var_18] mov [rsp+98h+var_40], rax lea rdi, _ZL5g_col; g_col mov esi, 5 call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rcx, rax mov rax, [rsp+98h+var_20] mov rcx, [rcx] mov [rsp+98h+var_38], rcx mov rax, [rax+8] mov ecx, 0F4240h cqo idiv rcx mov ecx, 3Ch ; '<' cqo idiv rcx mov rcx, rax mov rax, [rsp+98h+var_20] mov [rsp+98h+var_30], ecx mov rax, [rax+8] mov ecx, 0F4240h cqo idiv rcx mov ecx, 3Ch ; '<' cqo idiv rcx mov rax, [rsp+98h+var_20] mov ecx, edx mov [rsp+98h+var_2C], ecx mov rax, [rax+8] mov ecx, 3E8h cqo idiv rcx mov ecx, 3E8h cqo idiv rcx mov rax, [rsp+98h+var_20] mov ecx, edx mov [rsp+98h+var_28], ecx mov rax, [rax+8] mov ecx, 3E8h cqo idiv rcx mov eax, edx mov [rsp+98h+var_24], eax lea rdi, _ZL5g_col; g_col xor eax, eax mov esi, eax call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rdi, [rsp+98h+var_40] mov rdx, [rsp+98h+var_38] mov ecx, [rsp+98h+var_30] mov r8d, [rsp+98h+var_2C] mov r9d, [rsp+98h+var_28] mov r10d, [rsp+98h+var_24] mov rax, [rax] lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s " mov [rsp+98h+var_98], r10d mov [rsp+98h+var_90], rax mov al, 0 call _fprintf loc_1C3078: mov rax, [rsp+98h+var_20] mov eax, [rax] dec eax; switch 4 cases mov ecx, eax mov [rsp+98h+var_48], rcx sub eax, 3 ja def_1C30A4; jumptable 00000000001C30A4 default case mov rax, [rsp+98h+var_48] lea rcx, jpt_1C30A4 movsxd rax, ds:(jpt_1C30A4 - 21881Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1C30A6: mov rax, [rsp+98h+var_18]; jumptable 00000000001C30A4 case 2 mov [rsp+98h+var_58], rax lea rdi, _ZL5g_col; g_col mov esi, 3 call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rax, [rax] mov [rsp+98h+var_50], rax lea rdi, _ZL5g_col; g_col xor eax, eax mov esi, eax call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rdi, [rsp+98h+var_58] mov rdx, [rsp+98h+var_50] mov rcx, [rax] lea rsi, aSiS; "%sI %s" mov al, 0 call _fprintf jmp loc_1C31B5 loc_1C30FC: mov rax, [rsp+98h+var_18]; jumptable 00000000001C30A4 case 3 mov [rsp+98h+var_60], rax lea rdi, _ZL5g_col; g_col mov esi, 6 call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rdi, [rsp+98h+var_60] mov rdx, [rax] lea rsi, aSwS; "%sW %s" lea rcx, aExampleSpecifi+27h; "" mov al, 0 call _fprintf jmp short loc_1C31B5 loc_1C3139: mov rax, [rsp+98h+var_18]; jumptable 00000000001C30A4 case 4 mov [rsp+98h+var_68], rax lea rdi, _ZL5g_col; g_col mov esi, 2 call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rdi, [rsp+98h+var_68] mov rdx, [rax] lea rsi, aSeS; "%sE %s" lea rcx, aExampleSpecifi+27h; "" mov al, 0 call _fprintf jmp short loc_1C31B5 loc_1C3176: mov rax, [rsp+98h+var_18]; jumptable 00000000001C30A4 case 1 mov [rsp+98h+var_70], rax lea rdi, _ZL5g_col; g_col mov esi, 4 call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rdi, [rsp+98h+var_70] mov rdx, [rax] lea rsi, aSdS; "%sD %s" lea rcx, aExampleSpecifi+27h; "" mov al, 0 call _fprintf jmp short loc_1C31B5 def_1C30A4: jmp short $+2; jumptable 00000000001C30A4 default case loc_1C31B5: jmp short $+2 loc_1C31B7: mov rdi, [rsp+98h+var_20] mov rax, [rsp+98h+var_18] mov [rsp+98h+var_78], rax add rdi, 10h call _ZNKSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void) mov rdi, [rsp+98h+var_78] mov rdx, rax lea rsi, aSetCustomJinja_0+0FEh; "%s" mov al, 0 call _fprintf mov rax, [rsp+98h+var_20] cmp dword ptr [rax], 3 jz short loc_1C3206 mov rax, [rsp+98h+var_20] cmp dword ptr [rax], 4 jz short loc_1C3206 mov rax, [rsp+98h+var_20] cmp dword ptr [rax], 1 jnz short loc_1C3239 loc_1C3206: mov rax, [rsp+98h+var_18] mov [rsp+98h+var_80], rax lea rdi, _ZL5g_col; g_col xor eax, eax mov esi, eax call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong) mov rdi, [rsp+98h+var_80] mov rdx, [rax] lea rsi, aSetCustomJinja_0+0FEh; "%s" mov al, 0 call _fprintf loc_1C3239: mov rdi, [rsp+98h+var_18] call _fflush loc_1C3246: add rsp, 98h retn
_DWORD * common_log_entry::print(long long a1, long long a2) { _DWORD *result; // rax const char **v3; // rax const char **v4; // rax const char **v5; // rax const char **v6; // rax const char **v7; // rax const char *v8; // rax const char **v9; // rax const char *v10; // [rsp+48h] [rbp-50h] const char *v11; // [rsp+60h] [rbp-38h] int v12; // [rsp+68h] [rbp-30h] int v13; // [rsp+6Ch] [rbp-2Ch] int v14; // [rsp+70h] [rbp-28h] int v15; // [rsp+74h] [rbp-24h] long long v16; // [rsp+80h] [rbp-18h] v16 = a2; if ( !a2 ) { if ( *(_DWORD *)a1 == 1 ) { result = common_log_verbosity_thold; if ( common_log_verbosity_thold[0] < 1 ) return result; } v16 = stdout; if ( *(_DWORD *)a1 ) v16 = stderr; } if ( *(_DWORD *)a1 && *(_DWORD *)a1 != 5 && (*(_BYTE *)(a1 + 4) & 1) != 0 ) { if ( *(_QWORD *)(a1 + 8) ) { v11 = *(const char **)std::vector<char const*>::operator[](g_col, 5LL); v12 = *(_QWORD *)(a1 + 8) / 1000000LL / 60; v13 = *(_QWORD *)(a1 + 8) / 1000000LL % 60; v14 = *(_QWORD *)(a1 + 8) / 1000LL % 1000; v15 = *(_QWORD *)(a1 + 8) % 1000LL; v3 = (const char **)std::vector<char const*>::operator[](g_col, 0LL); fprintf(v16, "%s%d.%02d.%03d.%03d%s ", v11, v12, v13, v14, v15, *v3); } switch ( *(_DWORD *)a1 ) { case 1: v7 = (const char **)std::vector<char const*>::operator[](g_col, 4LL); fprintf(v16, "%sD %s", *v7, ""); break; case 2: v10 = *(const char **)std::vector<char const*>::operator[](g_col, 3LL); v4 = (const char **)std::vector<char const*>::operator[](g_col, 0LL); fprintf(v16, "%sI %s", v10, *v4); break; case 3: v5 = (const char **)std::vector<char const*>::operator[](g_col, 6LL); fprintf(v16, "%sW %s", *v5, ""); break; case 4: v6 = (const char **)std::vector<char const*>::operator[](g_col, 2LL); fprintf(v16, "%sE %s", *v6, ""); break; default: break; } } v8 = (const char *)std::vector<char>::data(a1 + 16); fprintf(v16, "%s", v8); if ( *(_DWORD *)a1 == 3 || *(_DWORD *)a1 == 4 || *(_DWORD *)a1 == 1 ) { v9 = (const char **)std::vector<char const*>::operator[](g_col, 0LL); fprintf(v16, "%s", *v9); } return (_DWORD *)fflush(v16); }
25,753
common_log_entry::print(_IO_FILE*) const
monkey531[P]llama/common/log.cpp
void print(FILE * file = nullptr) const { FILE * fcur = file; if (!fcur) { // stderr displays DBG messages only when their verbosity level is not higher than the threshold // these messages will still be logged to a file if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) { return; } fcur = stdout; if (level != GGML_LOG_LEVEL_NONE) { fcur = stderr; } } if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) { if (timestamp) { // [M.s.ms.us] fprintf(fcur, "%s%d.%02d.%03d.%03d%s ", g_col[COMMON_LOG_COL_BLUE], (int) (timestamp / 1000000 / 60), (int) (timestamp / 1000000 % 60), (int) (timestamp / 1000 % 1000), (int) (timestamp % 1000), g_col[COMMON_LOG_COL_DEFAULT]); } switch (level) { case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break; case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break; case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break; case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break; default: break; } } fprintf(fcur, "%s", msg.data()); if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) { fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]); } fflush(fcur); }
O3
cpp
common_log_entry::print(_IO_FILE*) const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movl (%rdi), %eax testq %rsi, %rsi jne 0xcd11a cmpl $0x1, %eax jne 0xcd103 leaq 0x60330(%rip), %rcx # 0x12d428 cmpl $0x0, (%rcx) jg 0xcd103 popq %rbx popq %r14 popq %r15 retq testl %eax, %eax jne 0xcd110 movq 0x5ee0a(%rip), %rcx # 0x12bf18 jmp 0xcd117 movq 0x5ee79(%rip), %rcx # 0x12bf90 movq (%rcx), %r14 testl %eax, %eax je 0xcd297 cmpl $0x5, %eax je 0xcd297 cmpb $0x1, 0x4(%rbx) jne 0xcd297 movq 0x8(%rbx), %r10 testq %r10, %r10 je 0xcd21e movq 0x602e7(%rip), %r15 # 0x12d430 movq 0x28(%r15), %r9 movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB movq %r10, %rax imulq %rcx movq %rdx, %rcx movq %rdx, %r8 shrq $0x3f, %r8 sarq $0x12, %rcx movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729 movq %r10, %rax imulq %rdx addq %rcx, %r8 leaq (%rdx,%r10), %rcx movq %rcx, %rax shrq $0x3f, %rax shrq $0x19, %rcx addl %eax, %ecx movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889 movq %r8, %rax imulq %rdx addq %r8, %rdx movq %rdx, %rax shrq $0x3f, %rax shrq $0x5, %rdx addl %eax, %edx imull $0x3c, %edx, %eax subl %eax, %r8d movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF movq %r10, %rax imulq %rsi movq %rdx, %r11 movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %r11 addq %rax, %r11 movq %r11, %rax imulq %rsi movq %rdx, %rax shrq $0x3f, %rax shrq $0x7, %rdx addl %eax, %edx imull $0x3e8, %edx, %eax # imm = 0x3E8 imull $0x3e8, %r11d, %edx # imm = 0x3E8 subl %eax, %r11d subl %edx, %r10d leaq 0x27c99(%rip), %rsi # 0xf4e9c movq %r14, %rdi movq %r9, %rdx movl %r11d, %r9d xorl %eax, %eax pushq (%r15) pushq %r10 callq 0x1aca0 addq $0x10, %rsp movl (%rbx), %eax decl %eax cmpl $0x3, %eax ja 0xcd297 leaq 0x27c60(%rip), %rcx # 0xf4e8c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x601f4(%rip), %rax # 0x12d430 movq 0x20(%rax), %rdx leaq 0x27c81(%rip), %rsi # 0xf4ec8 jmp 0xcd26f movq 0x601e0(%rip), %rax # 0x12d430 movq 0x30(%rax), %rdx leaq 0x27c5f(%rip), %rsi # 0xf4eba jmp 0xcd26f movq 0x601cc(%rip), %rax # 0x12d430 movq 0x10(%rax), %rdx leaq 0x27c52(%rip), %rsi # 0xf4ec1 leaq 0x1e726(%rip), %rcx # 0xeb99c jmp 0xcd28d movq 0x601b1(%rip), %rax # 0x12d430 movq (%rax), %rcx movq 0x18(%rax), %rdx leaq 0x27c26(%rip), %rsi # 0xf4eb3 movq %r14, %rdi xorl %eax, %eax callq 0x1aca0 movq 0x10(%rbx), %rdi movq %r14, %rsi callq 0x1a9d0 movl (%rbx), %eax cmpl $0x4, %eax ja 0xcd2c6 movl $0x1a, %ecx btl %eax, %ecx jae 0xcd2c6 movq 0x60175(%rip), %rax # 0x12d430 movq (%rax), %rdi movq %r14, %rsi callq 0x1a9d0 movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0x1aa40 nop
_ZNK16common_log_entry5printEP8_IO_FILE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov eax, [rdi] test rsi, rsi jnz short loc_CD11A cmp eax, 1 jnz short loc_CD103 lea rcx, common_log_verbosity_thold cmp dword ptr [rcx], 0 jg short loc_CD103 pop rbx pop r14 pop r15 retn loc_CD103: test eax, eax jnz short loc_CD110 mov rcx, cs:stdout_ptr jmp short loc_CD117 loc_CD110: mov rcx, cs:stderr_ptr loc_CD117: mov r14, [rcx] loc_CD11A: test eax, eax jz def_CD233; jumptable 00000000000CD233 default case cmp eax, 5 jz def_CD233; jumptable 00000000000CD233 default case cmp byte ptr [rbx+4], 1 jnz def_CD233; jumptable 00000000000CD233 default case mov r10, [rbx+8] test r10, r10 jz loc_CD21E mov r15, cs:_ZL5g_col; g_col mov r9, [r15+28h] mov rcx, 431BDE82D7B634DBh mov rax, r10 imul rcx mov rcx, rdx mov r8, rdx shr r8, 3Fh sar rcx, 12h mov rdx, 8F2A633943A6D729h mov rax, r10 imul rdx add r8, rcx lea rcx, [rdx+r10] mov rax, rcx shr rax, 3Fh shr rcx, 19h add ecx, eax mov rdx, 8888888888888889h mov rax, r8 imul rdx add rdx, r8 mov rax, rdx shr rax, 3Fh shr rdx, 5 add edx, eax imul eax, edx, 3Ch ; '<' sub r8d, eax mov rsi, 20C49BA5E353F7CFh mov rax, r10 imul rsi mov r11, rdx mov rax, rdx shr rax, 3Fh sar r11, 7 add r11, rax mov rax, r11 imul rsi mov rax, rdx shr rax, 3Fh shr rdx, 7 add edx, eax imul eax, edx, 3E8h imul edx, r11d, 3E8h sub r11d, eax sub r10d, edx lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s " mov rdi, r14 mov rdx, r9 mov r9d, r11d xor eax, eax push qword ptr [r15] push r10 call _fprintf add rsp, 10h mov eax, [rbx] loc_CD21E: dec eax; switch 4 cases cmp eax, 3 ja short def_CD233; jumptable 00000000000CD233 default case lea rcx, jpt_CD233 movsxd rax, ds:(jpt_CD233 - 0F4E8Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_CD235: mov rax, cs:_ZL5g_col; jumptable 00000000000CD233 case 1 mov rdx, [rax+20h] lea rsi, aSdS; "%sD %s" jmp short loc_CD26F loc_CD249: mov rax, cs:_ZL5g_col; jumptable 00000000000CD233 case 3 mov rdx, [rax+30h] lea rsi, aSwS; "%sW %s" jmp short loc_CD26F loc_CD25D: mov rax, cs:_ZL5g_col; jumptable 00000000000CD233 case 4 mov rdx, [rax+10h] lea rsi, aSeS; "%sE %s" loc_CD26F: lea rcx, aErrorWhileHand_0+34h; "" jmp short loc_CD28D loc_CD278: mov rax, cs:_ZL5g_col; jumptable 00000000000CD233 case 2 mov rcx, [rax] mov rdx, [rax+18h] lea rsi, aSiS; "%sI %s" loc_CD28D: mov rdi, r14 xor eax, eax call _fprintf def_CD233: mov rdi, [rbx+10h]; jumptable 00000000000CD233 default case mov rsi, r14 call _fputs mov eax, [rbx] cmp eax, 4 ja short loc_CD2C6 mov ecx, 1Ah bt ecx, eax jnb short loc_CD2C6 mov rax, cs:_ZL5g_col; g_col mov rdi, [rax] mov rsi, r14 call _fputs loc_CD2C6: mov rdi, r14 pop rbx pop r14 pop r15 jmp _fflush
long long common_log_entry::print(unsigned int *a1, long long a2) { long long v2; // r14 long long result; // rax long long *v4; // rcx long long v5; // r10 long long v6; // rdx const char *v7; // rsi char *v8; // rcx int v9; // ecx v2 = a2; result = *a1; if ( !a2 ) { if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 ) return result; if ( (_DWORD)result ) v4 = (long long *)&stderr; else v4 = (long long *)&stdout; v2 = *v4; } if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 ) { v5 = *((_QWORD *)a1 + 1); if ( v5 ) { fprintf( v2, "%s%d.%02d.%03d.%03d%s ", *(const char **)(g_col + 40), (int)v5 / 60000000, (int)(v5 / 1000000) % 60, (int)(v5 / 1000) % 1000, v5 % 1000, *(const char **)g_col); LODWORD(result) = *a1; } switch ( (int)result ) { case 1: v6 = *(_QWORD *)(g_col + 32); v7 = "%sD %s"; goto LABEL_17; case 2: v8 = *(char **)g_col; v6 = *(_QWORD *)(g_col + 24); v7 = "%sI %s"; goto LABEL_19; case 3: v6 = *(_QWORD *)(g_col + 48); v7 = "%sW %s"; goto LABEL_17; case 4: v6 = *(_QWORD *)(g_col + 16); v7 = "%sE %s"; LABEL_17: v8 = ""; LABEL_19: fprintf(v2, v7, v6, v8); break; default: break; } } fputs(*((_QWORD *)a1 + 2), v2); if ( *a1 <= 4 ) { v9 = 26; if ( _bittest(&v9, *a1) ) fputs(*(_QWORD *)g_col, v2); } return fflush(v2); }
print: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV EAX,dword ptr [RDI] TEST RSI,RSI JNZ 0x001cd11a CMP EAX,0x1 JNZ 0x001cd103 LEA RCX,[0x22d428] CMP dword ptr [RCX],0x0 JG 0x001cd103 POP RBX POP R14 POP R15 RET LAB_001cd103: TEST EAX,EAX JNZ 0x001cd110 MOV RCX,qword ptr [0x0022bf18] JMP 0x001cd117 LAB_001cd110: MOV RCX,qword ptr [0x0022bf90] LAB_001cd117: MOV R14,qword ptr [RCX] LAB_001cd11a: TEST EAX,EAX JZ 0x001cd297 CMP EAX,0x5 JZ 0x001cd297 CMP byte ptr [RBX + 0x4],0x1 JNZ 0x001cd297 MOV R10,qword ptr [RBX + 0x8] TEST R10,R10 JZ 0x001cd21e MOV R15,qword ptr [0x0022d430] MOV R9,qword ptr [R15 + 0x28] MOV RCX,0x431bde82d7b634db MOV RAX,R10 IMUL RCX MOV RCX,RDX MOV R8,RDX SHR R8,0x3f SAR RCX,0x12 MOV RDX,-0x70d59cc6bc5928d7 MOV RAX,R10 IMUL RDX ADD R8,RCX LEA RCX,[RDX + R10*0x1] MOV RAX,RCX SHR RAX,0x3f SHR RCX,0x19 ADD ECX,EAX MOV RDX,-0x7777777777777777 MOV RAX,R8 IMUL RDX ADD RDX,R8 MOV RAX,RDX SHR RAX,0x3f SHR RDX,0x5 ADD EDX,EAX IMUL EAX,EDX,0x3c SUB R8D,EAX MOV RSI,0x20c49ba5e353f7cf MOV RAX,R10 IMUL RSI MOV R11,RDX MOV RAX,RDX SHR RAX,0x3f SAR R11,0x7 ADD R11,RAX MOV RAX,R11 IMUL RSI MOV RAX,RDX SHR RAX,0x3f SHR RDX,0x7 ADD EDX,EAX IMUL EAX,EDX,0x3e8 IMUL EDX,R11D,0x3e8 SUB R11D,EAX SUB R10D,EDX LEA RSI,[0x1f4e9c] MOV RDI,R14 MOV RDX,R9 MOV R9D,R11D XOR EAX,EAX PUSH qword ptr [R15] PUSH R10 CALL 0x0011aca0 ADD RSP,0x10 MOV EAX,dword ptr [RBX] LAB_001cd21e: DEC EAX CMP EAX,0x3 JA 0x001cd297 LEA RCX,[0x1f4e8c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [0x0022d430] MOV RDX,qword ptr [RAX + 0x20] LEA RSI,[0x1f4ec8] JMP 0x001cd26f caseD_3: MOV RAX,qword ptr [0x0022d430] MOV RDX,qword ptr [RAX + 0x30] LEA RSI,[0x1f4eba] JMP 0x001cd26f caseD_4: MOV RAX,qword ptr [0x0022d430] MOV RDX,qword ptr [RAX + 0x10] LEA RSI,[0x1f4ec1] LAB_001cd26f: LEA RCX,[0x1eb99c] JMP 0x001cd28d caseD_2: MOV RAX,qword ptr [0x0022d430] MOV RCX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x18] LEA RSI,[0x1f4eb3] LAB_001cd28d: MOV RDI,R14 XOR EAX,EAX CALL 0x0011aca0 default: MOV RDI,qword ptr [RBX + 0x10] MOV RSI,R14 CALL 0x0011a9d0 MOV EAX,dword ptr [RBX] CMP EAX,0x4 JA 0x001cd2c6 MOV ECX,0x1a BT ECX,EAX JNC 0x001cd2c6 MOV RAX,qword ptr [0x0022d430] MOV RDI,qword ptr [RAX] MOV RSI,R14 CALL 0x0011a9d0 LAB_001cd2c6: MOV RDI,R14 POP RBX POP R14 POP R15 JMP 0x0011aa40
/* common_log_entry::print(_IO_FILE*) const */ void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1) { long lVar1; int1 auVar2 [16]; int1 auVar3 [16]; int8 *puVar4; char *pcVar5; int8 uVar6; char *__format; int iVar7; iVar7 = *(int *)this; if (param_1 == (_IO_FILE *)0x0) { if ((iVar7 == 1) && (common_log_verbosity_thold < 1)) { return; } puVar4 = (int8 *)PTR_stderr_0022bf90; if (iVar7 == 0) { puVar4 = (int8 *)PTR_stdout_0022bf18; } param_1 = (_IO_FILE *)*puVar4; } if (((iVar7 == 0) || (iVar7 == 5)) || (this[4] != (common_log_entry)0x1)) goto switchD_001cd233_default; lVar1 = *(long *)(this + 8); if (lVar1 != 0) { auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889); auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf); iVar7 = (int)(lVar1 / 1000); fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5], (ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) - (SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)), (ulong)(uint)((int)(lVar1 / 1000000) + ((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c), (ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000), (ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col); iVar7 = *(int *)this; } switch(iVar7) { case 1: uVar6 = g_col[4]; __format = "%sD %s"; break; case 2: pcVar5 = (char *)*g_col; uVar6 = g_col[3]; __format = "%sI %s"; goto LAB_001cd28d; case 3: uVar6 = g_col[6]; __format = "%sW %s"; break; case 4: uVar6 = g_col[2]; __format = "%sE %s"; break; default: goto switchD_001cd233_default; } pcVar5 = ""; LAB_001cd28d: fprintf(param_1,__format,uVar6,pcVar5); switchD_001cd233_default: fputs(*(char **)(this + 0x10),param_1); if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) { fputs((char *)*g_col,param_1); } fflush(param_1); return; }
25,754
Field::init_for_tmp_table(Field*, TABLE*)
eloqsql/sql/field.h
virtual void init_for_tmp_table(Field *org_field, TABLE *new_table) { init(new_table); orig_table= org_field->orig_table; vcol_info= 0; cond_selectivity= 1.0; next_equal_field= NULL; option_list= NULL; option_struct= NULL; if (org_field->type() == MYSQL_TYPE_VAR_STRING || org_field->type() == MYSQL_TYPE_VARCHAR) new_table->s->db_create_options|= HA_OPTION_PACK_RECORD; }
O3
c
Field::init_for_tmp_table(Field*, TABLE*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdx, 0x18(%rdi) movq %rdx, 0x20(%rdi) leaq 0x110(%rdx), %rax movq %rax, 0x28(%rdi) movq 0x20(%rsi), %rax movq %rax, 0x20(%rdi) xorl %eax, %eax movq %rax, 0xb0(%rdi) movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000 movq %rcx, 0x90(%rdi) movq %rax, 0x98(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x50(%rdi) movq (%rsi), %rax movq %rsi, %rdi callq *0x1b8(%rax) cmpl $0xfd, %eax je 0xceb0 movq (%r14), %rax movq %r14, %rdi callq *0x1b8(%rax) cmpl $0xf, %eax jne 0xceba movq (%rbx), %rax orl $0x1, 0x3b8(%rax) popq %rbx popq %r14 popq %rbp retq nop
_ZN5Field18init_for_tmp_tableEPS_P5TABLE: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rsi mov [rdi+18h], rdx mov [rdi+20h], rdx lea rax, [rdx+110h] mov [rdi+28h], rax mov rax, [rsi+20h] mov [rdi+20h], rax xor eax, eax mov [rdi+0B0h], rax mov rcx, 3FF0000000000000h mov [rdi+90h], rcx mov [rdi+98h], rax xorps xmm0, xmm0 movups xmmword ptr [rdi+50h], xmm0 mov rax, [rsi] mov rdi, rsi call qword ptr [rax+1B8h] cmp eax, 0FDh jz short loc_CEB0 mov rax, [r14] mov rdi, r14 call qword ptr [rax+1B8h] cmp eax, 0Fh jnz short loc_CEBA loc_CEB0: mov rax, [rbx] or dword ptr [rax+3B8h], 1 loc_CEBA: pop rbx pop r14 pop rbp retn
long long Field::init_for_tmp_table(long long a1, _QWORD *a2, long long *a3) { long long result; // rax *(_QWORD *)(a1 + 24) = a3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = a3 + 34; *(_QWORD *)(a1 + 32) = a2[4]; *(_QWORD *)(a1 + 176) = 0LL; *(_QWORD *)(a1 + 144) = 0x3FF0000000000000LL; *(_QWORD *)(a1 + 152) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; if ( (*(unsigned int ( **)(_QWORD *))(*a2 + 440LL))(a2) == 253 || (result = (*(long long ( **)(_QWORD *))(*a2 + 440LL))(a2), (_DWORD)result == 15) ) { result = *a3; *(_DWORD *)(*a3 + 952) |= 1u; } return result; }
init_for_tmp_table: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV qword ptr [RDI + 0x18],RDX MOV qword ptr [RDI + 0x20],RDX LEA RAX,[RDX + 0x110] MOV qword ptr [RDI + 0x28],RAX MOV RAX,qword ptr [RSI + 0x20] MOV qword ptr [RDI + 0x20],RAX XOR EAX,EAX MOV qword ptr [RDI + 0xb0],RAX MOV RCX,0x3ff0000000000000 MOV qword ptr [RDI + 0x90],RCX MOV qword ptr [RDI + 0x98],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOV RAX,qword ptr [RSI] MOV RDI,RSI CALL qword ptr [RAX + 0x1b8] CMP EAX,0xfd JZ 0x0010ceb0 MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x1b8] CMP EAX,0xf JNZ 0x0010ceba LAB_0010ceb0: MOV RAX,qword ptr [RBX] OR dword ptr [RAX + 0x3b8],0x1 LAB_0010ceba: POP RBX POP R14 POP RBP RET
/* Field::init_for_tmp_table(Field*, TABLE*) */ void __thiscall Field::init_for_tmp_table(Field *this,Field *param_1,TABLE *param_2) { int iVar1; *(TABLE **)(this + 0x18) = param_2; *(TABLE **)(this + 0x20) = param_2; *(TABLE **)(this + 0x28) = param_2 + 0x110; *(int8 *)(this + 0x20) = *(int8 *)(param_1 + 0x20); *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0x90) = 0x3ff0000000000000; *(int8 *)(this + 0x98) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; iVar1 = (**(code **)(*(long *)param_1 + 0x1b8))(param_1); if ((iVar1 != 0xfd) && (iVar1 = (**(code **)(*(long *)param_1 + 0x1b8))(param_1), iVar1 != 0xf)) { return; } *(uint *)(*(long *)param_2 + 0x3b8) = *(uint *)(*(long *)param_2 + 0x3b8) | 1; return; }
25,755
use_head
eloqsql/storage/maria/ma_bitmap.c
static void use_head(MARIA_HA *info, pgcache_page_no_t page, uint size, uint block_position) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; MARIA_BITMAP_BLOCK *block; uchar *data; uint offset, tmp, offset_page; DBUG_ENTER("use_head"); DBUG_ASSERT(page % bitmap->pages_covered); block= dynamic_element(&info->bitmap_blocks, block_position, MARIA_BITMAP_BLOCK*); block->page= page; block->page_count= 1 + TAIL_BIT; block->empty_space= size; block->used= BLOCKUSED_TAIL; /* Mark place used by reading/writing 2 bytes at a time to handle bitmaps in overlapping bytes */ offset_page= (uint) (page - bitmap->page - 1) * 3; offset= offset_page & 7; data= bitmap->map + offset_page / 8; tmp= uint2korr(data); block->org_bitmap_value= (tmp >> offset) & 7; tmp= (tmp & ~(7 << offset)) | (FULL_HEAD_PAGE << offset); int2store(data, tmp); bitmap->changed= 1; DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap);); DBUG_VOID_RETURN; }
O0
c
use_head: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) jmp 0x43205 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rax movl -0x18(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movl $0x8001, 0x8(%rax) # imm = 0x8001 movl -0x14(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x28(%rbp), %rax movb $0x4, 0x14(%rax) movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx subq 0x10(%rcx), %rax subq $0x1, %rax imull $0x3, %eax, %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax andl $0x7, %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl -0x3c(%rbp), %ecx shrl $0x3, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movl -0x34(%rbp), %ecx shrl %cl, %eax andl $0x7, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x15(%rax) movl -0x38(%rbp), %eax movl -0x34(%rbp), %ecx movl $0x7, %edx shll %cl, %edx movl %edx, %ecx xorl $-0x1, %ecx andl %ecx, %eax movl -0x34(%rbp), %ecx movl $0x4, %edx shll %cl, %edx movl %edx, %ecx orl %ecx, %eax movl %eax, -0x38(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x38(%rbp), %eax movw %ax, %cx movq -0x48(%rbp), %rax movw %cx, (%rax) movq -0x20(%rbp), %rax movb $0x1, 0x20(%rax) jmp 0x432de jmp 0x432e0 jmp 0x432e2 popq %rbp retq nopw %cs:(%rax,%rax)
use_head: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov rax, [rbp+var_8] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax jmp short $+2 loc_43205: mov rax, [rbp+var_8] mov rax, [rax+2C0h] mov ecx, [rbp+var_18] imul rcx, 18h add rax, rcx mov [rbp+var_28], rax mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_28] mov dword ptr [rax+8], 8001h mov ecx, [rbp+var_14] mov rax, [rbp+var_28] mov [rax+0Ch], ecx mov rax, [rbp+var_28] mov byte ptr [rax+14h], 4 mov rax, [rbp+var_10] mov rcx, [rbp+var_20] sub rax, [rcx+10h] sub rax, 1 imul eax, 3 mov [rbp+var_3C], eax mov eax, [rbp+var_3C] and eax, 7 mov [rbp+var_34], eax mov rax, [rbp+var_20] mov rax, [rax+8] mov ecx, [rbp+var_3C] shr ecx, 3 mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, word ptr [rax] mov [rbp+var_38], eax mov eax, [rbp+var_38] mov ecx, [rbp+var_34] shr eax, cl and eax, 7 mov cl, al mov rax, [rbp+var_28] mov [rax+15h], cl mov eax, [rbp+var_38] mov ecx, [rbp+var_34] mov edx, 7 shl edx, cl mov ecx, edx xor ecx, 0FFFFFFFFh and eax, ecx mov ecx, [rbp+var_34] mov edx, 4 shl edx, cl mov ecx, edx or eax, ecx mov [rbp+var_38], eax mov rax, [rbp+var_30] mov [rbp+var_48], rax mov eax, [rbp+var_38] mov cx, ax mov rax, [rbp+var_48] mov [rax], cx mov rax, [rbp+var_20] mov byte ptr [rax+20h], 1 jmp short $+2 loc_432DE: jmp short $+2 loc_432E0: jmp short $+2 loc_432E2: pop rbp retn
long long use_head(_QWORD *a1, long long a2, int a3, unsigned int a4) { long long result; // rax unsigned int v5; // [rsp+Ch] [rbp-3Ch] unsigned int v6; // [rsp+10h] [rbp-38h] _WORD *v7; // [rsp+18h] [rbp-30h] long long v8; // [rsp+20h] [rbp-28h] long long v9; // [rsp+28h] [rbp-20h] v9 = *a1 + 2576LL; v8 = 24LL * a4 + a1[88]; *(_QWORD *)v8 = a2; *(_DWORD *)(v8 + 8) = 32769; *(_DWORD *)(v8 + 12) = a3; *(_BYTE *)(v8 + 20) = 4; v5 = 3 * (a2 - *(_DWORD *)(v9 + 16) - 1); v7 = (_WORD *)((v5 >> 3) + *(_QWORD *)(v9 + 8)); v6 = (unsigned __int16)*v7; *(_BYTE *)(v8 + 21) = (v6 >> (v5 & 7)) & 7; *v7 = (4 << (v5 & 7)) | ~(7 << (v5 & 7)) & v6; result = v9; *(_BYTE *)(v9 + 32) = 1; return result; }
use_head: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX JMP 0x00143205 LAB_00143205: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2c0] MOV ECX,dword ptr [RBP + -0x18] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x8],0x8001 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x4 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RCX + 0x10] SUB RAX,0x1 IMUL EAX,EAX,0x3 MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] AND EAX,0x7 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x3c] SHR ECX,0x3 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x34] SHR EAX,CL AND EAX,0x7 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],CL MOV EAX,dword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x34] MOV EDX,0x7 SHL EDX,CL MOV ECX,EDX XOR ECX,0xffffffff AND EAX,ECX MOV ECX,dword ptr [RBP + -0x34] MOV EDX,0x4 SHL EDX,CL MOV ECX,EDX OR EAX,ECX MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x38] MOV CX,AX MOV RAX,qword ptr [RBP + -0x48] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x20],0x1 JMP 0x001432de LAB_001432de: JMP 0x001432e0 LAB_001432e0: JMP 0x001432e2 LAB_001432e2: POP RBP RET
void use_head(long *param_1,int8 param_2,int4 param_3,uint param_4) { ushort uVar1; long lVar2; uint uVar3; int8 *puVar4; ushort *puVar5; byte bVar6; lVar2 = *param_1; puVar4 = (int8 *)(param_1[0x58] + (ulong)param_4 * 0x18); *puVar4 = param_2; *(int4 *)(puVar4 + 1) = 0x8001; *(int4 *)((long)puVar4 + 0xc) = param_3; *(int1 *)((long)puVar4 + 0x14) = 4; uVar3 = (((int)param_2 - (int)*(int8 *)(lVar2 + 0xa20)) + -1) * 3; bVar6 = (byte)uVar3 & 7; puVar5 = (ushort *)(*(long *)(lVar2 + 0xa18) + (ulong)(uVar3 >> 3)); uVar1 = *puVar5; *(byte *)((long)puVar4 + 0x15) = (byte)(uVar1 >> bVar6) & 7; *puVar5 = uVar1 & ((ushort)(7 << bVar6) ^ 0xffff) | (ushort)(4 << bVar6); *(int1 *)(lVar2 + 0xa30) = 1; return; }
25,756
DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction(std::shared_ptr<Transaction<LoginDatabaseConnection>>)
SylCore-WoTLK/src/server/database/Database/DatabaseWorkerPool.cpp
TransactionCallback DatabaseWorkerPool<T>::AsyncCommitTransaction(SQLTransaction<T> transaction) { #ifdef ACORE_DEBUG //! Only analyze transaction weaknesses in Debug mode. //! Ideally we catch the faults in Debug mode and then correct them, //! so there's no need to waste these CPU cycles in Release mode. switch (transaction->GetSize()) { case 0: LOG_DEBUG("sql.driver", "Transaction contains 0 queries. Not executing."); break; case 1: LOG_DEBUG("sql.driver", "Warning: Transaction only holds 1 query, consider removing Transaction context in code."); break; default: break; } #endif // ACORE_DEBUG TransactionWithResultTask* task = new TransactionWithResultTask(transaction); TransactionFuture result = task->GetFuture(); Enqueue(task); return TransactionCallback(std::move(result)); }
O0
cpp
DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction(std::shared_ptr<Transaction<LoginDatabaseConnection>>): subq $0x88, %rsp movq %rdx, 0x18(%rsp) movq %rdi, (%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x38, %edi callq 0x261820 movq 0x18(%rsp), %rsi movq %rax, 0x28(%rsp) movq %rax, 0x20(%rsp) movb $0x1, 0x4b(%rsp) leaq 0x58(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0xc8460 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0xc8620 jmp 0xc8562 movb $0x0, 0x4b(%rsp) leaq 0x58(%rsp), %rdi callq 0xc84e0 movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0xc86b0 movq 0x10(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xc7930 jmp 0xc859b movq (%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0xc86e0 jmp 0xc85ab leaq 0x38(%rsp), %rdi callq 0xc8720 movq 0x8(%rsp), %rax addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x58(%rsp), %rdi callq 0xc84e0 testb $0x1, 0x4b(%rsp) jne 0xc85e3 jmp 0xc85f2 movq 0x20(%rsp), %rdi movl $0x38, %esi callq 0x261a40 jmp 0xc860c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x38(%rsp), %rdi callq 0xc8720 movq 0x50(%rsp), %rdi callq 0x21d50 nopw %cs:(%rax,%rax)
_ZN18DatabaseWorkerPoolI23LoginDatabaseConnectionE22AsyncCommitTransactionESt10shared_ptrI11TransactionIS0_EE: sub rsp, 88h mov [rsp+88h+var_70], rdx; __int64 mov qword ptr [rsp+88h+var_88], rdi; int mov rax, rdi mov [rsp+88h+var_80], rax; TransactionTask * mov [rsp+88h+var_8], rdi mov qword ptr [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov rax, qword ptr [rsp+88h+var_10] mov qword ptr [rsp+88h+var_78], rax; int mov edi, 38h ; '8'; unsigned __int64 call _Znwm; operator new(ulong) mov rsi, [rsp+88h+var_70] mov qword ptr [rsp+88h+var_60], rax mov [rsp+88h+var_68], rax mov [rsp+88h+var_3D], 1 lea rdi, [rsp+88h+var_30] mov qword ptr [rsp+88h+var_58], rdi call _ZNSt10shared_ptrI15TransactionBaseEC2I11TransactionI23LoginDatabaseConnectionEvEERKS_IT_E; std::shared_ptr<TransactionBase>::shared_ptr<Transaction<LoginDatabaseConnection>,void>(std::shared_ptr const&<Transaction<LoginDatabaseConnection>>) mov rdi, qword ptr [rsp+88h+var_60]; int mov rsi, qword ptr [rsp+88h+var_58]; int call _ZN25TransactionWithResultTaskC2ESt10shared_ptrI15TransactionBaseE; TransactionWithResultTask::TransactionWithResultTask(std::shared_ptr<TransactionBase>) jmp short $+2 loc_C8562: mov [rsp+88h+var_3D], 0 lea rdi, [rsp+88h+var_30] call _ZNSt10shared_ptrI15TransactionBaseED2Ev; std::shared_ptr<TransactionBase>::~shared_ptr() mov rax, [rsp+88h+var_68] mov [rsp+88h+var_20], rax mov rsi, [rsp+88h+var_20] lea rdi, [rsp+88h+var_50]; this call _ZN25TransactionWithResultTask9GetFutureEv; TransactionWithResultTask::GetFuture(void) mov rdi, qword ptr [rsp+88h+var_78] mov rsi, [rsp+88h+var_20] call _ZN18DatabaseWorkerPoolI23LoginDatabaseConnectionE7EnqueueEP12SQLOperation; DatabaseWorkerPool<LoginDatabaseConnection>::Enqueue(SQLOperation *) jmp short $+2 loc_C859B: mov rdi, qword ptr [rsp+88h+var_88] lea rsi, [rsp+88h+var_50] call _ZN19TransactionCallbackC2EOSt6futureIbE; TransactionCallback::TransactionCallback(std::future<bool> &&) jmp short $+2 loc_C85AB: lea rdi, [rsp+88h+var_50] call _ZNSt6futureIbED2Ev; std::future<bool>::~future() mov rax, [rsp+88h+var_80] add rsp, 88h retn mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_50] call _ZNSt10shared_ptrI15TransactionBaseED2Ev; std::shared_ptr<TransactionBase>::~shared_ptr() test [rsp+arg_43], 1 jnz short loc_C85E3 jmp short loc_C85F2 loc_C85E3: mov rdi, [rsp+arg_18]; void * mov esi, 38h ; '8'; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_C85F2: jmp short loc_C860C mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_30] call _ZNSt6futureIbED2Ev; std::future<bool>::~future() loc_C860C: mov rdi, [rsp+arg_48] call __Unwind_Resume
TransactionTask * DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction( TransactionTask *a1, long long a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d int v8[2]; // [rsp+0h] [rbp-88h] TransactionTask *v9; // [rsp+8h] [rbp-80h] int v10[2]; // [rsp+10h] [rbp-78h] long long v12; // [rsp+20h] [rbp-68h] _BYTE v13[32]; // [rsp+38h] [rbp-50h] BYREF _BYTE v14[16]; // [rsp+58h] [rbp-30h] BYREF long long v15; // [rsp+68h] [rbp-20h] long long v16; // [rsp+70h] [rbp-18h] int v17[2]; // [rsp+78h] [rbp-10h] TransactionTask *v18; // [rsp+80h] [rbp-8h] v18 = a1; *(_QWORD *)v17 = a2; v16 = a3; v12 = operator new(0x38uLL); std::shared_ptr<TransactionBase>::shared_ptr<Transaction<LoginDatabaseConnection>,void>((long long)v14, a3); TransactionWithResultTask::TransactionWithResultTask(v12, (int)v14, v3, v4, v5, v6, (int)a1, a1, a2, a3); v13[19] = 0; std::shared_ptr<TransactionBase>::~shared_ptr((long long)v14); v15 = v12; TransactionWithResultTask::GetFuture((TransactionWithResultTask *)v13); DatabaseWorkerPool<LoginDatabaseConnection>::Enqueue(*(_QWORD *)v10, v15); TransactionCallback::TransactionCallback(*(_QWORD *)v8, v13); std::future<bool>::~future(v13); return v9; }
AsyncCommitTransaction: SUB RSP,0x88 MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x10],RAX MOV EDI,0x38 CALL 0x00361820 MOV RSI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x4b],0x1 LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x30],RDI CALL 0x001c8460 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] LAB_001c855b: CALL 0x001c8620 LAB_001c8560: JMP 0x001c8562 LAB_001c8562: MOV byte ptr [RSP + 0x4b],0x0 LEA RDI,[RSP + 0x58] CALL 0x001c84e0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RSI,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x38] CALL 0x001c86b0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x68] LAB_001c8594: CALL 0x001c7930 JMP 0x001c859b LAB_001c859b: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x38] CALL 0x001c86e0 LAB_001c85a9: JMP 0x001c85ab LAB_001c85ab: LEA RDI,[RSP + 0x38] CALL 0x001c8720 MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x88 RET
/* DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction(std::shared_ptr<Transaction<LoginDatabaseConnection> >) */ TransactionCallback * DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction (TransactionCallback *param_1,DatabaseWorkerPool<LoginDatabaseConnection> *param_2, shared_ptr *param_3) { TransactionWithResultTask *pTVar1; TransactionWithResultTask local_50 [19]; int1 local_3d; shared_ptr<TransactionBase> local_30 [16]; SQLOperation *local_20; shared_ptr *local_18; DatabaseWorkerPool<LoginDatabaseConnection> *local_10; TransactionCallback *local_8; local_18 = param_3; local_10 = param_2; local_8 = param_1; pTVar1 = (TransactionWithResultTask *)operator_new(0x38); local_3d = 1; std::shared_ptr<TransactionBase>::shared_ptr<Transaction<LoginDatabaseConnection>,void> (local_30,param_3); /* try { // try from 001c855b to 001c855f has its CatchHandler @ 001c85c2 */ TransactionWithResultTask::TransactionWithResultTask(pTVar1,local_30); local_3d = 0; std::shared_ptr<TransactionBase>::~shared_ptr(local_30); local_20 = (SQLOperation *)pTVar1; TransactionWithResultTask::GetFuture(local_50); /* try { // try from 001c8594 to 001c85a8 has its CatchHandler @ 001c85f4 */ Enqueue(param_2,local_20); TransactionCallback::TransactionCallback(param_1,(future *)local_50); std::future<bool>::~future((future<bool> *)local_50); return param_1; }
25,757
DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction(std::shared_ptr<Transaction<LoginDatabaseConnection>>)
SylCore-WoTLK/src/server/database/Database/DatabaseWorkerPool.cpp
TransactionCallback DatabaseWorkerPool<T>::AsyncCommitTransaction(SQLTransaction<T> transaction) { #ifdef ACORE_DEBUG //! Only analyze transaction weaknesses in Debug mode. //! Ideally we catch the faults in Debug mode and then correct them, //! so there's no need to waste these CPU cycles in Release mode. switch (transaction->GetSize()) { case 0: LOG_DEBUG("sql.driver", "Transaction contains 0 queries. Not executing."); break; case 1: LOG_DEBUG("sql.driver", "Warning: Transaction only holds 1 query, consider removing Transaction context in code."); break; default: break; } #endif // ACORE_DEBUG TransactionWithResultTask* task = new TransactionWithResultTask(transaction); TransactionFuture result = task->GetFuture(); Enqueue(task); return TransactionCallback(std::move(result)); }
O3
cpp
DatabaseWorkerPool<LoginDatabaseConnection>::AsyncCommitTransaction(std::shared_ptr<Transaction<LoginDatabaseConnection>>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movl $0x38, %edi callq 0xd3250 movq %rax, %r14 movq (%r12), %rax movq %rax, (%rsp) movq 0x8(%r12), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x618d7 movq 0x10a63f(%rip), %rcx # 0x16bf08 cmpb $0x0, (%rcx) je 0x618d3 incl 0x8(%rax) jmp 0x618d7 lock incl 0x8(%rax) leaq 0x8(%rsp), %r12 movq %rsp, %rsi movq %r14, %rdi callq 0x5d1c4 movq %r12, %rdi callq 0x2b998 movq %r14, %rsi addq $0x20, %rsi leaq 0x10(%rsp), %rdi callq 0x623e8 leaq 0x20(%rsp), %rsi movq %r14, (%rsi) movq (%r15), %rdi callq 0x5d566 leaq 0x18(%rsp), %rdi movaps -0x8(%rdi), %xmm0 xorl %eax, %eax movq %rax, (%rdi) movups %xmm0, (%rbx) movq %rax, -0x8(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movups %xmm0, 0x10(%rbx) callq 0x2b998 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x2b998 jmp 0x6196b movq %rax, %rbx movq %r12, %rdi callq 0x2b998 movl $0x38, %esi movq %r14, %rdi callq 0xd32e8 movq %rbx, %rdi callq 0x1bba0 nop
_ZN18DatabaseWorkerPoolI27CharacterDatabaseConnectionE22AsyncCommitTransactionESt10shared_ptrI11TransactionIS0_EE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r12, rdx mov r15, rsi mov rbx, rdi mov edi, 38h ; '8'; unsigned __int64 call _Znwm; operator new(ulong) mov r14, rax mov rax, [r12] mov [rsp+48h+var_48], rax mov rax, [r12+8] mov [rsp+48h+var_40], rax test rax, rax jz short loc_618D7 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_618D3 inc dword ptr [rax+8] jmp short loc_618D7 loc_618D3: lock inc dword ptr [rax+8] loc_618D7: lea r12, [rsp+48h+var_40] mov rsi, rsp mov rdi, r14 call _ZN25TransactionWithResultTaskC2ESt10shared_ptrI15TransactionBaseE; TransactionWithResultTask::TransactionWithResultTask(std::shared_ptr<TransactionBase>) mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rsi, r14 add rsi, 20h ; ' ' lea rdi, [rsp+48h+var_38] call _ZNSt14__basic_futureIbEC2ERKSt10shared_ptrINSt13__future_base13_State_baseV2EE; std::__basic_future<bool>::__basic_future(std::shared_ptr<std::__future_base::_State_baseV2> const&) lea rsi, [rsp+48h+var_28] mov [rsi], r14 mov rdi, [r15] call _ZN21ProducerConsumerQueueIP12SQLOperationE4PushERKS1_; ProducerConsumerQueue<SQLOperation *>::Push(SQLOperation * const&) lea rdi, [rsp+48h+var_30] movaps xmm0, xmmword ptr [rdi-8] xor eax, eax mov [rdi], rax movups xmmword ptr [rbx], xmm0 mov [rdi-8], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+10h], xmm0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_6196B mov rbx, rax mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov esi, 38h ; '8'; unsigned __int64 mov rdi, r14; void * call _ZdlPvm; operator delete(void *,ulong) loc_6196B: mov rdi, rbx call __Unwind_Resume
_OWORD * DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncCommitTransaction( _OWORD *a1, _QWORD **a2, long long *a3) { _QWORD *v4; // r14 volatile signed __int32 *v5; // rax __int128 v6; // xmm0 long long v8; // [rsp+0h] [rbp-48h] BYREF volatile signed __int32 *v9; // [rsp+8h] [rbp-40h] BYREF __int128 v10; // [rsp+10h] [rbp-38h] BYREF _QWORD *v11; // [rsp+20h] [rbp-28h] BYREF v4 = (_QWORD *)operator new(0x38uLL); v8 = *a3; v5 = (volatile signed __int32 *)a3[1]; v9 = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v5 + 2); else _InterlockedIncrement(v5 + 2); } TransactionWithResultTask::TransactionWithResultTask(v4, &v8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v9); std::__basic_future<bool>::__basic_future(&v10, v4 + 4); v11 = v4; ProducerConsumerQueue<SQLOperation *>::Push(*a2, &v11); v6 = v10; *((_QWORD *)&v10 + 1) = 0LL; *a1 = v6; *(_QWORD *)&v10 = 0LL; a1[2] = 0LL; a1[1] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v10 + 1); return a1; }
AsyncCommitTransaction: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV EDI,0x38 CALL 0x001d3250 MOV R14,RAX MOV RAX,qword ptr [R12] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [R12 + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x001618d7 MOV RCX,qword ptr [0x0026bf08] CMP byte ptr [RCX],0x0 JZ 0x001618d3 INC dword ptr [RAX + 0x8] JMP 0x001618d7 LAB_001618d3: INC.LOCK dword ptr [RAX + 0x8] LAB_001618d7: LEA R12,[RSP + 0x8] MOV RSI,RSP MOV RDI,R14 CALL 0x0015d1c4 LAB_001618e7: MOV RDI,R12 CALL 0x0012b998 MOV RSI,R14 ADD RSI,0x20 LEA RDI,[RSP + 0x10] CALL 0x001623e8 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R14 MOV RDI,qword ptr [R15] LAB_0016190b: CALL 0x0015d566 LAB_00161910: LEA RDI,[RSP + 0x18] MOVAPS XMM0,xmmword ptr [RDI + -0x8] XOR EAX,EAX MOV qword ptr [RDI],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RDI + -0x8],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 CALL 0x0012b998 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncCommitTransaction(std::shared_ptr<Transaction<CharacterDatabaseConnection> >) */ int8 * DatabaseWorkerPool<CharacterDatabaseConnection>::AsyncCommitTransaction (int8 *param_1,int8 *param_2,int8 *param_3) { int8 uVar1; int8 local_48; long local_40; int8 local_38; int8 uStack_30; TransactionWithResultTask *local_28; local_28 = (TransactionWithResultTask *)operator_new(0x38); local_48 = *param_3; local_40 = param_3[1]; if (local_40 != 0) { if (*PTR___libc_single_threaded_0026bf08 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } /* try { // try from 001618d7 to 001618e6 has its CatchHandler @ 00161953 */ TransactionWithResultTask::TransactionWithResultTask(local_28,&local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_40); std::__basic_future<bool>::__basic_future ((__basic_future<bool> *)&local_38,(shared_ptr *)(local_28 + 0x20)); /* try { // try from 0016190b to 0016190f has its CatchHandler @ 00161944 */ ProducerConsumerQueue<SQLOperation*>::Push ((ProducerConsumerQueue<SQLOperation*> *)*param_2,(SQLOperation **)&local_28); uVar1 = uStack_30; uStack_30 = 0; *param_1 = local_38; param_1[1] = uVar1; local_38 = 0; param_1[4] = 0; param_1[5] = 0; param_1[2] = 0; param_1[3] = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); return param_1; }
25,758
c4_set_sync_period
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
INTERNAL bool c4_set_sync_period(uint64_t slot, bytes32_t blockhash, bytes_t validators, chain_id_t chain_id) { storage_plugin_t storage_conf = {0}; uint32_t period = (slot >> 13) + 1; c4_chain_state_t state = c4_get_chain_state(chain_id); uint32_t allocated_len = state.len; char name[100]; // check if we had only trusted blocks if (trusted_blocks_len(state)) { safe_free(state.blocks); state.blocks = NULL; state.len = 0; allocated_len = 0; } c4_get_storage_config(&storage_conf); while (state.len >= storage_conf.max_sync_states && state.blocks) { uint32_t oldest = 0; uint32_t latest = 0; int oldest_index = 0; // find the oldest and latest period for (int i = 0; i < state.len; i++) { uint32_t p = state.blocks[i].period; if (p > latest || latest == 0) latest = p; if (p < oldest || oldest == 0) { oldest = p; oldest_index = i; } } if (state.len > 2) { // we want to keep the oldest and the latest, but remove the second oldest uint32_t oldest_2nd = 0; int oldest_2nd_index = 0; for (int i = 0; i < state.len; i++) { uint32_t p = state.blocks[i].period; if (p > oldest && p < latest && (p < oldest_2nd || oldest_2nd == 0)) { oldest_2nd = p; oldest_2nd_index = i; } } oldest_index = oldest_2nd_index; oldest = oldest_2nd; } sprintf(name, "sync_%" PRIu64 "_%d", (uint64_t) chain_id, oldest); storage_conf.del(name); if (oldest_index < state.len - 1) memmove(state.blocks + oldest_index, state.blocks + oldest_index + 1, (state.len - oldest_index - 1) * sizeof(c4_trusted_block_t)); state.len--; } #ifdef C4_STATIC_MEMORY state.blocks = (c4_trusted_block_t*) state_buffer; #else if (allocated_len == 0) state.blocks = safe_calloc(sizeof(c4_trusted_block_t), 1); else if (allocated_len < state.len + 1) state.blocks = safe_realloc(state.blocks, sizeof(c4_trusted_block_t) * (state.len + 1)); #endif state.blocks[state.len].slot = slot; state.blocks[state.len].period = period; memcpy(state.blocks[state.len].blockhash, blockhash, 32); state.len++; sprintf(name, "sync_%" PRIu64 "_%d", (uint64_t) chain_id, period); storage_conf.set(name, validators); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif return true; }
O2
c
c4_set_sync_period: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movl %r8d, %ebp movq %rcx, %rbx movl %edx, 0x4(%rsp) movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movl %r8d, %edi callq 0x28734 movq %rax, %r14 movl %edx, %r13d movq %rax, %rdi movl %edx, %esi callq 0x28aeb testl %eax, %eax movq %rbx, 0x20(%rsp) je 0x288fd movq %r14, %rdi callq 0x4a0e0 xorl %r14d, %r14d xorl %r13d, %r13d leaq 0x30(%rsp), %rdi callq 0x4dff8 movl %ebp, %eax movq %rax, 0x28(%rsp) leaq 0x28(%r14), %rbx leaq 0x50(%rsp), %r15 movl %r13d, 0x1c(%rsp) movl %r13d, %r12d cmpl 0x48(%rsp), %r13d jb 0x28a09 testq %r14, %r14 je 0x28a09 xorl %ecx, %ecx movq %rbx, %rsi xorl %edx, %edx xorl %ebp, %ebp xorl %eax, %eax cmpq %rcx, %r12 je 0x2896d movl (%rsi), %edi cmpl %edx, %edi movl %edx, %r8d cmoval %edi, %r8d testl %edx, %edx cmovel %edi, %r8d leal -0x1(%rax), %edx cmpl %edi, %edx cmovael %ecx, %ebp cmovbl %eax, %edi incq %rcx addq $0x30, %rsi movl %r8d, %edx movl %edi, %eax jmp 0x2893e cmpl $0x3, %r12d jb 0x289b6 xorl %esi, %esi movq %rbx, %rdi xorl %ecx, %ecx xorl %ebp, %ebp cmpq %rsi, %r12 je 0x289b8 movl (%rdi), %r8d cmpl %eax, %r8d setbe %r9b cmpl %edx, %r8d setae %r10b leal -0x1(%rcx), %r11d cmpl %r8d, %r11d setb %r11b orb %r10b, %r11b orb %r9b, %r11b cmovnel %ecx, %r8d cmovel %esi, %ebp incq %rsi addq $0x30, %rdi movl %r8d, %ecx jmp 0x2897c movl %eax, %ecx movq %r15, %rdi leaq 0x4bb37(%rip), %rsi # 0x744f9 movq 0x28(%rsp), %rdx xorl %eax, %eax callq 0x22080 movq %r15, %rdi callq *0x40(%rsp) leal -0x1(%r12), %r13d cmpl %r13d, %ebp jae 0x2891c movslq %ebp, %rax imulq $0x30, %rax, %rax leaq (%r14,%rax), %rdi leaq (%r14,%rax), %rsi addq $0x30, %rsi notl %ebp addl %r12d, %ebp imulq $0x30, %rbp, %rdx callq 0x22390 jmp 0x2891c movl 0x1c(%rsp), %ecx testl %ecx, %ecx je 0x28a36 leal 0x1(%r12), %eax cmpl %eax, %ecx movq 0x20(%rsp), %r15 movl 0x4(%rsp), %ebp jae 0x28a4d movl %eax, %eax imulq $0x30, %rax, %rsi movq %r14, %rdi callq 0x4a087 movq %rax, %r14 jmp 0x28a4d pushq $0x30 popq %rdi pushq $0x1 popq %rsi callq 0x4a021 movq %rax, %r14 movq 0x20(%rsp), %r15 movl 0x4(%rsp), %ebp movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rsi movq %rsi, %rcx shrq $0xd, %rcx incl %ecx imulq $0x30, %r12, %rax movq %rsi, (%r14,%rax) movl %ecx, 0x28(%r14,%rax) movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movups %xmm0, 0x8(%r14,%rax) movups %xmm1, 0x18(%r14,%rax) leaq 0x4ba72(%rip), %rsi # 0x744f9 leaq 0x50(%rsp), %rbx movq %rbx, %rdi movq 0x28(%rsp), %r13 movq %r13, %rdx xorl %eax, %eax callq 0x22080 movq %rbx, %rdi movl %ebp, %esi movq %r15, %rdx callq *0x38(%rsp) leaq 0x4ba3d(%rip), %rsi # 0x744ee movq %rbx, %rdi movq %r13, %rdx xorl %eax, %eax callq 0x22080 imull $0x30, %r12d, %esi addl $0x30, %esi movq %rbx, %rdi movq %r14, %rdx callq *0x38(%rsp) movq %r14, %rdi callq 0x4a0e0 movb $0x1, %al addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
c4_set_sync_period: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov ebp, r8d mov rbx, rcx mov [rsp+0E8h+var_E4], edx mov [rsp+0E8h+var_D8], rsi mov [rsp+0E8h+var_E0], rdi xorps xmm0, xmm0 movaps [rsp+0E8h+var_A8], xmm0 movaps [rsp+0E8h+var_B8], xmm0 mov edi, r8d call c4_get_chain_state mov r14, rax mov r13d, edx mov rdi, rax mov esi, edx call trusted_blocks_len test eax, eax mov [rsp+0E8h+var_C8], rbx jz short loc_288FD mov rdi, r14 call safe_free xor r14d, r14d xor r13d, r13d loc_288FD: lea rdi, [rsp+0E8h+var_B8] call c4_get_storage_config mov eax, ebp mov [rsp+0E8h+var_C0], rax lea rbx, [r14+28h] lea r15, [rsp+0E8h+var_98] mov [rsp+0E8h+var_CC], r13d loc_2891C: mov r12d, r13d cmp r13d, dword ptr [rsp+0E8h+var_A8+8] jb loc_28A09 test r14, r14 jz loc_28A09 xor ecx, ecx mov rsi, rbx xor edx, edx xor ebp, ebp xor eax, eax loc_2893E: cmp r12, rcx jz short loc_2896D mov edi, [rsi] cmp edi, edx mov r8d, edx cmova r8d, edi test edx, edx cmovz r8d, edi lea edx, [rax-1] cmp edx, edi cmovnb ebp, ecx cmovb edi, eax inc rcx add rsi, 30h ; '0' mov edx, r8d mov eax, edi jmp short loc_2893E loc_2896D: cmp r12d, 3 jb short loc_289B6 xor esi, esi mov rdi, rbx xor ecx, ecx xor ebp, ebp loc_2897C: cmp r12, rsi jz short loc_289B8 mov r8d, [rdi] cmp r8d, eax setbe r9b cmp r8d, edx setnb r10b lea r11d, [rcx-1] cmp r11d, r8d setb r11b or r11b, r10b or r11b, r9b cmovnz r8d, ecx cmovz ebp, esi inc rsi add rdi, 30h ; '0' mov ecx, r8d jmp short loc_2897C loc_289B6: mov ecx, eax loc_289B8: mov rdi, r15 lea rsi, aSyncLuD; "sync_%lu_%d" mov rdx, [rsp+0E8h+var_C0] xor eax, eax call _sprintf mov rdi, r15 call qword ptr [rsp+0E8h+var_A8] lea r13d, [r12-1] cmp ebp, r13d jnb loc_2891C movsxd rax, ebp imul rax, 30h ; '0' lea rdi, [r14+rax] lea rsi, [r14+rax] add rsi, 30h ; '0' not ebp add ebp, r12d imul rdx, rbp, 30h ; '0' call _memmove jmp loc_2891C loc_28A09: mov ecx, [rsp+0E8h+var_CC] test ecx, ecx jz short loc_28A36 lea eax, [r12+1] cmp ecx, eax mov r15, [rsp+0E8h+var_C8] mov ebp, [rsp+0E8h+var_E4] jnb short loc_28A4D mov eax, eax imul rsi, rax, 30h ; '0' mov rdi, r14 call safe_realloc mov r14, rax jmp short loc_28A4D loc_28A36: push 30h ; '0' pop rdi push 1 pop rsi call safe_calloc mov r14, rax mov r15, [rsp+0E8h+var_C8] mov ebp, [rsp+0E8h+var_E4] loc_28A4D: mov rdx, [rsp+0E8h+var_D8] mov rsi, [rsp+0E8h+var_E0] mov rcx, rsi shr rcx, 0Dh inc ecx imul rax, r12, 30h ; '0' mov [r14+rax], rsi mov [r14+rax+28h], ecx movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movups xmmword ptr [r14+rax+8], xmm0 movups xmmword ptr [r14+rax+18h], xmm1 lea rsi, aSyncLuD; "sync_%lu_%d" lea rbx, [rsp+0E8h+var_98] mov rdi, rbx mov r13, [rsp+0E8h+var_C0] mov rdx, r13 xor eax, eax call _sprintf mov rdi, rbx mov esi, ebp mov rdx, r15 call qword ptr [rsp+0E8h+var_B8+8] lea rsi, aStatesLu; "states_%lu" mov rdi, rbx mov rdx, r13 xor eax, eax call _sprintf imul esi, r12d, 30h ; '0' add esi, 30h ; '0' mov rdi, rbx mov rdx, r14 call qword ptr [rsp+0E8h+var_B8+8] mov rdi, r14 call safe_free mov al, 1 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char c4_set_sync_period(unsigned long long a1, _OWORD *a2, unsigned int a3, long long a4, unsigned int a5) { long long chain_state; // r14 unsigned int v8; // edx unsigned int v9; // r13d unsigned int v10; // r12d long long v11; // rcx unsigned int *v12; // rsi unsigned int v13; // edx signed int v14; // ebp unsigned int v15; // eax unsigned int v16; // edi unsigned int v17; // r8d long long v18; // rsi unsigned int *v19; // rdi unsigned int v20; // ecx unsigned int v21; // r8d long long v22; // r15 unsigned int v23; // ebp int v24; // ecx long long v25; // rax __int128 v26; // xmm1 unsigned int v31; // [rsp+1Ch] [rbp-CCh] long long v32; // [rsp+28h] [rbp-C0h] __int128 v33; // [rsp+30h] [rbp-B8h] BYREF __int128 v34; // [rsp+40h] [rbp-A8h] _BYTE v35[152]; // [rsp+50h] [rbp-98h] BYREF v34 = 0LL; v33 = 0LL; chain_state = c4_get_chain_state(a5); v9 = v8; if ( (unsigned int)trusted_blocks_len(chain_state, v8) ) { safe_free(chain_state); chain_state = 0LL; v9 = 0; } c4_get_storage_config(&v33); v32 = a5; v31 = v9; while ( 1 ) { v10 = v9; if ( v9 < DWORD2(v34) || !chain_state ) break; v11 = 0LL; v12 = (unsigned int *)(chain_state + 40); v13 = 0; v14 = 0; v15 = 0; while ( v9 != v11 ) { v16 = *v12; v17 = v13; if ( *v12 > v13 ) v17 = *v12; if ( !v13 ) v17 = *v12; if ( v15 - 1 < v16 ) v16 = v15; else v14 = v11; ++v11; v12 += 12; v13 = v17; v15 = v16; } if ( v9 < 3 ) { v20 = v15; } else { v18 = 0LL; v19 = (unsigned int *)(chain_state + 40); v20 = 0; v14 = 0; while ( v9 != v18 ) { v21 = *v19; if ( v21 <= v15 || v21 >= v13 || v20 - 1 < v21 ) v21 = v20; else v14 = v18; ++v18; v19 += 12; v20 = v21; } } sprintf(v35, "sync_%lu_%d", v32, v20); ((void ( *)(_BYTE *))v34)(v35); --v9; if ( v14 < v10 - 1 ) memmove(chain_state + 48LL * v14, chain_state + 48LL * v14 + 48, 48LL * (v10 + ~v14)); } if ( v31 ) { v22 = a4; v23 = a3; if ( v31 < v9 + 1 ) chain_state = safe_realloc(chain_state, 48LL * (v9 + 1)); } else { chain_state = safe_calloc(48LL, 1LL); v22 = a4; v23 = a3; } v24 = (a1 >> 13) + 1; v25 = 48LL * v9; *(_QWORD *)(chain_state + v25) = a1; *(_DWORD *)(chain_state + v25 + 40) = v24; v26 = a2[1]; *(_OWORD *)(chain_state + v25 + 8) = *a2; *(_OWORD *)(chain_state + v25 + 24) = v26; sprintf(v35, "sync_%lu_%d", v32, v24); (*((void ( **)(_BYTE *, _QWORD, long long))&v33 + 1))(v35, v23, v22); sprintf(v35, "states_%lu", v32); (*((void ( **)(_BYTE *, _QWORD, long long))&v33 + 1))(v35, 48 * v9 + 48, chain_state); safe_free(chain_state); return 1; }
c4_set_sync_period: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV EBP,R8D MOV RBX,RCX MOV dword ptr [RSP + 0x4],EDX MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV EDI,R8D CALL 0x00128734 MOV R14,RAX MOV R13D,EDX MOV RDI,RAX MOV ESI,EDX CALL 0x00128aeb TEST EAX,EAX MOV qword ptr [RSP + 0x20],RBX JZ 0x001288fd MOV RDI,R14 CALL 0x0014a0e0 XOR R14D,R14D XOR R13D,R13D LAB_001288fd: LEA RDI,[RSP + 0x30] CALL 0x0014dff8 MOV EAX,EBP MOV qword ptr [RSP + 0x28],RAX LEA RBX,[R14 + 0x28] LEA R15,[RSP + 0x50] MOV dword ptr [RSP + 0x1c],R13D LAB_0012891c: MOV R12D,R13D CMP R13D,dword ptr [RSP + 0x48] JC 0x00128a09 TEST R14,R14 JZ 0x00128a09 XOR ECX,ECX MOV RSI,RBX XOR EDX,EDX XOR EBP,EBP XOR EAX,EAX LAB_0012893e: CMP R12,RCX JZ 0x0012896d MOV EDI,dword ptr [RSI] CMP EDI,EDX MOV R8D,EDX CMOVA R8D,EDI TEST EDX,EDX CMOVZ R8D,EDI LEA EDX,[RAX + -0x1] CMP EDX,EDI CMOVNC EBP,ECX CMOVC EDI,EAX INC RCX ADD RSI,0x30 MOV EDX,R8D MOV EAX,EDI JMP 0x0012893e LAB_0012896d: CMP R12D,0x3 JC 0x001289b6 XOR ESI,ESI MOV RDI,RBX XOR ECX,ECX XOR EBP,EBP LAB_0012897c: CMP R12,RSI JZ 0x001289b8 MOV R8D,dword ptr [RDI] CMP R8D,EAX SETBE R9B CMP R8D,EDX SETNC R10B LEA R11D,[RCX + -0x1] CMP R11D,R8D SETC R11B OR R11B,R10B OR R11B,R9B CMOVNZ R8D,ECX CMOVZ EBP,ESI INC RSI ADD RDI,0x30 MOV ECX,R8D JMP 0x0012897c LAB_001289b6: MOV ECX,EAX LAB_001289b8: MOV RDI,R15 LEA RSI,[0x1744f9] MOV RDX,qword ptr [RSP + 0x28] XOR EAX,EAX CALL 0x00122080 MOV RDI,R15 CALL qword ptr [RSP + 0x40] LEA R13D,[R12 + -0x1] CMP EBP,R13D JNC 0x0012891c MOVSXD RAX,EBP IMUL RAX,RAX,0x30 LEA RDI,[R14 + RAX*0x1] LEA RSI,[R14 + RAX*0x1] ADD RSI,0x30 NOT EBP ADD EBP,R12D IMUL RDX,RBP,0x30 CALL 0x00122390 JMP 0x0012891c LAB_00128a09: MOV ECX,dword ptr [RSP + 0x1c] TEST ECX,ECX JZ 0x00128a36 LEA EAX,[R12 + 0x1] CMP ECX,EAX MOV R15,qword ptr [RSP + 0x20] MOV EBP,dword ptr [RSP + 0x4] JNC 0x00128a4d MOV EAX,EAX IMUL RSI,RAX,0x30 MOV RDI,R14 CALL 0x0014a087 MOV R14,RAX JMP 0x00128a4d LAB_00128a36: PUSH 0x30 POP RDI PUSH 0x1 POP RSI CALL 0x0014a021 MOV R14,RAX MOV R15,qword ptr [RSP + 0x20] MOV EBP,dword ptr [RSP + 0x4] LAB_00128a4d: MOV RDX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] MOV RCX,RSI SHR RCX,0xd INC ECX IMUL RAX,R12,0x30 MOV qword ptr [R14 + RAX*0x1],RSI MOV dword ptr [R14 + RAX*0x1 + 0x28],ECX MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVUPS xmmword ptr [R14 + RAX*0x1 + 0x8],XMM0 MOVUPS xmmword ptr [R14 + RAX*0x1 + 0x18],XMM1 LEA RSI,[0x1744f9] LEA RBX,[RSP + 0x50] MOV RDI,RBX MOV R13,qword ptr [RSP + 0x28] MOV RDX,R13 XOR EAX,EAX CALL 0x00122080 MOV RDI,RBX MOV ESI,EBP MOV RDX,R15 CALL qword ptr [RSP + 0x38] LEA RSI,[0x1744ee] MOV RDI,RBX MOV RDX,R13 XOR EAX,EAX CALL 0x00122080 IMUL ESI,R12D,0x30 ADD ESI,0x30 MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RSP + 0x38] MOV RDI,R14 CALL 0x0014a0e0 MOV AL,0x1 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 c4_set_sync_period(ulong param_1,int4 *param_2,int4 param_3,int8 param_4, uint param_5) { int4 *puVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; uint uVar9; int iVar10; uint uVar11; long lVar12; long lVar13; uint uVar14; ulong uVar15; uint uVar16; uint uVar17; ulong uVar18; ulong uVar19; uint *puVar20; uint uVar21; uint uVar22; ulong uVar23; bool bVar24; int1 auVar25 [16]; int8 local_b8; code *pcStack_b0; code *local_a8; int8 uStack_a0; char local_98 [104]; uVar18 = (ulong)param_5; local_a8 = (code *)0x0; uStack_a0 = 0; local_b8 = 0; pcStack_b0 = (code *)0x0; auVar25 = c4_get_chain_state(param_5); lVar12 = auVar25._0_8_; uVar23 = auVar25._8_8_ & 0xffffffff; iVar10 = trusted_blocks_len(lVar12,auVar25._8_8_ & 0xffffffff); if (iVar10 != 0) { safe_free(lVar12); lVar12 = 0; uVar23 = 0; } c4_get_storage_config(&local_b8); uVar21 = (uint)uVar23; while( true ) { uVar22 = (uint)uVar23; if ((uVar22 < (uint)uStack_a0) || (lVar12 == 0)) break; uVar16 = 0; uVar19 = 0; uVar11 = 0; puVar20 = (uint *)(lVar12 + 0x28); for (uVar15 = 0; uVar17 = (uint)uVar19, uVar23 != uVar15; uVar15 = uVar15 + 1) { uVar17 = *puVar20; uVar14 = uVar16; if (uVar16 < uVar17) { uVar14 = uVar17; } bVar24 = uVar16 == 0; uVar16 = uVar14; if (bVar24) { uVar16 = uVar17; } if (uVar17 <= uVar11 - 1) { uVar19 = uVar15 & 0xffffffff; uVar11 = uVar17; } puVar20 = puVar20 + 0xc; } if (2 < uVar22) { uVar14 = 0; uVar19 = 0; puVar20 = (uint *)(lVar12 + 0x28); for (uVar15 = 0; uVar17 = (uint)uVar19, uVar23 != uVar15; uVar15 = uVar15 + 1) { uVar17 = *puVar20; bVar24 = uVar14 - 1 < uVar17; uVar9 = uVar17; if ((bVar24 || uVar16 <= uVar17) || uVar17 <= uVar11) { uVar9 = uVar14; } uVar14 = uVar9; if ((!bVar24 && uVar16 > uVar17) && uVar17 > uVar11) { uVar19 = uVar15 & 0xffffffff; } puVar20 = puVar20 + 0xc; } } sprintf(local_98,"sync_%lu_%d",uVar18); (*local_a8)(local_98); uVar23 = (ulong)(uVar22 - 1); if (uVar17 < uVar22 - 1) { memmove((void *)(lVar12 + (long)(int)uVar17 * 0x30), (void *)(lVar12 + (long)(int)uVar17 * 0x30 + 0x30),(ulong)(~uVar17 + uVar22) * 0x30); } } if (uVar21 == 0) { lVar12 = safe_calloc(0x30,1); } else if (uVar21 < uVar22 + 1) { lVar12 = safe_realloc(lVar12,(ulong)(uVar22 + 1) * 0x30); } lVar13 = uVar23 * 0x30; *(ulong *)(lVar12 + lVar13) = param_1; *(int *)(lVar12 + 0x28 + lVar13) = (int)(param_1 >> 0xd) + 1; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[4]; uVar6 = param_2[5]; uVar7 = param_2[6]; uVar8 = param_2[7]; puVar1 = (int4 *)(lVar12 + 8 + lVar13); *puVar1 = *param_2; puVar1[1] = uVar2; puVar1[2] = uVar3; puVar1[3] = uVar4; puVar1 = (int4 *)(lVar12 + 0x18 + lVar13); *puVar1 = uVar5; puVar1[1] = uVar6; puVar1[2] = uVar7; puVar1[3] = uVar8; sprintf(local_98,"sync_%lu_%d",uVar18); (*pcStack_b0)(local_98,param_3,param_4); sprintf(local_98,"states_%lu",uVar18); (*pcStack_b0)(local_98,uVar22 * 0x30 + 0x30,lVar12); safe_free(lVar12); return 1; }
25,759
c4_set_sync_period
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
INTERNAL bool c4_set_sync_period(uint64_t slot, bytes32_t blockhash, bytes_t validators, chain_id_t chain_id) { storage_plugin_t storage_conf = {0}; uint32_t period = (slot >> 13) + 1; c4_chain_state_t state = c4_get_chain_state(chain_id); uint32_t allocated_len = state.len; char name[100]; // check if we had only trusted blocks if (trusted_blocks_len(state)) { safe_free(state.blocks); state.blocks = NULL; state.len = 0; allocated_len = 0; } c4_get_storage_config(&storage_conf); while (state.len >= storage_conf.max_sync_states && state.blocks) { uint32_t oldest = 0; uint32_t latest = 0; int oldest_index = 0; // find the oldest and latest period for (int i = 0; i < state.len; i++) { uint32_t p = state.blocks[i].period; if (p > latest || latest == 0) latest = p; if (p < oldest || oldest == 0) { oldest = p; oldest_index = i; } } if (state.len > 2) { // we want to keep the oldest and the latest, but remove the second oldest uint32_t oldest_2nd = 0; int oldest_2nd_index = 0; for (int i = 0; i < state.len; i++) { uint32_t p = state.blocks[i].period; if (p > oldest && p < latest && (p < oldest_2nd || oldest_2nd == 0)) { oldest_2nd = p; oldest_2nd_index = i; } } oldest_index = oldest_2nd_index; oldest = oldest_2nd; } sprintf(name, "sync_%" PRIu64 "_%d", (uint64_t) chain_id, oldest); storage_conf.del(name); if (oldest_index < state.len - 1) memmove(state.blocks + oldest_index, state.blocks + oldest_index + 1, (state.len - oldest_index - 1) * sizeof(c4_trusted_block_t)); state.len--; } #ifdef C4_STATIC_MEMORY state.blocks = (c4_trusted_block_t*) state_buffer; #else if (allocated_len == 0) state.blocks = safe_calloc(sizeof(c4_trusted_block_t), 1); else if (allocated_len < state.len + 1) state.blocks = safe_realloc(state.blocks, sizeof(c4_trusted_block_t) * (state.len + 1)); #endif state.blocks[state.len].slot = slot; state.blocks[state.len].period = period; memcpy(state.blocks[state.len].blockhash, blockhash, 32); state.len++; sprintf(name, "sync_%" PRIu64 "_%d", (uint64_t) chain_id, period); storage_conf.set(name, validators); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif return true; }
O3
c
c4_set_sync_period: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movl %r8d, %ebp movq %rcx, 0x28(%rsp) movl %edx, 0xc(%rsp) movq %rsi, 0x20(%rsp) movq %rdi, 0x18(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movl %r8d, %edi callq 0x288e0 movq %rax, %r14 testl %edx, %edx je 0x28ad6 movl %edx, %ebx movl %edx, %eax shlq $0x4, %rax leaq (%rax,%rax,2), %rax xorl %ecx, %ecx xorl %edx, %edx cmpq $0x1, (%r14,%rcx) adcl $0x0, %edx addq $0x30, %rcx cmpq %rcx, %rax jne 0x28ab6 testl %edx, %edx je 0x28ad8 movq %r14, %rdi callq 0x50f4c xorl %r14d, %r14d xorl %ebx, %ebx leaq 0x30(%rsp), %r15 movq %r15, %rdi callq 0x5506c testq %r14, %r14 setne %al cmpl 0x18(%r15), %ebx setae %cl andb %al, %cl movl %ebp, %eax movq %rax, 0x10(%rsp) movl %ebx, 0x8(%rsp) movl %ebx, %ebp cmpb $0x1, %cl jne 0x28c14 leaq 0x28(%r14), %r12 leaq 0x50(%rsp), %r15 movl 0x8(%rsp), %eax movl %eax, %ebp movl %ebp, %ebx movl $0x0, %r13d movl $0x0, %ecx testl %ebp, %ebp je 0x28bb3 xorl %ecx, %ecx movq %r12, %rsi xorl %eax, %eax xorl %r13d, %r13d xorl %edx, %edx movl %eax, %edi movl (%rsi), %eax cmpl %edx, %eax movl %edx, %r8d cmoval %eax, %r8d testl %edx, %edx movl %r8d, %edx cmovel %eax, %edx leal -0x1(%rdi), %r8d cmpl %eax, %r8d cmovael %ecx, %r13d cmovbl %edi, %eax incq %rcx addq $0x30, %rsi cmpq %rcx, %rbx jne 0x28b3a cmpl $0x3, %ebx jb 0x28bb1 xorl %esi, %esi movq %r12, %rdi xorl %r13d, %r13d xorl %r8d, %r8d movl (%rdi), %ecx cmpl %eax, %ecx setbe %r9b cmpl %edx, %ecx setae %r10b leal -0x1(%r8), %r11d cmpl %ecx, %r11d setb %r11b orb %r10b, %r11b orb %r9b, %r11b cmovnel %r8d, %ecx cmovel %esi, %r13d incq %rsi addq $0x30, %rdi movl %ecx, %r8d cmpq %rsi, %rbx jne 0x28b79 jmp 0x28bb3 movl %eax, %ecx movq %r15, %rdi leaq 0x5793c(%rip), %rsi # 0x804f9 movq 0x10(%rsp), %rdx xorl %eax, %eax callq 0x21080 movq %r15, %rdi callq *0x40(%rsp) movl %ebx, %ebp decl %ebp cmpl %ebp, %r13d jae 0x28c0a movslq %r13d, %rax leaq (%rax,%rax,2), %rax shlq $0x4, %rax leaq (%r14,%rax), %rdi leaq (%r14,%rax), %rsi addq $0x30, %rsi notl %r13d addl %ebx, %r13d shlq $0x4, %r13 leaq (,%r13,2), %rdx addq %r13, %rdx callq 0x21360 cmpl 0x48(%rsp), %ebp jae 0x28b19 movl 0x8(%rsp), %ecx testl %ecx, %ecx je 0x28c37 leal 0x1(%rbp), %eax cmpl %eax, %ecx jae 0x28c49 movl %eax, %eax shlq $0x4, %rax leaq (%rax,%rax,2), %rsi movq %r14, %rdi callq 0x50f29 jmp 0x28c46 movl $0x30, %edi movl $0x1, %esi callq 0x50eef movq %rax, %r14 movq 0x18(%rsp), %rdx movq %rdx, %rcx shrq $0xd, %rcx incl %ecx movl %ebp, %eax leaq (%rax,%rax,2), %rax shlq $0x4, %rax movq %rdx, (%r14,%rax) movl %ecx, 0x28(%r14,%rax) movq 0x20(%rsp), %rdx movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movups %xmm0, 0x8(%r14,%rax) movups %xmm1, 0x18(%r14,%rax) leaq 0x57870(%rip), %rsi # 0x804f9 leaq 0x50(%rsp), %rbx movq %rbx, %rdi movq 0x10(%rsp), %r15 movq %r15, %rdx xorl %eax, %eax callq 0x21080 movq %rbx, %rdi movl 0xc(%rsp), %esi movq 0x28(%rsp), %rdx callq *0x38(%rsp) leaq 0x57837(%rip), %rsi # 0x804ee movq %rbx, %rdi movq %r15, %rdx xorl %eax, %eax callq 0x21080 leal (%rbp,%rbp,2), %esi shll $0x4, %esi addl $0x30, %esi movq %rbx, %rdi movq %r14, %rdx callq *0x38(%rsp) movq %r14, %rdi callq 0x50f4c movb $0x1, %al addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
c4_set_sync_period: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov ebp, r8d mov [rsp+0E8h+var_C0], rcx mov [rsp+0E8h+var_DC], edx mov [rsp+0E8h+var_C8], rsi mov [rsp+0E8h+var_D0], rdi xorps xmm0, xmm0 movaps [rsp+0E8h+var_A8], xmm0 movaps [rsp+0E8h+var_B8], xmm0 mov edi, r8d call c4_get_chain_state mov r14, rax test edx, edx jz short loc_28AD6 mov ebx, edx mov eax, edx shl rax, 4 lea rax, [rax+rax*2] xor ecx, ecx xor edx, edx loc_28AB6: cmp qword ptr [r14+rcx], 1 adc edx, 0 add rcx, 30h ; '0' cmp rax, rcx jnz short loc_28AB6 test edx, edx jz short loc_28AD8 mov rdi, r14 call safe_free xor r14d, r14d loc_28AD6: xor ebx, ebx loc_28AD8: lea r15, [rsp+0E8h+var_B8] mov rdi, r15 call c4_get_storage_config test r14, r14 setnz al cmp ebx, [r15+18h] setnb cl and cl, al mov eax, ebp mov [rsp+0E8h+var_D8], rax mov [rsp+0E8h+var_E0], ebx mov ebp, ebx cmp cl, 1 jnz loc_28C14 lea r12, [r14+28h] lea r15, [rsp+0E8h+var_98] mov eax, [rsp+0E8h+var_E0] mov ebp, eax loc_28B19: mov ebx, ebp mov r13d, 0 mov ecx, 0 test ebp, ebp jz loc_28BB3 xor ecx, ecx mov rsi, r12 xor eax, eax xor r13d, r13d xor edx, edx loc_28B3A: mov edi, eax mov eax, [rsi] cmp eax, edx mov r8d, edx cmova r8d, eax test edx, edx mov edx, r8d cmovz edx, eax lea r8d, [rdi-1] cmp r8d, eax cmovnb r13d, ecx cmovb eax, edi inc rcx add rsi, 30h ; '0' cmp rbx, rcx jnz short loc_28B3A cmp ebx, 3 jb short loc_28BB1 xor esi, esi mov rdi, r12 xor r13d, r13d xor r8d, r8d loc_28B79: mov ecx, [rdi] cmp ecx, eax setbe r9b cmp ecx, edx setnb r10b lea r11d, [r8-1] cmp r11d, ecx setb r11b or r11b, r10b or r11b, r9b cmovnz ecx, r8d cmovz r13d, esi inc rsi add rdi, 30h ; '0' mov r8d, ecx cmp rbx, rsi jnz short loc_28B79 jmp short loc_28BB3 loc_28BB1: mov ecx, eax loc_28BB3: mov rdi, r15 lea rsi, aSyncLuD; "sync_%lu_%d" mov rdx, [rsp+0E8h+var_D8] xor eax, eax call _sprintf mov rdi, r15 call qword ptr [rsp+0E8h+var_A8] mov ebp, ebx dec ebp cmp r13d, ebp jnb short loc_28C0A movsxd rax, r13d lea rax, [rax+rax*2] shl rax, 4 lea rdi, [r14+rax] lea rsi, [r14+rax] add rsi, 30h ; '0' not r13d add r13d, ebx shl r13, 4 lea rdx, ds:0[r13*2] add rdx, r13 call _memmove loc_28C0A: cmp ebp, dword ptr [rsp+0E8h+var_A8+8] jnb loc_28B19 loc_28C14: mov ecx, [rsp+0E8h+var_E0] test ecx, ecx jz short loc_28C37 lea eax, [rbp+1] cmp ecx, eax jnb short loc_28C49 mov eax, eax shl rax, 4 lea rsi, [rax+rax*2] mov rdi, r14 call safe_realloc jmp short loc_28C46 loc_28C37: mov edi, 30h ; '0' mov esi, 1 call safe_calloc loc_28C46: mov r14, rax loc_28C49: mov rdx, [rsp+0E8h+var_D0] mov rcx, rdx shr rcx, 0Dh inc ecx mov eax, ebp lea rax, [rax+rax*2] shl rax, 4 mov [r14+rax], rdx mov [r14+rax+28h], ecx mov rdx, [rsp+0E8h+var_C8] movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movups xmmword ptr [r14+rax+8], xmm0 movups xmmword ptr [r14+rax+18h], xmm1 lea rsi, aSyncLuD; "sync_%lu_%d" lea rbx, [rsp+0E8h+var_98] mov rdi, rbx mov r15, [rsp+0E8h+var_D8] mov rdx, r15 xor eax, eax call _sprintf mov rdi, rbx mov esi, [rsp+0E8h+var_DC] mov rdx, [rsp+0E8h+var_C0] call qword ptr [rsp+0E8h+var_B8+8] lea rsi, aStatesLu; "states_%lu" mov rdi, rbx mov rdx, r15 xor eax, eax call _sprintf lea esi, [rbp+rbp*2+0] shl esi, 4 add esi, 30h ; '0' mov rdi, rbx mov rdx, r14 call qword ptr [rsp+0E8h+var_B8+8] mov rdi, r14 call safe_free mov al, 1 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char c4_set_sync_period(unsigned long long a1, _OWORD *a2, unsigned int a3, long long a4, unsigned int a5) { unsigned int v6; // edx long long chain_state; // r14 unsigned int v8; // ebx long long v9; // rax long long v10; // rcx int v11; // edx unsigned int v12; // ebp unsigned int v13; // ebx unsigned int v14; // r13d unsigned int v15; // ecx long long v16; // rcx unsigned int *v17; // rsi unsigned int v18; // eax unsigned int v19; // edx unsigned int v20; // edi unsigned int v21; // r8d bool v22; // zf long long v23; // rsi unsigned int *v24; // rdi unsigned int v25; // r8d long long v26; // rax int v27; // ecx long long v28; // rax __int128 v29; // xmm1 unsigned int v31; // [rsp+8h] [rbp-E0h] long long v33; // [rsp+10h] [rbp-D8h] __int128 v37; // [rsp+30h] [rbp-B8h] BYREF __int128 v38; // [rsp+40h] [rbp-A8h] _BYTE v39[152]; // [rsp+50h] [rbp-98h] BYREF v38 = 0LL; v37 = 0LL; chain_state = c4_get_chain_state(a5); if ( !v6 ) goto LABEL_6; v8 = v6; v9 = 48LL * v6; v10 = 0LL; v11 = 0; do { v11 += *(_QWORD *)(chain_state + v10) == 0LL; v10 += 48LL; } while ( v9 != v10 ); if ( v11 ) { safe_free(chain_state); chain_state = 0LL; LABEL_6: v8 = 0; } c4_get_storage_config(&v37); v33 = a5; v31 = v8; v12 = v8; if ( chain_state != 0 && v8 >= DWORD2(v38) ) { v12 = v8; do { v13 = v12; v14 = 0; v15 = 0; if ( v12 ) { v16 = 0LL; v17 = (unsigned int *)(chain_state + 40); v18 = 0; v14 = 0; v19 = 0; do { v20 = v18; v18 = *v17; v21 = v19; if ( *v17 > v19 ) v21 = *v17; v22 = v19 == 0; v19 = v21; if ( v22 ) v19 = *v17; if ( v20 - 1 < v18 ) v18 = v20; else v14 = v16; ++v16; v17 += 12; } while ( v12 != v16 ); if ( v12 < 3 ) { v15 = v18; } else { v23 = 0LL; v24 = (unsigned int *)(chain_state + 40); v14 = 0; v25 = 0; do { v15 = *v24; if ( v15 <= v18 || v15 >= v19 || v25 - 1 < v15 ) v15 = v25; else v14 = v23; ++v23; v24 += 12; v25 = v15; } while ( v12 != v23 ); } } sprintf(v39, "sync_%lu_%d", v33, v15); ((void ( *)(_BYTE *))v38)(v39); --v12; if ( v14 < v13 - 1 ) memmove(chain_state + 48LL * (int)v14); } while ( v12 >= DWORD2(v38) ); } if ( !v31 ) { v26 = safe_calloc(48LL, 1LL); goto LABEL_34; } if ( v31 < v12 + 1 ) { v26 = safe_realloc(chain_state, 48LL * (v12 + 1)); LABEL_34: chain_state = v26; } v27 = (a1 >> 13) + 1; v28 = 48LL * v12; *(_QWORD *)(chain_state + v28) = a1; *(_DWORD *)(chain_state + v28 + 40) = v27; v29 = a2[1]; *(_OWORD *)(chain_state + v28 + 8) = *a2; *(_OWORD *)(chain_state + v28 + 24) = v29; sprintf(v39, "sync_%lu_%d", v33, v27); (*((void ( **)(_BYTE *, _QWORD, long long))&v37 + 1))(v39, a3, a4); sprintf(v39, "states_%lu", v33); (*((void ( **)(_BYTE *, _QWORD, long long))&v37 + 1))(v39, 48 * v12 + 48, chain_state); safe_free(chain_state); return 1; }
c4_set_sync_period: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV EBP,R8D MOV qword ptr [RSP + 0x28],RCX MOV dword ptr [RSP + 0xc],EDX MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV EDI,R8D CALL 0x001288e0 MOV R14,RAX TEST EDX,EDX JZ 0x00128ad6 MOV EBX,EDX MOV EAX,EDX SHL RAX,0x4 LEA RAX,[RAX + RAX*0x2] XOR ECX,ECX XOR EDX,EDX LAB_00128ab6: CMP qword ptr [R14 + RCX*0x1],0x1 ADC EDX,0x0 ADD RCX,0x30 CMP RAX,RCX JNZ 0x00128ab6 TEST EDX,EDX JZ 0x00128ad8 MOV RDI,R14 CALL 0x00150f4c XOR R14D,R14D LAB_00128ad6: XOR EBX,EBX LAB_00128ad8: LEA R15,[RSP + 0x30] MOV RDI,R15 CALL 0x0015506c TEST R14,R14 SETNZ AL CMP EBX,dword ptr [R15 + 0x18] SETNC CL AND CL,AL MOV EAX,EBP MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x8],EBX MOV EBP,EBX CMP CL,0x1 JNZ 0x00128c14 LEA R12,[R14 + 0x28] LEA R15,[RSP + 0x50] MOV EAX,dword ptr [RSP + 0x8] MOV EBP,EAX LAB_00128b19: MOV EBX,EBP MOV R13D,0x0 MOV ECX,0x0 TEST EBP,EBP JZ 0x00128bb3 XOR ECX,ECX MOV RSI,R12 XOR EAX,EAX XOR R13D,R13D XOR EDX,EDX LAB_00128b3a: MOV EDI,EAX MOV EAX,dword ptr [RSI] CMP EAX,EDX MOV R8D,EDX CMOVA R8D,EAX TEST EDX,EDX MOV EDX,R8D CMOVZ EDX,EAX LEA R8D,[RDI + -0x1] CMP R8D,EAX CMOVNC R13D,ECX CMOVC EAX,EDI INC RCX ADD RSI,0x30 CMP RBX,RCX JNZ 0x00128b3a CMP EBX,0x3 JC 0x00128bb1 XOR ESI,ESI MOV RDI,R12 XOR R13D,R13D XOR R8D,R8D LAB_00128b79: MOV ECX,dword ptr [RDI] CMP ECX,EAX SETBE R9B CMP ECX,EDX SETNC R10B LEA R11D,[R8 + -0x1] CMP R11D,ECX SETC R11B OR R11B,R10B OR R11B,R9B CMOVNZ ECX,R8D CMOVZ R13D,ESI INC RSI ADD RDI,0x30 MOV R8D,ECX CMP RBX,RSI JNZ 0x00128b79 JMP 0x00128bb3 LAB_00128bb1: MOV ECX,EAX LAB_00128bb3: MOV RDI,R15 LEA RSI,[0x1804f9] MOV RDX,qword ptr [RSP + 0x10] XOR EAX,EAX CALL 0x00121080 MOV RDI,R15 CALL qword ptr [RSP + 0x40] MOV EBP,EBX DEC EBP CMP R13D,EBP JNC 0x00128c0a MOVSXD RAX,R13D LEA RAX,[RAX + RAX*0x2] SHL RAX,0x4 LEA RDI,[R14 + RAX*0x1] LEA RSI,[R14 + RAX*0x1] ADD RSI,0x30 NOT R13D ADD R13D,EBX SHL R13,0x4 LEA RDX,[R13*0x2] ADD RDX,R13 CALL 0x00121360 LAB_00128c0a: CMP EBP,dword ptr [RSP + 0x48] JNC 0x00128b19 LAB_00128c14: MOV ECX,dword ptr [RSP + 0x8] TEST ECX,ECX JZ 0x00128c37 LEA EAX,[RBP + 0x1] CMP ECX,EAX JNC 0x00128c49 MOV EAX,EAX SHL RAX,0x4 LEA RSI,[RAX + RAX*0x2] MOV RDI,R14 CALL 0x00150f29 JMP 0x00128c46 LAB_00128c37: MOV EDI,0x30 MOV ESI,0x1 CALL 0x00150eef LAB_00128c46: MOV R14,RAX LAB_00128c49: MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RDX SHR RCX,0xd INC ECX MOV EAX,EBP LEA RAX,[RAX + RAX*0x2] SHL RAX,0x4 MOV qword ptr [R14 + RAX*0x1],RDX MOV dword ptr [R14 + RAX*0x1 + 0x28],ECX MOV RDX,qword ptr [RSP + 0x20] MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVUPS xmmword ptr [R14 + RAX*0x1 + 0x8],XMM0 MOVUPS xmmword ptr [R14 + RAX*0x1 + 0x18],XMM1 LEA RSI,[0x1804f9] LEA RBX,[RSP + 0x50] MOV RDI,RBX MOV R15,qword ptr [RSP + 0x10] MOV RDX,R15 XOR EAX,EAX CALL 0x00121080 MOV RDI,RBX MOV ESI,dword ptr [RSP + 0xc] MOV RDX,qword ptr [RSP + 0x28] CALL qword ptr [RSP + 0x38] LEA RSI,[0x1804ee] MOV RDI,RBX MOV RDX,R15 XOR EAX,EAX CALL 0x00121080 LEA ESI,[RBP + RBP*0x2] SHL ESI,0x4 ADD ESI,0x30 MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RSP + 0x38] MOV RDI,R14 CALL 0x00150f4c MOV AL,0x1 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 c4_set_sync_period(ulong param_1,int4 *param_2,int4 param_3,int8 param_4, uint param_5) { int4 *puVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; uint uVar9; uint uVar10; uint uVar11; long lVar12; long lVar13; ulong uVar14; uint uVar15; int iVar16; uint uVar17; ulong uVar18; ulong uVar19; uint *puVar20; uint uVar21; uint uVar22; ulong uVar23; ulong uVar24; bool bVar25; int1 auVar26 [16]; int8 local_b8; code *pcStack_b0; code *local_a8; int8 uStack_a0; char local_98 [104]; uVar18 = (ulong)param_5; local_a8 = (code *)0x0; uStack_a0 = 0; local_b8 = 0; pcStack_b0 = (code *)0x0; auVar26 = c4_get_chain_state(param_5); lVar12 = auVar26._0_8_; uVar15 = auVar26._8_4_; if (uVar15 != 0) { lVar13 = 0; iVar16 = 0; do { iVar16 = iVar16 + (uint)(*(long *)(lVar12 + lVar13) == 0); lVar13 = lVar13 + 0x30; } while ((auVar26._8_8_ & 0xffffffff) * 0x30 != lVar13); if (iVar16 == 0) goto LAB_00128ad8; safe_free(lVar12); lVar12 = 0; } uVar15 = 0; LAB_00128ad8: c4_get_storage_config(&local_b8); uVar19 = (ulong)uVar15; if ((uint)uStack_a0 <= uVar15 && lVar12 != 0) { uVar19 = (ulong)uVar15; do { uVar11 = (uint)uVar19; uVar22 = 0; uVar14 = 0; if (uVar11 != 0) { uVar14 = 0; uVar10 = 0; uVar23 = 0; uVar17 = 0; puVar20 = (uint *)(lVar12 + 0x28); do { uVar21 = *puVar20; uVar22 = uVar17; if (uVar17 < uVar21) { uVar22 = uVar21; } bVar25 = uVar17 == 0; uVar17 = uVar22; if (bVar25) { uVar17 = uVar21; } bVar25 = uVar21 <= uVar10 - 1; if (bVar25) { uVar23 = uVar14 & 0xffffffff; } uVar22 = (uint)uVar23; if (!bVar25) { uVar21 = uVar10; } uVar10 = uVar21; uVar14 = uVar14 + 1; puVar20 = puVar20 + 0xc; } while (uVar19 != uVar14); if (uVar11 < 3) { uVar14 = (ulong)uVar10; } else { uVar23 = 0; uVar24 = 0; uVar21 = 0; puVar20 = (uint *)(lVar12 + 0x28); do { uVar22 = *puVar20; bVar25 = uVar21 - 1 < uVar22; uVar9 = uVar22; if ((bVar25 || uVar17 <= uVar22) || uVar22 <= uVar10) { uVar9 = uVar21; } uVar21 = uVar9; uVar14 = (ulong)uVar21; if ((!bVar25 && uVar17 > uVar22) && uVar22 > uVar10) { uVar24 = uVar23 & 0xffffffff; } uVar22 = (uint)uVar24; uVar23 = uVar23 + 1; puVar20 = puVar20 + 0xc; } while (uVar19 != uVar23); } } sprintf(local_98,"sync_%lu_%d",uVar18,uVar14); (*local_a8)(local_98); uVar17 = uVar11 - 1; uVar19 = (ulong)uVar17; if (uVar22 < uVar17) { memmove((void *)(lVar12 + (long)(int)uVar22 * 0x30), (void *)(lVar12 + (long)(int)uVar22 * 0x30 + 0x30),(ulong)(~uVar22 + uVar11) * 0x30) ; } } while ((uint)uStack_a0 <= uVar17); } if (uVar15 == 0) { lVar12 = safe_calloc(0x30,1); } else { uVar11 = (int)uVar19 + 1; if (uVar15 < uVar11) { lVar12 = safe_realloc(lVar12,(ulong)uVar11 * 0x30); } } lVar13 = uVar19 * 0x30; *(ulong *)(lVar12 + lVar13) = param_1; *(int *)(lVar12 + 0x28 + lVar13) = (int)(param_1 >> 0xd) + 1; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[4]; uVar6 = param_2[5]; uVar7 = param_2[6]; uVar8 = param_2[7]; puVar1 = (int4 *)(lVar12 + 8 + lVar13); *puVar1 = *param_2; puVar1[1] = uVar2; puVar1[2] = uVar3; puVar1[3] = uVar4; puVar1 = (int4 *)(lVar12 + 0x18 + lVar13); *puVar1 = uVar5; puVar1[1] = uVar6; puVar1[2] = uVar7; puVar1[3] = uVar8; sprintf(local_98,"sync_%lu_%d",uVar18); (*pcStack_b0)(local_98,param_3,param_4); sprintf(local_98,"states_%lu",uVar18); (*pcStack_b0)(local_98,(int)uVar19 * 0x30 + 0x30,lVar12); safe_free(lVar12); return 1; }
25,760
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O0
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x1d9eb8(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x8, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xaf4e3 leaq 0x1d9e72(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xbf960 movq %rax, -0x38(%rbp) leaq 0x1d9e3b(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xaf502 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xbf960 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
inline_mysql_file_seek_3: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 8 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_AF4E3 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_AF502 loc_AF4E3: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_AF502: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long inline_mysql_file_seek_3( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] long long v9; // [rsp+58h] [rbp-38h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL); if ( !v8 ) return my_seek(v13, v12, v11); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14); v9 = my_seek(v13, v12, v11); ((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL); return v9; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x8 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001af4e3 LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001bf960 MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001af502 LAB_001af4e3: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001bf960 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001af502: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
int8 inline_mysql_file_seek (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int8 local_40; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8); if (local_48 == 0) { local_10 = my_seek(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c); local_40 = my_seek(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,0); local_10 = local_40; } return local_10; }
25,761
cpu_count
bluesky950520[P]quickjs/run-test262.c
static long cpu_count(void) { #ifdef _WIN32 DWORD_PTR procmask, sysmask; long count; int i; count = 0; if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask)) for (i = 0; i < 8 * sizeof(procmask); i++) count += 1 & (procmask >> i); return count; #else return sysconf(_SC_NPROCESSORS_ONLN); #endif }
O0
c
cpu_count: pushq %rax movl $0x54, %edi callq 0xe850 popq %rcx retq nopl (%rax)
cpu_count: push rax mov edi, 54h ; 'T' call _sysconf pop rcx retn
long long cpu_count() { return sysconf(84LL); }
cpu_count: PUSH RAX MOV EDI,0x54 CALL 0x0010e850 POP RCX RET
void cpu_count(void) { sysconf(0x54); return; }
25,762
my_interval_timer
eloqsql/mysys/my_getsystime.c
ulonglong my_interval_timer() { #ifdef HAVE_CLOCK_GETTIME struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return tp.tv_sec*1000000000ULL+tp.tv_nsec; #elif defined(HAVE_GETHRTIME) return gethrtime(); #elif defined(_WIN32) DBUG_ASSERT(query_performance_frequency); LARGE_INTEGER t_cnt; QueryPerformanceCounter(&t_cnt); return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) + ((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL / query_performance_frequency); #else /* TODO: check for other possibilities for hi-res timestamping */ struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL; #endif }
O0
c
my_interval_timer: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x1, %edi leaq -0x10(%rbp), %rsi callq 0x2a2e0 imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00 addq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_interval_timer: push rbp mov rbp, rsp sub rsp, 10h mov edi, 1 lea rsi, [rbp+var_10] call _clock_gettime imul rax, [rbp+var_10], 3B9ACA00h add rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long my_interval_timer() { _QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF clock_gettime(1LL, v1); return v1[1] + 1000000000LL * v1[0]; }
my_interval_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL 0x0012a2e0 IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00 ADD RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long my_interval_timer(void) { timespec local_18; clock_gettime(1,&local_18); return local_18.tv_sec * 1000000000 + local_18.tv_nsec; }
25,763
write_hook_for_undo_row_delete
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_undo_row_delete(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { MARIA_SHARE *share= tbl_info->s; share->state.state.records--; share->state.state.checksum+= *(ha_checksum *)hook_arg; return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg); }
O3
c
write_hook_for_undo_row_delete: pushq %rbp movq %rsp, %rbp movq (%rdx), %rax decq 0x18(%rax) movl (%r8), %edx addl %edx, 0x48(%rax) movq (%rcx), %rax movq %rax, 0x98(%rsi) movq 0xa0(%rsi), %rcx movq %rcx, %rdx shlq $0x8, %rdx je 0x4e260 xorl %eax, %eax popq %rbp retq orq %rax, %rcx movq %rcx, 0xa0(%rsi) jmp 0x4e25c
write_hook_for_undo_row_delete: push rbp mov rbp, rsp mov rax, [rdx] dec qword ptr [rax+18h] mov edx, [r8] add [rax+48h], edx mov rax, [rcx] mov [rsi+98h], rax mov rcx, [rsi+0A0h] mov rdx, rcx shl rdx, 8 jz short loc_4E260 loc_4E25C: xor eax, eax pop rbp retn loc_4E260: or rcx, rax mov [rsi+0A0h], rcx jmp short loc_4E25C
long long write_hook_for_undo_row_delete(long long a1, long long a2, long long *a3, long long *a4, _DWORD *a5) { long long v5; // rax long long v6; // rax v5 = *a3; --*(_QWORD *)(v5 + 24); *(_DWORD *)(v5 + 72) += *a5; v6 = *a4; *(_QWORD *)(a2 + 152) = *a4; if ( !(*(_QWORD *)(a2 + 160) << 8) ) *(_QWORD *)(a2 + 160) |= v6; return 0LL; }
write_hook_for_undo_row_delete: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDX] DEC qword ptr [RAX + 0x18] MOV EDX,dword ptr [R8] ADD dword ptr [RAX + 0x48],EDX MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x98],RAX MOV RCX,qword ptr [RSI + 0xa0] MOV RDX,RCX SHL RDX,0x8 JZ 0x0014e260 LAB_0014e25c: XOR EAX,EAX POP RBP RET LAB_0014e260: OR RCX,RAX MOV qword ptr [RSI + 0xa0],RCX JMP 0x0014e25c
int8 write_hook_for_undo_row_delete (int8 param_1,long param_2,long *param_3,ulong *param_4,int *param_5) { long *plVar1; int *piVar2; long lVar3; ulong uVar4; lVar3 = *param_3; plVar1 = (long *)(lVar3 + 0x18); *plVar1 = *plVar1 + -1; piVar2 = (int *)(lVar3 + 0x48); *piVar2 = *piVar2 + *param_5; uVar4 = *param_4; *(ulong *)(param_2 + 0x98) = uVar4; if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar4; } return 0; }
25,764
ftxui::Terminal::Size()
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/screen/terminal.cpp
Dimensions Size() { #if defined(__EMSCRIPTEN__) // This dimension was chosen arbitrarily to be able to display: // https://arthursonzogni.com/FTXUI/examples // This will have to be improved when someone has time to implement and need // it. return FallbackSize(); #elif defined(_WIN32) CONSOLE_SCREEN_BUFFER_INFO csbi; if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) { return Dimensions{csbi.srWindow.Right - csbi.srWindow.Left + 1, csbi.srWindow.Bottom - csbi.srWindow.Top + 1}; } return FallbackSize(); #else winsize w{}; const int status = ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); // NOLINT // The ioctl return value result should be checked. Some operating systems // don't support TIOCGWINSZ. if (w.ws_col == 0 || w.ws_row == 0 || status < 0) { return FallbackSize(); } return Dimensions{w.ws_col, w.ws_row}; #endif }
O2
cpp
ftxui::Terminal::Size(): pushq %rbx subq $0x10, %rsp leaq 0x8(%rsp), %rbx andq $0x0, (%rbx) pushq $0x1 popq %rdi movl $0x5413, %esi # imm = 0x5413 movq %rbx, %rdx xorl %eax, %eax callq 0xc660 movzwl 0x2(%rbx), %ecx testl %ecx, %ecx sete %dl movzwl (%rbx), %esi testl %esi, %esi sete %dil orb %dl, %dil testl %eax, %eax sets %al orb %dil, %al cmovnel 0x361f8(%rip), %ecx # 0x52490 movl 0x361f6(%rip), %eax # 0x52494 cmovel %esi, %eax shlq $0x20, %rax orq %rax, %rcx movq %rcx, %rax addq $0x10, %rsp popq %rbx retq
_ZN5ftxui8Terminal4SizeEv: push rbx sub rsp, 10h lea rbx, [rsp+18h+var_10] and qword ptr [rbx], 0 push 1 pop rdi mov esi, 5413h mov rdx, rbx xor eax, eax call _ioctl movzx ecx, word ptr [rbx+2] test ecx, ecx setz dl movzx esi, word ptr [rbx] test esi, esi setz dil or dil, dl test eax, eax sets al or al, dil cmovnz ecx, dword ptr cs:_ZZN5ftxui12_GLOBAL__N_112FallbackSizeEvE15g_fallback_size; ftxui::`anonymous namespace'::FallbackSize(void)::g_fallback_size mov eax, dword ptr cs:_ZZN5ftxui12_GLOBAL__N_112FallbackSizeEvE15g_fallback_size+4; ftxui::`anonymous namespace'::FallbackSize(void)::g_fallback_size cmovz eax, esi shl rax, 20h or rcx, rax mov rax, rcx add rsp, 10h pop rbx retn
long long ftxui::Terminal::Size(ftxui::Terminal *this) { int v1; // eax long long v2; // rcx bool v3; // zf long long v4; // rax long long v6; // [rsp+8h] [rbp-10h] BYREF v6 = 0LL; v1 = ioctl(1LL, 21523LL, &v6); v2 = WORD1(v6); LOBYTE(v1) = WORD1(v6) == 0 || (unsigned __int16)v6 == 0 || v1 < 0; v3 = (_BYTE)v1 == 0; if ( (_BYTE)v1 ) v2 = (unsigned int)ftxui::`anonymous namespace'::FallbackSize(void)::g_fallback_size; v4 = HIDWORD(ftxui::`anonymous namespace'::FallbackSize(void)::g_fallback_size); if ( v3 ) v4 = (unsigned __int16)v6; return (v4 << 32) | v2; }
Size: PUSH RBX SUB RSP,0x10 LEA RBX,[RSP + 0x8] AND qword ptr [RBX],0x0 PUSH 0x1 POP RDI MOV ESI,0x5413 MOV RDX,RBX XOR EAX,EAX CALL 0x0010c660 MOVZX ECX,word ptr [RBX + 0x2] TEST ECX,ECX SETZ DL MOVZX ESI,word ptr [RBX] TEST ESI,ESI SETZ DIL OR DIL,DL TEST EAX,EAX SETS AL OR AL,DIL CMOVNZ ECX,dword ptr [0x00152490] MOV EAX,dword ptr [0x00152494] CMOVZ EAX,ESI SHL RAX,0x20 OR RCX,RAX MOV RAX,RCX ADD RSP,0x10 POP RBX RET
/* ftxui::Terminal::Size() */ ulong ftxui::Terminal::Size(void) { int iVar1; ulong uVar2; ulong uVar3; int8 local_10; local_10 = 0; iVar1 = ioctl(1,0x5413,&local_10); uVar3 = (ulong)local_10._2_2_; if (iVar1 < 0 || ((short)local_10 == 0 || local_10._2_2_ == 0)) { uVar3 = (ulong)(anonymous_namespace)::FallbackSize()::g_fallback_size; } uVar2 = (ulong)DAT_00152494; if (iVar1 >= 0 && ((short)local_10 != 0 && local_10._2_2_ != 0)) { uVar2 = local_10 & 0xffff; } return uVar3 | uVar2 << 0x20; }
25,765
google::protobuf::compiler::python::PyiGenerator::PrintImportForDescriptor(google::protobuf::FileDescriptor const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/pyi_generator.cc
void PyiGenerator::PrintImportForDescriptor( const FileDescriptor& desc, std::map<std::string, std::string>* import_map, std::set<std::string>* seen_aliases) const { const std::string& filename = desc.name(); std::string module_name = StrippedModuleName(filename); size_t last_dot_pos = module_name.rfind('.'); std::string import_statement; if (last_dot_pos == std::string::npos) { import_statement = "import " + module_name; } else { import_statement = "from " + module_name.substr(0, last_dot_pos) + " import " + module_name.substr(last_dot_pos + 1); module_name = module_name.substr(last_dot_pos + 1); } std::string alias = "_" + module_name; // Generate a unique alias by adding _1 suffixes until we get an unused alias. while (seen_aliases->find(alias) != seen_aliases->end()) { alias = alias + "_1"; } printer_->Print("$statement$ as $alias$\n", "statement", import_statement, "alias", alias); (*import_map)[filename] = alias; seen_aliases->insert(alias); }
O0
cpp
google::protobuf::compiler::python::PyiGenerator::PrintImportForDescriptor(google::protobuf::FileDescriptor const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*) const: subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, 0x1f0(%rsp) movq %rsi, 0x1e8(%rsp) movq %rdx, 0x1e0(%rsp) movq %rcx, 0x1d8(%rsp) movq 0x1f0(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x1e8(%rsp), %rdi callq 0x28990 movq %rax, 0x1d0(%rsp) movq 0x1d0(%rsp), %rsi leaq 0x1b0(%rsp), %rdi callq 0xc1810 leaq 0x1b0(%rsp), %rdi movl $0x2e, %esi movq $-0x1, %rdx callq 0x214c0 movq %rax, 0x1a8(%rsp) leaq 0x188(%rsp), %rdi callq 0x21390 cmpq $-0x1, 0x1a8(%rsp) jne 0xc29b5 leaq 0x2f4fd8(%rip), %rsi # 0x3b7936 leaq 0x168(%rsp), %rdi leaq 0x1b0(%rsp), %rdx callq 0x4d3a0 jmp 0xc2975 leaq 0x188(%rsp), %rdi leaq 0x168(%rsp), %rsi callq 0x215e0 leaq 0x168(%rsp), %rdi callq 0x21cc8 jmp 0xc2b93 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xc2d0a movq 0x1a8(%rsp), %rcx xorl %eax, %eax movl %eax, %edx leaq 0xd8(%rsp), %rdi leaq 0x1b0(%rsp), %rsi callq 0x21a50 jmp 0xc29d8 leaq 0x3433f8(%rip), %rsi # 0x405dd7 leaq 0xf8(%rsp), %rdi leaq 0xd8(%rsp), %rdx callq 0x38890 jmp 0xc29f6 leaq 0x2f4f38(%rip), %rdx # 0x3b7935 leaq 0x118(%rsp), %rdi leaq 0xf8(%rsp), %rsi callq 0x38840 jmp 0xc2a14 movq 0x1a8(%rsp), %rdx incq %rdx leaq 0xb8(%rsp), %rdi leaq 0x1b0(%rsp), %rsi movq $-0x1, %rcx callq 0x21a50 jmp 0xc2a3d leaq 0x138(%rsp), %rdi leaq 0x118(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x3c980 jmp 0xc2a5c leaq 0x188(%rsp), %rdi leaq 0x138(%rsp), %rsi movq %rsi, 0x28(%rsp) callq 0x215e0 movq 0x28(%rsp), %rdi callq 0x21cc8 leaq 0xb8(%rsp), %rdi callq 0x21cc8 leaq 0x118(%rsp), %rdi callq 0x21cc8 leaq 0xf8(%rsp), %rdi callq 0x21cc8 leaq 0xd8(%rsp), %rdi callq 0x21cc8 movq 0x1a8(%rsp), %rdx incq %rdx leaq 0x98(%rsp), %rdi leaq 0x1b0(%rsp), %rsi movq $-0x1, %rcx callq 0x21a50 jmp 0xc2add leaq 0x1b0(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x215e0 leaq 0x98(%rsp), %rdi callq 0x21cc8 jmp 0xc2b93 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xc2b81 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xc2b74 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xc2b67 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) leaq 0xb8(%rsp), %rdi callq 0x21cc8 leaq 0x118(%rsp), %rdi callq 0x21cc8 leaq 0xf8(%rsp), %rdi callq 0x21cc8 leaq 0xd8(%rsp), %rdi callq 0x21cc8 jmp 0xc2d0a leaq 0x2f5495(%rip), %rsi # 0x3b802f leaq 0x78(%rsp), %rdi leaq 0x1b0(%rsp), %rdx callq 0x4d3a0 jmp 0xc2bae jmp 0xc2bb0 movq 0x1d8(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x38520 movq %rax, 0x20(%rsp) jmp 0xc2bc9 movq 0x20(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x1d8(%rsp), %rdi callq 0x38560 movq %rax, 0x68(%rsp) leaq 0x70(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0xa37c0 testb $0x1, %al jne 0xc2bfa jmp 0xc2c50 leaq 0x2f4b6b(%rip), %rdx # 0x3b776c leaq 0x48(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x28900 jmp 0xc2c12 leaq 0x78(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x215e0 leaq 0x48(%rsp), %rdi callq 0x21cc8 jmp 0xc2bb0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) leaq 0x78(%rsp), %rdi callq 0x21cc8 jmp 0xc2d0a movq 0x30(%rsp), %rax movq 0x38(%rax), %rdi leaq 0x2f35e8(%rip), %rsi # 0x3b6248 leaq 0x2f35f9(%rip), %rdx # 0x3b6260 leaq 0x2f367e(%rip), %r8 # 0x3b62ec leaq 0x188(%rsp), %rcx leaq 0x78(%rsp), %r9 callq 0xbf3d0 jmp 0xc2c82 movq 0x1e0(%rsp), %rdi movq 0x1d0(%rsp), %rsi callq 0x38bc0 movq %rax, 0x18(%rsp) jmp 0xc2c9e movq 0x18(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x21be0 jmp 0xc2caf movq 0x1d8(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0xc5fc0 movb %dl, 0xf(%rsp) movq %rax, 0x10(%rsp) jmp 0xc2ccc movb 0xf(%rsp), %al movq 0x10(%rsp), %rcx movq %rcx, 0x38(%rsp) movb %al, 0x40(%rsp) leaq 0x78(%rsp), %rdi callq 0x21cc8 leaq 0x188(%rsp), %rdi callq 0x21cc8 leaq 0x1b0(%rsp), %rdi callq 0x21cc8 addq $0x1f8, %rsp # imm = 0x1F8 retq leaq 0x188(%rsp), %rdi callq 0x21cc8 leaq 0x1b0(%rsp), %rdi callq 0x21cc8 movq 0x160(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZNK6google8protobuf8compiler6python12PyiGenerator24PrintImportForDescriptorERKNS0_14FileDescriptorEPSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEEPSt3setISD_SF_SaISD_EE: sub rsp, 1F8h mov [rsp+1F8h+var_8], rdi mov [rsp+1F8h+var_10], rsi mov [rsp+1F8h+var_18], rdx mov [rsp+1F8h+var_20], rcx mov rax, [rsp+1F8h+var_8] mov [rsp+1F8h+var_1C8], rax; __int64 mov rdi, [rsp+1F8h+var_10] call _ZNK6google8protobuf14FileDescriptor4nameB5cxx11Ev; google::protobuf::FileDescriptor::name(void) mov [rsp+1F8h+var_28], rax mov rsi, [rsp+1F8h+var_28]; __int64 lea rdi, [rsp+1F8h+var_48]; int call _ZN6google8protobuf8compiler6python18StrippedModuleNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::StrippedModuleName(std::string const&) lea rdi, [rsp+1F8h+var_48] mov esi, 2Eh ; '.' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) mov [rsp+1F8h+var_50], rax lea rdi, [rsp+1F8h+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) cmp [rsp+1F8h+var_50], 0FFFFFFFFFFFFFFFFh jnz short loc_C29B5 lea rsi, aFromTypingImpo+0Ch; int lea rdi, [rsp+1F8h+var_90]; int lea rdx, [rsp+1F8h+var_48]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_C2975: lea rdi, [rsp+1F8h+var_70] lea rsi, [rsp+1F8h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1F8h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_C2B93 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp loc_C2D0A loc_C29B5: mov rcx, [rsp+1F8h+var_50] xor eax, eax mov edx, eax lea rdi, [rsp+1F8h+var_120] lea rsi, [rsp+1F8h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_C29D8: lea rsi, aAnnotationHasN+21h; "from " lea rdi, [rsp+1F8h+var_100] lea rdx, [rsp+1F8h+var_120] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_C29F6: lea rdx, aFromTypingImpo+0Bh; " import " lea rdi, [rsp+1F8h+var_E0] lea rsi, [rsp+1F8h+var_100] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_C2A14: mov rdx, [rsp+1F8h+var_50] inc rdx lea rdi, [rsp+1F8h+var_140] lea rsi, [rsp+1F8h+var_48] mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_C2A3D: lea rdi, [rsp+1F8h+var_C0] lea rsi, [rsp+1F8h+var_E0] lea rdx, [rsp+1F8h+var_140] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_C2A5C: lea rdi, [rsp+1F8h+var_70] lea rsi, [rsp+1F8h+var_C0] mov [rsp+1F8h+var_1D0], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+1F8h+var_1D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_140]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_120]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdx, [rsp+1F8h+var_50] inc rdx lea rdi, [rsp+1F8h+var_160] lea rsi, [rsp+1F8h+var_48] mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_C2ADD: lea rdi, [rsp+1F8h+var_48] lea rsi, [rsp+1F8h+var_160] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1F8h+var_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_C2B93 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp short loc_C2B81 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp short loc_C2B74 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp short loc_C2B67 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C2B67: lea rdi, [rsp+arg_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C2B74: lea rdi, [rsp+arg_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C2B81: lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_C2D0A loc_C2B93: lea rsi, aPb_0+2; int lea rdi, [rsp+1F8h+var_180]; int lea rdx, [rsp+1F8h+var_48]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_C2BAE: jmp short $+2 loc_C2BB0: mov rdi, [rsp+1F8h+var_20] lea rsi, [rsp+1F8h+var_180] call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE4findERKS5_; std::set<std::string>::find(std::string const&) mov [rsp+1F8h+var_1D8], rax jmp short $+2 loc_C2BC9: mov rax, [rsp+1F8h+var_1D8] mov [rsp+1F8h+var_188], rax mov rdi, [rsp+1F8h+var_20] call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE3endEv; std::set<std::string>::end(void) mov [rsp+1F8h+var_190], rax lea rdi, [rsp+1F8h+var_188] lea rsi, [rsp+1F8h+var_190] call _ZStneRKSt23_Rb_tree_const_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES8_; std::operator!=(std::_Rb_tree_const_iterator<std::string> const&,std::_Rb_tree_const_iterator<std::string> const&) test al, 1 jnz short loc_C2BFA jmp short loc_C2C50 loc_C2BFA: lea rdx, a1_3; "_1" lea rdi, [rsp+1F8h+var_1B0]; int lea rsi, [rsp+1F8h+var_180]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_C2C12: lea rdi, [rsp+1F8h+var_180] lea rsi, [rsp+1F8h+var_1B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1F8h+var_1B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_C2BB0 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_C2D0A loc_C2C50: mov rax, [rsp+1F8h+var_1C8] mov rdi, [rax+38h] lea rsi, aStatementAsAli; "$statement$ as $alias$\n" lea rdx, aStatement; "statement" lea r8, aModuleAlias+7; "alias" lea rcx, [rsp+1F8h+var_70] lea r9, [rsp+1F8h+var_180] call _ZN6google8protobuf2io7Printer5PrintIJA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA6_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [10],std::string,char [6],std::string>(char const*,char [10],std::string,char [6],std::string const&) jmp short $+2 loc_C2C82: mov rdi, [rsp+1F8h+var_18] mov rsi, [rsp+1F8h+var_28] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&) mov [rsp+1F8h+var_1E0], rax jmp short $+2 loc_C2C9E: mov rdi, [rsp+1F8h+var_1E0] lea rsi, [rsp+1F8h+var_180] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_C2CAF: mov rdi, [rsp+1F8h+var_20] lea rsi, [rsp+1F8h+var_180] call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE6insertERKS5_; std::set<std::string>::insert(std::string const&) mov [rsp+1F8h+var_1E9], dl mov [rsp+1F8h+var_1E8], rax jmp short $+2 loc_C2CCC: mov al, [rsp+1F8h+var_1E9] mov rcx, [rsp+1F8h+var_1E8] mov [rsp+1F8h+var_1C0], rcx mov [rsp+1F8h+var_1B8], al lea rdi, [rsp+1F8h+var_180]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 1F8h retn loc_C2D0A: lea rdi, [rsp+arg_180]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+arg_1A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_158] call __Unwind_Resume
void google::protobuf::compiler::python::PyiGenerator::PrintImportForDescriptor( long long a1, long long a2, long long a3, long long a4) { long long v4; // [rsp+18h] [rbp-1E0h] int v5[8]; // [rsp+48h] [rbp-1B0h] BYREF long long v6; // [rsp+68h] [rbp-190h] BYREF long long v7; // [rsp+70h] [rbp-188h] BYREF int v8[8]; // [rsp+78h] [rbp-180h] BYREF _BYTE v9[32]; // [rsp+98h] [rbp-160h] BYREF _BYTE v10[32]; // [rsp+B8h] [rbp-140h] BYREF _BYTE v11[32]; // [rsp+D8h] [rbp-120h] BYREF _BYTE v12[32]; // [rsp+F8h] [rbp-100h] BYREF _BYTE v13[32]; // [rsp+118h] [rbp-E0h] BYREF _BYTE v14[48]; // [rsp+138h] [rbp-C0h] BYREF int v15[8]; // [rsp+168h] [rbp-90h] BYREF _BYTE v16[32]; // [rsp+188h] [rbp-70h] BYREF long long v17; // [rsp+1A8h] [rbp-50h] int v18[8]; // [rsp+1B0h] [rbp-48h] BYREF long long v19; // [rsp+1D0h] [rbp-28h] long long v20; // [rsp+1D8h] [rbp-20h] long long v21; // [rsp+1E0h] [rbp-18h] long long v22; // [rsp+1E8h] [rbp-10h] long long v23; // [rsp+1F0h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = google::protobuf::FileDescriptor::name[abi:cxx11](a2); google::protobuf::compiler::python::StrippedModuleName((long long)v18, v19); v17 = std::string::rfind(v18, 46LL, -1LL); std::string::basic_string(v16); if ( v17 == -1 ) { std::operator+<char>((long long)v15, (long long)"import ", (long long)v18); std::string::operator=(v16, v15); std::string::~string(v15); } else { std::string::substr(v11, v18, 0LL, v17); std::operator+<char>((long long)v12, (long long)"from ", (long long)v11); std::operator+<char>((long long)v13, (long long)v12, (long long)" import "); std::string::substr(v10, v18, v17 + 1, -1LL); std::operator+<char>((long long)v14, (long long)v13, (long long)v10); std::string::operator=(v16, v14); std::string::~string(v14); std::string::~string(v10); std::string::~string(v13); std::string::~string(v12); std::string::~string(v11); std::string::substr(v9, v18, v17 + 1, -1LL); std::string::operator=(v18, v9); std::string::~string(v9); } std::operator+<char>((long long)v8, (long long)"_", (long long)v18); while ( 1 ) { v7 = std::set<std::string>::find(v20, (long long)v8); v6 = std::set<std::string>::end(v20); if ( !std::operator!=(&v7, &v6) ) break; std::operator+<char>((long long)v5, (long long)v8, (long long)"_1"); std::string::operator=(v8, v5); std::string::~string(v5); } google::protobuf::io::Printer::Print<char [10],std::string,char [6],std::string>( *(_QWORD *)(a1 + 56), (long long)"$statement$ as $alias$\n", "statement", (long long)v16, "alias", (long long)v8); v4 = std::map<std::string,std::string>::operator[](v21, v19); std::string::operator=(v4, v8); std::set<std::string>::insert(v20, v8); std::string::~string(v8); std::string::~string(v16); std::string::~string(v18); }
PrintImportForDescriptor: SUB RSP,0x1f8 MOV qword ptr [RSP + 0x1f0],RDI MOV qword ptr [RSP + 0x1e8],RSI MOV qword ptr [RSP + 0x1e0],RDX MOV qword ptr [RSP + 0x1d8],RCX MOV RAX,qword ptr [RSP + 0x1f0] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x1e8] CALL 0x00128990 MOV qword ptr [RSP + 0x1d0],RAX MOV RSI,qword ptr [RSP + 0x1d0] LEA RDI,[RSP + 0x1b0] CALL 0x001c1810 LEA RDI,[RSP + 0x1b0] MOV ESI,0x2e MOV RDX,-0x1 CALL 0x001214c0 MOV qword ptr [RSP + 0x1a8],RAX LEA RDI,[RSP + 0x188] CALL 0x00121390 CMP qword ptr [RSP + 0x1a8],-0x1 JNZ 0x001c29b5 LAB_001c2957: LEA RSI,[0x4b7936] LEA RDI,[RSP + 0x168] LEA RDX,[RSP + 0x1b0] CALL 0x0014d3a0 JMP 0x001c2975 LAB_001c2975: LEA RDI,[RSP + 0x188] LEA RSI,[RSP + 0x168] CALL 0x001215e0 LEA RDI,[RSP + 0x168] CALL 0x00121cc8 JMP 0x001c2b93 LAB_001c29b5: MOV RCX,qword ptr [RSP + 0x1a8] XOR EAX,EAX MOV EDX,EAX LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0x1b0] CALL 0x00121a50 JMP 0x001c29d8 LAB_001c29d8: LEA RSI,[0x505dd7] LEA RDI,[RSP + 0xf8] LEA RDX,[RSP + 0xd8] CALL 0x00138890 JMP 0x001c29f6 LAB_001c29f6: LEA RDX,[0x4b7935] LEA RDI,[RSP + 0x118] LEA RSI,[RSP + 0xf8] CALL 0x00138840 JMP 0x001c2a14 LAB_001c2a14: MOV RDX,qword ptr [RSP + 0x1a8] INC RDX LAB_001c2a1f: LEA RDI,[RSP + 0xb8] LEA RSI,[RSP + 0x1b0] MOV RCX,-0x1 CALL 0x00121a50 JMP 0x001c2a3d LAB_001c2a3d: LEA RDI,[RSP + 0x138] LEA RSI,[RSP + 0x118] LEA RDX,[RSP + 0xb8] CALL 0x0013c980 JMP 0x001c2a5c LAB_001c2a5c: LEA RDI,[RSP + 0x188] LEA RSI,[RSP + 0x138] MOV qword ptr [RSP + 0x28],RSI CALL 0x001215e0 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00121cc8 LEA RDI,[RSP + 0xb8] CALL 0x00121cc8 LEA RDI,[RSP + 0x118] CALL 0x00121cc8 LEA RDI,[RSP + 0xf8] CALL 0x00121cc8 LEA RDI,[RSP + 0xd8] CALL 0x00121cc8 MOV RDX,qword ptr [RSP + 0x1a8] INC RDX LAB_001c2abf: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x1b0] MOV RCX,-0x1 CALL 0x00121a50 JMP 0x001c2add LAB_001c2add: LEA RDI,[RSP + 0x1b0] LEA RSI,[RSP + 0x98] CALL 0x001215e0 LEA RDI,[RSP + 0x98] CALL 0x00121cc8 JMP 0x001c2b93 LAB_001c2b93: LEA RSI,[0x4b802f] LEA RDI,[RSP + 0x78] LEA RDX,[RSP + 0x1b0] CALL 0x0014d3a0 JMP 0x001c2bae LAB_001c2bae: JMP 0x001c2bb0 LAB_001c2bb0: MOV RDI,qword ptr [RSP + 0x1d8] LAB_001c2bb8: LEA RSI,[RSP + 0x78] CALL 0x00138520 MOV qword ptr [RSP + 0x20],RAX JMP 0x001c2bc9 LAB_001c2bc9: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x1d8] CALL 0x00138560 MOV qword ptr [RSP + 0x68],RAX LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x68] CALL 0x001a37c0 TEST AL,0x1 JNZ 0x001c2bfa JMP 0x001c2c50 LAB_001c2bfa: LEA RDX,[0x4b776c] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x78] CALL 0x00128900 JMP 0x001c2c12 LAB_001c2c12: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x48] CALL 0x001215e0 LEA RDI,[RSP + 0x48] CALL 0x00121cc8 JMP 0x001c2bb0 LAB_001c2c50: MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX + 0x38] LEA RSI,[0x4b6248] LEA RDX,[0x4b6260] LEA R8,[0x4b62ec] LEA RCX,[RSP + 0x188] LEA R9,[RSP + 0x78] CALL 0x001bf3d0 JMP 0x001c2c82 LAB_001c2c82: MOV RDI,qword ptr [RSP + 0x1e0] MOV RSI,qword ptr [RSP + 0x1d0] CALL 0x00138bc0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001c2c9e LAB_001c2c9e: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x78] CALL 0x00121be0 JMP 0x001c2caf LAB_001c2caf: MOV RDI,qword ptr [RSP + 0x1d8] LEA RSI,[RSP + 0x78] CALL 0x001c5fc0 LAB_001c2cc1: MOV byte ptr [RSP + 0xf],DL MOV qword ptr [RSP + 0x10],RAX JMP 0x001c2ccc LAB_001c2ccc: MOV AL,byte ptr [RSP + 0xf] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RCX MOV byte ptr [RSP + 0x40],AL LEA RDI,[RSP + 0x78] CALL 0x00121cc8 LEA RDI,[RSP + 0x188] CALL 0x00121cc8 LEA RDI,[RSP + 0x1b0] CALL 0x00121cc8 ADD RSP,0x1f8 RET
/* google::protobuf::compiler::python::PyiGenerator::PrintImportForDescriptor(google::protobuf::FileDescriptor const&, std::map<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >*, std::set<std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::__cxx11::string > >*) const */ void __thiscall google::protobuf::compiler::python::PyiGenerator::PrintImportForDescriptor (PyiGenerator *this,FileDescriptor *param_1,map *param_2,set *param_3) { ulong uVar1; string *this_00; string local_1b0 [32]; int8 local_190; int8 local_188; string local_180 [32]; string local_160 [32]; string local_140 [32]; string local_120 [32]; string local_100 [32]; string local_e0 [32]; string local_c0 [48]; string local_90 [32]; string local_70 [32]; long local_50; python local_48 [32]; string *local_28; set *local_20; map *local_18; FileDescriptor *local_10; PyiGenerator *local_8; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; local_28 = (string *)FileDescriptor::name_abi_cxx11_(param_1); StrippedModuleName(local_48,local_28); local_50 = std::__cxx11::string::rfind((char)local_48,0x2e); std::__cxx11::string::string(local_70); if (local_50 == -1) { /* try { // try from 001c2957 to 001c29d5 has its CatchHandler @ 001c299c */ std::operator+((char *)local_90,(string *)0x4b7936); std::__cxx11::string::operator=(local_70,local_90); std::__cxx11::string::~string(local_90); } else { std::__cxx11::string::substr((ulong)local_120,(ulong)local_48); /* try { // try from 001c29d8 to 001c29f3 has its CatchHandler @ 001c2b04 */ std::operator+((char *)local_100,(string *)0x505dd7); /* try { // try from 001c29f6 to 001c2a11 has its CatchHandler @ 001c2b1a */ std::operator+(local_e0,(char *)local_100); /* try { // try from 001c2a1f to 001c2a3a has its CatchHandler @ 001c2b30 */ std::__cxx11::string::substr((ulong)local_140,(ulong)local_48); /* try { // try from 001c2a3d to 001c2a59 has its CatchHandler @ 001c2b46 */ std::operator+(local_c0,local_e0); std::__cxx11::string::operator=(local_70,local_c0); std::__cxx11::string::~string(local_c0); std::__cxx11::string::~string(local_140); std::__cxx11::string::~string(local_e0); std::__cxx11::string::~string(local_100); std::__cxx11::string::~string(local_120); /* try { // try from 001c2abf to 001c2bab has its CatchHandler @ 001c299c */ std::__cxx11::string::substr((ulong)local_160,(ulong)local_48); std::__cxx11::string::operator=((string *)local_48,local_160); std::__cxx11::string::~string(local_160); } std::operator+((char *)local_180,(string *)&DAT_004b802f); while( true ) { /* try { // try from 001c2bb8 to 001c2cc0 has its CatchHandler @ 001c2c2d */ local_188 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::find((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)local_20,local_180); local_190 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::end((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)local_20); uVar1 = std::operator!=((_Rb_tree_const_iterator *)&local_188, (_Rb_tree_const_iterator *)&local_190); if ((uVar1 & 1) == 0) break; std::operator+(local_1b0,(char *)local_180); std::__cxx11::string::operator=(local_180,local_1b0); std::__cxx11::string::~string(local_1b0); } io::Printer::Print<char[10],std::__cxx11::string,char[6],std::__cxx11::string> (*(Printer **)(this + 0x38),"$statement$ as $alias$\n","statement",local_70,"alias", local_180); this_00 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)local_18,local_28); std::__cxx11::string::operator=(this_00,local_180); std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>:: insert((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)local_20,local_180); std::__cxx11::string::~string(local_180); std::__cxx11::string::~string(local_70); std::__cxx11::string::~string((string *)local_48); return; }
25,766
wqueue_unlink_from_queue
eloqsql/mysys/wqueue.c
void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread) { if (thread->next == thread) /* The queue contains only one member */ wqueue->last_thread= NULL; else { thread->next->prev= thread->prev; *thread->prev= thread->next; if (wqueue->last_thread == thread) wqueue->last_thread= STRUCT_PTR(struct st_my_thread_var, next, thread->prev); } thread->next= NULL; }
O0
c
wqueue_unlink_from_queue: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x88(%rax), %rax cmpq -0x10(%rbp), %rax jne 0xff67a movq -0x8(%rbp), %rax movq $0x0, (%rax) jmp 0xff6d8 movq -0x10(%rbp), %rax movq 0x90(%rax), %rcx movq -0x10(%rbp), %rax movq 0x88(%rax), %rax movq %rcx, 0x90(%rax) movq -0x10(%rbp), %rax movq 0x88(%rax), %rcx movq -0x10(%rbp), %rax movq 0x90(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq (%rax), %rax cmpq -0x10(%rbp), %rax jne 0xff6d6 movq -0x10(%rbp), %rax movq 0x90(%rax), %rcx addq $-0x88, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) jmp 0xff6d8 movq -0x10(%rbp), %rax movq $0x0, 0x88(%rax) popq %rbp retq nopl (%rax)
wqueue_unlink_from_queue: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+88h] cmp rax, [rbp+var_10] jnz short loc_FF67A mov rax, [rbp+var_8] mov qword ptr [rax], 0 jmp short loc_FF6D8 loc_FF67A: mov rax, [rbp+var_10] mov rcx, [rax+90h] mov rax, [rbp+var_10] mov rax, [rax+88h] mov [rax+90h], rcx mov rax, [rbp+var_10] mov rcx, [rax+88h] mov rax, [rbp+var_10] mov rax, [rax+90h] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax] cmp rax, [rbp+var_10] jnz short loc_FF6D6 mov rax, [rbp+var_10] mov rcx, [rax+90h] add rcx, 0FFFFFFFFFFFFFF78h mov rax, [rbp+var_8] mov [rax], rcx loc_FF6D6: jmp short $+2 loc_FF6D8: mov rax, [rbp+var_10] mov qword ptr [rax+88h], 0 pop rbp retn
long long wqueue_unlink_from_queue(_QWORD *a1, long long a2) { long long result; // rax if ( *(_QWORD *)(a2 + 136) == a2 ) { *a1 = 0LL; } else { *(_QWORD *)(*(_QWORD *)(a2 + 136) + 144LL) = *(_QWORD *)(a2 + 144); **(_QWORD **)(a2 + 144) = *(_QWORD *)(a2 + 136); if ( *a1 == a2 ) *a1 = *(_QWORD *)(a2 + 144) - 136LL; } result = a2; *(_QWORD *)(a2 + 136) = 0LL; return result; }
wqueue_unlink_from_queue: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x88] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001ff67a MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 JMP 0x001ff6d8 LAB_001ff67a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x90] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001ff6d6 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x90] ADD RCX,-0x88 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX LAB_001ff6d6: JMP 0x001ff6d8 LAB_001ff6d8: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],0x0 POP RBP RET
void wqueue_unlink_from_queue(long *param_1,long param_2) { if (*(long *)(param_2 + 0x88) == param_2) { *param_1 = 0; } else { *(int8 *)(*(long *)(param_2 + 0x88) + 0x90) = *(int8 *)(param_2 + 0x90); **(int8 **)(param_2 + 0x90) = *(int8 *)(param_2 + 0x88); if (*param_1 == param_2) { *param_1 = *(long *)(param_2 + 0x90) + -0x88; } } *(int8 *)(param_2 + 0x88) = 0; return; }
25,767
testing::Matcher<std::basic_string_view<char, std::char_traits<char>>>::~Matcher()
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h
class GTEST_API_ Matcher<internal::StringView> : public internal::MatcherBase<internal::StringView> { public: Matcher() = default; explicit Matcher(const MatcherInterface<const internal::StringView&>* impl) : internal::MatcherBase<internal::StringView>(impl) {} explicit Matcher(const MatcherInterface<internal::StringView>* impl) : internal::MatcherBase<internal::StringView>(impl) {} template <typename M, typename = typename std::remove_reference< M>::type::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase<internal::StringView>(std::forward<M>(m)) {} // Allows the user to write str instead of Eq(str) sometimes, where // str is a std::string object. Matcher(const std::string& s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. Matcher(const char* s); // NOLINT // Allows the user to pass absl::string_views or std::string_views directly. Matcher(internal::StringView s); // NOLINT }
O0
c
testing::Matcher<std::basic_string_view<char, std::char_traits<char>>>::~Matcher(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x46ea0 movq 0x8(%rsp), %rdi movl $0x18, %esi callq 0xb4a0 addq $0x18, %rsp retq nopl (%rax)
_ZN7testing7MatcherISt17basic_string_viewIcSt11char_traitsIcEEED0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8] mov [rsp+18h+var_10], rdi call _ZN7testing7MatcherISt17basic_string_viewIcSt11char_traitsIcEEED2Ev; testing::Matcher<std::string_view>::~Matcher() mov rdi, [rsp+18h+var_10]; void * mov esi, 18h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 18h retn
void testing::Matcher<std::string_view>::~Matcher(void *a1) { testing::Matcher<std::string_view>::~Matcher((long long)a1); operator delete(a1, 0x18uLL); }
~Matcher: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x00146ea0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x18 CALL 0x0010b4a0 ADD RSP,0x18 RET
/* testing::Matcher<std::basic_string_view<char, std::char_traits<char> > >::~Matcher() */ void __thiscall testing::Matcher<std::basic_string_view<char,std::char_traits<char>>>::~Matcher (Matcher<std::basic_string_view<char,std::char_traits<char>>> *this) { ~Matcher(this); operator_delete(this,0x18); return; }
25,768
TestCase::verify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
monkey531[P]llama/tests/test-json-schema-to-grammar.cpp
void verify(const std::string & actual_grammar) const { if (trim(actual_grammar) != trim(expected_grammar)) { _print_failure_header(); fprintf(stderr, "# EXPECTED:\n%s\n# ACTUAL:\n%s\n", expected_grammar.c_str(), actual_grammar.c_str()); assert(false); } }
O2
cpp
TestCase::verify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %rdi callq 0x245d2 leaq 0x48(%r14), %rsi leaq 0x20(%rsp), %rdi callq 0x245d2 movq %rsp, %r15 leaq 0x20(%rsp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x24cd7 movl %eax, %ebp movq %r12, %rdi callq 0x20de8 movq %r15, %rdi callq 0x20de8 testb %bpl, %bpl jne 0x24b11 addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x24ce2 movq 0xb4470(%rip), %rax # 0xd8f90 movq (%rax), %rdi movq 0x48(%r14), %rdx movq (%rbx), %rcx leaq 0x70c5a(%rip), %rsi # 0x9578b xorl %eax, %eax callq 0x209e0 leaq 0x69b66(%rip), %rdi # 0x8e6a5 leaq 0x70c62(%rip), %rsi # 0x957a8 leaq 0x70cbb(%rip), %rcx # 0x95808 pushq $0x27 popq %rdx callq 0x204b0 movq %rax, %rbx movq %rsp, %rdi callq 0x20de8 movq %rbx, %rdi callq 0x20bf0
_ZNK8TestCase6verifyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rsi mov r14, rdi mov rdi, rsp call _ZL4trimRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; trim(std::string const&) lea rsi, [r14+48h] lea rdi, [rsp+68h+var_48] call _ZL4trimRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; trim(std::string const&) mov r15, rsp lea r12, [rsp+68h+var_48] mov rdi, r15 mov rsi, r12 call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&) mov ebp, eax mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_24B11 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_24B11: mov rdi, r14; this call _ZNK8TestCase21_print_failure_headerEv; TestCase::_print_failure_header(void) mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [r14+48h] mov rcx, [rbx] lea rsi, aExpectedSActua; "# EXPECTED:\n%s\n# ACTUAL:\n%s\n" xor eax, eax call _fprintf lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidTestcaseVe; "void TestCase::verify(const std::string"... push 27h ; ''' pop rdx call ___assert_fail mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
void TestCase::verify(TestCase *this, const char **a2) { char v2; // bp _BYTE v3[32]; // [rsp+0h] [rbp-68h] BYREF _BYTE v4[72]; // [rsp+20h] [rbp-48h] BYREF trim((long long)v3); trim((long long)v4); v2 = std::operator!=<char>(v3, v4); std::string::~string(v4); std::string::~string(v3); if ( v2 ) { TestCase::_print_failure_header(this); fprintf(stderr, "# EXPECTED:\n%s\n# ACTUAL:\n%s\n", *((const char **)this + 9), *a2); __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-json-schema-to-grammar.cpp", 39LL, "void TestCase::verify(const std::string &) const"); } }
verify: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RSI MOV R14,RDI MOV RDI,RSP CALL 0x001245d2 LEA RSI,[R14 + 0x48] LAB_00124ad0: LEA RDI,[RSP + 0x20] CALL 0x001245d2 LAB_00124ada: MOV R15,RSP LEA R12,[RSP + 0x20] MOV RDI,R15 MOV RSI,R12 CALL 0x00124cd7 MOV EBP,EAX MOV RDI,R12 CALL 0x00120de8 MOV RDI,R15 CALL 0x00120de8 TEST BPL,BPL JNZ 0x00124b11 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00124b11: MOV RDI,R14 CALL 0x00124ce2 MOV RAX,qword ptr [0x001d8f90] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [R14 + 0x48] MOV RCX,qword ptr [RBX] LEA RSI,[0x19578b] XOR EAX,EAX CALL 0x001209e0 LEA RDI,[0x18e6a5] LEA RSI,[0x1957a8] LEA RCX,[0x195808] PUSH 0x27 POP RDX CALL 0x001204b0
/* TestCase::verify(std::__cxx11::string const&) const */ void __thiscall TestCase::verify(TestCase *this,string *param_1) { bool bVar1; string asStack_68 [32]; string local_48 [32]; trim(asStack_68); /* try { // try from 00124ad0 to 00124ad9 has its CatchHandler @ 00124b55 */ trim(local_48); bVar1 = std::operator!=(asStack_68,local_48); std::__cxx11::string::~string(local_48); std::__cxx11::string::~string(asStack_68); if (!bVar1) { return; } _print_failure_header(this); fprintf(*(FILE **)PTR_stderr_001d8f90,"# EXPECTED:\n%s\n# ACTUAL:\n%s\n", *(int8 *)(this + 0x48),*(int8 *)param_1); /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-json-schema-to-grammar.cpp" ,0x27,"void TestCase::verify(const std::string &) const"); }
25,769
TestCase::verify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
monkey531[P]llama/tests/test-json-schema-to-grammar.cpp
void verify(const std::string & actual_grammar) const { if (trim(actual_grammar) != trim(expected_grammar)) { _print_failure_header(); fprintf(stderr, "# EXPECTED:\n%s\n# ACTUAL:\n%s\n", expected_grammar.c_str(), actual_grammar.c_str()); assert(false); } }
O3
cpp
TestCase::verify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rsi movq 0x8(%rbx), %rdx leaq 0x8(%rsp), %rdi callq 0x221b4 movq 0x48(%r14), %rsi movq 0x50(%r14), %rdx leaq 0x28(%rsp), %rdi callq 0x221b4 movq 0x10(%rsp), %rdx cmpq 0x30(%rsp), %rdx jne 0x2296c movq 0x28(%rsp), %r15 testq %rdx, %rdx je 0x22976 movq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x19710 testl %eax, %eax setne %bpl jmp 0x22978 movb $0x1, %bpl movq 0x28(%rsp), %r15 jmp 0x22978 xorl %ebp, %ebp leaq 0x38(%rsp), %rax cmpq %rax, %r15 je 0x22992 movq 0x38(%rsp), %rsi incq %rsi movq %r15, %rdi callq 0x196d0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x229ad movq 0x18(%rsp), %rsi incq %rsi callq 0x196d0 testb %bpl, %bpl jne 0x229bd addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x48(%r14), %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x1b00b movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x229ea movq 0x18(%rsp), %rsi incq %rsi callq 0x196d0 movq %rbx, %rdi callq 0x19c00
_ZNK8TestCase6verifyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 48h mov rbx, rsi mov r14, rdi mov rsi, [rsi] mov rdx, [rbx+8] lea rdi, [rsp+68h+var_60] call _ZL4trimRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; trim(std::string const&) mov rsi, [r14+48h] mov rdx, [r14+50h] lea rdi, [rsp+68h+var_40] call _ZL4trimRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; trim(std::string const&) mov rdx, [rsp+68h+var_58] cmp rdx, [rsp+68h+var_38] jnz short loc_2296C mov r15, [rsp+68h+var_40] test rdx, rdx jz short loc_22976 mov rdi, [rsp+68h+var_60] mov rsi, r15 call _bcmp test eax, eax setnz bpl jmp short loc_22978 loc_2296C: mov bpl, 1 mov r15, [rsp+68h+var_40] jmp short loc_22978 loc_22976: xor ebp, ebp loc_22978: lea rax, [rsp+68h+var_30] cmp r15, rax jz short loc_22992 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_22992: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_229AD mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_229AD: test bpl, bpl jnz short loc_229BD add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_229BD: lea rsi, [r14+48h] mov rdi, r14 mov rdx, rbx call _ZNK8TestCase6verifyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold_1; TestCase::verify(std::string const&) [clone] mov rbx, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_229EA mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_229EA: mov rdi, rbx call __Unwind_Resume
void TestCase::verify(long long a1, long long *a2) { long long *v2; // r15 bool v3; // bp long long *v4; // [rsp+8h] [rbp-60h] BYREF void *v5; // [rsp+10h] [rbp-58h] long long v6; // [rsp+18h] [rbp-50h] BYREF void *v7[2]; // [rsp+28h] [rbp-40h] BYREF long long v8; // [rsp+38h] [rbp-30h] BYREF trim((long long)&v4, *a2, a2[1]); trim((long long)v7, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80)); if ( v5 == v7[1] ) { v2 = (long long *)v7[0]; if ( v5 ) v3 = (unsigned int)bcmp(v4, v7[0]) != 0; else v3 = 0; } else { v3 = 1; v2 = (long long *)v7[0]; } if ( v2 != &v8 ) operator delete(v2, v8 + 1); if ( v4 != &v6 ) operator delete(v4, v6 + 1); if ( v3 ) TestCase::verify((const char **)a1, (const char **)(a1 + 72), (const char **)a2); }
verify: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RSI] MOV RDX,qword ptr [RBX + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001221b4 MOV RSI,qword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] LAB_00122937: LEA RDI,[RSP + 0x28] CALL 0x001221b4 LAB_00122941: MOV RDX,qword ptr [RSP + 0x10] CMP RDX,qword ptr [RSP + 0x30] JNZ 0x0012296c MOV R15,qword ptr [RSP + 0x28] TEST RDX,RDX JZ 0x00122976 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R15 CALL 0x00119710 TEST EAX,EAX SETNZ BPL JMP 0x00122978 LAB_0012296c: MOV BPL,0x1 MOV R15,qword ptr [RSP + 0x28] JMP 0x00122978 LAB_00122976: XOR EBP,EBP LAB_00122978: LEA RAX,[RSP + 0x38] CMP R15,RAX JZ 0x00122992 MOV RSI,qword ptr [RSP + 0x38] INC RSI MOV RDI,R15 CALL 0x001196d0 LAB_00122992: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001229ad MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196d0 LAB_001229ad: TEST BPL,BPL JNZ 0x001229bd ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001229bd: LEA RSI,[R14 + 0x48] MOV RDI,R14 MOV RDX,RBX CALL 0x0011b00b LAB_001229cc: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001229ea MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196d0 LAB_001229ea: MOV RDI,RBX CALL 0x00119c00
/* TestCase::verify(std::__cxx11::string const&) const */ void TestCase::verify(string *param_1) { int iVar1; int8 uVar2; bool bVar3; long *local_60; size_t local_58; long local_50 [2]; long *local_40; size_t local_38; long local_30 [2]; trim((string *)&local_60); /* try { // try from 00122937 to 00122940 has its CatchHandler @ 001229cc */ trim((string *)&local_40); if (local_58 == local_38) { if (local_58 == 0) { bVar3 = false; } else { iVar1 = bcmp(local_60,local_40,local_58); bVar3 = iVar1 != 0; } } else { bVar3 = true; } if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } if (!bVar3) { return; } uVar2 = verify(param_1); /* catch() { ... } // from try @ 00122937 with catch @ 001229cc */ if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar2); }
25,770
glfwCreateWindow
untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c
GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share) { _GLFWfbconfig fbconfig; _GLFWctxconfig ctxconfig; _GLFWwndconfig wndconfig; _GLFWwindow* window; assert(title != NULL); assert(width >= 0); assert(height >= 0); _GLFW_REQUIRE_INIT_OR_RETURN(NULL); if (width <= 0 || height <= 0) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid window size %ix%i", width, height); return NULL; } fbconfig = _glfw.hints.framebuffer; ctxconfig = _glfw.hints.context; wndconfig = _glfw.hints.window; wndconfig.width = width; wndconfig.height = height; wndconfig.title = title; ctxconfig.share = (_GLFWwindow*) share; if (!_glfwIsValidContextConfig(&ctxconfig)) return NULL; window = calloc(1, sizeof(_GLFWwindow)); window->next = _glfw.windowListHead; _glfw.windowListHead = window; window->videoMode.width = width; window->videoMode.height = height; window->videoMode.redBits = fbconfig.redBits; window->videoMode.greenBits = fbconfig.greenBits; window->videoMode.blueBits = fbconfig.blueBits; window->videoMode.refreshRate = _glfw.hints.refreshRate; window->monitor = (_GLFWmonitor*) monitor; window->resizable = wndconfig.resizable; window->decorated = wndconfig.decorated; window->autoIconify = wndconfig.autoIconify; window->floating = wndconfig.floating; window->focusOnShow = wndconfig.focusOnShow; window->cursorMode = GLFW_CURSOR_NORMAL; window->minwidth = GLFW_DONT_CARE; window->minheight = GLFW_DONT_CARE; window->maxwidth = GLFW_DONT_CARE; window->maxheight = GLFW_DONT_CARE; window->numer = GLFW_DONT_CARE; window->denom = GLFW_DONT_CARE; // Open the actual window and create its context if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig)) { glfwDestroyWindow((GLFWwindow*) window); return NULL; } if (ctxconfig.client != GLFW_NO_API) { if (!_glfwRefreshContextAttribs(window, &ctxconfig)) { glfwDestroyWindow((GLFWwindow*) window); return NULL; } } if (window->monitor) { if (wndconfig.centerCursor) _glfwCenterCursorInContentArea(window); } else { if (wndconfig.visible) { _glfwPlatformShowWindow(window); if (wndconfig.focused) _glfwPlatformFocusWindow(window); } } return (GLFWwindow*) window; }
O3
c
glfwCreateWindow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x3d8, %rsp # imm = 0x3D8 testq %rdx, %rdx je 0x1cf72 movl %edi, %r15d testl %edi, %edi js 0x1cf91 movl %esi, %ebp testl %esi, %esi js 0x1cfb0 leaq 0x8b8b2(%rip), %r14 # 0xa8638 cmpl $0x0, (%r14) je 0x1cdbd movq %rdx, %r12 testl %r15d, %r15d setne %al testl %ebp, %ebp setne %dl testb %dl, %al jne 0x1cdd2 leaq 0x675f4(%rip), %rsi # 0x84399 xorl %ebx, %ebx movl $0x10004, %edi # imm = 0x10004 movl %r15d, %edx movl %ebp, %ecx xorl %eax, %eax callq 0x18e91 jmp 0x1cf37 xorl %ebx, %ebx movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax callq 0x18e91 jmp 0x1cf37 movq %rcx, (%rsp) leaq 0x18(%r14), %rsi leaq 0x50(%rsp), %rdi movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) movq 0x3d0(%r14), %rax leaq 0x10(%rsp), %r13 movq %rax, 0x30(%r13) movdqu 0x3a0(%r14), %xmm0 movups 0x3b0(%r14), %xmm1 movups 0x3c0(%r14), %xmm2 movaps %xmm2, 0x20(%r13) movaps %xmm1, 0x10(%r13) movdqa %xmm0, (%r13) leaq 0x60(%r14), %rsi leaq 0x98(%rsp), %rbx movl $0x340, %edx # imm = 0x340 movq %rbx, %rdi movq %r8, 0x8(%rsp) callq 0xc6b0 movl %r15d, (%rbx) movl %ebp, 0x4(%rbx) movq %r12, 0x8(%rbx) movq 0x8(%rsp), %rax movq %rax, 0x28(%r13) movq %r13, %rdi callq 0x1833c testl %eax, %eax je 0x1cf35 movl $0x1, %edi movl $0x390, %esi # imm = 0x390 callq 0xc550 movq %rax, %rbx movq 0x3f0(%r14), %rax movq %rax, (%rbx) movq %rbx, 0x3f0(%r14) movl %r15d, 0x28(%rbx) movl %ebp, 0x2c(%rbx) leaq 0x50(%rsp), %rcx movq (%rcx), %rax movq %rax, 0x30(%rbx) movl 0x8(%rcx), %eax movl %eax, 0x38(%rbx) movl 0x3d8(%r14), %eax movl %eax, 0x3c(%rbx) movq (%rsp), %rax movq %rax, 0x40(%rbx) leaq 0x98(%rsp), %rsi movl 0x10(%rsi), %eax movl %eax, 0x8(%rbx) movl 0x18(%rsi), %eax movl %eax, 0xc(%rbx) movq 0x20(%rsi), %rax movq %rax, 0x10(%rbx) movl 0x30(%rsi), %eax movl %eax, 0x18(%rbx) movl $0x34001, 0x74(%rbx) # imm = 0x34001 pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x50(%rbx) movq $-0x1, 0x60(%rbx) leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21df2 testl %eax, %eax je 0x1cf2d cmpl $0x0, 0x10(%rsp) je 0x1cf12 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x18701 testl %eax, %eax je 0x1cf2d cmpq $0x0, 0x40(%rbx) je 0x1cf4c cmpl $0x0, 0xc4(%rsp) je 0x1cf37 movq %rbx, %rdi callq 0x1989b jmp 0x1cf37 movq %rbx, %rdi callq 0x1cfcf xorl %ebx, %ebx movq %rbx, %rax addq $0x3d8, %rsp # imm = 0x3D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x0, 0xac(%rsp) je 0x1cf37 movq %rbx, %rdi callq 0x22476 cmpl $0x0, 0xb4(%rsp) je 0x1cf37 movq %rbx, %rdi callq 0x23605 jmp 0x1cf37 leaq 0x6734b(%rip), %rdi # 0x842c4 leaq 0x67352(%rip), %rsi # 0x842d2 leaq 0x673a9(%rip), %rcx # 0x84330 movl $0xa0, %edx callq 0xc540 leaq 0x673ea(%rip), %rdi # 0x84382 leaq 0x67333(%rip), %rsi # 0x842d2 leaq 0x6738a(%rip), %rcx # 0x84330 movl $0xa1, %edx callq 0xc540 leaq 0x673d6(%rip), %rdi # 0x8438d leaq 0x67314(%rip), %rsi # 0x842d2 leaq 0x6736b(%rip), %rcx # 0x84330 movl $0xa2, %edx callq 0xc540
glfwCreateWindow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 3D8h test rdx, rdx jz loc_1CF72 mov r15d, edi test edi, edi js loc_1CF91 mov ebp, esi test esi, esi js loc_1CFB0 lea r14, _glfw cmp dword ptr [r14], 0 jz short loc_1CDBD mov r12, rdx test r15d, r15d setnz al test ebp, ebp setnz dl test al, dl jnz short loc_1CDD2 lea rsi, aInvalidWindowS; "Invalid window size %ix%i" xor ebx, ebx mov edi, 10004h mov edx, r15d mov ecx, ebp xor eax, eax call _glfwInputError jmp loc_1CF37 loc_1CDBD: xor ebx, ebx mov edi, offset loc_10001 xor esi, esi xor eax, eax call _glfwInputError jmp loc_1CF37 loc_1CDD2: mov [rsp+408h+var_408], rcx lea rsi, [r14+18h] lea rdi, [rsp+408h+var_3B8] mov ecx, 9 rep movsq mov rax, [r14+3D0h] lea r13, [rsp+408h+var_3F8] mov [r13+30h], rax movdqu xmm0, xmmword ptr [r14+3A0h] movups xmm1, xmmword ptr [r14+3B0h] movups xmm2, xmmword ptr [r14+3C0h] movaps xmmword ptr [r13+20h], xmm2 movaps xmmword ptr [r13+10h], xmm1 movdqa xmmword ptr [r13+0], xmm0 lea rsi, [r14+60h] lea rbx, [rsp+408h+var_370] mov edx, 340h mov rdi, rbx mov [rsp+408h+var_400], r8 call _memcpy mov [rbx], r15d mov [rbx+4], ebp mov [rbx+8], r12 mov rax, [rsp+408h+var_400] mov [r13+28h], rax mov rdi, r13 call _glfwIsValidContextConfig test eax, eax jz loc_1CF35 mov edi, 1 mov esi, 390h call _calloc mov rbx, rax mov rax, [r14+3F0h] mov [rbx], rax mov [r14+3F0h], rbx mov [rbx+28h], r15d mov [rbx+2Ch], ebp lea rcx, [rsp+408h+var_3B8] mov rax, [rcx] mov [rbx+30h], rax mov eax, [rcx+8] mov [rbx+38h], eax mov eax, [r14+3D8h] mov [rbx+3Ch], eax mov rax, [rsp+408h+var_408] mov [rbx+40h], rax lea rsi, [rsp+408h+var_370] mov eax, [rsi+10h] mov [rbx+8], eax mov eax, [rsi+18h] mov [rbx+0Ch], eax mov rax, [rsi+20h] mov [rbx+10h], rax mov eax, [rsi+30h] mov [rbx+18h], eax mov dword ptr [rbx+74h], 34001h pcmpeqd xmm0, xmm0 movdqu xmmword ptr [rbx+50h], xmm0 mov qword ptr [rbx+60h], 0FFFFFFFFFFFFFFFFh lea rdx, [rsp+408h+var_3F8] mov rdi, rbx call _glfwPlatformCreateWindow test eax, eax jz short loc_1CF2D cmp [rsp+408h+var_3F8], 0 jz short loc_1CF12 lea rsi, [rsp+408h+var_3F8] mov rdi, rbx call _glfwRefreshContextAttribs test eax, eax jz short loc_1CF2D loc_1CF12: cmp qword ptr [rbx+40h], 0 jz short loc_1CF4C cmp [rsp+408h+var_344], 0 jz short loc_1CF37 mov rdi, rbx call _glfwCenterCursorInContentArea jmp short loc_1CF37 loc_1CF2D: mov rdi, rbx call glfwDestroyWindow loc_1CF35: xor ebx, ebx loc_1CF37: mov rax, rbx add rsp, 3D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1CF4C: cmp [rsp+408h+var_35C], 0 jz short loc_1CF37 mov rdi, rbx call _glfwPlatformShowWindow cmp [rsp+408h+var_354], 0 jz short loc_1CF37 mov rdi, rbx call _glfwPlatformFocusWindow jmp short loc_1CF37 loc_1CF72: lea rdi, aTitleNull; "title != NULL" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlfwwindowGlfw; "GLFWwindow *glfwCreateWindow(int, int, "... mov edx, 0A0h call ___assert_fail loc_1CF91: lea rdi, aWidth0_0; "width >= 0" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlfwwindowGlfw; "GLFWwindow *glfwCreateWindow(int, int, "... mov edx, 0A1h call ___assert_fail loc_1CFB0: lea rdi, aHeight0_0; "height >= 0" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlfwwindowGlfw; "GLFWwindow *glfwCreateWindow(int, int, "... mov edx, 0A2h call ___assert_fail
long long glfwCreateWindow(int a1, int a2, long long a3, long long a4, long long a5) { long long v6; // rbx __m128i v7; // xmm0 __m128i v8; // xmm1 unsigned int v9; // edx unsigned int v10; // ecx int v11; // r8d int v12; // r9d __m128i v16[2]; // [rsp+10h] [rbp-3F8h] BYREF __int128 v17; // [rsp+30h] [rbp-3D8h] long long v18; // [rsp+40h] [rbp-3C8h] _QWORD v19[9]; // [rsp+50h] [rbp-3B8h] BYREF _DWORD v20[2]; // [rsp+98h] [rbp-370h] BYREF long long v21; // [rsp+A0h] [rbp-368h] int v22; // [rsp+A8h] [rbp-360h] int v23; // [rsp+ACh] [rbp-35Ch] int v24; // [rsp+B0h] [rbp-358h] int v25; // [rsp+B4h] [rbp-354h] long long v26; // [rsp+B8h] [rbp-350h] int v27; // [rsp+C4h] [rbp-344h] int v28; // [rsp+C8h] [rbp-340h] if ( !a3 ) __assert_fail( "title != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c", 160LL, "GLFWwindow *glfwCreateWindow(int, int, const char *, GLFWmonitor *, GLFWwindow *)"); if ( a1 < 0 ) __assert_fail( "width >= 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c", 161LL, "GLFWwindow *glfwCreateWindow(int, int, const char *, GLFWmonitor *, GLFWwindow *)"); if ( a2 < 0 ) __assert_fail( "height >= 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c", 162LL, "GLFWwindow *glfwCreateWindow(int, int, const char *, GLFWmonitor *, GLFWwindow *)"); if ( !glfw[0] ) { v6 = 0LL; glfwInputError((unsigned int)&loc_10001, 0LL); return v6; } if ( a2 == 0 || a1 == 0 ) { v6 = 0LL; glfwInputError(0x10004u, (long long)"Invalid window size %ix%i", a1, a2); return v6; } qmemcpy(v19, &glfw[6], sizeof(v19)); v18 = *(_QWORD *)&glfw[244]; v7 = _mm_loadu_si128((const __m128i *)&glfw[232]); v8 = *(__m128i *)&glfw[236]; v17 = *(_OWORD *)&glfw[240]; v16[1] = v8; v16[0] = v7; memcpy(v20, &glfw[24], 832LL); v20[0] = a1; v20[1] = a2; v21 = a3; *((_QWORD *)&v17 + 1) = a5; if ( !(unsigned int)glfwIsValidContextConfig(v16[0].m128i_i32, (long long)&glfw[24], v9, v10, v11, v12) ) return 0LL; v6 = calloc(1LL, 912LL); *(_QWORD *)v6 = *(_QWORD *)&glfw[252]; *(_QWORD *)&glfw[252] = v6; *(_DWORD *)(v6 + 40) = a1; *(_DWORD *)(v6 + 44) = a2; *(_QWORD *)(v6 + 48) = v19[0]; *(_DWORD *)(v6 + 56) = v19[1]; *(_DWORD *)(v6 + 60) = glfw[246]; *(_QWORD *)(v6 + 64) = a4; *(_DWORD *)(v6 + 8) = v22; *(_DWORD *)(v6 + 12) = v24; *(_QWORD *)(v6 + 16) = v26; *(_DWORD *)(v6 + 24) = v28; *(_DWORD *)(v6 + 116) = 212993; *(_OWORD *)(v6 + 80) = -1LL; *(_QWORD *)(v6 + 96) = -1LL; if ( !(unsigned int)glfwPlatformCreateWindow(v6, v20, v16) || v16[0].m128i_i32[0] && !(unsigned int)glfwRefreshContextAttribs(v6, v16) ) { glfwDestroyWindow(v6); return 0LL; } if ( *(_QWORD *)(v6 + 64) ) { if ( v27 ) glfwCenterCursorInContentArea(v6); } else if ( v23 ) { glfwPlatformShowWindow(v6); if ( v25 ) glfwPlatformFocusWindow(v6); } return v6; }
glfwCreateWindow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x3d8 TEST RDX,RDX JZ 0x0011cf72 MOV R15D,EDI TEST EDI,EDI JS 0x0011cf91 MOV EBP,ESI TEST ESI,ESI JS 0x0011cfb0 LEA R14,[0x1a8638] CMP dword ptr [R14],0x0 JZ 0x0011cdbd MOV R12,RDX TEST R15D,R15D SETNZ AL TEST EBP,EBP SETNZ DL TEST AL,DL JNZ 0x0011cdd2 LEA RSI,[0x184399] XOR EBX,EBX MOV EDI,0x10004 MOV EDX,R15D MOV ECX,EBP XOR EAX,EAX CALL 0x00118e91 JMP 0x0011cf37 LAB_0011cdbd: XOR EBX,EBX MOV EDI,0x10001 XOR ESI,ESI XOR EAX,EAX CALL 0x00118e91 JMP 0x0011cf37 LAB_0011cdd2: MOV qword ptr [RSP],RCX LEA RSI,[R14 + 0x18] LEA RDI,[RSP + 0x50] MOV ECX,0x9 MOVSQ.REP RDI,RSI MOV RAX,qword ptr [R14 + 0x3d0] LEA R13,[RSP + 0x10] MOV qword ptr [R13 + 0x30],RAX MOVDQU XMM0,xmmword ptr [R14 + 0x3a0] MOVUPS XMM1,xmmword ptr [R14 + 0x3b0] MOVUPS XMM2,xmmword ptr [R14 + 0x3c0] MOVAPS xmmword ptr [R13 + 0x20],XMM2 MOVAPS xmmword ptr [R13 + 0x10],XMM1 MOVDQA xmmword ptr [R13],XMM0 LEA RSI,[R14 + 0x60] LEA RBX,[RSP + 0x98] MOV EDX,0x340 MOV RDI,RBX MOV qword ptr [RSP + 0x8],R8 CALL 0x0010c6b0 MOV dword ptr [RBX],R15D MOV dword ptr [RBX + 0x4],EBP MOV qword ptr [RBX + 0x8],R12 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [R13 + 0x28],RAX MOV RDI,R13 CALL 0x0011833c TEST EAX,EAX JZ 0x0011cf35 MOV EDI,0x1 MOV ESI,0x390 CALL 0x0010c550 MOV RBX,RAX MOV RAX,qword ptr [R14 + 0x3f0] MOV qword ptr [RBX],RAX MOV qword ptr [R14 + 0x3f0],RBX MOV dword ptr [RBX + 0x28],R15D MOV dword ptr [RBX + 0x2c],EBP LEA RCX,[RSP + 0x50] MOV RAX,qword ptr [RCX] MOV qword ptr [RBX + 0x30],RAX MOV EAX,dword ptr [RCX + 0x8] MOV dword ptr [RBX + 0x38],EAX MOV EAX,dword ptr [R14 + 0x3d8] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [RSP] MOV qword ptr [RBX + 0x40],RAX LEA RSI,[RSP + 0x98] MOV EAX,dword ptr [RSI + 0x10] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [RSI + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [RSI + 0x20] MOV qword ptr [RBX + 0x10],RAX MOV EAX,dword ptr [RSI + 0x30] MOV dword ptr [RBX + 0x18],EAX MOV dword ptr [RBX + 0x74],0x34001 PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [RBX + 0x50],XMM0 MOV qword ptr [RBX + 0x60],-0x1 LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x00121df2 TEST EAX,EAX JZ 0x0011cf2d CMP dword ptr [RSP + 0x10],0x0 JZ 0x0011cf12 LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00118701 TEST EAX,EAX JZ 0x0011cf2d LAB_0011cf12: CMP qword ptr [RBX + 0x40],0x0 JZ 0x0011cf4c CMP dword ptr [RSP + 0xc4],0x0 JZ 0x0011cf37 MOV RDI,RBX CALL 0x0011989b JMP 0x0011cf37 LAB_0011cf2d: MOV RDI,RBX CALL 0x0011cfcf LAB_0011cf35: XOR EBX,EBX LAB_0011cf37: MOV RAX,RBX ADD RSP,0x3d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011cf4c: CMP dword ptr [RSP + 0xac],0x0 JZ 0x0011cf37 MOV RDI,RBX CALL 0x00122476 CMP dword ptr [RSP + 0xb4],0x0 JZ 0x0011cf37 MOV RDI,RBX CALL 0x00123605 JMP 0x0011cf37 LAB_0011cf72: LEA RDI,[0x1842c4] LEA RSI,[0x1842d2] LEA RCX,[0x184330] MOV EDX,0xa0 CALL 0x0010c540 LAB_0011cf91: LEA RDI,[0x184382] LEA RSI,[0x1842d2] LEA RCX,[0x184330] MOV EDX,0xa1 CALL 0x0010c540 LAB_0011cfb0: LEA RDI,[0x18438d] LEA RSI,[0x1842d2] LEA RCX,[0x184330] MOV EDX,0xa2 CALL 0x0010c540
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 * glfwCreateWindow(int param_1,int param_2,long param_3,int8 param_4,int8 param_5) { int iVar1; int8 *puVar2; long lVar3; int8 *puVar4; int8 local_3f8; int8 uStack_3f0; int8 local_3e8; int8 uStack_3e0; int8 local_3d8; int8 uStack_3d0; int8 local_3c8; int8 local_3b8; int4 local_3b0; int local_370; int local_36c; long local_368; int4 local_360; int local_35c; int4 local_358; int local_354; int8 local_350; int local_344; int4 local_340; if (param_3 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("title != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c" ,0xa0, "GLFWwindow *glfwCreateWindow(int, int, const char *, GLFWmonitor *, GLFWwindow *)" ); } if (param_1 < 0) { /* WARNING: Subroutine does not return */ __assert_fail("width >= 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c" ,0xa1, "GLFWwindow *glfwCreateWindow(int, int, const char *, GLFWmonitor *, GLFWwindow *)" ); } if (param_2 < 0) { /* WARNING: Subroutine does not return */ __assert_fail("height >= 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c" ,0xa2, "GLFWwindow *glfwCreateWindow(int, int, const char *, GLFWmonitor *, GLFWwindow *)" ); } if (_glfw != 0) { if (param_1 == 0 || param_2 == 0) { _glfwInputError(0x10004,"Invalid window size %ix%i",param_1,param_2); return (int8 *)0x0; } puVar2 = (int8 *)&DAT_001a8650; puVar4 = &local_3b8; for (lVar3 = 9; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar4 = *puVar2; puVar2 = puVar2 + 1; puVar4 = puVar4 + 1; } local_3c8 = _DAT_001a8a08; local_3d8 = _DAT_001a89f8; uStack_3d0 = uRam00000000001a8a00; local_3e8 = _DAT_001a89e8; uStack_3e0 = _DAT_001a89f0; local_3f8 = _DAT_001a89d8; uStack_3f0 = _DAT_001a89e0; memcpy(&local_370,&DAT_001a8698,0x340); uStack_3d0 = param_5; local_370 = param_1; local_36c = param_2; local_368 = param_3; iVar1 = _glfwIsValidContextConfig(&local_3f8); if (iVar1 != 0) { puVar2 = (int8 *)calloc(1,0x390); *puVar2 = DAT_001a8a28; DAT_001a8a28 = puVar2; *(int *)(puVar2 + 5) = param_1; *(int *)((long)puVar2 + 0x2c) = param_2; puVar2[6] = local_3b8; *(int4 *)(puVar2 + 7) = local_3b0; *(int4 *)((long)puVar2 + 0x3c) = DAT_001a8a10; puVar2[8] = param_4; *(int4 *)(puVar2 + 1) = local_360; *(int4 *)((long)puVar2 + 0xc) = local_358; puVar2[2] = local_350; *(int4 *)(puVar2 + 3) = local_340; *(int4 *)((long)puVar2 + 0x74) = 0x34001; *(int4 *)(puVar2 + 10) = 0xffffffff; *(int4 *)((long)puVar2 + 0x54) = 0xffffffff; *(int4 *)(puVar2 + 0xb) = 0xffffffff; *(int4 *)((long)puVar2 + 0x5c) = 0xffffffff; puVar2[0xc] = 0xffffffffffffffff; iVar1 = _glfwPlatformCreateWindow(puVar2,&local_370,&local_3f8); if ((iVar1 != 0) && (((int)local_3f8 == 0 || (iVar1 = _glfwRefreshContextAttribs(puVar2,&local_3f8), iVar1 != 0)))) { if (puVar2[8] != 0) { if (local_344 == 0) { return puVar2; } _glfwCenterCursorInContentArea(puVar2); return puVar2; } if (local_35c == 0) { return puVar2; } _glfwPlatformShowWindow(puVar2); if (local_354 == 0) { return puVar2; } _glfwPlatformFocusWindow(puVar2); return puVar2; } glfwDestroyWindow(puVar2); } return (int8 *)0x0; } _glfwInputError(0x10001,0); return (int8 *)0x0; }
25,771
lunasvg::SVGImageElement::SVGImageElement(lunasvg::Document*)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
SVGImageElement::SVGImageElement(Document* document) : SVGGraphicsElement(document, ElementID::Image) , m_x(PropertyID::X, LengthDirection::Horizontal, LengthNegativeMode::Allow, 0.f, LengthUnits::None) , m_y(PropertyID::Y, LengthDirection::Vertical, LengthNegativeMode::Allow, 0.f, LengthUnits::None) , m_width(PropertyID::Width, LengthDirection::Horizontal, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent) , m_height(PropertyID::Height, LengthDirection::Vertical, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent) , m_preserveAspectRatio(PropertyID::PreserveAspectRatio) { addProperty(m_x); addProperty(m_y); addProperty(m_width); addProperty(m_height); addProperty(m_preserveAspectRatio); }
O1
cpp
lunasvg::SVGImageElement::SVGImageElement(lunasvg::Document*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x7, %edx callq 0x102f8 leaq 0x4781b(%rip), %rax # 0x58b38 movq %rax, (%rbx) leaq 0x98(%rbx), %r15 movq %r15, %rdi movl $0x4b, %esi callq 0x1f3bc leaq 0x49ad5(%rip), %r14 # 0x5ae10 addq $0x10, %r14 movq %r14, 0x98(%rbx) movw $0x0, 0xa1(%rbx) movl $0x0, 0xa4(%rbx) movb $0x0, 0xa8(%rbx) leaq 0xb0(%rbx), %rbp movq %rbp, %rdi movl $0x4e, %esi callq 0x1f3bc movq %r14, 0xb0(%rbx) movw $0x1, 0xb9(%rbx) movl $0x0, 0xbc(%rbx) movb $0x0, 0xc0(%rbx) leaq 0xc8(%rbx), %r13 movq %r13, %rdi movl $0x4a, %esi callq 0x1f3bc movq %r14, 0xc8(%rbx) movw $0x100, 0xd1(%rbx) # imm = 0x100 movl $0x42c80000, 0xd4(%rbx) # imm = 0x42C80000 movb $0x1, 0xd8(%rbx) leaq 0xe0(%rbx), %r12 movq %r12, %rdi movl $0x1b, %esi callq 0x1f3bc movq %r14, 0xe0(%rbx) movw $0x101, 0xe9(%rbx) # imm = 0x101 movl $0x42c80000, 0xec(%rbx) # imm = 0x42C80000 movb $0x1, 0xf0(%rbx) leaq 0xf8(%rbx), %r14 movq %r14, %rdi movl $0x31, %esi callq 0x1f3bc leaq 0x49c76(%rip), %rax # 0x5b090 addq $0x10, %rax movq %rax, 0xf8(%rbx) movq $0x5, 0x104(%rbx) leaq 0x110(%rbx), %rax movq %rax, (%rsp) movq $0x0, 0x110(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r15, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %rbp, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r13, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r12, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r14, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x114fd jmp 0x114fd jmp 0x114fd jmp 0x114fd movq %rax, %r14 jmp 0x1150e movq %rax, %r14 movq (%rsp), %rdi callq 0xb17c movq %rbx, %rdi callq 0xc5b2 movq %r14, %rdi callq 0xa5c0
_ZN7lunasvg15SVGImageElementC2EPNS_8DocumentE: push rbp; Alternative name is 'lunasvg::SVGImageElement::SVGImageElement(lunasvg::Document *)' push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov edx, 7 call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) lea rax, off_58B38 mov [rbx], rax lea r15, [rbx+98h] mov rdi, r15 mov esi, 4Bh ; 'K' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) lea r14, _ZTVN7lunasvg9SVGLengthE; `vtable for'lunasvg::SVGLength add r14, 10h mov [rbx+98h], r14 mov word ptr [rbx+0A1h], 0 mov dword ptr [rbx+0A4h], 0 mov byte ptr [rbx+0A8h], 0 lea rbp, [rbx+0B0h] mov rdi, rbp mov esi, 4Eh ; 'N' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) mov [rbx+0B0h], r14 mov word ptr [rbx+0B9h], 1 mov dword ptr [rbx+0BCh], 0 mov byte ptr [rbx+0C0h], 0 lea r13, [rbx+0C8h] mov rdi, r13 mov esi, 4Ah ; 'J' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) mov [rbx+0C8h], r14 mov word ptr [rbx+0D1h], 100h mov dword ptr [rbx+0D4h], 42C80000h mov byte ptr [rbx+0D8h], 1 lea r12, [rbx+0E0h] mov rdi, r12 mov esi, 1Bh call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) mov [rbx+0E0h], r14 mov word ptr [rbx+0E9h], 101h mov dword ptr [rbx+0ECh], 42C80000h mov byte ptr [rbx+0F0h], 1 lea r14, [rbx+0F8h] mov rdi, r14 mov esi, 31h ; '1' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) lea rax, _ZTVN7lunasvg22SVGPreserveAspectRatioE; `vtable for'lunasvg::SVGPreserveAspectRatio add rax, 10h mov [rbx+0F8h], rax mov qword ptr [rbx+104h], 5 lea rax, [rbx+110h] mov [rsp+38h+var_38], rax mov qword ptr [rbx+110h], 0 mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r15 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], rbp mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r13 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r12 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r14 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_114FD jmp short loc_114FD jmp short loc_114FD jmp short $+2 loc_114FD: mov r14, rax jmp short loc_1150E mov r14, rax mov rdi, [rsp+0]; this call _ZN7lunasvg6BitmapD2Ev; lunasvg::Bitmap::~Bitmap() loc_1150E: mov rdi, rbx; this call _ZN7lunasvg10SVGElementD2Ev; lunasvg::SVGElement::~SVGElement() mov rdi, r14 call __Unwind_Resume
_QWORD * lunasvg::SVGImageElement::SVGImageElement(lunasvg::SVGImageElement *this, lunasvg::Document *a2) { _QWORD *v2; // rax _QWORD *v3; // rax _QWORD *v4; // rax _QWORD *v5; // rax _QWORD *result; // rax lunasvg::SVGGraphicsElement::SVGGraphicsElement((long long)this, (long long)a2, 7); *(_QWORD *)this = off_58B38; lunasvg::SVGProperty::SVGProperty((char *)this + 152, 75LL); *((_QWORD *)this + 19) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 161) = 0; *((_DWORD *)this + 41) = 0; *((_BYTE *)this + 168) = 0; lunasvg::SVGProperty::SVGProperty((char *)this + 176, 78LL); *((_QWORD *)this + 22) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 185) = 1; *((_DWORD *)this + 47) = 0; *((_BYTE *)this + 192) = 0; lunasvg::SVGProperty::SVGProperty((char *)this + 200, 74LL); *((_QWORD *)this + 25) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 209) = 256; *((_DWORD *)this + 53) = 1120403456; *((_BYTE *)this + 216) = 1; lunasvg::SVGProperty::SVGProperty((char *)this + 224, 27LL); *((_QWORD *)this + 28) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 233) = 257; *((_DWORD *)this + 59) = 1120403456; *((_BYTE *)this + 240) = 1; lunasvg::SVGProperty::SVGProperty((char *)this + 248, 49LL); *((_QWORD *)this + 31) = &`vtable for'lunasvg::SVGPreserveAspectRatio + 2; *(_QWORD *)((char *)this + 260) = 5LL; *((_QWORD *)this + 34) = 0LL; v2 = (_QWORD *)operator new(0x10uLL); *v2 = 0LL; v2[1] = (char *)this + 152; *v2 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v2; v3 = (_QWORD *)operator new(0x10uLL); *v3 = 0LL; v3[1] = (char *)this + 176; *v3 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v3; v4 = (_QWORD *)operator new(0x10uLL); *v4 = 0LL; v4[1] = (char *)this + 200; *v4 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v4; v5 = (_QWORD *)operator new(0x10uLL); *v5 = 0LL; v5[1] = (char *)this + 224; *v5 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v5; result = (_QWORD *)operator new(0x10uLL); *result = 0LL; result[1] = (char *)this + 248; *result = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = result; return result; }
SVGImageElement: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV EDX,0x7 CALL 0x001102f8 LEA RAX,[0x158b38] MOV qword ptr [RBX],RAX LEA R15,[RBX + 0x98] LAB_00111327: MOV RDI,R15 MOV ESI,0x4b CALL 0x0011f3bc LEA R14,[0x15ae10] ADD R14,0x10 MOV qword ptr [RBX + 0x98],R14 MOV word ptr [RBX + 0xa1],0x0 MOV dword ptr [RBX + 0xa4],0x0 MOV byte ptr [RBX + 0xa8],0x0 LEA RBP,[RBX + 0xb0] LAB_00111367: MOV RDI,RBP MOV ESI,0x4e CALL 0x0011f3bc MOV qword ptr [RBX + 0xb0],R14 MOV word ptr [RBX + 0xb9],0x1 MOV dword ptr [RBX + 0xbc],0x0 MOV byte ptr [RBX + 0xc0],0x0 LEA R13,[RBX + 0xc8] LAB_0011139c: MOV RDI,R13 MOV ESI,0x4a CALL 0x0011f3bc MOV qword ptr [RBX + 0xc8],R14 MOV word ptr [RBX + 0xd1],0x100 MOV dword ptr [RBX + 0xd4],0x42c80000 MOV byte ptr [RBX + 0xd8],0x1 LEA R12,[RBX + 0xe0] LAB_001113d1: MOV RDI,R12 MOV ESI,0x1b CALL 0x0011f3bc MOV qword ptr [RBX + 0xe0],R14 MOV word ptr [RBX + 0xe9],0x101 MOV dword ptr [RBX + 0xec],0x42c80000 MOV byte ptr [RBX + 0xf0],0x1 LEA R14,[RBX + 0xf8] LAB_00111406: MOV RDI,R14 MOV ESI,0x31 CALL 0x0011f3bc LEA RAX,[0x15b090] ADD RAX,0x10 MOV qword ptr [RBX + 0xf8],RAX MOV qword ptr [RBX + 0x104],0x5 LEA RAX,[RBX + 0x110] MOV qword ptr [RSP],RAX MOV qword ptr [RBX + 0x110],0x0 LAB_00111446: MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R15 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],RBP MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R13 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R12 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 LAB_001114d0: MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R14 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* lunasvg::SVGImageElement::SVGImageElement(lunasvg::Document*) */ void __thiscall lunasvg::SVGImageElement::SVGImageElement(SVGImageElement *this,Document *param_1) { int8 *puVar1; SVGGraphicsElement::SVGGraphicsElement((SVGGraphicsElement *)this,param_1,7); *(int ***)this = &PTR__SVGImageElement_00158b38; /* try { // try from 00111327 to 00111333 has its CatchHandler @ 001114fd */ SVGProperty::SVGProperty((SVGProperty *)(this + 0x98),0x4b); *(int ***)(this + 0x98) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0xa1) = 0; *(int4 *)(this + 0xa4) = 0; this[0xa8] = (SVGImageElement)0x0; /* try { // try from 00111367 to 00111373 has its CatchHandler @ 001114fb */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xb0),0x4e); *(int ***)(this + 0xb0) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0xb9) = 1; *(int4 *)(this + 0xbc) = 0; this[0xc0] = (SVGImageElement)0x0; /* try { // try from 0011139c to 001113a8 has its CatchHandler @ 001114f9 */ SVGProperty::SVGProperty((SVGProperty *)(this + 200),0x4a); *(int ***)(this + 200) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0xd1) = 0x100; *(int4 *)(this + 0xd4) = 0x42c80000; this[0xd8] = (SVGImageElement)0x1; /* try { // try from 001113d1 to 001113dd has its CatchHandler @ 001114f7 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xe0),0x1b); *(int ***)(this + 0xe0) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0xe9) = 0x101; *(int4 *)(this + 0xec) = 0x42c80000; this[0xf0] = (SVGImageElement)0x1; /* try { // try from 00111406 to 00111412 has its CatchHandler @ 001114f5 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xf8),0x31); *(int ***)(this + 0xf8) = &PTR__SVGProperty_0015b0a0; *(int8 *)(this + 0x104) = 5; *(int8 *)(this + 0x110) = 0; /* try { // try from 00111446 to 001114cf has its CatchHandler @ 00111502 */ puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0x98); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0xb0); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 200); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0xe0); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0xf8); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; return; }
25,772
free_all_read_locks
eloqsql/mysys/thr_lock.c
static inline void free_all_read_locks(THR_LOCK *lock, my_bool using_concurrent_insert) { THR_LOCK_DATA *data=lock->read_wait.data; check_locks(lock,"before freeing read locks", TL_UNLOCK, 1); /* move all locks from read_wait list to read list */ (*lock->read.last)=data; data->prev=lock->read.last; lock->read.last=lock->read_wait.last; /* Clear read_wait list */ lock->read_wait.last= &lock->read_wait.data; do { mysql_cond_t *cond= data->cond; if ((int) data->type == (int) TL_READ_NO_INSERT) { if (using_concurrent_insert) { /* We can't free this lock; Link lock away from read chain back into read_wait chain */ if (((*data->prev)=data->next)) data->next->prev=data->prev; else lock->read.last=data->prev; *lock->read_wait.last= data; data->prev= lock->read_wait.last; lock->read_wait.last= &data->next; continue; } lock->read_no_write_count++; } /* purecov: begin inspected */ DBUG_PRINT("lock",("giving read lock to thread: %lu", (ulong)data->owner->thread_id)); /* purecov: end */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); } while ((data=data->next)); *lock->read_wait.last=0; if (!lock->read_wait.data) lock->write_lock_count=0; check_locks(lock,"after giving read locks", TL_UNLOCK, 0); }
O0
c
free_all_read_locks: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x78(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x8(%rbp), %rcx addq $0x60, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpl $0x5, 0x40(%rax) jne 0xc3d40 cmpb $0x0, -0x9(%rbp) je 0xc3d2d movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xc3cec movq -0x18(%rbp), %rax movq 0x10(%rax), %rcx movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0xc3cfc movq -0x18(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) jmp 0xc3d59 movq -0x8(%rbp), %rax movl 0xa8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xa8(%rax) jmp 0xc3d42 jmp 0xc3d44 movq -0x18(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x20(%rbp), %rdi callq 0xc32c0 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xc3c9d movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) jne 0xc3d98 movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) addq $0x20, %rsp popq %rbp retq nop
free_all_read_locks: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov rax, [rbp+var_8] mov rax, [rax+60h] mov [rbp+var_18], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+78h] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rax, [rbp+var_8] mov rcx, [rax+68h] mov rax, [rbp+var_8] mov [rax+78h], rcx mov rcx, [rbp+var_8] add rcx, 60h ; '`' mov rax, [rbp+var_8] mov [rax+68h], rcx loc_C3C9D: mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_20], rax mov rax, [rbp+var_18] cmp dword ptr [rax+40h], 5 jnz loc_C3D40 cmp [rbp+var_9], 0 jz short loc_C3D2D mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_18] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_C3CEC mov rax, [rbp+var_18] mov rcx, [rax+10h] mov rax, [rbp+var_18] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_C3CFC loc_C3CEC: mov rax, [rbp+var_18] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+78h], rcx loc_C3CFC: mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax+68h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+68h] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rcx, [rbp+var_18] add rcx, 8 mov rax, [rbp+var_8] mov [rax+68h], rcx jmp short loc_C3D59 loc_C3D2D: mov rax, [rbp+var_8] mov ecx, [rax+0A8h] add ecx, 1 mov [rax+0A8h], ecx loc_C3D40: jmp short $+2 loc_C3D42: jmp short $+2 loc_C3D44: mov rax, [rbp+var_18] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_20] call inline_mysql_cond_signal_3 loc_C3D59: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_18], rax cmp rax, 0 jnz loc_C3C9D mov rax, [rbp+var_8] mov rax, [rax+68h] mov qword ptr [rax], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jnz short loc_C3D98 mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 loc_C3D98: add rsp, 20h pop rbp retn
long long free_all_read_locks(long long a1, char a2) { long long v2; // rax long long result; // rax long long v4; // [rsp+0h] [rbp-20h] long long v5; // [rsp+8h] [rbp-18h] v5 = *(_QWORD *)(a1 + 96); **(_QWORD **)(a1 + 120) = v5; *(_QWORD *)(v5 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v4 = *(_QWORD *)(v5 + 32); if ( *(_DWORD *)(v5 + 64) != 5 ) goto LABEL_9; if ( !a2 ) { ++*(_DWORD *)(a1 + 168); LABEL_9: *(_QWORD *)(v5 + 32) = 0LL; inline_mysql_cond_signal_3(v4); goto LABEL_10; } v2 = *(_QWORD *)(v5 + 8); **(_QWORD **)(v5 + 16) = v2; if ( v2 ) *(_QWORD *)(*(_QWORD *)(v5 + 8) + 16LL) = *(_QWORD *)(v5 + 16); else *(_QWORD *)(a1 + 120) = *(_QWORD *)(v5 + 16); **(_QWORD **)(a1 + 104) = v5; *(_QWORD *)(v5 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v5 + 8; LABEL_10: v5 = *(_QWORD *)(v5 + 8); } while ( v5 ); **(_QWORD **)(a1 + 104) = 0LL; result = a1; if ( !*(_QWORD *)(a1 + 96) ) { result = a1; *(_QWORD *)(a1 + 160) = 0LL; } return result; }
free_all_read_locks: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x78],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x60 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX LAB_001c3c9d: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x40],0x5 JNZ 0x001c3d40 CMP byte ptr [RBP + -0x9],0x0 JZ 0x001c3d2d MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001c3cec MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001c3cfc LAB_001c3cec: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x78],RCX LAB_001c3cfc: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX JMP 0x001c3d59 LAB_001c3d2d: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xa8] ADD ECX,0x1 MOV dword ptr [RAX + 0xa8],ECX LAB_001c3d40: JMP 0x001c3d42 LAB_001c3d42: JMP 0x001c3d44 LAB_001c3d44: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001c32c0 LAB_001c3d59: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001c3c9d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JNZ 0x001c3d98 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],0x0 LAB_001c3d98: ADD RSP,0x20 POP RBP RET
void free_all_read_locks(long param_1,char param_2) { int8 uVar1; long lVar2; int8 local_20; local_20 = *(long *)(param_1 + 0x60); **(long **)(param_1 + 0x78) = local_20; *(int8 *)(local_20 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { uVar1 = *(int8 *)(local_20 + 0x20); if (*(int *)(local_20 + 0x40) == 5) { if (param_2 == '\0') { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001c3d44; } lVar2 = *(long *)(local_20 + 8); **(long **)(local_20 + 0x10) = lVar2; if (lVar2 == 0) { *(int8 *)(param_1 + 0x78) = *(int8 *)(local_20 + 0x10); } else { *(int8 *)(*(long *)(local_20 + 8) + 0x10) = *(int8 *)(local_20 + 0x10); } **(long **)(param_1 + 0x68) = local_20; *(int8 *)(local_20 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = local_20 + 8; } else { LAB_001c3d44: *(int8 *)(local_20 + 0x20) = 0; inline_mysql_cond_signal(uVar1); } local_20 = *(long *)(local_20 + 8); if (local_20 == 0) { **(int8 **)(param_1 + 0x68) = 0; if (*(long *)(param_1 + 0x60) == 0) { *(int8 *)(param_1 + 0xa0) = 0; } return; } } while( true ); }
25,773
bool llama_model_loader::get_arr<int, 4ul>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::array<int, 4ul>&, bool)
monkey531[P]llama/src/llama-model-loader.cpp
bool llama_model_loader::get_arr(const std::string & key, std::array<T, N_MAX> & result, bool required) { const int kid = gguf_find_key(meta.get(), key.c_str()); if (kid < 0 || gguf_get_kv_type(meta.get(), kid) != GGUF_TYPE_ARRAY) { if (required) { throw std::runtime_error(format("array key not found in model: %s", key.c_str())); } return false; } struct GGUFMeta::ArrayInfo arr_info = GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(meta.get(), kid); switch (arr_info.gt) { case GGUF_TYPE_FLOAT32: GGML_ASSERT((std::is_same<T, float>::value)); break; case GGUF_TYPE_INT32: GGML_ASSERT( (std::is_same<T, int32_t>::value) || (std::is_same<T, uint32_t>::value)); break; default: throw std::runtime_error(format("%s is not a float32, int32 array", key.c_str())); } if (arr_info.length > N_MAX) { throw std::runtime_error(format("array length %u for key %s exceeds max %u", (uint32_t) arr_info.length, key.c_str(), (uint32_t) N_MAX)); } std::copy((const T*)arr_info.data, (const T *)arr_info.data + arr_info.length, result.begin()); return true; }
O2
cpp
bool llama_model_loader::get_arr<int, 4ul>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::array<int, 4ul>&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movl %ecx, %ebp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0xc8(%rdi), %rdi movq (%rsi), %rsi callq 0xa49f0 movq %rax, %r12 testl %r12d, %r12d js 0xeacba movq 0xc8(%r15), %rdi movl %r12d, %esi andl $0x7fffffff, %esi # imm = 0x7FFFFFFF callq 0xa83f0 cmpl $0x9, %eax jne 0xeacba movq 0xc8(%r15), %rsi leaq 0x28(%rsp), %r15 movq %r15, %rdi movl %r12d, %edx callq 0x9f6b0 movl (%r15), %eax cmpl $0x5, %eax jne 0xead1c movq 0x30(%rsp), %rdx cmpq $0x5, %rdx jae 0xead8d testq %rdx, %rdx je 0xeacb6 movq 0x38(%rsp), %rsi shlq $0x2, %rdx movq %rbx, %rdi callq 0xa62f0 movb $0x1, %al jmp 0xeacc1 testb %bpl, %bpl jne 0xeacce xorl %eax, %eax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x9dfd0 movq %rax, %rbx movq (%r14), %rdx leaq 0x5b3fa(%rip), %rsi # 0x1460dd leaq 0x8(%rsp), %rdi xorl %eax, %eax callq 0xa7ad0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0xa6270 xorl %ebp, %ebp movq 0xaf2e8(%rip), %rsi # 0x199ff0 movq 0xaefe1(%rip), %rdx # 0x199cf0 movq %rbx, %rdi callq 0xa6f50 jmp 0xeadde cmpl $0x6, %eax jne 0xead42 leaq 0x5abeb(%rip), %rdi # 0x145913 leaq 0x53655(%rip), %rdx # 0x13e384 leaq 0x5b3c8(%rip), %rcx # 0x1460fe movl $0x14d, %esi # imm = 0x14D xorl %eax, %eax callq 0xa6ac0 pushq $0x10 popq %rdi callq 0x9dfd0 movq %rax, %rbx movq (%r14), %rdx leaq 0x5b3c7(%rip), %rsi # 0x14611e leaq 0x8(%rsp), %rdi xorl %eax, %eax callq 0xa7ad0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0xa6270 xorl %ebp, %ebp movq 0xaf274(%rip), %rsi # 0x199ff0 movq 0xaef6d(%rip), %rdx # 0x199cf0 movq %rbx, %rdi callq 0xa6f50 jmp 0xeadde pushq $0x10 popq %rdi callq 0x9dfd0 movq %rax, %rbx movl 0x30(%rsp), %edx movq (%r14), %rcx leaq 0x5b399(%rip), %rsi # 0x14613f leaq 0x8(%rsp), %rdi pushq $0x4 popq %r8 xorl %eax, %eax callq 0xa7ad0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0xa6270 xorl %ebp, %ebp movq 0xaf221(%rip), %rsi # 0x199ff0 movq 0xaef1a(%rip), %rdx # 0x199cf0 movq %rbx, %rdi callq 0xa6f50 jmp 0xeade6 jmp 0xeadfa jmp 0xeade6 jmp 0xeadfa movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0xa8d48 testb %bpl, %bpl jne 0xeadfd jmp 0xeae05 movq %rax, %r14 movq %rbx, %rdi callq 0x9fc30 movq %r14, %rdi callq 0xa7540 nop
_ZN18llama_model_loader7get_arrIiLm4EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt5arrayIT_XT0_EEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov ebp, ecx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, [rdi+0C8h] mov rsi, [rsi] call _gguf_find_key mov r12, rax test r12d, r12d js short loc_EACBA mov rdi, [r15+0C8h] mov esi, r12d and esi, 7FFFFFFFh call _gguf_get_kv_type cmp eax, 9 jnz short loc_EACBA mov rsi, [r15+0C8h] lea r15, [rsp+68h+var_40] mov rdi, r15 mov edx, r12d call __ZN8GGUFMeta3GKVINS_9ArrayInfoEE6get_kvEPK12gguf_contexti; GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(gguf_context const*,int) mov eax, [r15] cmp eax, 5 jnz loc_EAD1C mov rdx, [rsp+68h+var_38] cmp rdx, 5 jnb loc_EAD8D test rdx, rdx jz short loc_EACB6 mov rsi, [rsp+68h+var_30] shl rdx, 2 mov rdi, rbx call _memmove loc_EACB6: mov al, 1 jmp short loc_EACC1 loc_EACBA: test bpl, bpl jnz short loc_EACCE xor eax, eax loc_EACC1: add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_EACCE: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aArrayKeyNotFou; "array key not found in model: %s" lea rdi, [rsp+68h+var_60] xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+68h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_EADDE loc_EAD1C: cmp eax, 6 jnz short loc_EAD42 lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsSameTFloa; "(std::is_same<T, float>::value)" mov esi, 14Dh xor eax, eax call _ggml_abort loc_EAD42: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aSIsNotAFloat32; "%s is not a float32, int32 array" lea rdi, [rsp+68h+var_60] xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+68h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_EADDE loc_EAD8D: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov edx, dword ptr [rsp+68h+var_38] mov rcx, [r14] lea rsi, aArrayLengthUFo; "array length %u for key %s exceeds max "... lea rdi, [rsp+68h+var_60] push 4 pop r8 xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+68h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_EADDE: jmp short loc_EADE6 jmp short loc_EADFA jmp short loc_EADE6 jmp short loc_EADFA loc_EADE6: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_EADFD jmp short loc_EAE05 loc_EADFA: mov r14, rax loc_EADFD: mov rdi, rbx; void * call ___cxa_free_exception loc_EAE05: mov rdi, r14 call __Unwind_Resume
char llama_model_loader::get_arr<int,4ul>(long long a1, _QWORD *a2, long long a3, char a4) { int key; // eax unsigned int v7; // r12d void *v9; // rbx int v10; // ecx int v11; // r8d int v12; // r9d void *exception; // rbx int v14; // ecx int v15; // r8d int v16; // r9d void *v17; // rbx int v18; // r9d _BYTE v19[32]; // [rsp+8h] [rbp-60h] BYREF int v20; // [rsp+28h] [rbp-40h] BYREF unsigned long long v21; // [rsp+30h] [rbp-38h] long long v22; // [rsp+38h] [rbp-30h] key = gguf_find_key(*(_QWORD *)(a1 + 200), *a2); v7 = key; if ( key >= 0 && (unsigned int)gguf_get_kv_type(*(_QWORD *)(a1 + 200), key & 0x7FFFFFFF) == 9 ) { GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(&v20, *(_QWORD *)(a1 + 200), v7); if ( v20 != 5 ) { if ( v20 == 6 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp", 333LL, "GGML_ASSERT(%s) failed", "(std::is_same<T, float>::value)"); exception = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]((unsigned int)v19, (unsigned int)"%s is not a float32, int32 array", *a2, v14, v15, v16); std::runtime_error::runtime_error(exception, v19); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v21 >= 5 ) { v17 = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]((unsigned int)v19, (unsigned int)"array length %u for key %s exceeds max %u", v21, *a2, 4, v18); std::runtime_error::runtime_error(v17, v19); __cxa_throw( v17, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v21 ) memmove(a3, v22, 4 * v21); return 1; } else { if ( a4 ) { v9 = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]((unsigned int)v19, (unsigned int)"array key not found in model: %s", *a2, v10, v11, v12); std::runtime_error::runtime_error(v9, v19); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return 0; } }
get_arr<int,4ul>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV EBP,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,qword ptr [RDI + 0xc8] MOV RSI,qword ptr [RSI] CALL 0x001a49f0 MOV R12,RAX TEST R12D,R12D JS 0x001eacba MOV RDI,qword ptr [R15 + 0xc8] MOV ESI,R12D AND ESI,0x7fffffff CALL 0x001a83f0 CMP EAX,0x9 JNZ 0x001eacba MOV RSI,qword ptr [R15 + 0xc8] LEA R15,[RSP + 0x28] MOV RDI,R15 MOV EDX,R12D CALL 0x0019f6b0 MOV EAX,dword ptr [R15] CMP EAX,0x5 JNZ 0x001ead1c MOV RDX,qword ptr [RSP + 0x30] CMP RDX,0x5 JNC 0x001ead8d TEST RDX,RDX JZ 0x001eacb6 MOV RSI,qword ptr [RSP + 0x38] SHL RDX,0x2 MOV RDI,RBX CALL 0x001a62f0 LAB_001eacb6: MOV AL,0x1 JMP 0x001eacc1 LAB_001eacba: TEST BPL,BPL JNZ 0x001eacce XOR EAX,EAX LAB_001eacc1: ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001eacce: PUSH 0x10 POP RDI CALL 0x0019dfd0 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_001eacdc: LEA RSI,[0x2460dd] LEA RDI,[RSP + 0x8] XOR EAX,EAX CALL 0x001a7ad0 MOV BPL,0x1 LAB_001eacf2: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001a6270 XOR EBP,EBP MOV RSI,qword ptr [0x00299ff0] MOV RDX,qword ptr [0x00299cf0] MOV RDI,RBX CALL 0x001a6f50 LAB_001ead1c: CMP EAX,0x6 JNZ 0x001ead42 LEA RDI,[0x245913] LEA RDX,[0x23e384] LEA RCX,[0x2460fe] MOV ESI,0x14d XOR EAX,EAX CALL 0x001a6ac0 LAB_001ead42: PUSH 0x10 POP RDI CALL 0x0019dfd0 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_001ead50: LEA RSI,[0x24611e] LEA RDI,[RSP + 0x8] XOR EAX,EAX CALL 0x001a7ad0 MOV BPL,0x1 LAB_001ead66: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001a6270 XOR EBP,EBP MOV RSI,qword ptr [0x00299ff0] MOV RDX,qword ptr [0x00299cf0] MOV RDI,RBX CALL 0x001a6f50 LAB_001ead8d: PUSH 0x10 POP RDI CALL 0x0019dfd0 MOV RBX,RAX MOV EDX,dword ptr [RSP + 0x30] MOV RCX,qword ptr [R14] LAB_001ead9f: LEA RSI,[0x24613f] LEA RDI,[RSP + 0x8] PUSH 0x4 POP R8 XOR EAX,EAX CALL 0x001a7ad0 MOV BPL,0x1 LAB_001eadb9: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001a6270 XOR EBP,EBP MOV RSI,qword ptr [0x00299ff0] MOV RDX,qword ptr [0x00299cf0] MOV RDI,RBX CALL 0x001a6f50
/* bool llama_model_loader::get_arr<int, 4ul>(std::__cxx11::string const&, std::array<int, 4ul>&, bool) */ bool __thiscall llama_model_loader::get_arr<int,4ul> (llama_model_loader *this,string *param_1,array *param_2,bool param_3) { ulong uVar1; uint uVar2; int iVar3; runtime_error *prVar4; string local_60 [32]; int local_40 [2]; uint local_38; int4 uStack_34; void *local_30; uVar2 = gguf_find_key(*(int8 *)(this + 200),*(int8 *)param_1); if (((int)uVar2 < 0) || (iVar3 = gguf_get_kv_type(*(int8 *)(this + 200),uVar2 & 0x7fffffff), iVar3 != 9)) { if (!param_3) { return false; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001eacdc to 001eacee has its CatchHandler @ 001eadfa */ format_abi_cxx11_((char *)local_60,"array key not found in model: %s",*(int8 *)param_1); /* try { // try from 001eacf2 to 001ead16 has its CatchHandler @ 001eade6 */ std::runtime_error::runtime_error(prVar4,local_60); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00299ff0,PTR__runtime_error_00299cf0); } GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv ((GKV<GGUFMeta::ArrayInfo> *)local_40,*(gguf_context **)(this + 200),uVar2); if (local_40[0] != 5) { if (local_40[0] != 6) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ead50 to 001ead62 has its CatchHandler @ 001eade4 */ format_abi_cxx11_((char *)local_60,"%s is not a float32, int32 array",*(int8 *)param_1); /* try { // try from 001ead66 to 001ead8a has its CatchHandler @ 001eade2 */ std::runtime_error::runtime_error(prVar4,local_60); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00299ff0,PTR__runtime_error_00299cf0); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp" ,0x14d,"GGML_ASSERT(%s) failed","(std::is_same<T, float>::value)"); } uVar1 = CONCAT44(uStack_34,local_38); if (uVar1 < 5) { if (uVar1 != 0) { memmove(param_2,local_30,uVar1 << 2); } return true; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ead9f to 001eadb5 has its CatchHandler @ 001eade0 */ format_abi_cxx11_((char *)local_60,"array length %u for key %s exceeds max %u",(ulong)local_38, *(int8 *)param_1,4); /* try { // try from 001eadb9 to 001eaddd has its CatchHandler @ 001eadde */ std::runtime_error::runtime_error(prVar4,local_60); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00299ff0,PTR__runtime_error_00299cf0); }
25,774
bool llama_model_loader::get_arr<int, 4ul>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::array<int, 4ul>&, bool)
monkey531[P]llama/src/llama-model-loader.cpp
bool llama_model_loader::get_arr(const std::string & key, std::array<T, N_MAX> & result, bool required) { const int kid = gguf_find_key(meta.get(), key.c_str()); if (kid < 0 || gguf_get_kv_type(meta.get(), kid) != GGUF_TYPE_ARRAY) { if (required) { throw std::runtime_error(format("array key not found in model: %s", key.c_str())); } return false; } struct GGUFMeta::ArrayInfo arr_info = GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(meta.get(), kid); switch (arr_info.gt) { case GGUF_TYPE_FLOAT32: GGML_ASSERT((std::is_same<T, float>::value)); break; case GGUF_TYPE_INT32: GGML_ASSERT( (std::is_same<T, int32_t>::value) || (std::is_same<T, uint32_t>::value)); break; default: throw std::runtime_error(format("%s is not a float32, int32 array", key.c_str())); } if (arr_info.length > N_MAX) { throw std::runtime_error(format("array length %u for key %s exceeds max %u", (uint32_t) arr_info.length, key.c_str(), (uint32_t) N_MAX)); } std::copy((const T*)arr_info.data, (const T *)arr_info.data + arr_info.length, result.begin()); return true; }
O3
cpp
bool llama_model_loader::get_arr<int, 4ul>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::array<int, 4ul>&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movl %ecx, %ebp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0xc8(%rdi), %rdi movq (%rsi), %rsi callq 0x69b10 movq %rax, %r12 testl %r12d, %r12d js 0xb463f movq 0xc8(%r15), %rdi movl %r12d, %esi andl $0x7fffffff, %esi # imm = 0x7FFFFFFF callq 0x6bee0 cmpl $0x9, %eax jne 0xb463f movq 0xc8(%r15), %rsi leaq 0x28(%rsp), %r15 movq %r15, %rdi movl %r12d, %edx callq 0x66a40 movl (%r15), %eax cmpl $0x5, %eax jne 0xb46a3 movq 0x30(%rsp), %rdx cmpq $0x201, %rdx # imm = 0x201 jae 0xb4716 testq %rdx, %rdx je 0xb463b movq 0x38(%rsp), %rsi shlq $0x2, %rdx movq %rbx, %rdi callq 0x6aa70 movb $0x1, %al jmp 0xb4646 testb %bpl, %bpl jne 0xb4653 xorl %eax, %eax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x65cb0 movq %rax, %rbx movq (%r14), %rdx leaq 0x63543(%rip), %rsi # 0x117bad leaq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x6b940 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x6aa30 xorl %ebp, %ebp movq 0xa8961(%rip), %rsi # 0x15cff0 movq 0xa865a(%rip), %rdx # 0x15ccf0 movq %rbx, %rdi callq 0x6b270 jmp 0xb476b cmpl $0x6, %eax jne 0xb46c9 leaq 0x62d34(%rip), %rdi # 0x1173e3 leaq 0x5bd0e(%rip), %rdx # 0x1103c4 leaq 0x63511(%rip), %rcx # 0x117bce movl $0x14d, %esi # imm = 0x14D xorl %eax, %eax callq 0x6af70 movl $0x10, %edi callq 0x65cb0 movq %rax, %rbx movq (%r14), %rdx leaq 0x6350e(%rip), %rsi # 0x117bee leaq 0x8(%rsp), %rdi xorl %eax, %eax callq 0x6b940 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x6aa30 xorl %ebp, %ebp movq 0xa88eb(%rip), %rsi # 0x15cff0 movq 0xa85e4(%rip), %rdx # 0x15ccf0 movq %rbx, %rdi callq 0x6b270 jmp 0xb476b movl $0x10, %edi callq 0x65cb0 movq %rax, %rbx movl 0x30(%rsp), %edx movq (%r14), %rcx leaq 0x634de(%rip), %rsi # 0x117c0f leaq 0x8(%rsp), %rdi movl $0x200, %r8d # imm = 0x200 xorl %eax, %eax callq 0x6b940 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x6aa30 xorl %ebp, %ebp movq 0xa8894(%rip), %rsi # 0x15cff0 movq 0xa858d(%rip), %rdx # 0x15ccf0 movq %rbx, %rdi callq 0x6b270 jmp 0xb4773 jmp 0xb4798 jmp 0xb4773 jmp 0xb4798 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb4791 movq 0x18(%rsp), %rsi incq %rsi callq 0x681a0 testb %bpl, %bpl jne 0xb479b jmp 0xb47a3 movq %rax, %r14 movq %rbx, %rdi callq 0x66d40 movq %r14, %rdi callq 0x6b5d0 nop
_ZN18llama_model_loader7get_arrIjLm512EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt5arrayIT_XT0_EEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov ebp, ecx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, [rdi+0C8h] mov rsi, [rsi] call _gguf_find_key mov r12, rax test r12d, r12d js short loc_B463F mov rdi, [r15+0C8h] mov esi, r12d and esi, 7FFFFFFFh call _gguf_get_kv_type cmp eax, 9 jnz short loc_B463F mov rsi, [r15+0C8h] lea r15, [rsp+68h+var_40] mov rdi, r15 mov edx, r12d call __ZN8GGUFMeta3GKVINS_9ArrayInfoEE6get_kvEPK12gguf_contexti; GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(gguf_context const*,int) mov eax, [r15] cmp eax, 5 jnz loc_B46A3 mov rdx, [rsp+68h+var_38] cmp rdx, 201h jnb loc_B4716 test rdx, rdx jz short loc_B463B mov rsi, [rsp+68h+var_30] shl rdx, 2 mov rdi, rbx call _memmove loc_B463B: mov al, 1 jmp short loc_B4646 loc_B463F: test bpl, bpl jnz short loc_B4653 xor eax, eax loc_B4646: add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B4653: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aArrayKeyNotFou; "array key not found in model: %s" lea rdi, [rsp+68h+var_60] xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+68h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_B476B loc_B46A3: cmp eax, 6 jnz short loc_B46C9 lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsSameTFloa; "(std::is_same<T, float>::value)" mov esi, 14Dh xor eax, eax call _ggml_abort loc_B46C9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdx, [r14] lea rsi, aSIsNotAFloat32; "%s is not a float32, int32 array" lea rdi, [rsp+68h+var_60] xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+68h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B476B loc_B4716: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov edx, dword ptr [rsp+68h+var_38] mov rcx, [r14] lea rsi, aArrayLengthUFo; "array length %u for key %s exceeds max "... lea rdi, [rsp+68h+var_60] mov r8d, 200h xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+68h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B476B: jmp short loc_B4773 jmp short loc_B4798 jmp short loc_B4773 jmp short loc_B4798 loc_B4773: mov r14, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B4791 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B4791: test bpl, bpl jnz short loc_B479B jmp short loc_B47A3 loc_B4798: mov r14, rax loc_B479B: mov rdi, rbx; void * call ___cxa_free_exception loc_B47A3: mov rdi, r14 call __Unwind_Resume
char llama_model_loader::get_arr<unsigned int,512ul>(long long a1, _QWORD *a2, long long a3, char a4) { int key; // eax unsigned int v7; // r12d void *v9; // rbx int v10; // ecx int v11; // r8d int v12; // r9d void *exception; // rbx int v14; // ecx int v15; // r8d int v16; // r9d void *v17; // rbx int v18; // r9d _BYTE v19[16]; // [rsp+8h] [rbp-60h] BYREF int v20; // [rsp+28h] [rbp-40h] BYREF unsigned long long v21; // [rsp+30h] [rbp-38h] long long v22; // [rsp+38h] [rbp-30h] key = gguf_find_key(*(_QWORD *)(a1 + 200), *a2); v7 = key; if ( key >= 0 && (unsigned int)gguf_get_kv_type(*(_QWORD *)(a1 + 200), key & 0x7FFFFFFF) == 9 ) { GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv(&v20, *(_QWORD *)(a1 + 200), v7); if ( v20 != 5 ) { if ( v20 == 6 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp", 333LL, "GGML_ASSERT(%s) failed", "(std::is_same<T, float>::value)"); exception = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]((unsigned int)v19, (unsigned int)"%s is not a float32, int32 array", *a2, v14, v15, v16); std::runtime_error::runtime_error(exception, v19); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v21 >= 0x201 ) { v17 = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]( (unsigned int)v19, (unsigned int)"array length %u for key %s exceeds max %u", v21, *a2, 512, v18); std::runtime_error::runtime_error(v17, v19); __cxa_throw( v17, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v21 ) memmove(a3, v22, 4 * v21); return 1; } else { if ( a4 ) { v9 = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]((unsigned int)v19, (unsigned int)"array key not found in model: %s", *a2, v10, v11, v12); std::runtime_error::runtime_error(v9, v19); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return 0; } }
get_arr<unsigned_int,512ul>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV EBP,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,qword ptr [RDI + 0xc8] MOV RSI,qword ptr [RSI] CALL 0x00169b10 MOV R12,RAX TEST R12D,R12D JS 0x001b463f MOV RDI,qword ptr [R15 + 0xc8] MOV ESI,R12D AND ESI,0x7fffffff CALL 0x0016bee0 CMP EAX,0x9 JNZ 0x001b463f MOV RSI,qword ptr [R15 + 0xc8] LEA R15,[RSP + 0x28] MOV RDI,R15 MOV EDX,R12D CALL 0x00166a40 MOV EAX,dword ptr [R15] CMP EAX,0x5 JNZ 0x001b46a3 MOV RDX,qword ptr [RSP + 0x30] CMP RDX,0x201 JNC 0x001b4716 TEST RDX,RDX JZ 0x001b463b MOV RSI,qword ptr [RSP + 0x38] SHL RDX,0x2 MOV RDI,RBX CALL 0x0016aa70 LAB_001b463b: MOV AL,0x1 JMP 0x001b4646 LAB_001b463f: TEST BPL,BPL JNZ 0x001b4653 XOR EAX,EAX LAB_001b4646: ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b4653: MOV EDI,0x10 CALL 0x00165cb0 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_001b4663: LEA RSI,[0x217bad] LEA RDI,[RSP + 0x8] XOR EAX,EAX CALL 0x0016b940 MOV BPL,0x1 LAB_001b4679: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0016aa30 XOR EBP,EBP MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,RBX CALL 0x0016b270 LAB_001b46a3: CMP EAX,0x6 JNZ 0x001b46c9 LEA RDI,[0x2173e3] LEA RDX,[0x2103c4] LEA RCX,[0x217bce] MOV ESI,0x14d XOR EAX,EAX CALL 0x0016af70 LAB_001b46c9: MOV EDI,0x10 CALL 0x00165cb0 MOV RBX,RAX MOV RDX,qword ptr [R14] LAB_001b46d9: LEA RSI,[0x217bee] LEA RDI,[RSP + 0x8] XOR EAX,EAX CALL 0x0016b940 MOV BPL,0x1 LAB_001b46ef: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0016aa30 XOR EBP,EBP MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,RBX CALL 0x0016b270 LAB_001b4716: MOV EDI,0x10 CALL 0x00165cb0 MOV RBX,RAX MOV EDX,dword ptr [RSP + 0x30] MOV RCX,qword ptr [R14] LAB_001b472a: LEA RSI,[0x217c0f] LEA RDI,[RSP + 0x8] MOV R8D,0x200 XOR EAX,EAX CALL 0x0016b940 MOV BPL,0x1 LAB_001b4746: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0016aa30 XOR EBP,EBP MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,RBX CALL 0x0016b270
/* bool llama_model_loader::get_arr<unsigned int, 512ul>(std::__cxx11::string const&, std::array<unsigned int, 512ul>&, bool) */ bool __thiscall llama_model_loader::get_arr<unsigned_int,512ul> (llama_model_loader *this,string *param_1,array *param_2,bool param_3) { ulong uVar1; uint uVar2; int iVar3; runtime_error *prVar4; string local_60 [32]; int local_40 [2]; uint local_38; int4 uStack_34; void *local_30; uVar2 = gguf_find_key(*(int8 *)(this + 200),*(int8 *)param_1); if (((int)uVar2 < 0) || (iVar3 = gguf_get_kv_type(*(int8 *)(this + 200),uVar2 & 0x7fffffff), iVar3 != 9)) { if (!param_3) { return false; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b4663 to 001b4675 has its CatchHandler @ 001b4798 */ format_abi_cxx11_((char *)local_60,"array key not found in model: %s",*(int8 *)param_1); /* try { // try from 001b4679 to 001b469d has its CatchHandler @ 001b4773 */ std::runtime_error::runtime_error(prVar4,local_60); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); } GGUFMeta::GKV<GGUFMeta::ArrayInfo>::get_kv ((GKV<GGUFMeta::ArrayInfo> *)local_40,*(gguf_context **)(this + 200),uVar2); if (local_40[0] != 5) { if (local_40[0] != 6) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b46d9 to 001b46eb has its CatchHandler @ 001b4771 */ format_abi_cxx11_((char *)local_60,"%s is not a float32, int32 array",*(int8 *)param_1); /* try { // try from 001b46ef to 001b4713 has its CatchHandler @ 001b476f */ std::runtime_error::runtime_error(prVar4,local_60); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp" ,0x14d,"GGML_ASSERT(%s) failed","(std::is_same<T, float>::value)"); } uVar1 = CONCAT44(uStack_34,local_38); if (uVar1 < 0x201) { if (uVar1 != 0) { memmove(param_2,local_30,uVar1 << 2); } return true; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b472a to 001b4742 has its CatchHandler @ 001b476d */ format_abi_cxx11_((char *)local_60,"array length %u for key %s exceeds max %u",(ulong)local_38, *(int8 *)param_1,0x200); /* try { // try from 001b4746 to 001b476a has its CatchHandler @ 001b476b */ std::runtime_error::runtime_error(prVar4,local_60); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); }
25,775
js_async_generator_await
bluesky950520[P]quickjs/quickjs.c
static int js_async_generator_await(JSContext *ctx, JSAsyncGeneratorData *s, JSValue value) { JSValue promise, resolving_funcs[2], resolving_funcs1[2]; int i, res; promise = js_promise_resolve(ctx, ctx->promise_ctor, 1, &value, 0); if (JS_IsException(promise)) goto fail; if (js_async_generator_resolve_function_create(ctx, JS_MKPTR(JS_TAG_OBJECT, s->generator), resolving_funcs, FALSE)) { JS_FreeValue(ctx, promise); goto fail; } /* Note: no need to create 'thrownawayCapability' as in the spec */ for(i = 0; i < 2; i++) resolving_funcs1[i] = JS_UNDEFINED; res = perform_promise_then(ctx, promise, resolving_funcs, resolving_funcs1); JS_FreeValue(ctx, promise); for(i = 0; i < 2; i++) JS_FreeValue(ctx, resolving_funcs[i]); if (res) goto fail; return 0; fail: return -1; }
O0
c
js_async_generator_await: subq $0xb8, %rsp movq %rdx, 0xa0(%rsp) movq %rcx, 0xa8(%rsp) movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq 0x98(%rsp), %rdi movq 0x98(%rsp), %rax movq 0x88(%rax), %rsi movq 0x90(%rax), %rdx movl $0x1, %ecx leaq 0xa0(%rsp), %r8 xorl %r9d, %r9d callq 0x98de0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x9d85d jmp 0x9d9aa movq 0x98(%rsp), %rdi movq 0x90(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq $-0x1, 0x20(%rsp) leaq 0x60(%rsp), %rcx movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx xorl %r8d, %r8d callq 0x9db00 cmpl $0x0, %eax je 0x9d8bc movq 0x98(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x29f80 jmp 0x9d9aa movl $0x0, 0x3c(%rsp) cmpl $0x2, 0x3c(%rsp) jge 0x9d90b movslq 0x3c(%rsp), %rcx leaq 0x40(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x8(%rsp) movq $0x3, 0x10(%rsp) movq 0x8(%rsp), %rcx movq %rcx, (%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x9d8c4 movq 0x98(%rsp), %rdi leaq 0x60(%rsp), %rcx leaq 0x40(%rsp), %r8 movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x7ad50 movl %eax, 0x38(%rsp) movq 0x98(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x29f80 movl $0x0, 0x3c(%rsp) cmpl $0x2, 0x3c(%rsp) jge 0x9d994 movq 0x98(%rsp), %rdi movslq 0x3c(%rsp), %rcx leaq 0x60(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x29f80 movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x9d95b cmpl $0x0, 0x38(%rsp) je 0x9d99d jmp 0x9d9aa movl $0x0, 0xb4(%rsp) jmp 0x9d9b5 movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF movl 0xb4(%rsp), %eax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_async_generator_await: sub rsp, 0B8h mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_10], rcx mov [rsp+0B8h+var_20], rdi mov [rsp+0B8h+var_28], rsi mov rdi, [rsp+0B8h+var_20] mov rax, [rsp+0B8h+var_20] mov rsi, [rax+88h] mov rdx, [rax+90h] mov ecx, 1 lea r8, [rsp+0B8h+var_18] xor r9d, r9d call js_promise_resolve mov [rsp+0B8h+var_90], rax mov [rsp+0B8h+var_88], rdx mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_38], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_30], rax mov rdi, [rsp+0B8h+var_38] mov rsi, [rsp+0B8h+var_30] call JS_IsException_1 cmp eax, 0 jz short loc_9D85D jmp loc_9D9AA loc_9D85D: mov rdi, [rsp+0B8h+var_20] mov rax, [rsp+0B8h+var_28] mov rax, [rax] mov [rsp+0B8h+var_A0], rax mov [rsp+0B8h+var_98], 0FFFFFFFFFFFFFFFFh lea rcx, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_A0] mov rdx, [rsp+0B8h+var_98] xor r8d, r8d call js_async_generator_resolve_function_create cmp eax, 0 jz short loc_9D8BC mov rdi, [rsp+0B8h+var_20] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_FreeValue jmp loc_9D9AA loc_9D8BC: mov [rsp+0B8h+var_7C], 0 loc_9D8C4: cmp [rsp+0B8h+var_7C], 2 jge short loc_9D90B movsxd rcx, [rsp+0B8h+var_7C] lea rax, [rsp+0B8h+var_78] shl rcx, 4 add rax, rcx mov dword ptr [rsp+0B8h+var_B0], 0 mov [rsp+0B8h+var_A8], 3 mov rcx, [rsp+0B8h+var_B0] mov [rax], rcx mov rcx, [rsp+0B8h+var_A8] mov [rax+8], rcx mov eax, [rsp+0B8h+var_7C] add eax, 1 mov [rsp+0B8h+var_7C], eax jmp short loc_9D8C4 loc_9D90B: mov rdi, [rsp+0B8h+var_20] lea rcx, [rsp+0B8h+var_58] lea r8, [rsp+0B8h+var_78] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call perform_promise_then mov [rsp+0B8h+var_80], eax mov rdi, [rsp+0B8h+var_20] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_FreeValue mov [rsp+0B8h+var_7C], 0 loc_9D95B: cmp [rsp+0B8h+var_7C], 2 jge short loc_9D994 mov rdi, [rsp+0B8h+var_20] movsxd rcx, [rsp+0B8h+var_7C] lea rax, [rsp+0B8h+var_58] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov eax, [rsp+0B8h+var_7C] add eax, 1 mov [rsp+0B8h+var_7C], eax jmp short loc_9D95B loc_9D994: cmp [rsp+0B8h+var_80], 0 jz short loc_9D99D jmp short loc_9D9AA loc_9D99D: mov [rsp+0B8h+var_4], 0 jmp short loc_9D9B5 loc_9D9AA: mov [rsp+0B8h+var_4], 0FFFFFFFFh loc_9D9B5: mov eax, [rsp+0B8h+var_4] add rsp, 0B8h retn
long long js_async_generator_await( long long a1, _QWORD *a2, long long a3, long long a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v12; // rdx _QWORD *v13; // rax long long v15; // [rsp+8h] [rbp-B0h] int v16; // [rsp+38h] [rbp-80h] int i; // [rsp+3Ch] [rbp-7Ch] int j; // [rsp+3Ch] [rbp-7Ch] _OWORD v19[2]; // [rsp+40h] [rbp-78h] BYREF _QWORD v20[4]; // [rsp+60h] [rbp-58h] BYREF long long v21; // [rsp+80h] [rbp-38h] long long v22; // [rsp+88h] [rbp-30h] _QWORD *v23; // [rsp+90h] [rbp-28h] long long v24; // [rsp+98h] [rbp-20h] long long v25[2]; // [rsp+A0h] [rbp-18h] BYREF v25[0] = a3; v25[1] = a4; v24 = a1; v23 = a2; v21 = js_promise_resolve( a1, *(_DWORD **)(a1 + 136), *(_QWORD *)(a1 + 144), 1, v25, 0, a5, a6, a7, a8, a9, a10, a11, a12); v22 = v12; if ( JS_IsException_1(v21, v12) ) return (unsigned int)-1; if ( (unsigned int)js_async_generator_resolve_function_create(v24, *v23, -1LL, v20, 0LL) ) { JS_FreeValue(v24, v21, v22); return (unsigned int)-1; } for ( i = 0; i < 2; ++i ) { v13 = &v19[i]; LODWORD(v15) = 0; *v13 = v15; v13[1] = 3LL; } v16 = perform_promise_then(v24, v21, v22, (long long)v20, (long long)v19); JS_FreeValue(v24, v21, v22); for ( j = 0; j < 2; ++j ) JS_FreeValue(v24, v20[2 * j], v20[2 * j + 1]); if ( v16 ) return (unsigned int)-1; return 0; }
js_async_generator_await: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0xa8],RCX MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI MOV RDI,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RAX + 0x88] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,0x1 LEA R8,[RSP + 0xa0] XOR R9D,R9D CALL 0x00198de0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x0019d85d JMP 0x0019d9aa LAB_0019d85d: MOV RDI,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],-0x1 LEA RCX,[RSP + 0x60] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] XOR R8D,R8D CALL 0x0019db00 CMP EAX,0x0 JZ 0x0019d8bc MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x00129f80 JMP 0x0019d9aa LAB_0019d8bc: MOV dword ptr [RSP + 0x3c],0x0 LAB_0019d8c4: CMP dword ptr [RSP + 0x3c],0x2 JGE 0x0019d90b MOVSXD RCX,dword ptr [RSP + 0x3c] LEA RAX,[RSP + 0x40] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x3 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x0019d8c4 LAB_0019d90b: MOV RDI,qword ptr [RSP + 0x98] LEA RCX,[RSP + 0x60] LEA R8,[RSP + 0x40] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x0017ad50 MOV dword ptr [RSP + 0x38],EAX MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x00129f80 MOV dword ptr [RSP + 0x3c],0x0 LAB_0019d95b: CMP dword ptr [RSP + 0x3c],0x2 JGE 0x0019d994 MOV RDI,qword ptr [RSP + 0x98] MOVSXD RCX,dword ptr [RSP + 0x3c] LEA RAX,[RSP + 0x60] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00129f80 MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x0019d95b LAB_0019d994: CMP dword ptr [RSP + 0x38],0x0 JZ 0x0019d99d JMP 0x0019d9aa LAB_0019d99d: MOV dword ptr [RSP + 0xb4],0x0 JMP 0x0019d9b5 LAB_0019d9aa: MOV dword ptr [RSP + 0xb4],0xffffffff LAB_0019d9b5: MOV EAX,dword ptr [RSP + 0xb4] ADD RSP,0xb8 RET
int4 js_async_generator_await(long param_1,int8 *param_2,int8 param_3,int8 param_4) { int iVar1; uint uStack_ac; int local_7c; long local_78 [4]; long local_58; int8 auStack_50 [3]; int1 local_38 [16]; int8 *local_28; long local_20; int8 local_18; int8 local_10; local_28 = param_2; local_20 = param_1; local_18 = param_3; local_10 = param_4; local_38 = js_promise_resolve(param_1,*(int8 *)(param_1 + 0x88), *(int8 *)(param_1 + 0x90),1,&local_18,0); iVar1 = JS_IsException(local_38._0_8_,local_38._8_8_); if (iVar1 == 0) { iVar1 = js_async_generator_resolve_function_create (local_20,*local_28,0xffffffffffffffff,local_78 + 4,0); if (iVar1 == 0) { for (local_7c = 0; local_7c < 2; local_7c = local_7c + 1) { local_78[(long)local_7c * 2] = (ulong)uStack_ac << 0x20; local_78[(long)local_7c * 2 + 1] = 3; } iVar1 = perform_promise_then(local_20,local_38._0_8_,local_38._8_8_,local_78 + 4,local_78); JS_FreeValue(local_20,local_38._0_8_,local_38._8_8_); for (local_7c = 0; local_7c < 2; local_7c = local_7c + 1) { JS_FreeValue(local_20,local_78[(long)local_7c * 2 + 4], *(int8 *)(local_38 + (long)local_7c * 0x10 + -0x18)); } if (iVar1 == 0) { return 0; } } else { JS_FreeValue(local_20,local_38._0_8_,local_38._8_8_); } } return 0xffffffff; }
25,776
minja::Value::set(minja::Value const&, minja::Value const&)
llama.cpp/common/minja/minja.hpp
void set(const Value& key, const Value& value) { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); (*object_)[key.primitive_] = value; }
O3
cpp
minja::Value::set(minja::Value const&, minja::Value const&): pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 movq 0x20(%rdi), %rdi testq %rdi, %rdi je 0xc002f cmpq $0x0, 0x10(%rsi) jne 0xc008c cmpq $0x0, 0x20(%rsi) jne 0xc008c cmpq $0x0, 0x30(%rsi) jne 0xc008c movq %rdx, %rbx addq $0x40, %rsi callq 0xc0168 movq %rax, %r14 movq 0x10(%rbx), %rax movq %rax, 0x10(%r14) leaq 0x18(%r14), %rdi leaq 0x18(%rbx), %rsi callq 0xbd9ea movq 0x20(%rbx), %rax movq %rax, 0x20(%r14) leaq 0x28(%r14), %rdi leaq 0x28(%rbx), %rsi callq 0xbd9ea movq 0x30(%rbx), %rax movq %rax, 0x30(%r14) leaq 0x38(%r14), %rdi leaq 0x38(%rbx), %rsi callq 0xbd9ea addq $0x40, %rbx leaq 0x20(%rsp), %rdi movq %rbx, %rsi callq 0x889c4 addq $0x40, %r14 leaq 0x20(%rsp), %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x868e2 movq %rbx, %rdi xorl %esi, %esi callq 0x84776 movq %rbx, %rdi callq 0x88e90 addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x21630 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb571c leaq 0x61702(%rip), %rsi # 0x121757 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaefbc movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x21450 xorl %ebp, %ebp movq 0xa4f45(%rip), %rsi # 0x164fc0 movq 0xa4ef6(%rip), %rdx # 0x164f78 movq %rbx, %rdi callq 0x21a50 jmp 0xc00e7 movl $0x10, %edi callq 0x21630 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb571c leaq 0x6161b(%rip), %rsi # 0x1216cd leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaefbc movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x21450 xorl %ebp, %ebp movq 0xa4ee8(%rip), %rsi # 0x164fc0 movq 0xa4e99(%rip), %rdx # 0x164f78 movq %rbx, %rdi callq 0x21a50 jmp 0xc00eb jmp 0xc012b movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0109 movq 0x30(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0124 movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 testb %bpl, %bpl jne 0xc0150 jmp 0xc0158 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0150 movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 jmp 0xc0150 jmp 0xc014d movq %rax, %r14 movq %rbx, %rdi callq 0x21ef0 movq %r14, %rdi callq 0x21af0 movq %rax, %rdi callq 0x27f2f
_ZN5minja5Value3setERKS0_S2_: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi mov rdi, [rdi+20h] test rdi, rdi jz loc_C002F cmp qword ptr [rsi+10h], 0 jnz loc_C008C cmp qword ptr [rsi+20h], 0 jnz loc_C008C cmp qword ptr [rsi+30h], 0 jnz loc_C008C mov rbx, rdx add rsi, 40h ; '@' call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov r14, rax mov rax, [rbx+10h] mov [r14+10h], rax lea rdi, [r14+18h] lea rsi, [rbx+18h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rax, [rbx+20h] mov [r14+20h], rax lea rdi, [r14+28h] lea rsi, [rbx+28h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rax, [rbx+30h] mov [r14+30h], rax lea rdi, [r14+38h] lea rsi, [rbx+38h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) add rbx, 40h ; '@' lea rdi, [rsp+58h+var_38] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) add r14, 40h ; '@' lea rbx, [rsp+58h+var_38] mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 40h pop rbx pop r14 pop rbp retn loc_C002F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_C00E7 loc_C008C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_C00E7: jmp short loc_C00EB jmp short loc_C012B loc_C00EB: mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0109 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C0109: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0124 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C0124: test bpl, bpl jnz short loc_C0150 jmp short loc_C0158 loc_C012B: mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0150 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C0150 jmp short $+2 loc_C014D: mov r14, rax loc_C0150: mov rdi, rbx; void * call ___cxa_free_exception loc_C0158: mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3) { long long v4; // rdi long long v6; // r14 void *exception; // rbx void *v9; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-38h] BYREF v4 = *((_QWORD *)this + 4); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>(v11, (long long)"Value is not an object: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>(v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[]( v4, (char *)a2 + 64); *(_QWORD *)(v6 + 16) = *((_QWORD *)a3 + 2); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 24), (volatile signed __int32 **)a3 + 3); *(_QWORD *)(v6 + 32) = *((_QWORD *)a3 + 4); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 40), (volatile signed __int32 **)a3 + 5); *(_QWORD *)(v6 + 48) = *((_QWORD *)a3 + 6); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 56), (volatile signed __int32 **)a3 + 7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)v11, (unsigned __int8 *)a3 + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v6 + 64, (long long)v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v11); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v11); }
set: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI MOV RDI,qword ptr [RDI + 0x20] TEST RDI,RDI JZ 0x001c002f CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001c008c CMP qword ptr [RSI + 0x20],0x0 JNZ 0x001c008c CMP qword ptr [RSI + 0x30],0x0 JNZ 0x001c008c MOV RBX,RDX ADD RSI,0x40 CALL 0x001c0168 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [R14 + 0x10],RAX LEA RDI,[R14 + 0x18] LEA RSI,[RBX + 0x18] CALL 0x001bd9ea MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [R14 + 0x20],RAX LEA RDI,[R14 + 0x28] LEA RSI,[RBX + 0x28] CALL 0x001bd9ea MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x30],RAX LEA RDI,[R14 + 0x38] LEA RSI,[RBX + 0x38] CALL 0x001bd9ea ADD RBX,0x40 LAB_001bfff3: LEA RDI,[RSP + 0x20] MOV RSI,RBX CALL 0x001889c4 LAB_001c0000: ADD R14,0x40 LEA RBX,[RSP + 0x20] MOV RDI,R14 MOV RSI,RBX CALL 0x001868e2 MOV RDI,RBX XOR ESI,ESI CALL 0x00184776 MOV RDI,RBX CALL 0x00188e90 ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001c002f: MOV EDI,0x10 CALL 0x00121630 MOV RBX,RAX LAB_001c003c: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b571c LAB_001c004e: LEA RSI,[0x221757] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001aefbc MOV BPL,0x1 LAB_001c0065: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00121450 XOR EBP,EBP MOV RSI,qword ptr [0x00264fc0] MOV RDX,qword ptr [0x00264f78] MOV RDI,RBX CALL 0x00121a50 LAB_001c008c: MOV EDI,0x10 CALL 0x00121630 MOV RBX,RAX LAB_001c0099: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b571c LAB_001c00ab: LEA RSI,[0x2216cd] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001aefbc MOV BPL,0x1 LAB_001c00c2: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00121450 XOR EBP,EBP MOV RSI,qword ptr [0x00264fc0] MOV RDX,qword ptr [0x00264f78] MOV RDI,RBX CALL 0x00121a50
/* minja::Value::set(minja::Value const&, minja::Value const&) */ void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2) { long lVar1; runtime_error *prVar2; int1 auStack_58 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_38 [32]; if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20) == (ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)0x0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c003c to 001c004d has its CatchHandler @ 001c014d */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001c004e to 001c0061 has its CatchHandler @ 001c012b */ std::operator+((char *)local_38,(string *)"Value is not an object: "); /* try { // try from 001c0065 to 001c0089 has its CatchHandler @ 001c00eb */ std::runtime_error::runtime_error(prVar2,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78); } if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { lVar1 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::operator[](*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20),(basic_json *)(param_1 + 0x40)); *(int8 *)(lVar1 + 0x10) = *(int8 *)(param_2 + 0x10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x18), (__shared_count *)(param_2 + 0x18)); *(int8 *)(lVar1 + 0x20) = *(int8 *)(param_2 + 0x20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x28), (__shared_count *)(param_2 + 0x28)); *(int8 *)(lVar1 + 0x30) = *(int8 *)(param_2 + 0x30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x38), (__shared_count *)(param_2 + 0x38)); /* try { // try from 001bfff3 to 001bffff has its CatchHandler @ 001c0160 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_38,(basic_json *)(param_2 + 0x40)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(lVar1 + 0x40),(data *)local_38); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_38); return; } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c0099 to 001c00aa has its CatchHandler @ 001c014b */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001c00ab to 001c00be has its CatchHandler @ 001c00e9 */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 001c00c2 to 001c00e6 has its CatchHandler @ 001c00e7 */ std::runtime_error::runtime_error(prVar2,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78); }
25,777
write_full_pages
eloqsql/storage/maria/ma_blockrec.c
static my_bool write_full_pages(MARIA_HA *info, LSN lsn, MARIA_BITMAP_BLOCK *block, uchar *data, ulong length) { pgcache_page_no_t page; MARIA_SHARE *share= info->s; uint block_size= share->block_size; uint data_size= FULL_PAGE_SIZE(share); uchar *buff= info->keyread_buff; uint page_count, sub_blocks; my_off_t position, max_position; DBUG_ENTER("write_full_pages"); DBUG_PRINT("enter", ("length: %lu page: %lu page_count: %lu", (ulong) length, (ulong) block->page, (ulong) block->page_count)); DBUG_ASSERT((block->page_count & TAIL_BIT) == 0); info->keyread_buff_used= 1; page= block->page; page_count= block->page_count; sub_blocks= block->sub_blocks; max_position= (my_off_t) (page + page_count) * block_size; /* Increase data file size, if extended */ for (; length; data+= data_size) { uint copy_length; if (!page_count--) { if (!--sub_blocks) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); } block++; page= block->page; page_count= block->page_count - 1; DBUG_PRINT("info", ("page: %lu page_count: %lu", (ulong) block->page, (ulong) block->page_count)); position= (page + page_count + 1) * block_size; set_if_bigger(max_position, position); } lsn_store(buff, lsn); buff[PAGE_TYPE_OFFSET]= (uchar) BLOB_PAGE; bzero(buff + LSN_SIZE + PAGE_TYPE_SIZE, FULL_PAGE_HEADER_SIZE(share) - (LSN_SIZE + PAGE_TYPE_SIZE)); copy_length= MY_MIN(data_size, length); memcpy(buff + FULL_PAGE_HEADER_SIZE(share), data, copy_length); length-= copy_length; /* Zero out old information from the block. This removes possible sensitive information from the block and also makes the file easier to compress and easier to compare after recovery. */ if (copy_length != data_size) bzero(buff + block_size - PAGE_SUFFIX_SIZE - (data_size - copy_length), (data_size - copy_length) + PAGE_SUFFIX_SIZE); if (pagecache_write(share->pagecache, &info->dfile, page, 0, buff, share->page_type, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, info->trn->rec_lsn)) DBUG_RETURN(1); page++; DBUG_ASSERT(block->used & BLOCKUSED_USED); } if (share->state.state.data_file_length < max_position) _ma_set_share_data_file_length(share, max_position); DBUG_RETURN(0); }
O0
c
write_full_pages: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x44(%rbp) movq -0x40(%rbp), %rax movl 0x7bc(%rax), %eax movq -0x40(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0x8, %ecx subl %ecx, %eax subl $0x4, %eax movl %eax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x380(%rax), %rax movq %rax, -0x50(%rbp) jmp 0x826a7 jmp 0x826a9 jmp 0x826ab movq -0x10(%rbp), %rax movb $0x1, 0x685(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x54(%rbp) movq -0x20(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x58(%rbp) movq -0x38(%rbp), %rax movl -0x54(%rbp), %ecx addq %rcx, %rax movl -0x44(%rbp), %ecx imulq %rcx, %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x30(%rbp) je 0x82956 movl -0x54(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x54(%rbp) cmpl $0x0, %eax jne 0x8277f movl -0x58(%rbp), %eax addl $-0x1, %eax movl %eax, -0x58(%rbp) cmpl $0x0, %eax jne 0x8272a movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x30500 movb $0x1, -0x1(%rbp) jmp 0x82977 movq -0x20(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movl 0x8(%rax), %eax subl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0x82750 movq -0x38(%rbp), %rax movl -0x54(%rbp), %ecx addq %rcx, %rax addq $0x1, %rax movl -0x44(%rbp), %ecx imulq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x68(%rbp), %rax cmpq -0x60(%rbp), %rax jae 0x8277b movq -0x60(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0x8277d jmp 0x8277f jmp 0x82781 jmp 0x82783 movq -0x18(%rbp), %rax sarq $0x20, %rax movb %al, %cl movq -0x50(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x50(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x50(%rbp), %rax movb %cl, 0x2(%rax) jmp 0x827bd movq -0x50(%rbp), %rax addq $0x3, %rax movq %rax, -0x78(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x18(%rbp), %rax movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, (%rax) jmp 0x827e1 movq -0x50(%rbp), %rax movb $0x3, 0x7(%rax) movq -0x50(%rbp), %rdi addq $0x7, %rdi addq $0x1, %rdi movq -0x40(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax subl $0x8, %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movl -0x48(%rbp), %eax cmpq -0x30(%rbp), %rax jae 0x82822 movl -0x48(%rbp), %eax movq %rax, -0x80(%rbp) jmp 0x8282a movq -0x30(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movl %eax, -0x6c(%rbp) movq -0x50(%rbp), %rdi movq -0x40(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax movl %eax, %eax addq %rax, %rdi movq -0x28(%rbp), %rsi movl -0x6c(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movl -0x6c(%rbp), %eax movl %eax, %ecx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x6c(%rbp), %eax cmpl -0x48(%rbp), %eax je 0x828a1 movq -0x50(%rbp), %rdi movl -0x44(%rbp), %eax addq %rax, %rdi addq $-0x4, %rdi movl -0x48(%rbp), %eax subl -0x6c(%rbp), %eax movl %eax, %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x48(%rbp), %eax subl -0x6c(%rbp), %eax addl $0x4, %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movq -0x40(%rbp), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x38(%rbp), %rdx movq -0x50(%rbp), %r8 movq -0x40(%rbp), %rax movl 0x7d4(%rax), %r9d movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x90(%rax), %r10 movq -0x40(%rbp), %rax movq 0x600(%rax), %rax movl 0x80(%rax), %eax xorl %ecx, %ecx xorl %r11d, %r11d movl $0x0, (%rsp) movl $0x1, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq %r10, 0x20(%rsp) movl $0x0, 0x28(%rsp) movl %eax, 0x30(%rsp) callq 0x5bda0 cmpb $0x0, %al je 0x82931 jmp 0x8292b movb $0x1, -0x1(%rbp) jmp 0x82977 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x8293f jmp 0x82941 movl -0x48(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x826ea movq -0x40(%rbp), %rax movq 0x40(%rax), %rax cmpq -0x68(%rbp), %rax jae 0x82971 movq -0x40(%rbp), %rdi movq -0x68(%rbp), %rsi callq 0x33f50 jmp 0x82973 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
write_full_pages: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov eax, [rax+7BCh] mov [rbp+var_44], eax mov rax, [rbp+var_40] mov eax, [rax+7BCh] mov rcx, [rbp+var_40] mov ecx, [rcx+0C18h] add ecx, 8 sub eax, ecx sub eax, 4 mov [rbp+var_48], eax mov rax, [rbp+var_10] mov rax, [rax+380h] mov [rbp+var_50], rax jmp short $+2 loc_826A7: jmp short $+2 loc_826A9: jmp short $+2 loc_826AB: mov rax, [rbp+var_10] mov byte ptr [rax+685h], 1 mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov eax, [rax+8] mov [rbp+var_54], eax mov rax, [rbp+var_20] mov eax, [rax+10h] mov [rbp+var_58], eax mov rax, [rbp+var_38] mov ecx, [rbp+var_54] add rax, rcx mov ecx, [rbp+var_44] imul rax, rcx mov [rbp+var_68], rax loc_826EA: cmp [rbp+var_30], 0 jz loc_82956 mov eax, [rbp+var_54] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_54], ecx cmp eax, 0 jnz short loc_8277F mov eax, [rbp+var_58] add eax, 0FFFFFFFFh mov [rbp+var_58], eax cmp eax, 0 jnz short loc_8272A mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_1], 1 jmp loc_82977 loc_8272A: mov rax, [rbp+var_20] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov eax, [rax+8] sub eax, 1 mov [rbp+var_54], eax jmp short $+2 loc_82750: mov rax, [rbp+var_38] mov ecx, [rbp+var_54] add rax, rcx add rax, 1 mov ecx, [rbp+var_44] imul rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_68] cmp rax, [rbp+var_60] jnb short loc_8277B mov rax, [rbp+var_60] mov [rbp+var_68], rax loc_8277B: jmp short $+2 loc_8277D: jmp short $+2 loc_8277F: jmp short $+2 loc_82781: jmp short $+2 loc_82783: mov rax, [rbp+var_18] sar rax, 20h mov cl, al mov rax, [rbp+var_50] mov [rax], cl mov rax, [rbp+var_18] sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_50] mov [rax+1], cl mov rax, [rbp+var_18] sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_50] mov [rax+2], cl jmp short $+2 loc_827BD: mov rax, [rbp+var_50] add rax, 3 mov [rbp+var_78], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_18] mov ecx, eax mov rax, [rbp+var_78] mov [rax], ecx jmp short $+2 loc_827E1: mov rax, [rbp+var_50] mov byte ptr [rax+7], 3 mov rdi, [rbp+var_50] add rdi, 7 add rdi, 1 mov rax, [rbp+var_40] mov eax, [rax+0C18h] add eax, 8 sub eax, 8 mov eax, eax mov edx, eax xor esi, esi call _memset mov eax, [rbp+var_48] cmp rax, [rbp+var_30] jnb short loc_82822 mov eax, [rbp+var_48] mov [rbp+var_80], rax jmp short loc_8282A loc_82822: mov rax, [rbp+var_30] mov [rbp+var_80], rax loc_8282A: mov rax, [rbp+var_80] mov [rbp+var_6C], eax mov rdi, [rbp+var_50] mov rax, [rbp+var_40] mov eax, [rax+0C18h] add eax, 8 mov eax, eax add rdi, rax mov rsi, [rbp+var_28] mov eax, [rbp+var_6C] mov edx, eax call _memcpy mov eax, [rbp+var_6C] mov ecx, eax mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax mov eax, [rbp+var_6C] cmp eax, [rbp+var_48] jz short loc_828A1 mov rdi, [rbp+var_50] mov eax, [rbp+var_44] add rdi, rax add rdi, 0FFFFFFFFFFFFFFFCh mov eax, [rbp+var_48] sub eax, [rbp+var_6C] mov eax, eax mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_48] sub eax, [rbp+var_6C] add eax, 4 mov eax, eax mov edx, eax xor esi, esi call _memset loc_828A1: mov rax, [rbp+var_40] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rdx, [rbp+var_38] mov r8, [rbp+var_50] mov rax, [rbp+var_40] mov r9d, [rax+7D4h] mov rax, [rbp+var_10] mov rax, [rax+8] mov r10, [rax+90h] mov rax, [rbp+var_40] mov rax, [rax+600h] mov eax, [rax+80h] xor ecx, ecx xor r11d, r11d mov [rsp+0C0h+var_C0], 0 mov [rsp+0C0h+var_B8], 1 mov [rsp+0C0h+var_B0], 0 mov [rsp+0C0h+var_A8], 0 mov [rsp+0C0h+var_A0], r10 mov [rsp+0C0h+var_98], 0 mov [rsp+0C0h+var_90], eax call pagecache_write_part cmp al, 0 jz short loc_82931 jmp short $+2 loc_8292B: mov [rbp+var_1], 1 jmp short loc_82977 loc_82931: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short $+2 loc_8293F: jmp short $+2 loc_82941: mov ecx, [rbp+var_48] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_826EA loc_82956: mov rax, [rbp+var_40] mov rax, [rax+40h] cmp rax, [rbp+var_68] jnb short loc_82971 mov rdi, [rbp+var_40] mov rsi, [rbp+var_68] call _ma_set_share_data_file_length loc_82971: jmp short $+2 loc_82973: mov [rbp+var_1], 0 loc_82977: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char write_full_pages(long long a1, long long a2, long long a3, long long a4, long long a5, int a6) { unsigned int v6; // eax long long v7; // rcx unsigned int v9; // [rsp+40h] [rbp-80h] unsigned long long v10; // [rsp+58h] [rbp-68h] int v11; // [rsp+68h] [rbp-58h] unsigned int v12; // [rsp+6Ch] [rbp-54h] long long v13; // [rsp+70h] [rbp-50h] unsigned int v14; // [rsp+78h] [rbp-48h] unsigned int v15; // [rsp+7Ch] [rbp-44h] long long v16; // [rsp+80h] [rbp-40h] long long v17; // [rsp+88h] [rbp-38h] unsigned long long v18; // [rsp+90h] [rbp-30h] long long v20; // [rsp+A0h] [rbp-20h] v20 = a3; v18 = a5; v16 = *(_QWORD *)a1; v15 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL); v14 = *(_DWORD *)(v16 + 1980) - (*(_DWORD *)(v16 + 3096) + 8) - 4; v13 = *(_QWORD *)(a1 + 896); *(_BYTE *)(a1 + 1669) = 1; v17 = *(_QWORD *)a3; v12 = *(_DWORD *)(a3 + 8); v11 = *(_DWORD *)(a3 + 16); v10 = v15 * (v12 + *(_QWORD *)a3); while ( v18 ) { v6 = v12; v7 = --v12; if ( !v6 ) { if ( !--v11 ) { ma_set_fatal_error((_DWORD *)a1, 127, a3, v7, a5, a6); return 1; } v20 += 24LL; v17 = *(_QWORD *)v20; v12 = *(_DWORD *)(v20 + 8) - 1; if ( v10 < v15 * ((unsigned long long)v12 + *(_QWORD *)v20 + 1) ) v10 = v15 * (v12 + *(_QWORD *)v20 + 1LL); } *(_WORD *)v13 = WORD2(a2); *(_BYTE *)(v13 + 2) = BYTE6(a2); *(_DWORD *)(v13 + 3) = a2; *(_BYTE *)(v13 + 7) = 3; memset(v13 + 8, 0LL, *(unsigned int *)(v16 + 3096)); if ( v14 >= v18 ) v9 = v18; else v9 = v14; memcpy((unsigned int)(*(_DWORD *)(v16 + 3096) + 8) + v13, a4, v9); v18 -= v9; if ( v9 != v14 ) memset(v15 + v13 - 4 - (v14 - v9), 0LL, v14 - v9 + 4); if ( pagecache_write_part( *(_QWORD **)(v16 + 1536), a1 + 1136, v17, 0, v13, *(_DWORD *)(v16 + 2004), 0, 1u, 0, 0LL, *(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL), 0, *(_DWORD *)(*(_QWORD *)(v16 + 1536) + 128LL)) ) { return 1; } ++v17; a4 += v14; } if ( *(_QWORD *)(v16 + 64) < v10 ) ma_set_share_data_file_length(v16, v10); return 0; }
write_full_pages: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x7bc] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x8 SUB EAX,ECX SUB EAX,0x4 MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x380] MOV qword ptr [RBP + -0x50],RAX JMP 0x001826a7 LAB_001826a7: JMP 0x001826a9 LAB_001826a9: JMP 0x001826ab LAB_001826ab: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x685],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x58],EAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x54] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x44] IMUL RAX,RCX MOV qword ptr [RBP + -0x68],RAX LAB_001826ea: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00182956 MOV EAX,dword ptr [RBP + -0x54] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x54],ECX CMP EAX,0x0 JNZ 0x0018277f MOV EAX,dword ptr [RBP + -0x58] ADD EAX,-0x1 MOV dword ptr [RBP + -0x58],EAX CMP EAX,0x0 JNZ 0x0018272a MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x00130500 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00182977 LAB_0018272a: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] SUB EAX,0x1 MOV dword ptr [RBP + -0x54],EAX JMP 0x00182750 LAB_00182750: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x54] ADD RAX,RCX ADD RAX,0x1 MOV ECX,dword ptr [RBP + -0x44] IMUL RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x60] JNC 0x0018277b MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x68],RAX LAB_0018277b: JMP 0x0018277d LAB_0018277d: JMP 0x0018277f LAB_0018277f: JMP 0x00182781 LAB_00182781: JMP 0x00182783 LAB_00182783: MOV RAX,qword ptr [RBP + -0x18] SAR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SAR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SAR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX + 0x2],CL JMP 0x001827bd LAB_001827bd: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x3 MOV qword ptr [RBP + -0x78],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x18] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV dword ptr [RAX],ECX JMP 0x001827e1 LAB_001827e1: MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX + 0x7],0x3 MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x7 ADD RDI,0x1 MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 SUB EAX,0x8 MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV EAX,dword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00182822 MOV EAX,dword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x80],RAX JMP 0x0018282a LAB_00182822: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x80],RAX LAB_0018282a: MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0x6c],EAX MOV RDI,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x6c] MOV EDX,EAX CALL 0x0012a0b0 MOV EAX,dword ptr [RBP + -0x6c] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x6c] CMP EAX,dword ptr [RBP + -0x48] JZ 0x001828a1 MOV RDI,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RBP + -0x44] ADD RDI,RAX ADD RDI,-0x4 MOV EAX,dword ptr [RBP + -0x48] SUB EAX,dword ptr [RBP + -0x6c] MOV EAX,EAX MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x48] SUB EAX,dword ptr [RBP + -0x6c] ADD EAX,0x4 MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 LAB_001828a1: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RAX + 0x7d4] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV R10,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x600] MOV EAX,dword ptr [RAX + 0x80] XOR ECX,ECX XOR R11D,R11D MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],R10 MOV dword ptr [RSP + 0x28],0x0 MOV dword ptr [RSP + 0x30],EAX CALL 0x0015bda0 CMP AL,0x0 JZ 0x00182931 JMP 0x0018292b LAB_0018292b: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00182977 LAB_00182931: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0018293f LAB_0018293f: JMP 0x00182941 LAB_00182941: MOV ECX,dword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001826ea LAB_00182956: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x40] CMP RAX,qword ptr [RBP + -0x68] JNC 0x00182971 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x68] CALL 0x00133f50 LAB_00182971: JMP 0x00182973 LAB_00182973: MOV byte ptr [RBP + -0x1],0x0 LAB_00182977: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 write_full_pages(long *param_1,int8 param_2,long *param_3,void *param_4,ulong param_5) { uint uVar1; long lVar2; int1 *puVar3; char cVar4; uint uVar5; uint uVar6; long *plVar7; ulong uVar8; bool bVar9; ulong local_88; ulong local_70; int local_60; uint local_5c; long local_40; ulong local_38; void *local_30; long *local_28; lVar2 = *param_1; uVar1 = *(uint *)(lVar2 + 0x7bc); uVar5 = (*(int *)(lVar2 + 0x7bc) - (*(int *)(lVar2 + 0xc18) + 8)) - 4; puVar3 = (int1 *)param_1[0x70]; *(int1 *)((long)param_1 + 0x685) = 1; local_40 = *param_3; local_5c = *(uint *)(param_3 + 1); local_60 = (int)param_3[2]; local_70 = (local_40 + (ulong)local_5c) * (ulong)uVar1; local_38 = param_5; local_30 = param_4; local_28 = param_3; while( true ) { if (local_38 == 0) { if (*(ulong *)(lVar2 + 0x40) < local_70) { _ma_set_share_data_file_length(lVar2,local_70); } return 0; } bVar9 = local_5c == 0; local_5c = local_5c - 1; if (bVar9) { local_60 = local_60 + -1; if (local_60 == 0) { _ma_set_fatal_error(param_1,0x7f); return 1; } plVar7 = local_28 + 3; local_40 = *plVar7; local_5c = (int)local_28[4] - 1; uVar8 = (local_40 + (ulong)local_5c + 1) * (ulong)uVar1; local_28 = plVar7; if (local_70 < uVar8) { local_70 = uVar8; } } *puVar3 = (char)((ulong)param_2 >> 0x20); puVar3[1] = (char)((ulong)param_2 >> 0x28); puVar3[2] = (char)((ulong)param_2 >> 0x30); *(int *)(puVar3 + 3) = (int)param_2; puVar3[7] = 3; memset(puVar3 + 8,0,(ulong)*(uint *)(lVar2 + 0xc18)); if (uVar5 < local_38) { local_88 = (ulong)uVar5; } else { local_88 = local_38; } uVar6 = (uint)local_88; memcpy(puVar3 + (*(int *)(lVar2 + 0xc18) + 8),local_30,local_88 & 0xffffffff); local_38 = local_38 - (local_88 & 0xffffffff); if (uVar6 != uVar5) { memset(puVar3 + (((ulong)uVar1 - 4) - (ulong)(uVar5 - uVar6)),0,(ulong)((uVar5 - uVar6) + 4)); } cVar4 = pagecache_write_part (*(int8 *)(lVar2 + 0x600),param_1 + 0x8e,local_40,0,puVar3, *(int4 *)(lVar2 + 0x7d4),0,1,0,0,*(int8 *)(param_1[1] + 0x90),0, *(int4 *)(*(long *)(lVar2 + 0x600) + 0x80)); if (cVar4 != '\0') break; local_40 = local_40 + 1; local_30 = (void *)((long)local_30 + (ulong)uVar5); } return 1; }
25,778
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/./minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O3
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x226e5 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x425aa movq (%rbx), %rdi movq (%rdi), %rax movq %r14, %rsi movq %r12, %rdx callq *0x28(%rax) leaq 0x48(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x3d970 movq %rbx, %rdi callq 0x4a5c0 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x2269b callq 0x2f80e movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x226aa callq 0x2f80e movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x226b9 callq 0x2f80e movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x22807 movq 0xcd8d2(%rip), %rax # 0xeffa0 cmpb $0x0, (%rax) je 0x227f2 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x227fc movq %rbx, (%rsp) cmpq $0x0, 0x10(%r12) je 0x22816 movq %rdi, %r15 movq %r12, %rdi callq 0x5183c movq (%r15), %rsi movq 0x8(%r15), %rcx movq %rcx, %rdx subq %rsi, %rdx sarq $0x5, %rdx cmpq %rdx, %rax jne 0x22816 cmpq %rsi, %rcx je 0x22807 xorl %ebx, %ebx leaq 0x8(%rsp), %r13 xorl %ebp, %ebp movq (%rsp), %rax movq (%rax), %r14 addq %rbx, %rsi movq %r13, %rdi callq 0x425aa movq %r12, %rdi movq %rbp, %rsi callq 0x5199c movq (%r14), %rcx movq %r14, %rdi movq %r13, %rsi movq %rax, %rdx callq *0x28(%rcx) leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3d970 movq %r14, %rdi callq 0x4a5c0 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x2277e callq 0x2f80e movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x2278d callq 0x2f80e movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x2279c callq 0x2f80e movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x227d2 movq 0xcd7f3(%rip), %rax # 0xeffa0 cmpb $0x0, (%rax) je 0x227bd movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x227c7 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x227d2 movq (%rdi), %rax callq *0x18(%rax) incq %rbp movq (%r15), %rsi movq 0x8(%r15), %rax subq %rsi, %rax sarq $0x5, %rax addq $0x20, %rbx cmpq %rax, %rbp jb 0x2272c jmp 0x22807 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x22807 movq (%rdi), %rax callq *0x18(%rax) addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18360 movq %rax, %r14 leaq 0x98f87(%rip), %rsi # 0xbb7b1 movq %rax, %rdi callq 0x18270 movq 0xcd7b7(%rip), %rsi # 0xefff0 movq 0xcd740(%rip), %rdx # 0xeff80 movq %r14, %rdi callq 0x18b30 movq %rax, %rbx movq %r14, %rdi callq 0x18500 jmp 0x22864 jmp 0x22857 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x3d8e4 movq %rbx, %rdi callq 0x18b90
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, rdx mov rbx, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz loc_226E5 lea r14, [rsp+88h+var_80] mov rdi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rbx] mov rax, [rdi] mov rsi, r14 mov rdx, r12 call qword ptr [rax+28h] lea rbx, [rsp+88h+var_40] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_2269B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2269B: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_226AA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_226AA: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_226B9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_226B9: mov rdi, [rsp+88h+var_78] test rdi, rdi jz loc_22807 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_227F2 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp loc_227FC loc_226E5: mov [rsp+88h+var_88], rbx cmp qword ptr [r12+10h], 0 jz loc_22816 mov r15, rdi mov rdi, r12; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rsi, [r15] mov rcx, [r15+8] mov rdx, rcx sub rdx, rsi sar rdx, 5 cmp rax, rdx jnz loc_22816 cmp rcx, rsi jz loc_22807 xor ebx, ebx lea r13, [rsp+88h+var_80] xor ebp, ebp loc_2272C: mov rax, [rsp+88h+var_88] mov r14, [rax] add rsi, rbx mov rdi, r13 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r12; this mov rsi, rbp; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [r14] mov rdi, r14 mov rsi, r13 mov rdx, rax call qword ptr [rcx+28h] lea r14, [rsp+88h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+88h+var_48] test rdi, rdi jz short loc_2277E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2277E: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_2278D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2278D: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_2279C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2279C: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_227D2 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_227BD mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_227C7 loc_227BD: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_227C7: cmp eax, 1 jnz short loc_227D2 mov rax, [rdi] call qword ptr [rax+18h] loc_227D2: inc rbp mov rsi, [r15] mov rax, [r15+8] sub rax, rsi sar rax, 5 add rbx, 20h ; ' ' cmp rbp, rax jb loc_2272C jmp short loc_22807 loc_227F2: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_227FC: cmp eax, 1 jnz short loc_22807 mov rax, [rdi] call qword ptr [rax+18h] loc_22807: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_22816: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_22864 jmp short $+2 loc_22857: mov rbx, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_22864: mov rdi, rbx call __Unwind_Resume
unsigned long long minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { unsigned long long result; // rax long long v5; // rdi long long v7; // rsi long long v8; // rbx unsigned long long v9; // rbp long long v10; // r14 long long v11; // rax long long v12; // rdi signed __int32 v13; // eax std::runtime_error *exception; // r14 _BYTE v16[8]; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] long long v18; // [rsp+20h] [rbp-68h] long long v19; // [rsp+30h] [rbp-58h] long long v20; // [rsp+40h] [rbp-48h] _BYTE v21[64]; // [rsp+48h] [rbp-40h] BYREF if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v16, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v16, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v21, 0LL); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v18 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); v5 = v17; if ( v17 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v17 + 12); *(_DWORD *)(v17 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long))(*(_QWORD *)v5 + 24LL))(v5); } } else { if ( !*((_QWORD *)a3 + 2) || (result = minja::Value::size(a3), v7 = *a1, result != (long long)(a1[1] - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( a1[1] != v7 ) { v8 = 0LL; v9 = 0LL; do { v10 = *a2; minja::Value::Value(v16, v8 + v7); v11 = minja::Value::at(a3, v9); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v10 + 40LL))(v10, v16, v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v21, 0LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); v12 = v17; if ( v17 ) { if ( _libc_single_threaded ) { v13 = *(_DWORD *)(v17 + 12); *(_DWORD *)(v17 + 12) = v13 - 1; } else { v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( v13 == 1 ) (*(void ( **)(long long))(*(_QWORD *)v12 + 24LL))(v12); } ++v9; v7 = *a1; result = (long long)(a1[1] - *a1) >> 5; v8 += 32LL; } while ( v9 < result ); } } return result; }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,RDX MOV RBX,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x001226e5 LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001425aa MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] LAB_0012266d: MOV RSI,R14 MOV RDX,R12 CALL qword ptr [RAX + 0x28] LAB_00122676: LEA RBX,[RSP + 0x48] MOV RDI,RBX XOR ESI,ESI CALL 0x0013d970 MOV RDI,RBX CALL 0x0014a5c0 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0012269b CALL 0x0012f80e LAB_0012269b: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x001226aa CALL 0x0012f80e LAB_001226aa: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001226b9 CALL 0x0012f80e LAB_001226b9: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00122807 MOV RAX,qword ptr [0x001effa0] CMP byte ptr [RAX],0x0 JZ 0x001227f2 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001227fc LAB_001226e5: MOV qword ptr [RSP],RBX CMP qword ptr [R12 + 0x10],0x0 JZ 0x00122816 MOV R15,RDI MOV RDI,R12 CALL 0x0015183c MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RCX SUB RDX,RSI SAR RDX,0x5 CMP RAX,RDX JNZ 0x00122816 CMP RCX,RSI JZ 0x00122807 XOR EBX,EBX LEA R13,[RSP + 0x8] XOR EBP,EBP LAB_0012272c: MOV RAX,qword ptr [RSP] MOV R14,qword ptr [RAX] ADD RSI,RBX MOV RDI,R13 CALL 0x001425aa LAB_0012273e: MOV RDI,R12 MOV RSI,RBP CALL 0x0015199c MOV RCX,qword ptr [R14] MOV RDI,R14 MOV RSI,R13 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_00122758: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x0013d970 MOV RDI,R14 CALL 0x0014a5c0 MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0012277e CALL 0x0012f80e LAB_0012277e: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0012278d CALL 0x0012f80e LAB_0012278d: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0012279c CALL 0x0012f80e LAB_0012279c: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001227d2 MOV RAX,qword ptr [0x001effa0] CMP byte ptr [RAX],0x0 JZ 0x001227bd MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001227c7 LAB_001227bd: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001227c7: CMP EAX,0x1 JNZ 0x001227d2 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001227d2: INC RBP MOV RSI,qword ptr [R15] MOV RAX,qword ptr [R15 + 0x8] SUB RAX,RSI SAR RAX,0x5 ADD RBX,0x20 CMP RBP,RAX JC 0x0012272c JMP 0x00122807 LAB_001227f2: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001227fc: CMP EAX,0x1 JNZ 0x00122807 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00122807: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00122816: MOV EDI,0x10 CALL 0x00118360 MOV R14,RAX LAB_00122823: LEA RSI,[0x1bb7b1] MOV RDI,RAX CALL 0x00118270 LAB_00122832: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R14 CALL 0x00118b30
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { int *piVar1; long *plVar2; int iVar3; long lVar4; int8 uVar5; runtime_error *this; ulong uVar6; long lVar7; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 0012266d to 00122675 has its CatchHandler @ 00122855 */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } return; } if (*(long *)(param_3 + 0x10) != 0) { lVar4 = Value::size(param_3); lVar7 = *(long *)param_1; if (lVar4 == *(long *)(param_1 + 8) - lVar7 >> 5) { if (*(long *)(param_1 + 8) == lVar7) { return; } lVar4 = 0; uVar6 = 0; do { plVar2 = *(long **)param_2; Value::Value(local_80,(string *)(lVar7 + lVar4)); /* try { // try from 0012273e to 00122757 has its CatchHandler @ 00122857 */ uVar5 = Value::at(param_3,uVar6); (**(code **)(*plVar2 + 0x28))(plVar2,local_80,uVar5); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } uVar6 = uVar6 + 1; lVar7 = *(long *)param_1; lVar4 = lVar4 + 0x20; } while (uVar6 < (ulong)(*(long *)(param_1 + 8) - lVar7 >> 5)); return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00122823 to 00122831 has its CatchHandler @ 00122848 */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); }
25,779
mi_state_info_write
eloqsql/storage/myisam/mi_open.c
uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite) { uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE]; uchar *ptr=buff; uint i, keys= (uint) state->header.keys, key_blocks=state->header.max_block_size_index; DBUG_ENTER("mi_state_info_write"); memcpy(ptr, &state->header, sizeof(state->header)); ptr+=sizeof(state->header); /* open_count must be first because of _mi_mark_file_changed ! */ mi_int2store(ptr,state->open_count); ptr +=2; *ptr++= (uchar)state->changed; *ptr++= state->sortkey; mi_rowstore(ptr,state->state.records); ptr +=8; mi_rowstore(ptr,state->state.del); ptr +=8; mi_rowstore(ptr,state->split); ptr +=8; mi_sizestore(ptr,state->dellink); ptr +=8; mi_sizestore(ptr,state->state.key_file_length); ptr +=8; mi_sizestore(ptr,state->state.data_file_length); ptr +=8; mi_sizestore(ptr,state->state.empty); ptr +=8; mi_sizestore(ptr,state->state.key_empty); ptr +=8; mi_int8store(ptr,state->auto_increment); ptr +=8; mi_int8store(ptr,(ulonglong) state->state.checksum);ptr +=8; mi_int4store(ptr,state->process); ptr +=4; mi_int4store(ptr,state->unique); ptr +=4; mi_int4store(ptr,state->status); ptr +=4; mi_int4store(ptr,state->update_count); ptr +=4; ptr+=state->state_diff_length; for (i=0; i < keys; i++) { mi_sizestore(ptr,state->key_root[i]); ptr +=8; } for (i=0; i < key_blocks; i++) { mi_sizestore(ptr,state->key_del[i]); ptr +=8; } if (pWrite & 2) /* From isamchk */ { uint key_parts= mi_uint2korr(state->header.key_parts); mi_int4store(ptr,state->sec_index_changed); ptr +=4; mi_int4store(ptr,state->sec_index_used); ptr +=4; mi_int4store(ptr,state->version); ptr +=4; mi_int8store(ptr,state->key_map); ptr +=8; mi_int8store(ptr,(ulonglong) state->create_time); ptr +=8; mi_int8store(ptr,(ulonglong) state->recover_time); ptr +=8; mi_int8store(ptr,(ulonglong) state->check_time); ptr +=8; mi_sizestore(ptr,state->rec_per_key_rows); ptr+=8; for (i=0 ; i < key_parts ; i++) { mi_int4store(ptr,state->rec_per_key_part[i]); ptr+=4; } } if (pWrite & 1) DBUG_RETURN(mysql_file_pwrite(file, buff, (size_t) (ptr-buff), 0L, MYF(MY_NABP | MY_THREADSAFE)) != 0); DBUG_RETURN(mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0); }
O3
c
mi_state_info_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2388, %rsp # imm = 0x2388 movl %edi, %r13d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movzbl 0x12(%rsi), %ecx movzbl 0x15(%rsi), %eax movq 0x10(%rsi), %rdi movq %rdi, -0x2350(%rbp) movups (%rsi), %xmm0 movaps %xmm0, -0x2360(%rbp) movzwl 0xec(%rsi), %edi rolw $0x8, %di movw %di, -0x2348(%rbp) movb 0xf0(%rsi), %dil movb %dil, -0x2346(%rbp) movb 0xe8(%rsi), %dil movb %dil, -0x2345(%rbp) movq 0x18(%rsi), %rdi bswapq %rdi movq %rdi, -0x2344(%rbp) movq 0x20(%rsi), %rdi bswapq %rdi movq %rdi, -0x233c(%rbp) movq 0x50(%rsi), %rdi bswapq %rdi movq %rdi, -0x2334(%rbp) movq 0x58(%rsi), %rdi bswapq %rdi movq %rdi, -0x232c(%rbp) movq 0x38(%rsi), %rdi bswapq %rdi movq %rdi, -0x2324(%rbp) movq 0x40(%rsi), %rdi bswapq %rdi movq %rdi, -0x231c(%rbp) movq 0x28(%rsi), %rdi bswapq %rdi movq %rdi, -0x2314(%rbp) movq 0x30(%rsi), %rdi bswapq %rdi movq %rdi, -0x230c(%rbp) movq 0x60(%rsi), %rdi bswapq %rdi movq %rdi, -0x2304(%rbp) movl 0x48(%rsi), %ebx movl %ebx, %edi movl $0x0, -0x22fc(%rbp) movb %bl, -0x22f5(%rbp) movb %bh, -0x22f6(%rbp) shrl $0x10, %ebx shrl $0x18, %edi movb %bl, -0x22f7(%rbp) movb %dil, -0x22f8(%rbp) movl 0x68(%rsi), %edi bswapl %edi movl %edi, -0x22f4(%rbp) movl 0x70(%rsi), %edi bswapl %edi movl %edi, -0x22f0(%rbp) movl 0x80(%rsi), %edi bswapl %edi movl %edi, -0x22ec(%rbp) movl 0x78(%rsi), %edi bswapl %edi movl %edi, -0x22e8(%rbp) movl 0xf4(%rsi), %edi leaq (%rdi,%rbp), %r14 addq $-0x22e4, %r14 # imm = 0xDD1C testq %rcx, %rcx je 0x7fd74 movq 0x98(%rsi), %rdi shll $0x3, %ecx xorl %r8d, %r8d movq (%rdi,%r8), %r9 bswapq %r9 movq %r9, (%r14,%r8) addq $0x8, %r8 cmpq %r8, %rcx jne 0x7fd5d addq %r8, %r14 testq %rax, %rax je 0x7fd9c shll $0x3, %eax xorl %ecx, %ecx movq 0xa0(%rsi), %rdi movq (%rdi,%rcx), %rdi bswapq %rdi movq %rdi, (%r14,%rcx) addq $0x8, %rcx cmpq %rcx, %rax jne 0x7fd7e addq %rcx, %r14 testb $0x2, %dl je 0x7fe42 movzbl 0xf(%rsi), %ecx movzbl 0xe(%rsi), %eax movl 0xb0(%rsi), %edi bswapl %edi movl %edi, (%r14) movl 0xb8(%rsi), %edi bswapl %edi movl %edi, 0x4(%r14) movl 0xc8(%rsi), %edi bswapl %edi movl %edi, 0x8(%r14) movq 0xc0(%rsi), %rdi bswapq %rdi movq %rdi, 0xc(%r14) movq 0xd0(%rsi), %rdi bswapq %rdi movq %rdi, 0x14(%r14) movq 0xd8(%rsi), %rdi bswapq %rdi movq %rdi, 0x1c(%r14) movq 0xe0(%rsi), %rdi bswapq %rdi movq %rdi, 0x24(%r14) movq 0xa8(%rsi), %rdi bswapq %rdi shll $0x8, %eax movq %rdi, 0x2c(%r14) addq $0x34, %r14 orl %ecx, %eax je 0x7fe42 shll $0x2, %eax xorl %ecx, %ecx movq 0x88(%rsi), %rdi movl (%rdi,%rcx,2), %edi bswapl %edi movl %edi, (%r14,%rcx) addq $0x4, %rcx cmpq %rcx, %rax jne 0x7fe26 addq %rcx, %r14 leaq -0x2360(%rbp), %rax subq %rax, %r14 leaq 0x3061bd(%rip), %r12 # 0x386010 testb $0x1, %dl jne 0x7fe93 movq (%r12), %rax leaq -0x23a8(%rbp), %rdi movl %r13d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7ff01 leaq -0x2360(%rbp), %rsi movl $0x4, %ecx movl %r13d, %edi movq %r14, %rdx callq 0x2efe4 jmp 0x7fecf movq (%r12), %rax leaq -0x23a8(%rbp), %rdi movl %r13d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7ff41 leaq -0x2360(%rbp), %rsi movl $0x804, %r8d # imm = 0x804 movl %r13d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa078e movq %rax, %rbx xorl %eax, %eax testq %rbx, %rbx setne %cl movq %fs:0x28, %rdx cmpq -0x30(%rbp), %rdx jne 0x7ff9b movb %cl, %al addq $0x2388, %rsp # imm = 0x2388 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq (%r12), %rax leaq 0x5bc25(%rip), %rdx # 0xdbb34 movq %r15, %rdi movq %r14, %rsi movl $0x3cd, %ecx # imm = 0x3CD callq *0x210(%rax) leaq -0x2360(%rbp), %rsi movl $0x4, %ecx movl %r13d, %edi movq %r14, %rdx callq 0x2efe4 movq %rax, %rbx xorl %esi, %esi testq %rax, %rax jmp 0x7ff85 movq %rax, %r15 movq (%r12), %rax leaq 0x5bbe5(%rip), %rdx # 0xdbb34 movq %r15, %rdi movq %r14, %rsi movl $0x3cb, %ecx # imm = 0x3CB callq *0x210(%rax) leaq -0x2360(%rbp), %rsi movl $0x804, %r8d # imm = 0x804 movl %r13d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa078e movq %rax, %rbx testq %rax, %rax movl $0x0, %esi cmoveq %r14, %rsi movq (%r12), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x7fed2 callq 0x29250
mi_state_info_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2388h mov r13d, edi mov rax, fs:28h mov [rbp+var_30], rax movzx ecx, byte ptr [rsi+12h] movzx eax, byte ptr [rsi+15h] mov rdi, [rsi+10h] mov [rbp+var_2350], rdi movups xmm0, xmmword ptr [rsi] movaps [rbp+var_2360], xmm0 movzx edi, word ptr [rsi+0ECh] rol di, 8 mov [rbp+var_2348], di mov dil, [rsi+0F0h] mov [rbp+var_2346], dil mov dil, [rsi+0E8h] mov [rbp+var_2345], dil mov rdi, [rsi+18h] bswap rdi mov [rbp+var_2344], rdi mov rdi, [rsi+20h] bswap rdi mov [rbp+var_233C], rdi mov rdi, [rsi+50h] bswap rdi mov [rbp+var_2334], rdi mov rdi, [rsi+58h] bswap rdi mov [rbp+var_232C], rdi mov rdi, [rsi+38h] bswap rdi mov [rbp+var_2324], rdi mov rdi, [rsi+40h] bswap rdi mov [rbp+var_231C], rdi mov rdi, [rsi+28h] bswap rdi mov [rbp+var_2314], rdi mov rdi, [rsi+30h] bswap rdi mov [rbp+var_230C], rdi mov rdi, [rsi+60h] bswap rdi mov [rbp+var_2304], rdi mov ebx, [rsi+48h] mov edi, ebx mov [rbp+var_22FC], 0 mov [rbp+var_22F5], bl mov [rbp+var_22F6], bh shr ebx, 10h shr edi, 18h mov [rbp+var_22F7], bl mov [rbp+var_22F8], dil mov edi, [rsi+68h] bswap edi mov [rbp+var_22F4], edi mov edi, [rsi+70h] bswap edi mov [rbp+var_22F0], edi mov edi, [rsi+80h] bswap edi mov [rbp+var_22EC], edi mov edi, [rsi+78h] bswap edi mov [rbp+var_22E8], edi mov edi, [rsi+0F4h] lea r14, [rdi+rbp] add r14, 0FFFFFFFFFFFFDD1Ch test rcx, rcx jz short loc_7FD74 mov rdi, [rsi+98h] shl ecx, 3 xor r8d, r8d loc_7FD5D: mov r9, [rdi+r8] bswap r9 mov [r14+r8], r9 add r8, 8 cmp rcx, r8 jnz short loc_7FD5D add r14, r8 loc_7FD74: test rax, rax jz short loc_7FD9C shl eax, 3 xor ecx, ecx loc_7FD7E: mov rdi, [rsi+0A0h] mov rdi, [rdi+rcx] bswap rdi mov [r14+rcx], rdi add rcx, 8 cmp rax, rcx jnz short loc_7FD7E add r14, rcx loc_7FD9C: test dl, 2 jz loc_7FE42 movzx ecx, byte ptr [rsi+0Fh] movzx eax, byte ptr [rsi+0Eh] mov edi, [rsi+0B0h] bswap edi mov [r14], edi mov edi, [rsi+0B8h] bswap edi mov [r14+4], edi mov edi, [rsi+0C8h] bswap edi mov [r14+8], edi mov rdi, [rsi+0C0h] bswap rdi mov [r14+0Ch], rdi mov rdi, [rsi+0D0h] bswap rdi mov [r14+14h], rdi mov rdi, [rsi+0D8h] bswap rdi mov [r14+1Ch], rdi mov rdi, [rsi+0E0h] bswap rdi mov [r14+24h], rdi mov rdi, [rsi+0A8h] bswap rdi shl eax, 8 mov [r14+2Ch], rdi add r14, 34h ; '4' or eax, ecx jz short loc_7FE42 shl eax, 2 xor ecx, ecx loc_7FE26: mov rdi, [rsi+88h] mov edi, [rdi+rcx*2] bswap edi mov [r14+rcx], edi add rcx, 4 cmp rax, rcx jnz short loc_7FE26 add r14, rcx loc_7FE42: lea rax, [rbp+var_2360] sub r14, rax lea r12, PSI_server test dl, 1 jnz short loc_7FE93 mov rax, [r12] lea rdi, [rbp+var_23A8] mov esi, r13d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz loc_7FF01 lea rsi, [rbp+var_2360] mov ecx, 4 mov edi, r13d mov rdx, r14 call my_write jmp short loc_7FECF loc_7FE93: mov rax, [r12] lea rdi, [rbp+var_23A8] mov esi, r13d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz loc_7FF41 lea rsi, [rbp+var_2360] mov r8d, 804h mov edi, r13d mov rdx, r14 xor ecx, ecx call my_pwrite loc_7FECF: mov rbx, rax loc_7FED2: xor eax, eax test rbx, rbx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_30] jnz loc_7FF9B mov al, cl add rsp, 2388h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7FF01: mov r15, rax mov rax, [r12] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r14 mov ecx, 3CDh call qword ptr [rax+210h] lea rsi, [rbp+var_2360] mov ecx, 4 mov edi, r13d mov rdx, r14 call my_write mov rbx, rax xor esi, esi test rax, rax jmp short loc_7FF85 loc_7FF41: mov r15, rax mov rax, [r12] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r14 mov ecx, 3CBh call qword ptr [rax+210h] lea rsi, [rbp+var_2360] mov r8d, 804h mov edi, r13d mov rdx, r14 xor ecx, ecx call my_pwrite mov rbx, rax test rax, rax mov esi, 0 loc_7FF85: cmovz rsi, r14 mov rax, [r12] mov rdi, r15 call qword ptr [rax+218h] jmp loc_7FED2 loc_7FF9B: call ___stack_chk_fail
bool mi_state_info_write(unsigned int a1, __int128 *a2, char a3) { long long v4; // rcx long long v5; // rax int v6; // edi _BYTE *v7; // r14 long long v8; // rdi long long v9; // rcx long long v10; // r8 long long v11; // rax long long v12; // rcx int v13; // ecx int v14; // eax int v15; // eax long long v16; // rax long long v17; // rcx long long v18; // r14 long long v19; // rax long long v20; // rax long long v21; // rax long long v22; // rbx long long v24; // r15 long long v25; // rsi bool v26; // zf _BYTE v28[72]; // [rsp+8h] [rbp-23A8h] BYREF __int128 v29; // [rsp+50h] [rbp-2360h] BYREF long long v30; // [rsp+60h] [rbp-2350h] __int16 v31; // [rsp+68h] [rbp-2348h] char v32; // [rsp+6Ah] [rbp-2346h] char v33; // [rsp+6Bh] [rbp-2345h] unsigned long long v34; // [rsp+6Ch] [rbp-2344h] unsigned long long v35; // [rsp+74h] [rbp-233Ch] unsigned long long v36; // [rsp+7Ch] [rbp-2334h] unsigned long long v37; // [rsp+84h] [rbp-232Ch] unsigned long long v38; // [rsp+8Ch] [rbp-2324h] unsigned long long v39; // [rsp+94h] [rbp-231Ch] unsigned long long v40; // [rsp+9Ch] [rbp-2314h] unsigned long long v41; // [rsp+A4h] [rbp-230Ch] unsigned long long v42; // [rsp+ACh] [rbp-2304h] int v43; // [rsp+B4h] [rbp-22FCh] char v44; // [rsp+B8h] [rbp-22F8h] char v45; // [rsp+B9h] [rbp-22F7h] char v46; // [rsp+BAh] [rbp-22F6h] char v47; // [rsp+BBh] [rbp-22F5h] unsigned __int32 v48; // [rsp+BCh] [rbp-22F4h] unsigned __int32 v49; // [rsp+C0h] [rbp-22F0h] unsigned __int32 v50; // [rsp+C4h] [rbp-22ECh] unsigned __int32 v51; // [rsp+C8h] [rbp-22E8h] _BYTE v52[8884]; // [rsp+CCh] [rbp-22E4h] BYREF unsigned long long v53; // [rsp+2380h] [rbp-30h] v53 = __readfsqword(0x28u); v4 = *((unsigned __int8 *)a2 + 18); v5 = *((unsigned __int8 *)a2 + 21); v30 = *((_QWORD *)a2 + 2); v29 = *a2; v31 = __ROL2__(*((_WORD *)a2 + 118), 8); v32 = *((_BYTE *)a2 + 240); v33 = *((_BYTE *)a2 + 232); v34 = _byteswap_uint64(*((_QWORD *)a2 + 3)); v35 = _byteswap_uint64(*((_QWORD *)a2 + 4)); v36 = _byteswap_uint64(*((_QWORD *)a2 + 10)); v37 = _byteswap_uint64(*((_QWORD *)a2 + 11)); v38 = _byteswap_uint64(*((_QWORD *)a2 + 7)); v39 = _byteswap_uint64(*((_QWORD *)a2 + 8)); v40 = _byteswap_uint64(*((_QWORD *)a2 + 5)); v41 = _byteswap_uint64(*((_QWORD *)a2 + 6)); v42 = _byteswap_uint64(*((_QWORD *)a2 + 12)); v6 = *((_DWORD *)a2 + 18); v43 = 0; v46 = BYTE1(v6); v47 = v6; v45 = BYTE2(v6); v44 = HIBYTE(v6); v48 = _byteswap_ulong(*((_DWORD *)a2 + 26)); v49 = _byteswap_ulong(*((_DWORD *)a2 + 28)); v50 = _byteswap_ulong(*((_DWORD *)a2 + 32)); v51 = _byteswap_ulong(*((_DWORD *)a2 + 30)); v7 = &v52[*((unsigned int *)a2 + 61)]; if ( v4 ) { v8 = *((_QWORD *)a2 + 19); v9 = (unsigned int)(8 * v4); v10 = 0LL; do { *(_QWORD *)&v7[v10] = _byteswap_uint64(*(_QWORD *)(v8 + v10)); v10 += 8LL; } while ( v9 != v10 ); v7 += v10; } if ( v5 ) { v11 = (unsigned int)(8 * v5); v12 = 0LL; do { *(_QWORD *)&v7[v12] = _byteswap_uint64(*(_QWORD *)(*((_QWORD *)a2 + 20) + v12)); v12 += 8LL; } while ( v11 != v12 ); v7 += v12; } if ( (a3 & 2) != 0 ) { v13 = *((unsigned __int8 *)a2 + 15); v14 = *((unsigned __int8 *)a2 + 14); *(_DWORD *)v7 = _byteswap_ulong(*((_DWORD *)a2 + 44)); *((_DWORD *)v7 + 1) = _byteswap_ulong(*((_DWORD *)a2 + 46)); *((_DWORD *)v7 + 2) = _byteswap_ulong(*((_DWORD *)a2 + 50)); *(_QWORD *)(v7 + 12) = _byteswap_uint64(*((_QWORD *)a2 + 24)); *(_QWORD *)(v7 + 20) = _byteswap_uint64(*((_QWORD *)a2 + 26)); *(_QWORD *)(v7 + 28) = _byteswap_uint64(*((_QWORD *)a2 + 27)); *(_QWORD *)(v7 + 36) = _byteswap_uint64(*((_QWORD *)a2 + 28)); *(_QWORD *)(v7 + 44) = _byteswap_uint64(*((_QWORD *)a2 + 21)); v7 += 52; v15 = v13 | (v14 << 8); if ( v15 ) { v16 = (unsigned int)(4 * v15); v17 = 0LL; do { *(_DWORD *)&v7[v17] = _byteswap_ulong(*(_DWORD *)(*((_QWORD *)a2 + 17) + 2 * v17)); v17 += 4LL; } while ( v16 != v17 ); v7 += v17; } } v18 = v7 - (_BYTE *)&v29; if ( (a3 & 1) != 0 ) { v21 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v28, a1, 7LL); if ( !v21 ) { v20 = my_pwrite(a1, &v29, v18, 0LL, 2052LL); goto LABEL_19; } v24 = v21; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v21, v18, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 971LL); v22 = my_pwrite(a1, &v29, v18, 0LL, 2052LL); v26 = v22 == 0; v25 = 0LL; } else { v19 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v28, a1, 7LL); if ( !v19 ) { v20 = my_write(a1, (long long)&v29, v18, 4LL); LABEL_19: v22 = v20; return v22 != 0; } v24 = v19; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v19, v18, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 973LL); v22 = my_write(a1, (long long)&v29, v18, 4LL); v25 = 0LL; v26 = v22 == 0; } if ( v26 ) v25 = v18; ((void ( *)(long long, long long))PSI_server[67])(v24, v25); return v22 != 0; }
mi_state_info_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2388 MOV R13D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOVZX ECX,byte ptr [RSI + 0x12] MOVZX EAX,byte ptr [RSI + 0x15] MOV RDI,qword ptr [RSI + 0x10] MOV qword ptr [RBP + -0x2350],RDI MOVUPS XMM0,xmmword ptr [RSI] MOVAPS xmmword ptr [RBP + -0x2360],XMM0 MOVZX EDI,word ptr [RSI + 0xec] ROL DI,0x8 MOV word ptr [RBP + -0x2348],DI MOV DIL,byte ptr [RSI + 0xf0] MOV byte ptr [RBP + -0x2346],DIL MOV DIL,byte ptr [RSI + 0xe8] MOV byte ptr [RBP + -0x2345],DIL MOV RDI,qword ptr [RSI + 0x18] BSWAP RDI MOV qword ptr [RBP + -0x2344],RDI MOV RDI,qword ptr [RSI + 0x20] BSWAP RDI MOV qword ptr [RBP + -0x233c],RDI MOV RDI,qword ptr [RSI + 0x50] BSWAP RDI MOV qword ptr [RBP + -0x2334],RDI MOV RDI,qword ptr [RSI + 0x58] BSWAP RDI MOV qword ptr [RBP + -0x232c],RDI MOV RDI,qword ptr [RSI + 0x38] BSWAP RDI MOV qword ptr [RBP + -0x2324],RDI MOV RDI,qword ptr [RSI + 0x40] BSWAP RDI MOV qword ptr [RBP + -0x231c],RDI MOV RDI,qword ptr [RSI + 0x28] BSWAP RDI MOV qword ptr [RBP + -0x2314],RDI MOV RDI,qword ptr [RSI + 0x30] BSWAP RDI MOV qword ptr [RBP + -0x230c],RDI MOV RDI,qword ptr [RSI + 0x60] BSWAP RDI MOV qword ptr [RBP + -0x2304],RDI MOV EBX,dword ptr [RSI + 0x48] MOV EDI,EBX MOV dword ptr [RBP + -0x22fc],0x0 MOV byte ptr [RBP + -0x22f5],BL MOV byte ptr [RBP + -0x22f6],BH SHR EBX,0x10 SHR EDI,0x18 MOV byte ptr [RBP + -0x22f7],BL MOV byte ptr [RBP + -0x22f8],DIL MOV EDI,dword ptr [RSI + 0x68] BSWAP EDI MOV dword ptr [RBP + -0x22f4],EDI MOV EDI,dword ptr [RSI + 0x70] BSWAP EDI MOV dword ptr [RBP + -0x22f0],EDI MOV EDI,dword ptr [RSI + 0x80] BSWAP EDI MOV dword ptr [RBP + -0x22ec],EDI MOV EDI,dword ptr [RSI + 0x78] BSWAP EDI MOV dword ptr [RBP + -0x22e8],EDI MOV EDI,dword ptr [RSI + 0xf4] LEA R14,[RDI + RBP*0x1] ADD R14,-0x22e4 TEST RCX,RCX JZ 0x0017fd74 MOV RDI,qword ptr [RSI + 0x98] SHL ECX,0x3 XOR R8D,R8D LAB_0017fd5d: MOV R9,qword ptr [RDI + R8*0x1] BSWAP R9 MOV qword ptr [R14 + R8*0x1],R9 ADD R8,0x8 CMP RCX,R8 JNZ 0x0017fd5d ADD R14,R8 LAB_0017fd74: TEST RAX,RAX JZ 0x0017fd9c SHL EAX,0x3 XOR ECX,ECX LAB_0017fd7e: MOV RDI,qword ptr [RSI + 0xa0] MOV RDI,qword ptr [RDI + RCX*0x1] BSWAP RDI MOV qword ptr [R14 + RCX*0x1],RDI ADD RCX,0x8 CMP RAX,RCX JNZ 0x0017fd7e ADD R14,RCX LAB_0017fd9c: TEST DL,0x2 JZ 0x0017fe42 MOVZX ECX,byte ptr [RSI + 0xf] MOVZX EAX,byte ptr [RSI + 0xe] MOV EDI,dword ptr [RSI + 0xb0] BSWAP EDI MOV dword ptr [R14],EDI MOV EDI,dword ptr [RSI + 0xb8] BSWAP EDI MOV dword ptr [R14 + 0x4],EDI MOV EDI,dword ptr [RSI + 0xc8] BSWAP EDI MOV dword ptr [R14 + 0x8],EDI MOV RDI,qword ptr [RSI + 0xc0] BSWAP RDI MOV qword ptr [R14 + 0xc],RDI MOV RDI,qword ptr [RSI + 0xd0] BSWAP RDI MOV qword ptr [R14 + 0x14],RDI MOV RDI,qword ptr [RSI + 0xd8] BSWAP RDI MOV qword ptr [R14 + 0x1c],RDI MOV RDI,qword ptr [RSI + 0xe0] BSWAP RDI MOV qword ptr [R14 + 0x24],RDI MOV RDI,qword ptr [RSI + 0xa8] BSWAP RDI SHL EAX,0x8 MOV qword ptr [R14 + 0x2c],RDI ADD R14,0x34 OR EAX,ECX JZ 0x0017fe42 SHL EAX,0x2 XOR ECX,ECX LAB_0017fe26: MOV RDI,qword ptr [RSI + 0x88] MOV EDI,dword ptr [RDI + RCX*0x2] BSWAP EDI MOV dword ptr [R14 + RCX*0x1],EDI ADD RCX,0x4 CMP RAX,RCX JNZ 0x0017fe26 ADD R14,RCX LAB_0017fe42: LEA RAX,[RBP + -0x2360] SUB R14,RAX LEA R12,[0x486010] TEST DL,0x1 JNZ 0x0017fe93 MOV RAX,qword ptr [R12] LEA RDI,[RBP + -0x23a8] MOV ESI,R13D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017ff01 LEA RSI,[RBP + -0x2360] MOV ECX,0x4 MOV EDI,R13D MOV RDX,R14 CALL 0x0012efe4 JMP 0x0017fecf LAB_0017fe93: MOV RAX,qword ptr [R12] LEA RDI,[RBP + -0x23a8] MOV ESI,R13D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017ff41 LEA RSI,[RBP + -0x2360] MOV R8D,0x804 MOV EDI,R13D MOV RDX,R14 XOR ECX,ECX CALL 0x001a078e LAB_0017fecf: MOV RBX,RAX LAB_0017fed2: XOR EAX,EAX TEST RBX,RBX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x30] JNZ 0x0017ff9b MOV AL,CL ADD RSP,0x2388 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017ff01: MOV R15,RAX MOV RAX,qword ptr [R12] LEA RDX,[0x1dbb34] MOV RDI,R15 MOV RSI,R14 MOV ECX,0x3cd CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x2360] MOV ECX,0x4 MOV EDI,R13D MOV RDX,R14 CALL 0x0012efe4 MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX JMP 0x0017ff85 LAB_0017ff41: MOV R15,RAX MOV RAX,qword ptr [R12] LEA RDX,[0x1dbb34] MOV RDI,R15 MOV RSI,R14 MOV ECX,0x3cb CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x2360] MOV R8D,0x804 MOV EDI,R13D MOV RDX,R14 XOR ECX,ECX CALL 0x001a078e MOV RBX,RAX TEST RAX,RAX MOV ESI,0x0 LAB_0017ff85: CMOVZ RSI,R14 MOV RAX,qword ptr [R12] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x0017fed2 LAB_0017ff9b: CALL 0x00129250
bool mi_state_info_write(int4 param_1,int4 *param_2,ulong param_3) { byte bVar1; byte bVar2; int1 uVar3; int1 uVar4; int4 uVar5; uint uVar6; ulong uVar7; ushort uVar8; long lVar9; long lVar10; long lVar11; long lVar12; uint *puVar13; long in_FS_OFFSET; int1 local_23b0 [72]; int4 local_2368; int4 uStack_2364; int4 uStack_2360; int4 uStack_235c; int8 local_2358; ushort local_2350; int1 local_234e; int1 local_234d; ulong local_234c; ulong local_2344; ulong local_233c; ulong local_2334; ulong local_232c; ulong local_2324; ulong local_231c; ulong local_2314; ulong local_230c; int4 local_2304; int1 local_2300; int1 local_22ff; int1 local_22fe; int1 local_22fd; uint local_22fc; uint local_22f8; uint local_22f4; uint local_22f0; ulong uStack_22ec; uint auStack_22e4 [2219]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); bVar1 = *(byte *)((long)param_2 + 0x12); bVar2 = *(byte *)((long)param_2 + 0x15); local_2358 = *(int8 *)(param_2 + 4); local_2368 = *param_2; uStack_2364 = param_2[1]; uStack_2360 = param_2[2]; uStack_235c = param_2[3]; local_2350 = *(ushort *)(param_2 + 0x3b) << 8 | *(ushort *)(param_2 + 0x3b) >> 8; local_234e = *(int1 *)(param_2 + 0x3c); local_234d = *(int1 *)(param_2 + 0x3a); uVar7 = *(ulong *)(param_2 + 6); local_234c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 8); local_2344 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x14); local_233c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x16); local_2334 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0xe); local_232c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x10); local_2324 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 10); local_231c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0xc); local_2314 = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x18); local_230c = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar5 = param_2[0x12]; local_2304 = 0; local_22fd = (int1)uVar5; local_22fe = (int1)((uint)uVar5 >> 8); local_22ff = (int1)((uint)uVar5 >> 0x10); local_2300 = (int1)((uint)uVar5 >> 0x18); uVar6 = param_2[0x1a]; local_22fc = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar6 = param_2[0x1c]; local_22f8 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar6 = param_2[0x20]; local_22f4 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar6 = param_2[0x1e]; local_22f0 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; puVar13 = (uint *)((long)&uStack_22ec + (ulong)(uint)param_2[0x3d]); if (bVar1 != 0) { lVar10 = *(long *)(param_2 + 0x26); lVar12 = 0; do { uVar7 = *(ulong *)(lVar10 + lVar12); *(ulong *)((long)puVar13 + lVar12) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; lVar12 = lVar12 + 8; } while ((ulong)bVar1 * 8 != lVar12); puVar13 = (uint *)((long)puVar13 + lVar12); } if (bVar2 != 0) { lVar10 = 0; do { uVar7 = *(ulong *)(*(long *)(param_2 + 0x28) + lVar10); *(ulong *)((long)puVar13 + lVar10) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; lVar10 = lVar10 + 8; } while ((ulong)bVar2 * 8 != lVar10); puVar13 = (uint *)((long)puVar13 + lVar10); } if ((param_3 & 2) != 0) { uVar3 = *(int1 *)((long)param_2 + 0xf); uVar4 = *(int1 *)((long)param_2 + 0xe); uVar6 = param_2[0x2c]; *puVar13 = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar6 = param_2[0x2e]; puVar13[1] = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar6 = param_2[0x32]; puVar13[2] = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar7 = *(ulong *)(param_2 + 0x30); *(ulong *)(puVar13 + 3) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x34); *(ulong *)(puVar13 + 5) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x36); *(ulong *)(puVar13 + 7) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x38); *(ulong *)(puVar13 + 9) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; uVar7 = *(ulong *)(param_2 + 0x2a); *(ulong *)(puVar13 + 0xb) = uVar7 >> 0x38 | (uVar7 & 0xff000000000000) >> 0x28 | (uVar7 & 0xff0000000000) >> 0x18 | (uVar7 & 0xff00000000) >> 8 | (uVar7 & 0xff000000) << 8 | (uVar7 & 0xff0000) << 0x18 | (uVar7 & 0xff00) << 0x28 | uVar7 << 0x38; puVar13 = puVar13 + 0xd; uVar8 = CONCAT11(uVar4,uVar3); if (uVar8 != 0) { lVar10 = 0; do { uVar6 = *(uint *)(*(long *)(param_2 + 0x22) + lVar10 * 2); *(uint *)((long)puVar13 + lVar10) = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; lVar10 = lVar10 + 4; } while ((ulong)uVar8 << 2 != lVar10); puVar13 = (uint *)((long)puVar13 + lVar10); } } lVar10 = (long)puVar13 - (long)&local_2368; if ((param_3 & 1) == 0) { lVar12 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,7); if (lVar12 == 0) { lVar9 = my_write(param_1,&local_2368,lVar10,4); goto LAB_0017fed2; } (**(code **)(PSI_server + 0x210)) (lVar12,lVar10,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x3cd); lVar9 = my_write(param_1,&local_2368,lVar10,4); } else { lVar12 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,7); if (lVar12 == 0) { lVar9 = my_pwrite(param_1,&local_2368,lVar10,0,0x804); goto LAB_0017fed2; } (**(code **)(PSI_server + 0x210)) (lVar12,lVar10,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x3cb); lVar9 = my_pwrite(param_1,&local_2368,lVar10,0,0x804); } lVar11 = 0; if (lVar9 == 0) { lVar11 = lVar10; } (**(code **)(PSI_server + 0x218))(lVar12,lVar11); LAB_0017fed2: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar9 != 0; }
25,780
my_collation_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_collation_get_by_name(MY_CHARSET_LOADER *loader, const char *name, myf flags) { uint cs_number; CHARSET_INFO *cs; my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_collation_number(name,flags); my_charset_loader_init_mysys(loader); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file); } return cs; }
O3
c
my_collation_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0xb7ac7f(%rip), %rdi # 0xc10900 leaq -0x7e1(%rip), %rsi # 0x954a7 callq 0x2a240 movq %rbx, %rdi movq %r14, %rsi callq 0x953fb movb $0x0, (%r15) leaq -0xfc9(%rip), %rcx # 0x94cda movq %rcx, 0x80(%r15) leaq -0xfc8(%rip), %rcx # 0x94ce9 movq %rcx, 0x88(%r15) leaq -0xfbb(%rip), %rcx # 0x94d04 movq %rcx, 0x90(%r15) leaq 0x10945(%rip), %rcx # 0xa6612 movq %rcx, 0x98(%r15) leaq 0x2f8be5(%rip), %rcx # 0x38e8c0 movq (%rcx), %rcx movq %rcx, 0xa0(%r15) leaq -0xfca(%rip), %rcx # 0x94d22 movq %rcx, 0xa8(%r15) testl %eax, %eax je 0x95d09 movq %r15, %rdi movl %eax, %esi movq %r14, %rdx callq 0x95936 movq %rax, %r15 jmp 0x95d0c xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x95d56 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x95267 movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x1c, %edi movq %rbx, %rdx movq %r14, %rcx xorl %eax, %eax callq 0xa1c9b movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x95d76 movq %r15, %rax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a270
my_collation_get_by_name: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 218h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_20], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov rsi, r14 call get_collation_number mov byte ptr [r15], 0 lea rcx, my_once_alloc_c mov [r15+80h], rcx lea rcx, my_malloc_c mov [r15+88h], rcx lea rcx, my_realloc_c mov [r15+90h], rcx lea rcx, my_free mov [r15+98h], rcx lea rcx, my_charset_error_reporter mov rcx, [rcx] mov [r15+0A0h], rcx lea rcx, add_collation mov [r15+0A8h], rcx test eax, eax jz short loc_95D09 mov rdi, r15 mov esi, eax mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_95D0C loc_95D09: xor r15d, r15d loc_95D0C: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_95D56 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 1Ch mov rdx, rbx mov rcx, r14 xor eax, eax call my_error loc_95D56: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_95D76 mov rax, r15 add rsp, 218h pop rbx pop r14 pop r15 pop rbp retn loc_95D76: call ___stack_chk_fail
long long my_collation_get_by_name(long long a1, long long a2, long long a3) { unsigned int collation_number; // eax long long internal_charset; // r15 int v6; // r8d int v7; // r9d _BYTE v9[528]; // [rsp+0h] [rbp-230h] BYREF unsigned long long v10; // [rsp+210h] [rbp-20h] v10 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); collation_number = get_collation_number(a2, a3); *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 128) = my_once_alloc_c; *(_QWORD *)(a1 + 136) = my_malloc_c; *(_QWORD *)(a1 + 144) = my_realloc_c; *(_QWORD *)(a1 + 152) = my_free; *(_QWORD *)(a1 + 160) = my_charset_error_reporter; *(_QWORD *)(a1 + 168) = add_collation; if ( collation_number ) internal_charset = get_internal_charset(a1, collation_number, a3); else internal_charset = 0LL; if ( internal_charset == 0 && (a3 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v9), "Index.xml"); my_error(28, 4, a2, (unsigned int)v9, v6, v7); } return internal_charset; }
my_collation_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x218 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RDI,[0xd10900] LEA RSI,[0x1954a7] CALL 0x0012a240 MOV RDI,RBX MOV RSI,R14 CALL 0x001953fb MOV byte ptr [R15],0x0 LEA RCX,[0x194cda] MOV qword ptr [R15 + 0x80],RCX LEA RCX,[0x194ce9] MOV qword ptr [R15 + 0x88],RCX LEA RCX,[0x194d04] MOV qword ptr [R15 + 0x90],RCX LEA RCX,[0x1a6612] MOV qword ptr [R15 + 0x98],RCX LEA RCX,[0x48e8c0] MOV RCX,qword ptr [RCX] MOV qword ptr [R15 + 0xa0],RCX LEA RCX,[0x194d22] MOV qword ptr [R15 + 0xa8],RCX TEST EAX,EAX JZ 0x00195d09 MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 CALL 0x00195936 MOV R15,RAX JMP 0x00195d0c LAB_00195d09: XOR R15D,R15D LAB_00195d0c: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00195d56 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x00195267 MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x1c MOV RDX,RBX MOV RCX,R14 XOR EAX,EAX CALL 0x001a1c9b LAB_00195d56: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00195d76 MOV RAX,R15 ADD RSP,0x218 POP RBX POP R14 POP R15 POP RBP RET LAB_00195d76: CALL 0x0012a270
long my_collation_get_by_name(int1 *param_1,int8 param_2,ulong param_3) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_238 [528]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_collation_number(param_2,param_3); *param_1 = 0; *(code **)(param_1 + 0x80) = my_once_alloc_c; *(code **)(param_1 + 0x88) = my_malloc_c; *(code **)(param_1 + 0x90) = my_realloc_c; *(code **)(param_1 + 0x98) = my_free; *(int **)(param_1 + 0xa0) = my_charset_error_reporter; *(code **)(param_1 + 0xa8) = add_collation; if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_3); } if ((param_3 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_238); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x1c,4,param_2,local_238); } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,781
my_strxfrm_pad_desc_and_reverse
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r13d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, -0x30(%rbp) movq %rdi, %r12 movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r13b sete %dl orb %al, %dl orb %sil, %dl jne 0x6ff3e movl %r8d, %ebx movl %r15d, %eax subl %r14d, %eax imull 0x98(%r12), %ebx cmpl %eax, %ebx cmovael %eax, %ebx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0x78(%rax) movl 0x10(%rbp), %ecx addq %rbx, %r14 movq -0x30(%rbp), %rbx movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x71896 testb %r13b, %r13b jns 0x6ff7d cmpq %r15, %r14 jae 0x6ff7d movq %r15, %rdx subq %r14, %rdx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi callq *0x78(%rax) movq %r15, %r14 subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strxfrm_pad_desc_and_reverse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13d, r9d mov r15, rcx mov r14, rdx mov [rbp+var_30], rsi mov r12, rdi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r13b, 40h setz dl or dl, al or dl, sil jnz short loc_6FF3E mov ebx, r8d mov eax, r15d sub eax, r14d imul ebx, [r12+98h] cmp ebx, eax cmovnb ebx, eax movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 mov rdx, rbx call qword ptr [rax+78h] mov ecx, [rbp+arg_0] add r14, rbx loc_6FF3E: mov rbx, [rbp+var_30] mov rdi, rbx mov rsi, r14 mov edx, r13d call my_strxfrm_desc_and_reverse test r13b, r13b jns short loc_6FF7D cmp r14, r15 jnb short loc_6FF7D mov rdx, r15 sub rdx, r14 movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 call qword ptr [rax+78h] mov r14, r15 loc_6FF7D: sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strxfrm_pad_desc_and_reverse( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned long long v9; // r14 long long v10; // rcx long long v11; // rbx v9 = a3; v10 = a7; if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 ) { v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5); if ( (unsigned int)v11 >= (int)a4 - (int)a3 ) v11 = (unsigned int)(a4 - a3); (*(void ( **)(long long, unsigned long long, long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, a3, v11, *(unsigned __int8 *)(a1 + 176)); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, v9, a4 - v9, *(unsigned __int8 *)(a1 + 176)); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13D,R9D MOV R15,RCX MOV R14,RDX MOV qword ptr [RBP + -0x30],RSI MOV R12,RDI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R13B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x0016ff3e MOV EBX,R8D MOV EAX,R15D SUB EAX,R14D IMUL EBX,dword ptr [R12 + 0x98] CMP EBX,EAX CMOVNC EBX,EAX MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + 0x10] ADD R14,RBX LAB_0016ff3e: MOV RBX,qword ptr [RBP + -0x30] MOV RDI,RBX MOV RSI,R14 MOV EDX,R13D CALL 0x00171896 TEST R13B,R13B JNS 0x0016ff7d CMP R14,R15 JNC 0x0016ff7d MOV RDX,R15 SUB RDX,R14 MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV R14,R15 LAB_0016ff7d: SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strxfrm_pad_desc_and_reverse (long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6, int4 param_7) { uint uVar1; uint uVar2; if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) { uVar1 = (int)param_4 - (int)param_3; uVar2 = param_5 * *(int *)(param_1 + 0x98); if (uVar1 <= uVar2) { uVar2 = uVar1; } (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,(ulong)uVar2,*(int1 *)(param_1 + 0xb0)); param_3 = param_3 + uVar2; } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,param_4 - param_3,*(int1 *)(param_1 + 0xb0)); param_3 = param_4; } return param_3 - param_2; }
25,782
Player::checkState()
GhostEscape/src/player.cpp
void Player::checkState() { if (velocity_.x < 0){ sprite_move_->setFlip(true); sprite_idle_->setFlip(true); }else{ sprite_move_->setFlip(false); sprite_idle_->setFlip(false); } bool new_is_moving = (glm::length(velocity_) > 0.1f); if (new_is_moving != is_moving_){ is_moving_ = new_is_moving; changeState(is_moving_); } }
O3
cpp
Player::checkState(): pushq %rbp movq %rsp, %rbp xorps %xmm0, %xmm0 ucomiss 0x78(%rdi), %xmm0 movq 0x98(%rdi), %rax seta 0x8c(%rax) movq 0x90(%rdi), %rcx seta 0x8c(%rcx) movss 0x78(%rdi), %xmm0 movss 0x7c(%rdi), %xmm1 mulss %xmm0, %xmm0 mulss %xmm1, %xmm1 addss %xmm0, %xmm1 xorps %xmm0, %xmm0 sqrtss %xmm1, %xmm0 ucomiss 0x2f65(%rip), %xmm0 # 0x10058 seta %dl cmpb %dl, 0xb0(%rdi) je 0xd149 ucomiss 0x2f53(%rip), %xmm0 # 0x10058 movb %dl, 0xb0(%rdi) jbe 0xd11a xorl %edx, %edx movb $0x1, %sil movq %rcx, %rdi movq %rax, %r8 jmp 0xd124 movb $0x1, %dl xorl %esi, %esi movq %rax, %rdi movq %rcx, %r8 movb %dl, 0x48(%rcx) movb %sil, 0x48(%rax) movl 0x9c(%rdi), %eax movl %eax, 0x9c(%r8) movss 0xa8(%rdi), %xmm0 movss %xmm0, 0xa8(%r8) popq %rbp retq nop
_ZN6Player10checkStateEv: push rbp mov rbp, rsp xorps xmm0, xmm0 ucomiss xmm0, dword ptr [rdi+78h] mov rax, [rdi+98h] setnbe byte ptr [rax+8Ch] mov rcx, [rdi+90h] setnbe byte ptr [rcx+8Ch] movss xmm0, dword ptr [rdi+78h] movss xmm1, dword ptr [rdi+7Ch] mulss xmm0, xmm0 mulss xmm1, xmm1 addss xmm1, xmm0 xorps xmm0, xmm0 sqrtss xmm0, xmm1 ucomiss xmm0, cs:dword_10058 setnbe dl cmp [rdi+0B0h], dl jz short loc_D149 ucomiss xmm0, cs:dword_10058 mov [rdi+0B0h], dl jbe short loc_D11A xor edx, edx mov sil, 1 mov rdi, rcx mov r8, rax jmp short loc_D124 loc_D11A: mov dl, 1 xor esi, esi mov rdi, rax mov r8, rcx loc_D124: mov [rcx+48h], dl mov [rax+48h], sil mov eax, [rdi+9Ch] mov [r8+9Ch], eax movss xmm0, dword ptr [rdi+0A8h] movss dword ptr [r8+0A8h], xmm0 loc_D149: pop rbp retn
long long Player::checkState(Player *this) { bool v1; // cf bool v2; // zf long long result; // rax long long v4; // rcx float v5; // xmm0_4 char v6; // dl char v7; // si long long v8; // rdi long long v9; // r8 v1 = *((float *)this + 30) > 0.0; v2 = *((float *)this + 30) == 0.0; result = *((_QWORD *)this + 19); *(_BYTE *)(result + 140) = *((float *)this + 30) < 0.0; v4 = *((_QWORD *)this + 18); *(_BYTE *)(v4 + 140) = !v1 && !v2; v5 = fsqrt((float)(*((float *)this + 31) * *((float *)this + 31)) + (float)(*((float *)this + 30) * *((float *)this + 30))); if ( *((_BYTE *)this + 176) != v5 > 0.1 ) { *((_BYTE *)this + 176) = v5 > 0.1; if ( v5 <= 0.1 ) { v6 = 1; v7 = 0; v8 = result; v9 = v4; } else { v6 = 0; v7 = 1; v8 = v4; v9 = result; } *(_BYTE *)(v4 + 72) = v6; *(_BYTE *)(result + 72) = v7; result = *(unsigned int *)(v8 + 156); *(_DWORD *)(v9 + 156) = result; *(_DWORD *)(v9 + 168) = *(_DWORD *)(v8 + 168); } return result; }
checkState: PUSH RBP MOV RBP,RSP XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RDI + 0x78] MOV RAX,qword ptr [RDI + 0x98] SETA byte ptr [RAX + 0x8c] MOV RCX,qword ptr [RDI + 0x90] SETA byte ptr [RCX + 0x8c] MOVSS XMM0,dword ptr [RDI + 0x78] MOVSS XMM1,dword ptr [RDI + 0x7c] MULSS XMM0,XMM0 MULSS XMM1,XMM1 ADDSS XMM1,XMM0 XORPS XMM0,XMM0 SQRTSS XMM0,XMM1 UCOMISS XMM0,dword ptr [0x00110058] SETA DL CMP byte ptr [RDI + 0xb0],DL JZ 0x0010d149 UCOMISS XMM0,dword ptr [0x00110058] MOV byte ptr [RDI + 0xb0],DL JBE 0x0010d11a XOR EDX,EDX MOV SIL,0x1 MOV RDI,RCX MOV R8,RAX JMP 0x0010d124 LAB_0010d11a: MOV DL,0x1 XOR ESI,ESI MOV RDI,RAX MOV R8,RCX LAB_0010d124: MOV byte ptr [RCX + 0x48],DL MOV byte ptr [RAX + 0x48],SIL MOV EAX,dword ptr [RDI + 0x9c] MOV dword ptr [R8 + 0x9c],EAX MOVSS XMM0,dword ptr [RDI + 0xa8] MOVSS dword ptr [R8 + 0xa8],XMM0 LAB_0010d149: POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* Player::checkState() */ void __thiscall Player::checkState(Player *this) { long lVar1; long lVar2; bool bVar3; bool bVar4; float fVar5; long lVar6; long lVar7; float fVar8; bVar3 = *(float *)(this + 0x78) != 0.0; bVar4 = *(float *)(this + 0x78) <= 0.0; lVar1 = *(long *)(this + 0x98); *(bool *)(lVar1 + 0x8c) = bVar4 && bVar3; lVar2 = *(long *)(this + 0x90); *(bool *)(lVar2 + 0x8c) = bVar4 && bVar3; fVar5 = _DAT_00110058; fVar8 = SQRT(*(float *)(this + 0x7c) * *(float *)(this + 0x7c) + *(float *)(this + 0x78) * *(float *)(this + 0x78)); if (this[0xb0] != (Player)(_DAT_00110058 < fVar8)) { this[0xb0] = (Player)(_DAT_00110058 < fVar8); lVar6 = lVar1; lVar7 = lVar2; if (fVar8 > fVar5) { lVar6 = lVar2; lVar7 = lVar1; } *(bool *)(lVar2 + 0x48) = fVar8 <= fVar5; *(bool *)(lVar1 + 0x48) = fVar5 < fVar8; *(int4 *)(lVar7 + 0x9c) = *(int4 *)(lVar6 + 0x9c); *(int4 *)(lVar7 + 0xa8) = *(int4 *)(lVar6 + 0xa8); } return; }
25,783
ma_once_init_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_once_init_block_record(MARIA_SHARE *share, File data_file) { my_bool res; pgcache_page_no_t last_page; /* First calculate the max file length with can have with a pointer of size rec_reflength. The 'rec_reflength - 1' is because one byte is used for row position withing the page. The /2 comes from _ma_transaction_recpos_to_keypos() where we use the lowest bit to mark if there is a transid following the rownr. */ last_page= ((ulonglong) 1 << ((share->base.rec_reflength-1)*8))/2; if (!last_page) /* Overflow; set max size */ last_page= ~(pgcache_page_no_t) 0; res= _ma_bitmap_init(share, data_file, &last_page); share->base.max_data_file_length= _ma_safe_mul(last_page + 1, share->block_size); #if SIZEOF_OFF_T == 4 set_if_smaller(share->base.max_data_file_length, INT_MAX32); #endif return res; }
O3
c
ma_once_init_block_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x3e0(%rdi), %eax leal -0x8(,%rax,8), %ecx movl $0x1, %eax shlq %cl, %rax shrq %rax xorl %edx, %edx cmpl $0x1, %ecx sbbq %rdx, %rdx orq %rax, %rdx leaq -0x20(%rbp), %r14 movq %rdx, (%r14) movq %r14, %rdx callq 0x55118 movl %eax, %r15d movq (%r14), %rdi incq %rdi movl 0x7bc(%rbx), %esi callq 0x6d6ad movq %rax, 0x368(%rbx) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_once_init_block_record: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+3E0h] lea ecx, ds:0FFFFFFFFFFFFFFF8h[rax*8] mov eax, 1 shl rax, cl shr rax, 1 xor edx, edx cmp ecx, 1 sbb rdx, rdx or rdx, rax lea r14, [rbp+var_20] mov [r14], rdx mov rdx, r14 call _ma_bitmap_init mov r15d, eax mov rdi, [r14] inc rdi mov esi, [rbx+7BCh] call _ma_safe_mul mov [rbx+368h], rax mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_once_init_block_record(long long a1, long long a2) { unsigned long long v2; // rax unsigned int v3; // r15d unsigned long long v5[4]; // [rsp+0h] [rbp-20h] BYREF v5[0] = v2; v5[0] = ((unsigned long long)(1LL << (8 * *(_BYTE *)(a1 + 992) - 8)) >> 1) | -(long long)(8 * *(_DWORD *)(a1 + 992) == 8); v3 = ma_bitmap_init(a1, a2, v5); *(_QWORD *)(a1 + 872) = ma_safe_mul(v5[0] + 1, *(unsigned int *)(a1 + 1980)); return v3; }
_ma_once_init_block_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x3e0] LEA ECX,[-0x8 + RAX*0x8] MOV EAX,0x1 SHL RAX,CL SHR RAX,0x1 XOR EDX,EDX CMP ECX,0x1 SBB RDX,RDX OR RDX,RAX LEA R14,[RBP + -0x20] MOV qword ptr [R14],RDX MOV RDX,R14 CALL 0x00155118 MOV R15D,EAX MOV RDI,qword ptr [R14] INC RDI MOV ESI,dword ptr [RBX + 0x7bc] CALL 0x0016d6ad MOV qword ptr [RBX + 0x368],RAX MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 _ma_once_init_block_record(long param_1,int8 param_2) { int iVar1; int4 uVar2; int8 uVar3; ulong local_28; iVar1 = *(int *)(param_1 + 0x3e0) * 8 + -8; local_28 = -(ulong)(iVar1 == 0) | (ulong)(1L << ((byte)iVar1 & 0x3f)) >> 1; uVar2 = _ma_bitmap_init(param_1,param_2,&local_28); uVar3 = _ma_safe_mul(local_28 + 1,*(int4 *)(param_1 + 0x7bc)); *(int8 *)(param_1 + 0x368) = uVar3; return uVar2; }
25,784
init_queue
eloqsql/mysys/queues.c
int init_queue(QUEUE *queue, uint max_elements, uint offset_to_key, my_bool max_at_top, int (*compare) (void *, uchar *, uchar *), void *first_cmp_arg, uint offset_to_queue_pos, uint auto_extent) { DBUG_ENTER("init_queue"); if ((queue->root= (uchar **) my_malloc(key_memory_QUEUE, (max_elements + 1) * sizeof(void*), MYF(MY_WME))) == 0) DBUG_RETURN(1); queue->elements= 0; queue->compare= compare; queue->first_cmp_arg= first_cmp_arg; queue->max_elements= max_elements; queue->offset_to_key= offset_to_key; queue->offset_to_queue_pos= offset_to_queue_pos; queue->auto_extent= auto_extent; queue_set_max_at_top(queue, max_at_top); DBUG_RETURN(0); }
O3
c
init_queue: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, -0x30(%rbp) movq %r8, %r13 movl %ecx, %r14d movl %edx, %r12d movl %esi, %r15d movq %rdi, %rbx leaq 0x356258(%rip), %rax # 0x3b8c50 movl (%rax), %edi leal 0x1(%r15), %esi shlq $0x3, %rsi movl $0x10, %edx callq 0x60401 movq %rax, (%rbx) testq %rax, %rax je 0x62a4f movl 0x18(%rbp), %eax movl 0x10(%rbp), %ecx movl $0x0, 0x10(%rbx) movq %r13, 0x28(%rbx) movq -0x30(%rbp), %rdx movq %rdx, 0x8(%rbx) movl %r15d, 0x14(%rbx) movl %r12d, 0x18(%rbx) movl %ecx, 0x1c(%rbx) movl %eax, 0x20(%rbx) xorl %eax, %eax negb %r14b movl $0x0, %ecx sbbl %ecx, %ecx orl $0x1, %ecx movl %ecx, 0x24(%rbx) jmp 0x62a54 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_queue: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], r9 mov r13, r8 mov r14d, ecx mov r12d, edx mov r15d, esi mov rbx, rdi lea rax, key_memory_QUEUE mov edi, [rax] lea esi, [r15+1] shl rsi, 3 mov edx, 10h call my_malloc mov [rbx], rax test rax, rax jz short loc_62A4F mov eax, [rbp+arg_8] mov ecx, [rbp+arg_0] mov dword ptr [rbx+10h], 0 mov [rbx+28h], r13 mov rdx, [rbp+var_30] mov [rbx+8], rdx mov [rbx+14h], r15d mov [rbx+18h], r12d mov [rbx+1Ch], ecx mov [rbx+20h], eax xor eax, eax neg r14b mov ecx, 0 sbb ecx, ecx or ecx, 1 mov [rbx+24h], ecx jmp short loc_62A54 loc_62A4F: mov eax, 1 loc_62A54: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_queue(long long a1, int a2, int a3, char a4, long long a5, long long a6, int a7, int a8) { long long v11; // rax long long result; // rax v11 = my_malloc(key_memory_QUEUE, 8LL * (unsigned int)(a2 + 1), 16); *(_QWORD *)a1 = v11; if ( !v11 ) return 1LL; *(_DWORD *)(a1 + 16) = 0; *(_QWORD *)(a1 + 40) = a5; *(_QWORD *)(a1 + 8) = a6; *(_DWORD *)(a1 + 20) = a2; *(_DWORD *)(a1 + 24) = a3; *(_DWORD *)(a1 + 28) = a7; *(_DWORD *)(a1 + 32) = a8; result = 0LL; *(_DWORD *)(a1 + 36) = a4 != 0 ? -1 : 1; return result; }
init_queue: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],R9 MOV R13,R8 MOV R14D,ECX MOV R12D,EDX MOV R15D,ESI MOV RBX,RDI LEA RAX,[0x4b8c50] MOV EDI,dword ptr [RAX] LEA ESI,[R15 + 0x1] SHL RSI,0x3 MOV EDX,0x10 CALL 0x00160401 MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x00162a4f MOV EAX,dword ptr [RBP + 0x18] MOV ECX,dword ptr [RBP + 0x10] MOV dword ptr [RBX + 0x10],0x0 MOV qword ptr [RBX + 0x28],R13 MOV RDX,qword ptr [RBP + -0x30] MOV qword ptr [RBX + 0x8],RDX MOV dword ptr [RBX + 0x14],R15D MOV dword ptr [RBX + 0x18],R12D MOV dword ptr [RBX + 0x1c],ECX MOV dword ptr [RBX + 0x20],EAX XOR EAX,EAX NEG R14B MOV ECX,0x0 SBB ECX,ECX OR ECX,0x1 MOV dword ptr [RBX + 0x24],ECX JMP 0x00162a54 LAB_00162a4f: MOV EAX,0x1 LAB_00162a54: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool init_queue(long *param_1,int param_2,int4 param_3,char param_4,long param_5,long param_6, int4 param_7,int4 param_8) { long lVar1; lVar1 = my_malloc(key_memory_QUEUE,(ulong)(param_2 + 1) << 3,0x10); *param_1 = lVar1; if (lVar1 != 0) { *(int4 *)(param_1 + 2) = 0; param_1[5] = param_5; param_1[1] = param_6; *(int *)((long)param_1 + 0x14) = param_2; *(int4 *)(param_1 + 3) = param_3; *(int4 *)((long)param_1 + 0x1c) = param_7; *(int4 *)(param_1 + 4) = param_8; *(uint *)((long)param_1 + 0x24) = -(uint)(param_4 != '\0') | 1; } return lVar1 == 0; }
25,785
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
llama.cpp/common/minja/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O3
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0xca121 cmpq $0x0, 0x10(%rsi) je 0xca17c movq %rdi, %rbx callq *0x18(%rsi) movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x20640 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6034 leaq 0x55d15(%rip), %rsi # 0x11fe5c leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaf8d4 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x20470 xorl %ebp, %ebp movq 0x97e53(%rip), %rsi # 0x161fc0 movq 0x97e0c(%rip), %rdx # 0x161f80 movq %rbx, %rdi callq 0x20a40 callq 0x212a0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xca19f movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xca1ba movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xca1e4 jmp 0xca1ec movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xca1e4 movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xca1e4 movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20ae0
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_CA121 cmp qword ptr [rsi+10h], 0 jz short loc_CA17C mov rbx, rdi call qword ptr [rsi+18h] mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_CA121: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_CA17C: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CA19F mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CA19F: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CA1BA mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CA1BA: test bpl, bpl jnz short loc_CA1E4 jmp short loc_CA1EC mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CA1E4 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CA1E4 mov r14, rax loc_CA1E4: mov rdi, rbx; void * call ___cxa_free_exception loc_CA1EC: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { long long v3; // rsi void *exception; // rbx _BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF _QWORD v7[2]; // [rsp+20h] [rbp-38h] BYREF v3 = *(_QWORD *)(a2 + 48); if ( !v3 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0); std::operator+<char>(v7, (long long)"Value is not callable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !*(_QWORD *)(v3 + 16) ) std::__throw_bad_function_call(); (*(void (**)(void))(v3 + 24))(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x001ca121 CMP qword ptr [RSI + 0x10],0x0 JZ 0x001ca17c MOV RBX,RDI CALL qword ptr [RSI + 0x18] MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001ca121: MOV EDI,0x10 CALL 0x00120640 MOV RBX,RAX LAB_001ca12e: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6034 LAB_001ca140: LEA RSI,[0x21fe5c] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001af8d4 MOV BPL,0x1 LAB_001ca157: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00120470 XOR EBP,EBP MOV RSI,qword ptr [0x00261fc0] MOV RDX,qword ptr [0x00261f80] MOV RDI,RBX CALL 0x00120a40 LAB_001ca17c: CALL 0x001212a0
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { long lVar1; runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ca12e to 001ca13f has its CatchHandler @ 001ca1e1 */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 001ca140 to 001ca153 has its CatchHandler @ 001ca1c1 */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 001ca157 to 001ca17b has its CatchHandler @ 001ca181 */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80); } if (*(long *)(lVar1 + 0x10) != 0) { (**(code **)(lVar1 + 0x18))(); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
25,786
get_charset_number_internal
eloqsql/mysys/charset.c
static uint get_charset_number_internal(const char *charset_name, uint cs_flags) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name)) return cs[0]->number; } return 0; }
O0
c
get_charset_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) leaq 0x35d00a(%rip), %rax # 0x386dc0 movq %rax, -0x20(%rbp) leaq 0x35cfff(%rip), %rax # 0x386dc0 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x20(%rbp) jae 0x29e47 movq -0x20(%rbp), %rax cmpq $0x0, (%rax) je 0x29e34 movq -0x20(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x10(%rax) je 0x29e34 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0xc(%rax), %eax andl -0x14(%rbp), %eax cmpl $0x0, %eax je 0x29e34 leaq 0x24aa22(%rip), %rax # 0x274820 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0x10(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x24aa01(%rip), %rdi # 0x274820 callq *%rax cmpl $0x0, %eax jne 0x29e34 movq -0x20(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x29e4e jmp 0x29e36 movq -0x20(%rbp), %rax addq $0x8, %rax movq %rax, -0x20(%rbp) jmp 0x29dba movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_charset_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi lea rax, all_charsets mov [rbp+var_20], rax loc_29DBA: lea rax, all_charsets add rax, 4000h cmp [rbp+var_20], rax jnb short loc_29E47 mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jz short loc_29E34 mov rax, [rbp+var_20] mov rax, [rax] cmp qword ptr [rax+10h], 0 jz short loc_29E34 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+0Ch] and eax, [rbp+var_14] cmp eax, 0 jz short loc_29E34 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_20] mov rcx, [rcx] mov rsi, [rcx+10h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_29E34 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_29E4E loc_29E34: jmp short $+2 loc_29E36: mov rax, [rbp+var_20] add rax, 8 mov [rbp+var_20], rax jmp loc_29DBA loc_29E47: mov [rbp+var_4], 0 loc_29E4E: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_charset_number_internal(long long a1, int a2) { unsigned int **i; // [rsp+0h] [rbp-20h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 2) && (a2 & (*i)[3]) != 0 && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 2), a1) ) { return **i; } } return 0; }
get_charset_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI LEA RAX,[0x486dc0] MOV qword ptr [RBP + -0x20],RAX LAB_00129dba: LEA RAX,[0x486dc0] ADD RAX,0x4000 CMP qword ptr [RBP + -0x20],RAX JNC 0x00129e47 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JZ 0x00129e34 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00129e34 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] AND EAX,dword ptr [RBP + -0x14] CMP EAX,0x0 JZ 0x00129e34 LEA RAX,[0x374820] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x374820] CALL RAX CMP EAX,0x0 JNZ 0x00129e34 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00129e4e LAB_00129e34: JMP 0x00129e36 LAB_00129e36: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 MOV qword ptr [RBP + -0x20],RAX JMP 0x00129dba LAB_00129e47: MOV dword ptr [RBP + -0x4],0x0 LAB_00129e4e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_charset_number_internal(int8 param_1,uint param_2) { int iVar1; long *local_28; local_28 = &all_charsets; while( true ) { if ((long *)0x48adbf < local_28) { return 0; } if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) && ((*(uint *)(*local_28 + 0xc) & param_2) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003748e0 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0 )) break; local_28 = local_28 + 1; } return *(int4 *)*local_28; }
25,787
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): subq $0x48, %rsp movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi callq 0xa23e0 cmpq $0x2, %rax je 0xdf5ae leaq 0x30(%rsp), %rdi callq 0xa23e0 cmpq $0x4, %rax je 0xdf5ae leaq 0x30(%rsp), %rdi callq 0xa23e0 cmpq $0x6, %rax je 0xdf5ae leaq 0x13cd0f(%rip), %rdi # 0x21c2a3 movl $0x1da8, %esi # imm = 0x1DA8 leaq 0x135d37(%rip), %rdx # 0x2152d7 leaq 0x13da69(%rip), %rcx # 0x21d010 movb $0x0, %al callq 0x5ef40 movq 0x18(%rsp), %rdi movl 0x14(%rdi), %esi callq 0xdf350 leaq 0x30(%rsp), %rdi callq 0xa2130 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x30(%rsp), %rdi callq 0xa2140 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax je 0xdf67c movq 0x18(%rsp), %rdi callq 0xdef60 movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rax movl (%rax), %ecx xorl %eax, %eax cmpl 0x14(%rdx), %ecx movb %al, 0xf(%rsp) jg 0xdf633 movq 0x18(%rsp), %rax movl 0x14(%rax), %eax movq 0x20(%rsp), %rcx movq %rcx, %rdx addq $0x4, %rdx movq %rdx, 0x20(%rsp) cmpl 0x4(%rcx), %eax setle %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xdf641 jmp 0xdf650 movq 0x18(%rsp), %rdi movl 0x14(%rdi), %esi callq 0xdf350 jmp 0xdf667 movq 0x18(%rsp), %rax leaq 0x13d954(%rip), %rcx # 0x21cfb0 movq %rcx, 0x70(%rax) movb $0x0, 0x47(%rsp) jmp 0xdf681 jmp 0xdf669 movq 0x20(%rsp), %rax addq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0xdf5ca movb $0x1, 0x47(%rsp) movb 0x47(%rsp), %al andb $0x1, %al addq $0x48, %rsp retq nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: sub rsp, 48h mov [rsp+48h+var_18], rsi mov [rsp+48h+var_10], rdx mov [rsp+48h+var_20], rdi mov rax, [rsp+48h+var_20] mov [rsp+48h+var_30], rax lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void) cmp rax, 2 jz short loc_DF5AE lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void) cmp rax, 4 jz short loc_DF5AE lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void) cmp rax, 6 jz short loc_DF5AE lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1DA8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov al, 0 call _ggml_abort loc_DF5AE: mov rdi, [rsp+48h+var_30] mov esi, [rdi+14h] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(int) lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE5beginEv; std::initializer_list<int>::begin(void) mov [rsp+48h+var_28], rax loc_DF5CA: mov rax, [rsp+48h+var_28] mov [rsp+48h+var_38], rax lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE3endEv; std::initializer_list<int>::end(void) mov rcx, rax mov rax, [rsp+48h+var_38] cmp rax, rcx jz loc_DF67C mov rdi, [rsp+48h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov rdx, [rsp+48h+var_30] mov rax, [rsp+48h+var_28] mov ecx, [rax] xor eax, eax cmp ecx, [rdx+14h] mov [rsp+48h+var_39], al jg short loc_DF633 mov rax, [rsp+48h+var_30] mov eax, [rax+14h] mov rcx, [rsp+48h+var_28] mov rdx, rcx add rdx, 4 mov [rsp+48h+var_28], rdx cmp eax, [rcx+4] setle al mov [rsp+48h+var_39], al loc_DF633: mov al, [rsp+48h+var_39] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_DF641 jmp short loc_DF650 loc_DF641: mov rdi, [rsp+48h+var_30] mov esi, [rdi+14h] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add(int) jmp short loc_DF667 loc_DF650: mov rax, [rsp+48h+var_30] lea rcx, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [rax+70h], rcx mov [rsp+48h+var_1], 0 jmp short loc_DF681 loc_DF667: jmp short $+2 loc_DF669: mov rax, [rsp+48h+var_28] add rax, 4 mov [rsp+48h+var_28], rax jmp loc_DF5CA loc_DF67C: mov [rsp+48h+var_1], 1 loc_DF681: mov al, [rsp+48h+var_1] and al, 1 add rsp, 48h retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( long long a1, long long a2, long long a3) { _DWORD *v3; // rcx bool v5; // [rsp+Fh] [rbp-39h] _DWORD *i; // [rsp+20h] [rbp-28h] _QWORD v7[2]; // [rsp+30h] [rbp-18h] BYREF v7[0] = a2; v7[1] = a3; if ( std::initializer_list<int>::size((long long)v7) != 2 && std::initializer_list<int>::size((long long)v7) != 4 && std::initializer_list<int>::size((long long)v7) != 6 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add( a1, *(_DWORD *)(a1 + 20)); for ( i = (_DWORD *)std::initializer_list<int>::begin((long long)v7); i != (_DWORD *)std::initializer_list<int>::end((long long)v7); ++i ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v5 = 0; if ( *i <= *(_DWORD *)(a1 + 20) ) { v3 = i++; v5 = *(_DWORD *)(a1 + 20) <= v3[1]; } if ( !v5 ) { *(_QWORD *)(a1 + 112) = "invalid string: ill-formed UTF-8 byte"; return 0; } nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::add( a1, *(_DWORD *)(a1 + 20)); } return 1; }
next_byte_in_range: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x30] CALL 0x001a23e0 CMP RAX,0x2 JZ 0x001df5ae LEA RDI,[RSP + 0x30] CALL 0x001a23e0 CMP RAX,0x4 JZ 0x001df5ae LEA RDI,[RSP + 0x30] CALL 0x001a23e0 CMP RAX,0x6 JZ 0x001df5ae LEA RDI,[0x31c2a3] MOV ESI,0x1da8 LEA RDX,[0x3152d7] LEA RCX,[0x31d010] MOV AL,0x0 CALL 0x0015ef40 LAB_001df5ae: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RDI + 0x14] CALL 0x001df350 LEA RDI,[RSP + 0x30] CALL 0x001a2130 MOV qword ptr [RSP + 0x20],RAX LAB_001df5ca: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x30] CALL 0x001a2140 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX JZ 0x001df67c MOV RDI,qword ptr [RSP + 0x18] CALL 0x001def60 MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RDX + 0x14] MOV byte ptr [RSP + 0xf],AL JG 0x001df633 MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x14] MOV RCX,qword ptr [RSP + 0x20] MOV RDX,RCX ADD RDX,0x4 MOV qword ptr [RSP + 0x20],RDX CMP EAX,dword ptr [RCX + 0x4] SETLE AL MOV byte ptr [RSP + 0xf],AL LAB_001df633: MOV AL,byte ptr [RSP + 0xf] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001df641 JMP 0x001df650 LAB_001df641: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RDI + 0x14] CALL 0x001df350 JMP 0x001df667 LAB_001df650: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[0x31cfb0] MOV qword ptr [RAX + 0x70],RCX MOV byte ptr [RSP + 0x47],0x0 JMP 0x001df681 LAB_001df667: JMP 0x001df669 LAB_001df669: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x4 MOV qword ptr [RSP + 0x20],RAX JMP 0x001df5ca LAB_001df67c: MOV byte ptr [RSP + 0x47],0x1 LAB_001df681: MOV AL,byte ptr [RSP + 0x47] AND AL,0x1 ADD RSP,0x48 RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ int1 nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *param_1,int8 param_2,int8 param_3) { bool bVar1; long lVar2; int *piVar3; int *local_28; int8 local_18; int8 local_10; local_18 = param_2; local_10 = param_3; lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18); if (((lVar2 != 2) && (lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18), lVar2 != 4)) && (lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18), lVar2 != 6)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } add((int)param_1); local_28 = (int *)std::initializer_list<int>::begin((initializer_list<int> *)&local_18); while( true ) { piVar3 = (int *)std::initializer_list<int>::end((initializer_list<int> *)&local_18); if (local_28 == piVar3) { return 1; } get(param_1); bVar1 = false; if (*local_28 <= *(int *)(param_1 + 0x14)) { bVar1 = *(int *)(param_1 + 0x14) <= local_28[1]; local_28 = local_28 + 1; } if (!bVar1) break; add((int)param_1); local_28 = local_28 + 1; } *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; return 0; }
25,788
my_coll_rules_realloc
eloqsql/strings/ctype-uca.c
static int my_coll_rules_realloc(MY_COLL_RULES *rules, size_t n) { if (rules->nrules < rules->mrules || (rules->rule= rules->loader->realloc(rules->rule, sizeof(MY_COLL_RULE) * (rules->mrules= n + 128)))) return 0; return -1; }
O0
c
my_coll_rules_realloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax jb 0xa3473 movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq 0x90(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rdi movq -0x18(%rbp), %rcx addq $0x80, %rcx movq -0x10(%rbp), %rdx movq %rcx, 0x18(%rdx) imulq $0xa0, %rcx, %rsi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x20(%rcx) cmpq $0x0, %rax je 0xa347c movl $0x0, -0x4(%rbp) jmp 0xa3483 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_coll_rules_realloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jb short loc_A3473 mov rax, [rbp+var_10] mov rax, [rax+28h] mov rax, [rax+90h] mov rcx, [rbp+var_10] mov rdi, [rcx+20h] mov rcx, [rbp+var_18] add rcx, 80h mov rdx, [rbp+var_10] mov [rdx+18h], rcx imul rsi, rcx, 0A0h call rax mov rcx, [rbp+var_10] mov [rcx+20h], rax cmp rax, 0 jz short loc_A347C loc_A3473: mov [rbp+var_4], 0 jmp short loc_A3483 loc_A347C: mov [rbp+var_4], 0FFFFFFFFh loc_A3483: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_coll_rules_realloc(_QWORD *a1, long long a2) { long long ( *v2)(long long, long long); // rax long long v3; // rdi long long v4; // rax if ( a1[2] < a1[3] ) return 0; v2 = *(long long ( **)(long long, long long))(a1[5] + 144LL); v3 = a1[4]; a1[3] = a2 + 128; v4 = v2(v3, 160 * (a2 + 128)); if ( (a1[4] = v4) != 0LL ) return 0; else return (unsigned int)-1; }
my_coll_rules_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JC 0x001a3473 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RAX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x20] MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x80 MOV RDX,qword ptr [RBP + -0x10] MOV qword ptr [RDX + 0x18],RCX IMUL RSI,RCX,0xa0 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x20],RAX CMP RAX,0x0 JZ 0x001a347c LAB_001a3473: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a3483 LAB_001a347c: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001a3483: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_coll_rules_realloc(long param_1,long param_2) { code *pcVar1; long lVar2; if (*(ulong *)(param_1 + 0x18) <= *(ulong *)(param_1 + 0x10)) { pcVar1 = *(code **)(*(long *)(param_1 + 0x28) + 0x90); *(long *)(param_1 + 0x18) = param_2 + 0x80; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x20),(param_2 + 0x80) * 0xa0); *(long *)(param_1 + 0x20) = lVar2; if (lVar2 == 0) { return 0xffffffff; } } return 0; }
25,789
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
monkey531[P]llama/common/json.hpp
reference operator[](typename object_t::key_type key) { // implicitly convert null value to an empty object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value.object = create<object_t>(); assert_invariant(); } // operator[] only works for objects if (JSON_HEDLEY_LIKELY(is_object())) { auto result = m_data.m_value.object->emplace(std::move(key), nullptr); return set_parent(result.first->second); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 cmpb $0x0, (%rdi) jne 0x74ae0 movb $0x1, (%r14) movl $0x20, %edi callq 0x196d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x42e48 cmpb $0x1, (%r14) jne 0x74b4b movq 0x8(%r14), %r14 movq %rsp, %r15 movb $0x0, (%r15) movq $0x0, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x42e48 movq %r15, %rdi movl $0x1, %esi callq 0x42e48 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x4fe58 movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x42e48 movq %r14, %rdi callq 0x4fdb4 addq $0x20, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x19380 movq %rax, %rbx movq %r14, %rdi callq 0x43512 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x3ef25(%rip), %rsi # 0xb3a94 movq %rsp, %rdi callq 0x74bfa movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x4f4f8 xorl %ebp, %ebp leaq 0x6e732(%rip), %rsi # 0xe32c8 leaq -0x23023(%rip), %rdx # 0x51b7a movq %rbx, %rdi callq 0x19bb0 movq %rax, %r14 movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x42e48 movq %rbx, %rdi callq 0x4fdb4 jmp 0x74bf2 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x74be5 movq 0x10(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x74be5 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x74bf2 movq %rbx, %rdi callq 0x19520 movq %r14, %rdi callq 0x19c10
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi], 0 jnz short loc_74AE0 mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_74AE0: cmp byte ptr [r14], 1 jnz short loc_74B4B mov r14, [r14+8] mov r15, rsp mov byte ptr [r15], 0 mov qword ptr [r15+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rbx, 20h ; ' ' mov rax, rbx add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_74B4B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_28] mov [rdx], rax lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"... mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rbx, rsp mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_74BF2 mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_74BE5 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_74BE5 mov r14, rax mov bpl, 1 loc_74BE5: test bpl, bpl jz short loc_74BF2 mov rdi, rbx; void * call ___cxa_free_exception loc_74BF2: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // r14 long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx void *v7[9]; // [rsp+0h] [rbp-48h] BYREF if ( !*(_BYTE *)a1 ) { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( v7, "cannot use operator[] with a string argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v3 = *(_QWORD **)(a1 + 8); LOBYTE(v7[0]) = 0; v7[1] = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); v4 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( v3, a2, (long long)v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7); return v4 + 32; }
operator[]: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI],0x0 JNZ 0x00174ae0 MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x001196d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x00142e48 LAB_00174ae0: CMP byte ptr [R14],0x1 JNZ 0x00174b4b MOV R14,qword ptr [R14 + 0x8] MOV R15,RSP MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00142e48 MOV RDI,R15 MOV ESI,0x1 CALL 0x00142e48 LAB_00174b13: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0014fe58 LAB_00174b21: MOV RBX,RAX MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x00142e48 MOV RDI,R14 CALL 0x0014fdb4 ADD RBX,0x20 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00174b4b: MOV EDI,0x20 CALL 0x00119380 MOV RBX,RAX MOV RDI,R14 CALL 0x00143512 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_00174b68: LEA RSI,[0x1b3a94] MOV RDI,RSP CALL 0x00174bfa MOV BPL,0x1 LAB_00174b7a: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0014f4f8 XOR EBP,EBP LEA RSI,[0x1e32c8] LEA RDX,[0x151b7a] MOV RDI,RBX CALL 0x00119bb0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_2) { ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this_00; int8 *puVar1; long lVar2; int8 uVar3; bool bVar4; basic_json local_48 [8]; int8 local_40; char *local_28; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { this_00 = *(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8); local_48[0] = (basic_json)0x0; local_40 = 0; bVar4 = SUB81(local_48,0); assert_invariant(bVar4); assert_invariant(bVar4); /* try { // try from 00174b13 to 00174b20 has its CatchHandler @ 00174ba5 */ lVar2 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace(this_00,param_2,local_48); assert_invariant(bVar4); data::~data((data *)local_48); return lVar2 + 0x20; } uVar3 = __cxa_allocate_exception(0x20); local_28 = (char *)type_name(this); /* try { // try from 00174b68 to 00174b76 has its CatchHandler @ 00174bdf */ detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> ((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28); /* try { // try from 00174b7a to 00174ba4 has its CatchHandler @ 00174bbf */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x131,local_48,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&detail::type_error::typeinfo,detail::exception::~exception); }
25,790
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
monkey531[P]llama/common/json.hpp
reference operator[](typename object_t::key_type key) { // implicitly convert null value to an empty object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value.object = create<object_t>(); assert_invariant(); } // operator[] only works for objects if (JSON_HEDLEY_LIKELY(is_object())) { auto result = m_data.m_value.object->emplace(std::move(key), nullptr); return set_parent(result.first->second); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 movb (%rdi), %al testb %al, %al jne 0x721c8 movb $0x1, (%r14) movl $0x20, %edi callq 0x186d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x40bf2 movb (%r14), %al cmpb $0x1, %al jne 0x72231 movq 0x8(%r14), %r14 movq %rsp, %r15 movb $0x0, (%r15) movq $0x0, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x40bf2 movq %r15, %rdi movl $0x1, %esi callq 0x40bf2 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x4d884 movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x40bf2 movq %r14, %rdi callq 0x4d7e0 addq $0x20, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18380 movq %rax, %rbx movq %r14, %rdi callq 0x412e6 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x3d82f(%rip), %rsi # 0xafa84 movq %rsp, %rdi callq 0x722dd movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x4cf10 xorl %ebp, %ebp leaq 0x6d04c(%rip), %rsi # 0xdf2c8 leaq -0x22cd7(%rip), %rdx # 0x4f5ac movq %rbx, %rdi callq 0x18bb0 movq %rax, %r14 movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x40bf2 movq %rbx, %rdi callq 0x4d7e0 jmp 0x722d5 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x722c3 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 testb %bpl, %bpl jne 0x722cd jmp 0x722d5 movq %rax, %r14 movq %rbx, %rdi callq 0x18520 movq %r14, %rdi callq 0x18c10
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rbx, rsi mov r14, rdi mov al, [rdi] test al, al jnz short loc_721C8 mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov al, [r14] loc_721C8: cmp al, 1 jnz short loc_72231 mov r14, [r14+8] mov r15, rsp mov byte ptr [r15], 0 mov qword ptr [r15+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rbx, 20h ; ' ' mov rax, rbx add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_72231: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_28] mov [rdx], rax lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"... mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rbx, rsp mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_722D5 mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_722C3 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_722C3: test bpl, bpl jnz short loc_722CD jmp short loc_722D5 mov r14, rax loc_722CD: mov rdi, rbx; void * call ___cxa_free_exception loc_722D5: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long *a2) { char v2; // al long long v3; // rax _QWORD *v4; // r14 long long v5; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx void **v8[9]; // [rsp+0h] [rbp-48h] BYREF v2 = *(_BYTE *)a1; if ( !*(_BYTE *)a1 ) { *(_BYTE *)a1 = 1; v3 = operator new(0x20uLL); *(_OWORD *)v3 = 0LL; *(_QWORD *)(v3 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v3; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v2 = *(_BYTE *)a1; } if ( v2 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v8[4] = (void **)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( v8, "cannot use operator[] with a string argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, v8); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v4 = *(_QWORD **)(a1 + 8); LOBYTE(v8[0]) = 0; v8[1] = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8); v5 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( v4, a2, (long long)v8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8); return v5 + 32; }
operator[]: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI MOV AL,byte ptr [RDI] TEST AL,AL JNZ 0x001721c8 MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x001186d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x00140bf2 MOV AL,byte ptr [R14] LAB_001721c8: CMP AL,0x1 JNZ 0x00172231 MOV R14,qword ptr [R14 + 0x8] MOV R15,RSP MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00140bf2 MOV RDI,R15 MOV ESI,0x1 CALL 0x00140bf2 LAB_001721f9: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0014d884 LAB_00172207: MOV RBX,RAX MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x00140bf2 MOV RDI,R14 CALL 0x0014d7e0 ADD RBX,0x20 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00172231: MOV EDI,0x20 CALL 0x00118380 MOV RBX,RAX MOV RDI,R14 CALL 0x001412e6 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_0017224e: LEA RSI,[0x1afa84] MOV RDI,RSP CALL 0x001722dd MOV BPL,0x1 LAB_00172260: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0014cf10 XOR EBP,EBP LEA RSI,[0x1df2c8] LEA RDX,[0x14f5ac] MOV RDI,RBX CALL 0x00118bb0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_2) { ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this_00; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 *puVar2; long lVar3; int8 uVar4; bool bVar5; basic_json local_48 [8]; int8 local_40; char *local_28; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar2 = (int8 *)operator_new(0x20); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; *(int8 **)(this + 8) = puVar2; assert_invariant(SUB81(this,0)); bVar1 = *this; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { this_00 = *(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8); local_48[0] = (basic_json)0x0; local_40 = 0; bVar5 = SUB81(local_48,0); assert_invariant(bVar5); assert_invariant(bVar5); /* try { // try from 001721f9 to 00172206 has its CatchHandler @ 0017228b */ lVar3 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace(this_00,param_2,local_48); assert_invariant(bVar5); data::~data((data *)local_48); return lVar3 + 0x20; } uVar4 = __cxa_allocate_exception(0x20); local_28 = (char *)type_name(this); /* try { // try from 0017224e to 0017225c has its CatchHandler @ 001722ca */ detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> ((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28); /* try { // try from 00172260 to 0017228a has its CatchHandler @ 001722a5 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x131,local_48,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception); }
25,791
my_casedn_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str) { register const uchar *map= cs->to_lower; char *str_orig= str; while ((*str= (char) map[(uchar) *str]) != 0) str++; return (size_t) (str - str_orig); }
O0
c
my_casedn_str_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movb (%rax,%rcx), %al movq -0x10(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0xa16fa movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xa16d0 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
my_casedn_str_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+48h] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_A16D0: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov al, [rax+rcx] mov rcx, [rbp+var_10] mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_A16FA mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_A16D0 loc_A16FA: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] sub rax, rcx pop rbp retn
_BYTE * my_casedn_str_8bit(long long a1, _BYTE *a2) { char v2; // al long long v4; // [rsp+8h] [rbp-18h] _BYTE *v5; // [rsp+10h] [rbp-10h] v5 = a2; v4 = *(_QWORD *)(a1 + 72); while ( 1 ) { v2 = *(_BYTE *)(v4 + (unsigned __int8)*v5); *v5 = v2; if ( !v2 ) break; ++v5; } return (_BYTE *)(v5 - a2); }
my_casedn_str_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_001a16d0: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV AL,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x001a16fa MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001a16d0 LAB_001a16fa: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX POP RBP RET
long my_casedn_str_8bit(long param_1,byte *param_2) { byte bVar1; long lVar2; byte *local_18; lVar2 = *(long *)(param_1 + 0x48); local_18 = param_2; while (bVar1 = *(byte *)(lVar2 + (ulong)*local_18), *local_18 = bVar1, bVar1 != 0) { local_18 = local_18 + 1; } return (long)local_18 - (long)param_2; }
25,792
stbi_info_from_file
llama.cpp/examples/llava/../../common/stb_image.h
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; }
O3
c
stbi_info_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0x23520 movq %rax, %r13 movups 0x15bcc0(%rip), %xmm0 # 0x18c9a0 leaq 0x40(%rsp), %rax movups %xmm0, -0x28(%rax) movq 0x15bcc0(%rip), %rcx # 0x18c9b0 movq %rcx, -0x18(%rax) movq %rbx, -0x10(%rax) movabsq $0x8000000001, %rcx # imm = 0x8000000001 movq %rcx, -0x8(%rax) movl $0x0, 0x80(%rax) movq %rax, 0x98(%rax) movq %rax, 0x88(%rax) leaq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x3cfb1 movq 0xc8(%rbp), %rax movq %rax, 0xd8(%rbp) movq %rbp, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x30d6d movl %eax, %ebp movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x24ab0 movl %ebp, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_info_from_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi call _ftell mov r13, rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks lea rax, [rsp+118h+var_D8] movups xmmword ptr [rax-28h], xmm0 mov rcx, cs:off_18C9B0 mov [rax-18h], rcx mov [rax-10h], rbx mov rcx, 8000000001h mov [rax-8], rcx mov dword ptr [rax+80h], 0 mov [rax+98h], rax mov [rax+88h], rax lea rbp, [rsp+118h+var_110] mov rdi, rbp call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbp+0C8h] mov [rbp+0D8h], rax mov rdi, rbp mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) mov ebp, eax mov rdi, rbx mov rsi, r13 xor edx, edx call _fseek mov eax, ebp add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_info_from_file(long long a1, long long a2, long long a3, long long a4) { long long v6; // r13 unsigned int v7; // ebp _BYTE v9[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v10; // [rsp+18h] [rbp-100h] long long ( *v11)(void *); // [rsp+28h] [rbp-F0h] long long v12; // [rsp+30h] [rbp-E8h] long long v13; // [rsp+38h] [rbp-E0h] _BYTE v14[128]; // [rsp+40h] [rbp-D8h] BYREF int v15; // [rsp+C0h] [rbp-58h] _BYTE *v16; // [rsp+C8h] [rbp-50h] long long v17; // [rsp+D0h] [rbp-48h] _BYTE *v18; // [rsp+D8h] [rbp-40h] long long v19; // [rsp+E0h] [rbp-38h] v6 = ftell(a1); v10 = *(_OWORD *)&stbi__stdio_callbacks; v11 = stbi__stdio_eof; v12 = a1; v13 = 0x8000000001LL; v15 = 0; v18 = v14; v16 = v14; stbi__refill_buffer(v9); v19 = v17; v7 = stbi__info_main(v9, a2, a3, a4); fseek(a1, v6, 0LL); return v7; }
stbi_info_from_file: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI CALL 0x00123520 MOV R13,RAX MOVUPS XMM0,xmmword ptr [0x0028c9a0] LEA RAX,[RSP + 0x40] MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV RCX,qword ptr [0x0028c9b0] MOV qword ptr [RAX + -0x18],RCX MOV qword ptr [RAX + -0x10],RBX MOV RCX,0x8000000001 MOV qword ptr [RAX + -0x8],RCX MOV dword ptr [RAX + 0x80],0x0 MOV qword ptr [RAX + 0x98],RAX MOV qword ptr [RAX + 0x88],RAX LEA RBP,[RSP + 0x8] MOV RDI,RBP CALL 0x0013cfb1 MOV RAX,qword ptr [RBP + 0xc8] MOV qword ptr [RBP + 0xd8],RAX MOV RDI,RBP MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x00130d6d MOV EBP,EAX MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x00124ab0 MOV EAX,EBP ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 stbi_info_from_file(FILE *param_1,int *param_2,int *param_3,int *param_4) { int4 uVar1; long __off; stbi__context local_110 [40]; FILE *local_e8; int8 local_e0; int1 local_d8 [128]; int4 local_58; int1 *local_50; int8 local_48; int1 *local_40; int8 local_38; __off = ftell(param_1); local_50 = local_d8; local_110[0x10] = (stbi__context)stbi__stdio_callbacks[0]; local_110[0x11] = (stbi__context)stbi__stdio_callbacks[1]; local_110[0x12] = (stbi__context)stbi__stdio_callbacks[2]; local_110[0x13] = (stbi__context)stbi__stdio_callbacks[3]; local_110[0x14] = (stbi__context)stbi__stdio_callbacks[4]; local_110[0x15] = (stbi__context)stbi__stdio_callbacks[5]; local_110[0x16] = (stbi__context)stbi__stdio_callbacks[6]; local_110[0x17] = (stbi__context)stbi__stdio_callbacks[7]; local_110[0x18] = (stbi__context)stbi__stdio_callbacks[8]; local_110[0x19] = (stbi__context)stbi__stdio_callbacks[9]; local_110[0x1a] = (stbi__context)stbi__stdio_callbacks[10]; local_110[0x1b] = (stbi__context)stbi__stdio_callbacks[0xb]; local_110[0x1c] = (stbi__context)stbi__stdio_callbacks[0xc]; local_110[0x1d] = (stbi__context)stbi__stdio_callbacks[0xd]; local_110[0x1e] = (stbi__context)stbi__stdio_callbacks[0xe]; local_110[0x1f] = (stbi__context)stbi__stdio_callbacks[0xf]; local_110[0x20] = (stbi__context)stbi__stdio_callbacks[0x10]; local_110[0x21] = (stbi__context)stbi__stdio_callbacks[0x11]; local_110[0x22] = (stbi__context)stbi__stdio_callbacks[0x12]; local_110[0x23] = (stbi__context)stbi__stdio_callbacks[0x13]; local_110[0x24] = (stbi__context)stbi__stdio_callbacks[0x14]; local_110[0x25] = (stbi__context)stbi__stdio_callbacks[0x15]; local_110[0x26] = (stbi__context)stbi__stdio_callbacks[0x16]; local_110[0x27] = (stbi__context)stbi__stdio_callbacks[0x17]; local_e0 = 0x8000000001; local_58 = 0; local_e8 = param_1; local_40 = local_50; stbi__refill_buffer(local_110); local_38 = local_48; uVar1 = stbi__info_main(local_110,param_2,param_3,param_4); fseek(param_1,__off,0); return uVar1; }
25,793
google::protobuf::DescriptorPool::NewPlaceholderFile(google::protobuf::stringpiece_internal::StringPiece) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
FileDescriptor* DescriptorPool::NewPlaceholderFile( StringPiece name) const { MutexLockMaybe lock(mutex_); internal::FlatAllocator alloc; alloc.PlanArray<FileDescriptor>(1); alloc.PlanArray<std::string>(1); alloc.FinalizePlanning(tables_); return NewPlaceholderFileWithMutexHeld(name, alloc); }
O3
cpp
google::protobuf::DescriptorPool::NewPlaceholderFile(google::protobuf::stringpiece_internal::StringPiece) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rsi movq %rsp, %rdi callq 0xe01b4 leaq 0x8(%rsp), %r12 movl $0xd0, %edx movq %r12, %rdi xorl %esi, %esi callq 0x2c970 movq %r12, %rdi callq 0xcb618 leaq 0x8(%rsp), %rdi movl $0x1, %esi callq 0xcb692 leaq 0x20(%r15), %rsi leaq 0x8(%rsp), %rdi callq 0xcb91c leaq 0x8(%rsp), %rcx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xcba68 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xcc08f callq 0x2cd50 movq %rbx, %rax addq $0xd8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xcc0b2 callq 0x2cd50 movq %rbx, %rdi callq 0x2e220
_ZNK6google8protobuf14DescriptorPool18NewPlaceholderFileENS0_20stringpiece_internal11StringPieceE: push r15 push r14 push r12 push rbx sub rsp, 0D8h mov rbx, rdx mov r14, rsi mov r15, rdi mov rsi, [rdi] mov rdi, rsp call _ZN6google8protobuf8internal14MutexLockMaybeC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(google::protobuf::internal::WrappedMutex *) lea r12, [rsp+0F8h+var_F0] mov edx, 0D0h mov rdi, r12 xor esi, esi call _memset mov rdi, r12 call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_14FileDescriptorEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor>(int) lea rdi, [rsp+0F8h+var_F0] mov esi, 1 call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int) lea rsi, [r15+20h] lea rdi, [rsp+0F8h+var_F0] call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE16FinalizePlanningIKSt10unique_ptrINS0_14DescriptorPool6TablesESt14default_deleteISO_EEEEvRT_; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::FinalizePlanning<std::unique_ptr<google::protobuf::DescriptorPool::Tables> const>(std::unique_ptr<google::protobuf::DescriptorPool::Tables> const &) lea rcx, [rsp+0F8h+var_F0] mov rdi, r15 mov rsi, r14 mov rdx, rbx call _ZNK6google8protobuf14DescriptorPool31NewPlaceholderFileWithMutexHeldENS0_20stringpiece_internal11StringPieceERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorPool::NewPlaceholderFileWithMutexHeld(google::protobuf::stringpiece_internal::StringPiece,google::protobuf::internal::FlatAllocator &) mov rbx, rax mov rdi, [rsp+0F8h+var_F8] test rdi, rdi jz short loc_CC08F call _pthread_mutex_unlock loc_CC08F: mov rax, rbx add rsp, 0D8h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+0] test rdi, rdi jz short loc_CC0B2 call _pthread_mutex_unlock loc_CC0B2: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::DescriptorPool::NewPlaceholderFile(_QWORD *a1, long long a2, long long a3) { int v4; // r8d int v5; // r9d long long v6; // rbx long long v8; // [rsp+0h] [rbp-F8h] BYREF _QWORD v9[30]; // [rsp+8h] [rbp-F0h] BYREF google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(&v8, *a1); memset(v9, 0LL, 208LL); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor>((long long)v9); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>( (long long)v9, 1); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::FinalizePlanning<std::unique_ptr<google::protobuf::DescriptorPool::Tables> const>( v9, a1 + 4); v6 = google::protobuf::DescriptorPool::NewPlaceholderFileWithMutexHeld((long long)a1, a2, a3, (int)v9, v4, v5); if ( v8 ) pthread_mutex_unlock(v8); return v6; }
NewPlaceholderFile: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RSI,qword ptr [RDI] MOV RDI,RSP CALL 0x001e01b4 LEA R12,[RSP + 0x8] MOV EDX,0xd0 MOV RDI,R12 XOR ESI,ESI CALL 0x0012c970 LAB_001cc046: MOV RDI,R12 CALL 0x001cb618 LEA RDI,[RSP + 0x8] MOV ESI,0x1 CALL 0x001cb692 LEA RSI,[R15 + 0x20] LEA RDI,[RSP + 0x8] CALL 0x001cb91c LEA RCX,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x001cba68 LAB_001cc07e: MOV RBX,RAX MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x001cc08f CALL 0x0012cd50 LAB_001cc08f: MOV RAX,RBX ADD RSP,0xd8 POP RBX POP R12 POP R14 POP R15 RET
/* google::protobuf::DescriptorPool::NewPlaceholderFile(google::protobuf::stringpiece_internal::StringPiece) const */ int8 google::protobuf::DescriptorPool::NewPlaceholderFile (int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; pthread_mutex_t *local_f8; FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> local_f0 [208]; internal::MutexLockMaybe::MutexLockMaybe((MutexLockMaybe *)&local_f8,(WrappedMutex *)*param_1); memset(local_f0,0,0xd0); /* try { // try from 001cc046 to 001cc07d has its CatchHandler @ 001cc0a1 */ (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<google::protobuf::FileDescriptor>((int)local_f0); (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<std::__cxx11::string>(local_f0,1); (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> :: FinalizePlanning<std::unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>const> (local_f0,(unique_ptr *)(param_1 + 4)); uVar1 = NewPlaceholderFileWithMutexHeld(param_1,param_2,param_3,local_f0); if (local_f8 != (pthread_mutex_t *)0x0) { pthread_mutex_unlock(local_f8); } return uVar1; }
25,794
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O3
c
get_internal_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %esi, %r13d leaq 0xb6d903(%rip), %r12 # 0xc01ab0 movq (%r12,%r13,8), %rbx testq %rbx, %rbx je 0x94296 testb $0x1, 0xd(%rbx) jne 0x9429d movq %rdx, %r15 movq %rdi, %r14 leaq 0xb766ff(%rip), %rax # 0xc0a8d0 cmpq $0x0, 0x40(%rax) jne 0x9447f leaq 0xb766ed(%rip), %rdi # 0xc0a8d0 callq 0x291d0 movl 0xc(%rbx), %eax testb $0x9, %al jne 0x94289 leaq -0x230(%rbp), %rdi callq 0x93ab3 movq 0x10(%rbx), %rsi leaq 0x48b9c(%rip), %rdx # 0xdcda6 movq %rax, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0xd8700 leaq -0x2e0(%rbp), %rdi movb $0x0, (%rdi) leaq -0xd01(%rip), %rax # 0x93526 movq %rax, 0x80(%rdi) leaq -0xd00(%rip), %rax # 0x93535 movq %rax, 0x88(%rdi) leaq -0xcf3(%rip), %rax # 0x93550 movq %rax, 0x90(%rdi) leaq 0xd335(%rip), %rax # 0xa1586 movq %rax, 0x98(%rdi) leaq 0x2f24d9(%rip), %rax # 0x386738 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xd02(%rip), %rax # 0x9356e movq %rax, 0xa8(%rdi) leaq -0x230(%rbp), %rsi movq %r15, %rdx callq 0x94e5c movl 0xc(%rbx), %eax btl $0x9, %eax jb 0x942ad xorl %ebx, %ebx jmp 0x9443f xorl %ebx, %ebx jmp 0x9445b leaq 0xb7187c(%rip), %rax # 0xc05b20 incq (%rax,%r13,8) jmp 0x9445b btl $0x8, %eax jb 0x94434 cmpq $0x0, 0x40(%rbx) je 0x942d3 cmpq $0x0, 0x50(%rbx) je 0x942d3 cmpq $0x0, 0x48(%rbx) je 0x942d3 cmpq $0x0, 0x68(%rbx) jne 0x94302 movq 0x10(%rbx), %rdi movl $0x20, %esi callq 0x93f64 testl %eax, %eax je 0x94302 cmpl %eax, (%rbx) je 0x94302 movl %eax, %eax movq (%r12,%rax,8), %rsi testq %rsi, %rsi je 0x94302 testb $0x2, 0xd(%rsi) je 0x94302 movq %rbx, %rdi callq 0x950a5 cmpq $0x0, 0x58(%rbx) jne 0x943f6 testb $0x10, 0xc(%rbx) jne 0x943f6 movq 0x38(%rbx), %rax testq %rax, %rax je 0x943f6 leaq 0x48b01(%rip), %rsi # 0xdce2c movl $0x8, %edx movq %rax, -0x2e8(%rbp) movq -0x2e8(%rbp), %rdi callq 0x29190 movq -0x2e8(%rbp), %rcx testl %eax, %eax jne 0x943f6 leaq 0x8(%rcx), %rdi movq %rdi, -0x2f0(%rbp) movl $0x5d, %esi callq 0x293e0 testq %rax, %rax setne %dl movq -0x2e8(%rbp), %rcx addq $0x28, %rcx cmpq %rax, %rcx seta %cl andb %dl, %cl cmpb $0x1, %cl jne 0x943f6 movq -0x2f0(%rbp), %rsi subq %rsi, %rax leaq -0x2e0(%rbp), %rdi movl $0x21, %ecx movq %rax, %rdx movq %rax, -0x2e8(%rbp) callq 0x293c0 movq -0x2e8(%rbp), %rax movb $0x0, -0x2e0(%rbp,%rax) leaq -0x2e0(%rbp), %rdi movq %r15, %rsi callq 0x93c47 testl %eax, %eax je 0x943f6 cmpl %eax, (%rbx) je 0x943f6 movl %eax, %eax movq (%r12,%rax,8), %rax testq %rax, %rax je 0x943f6 testb $0x2, 0xd(%rax) je 0x943f6 cmpq $0x0, 0x58(%rbx) jne 0x943f6 testb $0x10, 0xc(%rbx) jne 0x943f6 movq 0x58(%rax), %rax movq %rax, 0x58(%rbx) movq 0xb8(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x94411 movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al jne 0x9442c movq 0xc0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x94430 movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al je 0x94430 xorl %ebx, %ebx jmp 0x94434 orb $0x1, 0xd(%rbx) leaq 0xb716e5(%rip), %rax # 0xc05b20 incq (%rax,%r13,8) leaq 0xb7648a(%rip), %rax # 0xc0a8d0 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0x94489 leaq 0xb7647a(%rip), %rdi # 0xc0a8d0 callq 0x291a0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9449b movq %rbx, %rax addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2eb87 jmp 0x941e8 leaq 0x2f2bc0(%rip), %rax # 0x387050 movq (%rax), %rax callq *0x160(%rax) jmp 0x9444f callq 0x29220
get_internal_charset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2C8h mov rax, fs:28h mov [rbp+var_30], rax mov r13d, esi lea r12, all_charsets mov rbx, [r12+r13*8] test rbx, rbx jz loc_94296 test byte ptr [rbx+0Dh], 1 jnz loc_9429D mov r15, rdx mov r14, rdi lea rax, THR_LOCK_charset cmp qword ptr [rax+40h], 0 jnz loc_9447F lea rdi, THR_LOCK_charset call _pthread_mutex_lock loc_941E8: mov eax, [rbx+0Ch] test al, 9 jnz loc_94289 lea rdi, [rbp+var_230] call get_charsets_dir mov rsi, [rbx+10h] lea rdx, aIndexXml+5; ".xml" mov rdi, rax xor ecx, ecx xor eax, eax call strxmov lea rdi, [rbp+var_2E0] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax lea rsi, [rbp+var_230] mov rdx, r15 call my_read_charset_file mov eax, [rbx+0Ch] loc_94289: bt eax, 9 jb short loc_942AD xor ebx, ebx jmp loc_9443F loc_94296: xor ebx, ebx jmp loc_9445B loc_9429D: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] jmp loc_9445B loc_942AD: bt eax, 8 jb loc_94434 cmp qword ptr [rbx+40h], 0 jz short loc_942D3 cmp qword ptr [rbx+50h], 0 jz short loc_942D3 cmp qword ptr [rbx+48h], 0 jz short loc_942D3 cmp qword ptr [rbx+68h], 0 jnz short loc_94302 loc_942D3: mov rdi, [rbx+10h] mov esi, 20h ; ' ' call get_charset_number_internal test eax, eax jz short loc_94302 cmp [rbx], eax jz short loc_94302 mov eax, eax mov rsi, [r12+rax*8] test rsi, rsi jz short loc_94302 test byte ptr [rsi+0Dh], 2 jz short loc_94302 mov rdi, rbx call inherit_charset_data loc_94302: cmp qword ptr [rbx+58h], 0 jnz loc_943F6 test byte ptr [rbx+0Ch], 10h jnz loc_943F6 mov rax, [rbx+38h] test rax, rax jz loc_943F6 lea rsi, aImport; "[import " mov edx, 8 mov [rbp+var_2E8], rax mov rdi, [rbp+var_2E8] call _strncmp mov rcx, [rbp+var_2E8] test eax, eax jnz loc_943F6 lea rdi, [rcx+8] mov [rbp+var_2F0], rdi mov esi, 5Dh ; ']' call _strchr test rax, rax setnz dl mov rcx, [rbp+var_2E8] add rcx, 28h ; '(' cmp rcx, rax setnbe cl and cl, dl cmp cl, 1 jnz short loc_943F6 mov rsi, [rbp+var_2F0] sub rax, rsi lea rdi, [rbp+var_2E0] mov ecx, 21h ; '!' mov rdx, rax mov [rbp+var_2E8], rax call ___memcpy_chk mov rax, [rbp+var_2E8] mov [rbp+rax+var_2E0], 0 lea rdi, [rbp+var_2E0] mov rsi, r15 call get_collation_number test eax, eax jz short loc_943F6 cmp [rbx], eax jz short loc_943F6 mov eax, eax mov rax, [r12+rax*8] test rax, rax jz short loc_943F6 test byte ptr [rax+0Dh], 2 jz short loc_943F6 cmp qword ptr [rbx+58h], 0 jnz short loc_943F6 test byte ptr [rbx+0Ch], 10h jnz short loc_943F6 mov rax, [rax+58h] mov [rbx+58h], rax loc_943F6: mov rax, [rbx+0B8h] mov rax, [rax] test rax, rax jz short loc_94411 mov rdi, rbx mov rsi, r14 call rax test al, al jnz short loc_9442C loc_94411: mov rax, [rbx+0C0h] mov rax, [rax] test rax, rax jz short loc_94430 mov rdi, rbx mov rsi, r14 call rax test al, al jz short loc_94430 loc_9442C: xor ebx, ebx jmp short loc_94434 loc_94430: or byte ptr [rbx+0Dh], 1 loc_94434: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] loc_9443F: lea rax, THR_LOCK_charset mov rdi, [rax+40h] test rdi, rdi jnz short loc_94489 loc_9444F: lea rdi, THR_LOCK_charset call _pthread_mutex_unlock loc_9445B: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9449B mov rax, rbx add rsp, 2C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9447F: call get_internal_charset_cold_1 jmp loc_941E8 loc_94489: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_9444F loc_9449B: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { long long v3; // r13 long long v4; // rbx long long v6; // rdx long long v7; // rcx int v8; // eax int charsets_dir; // eax int v10; // r8d int v11; // r9d int charset_number_internal; // eax long long v13; // rsi long long v14; // rax int v15; // eax unsigned long long v16; // rax int collation_number; // eax long long v18; // rax unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax long long v22; // [rsp+0h] [rbp-2F0h] long long v23; // [rsp+8h] [rbp-2E8h] _BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF long long ( *v25)(long long); // [rsp+90h] [rbp-260h] long long ( *v26)(long long); // [rsp+98h] [rbp-258h] long long ( *v27)(long long, long long); // [rsp+A0h] [rbp-250h] long long ( *v28)(_QWORD); // [rsp+A8h] [rbp-248h] long long ( *v29)(); // [rsp+B0h] [rbp-240h] long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h] _BYTE v31[512]; // [rsp+C0h] [rbp-230h] BYREF unsigned long long v32; // [rsp+2C0h] [rbp-30h] v32 = __readfsqword(0x28u); v3 = a2; v4 = all_charsets[a2]; if ( !v4 ) return 0LL; if ( (*(_BYTE *)(v4 + 13) & 1) != 0 ) { ++my_collation_statistics[a2]; } else { if ( THR_LOCK_charset[8] ) get_internal_charset_cold_1(); else pthread_mutex_lock(THR_LOCK_charset); v8 = *(_DWORD *)(v4 + 12); if ( (v8 & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v31); strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11); v24[0] = 0; v25 = my_once_alloc_c; v26 = my_malloc_c; v27 = my_realloc_c; v28 = my_free; v29 = my_charset_error_reporter; v30 = add_collation; my_read_charset_file(v24, v31, a3); v8 = *(_DWORD *)(v4 + 12); } if ( (v8 & 0x200) != 0 ) { if ( (v8 & 0x100) == 0 ) { if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) ) { charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32); if ( charset_number_internal ) { if ( *(_DWORD *)v4 != charset_number_internal ) { v13 = all_charsets[charset_number_internal]; if ( v13 ) { if ( (*(_BYTE *)(v13 + 13) & 2) != 0 ) inherit_charset_data(v4); } } } } if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) { v14 = *(_QWORD *)(v4 + 56); if ( v14 ) { v23 = *(_QWORD *)(v4 + 56); v15 = strncmp(v14, "[import ", 8LL); v7 = v23; if ( !v15 ) { v22 = v23 + 8; v16 = strchr(v23 + 8, 93LL); LOBYTE(v6) = v16 != 0; v7 = v23 + 40; LOBYTE(v7) = v16 != 0 && v23 + 40 > v16; if ( (_BYTE)v7 == 1 ) { v23 = v16 - v22; __memcpy_chk(v24, v22, v16 - v22, 33LL); v24[v23] = 0; collation_number = get_collation_number((long long)v24, a3); if ( collation_number ) { if ( *(_DWORD *)v4 != collation_number ) { v18 = all_charsets[collation_number]; if ( v18 ) { if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) *(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88); } } } } } } } v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184); if ( v19 && v19(v4, a1, v6, v7) || (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL && v20(v4, a1, v6, v7) ) { v4 = 0LL; } else { *(_BYTE *)(v4 + 13) |= 1u; } } ++my_collation_statistics[v3]; } else { v4 = 0LL; } if ( THR_LOCK_charset[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_charset); } return v4; }
get_internal_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,ESI LEA R12,[0xd01ab0] MOV RBX,qword ptr [R12 + R13*0x8] TEST RBX,RBX JZ 0x00194296 TEST byte ptr [RBX + 0xd],0x1 JNZ 0x0019429d MOV R15,RDX MOV R14,RDI LEA RAX,[0xd0a8d0] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x0019447f LEA RDI,[0xd0a8d0] CALL 0x001291d0 LAB_001941e8: MOV EAX,dword ptr [RBX + 0xc] TEST AL,0x9 JNZ 0x00194289 LEA RDI,[RBP + -0x230] CALL 0x00193ab3 MOV RSI,qword ptr [RBX + 0x10] LEA RDX,[0x1dcda6] MOV RDI,RAX XOR ECX,ECX XOR EAX,EAX CALL 0x001d8700 LEA RDI,[RBP + -0x2e0] MOV byte ptr [RDI],0x0 LEA RAX,[0x193526] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x193535] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x193550] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1a1586] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x486738] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x19356e] MOV qword ptr [RDI + 0xa8],RAX LEA RSI,[RBP + -0x230] MOV RDX,R15 CALL 0x00194e5c MOV EAX,dword ptr [RBX + 0xc] LAB_00194289: BT EAX,0x9 JC 0x001942ad XOR EBX,EBX JMP 0x0019443f LAB_00194296: XOR EBX,EBX JMP 0x0019445b LAB_0019429d: LEA RAX,[0xd05b20] INC qword ptr [RAX + R13*0x8] JMP 0x0019445b LAB_001942ad: BT EAX,0x8 JC 0x00194434 CMP qword ptr [RBX + 0x40],0x0 JZ 0x001942d3 CMP qword ptr [RBX + 0x50],0x0 JZ 0x001942d3 CMP qword ptr [RBX + 0x48],0x0 JZ 0x001942d3 CMP qword ptr [RBX + 0x68],0x0 JNZ 0x00194302 LAB_001942d3: MOV RDI,qword ptr [RBX + 0x10] MOV ESI,0x20 CALL 0x00193f64 TEST EAX,EAX JZ 0x00194302 CMP dword ptr [RBX],EAX JZ 0x00194302 MOV EAX,EAX MOV RSI,qword ptr [R12 + RAX*0x8] TEST RSI,RSI JZ 0x00194302 TEST byte ptr [RSI + 0xd],0x2 JZ 0x00194302 MOV RDI,RBX CALL 0x001950a5 LAB_00194302: CMP qword ptr [RBX + 0x58],0x0 JNZ 0x001943f6 TEST byte ptr [RBX + 0xc],0x10 JNZ 0x001943f6 MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x001943f6 LEA RSI,[0x1dce2c] MOV EDX,0x8 MOV qword ptr [RBP + -0x2e8],RAX MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x00129190 MOV RCX,qword ptr [RBP + -0x2e8] TEST EAX,EAX JNZ 0x001943f6 LEA RDI,[RCX + 0x8] MOV qword ptr [RBP + -0x2f0],RDI MOV ESI,0x5d CALL 0x001293e0 TEST RAX,RAX SETNZ DL MOV RCX,qword ptr [RBP + -0x2e8] ADD RCX,0x28 CMP RCX,RAX SETA CL AND CL,DL CMP CL,0x1 JNZ 0x001943f6 MOV RSI,qword ptr [RBP + -0x2f0] SUB RAX,RSI LEA RDI,[RBP + -0x2e0] MOV ECX,0x21 MOV RDX,RAX MOV qword ptr [RBP + -0x2e8],RAX CALL 0x001293c0 MOV RAX,qword ptr [RBP + -0x2e8] MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0 LEA RDI,[RBP + -0x2e0] MOV RSI,R15 CALL 0x00193c47 TEST EAX,EAX JZ 0x001943f6 CMP dword ptr [RBX],EAX JZ 0x001943f6 MOV EAX,EAX MOV RAX,qword ptr [R12 + RAX*0x8] TEST RAX,RAX JZ 0x001943f6 TEST byte ptr [RAX + 0xd],0x2 JZ 0x001943f6 CMP qword ptr [RBX + 0x58],0x0 JNZ 0x001943f6 TEST byte ptr [RBX + 0xc],0x10 JNZ 0x001943f6 MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x58],RAX LAB_001943f6: MOV RAX,qword ptr [RBX + 0xb8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00194411 MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JNZ 0x0019442c LAB_00194411: MOV RAX,qword ptr [RBX + 0xc0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00194430 MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JZ 0x00194430 LAB_0019442c: XOR EBX,EBX JMP 0x00194434 LAB_00194430: OR byte ptr [RBX + 0xd],0x1 LAB_00194434: LEA RAX,[0xd05b20] INC qword ptr [RAX + R13*0x8] LAB_0019443f: LEA RAX,[0xd0a8d0] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x00194489 LAB_0019444f: LEA RDI,[0xd0a8d0] CALL 0x001291a0 LAB_0019445b: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019449b MOV RAX,RBX ADD RSP,0x2c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019447f: CALL 0x0012eb87 JMP 0x001941e8 LAB_00194489: LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0019444f LAB_0019449b: CALL 0x00129220
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3) { char *__s; char *__s1; long lVar1; char cVar2; uint uVar3; int iVar4; int8 uVar5; char *pcVar6; uint *puVar7; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2 = param_2 & 0xffffffff; puVar7 = (uint *)(&all_charsets)[param_2]; if (puVar7 == (uint *)0x0) { puVar7 = (uint *)0x0; goto LAB_0019445b; } if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) { *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; goto LAB_0019445b; } if (THR_LOCK_charset._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset); } else { get_internal_charset_cold_1(); } uVar3 = puVar7[3]; if ((uVar3 & 9) == 0) { uVar5 = get_charsets_dir(local_238); strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; my_read_charset_file(local_2e8,local_238,param_3); uVar3 = puVar7[3]; } if ((uVar3 >> 9 & 1) == 0) { puVar7 = (uint *)0x0; } else { if ((uVar3 >> 8 & 1) == 0) { if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) || (*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) { uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20); if (((uVar3 != 0) && (*puVar7 != uVar3)) && (((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0)))) { inherit_charset_data(puVar7); } } if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) && (__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) { iVar4 = strncmp(__s1,"[import ",8); if (iVar4 == 0) { __s = __s1 + 8; pcVar6 = strchr(__s,0x5d); if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) { __memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21); local_2e8[(long)pcVar6 - (long)__s] = 0; uVar3 = get_collation_number(local_2e8,param_3); if (((((uVar3 != 0) && (*puVar7 != uVar3)) && (lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) && (((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) && ((puVar7[3] & 0x10) == 0)) { *(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58); } } } } if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) { LAB_00194411: if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1); if (cVar2 != '\0') goto LAB_0019442c; } *(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1; } else { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1); if (cVar2 == '\0') goto LAB_00194411; LAB_0019442c: puVar7 = (uint *)0x0; } } *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; } if (THR_LOCK_charset._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset); LAB_0019445b: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return puVar7; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,795
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, int, 0>(fmt::v10::appender, int)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); auto it = reserve(out, size); if (auto ptr = to_pointer<Char>(it, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits); return out; } if (negative) *it++ = static_cast<Char>('-'); it = format_decimal<Char>(it, abs_value, num_digits).end; return base_iterator(out, it); }
O0
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, int, 0>(fmt::v10::appender, int): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x108(%rsp) movq %rsi, 0xf0(%rsp) movq %rdx, 0xf8(%rsp) movq 0xf0(%rsp), %rax movq 0xf8(%rsp), %rcx movq %rcx, 0xe8(%rsp) movq %rax, 0xe0(%rsp) movq 0xe0(%rsp), %rax movq 0xe8(%rsp), %rcx movq %rcx, 0xd8(%rsp) movq %rax, 0xd0(%rsp) movq 0xe0(%rsp), %rax movq 0xe8(%rsp), %rcx movq %rcx, 0xb8(%rsp) movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0xa1350 andb $0x1, %al movb %al, 0xcf(%rsp) testb $0x1, 0xcf(%rsp) je 0xa1154 movq 0xd8(%rsp), %rcx xorl %eax, %eax negq 0xd0(%rsp) sbbq %rcx, %rax movq %rax, 0xd8(%rsp) movq 0xd0(%rsp), %rax movq 0xd8(%rsp), %rcx movq %rcx, 0x98(%rsp) movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0xa1380 movl %eax, 0xac(%rsp) movb 0xcf(%rsp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax cltq movslq 0xac(%rsp), %rcx addq %rcx, %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rsi leaq 0x108(%rsp), %rdi callq 0xa0060 movq (%rax), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x88(%rsp), %rsi movq 0x70(%rsp), %rdi callq 0xa0070 movq %rax, 0x78(%rsp) cmpq $0x0, 0x78(%rsp) je 0xa1277 testb $0x1, 0xcf(%rsp) je 0xa1223 movq 0x78(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x78(%rsp) movb $0x2d, (%rax) movq 0x78(%rsp), %rdi movq 0xd0(%rsp), %rax movq 0xd8(%rsp), %rdx movl 0xac(%rsp), %ecx movq %rdx, 0x68(%rsp) movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0xa13d0 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x110(%rsp) jmp 0xa1339 testb $0x1, 0xcf(%rsp) je 0xa12b1 movb $0x2d, 0x4f(%rsp) leaq 0x80(%rsp), %rdi xorl %esi, %esi callq 0xa0270 movq %rax, 0x40(%rsp) leaq 0x40(%rsp), %rdi callq 0xa0290 movq %rax, %rdi leaq 0x4f(%rsp), %rsi callq 0xa02a0 movq 0x80(%rsp), %rax movq %rax, 0x28(%rsp) movq 0xd0(%rsp), %rax movq 0xd8(%rsp), %rdx movl 0xac(%rsp), %ecx movq 0x28(%rsp), %rdi movq %rdx, 0x18(%rsp) movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0xa15f0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x80(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi movq (%rsp), %rsi callq 0xa0360 movq %rax, 0x110(%rsp) movq 0x110(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq nopl (%rax)
_ZN3fmt3v106detail5writeIcNS0_8appenderEnTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_: sub rsp, 118h mov [rsp+118h+var_10], rdi mov [rsp+118h+var_28], rsi mov [rsp+118h+var_20], rdx mov rax, [rsp+118h+var_28] mov rcx, [rsp+118h+var_20] mov [rsp+118h+var_30], rcx mov [rsp+118h+var_38], rax mov rax, [rsp+118h+var_38] mov rcx, [rsp+118h+var_30] mov [rsp+118h+var_40], rcx mov [rsp+118h+var_48], rax mov rax, [rsp+118h+var_38] mov rcx, [rsp+118h+var_30] mov [rsp+118h+var_60], rcx mov [rsp+118h+var_68], rax mov rdi, [rsp+118h+var_68] mov rsi, [rsp+118h+var_60] call _ZN3fmt3v106detail11is_negativeInTnNSt9enable_ifIXsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_ and al, 1 mov [rsp+118h+var_49], al test [rsp+118h+var_49], 1 jz short loc_A1154 mov rcx, [rsp+118h+var_40] xor eax, eax neg [rsp+118h+var_48] sbb rax, rcx mov [rsp+118h+var_40], rax loc_A1154: mov rax, [rsp+118h+var_48] mov rcx, [rsp+118h+var_40] mov qword ptr [rsp+118h+var_80], rcx mov [rsp+118h+var_88], rax mov rdi, [rsp+118h+var_88]; this mov rsi, qword ptr [rsp+118h+var_80]; unsigned __int128 call _ZN3fmt3v106detail12count_digitsEo; fmt::v10::detail::count_digits(unsigned __int128) mov [rsp+118h+var_6C], eax mov dl, [rsp+118h+var_49] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx cdqe movsxd rcx, [rsp+118h+var_6C] add rax, rcx mov [rsp+118h+var_90], rax mov rsi, [rsp+118h+var_90] lea rdi, [rsp+118h+var_10] call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong) mov rax, [rax] mov [rsp+118h+var_98], rax mov rax, [rsp+118h+var_98] mov [rsp+118h+var_A8], rax mov rsi, [rsp+118h+var_90] mov rdi, [rsp+118h+var_A8] call _ZN3fmt3v106detail10to_pointerIcEEPT_NSt11conditionalIXsr3std7is_sameIS3_cEE5valueENS0_8appenderESt20back_insert_iteratorINS1_6bufferIS3_EEEE4typeEm mov [rsp+118h+var_A0], rax cmp [rsp+118h+var_A0], 0 jz short loc_A1277 test [rsp+118h+var_49], 1 jz short loc_A1223 mov rax, [rsp+118h+var_A0] mov rcx, rax add rcx, 1 mov [rsp+118h+var_A0], rcx mov byte ptr [rax], 2Dh ; '-' loc_A1223: mov rdi, [rsp+118h+var_A0] mov rax, [rsp+118h+var_48] mov rdx, [rsp+118h+var_40] mov ecx, [rsp+118h+var_6C] mov [rsp+118h+var_B0], rdx mov [rsp+118h+var_B8], rax mov rsi, [rsp+118h+var_B8] mov rdx, [rsp+118h+var_B0] call _ZN3fmt3v106detail14format_decimalIcoEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,unsigned __int128>(char *,unsigned __int128,int) mov [rsp+118h+var_C8], rax mov [rsp+118h+var_C0], rdx mov rax, [rsp+118h+var_10] mov [rsp+118h+var_8], rax jmp loc_A1339 loc_A1277: test [rsp+118h+var_49], 1 jz short loc_A12B1 mov [rsp+118h+var_C9], 2Dh ; '-' lea rdi, [rsp+118h+var_98] xor esi, esi call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int) mov [rsp+118h+var_D8], rax lea rdi, [rsp+118h+var_D8] call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void) mov rdi, rax lea rsi, [rsp+118h+var_C9] call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&) loc_A12B1: mov rax, [rsp+118h+var_98] mov [rsp+118h+var_F0], rax mov rax, [rsp+118h+var_48] mov rdx, [rsp+118h+var_40] mov ecx, [rsp+118h+var_6C] mov rdi, [rsp+118h+var_F0] mov [rsp+118h+var_100], rdx mov [rsp+118h+var_108], rax mov rsi, [rsp+118h+var_108] mov rdx, [rsp+118h+var_100] call _ZN3fmt3v106detail14format_decimalIcoNS0_8appenderETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEENS1_21format_decimal_resultIS7_EES7_T0_i mov [rsp+118h+var_E8], rax mov [rsp+118h+var_E0], rdx mov rax, [rsp+118h+var_E0] mov [rsp+118h+var_98], rax mov rax, [rsp+118h+var_10] mov [rsp+118h+var_110], rax mov rax, [rsp+118h+var_98] mov [rsp+118h+var_118], rax mov rdi, [rsp+118h+var_110] mov rsi, [rsp+118h+var_118] call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender) mov [rsp+118h+var_8], rax loc_A1339: mov rax, [rsp+118h+var_8] add rsp, 118h retn
long long ZN3fmt3v106detail5writeIcNS0_8appenderEnTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_( long long a1, long long a2, long long a3) { unsigned long long v3; // rdx _BYTE *v4; // rax long long v5; // rdx _QWORD *v6; // rax long long v7; // rdx long long v9; // [rsp+40h] [rbp-D8h] BYREF char v10; // [rsp+4Fh] [rbp-C9h] BYREF long long v11; // [rsp+50h] [rbp-C8h] long long v12; // [rsp+58h] [rbp-C0h] __int128 v13; // [rsp+60h] [rbp-B8h] long long v14; // [rsp+70h] [rbp-A8h] long long v15; // [rsp+78h] [rbp-A0h] long long v16; // [rsp+80h] [rbp-98h] BYREF long long v17; // [rsp+88h] [rbp-90h] __int128 v18; // [rsp+90h] [rbp-88h] unsigned int v19; // [rsp+ACh] [rbp-6Ch] long long v20; // [rsp+B0h] [rbp-68h] long long v21; // [rsp+B8h] [rbp-60h] char v22; // [rsp+CFh] [rbp-49h] __int128 v23; // [rsp+D0h] [rbp-48h] long long v24; // [rsp+E0h] [rbp-38h] long long v25; // [rsp+E8h] [rbp-30h] long long v26; // [rsp+F0h] [rbp-28h] long long v27; // [rsp+F8h] [rbp-20h] long long v28; // [rsp+108h] [rbp-10h] BYREF v28 = a1; v26 = a2; v27 = a3; v25 = a3; v24 = a2; *((_QWORD *)&v23 + 1) = a3; *(_QWORD *)&v23 = a2; v21 = a3; v20 = a2; v22 = ZN3fmt3v106detail11is_negativeInTnNSt9enable_ifIXsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_(a2, a3) & 1; if ( v22 ) v23 = -v23; v18 = v23; v19 = fmt::v10::detail::count_digits((fmt::v10::detail *)v23, __PAIR128__(v3, *((unsigned long long *)&v23 + 1))); v17 = (int)v19 + (unsigned long long)((v22 & 1) != 0); v16 = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v28); v14 = v16; v15 = fmt::v10::detail::to_pointer<char>(v16, v17); if ( v15 ) { if ( (v22 & 1) != 0 ) { v4 = (_BYTE *)v15++; *v4 = 45; } v13 = v23; v11 = fmt::v10::detail::format_decimal<char,unsigned __int128>(v15, v23, *((_QWORD *)&v23 + 1), v19); v12 = v5; return v28; } else { if ( (v22 & 1) != 0 ) { v10 = 45; v9 = fmt::v10::appender::operator++((long long)&v16); v6 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v9); std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v6, (long long)&v10); } ZN3fmt3v106detail14format_decimalIcoNS0_8appenderETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEENS1_21format_decimal_resultIS7_EES7_T0_i( v16, v23, *((_QWORD *)&v23 + 1), v19); v16 = v7; return fmt::v10::detail::base_iterator<fmt::v10::appender>(v28, v7); } }
_ZN3fmt3v106detail5writeIcNS0_8appenderEnTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_: SUB RSP,0x118 MOV qword ptr [RSP + 0x108],RDI MOV qword ptr [RSP + 0xf0],RSI MOV qword ptr [RSP + 0xf8],RDX MOV RAX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0xe8],RCX MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xd8],RCX MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xb8],RCX MOV qword ptr [RSP + 0xb0],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001a1350 AND AL,0x1 MOV byte ptr [RSP + 0xcf],AL TEST byte ptr [RSP + 0xcf],0x1 JZ 0x001a1154 MOV RCX,qword ptr [RSP + 0xd8] XOR EAX,EAX NEG qword ptr [RSP + 0xd0] SBB RAX,RCX MOV qword ptr [RSP + 0xd8],RAX LAB_001a1154: MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x98],RCX MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] CALL 0x001a1380 MOV dword ptr [RSP + 0xac],EAX MOV DL,byte ptr [RSP + 0xcf] XOR EAX,EAX MOV ECX,0x1 TEST DL,0x1 CMOVNZ EAX,ECX CDQE MOVSXD RCX,dword ptr [RSP + 0xac] ADD RAX,RCX MOV qword ptr [RSP + 0x88],RAX MOV RSI,qword ptr [RSP + 0x88] LEA RDI,[RSP + 0x108] CALL 0x001a0060 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x70],RAX MOV RSI,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RSP + 0x70] CALL 0x001a0070 MOV qword ptr [RSP + 0x78],RAX CMP qword ptr [RSP + 0x78],0x0 JZ 0x001a1277 TEST byte ptr [RSP + 0xcf],0x1 JZ 0x001a1223 MOV RAX,qword ptr [RSP + 0x78] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + 0x78],RCX MOV byte ptr [RAX],0x2d LAB_001a1223: MOV RDI,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] MOV ECX,dword ptr [RSP + 0xac] MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x60],RAX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x001a13d0 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x110],RAX JMP 0x001a1339 LAB_001a1277: TEST byte ptr [RSP + 0xcf],0x1 JZ 0x001a12b1 MOV byte ptr [RSP + 0x4f],0x2d LEA RDI,[RSP + 0x80] XOR ESI,ESI CALL 0x001a0270 MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0x40] CALL 0x001a0290 MOV RDI,RAX LEA RSI,[RSP + 0x4f] CALL 0x001a02a0 LAB_001a12b1: MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] MOV ECX,dword ptr [RSP + 0xac] MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x001a15f0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP] CALL 0x001a0360 MOV qword ptr [RSP + 0x110],RAX LAB_001a1339: MOV RAX,qword ptr [RSP + 0x110] ADD RSP,0x118 RET
int8 _ZN3fmt3v106detail5writeIcNS0_8appenderEnTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_ (int8 param_1,detail *param_2,long param_3) { int8 *puVar1; back_insert_iterator<fmt::v10::detail::buffer<char>> *this; int8 extraout_RDX; bool bVar2; int8 local_d8; char local_c9 [17]; detail *local_b8; long local_b0; int8 local_a8; detail *local_a0; int8 local_98; ulong local_90; detail *local_88; long local_80; int local_6c; detail *local_68; long local_60; byte local_49; detail *local_48; long local_40; detail *local_38; long local_30; detail *local_28; long local_20; int8 local_10; int8 local_8; local_68 = param_2; local_60 = param_3; local_48 = param_2; local_40 = param_3; local_38 = param_2; local_30 = param_3; local_28 = param_2; local_20 = param_3; local_10 = param_1; local_49 = _ZN3fmt3v106detail11is_negativeInTnNSt9enable_ifIXsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_ (param_2,param_3); local_49 = local_49 & 1; if (local_49 != 0) { bVar2 = local_48 != (detail *)0x0; local_48 = (detail *)-(long)local_48; local_40 = -(ulong)bVar2 - local_40; } local_80 = local_40; local_88 = local_48; local_6c = fmt::v10::detail::count_digits(local_48,(uint)local_40); local_90 = (long)(int)(uint)((local_49 & 1) != 0) + (long)local_6c; puVar1 = (int8 *) fmt::v10::detail::reserve<fmt::v10::appender>((appender *)&local_10,local_90); local_a8 = *puVar1; local_98 = local_a8; local_a0 = (detail *)fmt::v10::detail::to_pointer<char>(local_a8); if (local_a0 == (detail *)0x0) { if ((local_49 & 1) != 0) { local_c9[0] = '-'; local_d8 = fmt::v10::appender::operator++((appender *)&local_98,0); this = (back_insert_iterator<fmt::v10::detail::buffer<char>> *) std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator* ((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_d8); std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(this,local_c9); } _ZN3fmt3v106detail14format_decimalIcoNS0_8appenderETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEENS1_21format_decimal_resultIS7_EES7_T0_i (local_98,local_48,local_40,local_6c); local_98 = extraout_RDX; local_8 = fmt::v10::detail::base_iterator<fmt::v10::appender>(local_10,extraout_RDX); } else { if ((local_49 & 1) != 0) { *local_a0 = (detail)0x2d; local_a0 = local_a0 + 1; } local_b0 = local_40; local_b8 = local_48; fmt::v10::detail::format_decimal<char,unsigned__int128> (local_a0,(char *)local_48,(uint)local_40,local_6c); local_8 = local_10; } return local_8; }
25,796
mi_calc_blob_length
eloqsql/storage/myisam/mi_dynrec.c
ulong _mi_calc_blob_length(uint length, const uchar *pos) { switch (length) { case 1: return (uint) (uchar) *pos; case 2: return (uint) uint2korr(pos); case 3: return uint3korr(pos); case 4: return uint4korr(pos); default: break; } return 0; /* Impossible */ }
O0
c
mi_calc_blob_length: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movl -0xc(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x3, %eax ja 0xaaeb2 movq -0x20(%rbp), %rax leaq 0xae326(%rip), %rcx # 0x15917c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0xaaebc movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0xaaebc movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0xaaebc movq -0x18(%rbp), %rax movl (%rax), %eax movq %rax, -0x8(%rbp) jmp 0xaaebc jmp 0xaaeb4 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
_mi_calc_blob_length: push rbp mov rbp, rsp mov [rbp+var_C], edi mov [rbp+var_18], rsi mov eax, [rbp+var_C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_20], rcx sub eax, 3 ja short def_AAE5D; jumptable 00000000000AAE5D default case mov rax, [rbp+var_20] lea rcx, jpt_AAE5D movsxd rax, ds:(jpt_AAE5D - 15917Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_AAE5F: mov rax, [rbp+var_18]; jumptable 00000000000AAE5D case 1 movzx eax, byte ptr [rax] mov eax, eax mov [rbp+var_8], rax jmp short loc_AAEBC loc_AAE6E: mov rax, [rbp+var_18]; jumptable 00000000000AAE5D case 2 movzx eax, word ptr [rax] mov eax, eax mov [rbp+var_8], rax jmp short loc_AAEBC loc_AAE7D: mov rax, [rbp+var_18]; jumptable 00000000000AAE5D case 3 movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_8], rax jmp short loc_AAEBC loc_AAEA6: mov rax, [rbp+var_18]; jumptable 00000000000AAE5D case 4 mov eax, [rax] mov [rbp+var_8], rax jmp short loc_AAEBC def_AAE5D: jmp short $+2; jumptable 00000000000AAE5D default case loc_AAEB4: mov [rbp+var_8], 0 loc_AAEBC: mov rax, [rbp+var_8] pop rbp retn
long long mi_calc_blob_length(int a1, unsigned __int8 *a2) { long long v3; // [rsp+18h] [rbp-8h] switch ( a1 ) { case 1: v3 = *a2; break; case 2: v3 = *(unsigned __int16 *)a2; break; case 3: v3 = (a2[2] << 16) | (unsigned int)*(unsigned __int16 *)a2; break; case 4: v3 = *(unsigned int *)a2; break; default: v3 = 0LL; break; } return v3; }
_mi_calc_blob_length: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV EAX,dword ptr [RBP + -0xc] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x3 JA 0x001aaeb2 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x25917c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001aaebc caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001aaebc caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001aaebc caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x001aaebc default: JMP 0x001aaeb4 LAB_001aaeb4: MOV qword ptr [RBP + -0x8],0x0 LAB_001aaebc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
uint _mi_calc_blob_length(int4 param_1,uint *param_2) { uint uVar1; switch(param_1) { case 1: uVar1 = (uint)(byte)*param_2; break; case 2: uVar1 = (uint)(ushort)*param_2; break; case 3: uVar1 = (uint)(uint3)*param_2; break; case 4: uVar1 = *param_2; break; default: uVar1 = 0; } return uVar1; }
25,797
ftxui::GlyphIterate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, unsigned long)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/screen/string.cpp
size_t GlyphIterate(const std::string& input, int glyph_offset, size_t start) { if (glyph_offset >= 0) { for (int i = 0; i < glyph_offset; ++i) { start = GlyphNext(input, start); } return start; } else { for (int i = 0; i < -glyph_offset; ++i) { start = GlyphPrevious(input, start); } return start; } }
O2
cpp
ftxui::GlyphIterate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, unsigned long): pushq %r14 pushq %rbx pushq %rax movq %rdx, %rax movl %esi, %ebx movq %rdi, %r14 testl %esi, %esi jns 0x31666 testl %ebx, %ebx je 0x3166b movq %r14, %rdi movq %rax, %rsi callq 0x3150d incl %ebx jmp 0x31648 movq %r14, %rdi movq %rax, %rsi callq 0x31598 subl $0x1, %ebx jae 0x3165b addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5ftxui12GlyphIterateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEim: push r14 push rbx push rax mov rax, rdx mov ebx, esi mov r14, rdi test esi, esi jns short loc_31666 loc_31648: test ebx, ebx jz short loc_3166B mov rdi, r14 mov rsi, rax call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong) inc ebx jmp short loc_31648 loc_3165B: mov rdi, r14 mov rsi, rax call _ZN5ftxui9GlyphNextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphNext(std::string const&,ulong) loc_31666: sub ebx, 1 jnb short loc_3165B loc_3166B: add rsp, 8 pop rbx pop r14 retn
unsigned long long ftxui::GlyphIterate(long long *a1, int a2, unsigned long long a3) { unsigned long long result; // rax int v4; // ebx result = a3; v4 = a2; if ( a2 >= 0 ) { while ( v4-- != 0 ) result = ftxui::GlyphNext(a1, result); } else { while ( v4 ) { result = ftxui::GlyphPrevious(a1, result); ++v4; } } return result; }
GlyphIterate: PUSH R14 PUSH RBX PUSH RAX MOV RAX,RDX MOV EBX,ESI MOV R14,RDI TEST ESI,ESI JNS 0x00131666 LAB_00131648: TEST EBX,EBX JZ 0x0013166b MOV RDI,R14 MOV RSI,RAX CALL 0x0013150d INC EBX JMP 0x00131648 LAB_0013165b: MOV RDI,R14 MOV RSI,RAX CALL 0x00131598 LAB_00131666: SUB EBX,0x1 JNC 0x0013165b LAB_0013166b: ADD RSP,0x8 POP RBX POP R14 RET
/* ftxui::GlyphIterate(std::__cxx11::string const&, int, unsigned long) */ void ftxui::GlyphIterate(string *param_1,int param_2,ulong param_3) { bool bVar1; if (param_2 < 0) { for (; param_2 != 0; param_2 = param_2 + 1) { param_3 = GlyphPrevious(param_1,param_3); } } else { while (bVar1 = param_2 != 0, param_2 = param_2 + -1, bVar1) { param_3 = GlyphNext(param_1,param_3); } } return; }
25,798
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } int seq_count = 0; for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { seq_count++; } } putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]); } printf("\n=== Done dumping\n"); }
O2
cpp
common_kv_cache_dump_view(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x5b13b(%rip), %rdi # 0xb256b xorl %eax, %eax callq 0x23060 movq 0x20(%r14), %r12 pushq $0x3e popq %r13 leaq 0x5d67a(%rip), %r15 # 0xb4ac0 xorl %ebp, %ebp cmpl (%r14), %ebp jge 0x574a5 movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0x57466 leaq 0x5b198(%rip), %rdi # 0xb25f5 movl %ebp, %esi xorl %eax, %eax callq 0x23060 movl 0x4(%r14), %eax xorl %ecx, %ecx testl %eax, %eax cmovlel %ecx, %eax xorl %edx, %edx cmpq %rcx, %rax je 0x57488 movl (%r12,%rcx,4), %esi notl %esi shrl $0x1f, %esi addl %esi, %edx incq %rcx jmp 0x57473 cmpl $0x3e, %edx cmovael %r13d, %edx movsbl (%rdx,%r15), %edi callq 0x23c40 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 jmp 0x57448 leaq 0x5d5f8(%rip), %rdi # 0xb4aa4 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x23d60
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+38h+var_38], eax lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"... xor eax, eax call _printf mov r12, [r14+20h] push 3Eh ; '>' pop r13 lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_57448: cmp ebp, [r14] jge short loc_574A5 mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_57466 lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_57466: mov eax, [r14+4] xor ecx, ecx test eax, eax cmovle eax, ecx xor edx, edx loc_57473: cmp rax, rcx jz short loc_57488 mov esi, [r12+rcx*4] not esi shr esi, 1Fh add edx, esi inc rcx jmp short loc_57473 loc_57488: cmp edx, 3Eh ; '>' cmovnb edx, r13d movsx edi, byte ptr [rdx+r15] call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r12, [r12+rax*4] jmp short loc_57448 loc_574A5: lea rdi, aDoneDumping; "\n=== Done dumping" add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _puts
long long common_kv_cache_dump_view(long long a1, int a2) { long long v2; // r12 int i; // ebp long long v4; // rax long long v5; // rcx long long v6; // rdx printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); v2 = *(_QWORD *)(a1 + 32); for ( i = 0; i < *(_DWORD *)a1; ++i ) { if ( !(i % a2) ) printf("\n%5d: ", i); v4 = *(unsigned int *)(a1 + 4); v5 = 0LL; if ( (int)v4 <= 0 ) v4 = 0LL; v6 = 0LL; while ( v4 != v5 ) v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6; if ( (unsigned int)v6 >= 0x3E ) v6 = 62LL; putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]); v2 += 4LL * *(int *)(a1 + 4); } return puts("\n=== Done dumping"); }
common_kv_cache_dump_view: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1b256b] XOR EAX,EAX CALL 0x00123060 MOV R12,qword ptr [R14 + 0x20] PUSH 0x3e POP R13 LEA R15,[0x1b4ac0] XOR EBP,EBP LAB_00157448: CMP EBP,dword ptr [R14] JGE 0x001574a5 MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x00157466 LEA RDI,[0x1b25f5] MOV ESI,EBP XOR EAX,EAX CALL 0x00123060 LAB_00157466: MOV EAX,dword ptr [R14 + 0x4] XOR ECX,ECX TEST EAX,EAX CMOVLE EAX,ECX XOR EDX,EDX LAB_00157473: CMP RAX,RCX JZ 0x00157488 MOV ESI,dword ptr [R12 + RCX*0x4] NOT ESI SHR ESI,0x1f ADD EDX,ESI INC RCX JMP 0x00157473 LAB_00157488: CMP EDX,0x3e CMOVNC EDX,R13D MOVSX EDI,byte ptr [RDX + R15*0x1] CALL 0x00123c40 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] JMP 0x00157448 LAB_001574a5: LEA RDI,[0x1b4aa4] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00123d60
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2) { int8 in_RAX; ulong uVar1; uint uVar2; ulong uVar3; uint uVar4; long lVar5; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14))); lVar5 = *(long *)(param_1 + 0x20); for (uVar4 = 0; (int)uVar4 < *(int *)param_1; uVar4 = uVar4 + 1) { if ((int)uVar4 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar4); } uVar1 = 0; uVar3 = (ulong)*(uint *)(param_1 + 4); if ((int)*(uint *)(param_1 + 4) < 1) { uVar3 = uVar1; } uVar2 = 0; for (; uVar3 != uVar1; uVar1 = uVar1 + 1) { uVar2 = uVar2 - ((int)~*(uint *)(lVar5 + uVar1 * 4) >> 0x1f); } uVar3 = (ulong)uVar2; if (0x3d < uVar2) { uVar3 = 0x3e; } putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar3]); lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4; } puts("\n=== Done dumping"); return; }
25,799
server_task_result_apply_lora::to_json[abi:cxx11]()
monkey531[P]llama/examples/server/server.cpp
virtual json to_json() override { return json {{ "success", true }}; }
O1
cpp
server_task_result_apply_lora::to_json[abi:cxx11](): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdi, %r15 leaq 0xbba8a(%rip), %rsi # 0x14e5e5 leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x583dc leaq 0x38(%rsp), %rbx xorps %xmm0, %xmm0 movups %xmm0, -0x8(%rbx) xorl %r12d, %r12d movq %r12, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x5e522 movq %rbx, %rdi movl $0x1, %esi callq 0x449aa movq %r12, 0x10(%rbx) leaq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi movl $0x2, %edx movl $0x1, %ecx movl $0x2, %r8d callq 0x56f72 leaq 0x8(%rsp), %rsi movq $0x0, 0x10(%rsi) movl $0x1, %edx movq %r15, %rdi movl $0x1, %ecx movl $0x2, %r8d callq 0x56f72 leaq 0x8(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x449aa movq %rbx, %rdi callq 0x45236 movl $0x18, %r14d leaq (%rsp,%r14), %rbx addq $0x20, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x449aa movq %rbx, %rdi callq 0x45236 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x92bfa movq %r15, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r15 leaq 0x8(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x449aa movq %r12, %rdi callq 0x45236 jmp 0x92c4e movq %rax, %r15 movl $0x18, %r13d leaq (%rsp,%r13), %r12 addq $0x20, %r12 movq %r12, %rdi xorl %esi, %esi callq 0x449aa movq %r12, %rdi callq 0x45236 addq $-0x18, %r13 cmpq $-0x18, %r13 jne 0x92c54 movb $0x1, %al jmp 0x92c84 movq %rax, %r15 xorl %eax, %eax movq %r14, %rbx cmpq %rbx, %r14 sete %cl orb %al, %cl jne 0x92cae leaq 0x20(%rsp), %r14 addq $-0x18, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x449aa movq %rbx, %rdi callq 0x45236 cmpq %r14, %rbx jne 0x92c93 movq %r15, %rdi callq 0x20380
_ZN29server_task_result_apply_lora7to_jsonB5cxx11Ev: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h mov r15, rdi lea rsi, aSuccess; "success" lea r14, [rsp+78h+var_58] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA8_KcA8_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ lea rbx, [rsp+78h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rbx-8], xmm0 xor r12d, r12d mov [rbx+8], r12 mov rdi, rbx mov esi, 1 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov [rbx+10h], r12 lea rdi, [rsp+78h+var_70] lea rsi, [rsp+78h+var_58] mov edx, 2 mov ecx, 1 mov r8d, 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) lea rsi, [rsp+78h+var_70] mov qword ptr [rsi+10h], 0 mov edx, 1 mov rdi, r15 mov ecx, 1 mov r8d, 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) lea rbx, [rsp+78h+var_70] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14d, 18h loc_92BFA: lea rbx, [rsp+r14+78h+var_78] add rbx, 20h ; ' ' mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_92BFA mov rax, r15 add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r15, rax lea r12, [rsp+arg_0] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_92C4E mov r15, rax loc_92C4E: mov r13d, 18h loc_92C54: lea r12, [rsp+r13+0] add r12, 20h ; ' ' mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r13, 0FFFFFFFFFFFFFFE8h cmp r13, 0FFFFFFFFFFFFFFE8h jnz short loc_92C54 mov al, 1 jmp short loc_92C84 mov r15, rax xor eax, eax mov rbx, r14 loc_92C84: cmp r14, rbx setz cl or cl, al jnz short loc_92CAE lea r14, [rsp+arg_18] loc_92C93: add rbx, 0FFFFFFFFFFFFFFE8h mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() cmp rbx, r14 jnz short loc_92C93 loc_92CAE: mov rdi, r15 call __Unwind_Resume
long long server_task_result_apply_lora::to_json[abi:cxx11](long long a1) { long long i; // r14 char v3[16]; // [rsp+8h] [rbp-70h] BYREF long long v4; // [rsp+18h] [rbp-60h] char v5[16]; // [rsp+20h] [rbp-58h] BYREF __int128 v6; // [rsp+30h] [rbp-48h] BYREF long long v7; // [rsp+40h] [rbp-38h] long long v8; // [rsp+48h] [rbp-30h] ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA8_KcA8_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_(v5); v6 = 0LL; v7 = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)&v6 + 8, 1u); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v6 + 8); v8 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v3, v5, 2LL, 1LL, 2LL); v4 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, v3, 1LL, 1LL, 2LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v3); for ( i = 24LL; i != -24; i -= 24LL ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(&v5[i]); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v5[i]); } return a1; }
to_json[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R15,RDI LAB_00192b54: LEA RSI,[0x24e5e5] LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x001583dc LEA RBX,[RSP + 0x38] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + -0x8],XMM0 XOR R12D,R12D MOV qword ptr [RBX + 0x8],R12 MOV RDI,RBX MOV ESI,0x1 CALL 0x0015e522 MOV RDI,RBX MOV ESI,0x1 CALL 0x001449aa MOV qword ptr [RBX + 0x10],R12 LAB_00192b99: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x20] MOV EDX,0x2 MOV ECX,0x1 MOV R8D,0x2 CALL 0x00156f72 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x10],0x0 LAB_00192bc5: MOV EDX,0x1 MOV RDI,R15 MOV ECX,0x1 MOV R8D,0x2 CALL 0x00156f72 LAB_00192bdd: LEA RBX,[RSP + 0x8] MOV RDI,RBX XOR ESI,ESI CALL 0x001449aa MOV RDI,RBX CALL 0x00145236 MOV R14D,0x18 LAB_00192bfa: LEA RBX,[RSP + R14*0x1] ADD RBX,0x20 MOV RDI,RBX XOR ESI,ESI CALL 0x001449aa MOV RDI,RBX CALL 0x00145236 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x00192bfa MOV RAX,R15 ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* server_task_result_apply_lora::to_json[abi:cxx11]() */ server_task_result_apply_lora * __thiscall server_task_result_apply_lora::to_json_abi_cxx11_(server_task_result_apply_lora *this) { long lVar1; data local_70 [16]; int8 local_60; data local_58 [16]; int8 local_48; int8 uStack_40; int8 local_38; int8 local_30; /* try { // try from 00192b54 to 00192b67 has its CatchHandler @ 00192c7c */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA8_KcA8_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ (local_58,"success"); local_48 = 0; uStack_40 = 0; local_38 = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (&uStack_40,1); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&uStack_40,0)); local_30 = 0; /* try { // try from 00192b99 to 00192bb7 has its CatchHandler @ 00192c4b */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_70,local_58,2,1,2); local_60 = 0; /* try { // try from 00192bc5 to 00192bdc has its CatchHandler @ 00192c2f */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(this,local_70,1,1,2); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_70,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_70); lVar1 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_58 + lVar1,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_58 + lVar1); lVar1 = lVar1 + -0x18; } while (lVar1 != -0x18); return this; }