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
8,200
my_wildcmp_8bit_impl
eloqsql/strings/ctype-simple.c
static int my_wildcmp_8bit_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return(str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return(result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return(-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* Ok if w_many is last */ if (str == str_end) return(-1); if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ cmp=likeconv(cs,cmp); do { /* Find the next character in the subject string equal to 'cmp', then check recursively my_wildcmp_8bit_impl() for the pattern remainder. */ while (str != str_end && (uchar) likeconv(cs,*str) != cmp) str++; if (str++ == str_end) return(-1); /* 'cmp' was not found in the subject string */ { int tmp=my_wildcmp_8bit_impl(cs,str,str_end, wildstr,wildend,escape,w_one, w_many, recurse_level+1); if (tmp <= 0) return(tmp); } /* The recursion call did not match. But it returned 1, which means the pattern remainder has some non-special characters. Continue, there is a chance that we'll find another 'cmp' at a different position in the subject string. */ } while (str != str_end); return(-1); } } return(str != str_end ? 1 : 0); }
O3
c
my_wildcmp_8bit_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r12 movq %rcx, %r13 movq %rdx, %rbx movq %rsi, %r14 movl 0x20(%rbp), %r10d leaq 0xb53385(%rip), %rax # 0xc08e58 movq (%rax), %rax testq %rax, %rax je 0xb5b06 movq %rbx, -0x30(%rbp) movq %rdi, %rbx movl %r10d, %edi movl %r9d, %r15d callq *%rax movl 0x20(%rbp), %r10d movq %rbx, %rdi movq -0x30(%rbp), %rbx movl %r15d, %r9d movl $0x1, %r15d testl %eax, %eax jne 0xb5c2c movl 0x18(%rbp), %r11d movl 0x10(%rbp), %r8d movl $0xffffffff, %r15d # imm = 0xFFFFFFFF cmpq %r12, %r13 je 0xb5c22 movb (%r13), %al movsbl %al, %ecx cmpl %r11d, %ecx sete %sil cmpl %r8d, %ecx sete %dl orb %dl, %sil je 0xb5b83 testb %dl, %dl je 0xb5b79 incq %r13 movq %r13, %rax cmpq %rbx, %r14 je 0xb5c2c movq %r14, %rcx movq %rax, %r13 cmpq %r12, %rax jae 0xb5b66 leaq 0x1(%rcx), %r14 movsbl (%r13), %edx leaq 0x1(%r13), %rax cmpl %r8d, %edx je 0xb5b40 incq %rcx cmpq %r12, %r13 je 0xb5c1f movb (%r13), %al movq %rcx, %r14 movsbl %al, %eax cmpl %r11d, %eax jne 0xb5b14 jmp 0xb5be4 movl $0x1, %r15d cmpq %rbx, %r14 je 0xb5c2c leaq 0x1(%r13), %rax cmpq %r12, %rax cmoveq %r13, %rax cmpl %r9d, %ecx cmoveq %rax, %r13 movq 0x58(%rdi), %rax movzbl (%r13), %ecx movb (%rax,%rcx), %cl movzbl (%r14), %edx cmpb (%rax,%rdx), %cl jne 0xb5c2c incq %r14 incq %r13 cmpq %r12, %r13 je 0xb5c22 movb (%r13), %al movsbl %al, %ecx cmpl %r8d, %ecx sete %dl cmpl %r11d, %ecx je 0xb5b36 cmpl %r8d, %ecx jne 0xb5b83 jmp 0xb5b36 leaq 0x1(%r13), %rax xorl %r15d, %r15d cmpq %r12, %rax je 0xb5c2c addq $0x2, %r13 movb -0x1(%r13), %al movsbl %al, %ecx cmpl %r11d, %ecx je 0xb5c11 cmpl %r8d, %ecx jne 0xb5c3e cmpq %rbx, %r14 je 0xb5ce9 incq %r14 leaq 0x1(%r13), %rax cmpq %r12, %r13 movq %rax, %r13 jne 0xb5bf4 jmp 0xb5c2c movq %rcx, %r14 xorl %r15d, %r15d cmpq %rbx, %r14 setne %r15b movl %r15d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %r15d # imm = 0xFFFFFFFF cmpq %rbx, %r14 je 0xb5c2c movzbl %al, %ecx leaq -0x1(%r13), %rdx cmpl %r9d, %ecx jne 0xb5c61 cmpq %r12, %r13 je 0xb5c61 movb (%r13), %al movq %r13, %rdx incq %rdx movq 0x58(%rdi), %rcx movzbl %al, %eax movb (%rcx,%rax), %r13b incl %r10d cmpq %rbx, %r14 je 0xb5c2c movq 0x58(%rdi), %rax movzbl (%r14), %ecx cmpb %r13b, (%rax,%rcx) je 0xb5c8f incq %r14 cmpq %rbx, %r14 jne 0xb5c7b jmp 0xb5c2c incq %r14 subq $0x8, %rsp movq %rdi, -0x48(%rbp) movq %r14, %rsi movq %rdx, %rcx movq %rbx, %rdx movq %rcx, -0x38(%rbp) movq %r8, %rax movq %r12, %r8 movl %r9d, -0x30(%rbp) movq %r10, -0x40(%rbp) pushq %r10 pushq %r11 pushq %rax callq 0xb5aab addq $0x20, %rsp testl %eax, %eax jle 0xb5cf4 cmpq %rbx, %r14 movl -0x30(%rbp), %r9d movq -0x48(%rbp), %rdi movq -0x40(%rbp), %r10 movl 0x18(%rbp), %r11d movl 0x10(%rbp), %r8d movq -0x38(%rbp), %rdx jne 0xb5c72 jmp 0xb5c2c movl $0xffffffff, %r15d # imm = 0xFFFFFFFF jmp 0xb5c2c movl %eax, %r15d jmp 0xb5c2c
my_wildcmp_8bit_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, r8 mov r13, rcx mov rbx, rdx mov r14, rsi mov r10d, [rbp+arg_10] lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_B5B06 mov [rbp+var_30], rbx mov rbx, rdi mov edi, r10d mov r15d, r9d call rax mov r10d, [rbp+arg_10] mov rdi, rbx mov rbx, [rbp+var_30] mov r9d, r15d mov r15d, 1 test eax, eax jnz loc_B5C2C loc_B5B06: mov r11d, [rbp+arg_8] mov r8d, [rbp+arg_0] mov r15d, 0FFFFFFFFh loc_B5B14: cmp r13, r12 jz loc_B5C22 mov al, [r13+0] movsx ecx, al cmp ecx, r11d setz sil cmp ecx, r8d setz dl or sil, dl jz short loc_B5B83 loc_B5B36: test dl, dl jz short loc_B5B79 inc r13 mov rax, r13 loc_B5B40: cmp r14, rbx jz loc_B5C2C mov rcx, r14 mov r13, rax cmp rax, r12 jnb short loc_B5B66 lea r14, [rcx+1] movsx edx, byte ptr [r13+0] lea rax, [r13+1] cmp edx, r8d jz short loc_B5B40 loc_B5B66: inc rcx cmp r13, r12 jz loc_B5C1F mov al, [r13+0] mov r14, rcx loc_B5B79: movsx eax, al cmp eax, r11d jnz short loc_B5B14 jmp short loc_B5BE4 loc_B5B83: mov r15d, 1 cmp r14, rbx jz loc_B5C2C lea rax, [r13+1] cmp rax, r12 cmovz rax, r13 cmp ecx, r9d cmovz r13, rax mov rax, [rdi+58h] movzx ecx, byte ptr [r13+0] mov cl, [rax+rcx] movzx edx, byte ptr [r14] cmp cl, [rax+rdx] jnz short loc_B5C2C inc r14 inc r13 cmp r13, r12 jz short loc_B5C22 mov al, [r13+0] movsx ecx, al cmp ecx, r8d setz dl cmp ecx, r11d jz loc_B5B36 cmp ecx, r8d jnz short loc_B5B83 jmp loc_B5B36 loc_B5BE4: lea rax, [r13+1] xor r15d, r15d cmp rax, r12 jz short loc_B5C2C add r13, 2 loc_B5BF4: mov al, [r13-1] movsx ecx, al cmp ecx, r11d jz short loc_B5C11 cmp ecx, r8d jnz short loc_B5C3E cmp r14, rbx jz loc_B5CE9 inc r14 loc_B5C11: lea rax, [r13+1] cmp r13, r12 mov r13, rax jnz short loc_B5BF4 jmp short loc_B5C2C loc_B5C1F: mov r14, rcx loc_B5C22: xor r15d, r15d cmp r14, rbx setnz r15b loc_B5C2C: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B5C3E: mov r15d, 0FFFFFFFFh cmp r14, rbx jz short loc_B5C2C movzx ecx, al lea rdx, [r13-1] cmp ecx, r9d jnz short loc_B5C61 cmp r13, r12 jz short loc_B5C61 mov al, [r13+0] mov rdx, r13 loc_B5C61: inc rdx mov rcx, [rdi+58h] movzx eax, al mov r13b, [rcx+rax] inc r10d loc_B5C72: cmp r14, rbx jz short loc_B5C2C mov rax, [rdi+58h] loc_B5C7B: movzx ecx, byte ptr [r14] cmp [rax+rcx], r13b jz short loc_B5C8F inc r14 cmp r14, rbx jnz short loc_B5C7B jmp short loc_B5C2C loc_B5C8F: inc r14 sub rsp, 8 mov [rbp+var_48], rdi mov rsi, r14 mov rcx, rdx mov rdx, rbx mov [rbp+var_38], rcx mov rax, r8 mov r8, r12 mov dword ptr [rbp+var_30], r9d mov [rbp+var_40], r10 push r10 push r11 push rax call my_wildcmp_8bit_impl add rsp, 20h test eax, eax jle short loc_B5CF4 cmp r14, rbx mov r9d, dword ptr [rbp+var_30] mov rdi, [rbp+var_48] mov r10, [rbp+var_40] mov r11d, [rbp+arg_8] mov r8d, [rbp+arg_0] mov rdx, [rbp+var_38] jnz short loc_B5C72 jmp loc_B5C2C loc_B5CE9: mov r15d, 0FFFFFFFFh jmp loc_B5C2C loc_B5CF4: mov r15d, eax jmp loc_B5C2C
long long my_wildcmp_8bit_impl( long long a1, unsigned __int8 *a2, unsigned __int8 *a3, char *a4, char *a5, int a6, int a7, int a8, unsigned int a9) { unsigned __int8 *v11; // rbx unsigned int v13; // r10d int v14; // r15d int v15; // eax unsigned int v16; // r15d int v17; // r11d int v18; // r8d signed __int8 v19; // al int v20; // ecx bool v21; // dl char *v22; // rax unsigned __int8 *v23; // rcx int v24; // edx unsigned __int8 *v25; // rcx char *v26; // rax char *v27; // r13 unsigned __int8 v28; // al char *v31; // rdx _BYTE *v32; // rdx char v33; // r13 long long v34; // r10 int v35; // eax long long v36; // [rsp+10h] [rbp-40h] _BYTE *v37; // [rsp+18h] [rbp-38h] int v39; // [rsp+20h] [rbp-30h] v11 = a3; v13 = a9; if ( my_string_stack_guard ) { v14 = a6; v15 = my_string_stack_guard(a9); v13 = a9; v11 = a3; a6 = v14; v16 = 1; if ( v15 ) return v16; } v17 = a8; v18 = a7; v16 = -1; do { if ( a4 == a5 ) return a2 != v11; v19 = *a4; v20 = *a4; v21 = v20 == a7; if ( v20 != a7 && v20 != a8 ) { do { v16 = 1; if ( a2 == v11 ) return v16; v26 = a4 + 1; if ( a4 + 1 == a5 ) v26 = a4; if ( v20 == a6 ) a4 = v26; if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*a4) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) ) return v16; ++a2; if ( ++a4 == a5 ) return a2 != v11; v19 = *a4; v20 = *a4; v21 = v20 == a7; } while ( v20 != a8 && v20 != a7 ); } if ( v21 ) { v22 = a4 + 1; do { if ( a2 == v11 ) return v16; v23 = a2; a4 = v22; if ( v22 >= a5 ) break; ++a2; v24 = *v22++; } while ( v24 == a7 ); v25 = v23 + 1; if ( a4 == a5 ) { a2 = v25; return a2 != v11; } v19 = *a4; a2 = v25; } } while ( v19 != a8 ); v16 = 0; if ( a4 + 1 == a5 ) return v16; v27 = a4 + 2; while ( 1 ) { v28 = *(v27 - 1); if ( (char)v28 == a8 ) goto LABEL_31; if ( (char)v28 != a7 ) break; if ( a2 == v11 ) return (unsigned int)-1; ++a2; LABEL_31: if ( v27++ == a5 ) return v16; } v16 = -1; if ( a2 != v11 ) { v31 = v27 - 1; if ( v28 == a6 && v27 != a5 ) { v28 = *v27; v31 = v27; } v32 = v31 + 1; v33 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v28); v34 = v13 + 1; while ( a2 != v11 ) { while ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) != v33 ) { if ( ++a2 == v11 ) return v16; } ++a2; v37 = v32; v39 = a6; v36 = v34; v35 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)v11, (_DWORD)v32, (_DWORD)a5, a6, v18, v17, v34); if ( v35 <= 0 ) return (unsigned int)v35; a6 = v39; v34 = v36; v17 = a8; v18 = a7; v32 = v37; if ( a2 == v11 ) return v16; } } return v16; }
my_wildcmp_8bit_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,R8 MOV R13,RCX MOV RBX,RDX MOV R14,RSI MOV R10D,dword ptr [RBP + 0x20] LEA RAX,[0xd08e58] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001b5b06 MOV qword ptr [RBP + -0x30],RBX MOV RBX,RDI MOV EDI,R10D MOV R15D,R9D CALL RAX MOV R10D,dword ptr [RBP + 0x20] MOV RDI,RBX MOV RBX,qword ptr [RBP + -0x30] MOV R9D,R15D MOV R15D,0x1 TEST EAX,EAX JNZ 0x001b5c2c LAB_001b5b06: MOV R11D,dword ptr [RBP + 0x18] MOV R8D,dword ptr [RBP + 0x10] MOV R15D,0xffffffff LAB_001b5b14: CMP R13,R12 JZ 0x001b5c22 MOV AL,byte ptr [R13] MOVSX ECX,AL CMP ECX,R11D SETZ SIL CMP ECX,R8D SETZ DL OR SIL,DL JZ 0x001b5b83 LAB_001b5b36: TEST DL,DL JZ 0x001b5b79 INC R13 MOV RAX,R13 LAB_001b5b40: CMP R14,RBX JZ 0x001b5c2c MOV RCX,R14 MOV R13,RAX CMP RAX,R12 JNC 0x001b5b66 LEA R14,[RCX + 0x1] MOVSX EDX,byte ptr [R13] LEA RAX,[R13 + 0x1] CMP EDX,R8D JZ 0x001b5b40 LAB_001b5b66: INC RCX CMP R13,R12 JZ 0x001b5c1f MOV AL,byte ptr [R13] MOV R14,RCX LAB_001b5b79: MOVSX EAX,AL CMP EAX,R11D JNZ 0x001b5b14 JMP 0x001b5be4 LAB_001b5b83: MOV R15D,0x1 CMP R14,RBX JZ 0x001b5c2c LEA RAX,[R13 + 0x1] CMP RAX,R12 CMOVZ RAX,R13 CMP ECX,R9D CMOVZ R13,RAX MOV RAX,qword ptr [RDI + 0x58] MOVZX ECX,byte ptr [R13] MOV CL,byte ptr [RAX + RCX*0x1] MOVZX EDX,byte ptr [R14] CMP CL,byte ptr [RAX + RDX*0x1] JNZ 0x001b5c2c INC R14 INC R13 CMP R13,R12 JZ 0x001b5c22 MOV AL,byte ptr [R13] MOVSX ECX,AL CMP ECX,R8D SETZ DL CMP ECX,R11D JZ 0x001b5b36 CMP ECX,R8D JNZ 0x001b5b83 JMP 0x001b5b36 LAB_001b5be4: LEA RAX,[R13 + 0x1] XOR R15D,R15D CMP RAX,R12 JZ 0x001b5c2c ADD R13,0x2 LAB_001b5bf4: MOV AL,byte ptr [R13 + -0x1] MOVSX ECX,AL CMP ECX,R11D JZ 0x001b5c11 CMP ECX,R8D JNZ 0x001b5c3e CMP R14,RBX JZ 0x001b5ce9 INC R14 LAB_001b5c11: LEA RAX,[R13 + 0x1] CMP R13,R12 MOV R13,RAX JNZ 0x001b5bf4 JMP 0x001b5c2c LAB_001b5c1f: MOV R14,RCX LAB_001b5c22: XOR R15D,R15D CMP R14,RBX SETNZ R15B LAB_001b5c2c: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b5c3e: MOV R15D,0xffffffff CMP R14,RBX JZ 0x001b5c2c MOVZX ECX,AL LEA RDX,[R13 + -0x1] CMP ECX,R9D JNZ 0x001b5c61 CMP R13,R12 JZ 0x001b5c61 MOV AL,byte ptr [R13] MOV RDX,R13 LAB_001b5c61: INC RDX MOV RCX,qword ptr [RDI + 0x58] MOVZX EAX,AL MOV R13B,byte ptr [RCX + RAX*0x1] INC R10D LAB_001b5c72: CMP R14,RBX JZ 0x001b5c2c MOV RAX,qword ptr [RDI + 0x58] LAB_001b5c7b: MOVZX ECX,byte ptr [R14] CMP byte ptr [RAX + RCX*0x1],R13B JZ 0x001b5c8f INC R14 CMP R14,RBX JNZ 0x001b5c7b JMP 0x001b5c2c LAB_001b5c8f: INC R14 SUB RSP,0x8 MOV qword ptr [RBP + -0x48],RDI MOV RSI,R14 MOV RCX,RDX MOV RDX,RBX MOV qword ptr [RBP + -0x38],RCX MOV RAX,R8 MOV R8,R12 MOV dword ptr [RBP + -0x30],R9D MOV qword ptr [RBP + -0x40],R10 PUSH R10 PUSH R11 PUSH RAX CALL 0x001b5aab ADD RSP,0x20 TEST EAX,EAX JLE 0x001b5cf4 CMP R14,RBX MOV R9D,dword ptr [RBP + -0x30] MOV RDI,qword ptr [RBP + -0x48] MOV R10,qword ptr [RBP + -0x40] MOV R11D,dword ptr [RBP + 0x18] MOV R8D,dword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001b5c72 JMP 0x001b5c2c LAB_001b5ce9: MOV R15D,0xffffffff JMP 0x001b5c2c LAB_001b5cf4: MOV R15D,EAX JMP 0x001b5c2c
uint my_wildcmp_8bit_impl (long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,ulong param_6, uint param_7,uint param_8,int param_9) { char cVar1; byte bVar2; int iVar3; uint uVar4; byte *pbVar5; uint uVar6; byte *pbVar7; bool bVar8; if (my_string_stack_guard != (code *)0x0) { param_6 = param_6 & 0xffffffff; iVar3 = (*my_string_stack_guard)(param_9); if (iVar3 != 0) { return 1; } } uVar4 = 0xffffffff; while (param_4 != param_5) { bVar2 = *param_4; uVar6 = (uint)(char)bVar2; bVar8 = uVar6 == param_7; if (uVar6 != param_8 && !bVar8) { do { uVar4 = 1; if (param_2 == param_3) { return 1; } pbVar5 = param_4 + 1; if (param_4 + 1 == param_5) { pbVar5 = param_4; } if (uVar6 == (uint)param_6) { param_4 = pbVar5; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_4) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2)) { return 1; } param_2 = param_2 + 1; param_4 = param_4 + 1; if (param_4 == param_5) goto LAB_001b5c22; bVar2 = *param_4; uVar6 = (uint)(char)bVar2; bVar8 = uVar6 == param_7; } while ((uVar6 != param_8) && (uVar6 != param_7)); } if (bVar8) { do { pbVar5 = param_2; param_4 = param_4 + 1; if (pbVar5 == param_3) { return uVar4; } } while ((param_4 < param_5) && (param_2 = pbVar5 + 1, (int)(char)*param_4 == param_7)); param_2 = pbVar5 + 1; if (param_4 == param_5) break; bVar2 = *param_4; } if ((int)(char)bVar2 == param_8) { if (param_4 + 1 != param_5) { pbVar5 = param_4 + 2; do { bVar2 = pbVar5[-1]; if ((int)(char)bVar2 != param_8) { if ((int)(char)bVar2 != param_7) { if (param_2 == param_3) { return 0xffffffff; } pbVar7 = pbVar5 + -1; if (((uint)bVar2 == (uint)param_6) && (pbVar5 != param_5)) { bVar2 = *pbVar5; pbVar7 = pbVar5; } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2); while( true ) { if (param_2 == param_3) { return 0xffffffff; } while (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) != cVar1) { param_2 = param_2 + 1; if (param_2 == param_3) { return 0xffffffff; } } param_2 = param_2 + 1; uVar4 = my_wildcmp_8bit_impl (param_1,param_2,param_3,pbVar7 + 1,param_5,param_6,param_7, param_8,param_9 + 1); if ((int)uVar4 < 1) break; param_6 = param_6 & 0xffffffff; if (param_2 == param_3) { return 0xffffffff; } } return uVar4; } if (param_2 == param_3) { return 0xffffffff; } param_2 = param_2 + 1; } bVar8 = pbVar5 != param_5; pbVar5 = pbVar5 + 1; } while (bVar8); } return 0; } } LAB_001b5c22: return (uint)(param_2 != param_3); }
8,201
my_well_formed_char_length_8bit
eloqsql/strings/ctype-simple.c
size_t my_well_formed_char_length_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *start, const char *end, size_t nchars, MY_STRCOPY_STATUS *status) { size_t nbytes= (size_t) (end - start); size_t res= MY_MIN(nbytes, nchars); status->m_well_formed_error_pos= NULL; status->m_source_end_pos= start + res; return res; }
O0
c
my_well_formed_char_length_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x94bbb movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x94bc3 movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rcx addq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax popq %rbp retq nopl (%rax)
my_well_formed_char_length_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jnb short loc_94BBB mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_94BC3 loc_94BBB: mov rax, [rbp+var_20] mov [rbp+var_40], rax loc_94BC3: mov rax, [rbp+var_40] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_10] add rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_38] pop rbp retn
unsigned long long my_well_formed_char_length_8bit( long long a1, long long a2, long long a3, unsigned long long a4, _QWORD *a5) { unsigned long long v6; // [rsp+0h] [rbp-40h] if ( a3 - a2 >= a4 ) v6 = a4; else v6 = a3 - a2; a5[1] = 0LL; *a5 = v6 + a2; return v6; }
my_well_formed_char_length_8bit: PUSH RBP MOV RBP,RSP 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 qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00194bbb MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x00194bc3 LAB_00194bbb: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX LAB_00194bc3: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] POP RBP RET
ulong my_well_formed_char_length_8bit (int8 param_1,long param_2,long param_3,ulong param_4,long *param_5) { ulong local_48; local_48 = param_4; if ((ulong)(param_3 - param_2) < param_4) { local_48 = param_3 - param_2; } param_5[1] = 0; *param_5 = param_2 + local_48; return local_48; }
8,202
ftparser_call_deinitializer
eloqsql/storage/myisam/ft_parser.c
void ftparser_call_deinitializer(MI_INFO *info) { uint i, j, keys= info->s->state.header.keys; free_root(&info->ft_memroot, MYF(0)); if (! info->ftparser_param) return; for (i= 0; i < keys; i++) { MI_KEYDEF *keyinfo= &info->s->keyinfo[i]; for (j=0; j < MAX_PARAM_NR; j++) { MYSQL_FTPARSER_PARAM *ftparser_param= &info->ftparser_param[keyinfo->ftkey_nr * MAX_PARAM_NR + j]; if (keyinfo->flag & HA_FULLTEXT && ftparser_param->mysql_add_word) { if (keyinfo->parser->deinit) keyinfo->parser->deinit(ftparser_param); ftparser_param->mysql_add_word= 0; } else break; } } }
O3
c
ftparser_call_deinitializer: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax movb 0x12(%rax), %r14b addq $0x90, %rdi xorl %esi, %esi callq 0x9de3f cmpq $0x0, 0xd0(%rbx) setne %al testb %r14b, %r14b setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x74fa1 movzbl %r14b, %eax movq %rax, -0x30(%rbp) xorl %r12d, %r12d movq (%rbx), %rax imulq $0x70, %r12, %r13 addq 0x218(%rax), %r13 movb $0x1, %r15b xorl %eax, %eax testb $-0x80, 0xa(%r13) je 0x74f98 movl 0x20(%r13), %ecx leal (%rax,%rcx,2), %r14d shlq $0x6, %r14 addq 0xd0(%rbx), %r14 cmpq $0x0, 0x8(%r14) je 0x74f98 movq 0x38(%r13), %rax movq 0x18(%rax), %rax testq %rax, %rax je 0x74f7f movq %r14, %rdi callq *%rax movq $0x0, 0x8(%r14) movl $0x1, %eax testb $0x1, %r15b movl $0x0, %r15d jne 0x74f4c incq %r12 cmpq -0x30(%rbp), %r12 jne 0x74f39 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ftparser_call_deinitializer: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, [rdi] mov r14b, [rax+12h] add rdi, 90h xor esi, esi call free_root cmp qword ptr [rbx+0D0h], 0 setnz al test r14b, r14b setnz cl and cl, al cmp cl, 1 jnz short loc_74FA1 movzx eax, r14b mov [rbp+var_30], rax xor r12d, r12d loc_74F39: mov rax, [rbx] imul r13, r12, 70h ; 'p' add r13, [rax+218h] mov r15b, 1 xor eax, eax loc_74F4C: test byte ptr [r13+0Ah], 80h jz short loc_74F98 mov ecx, [r13+20h] lea r14d, [rax+rcx*2] shl r14, 6 add r14, [rbx+0D0h] cmp qword ptr [r14+8], 0 jz short loc_74F98 mov rax, [r13+38h] mov rax, [rax+18h] test rax, rax jz short loc_74F7F mov rdi, r14 call rax loc_74F7F: mov qword ptr [r14+8], 0 mov eax, 1 test r15b, 1 mov r15d, 0 jnz short loc_74F4C loc_74F98: inc r12 cmp r12, [rbp+var_30] jnz short loc_74F39 loc_74FA1: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char ftparser_call_deinitializer(_QWORD *a1) { unsigned __int8 v1; // r14 int v2; // eax long long v3; // r12 long long v4; // r13 char v5; // r15 unsigned long long v6; // r14 void ( *v7)(unsigned long long); // rax bool v8; // zf long long v10; // [rsp+0h] [rbp-30h] v1 = *(_BYTE *)(*a1 + 18LL); free_root(a1 + 18, 0LL); LOBYTE(v2) = a1[26] != 0LL; if ( ((unsigned __int8)v2 & (v1 != 0)) == 1 ) { v10 = v1; v3 = 0LL; do { v4 = *(_QWORD *)(*a1 + 536LL) + 112 * v3; v5 = 1; v2 = 0; do { if ( *(char *)(v4 + 10) >= 0 ) break; v6 = a1[26] + ((unsigned long long)(unsigned int)(v2 + 2 * *(_DWORD *)(v4 + 32)) << 6); if ( !*(_QWORD *)(v6 + 8) ) break; v7 = *(void ( **)(unsigned long long))(*(_QWORD *)(v4 + 56) + 24LL); if ( v7 ) v7(v6); *(_QWORD *)(v6 + 8) = 0LL; v2 = 1; v8 = (v5 & 1) == 0; v5 = 0; } while ( !v8 ); ++v3; } while ( v3 != v10 ); } return v2; }
ftparser_call_deinitializer: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV R14B,byte ptr [RAX + 0x12] ADD RDI,0x90 XOR ESI,ESI CALL 0x0019de3f CMP qword ptr [RBX + 0xd0],0x0 SETNZ AL TEST R14B,R14B SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x00174fa1 MOVZX EAX,R14B MOV qword ptr [RBP + -0x30],RAX XOR R12D,R12D LAB_00174f39: MOV RAX,qword ptr [RBX] IMUL R13,R12,0x70 ADD R13,qword ptr [RAX + 0x218] MOV R15B,0x1 XOR EAX,EAX LAB_00174f4c: TEST byte ptr [R13 + 0xa],0x80 JZ 0x00174f98 MOV ECX,dword ptr [R13 + 0x20] LEA R14D,[RAX + RCX*0x2] SHL R14,0x6 ADD R14,qword ptr [RBX + 0xd0] CMP qword ptr [R14 + 0x8],0x0 JZ 0x00174f98 MOV RAX,qword ptr [R13 + 0x38] MOV RAX,qword ptr [RAX + 0x18] TEST RAX,RAX JZ 0x00174f7f MOV RDI,R14 CALL RAX LAB_00174f7f: MOV qword ptr [R14 + 0x8],0x0 MOV EAX,0x1 TEST R15B,0x1 MOV R15D,0x0 JNZ 0x00174f4c LAB_00174f98: INC R12 CMP R12,qword ptr [RBP + -0x30] JNZ 0x00174f39 LAB_00174fa1: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void ftparser_call_deinitializer(long *param_1) { byte bVar1; code *pcVar2; bool bVar3; int iVar4; ulong uVar5; long lVar6; long lVar7; bool bVar8; bVar1 = *(byte *)(*param_1 + 0x12); free_root(param_1 + 0x12,0); if (bVar1 != 0 && param_1[0x1a] != 0) { uVar5 = 0; do { lVar6 = uVar5 * 0x70 + *(long *)(*param_1 + 0x218); iVar4 = 0; bVar3 = true; do { bVar8 = bVar3; if ((*(byte *)(lVar6 + 10) & 0x80) == 0) break; lVar7 = (ulong)(uint)(iVar4 + *(int *)(lVar6 + 0x20) * 2) * 0x40 + param_1[0x1a]; if (*(long *)(lVar7 + 8) == 0) break; pcVar2 = *(code **)(*(long *)(lVar6 + 0x38) + 0x18); if (pcVar2 != (code *)0x0) { (*pcVar2)(lVar7); } *(int8 *)(lVar7 + 8) = 0; iVar4 = 1; bVar3 = false; } while (bVar8); uVar5 = uVar5 + 1; } while (uVar5 != bVar1); } return; }
8,203
server_chat::send(Session*, char const*, char const*)
untodesu[P]voxelius/game/server/chat.cc
void server_chat::send(Session *session, const char *message, const char *sender) { protocol::ChatMessage packet; packet.type = protocol::ChatMessage::TEXT_MESSAGE; packet.message = std::string(message); packet.sender = std::string(sender); protocol::broadcast(globals::server_host, protocol::encode(packet)); }
O1
cpp
server_chat::send(Session*, char const*, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx xorl %eax, %eax leaq 0x58(%rsp), %r15 movq %rax, -0x20(%r15) leaq 0xe69c3(%rip), %rcx # 0x1034d8 movq %rcx, -0x28(%r15) movq %r15, -0x10(%r15) movq %rax, -0x8(%r15) movb %al, (%r15) leaq 0x78(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movw $0x0, -0x38(%r12) leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x1ccb6 leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %r14 movq %r14, %rsi callq 0x17830 movq (%r14), %rdi leaq 0x20(%rsp), %r14 cmpq %r14, %rdi je 0x1cb7a movq 0x20(%rsp), %rsi incq %rsi callq 0x176b0 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx movq %rbx, %rsi callq 0x1ccb6 leaq 0x48(%rsp), %rdi leaq 0x10(%rsp), %rbx movq %rbx, %rsi callq 0x17830 movq (%rbx), %rdi cmpq %r14, %rdi je 0x1cbb3 movq 0x20(%rsp), %rsi incq %rsi callq 0x176b0 leaq 0xeddc6(%rip), %rax # 0x10a980 movq (%rax), %rbx leaq 0x30(%rsp), %rdi movl $0x1, %esi callq 0x4331c movq %rbx, %rdi movq %rax, %rsi callq 0x43836 movq 0x68(%rsp), %rdi cmpq %r12, %rdi je 0x1cbee movq 0x78(%rsp), %rsi incq %rsi callq 0x176b0 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x1cc05 movq 0x58(%rsp), %rsi incq %rsi callq 0x176b0 addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x1cc18 jmp 0x1cc18 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x1ccf4 movq %rbx, %rdi callq 0x17c80 nop
_ZN11server_chat4sendEP7SessionPKcS3_: push r15 push r14 push r12 push rbx sub rsp, 88h mov rbx, rdx xor eax, eax lea r15, [rsp+0A8h+var_50] mov [r15-20h], rax lea rcx, off_1034D8 mov [r15-28h], rcx mov [r15-10h], r15 mov [r15-8], rax mov [r15], al lea r12, [rsp+0A8h+var_30] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov word ptr [r12-38h], 0 lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_40] lea r14, [rsp+0A8h+var_98] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea r14, [rsp+0A8h+var_88] cmp rdi, r14 jz short loc_1CB7A mov rsi, [rsp+0A8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CB7A: lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] mov rsi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rbx, [rsp+0A8h+var_98] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * cmp rdi, r14 jz short loc_1CBB3 mov rsi, [rsp+0A8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CBB3: lea rax, _ZN7globals11server_hostE; globals::server_host mov rbx, [rax] lea rdi, [rsp+0A8h+var_78]; this mov esi, (offset dword_0+1); protocol::ChatMessage * call _ZN8protocol6encodeERKNS_11ChatMessageEj; protocol::encode(protocol::ChatMessage const&,uint) mov rdi, rbx mov rsi, rax call _ZN8protocol9broadcastEP9_ENetHostP11_ENetPacket; protocol::broadcast(_ENetHost *,_ENetPacket *) mov rdi, [rsp+0A8h+var_40]; void * cmp rdi, r12 jz short loc_1CBEE mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CBEE: mov rdi, [rsp+0A8h+var_60]; void * cmp rdi, r15 jz short loc_1CC05 mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CC05: add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn jmp short loc_1CC18 jmp short $+2 loc_1CC18: mov rbx, rax lea rdi, [rsp+arg_28]; this call _ZN8protocol11ChatMessageD2Ev; protocol::ChatMessage::~ChatMessage() mov rdi, rbx call __Unwind_Resume
void server_chat::send(long long a1, long long a2, long long a3) { unsigned int v4; // edx long long v5; // rbx long long v6; // rax char v7; // [rsp+Fh] [rbp-99h] BYREF void *v8[2]; // [rsp+10h] [rbp-98h] BYREF _QWORD v9[2]; // [rsp+20h] [rbp-88h] BYREF _QWORD v10[2]; // [rsp+30h] [rbp-78h] BYREF __int16 v11; // [rsp+40h] [rbp-68h] void *v12[2]; // [rsp+48h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+58h] [rbp-50h] BYREF void *v14[2]; // [rsp+68h] [rbp-40h] BYREF _QWORD v15[6]; // [rsp+78h] [rbp-30h] BYREF v10[1] = 0LL; v10[0] = off_1034D8; v12[0] = v13; v12[1] = 0LL; LOBYTE(v13[0]) = 0; v14[0] = v15; v14[1] = 0LL; LOBYTE(v15[0]) = 0; v11 = 0; std::string::basic_string<std::allocator<char>>(v8, a2, &v7); std::string::operator=(v14, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); std::string::basic_string<std::allocator<char>>(v8, a3, &v7); std::string::operator=(v12, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); v5 = globals::server_host; v6 = protocol::encode((protocol *)v10, (const protocol::ChatMessage *)((char *)&dword_0 + 1), v4); protocol::broadcast(v5, v6); if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); }
send: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX XOR EAX,EAX LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x20],RAX LEA RCX,[0x2034d8] MOV qword ptr [R15 + -0x28],RCX MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],RAX MOV byte ptr [R15],AL LEA R12,[RSP + 0x78] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV word ptr [R12 + -0x38],0x0 LAB_0011cb3f: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x0011ccb6 LEA RDI,[RSP + 0x68] LEA R14,[RSP + 0x10] MOV RSI,R14 CALL 0x00117830 MOV RDI,qword ptr [R14] LEA R14,[RSP + 0x20] CMP RDI,R14 JZ 0x0011cb7a MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001176b0 LAB_0011cb7a: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RSI,RBX CALL 0x0011ccb6 LEA RDI,[RSP + 0x48] LEA RBX,[RSP + 0x10] MOV RSI,RBX CALL 0x00117830 MOV RDI,qword ptr [RBX] CMP RDI,R14 JZ 0x0011cbb3 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001176b0 LAB_0011cbb3: LEA RAX,[0x20a980] MOV RBX,qword ptr [RAX] LAB_0011cbbd: LEA RDI,[RSP + 0x30] MOV ESI,0x1 CALL 0x0014331c MOV RDI,RBX MOV RSI,RAX CALL 0x00143836 LAB_0011cbd7: MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R12 JZ 0x0011cbee MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001176b0 LAB_0011cbee: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x0011cc05 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001176b0 LAB_0011cc05: ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* server_chat::send(Session*, char const*, char const*) */ void server_chat::send(Session *param_1,char *param_2,char *param_3) { _ENetHost *p_Var1; _ENetPacket *p_Var2; allocator local_99; long *local_98 [2]; long local_88 [2]; int **local_78; int8 local_70; int2 local_68; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; int1 *local_40; int8 local_38; int1 local_30; int7 uStack_2f; local_70 = 0; local_78 = &PTR__ChatMessage_002034d8; local_58 = 0; local_50 = 0; local_38 = 0; local_30 = 0; local_68 = 0; /* try { // try from 0011cb3f to 0011cb4d has its CatchHandler @ 0011cc16 */ local_60 = &local_50; local_40 = &local_30; std::__cxx11::string::string<std::allocator<char>>((string *)local_98,param_2,&local_99); std::__cxx11::string::operator=((string *)&local_40,(string *)local_98); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } /* try { // try from 0011cb7a to 0011cb8b has its CatchHandler @ 0011cc14 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_98,param_3,&local_99); std::__cxx11::string::operator=((string *)&local_60,(string *)local_98); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } p_Var1 = globals::server_host; /* try { // try from 0011cbbd to 0011cbd6 has its CatchHandler @ 0011cc18 */ p_Var2 = (_ENetPacket *)protocol::encode((ChatMessage *)&local_78,1); protocol::broadcast(p_Var1,p_Var2); if (local_40 != &local_30) { operator_delete(local_40,CONCAT71(uStack_2f,local_30) + 1); } if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } return; }
8,204
server_chat::send(Session*, char const*, char const*)
untodesu[P]voxelius/game/server/chat.cc
void server_chat::send(Session *session, const char *message, const char *sender) { protocol::ChatMessage packet; packet.type = protocol::ChatMessage::TEXT_MESSAGE; packet.message = std::string(message); packet.sender = std::string(sender); protocol::broadcast(globals::server_host, protocol::encode(packet)); }
O3
cpp
server_chat::send(Session*, char const*, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx xorl %eax, %eax leaq 0x58(%rsp), %r15 movq %rax, -0x20(%r15) leaq 0xe652e(%rip), %rcx # 0x101810 movq %rcx, -0x28(%r15) movq %r15, -0x10(%r15) movq %rax, -0x8(%r15) movb %al, (%r15) leaq 0x78(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movw $0x0, -0x38(%r12) leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x1b480 leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %r14 movq %r14, %rsi callq 0x16840 movq (%r14), %rdi leaq 0x20(%rsp), %r14 cmpq %r14, %rdi je 0x1b347 movq 0x20(%rsp), %rsi incq %rsi callq 0x166c0 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx movq %rbx, %rsi callq 0x1b480 leaq 0x48(%rsp), %rdi leaq 0x10(%rsp), %rbx movq %rbx, %rsi callq 0x16840 movq (%rbx), %rdi cmpq %r14, %rdi je 0x1b380 movq 0x20(%rsp), %rsi incq %rsi callq 0x166c0 leaq 0xed609(%rip), %rax # 0x108990 movq (%rax), %rbx leaq 0x30(%rsp), %rdi movl $0x1, %esi callq 0x4270c movq %rbx, %rdi movq %rax, %rsi callq 0x42c26 movq 0x68(%rsp), %rdi cmpq %r12, %rdi je 0x1b3bb movq 0x78(%rsp), %rsi incq %rsi callq 0x166c0 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x1b3d2 movq 0x58(%rsp), %rsi incq %rsi callq 0x166c0 addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x1b3e5 jmp 0x1b3e5 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x1b4be movq %rbx, %rdi callq 0x16c90
_ZN11server_chat4sendEP7SessionPKcS3_: push r15 push r14 push r12 push rbx sub rsp, 88h mov rbx, rdx xor eax, eax lea r15, [rsp+0A8h+var_50] mov [r15-20h], rax lea rcx, off_101810 mov [r15-28h], rcx mov [r15-10h], r15 mov [r15-8], rax mov [r15], al lea r12, [rsp+0A8h+var_30] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov word ptr [r12-38h], 0 lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_40] lea r14, [rsp+0A8h+var_98] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea r14, [rsp+0A8h+var_88] cmp rdi, r14 jz short loc_1B347 mov rsi, [rsp+0A8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B347: lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] mov rsi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rbx, [rsp+0A8h+var_98] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * cmp rdi, r14 jz short loc_1B380 mov rsi, [rsp+0A8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B380: lea rax, _ZN7globals11server_hostE; globals::server_host mov rbx, [rax] lea rdi, [rsp+0A8h+var_78]; this mov esi, (offset dword_0+1); protocol::ChatMessage * call _ZN8protocol6encodeERKNS_11ChatMessageEj; protocol::encode(protocol::ChatMessage const&,uint) mov rdi, rbx mov rsi, rax call _ZN8protocol9broadcastEP9_ENetHostP11_ENetPacket; protocol::broadcast(_ENetHost *,_ENetPacket *) mov rdi, [rsp+0A8h+var_40]; void * cmp rdi, r12 jz short loc_1B3BB mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B3BB: mov rdi, [rsp+0A8h+var_60]; void * cmp rdi, r15 jz short loc_1B3D2 mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B3D2: add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn jmp short loc_1B3E5 jmp short $+2 loc_1B3E5: mov rbx, rax lea rdi, [rsp+arg_28]; this call _ZN8protocol11ChatMessageD2Ev; protocol::ChatMessage::~ChatMessage() mov rdi, rbx call __Unwind_Resume
void server_chat::send(long long a1, long long a2, long long a3) { unsigned int v4; // edx long long v5; // rbx long long v6; // rax char v7; // [rsp+Fh] [rbp-99h] BYREF void *v8[2]; // [rsp+10h] [rbp-98h] BYREF _QWORD v9[2]; // [rsp+20h] [rbp-88h] BYREF _QWORD v10[2]; // [rsp+30h] [rbp-78h] BYREF __int16 v11; // [rsp+40h] [rbp-68h] void *v12[2]; // [rsp+48h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+58h] [rbp-50h] BYREF void *v14[2]; // [rsp+68h] [rbp-40h] BYREF _QWORD v15[6]; // [rsp+78h] [rbp-30h] BYREF v10[1] = 0LL; v10[0] = off_101810; v12[0] = v13; v12[1] = 0LL; LOBYTE(v13[0]) = 0; v14[0] = v15; v14[1] = 0LL; LOBYTE(v15[0]) = 0; v11 = 0; std::string::basic_string<std::allocator<char>>(v8, a2, &v7); std::string::operator=(v14, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); std::string::basic_string<std::allocator<char>>(v8, a3, &v7); std::string::operator=(v12, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); v5 = globals::server_host; v6 = protocol::encode((protocol *)v10, (const protocol::ChatMessage *)((char *)&dword_0 + 1), v4); protocol::broadcast(v5, v6); if ( v14[0] != v15 ) operator delete(v14[0], v15[0] + 1LL); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); }
send: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX XOR EAX,EAX LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x20],RAX LEA RCX,[0x201810] MOV qword ptr [R15 + -0x28],RCX MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],RAX MOV byte ptr [R15],AL LEA R12,[RSP + 0x78] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV word ptr [R12 + -0x38],0x0 LAB_0011b30c: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x0011b480 LEA RDI,[RSP + 0x68] LEA R14,[RSP + 0x10] MOV RSI,R14 CALL 0x00116840 MOV RDI,qword ptr [R14] LEA R14,[RSP + 0x20] CMP RDI,R14 JZ 0x0011b347 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001166c0 LAB_0011b347: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RSI,RBX CALL 0x0011b480 LEA RDI,[RSP + 0x48] LEA RBX,[RSP + 0x10] MOV RSI,RBX CALL 0x00116840 MOV RDI,qword ptr [RBX] CMP RDI,R14 JZ 0x0011b380 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001166c0 LAB_0011b380: LEA RAX,[0x208990] MOV RBX,qword ptr [RAX] LAB_0011b38a: LEA RDI,[RSP + 0x30] MOV ESI,0x1 CALL 0x0014270c MOV RDI,RBX MOV RSI,RAX CALL 0x00142c26 LAB_0011b3a4: MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R12 JZ 0x0011b3bb MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001166c0 LAB_0011b3bb: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x0011b3d2 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001166c0 LAB_0011b3d2: ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* server_chat::send(Session*, char const*, char const*) */ void server_chat::send(Session *param_1,char *param_2,char *param_3) { _ENetHost *p_Var1; _ENetPacket *p_Var2; allocator local_99; long *local_98 [2]; long local_88 [2]; int **local_78; int8 local_70; int2 local_68; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; int1 *local_40; int8 local_38; int1 local_30; int7 uStack_2f; local_70 = 0; local_78 = &PTR__ChatMessage_00201810; local_58 = 0; local_50 = 0; local_38 = 0; local_30 = 0; local_68 = 0; /* try { // try from 0011b30c to 0011b31a has its CatchHandler @ 0011b3e3 */ local_60 = &local_50; local_40 = &local_30; std::__cxx11::string::string<std::allocator<char>>((string *)local_98,param_2,&local_99); std::__cxx11::string::operator=((string *)&local_40,(string *)local_98); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } /* try { // try from 0011b347 to 0011b358 has its CatchHandler @ 0011b3e1 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_98,param_3,&local_99); std::__cxx11::string::operator=((string *)&local_60,(string *)local_98); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } p_Var1 = globals::server_host; /* try { // try from 0011b38a to 0011b3a3 has its CatchHandler @ 0011b3e5 */ p_Var2 = (_ENetPacket *)protocol::encode((ChatMessage *)&local_78,1); protocol::broadcast(p_Var1,p_Var2); if (local_40 != &local_30) { operator_delete(local_40,CONCAT71(uStack_2f,local_30) + 1); } if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } return; }
8,205
my_thread_end
eloqsql/mysys/my_thr_init.c
void my_thread_end(void) { struct st_my_thread_var *tmp; tmp= my_thread_var; #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n", tmp, pthread_self(), tmp ? (long) tmp->id : 0L); #endif /* Remove the instrumentation for this thread. This must be done before trashing st_my_thread_var, because the LF_HASH depends on it. */ PSI_CALL_delete_current_thread(); /* We need to disable DBUG early for this thread to ensure that the the mutex calls doesn't enable it again To this we have to both do DBUG_POP() and also reset THR_KEY_mysys as the key is used by DBUG. */ DBUG_POP(); set_mysys_var(NULL); if (tmp && tmp->init) { #if !defined(DBUG_OFF) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { free(tmp->dbug); tmp->dbug=0; } #endif my_thread_destory_thr_mutex(tmp); /* Decrement counter for number of running threads. We are using this in my_thread_global_end() to wait until all threads have called my_thread_end and thus freed all memory they have allocated in my_thread_init() and DBUG_xxxx */ mysql_mutex_lock(&THR_LOCK_threads); DBUG_ASSERT(THR_thread_count != 0); if (--THR_thread_count == 0) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); /* Trash variable so that we can detect false accesses to my_thread_var */ tmp->init= 2; free(tmp); } }
O3
c
my_thread_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq 0x37a0db(%rip), %r15 # 0x428334 movl (%r15), %edi callq 0x39af0 movq %rax, %rbx leaq 0x2f5eed(%rip), %r14 # 0x3a4158 movq (%r14), %rax callq *0x138(%rax) movl (%r15), %edi xorl %esi, %esi callq 0x393a0 testq %rbx, %rbx je 0xae2fc cmpb $0x0, 0xe8(%rbx) je 0xae2fc movq %rbx, %rdi callq 0xade6d leaq 0x379fcd(%rip), %r15 # 0x428268 cmpq $0x0, 0x40(%r15) jne 0xae307 leaq 0x379fbf(%rip), %rdi # 0x428268 callq 0x39260 leaq 0x379db3(%rip), %rax # 0x428068 decl (%rax) jne 0xae2d5 leaq 0x37a038(%rip), %rax # 0x4282f8 movq 0x30(%rax), %rdi testq %rdi, %rdi jne 0xae319 leaq 0x37a028(%rip), %rdi # 0x4282f8 callq 0x39720 movq 0x40(%r15), %rdi testq %rdi, %rdi jne 0xae30e leaq 0x379f83(%rip), %rdi # 0x428268 callq 0x39220 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x39180 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x3ab57 jmp 0xae2ae movq (%r14), %rax callq *0x160(%rax) jmp 0xae2de movq (%r14), %rax callq *0x170(%rax) jmp 0xae2c9
my_thread_end: push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea r15, THR_KEY_mysys mov edi, [r15] call _pthread_getspecific mov rbx, rax lea r14, PSI_server mov rax, [r14] call qword ptr [rax+138h] mov edi, [r15] xor esi, esi call _pthread_setspecific test rbx, rbx jz short loc_AE2FC cmp byte ptr [rbx+0E8h], 0 jz short loc_AE2FC mov rdi, rbx call my_thread_destory_thr_mutex lea r15, THR_LOCK_threads cmp qword ptr [r15+40h], 0 jnz short loc_AE307 lea rdi, THR_LOCK_threads call _pthread_mutex_lock loc_AE2AE: lea rax, THR_thread_count dec dword ptr [rax] jnz short loc_AE2D5 lea rax, THR_COND_threads mov rdi, [rax+30h] test rdi, rdi jnz short loc_AE319 loc_AE2C9: lea rdi, THR_COND_threads call _pthread_cond_signal loc_AE2D5: mov rdi, [r15+40h] test rdi, rdi jnz short loc_AE30E loc_AE2DE: lea rdi, THR_LOCK_threads call _pthread_mutex_unlock mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _free loc_AE2FC: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_AE307: call my_thread_end_cold_1 jmp short loc_AE2AE loc_AE30E: mov rax, [r14] call qword ptr [rax+160h] jmp short loc_AE2DE loc_AE319: mov rax, [r14] call qword ptr [rax+170h] jmp short loc_AE2C9
long long my_thread_end() { long long v0; // rdi long long v1; // rbx long long result; // rax long long v3; // rdi long long v4; // rdi v0 = THR_KEY_mysys; v1 = pthread_getspecific(THR_KEY_mysys); (*((void ( **)(long long))PSI_server + 39))(v0); result = pthread_setspecific(THR_KEY_mysys, 0LL); if ( v1 && *(_BYTE *)(v1 + 232) ) { my_thread_destory_thr_mutex(v1); if ( THR_LOCK_threads[8] ) my_thread_end_cold_1(v1); else pthread_mutex_lock(THR_LOCK_threads); if ( !--THR_thread_count ) { v3 = THR_COND_threads[6]; if ( v3 ) (*((void ( **)(long long))PSI_server + 46))(v3); pthread_cond_signal(THR_COND_threads); } v4 = THR_LOCK_threads[8]; if ( v4 ) (*((void ( **)(long long))PSI_server + 44))(v4); pthread_mutex_unlock(THR_LOCK_threads); return free(v1); } return result; }
my_thread_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA R15,[0x528334] MOV EDI,dword ptr [R15] CALL 0x00139af0 MOV RBX,RAX LEA R14,[0x4a4158] MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x138] MOV EDI,dword ptr [R15] XOR ESI,ESI CALL 0x001393a0 TEST RBX,RBX JZ 0x001ae2fc CMP byte ptr [RBX + 0xe8],0x0 JZ 0x001ae2fc MOV RDI,RBX CALL 0x001ade6d LEA R15,[0x528268] CMP qword ptr [R15 + 0x40],0x0 JNZ 0x001ae307 LEA RDI,[0x528268] CALL 0x00139260 LAB_001ae2ae: LEA RAX,[0x528068] DEC dword ptr [RAX] JNZ 0x001ae2d5 LEA RAX,[0x5282f8] MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JNZ 0x001ae319 LAB_001ae2c9: LEA RDI,[0x5282f8] CALL 0x00139720 LAB_001ae2d5: MOV RDI,qword ptr [R15 + 0x40] TEST RDI,RDI JNZ 0x001ae30e LAB_001ae2de: LEA RDI,[0x528268] CALL 0x00139220 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00139180 LAB_001ae2fc: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001ae307: CALL 0x0013ab57 JMP 0x001ae2ae LAB_001ae30e: MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x160] JMP 0x001ae2de LAB_001ae319: MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x170] JMP 0x001ae2c9
void my_thread_end(void) { void *__ptr; __ptr = pthread_getspecific(THR_KEY_mysys); (**(code **)(PSI_server + 0x138))(); pthread_setspecific(THR_KEY_mysys,(void *)0x0); if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) { my_thread_destory_thr_mutex(__ptr); if (THR_LOCK_threads._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads); } else { my_thread_end_cold_1(); } THR_thread_count = THR_thread_count + -1; if (THR_thread_count == 0) { if (THR_COND_threads._48_8_ != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)THR_COND_threads); } if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads); free(__ptr); return; } return; }
8,206
pfs_create_prepared_stmt_v1
eloqsql/storage/perfschema/pfs.cc
PSI_prepared_stmt* pfs_create_prepared_stmt_v1(void *identity, uint stmt_id, PSI_statement_locker *locker, const char *stmt_name, size_t stmt_name_length) { PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); PFS_events_statements *pfs_stmt= reinterpret_cast<PFS_events_statements*> (state->m_statement); PFS_program *pfs_program= reinterpret_cast<PFS_program *>(state->m_parent_sp_share); PFS_thread *pfs_thread= my_thread_get_THR_PFS(); if (unlikely(pfs_thread == NULL)) return NULL; PFS_prepared_stmt *pfs= create_prepared_stmt(identity, pfs_thread, pfs_program, pfs_stmt, stmt_id, stmt_name, static_cast<uint>(stmt_name_length)); state->m_parent_prepared_stmt= reinterpret_cast<PSI_prepared_stmt*>(pfs); state->m_in_prepare= true; return reinterpret_cast<PSI_prepared_stmt*>(pfs); }
O0
cpp
pfs_create_prepared_stmt_v1: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x170(%rax), %rax movq %rax, -0x48(%rbp) callq 0x4d760 movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x552e3 movq $0x0, -0x8(%rbp) jmp 0x5532a movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x40(%rbp), %rcx movl -0x14(%rbp), %r8d movq -0x28(%rbp), %r9 movq -0x30(%rbp), %rax movl %eax, (%rsp) callq 0x32f90 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x178(%rax) movq -0x38(%rbp), %rax movb $0x1, 0x1(%rax) movq -0x58(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pfs_create_prepared_stmt_v1: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax+170h] mov [rbp+var_48], rax call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_50], rax cmp [rbp+var_50], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_552E3 mov [rbp+var_8], 0 jmp short loc_5532A loc_552E3: mov rdi, [rbp+var_10] mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] mov rcx, [rbp+var_40] mov r8d, [rbp+var_14] mov r9, [rbp+var_28] mov rax, [rbp+var_30] mov [rsp+60h+var_60], eax call _Z20create_prepared_stmtPvP10PFS_threadP11PFS_programP21PFS_events_statementsjPKcj; create_prepared_stmt(void *,PFS_thread *,PFS_program *,PFS_events_statements *,uint,char const*,uint) mov [rbp+var_58], rax mov rcx, [rbp+var_58] mov rax, [rbp+var_38] mov [rax+178h], rcx mov rax, [rbp+var_38] mov byte ptr [rax+1], 1 mov rax, [rbp+var_58] mov [rbp+var_8], rax loc_5532A: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
PFS_prepared_stmt * pfs_create_prepared_stmt_v1(long long a1, unsigned int a2, long long a3, long long a4, int a5) { PFS_prepared_stmt *prepared_stmt; // [rsp+8h] [rbp-58h] long long THR_PFS; // [rsp+10h] [rbp-50h] long long v8; // [rsp+18h] [rbp-48h] long long v9; // [rsp+20h] [rbp-40h] v9 = *(_QWORD *)(a3 + 40); v8 = *(_QWORD *)(a3 + 368); THR_PFS = my_thread_get_THR_PFS(); if ( !THR_PFS ) return 0LL; prepared_stmt = create_prepared_stmt(a1, THR_PFS, v8, v9, a2, a4, a5); *(_QWORD *)(a3 + 376) = prepared_stmt; *(_BYTE *)(a3 + 1) = 1; return prepared_stmt; }
pfs_create_prepared_stmt_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x170] MOV qword ptr [RBP + -0x48],RAX CALL 0x0014d760 MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001552e3 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015532a LAB_001552e3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] MOV R8D,dword ptr [RBP + -0x14] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RSP],EAX CALL 0x00132f90 MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x178],RCX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],0x1 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x8],RAX LAB_0015532a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
int8 pfs_create_prepared_stmt_v1(void *param_1,uint param_2,long param_3,char *param_4,uint param_5) { PFS_events_statements *pPVar1; PFS_program *pPVar2; PFS_thread *pPVar3; int8 local_10; pPVar1 = *(PFS_events_statements **)(param_3 + 0x28); pPVar2 = *(PFS_program **)(param_3 + 0x170); pPVar3 = (PFS_thread *)my_thread_get_THR_PFS(); if (pPVar3 == (PFS_thread *)0x0) { local_10 = 0; } else { local_10 = create_prepared_stmt(param_1,pPVar3,pPVar2,pPVar1,param_2,param_4,param_5); *(int8 *)(param_3 + 0x178) = local_10; *(int1 *)(param_3 + 1) = 1; } return local_10; }
8,207
read_block_primary
eloqsql/mysys/mf_keycache.c
static void read_block_primary(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, uint read_length, uint min_length) { size_t got_length; /* On entry cache_lock is locked */ KEYCACHE_THREAD_TRACE("read_block_primary"); /* This code is executed only by threads that submitted primary requests. Until block->status contains BLOCK_READ, all other request for the block become secondary requests. For a primary request the block must be properly initialized. */ DBUG_ASSERT(((block->status & ~BLOCK_FOR_UPDATE) == BLOCK_IN_USE) || fail_block(block)); DBUG_ASSERT((block->length == 0) || fail_block(block)); DBUG_ASSERT((block->offset == keycache->key_cache_block_size) || fail_block(block)); DBUG_ASSERT((block->requests > 0) || fail_block(block)); KEYCACHE_DBUG_PRINT("read_block_primary", ("page to be read by primary request")); keycache->global_cache_read++; /* Page is not in buffer yet, is to be read from disk */ keycache_pthread_mutex_unlock(&keycache->cache_lock); /* Here other threads may step in and register as secondary readers. They will register in block->wqueue[COND_FOR_REQUESTED]. */ got_length= my_pread(block->hash_link->file, block->buffer, read_length, block->hash_link->diskpos, MYF(0)); keycache_pthread_mutex_lock(&keycache->cache_lock); /* The block can now have been marked for free (in case of FLUSH_RELEASE). Otherwise the state must be unchanged. */ DBUG_ASSERT(((block->status & ~(BLOCK_REASSIGNED | BLOCK_FOR_UPDATE)) == BLOCK_IN_USE) || fail_block(block)); DBUG_ASSERT((block->length == 0) || fail_block(block)); DBUG_ASSERT((block->offset == keycache->key_cache_block_size) || fail_block(block)); DBUG_ASSERT((block->requests > 0) || fail_block(block)); if (got_length < min_length) block->status|= BLOCK_ERROR; else { block->status|= BLOCK_READ; block->length= (uint)got_length; /* Do not set block->offset here. If this block is marked BLOCK_CHANGED later, we want to flush only the modified part. So only a writer may set block->offset down from keycache->key_cache_block_size. */ } KEYCACHE_DBUG_PRINT("read_block_primary", ("primary request: new page in cache")); /* Signal that all pending requests for this page now can be processed */ release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]); DBUG_ASSERT(keycache->can_be_used); }
O0
c
read_block_primary: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) jmp 0xe7028 jmp 0xe702a jmp 0xe702c jmp 0xe702e jmp 0xe7030 jmp 0xe7032 jmp 0xe7034 jmp 0xe7036 jmp 0xe7038 movq -0x8(%rbp), %rax movq 0x158(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x158(%rax) movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe6fb0 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq 0x40(%rax), %rsi movl -0x14(%rbp), %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x20(%rax), %rcx xorl %eax, %eax movl %eax, %r8d callq 0xfad50 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x76370(%rip), %rsi # 0x15d412 movl $0xa63, %edx # imm = 0xA63 callq 0xe6590 jmp 0xe70ae jmp 0xe70b0 jmp 0xe70b2 jmp 0xe70b4 jmp 0xe70b6 jmp 0xe70b8 jmp 0xe70ba movq -0x20(%rbp), %rax movl -0x18(%rbp), %ecx cmpq %rcx, %rax jae 0xe70d5 movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x50(%rax) jmp 0xe70ef movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x50(%rax) movq -0x20(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4c(%rax) jmp 0xe70f1 jmp 0xe70f3 movq -0x10(%rbp), %rdi addq $0x28, %rdi callq 0xe83b0 jmp 0xe7102 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
read_block_primary: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx jmp short $+2 loc_E7028: jmp short $+2 loc_E702A: jmp short $+2 loc_E702C: jmp short $+2 loc_E702E: jmp short $+2 loc_E7030: jmp short $+2 loc_E7032: jmp short $+2 loc_E7034: jmp short $+2 loc_E7036: jmp short $+2 loc_E7038: mov rax, [rbp+var_8] mov rcx, [rax+158h] add rcx, 1 mov [rax+158h], rcx mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_26 mov rax, [rbp+var_10] mov rax, [rax+20h] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax+40h] mov eax, [rbp+var_14] mov edx, eax mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rax+20h] xor eax, eax mov r8d, eax call my_pread mov [rbp+var_20], rax mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0A63h call inline_mysql_mutex_lock_25 jmp short $+2 loc_E70AE: jmp short $+2 loc_E70B0: jmp short $+2 loc_E70B2: jmp short $+2 loc_E70B4: jmp short $+2 loc_E70B6: jmp short $+2 loc_E70B8: jmp short $+2 loc_E70BA: mov rax, [rbp+var_20] mov ecx, [rbp+var_18] cmp rax, rcx jnb short loc_E70D5 mov rax, [rbp+var_10] mov ecx, [rax+50h] or ecx, 1 mov [rax+50h], ecx jmp short loc_E70EF loc_E70D5: mov rax, [rbp+var_10] mov ecx, [rax+50h] or ecx, 2 mov [rax+50h], ecx mov rax, [rbp+var_20] mov ecx, eax mov rax, [rbp+var_10] mov [rax+4Ch], ecx loc_E70EF: jmp short $+2 loc_E70F1: jmp short $+2 loc_E70F3: mov rdi, [rbp+var_10] add rdi, 28h ; '(' call release_whole_queue jmp short $+2 loc_E7102: add rsp, 20h pop rbp retn
long long read_block_primary(long long a1, long long a2, unsigned int a3, unsigned int a4) { unsigned long long v5; // [rsp+0h] [rbp-20h] ++*(_QWORD *)(a1 + 344); inline_mysql_mutex_unlock_26(a1 + 192); v5 = my_pread( *(unsigned int *)(*(_QWORD *)(a2 + 32) + 24LL), *(_QWORD *)(a2 + 64), a3, *(_QWORD *)(*(_QWORD *)(a2 + 32) + 32LL), 0LL); inline_mysql_mutex_lock_25(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xA63u); if ( v5 >= a4 ) { *(_DWORD *)(a2 + 80) |= 2u; *(_DWORD *)(a2 + 76) = v5; } else { *(_DWORD *)(a2 + 80) |= 1u; } return release_whole_queue(a2 + 40); }
read_block_primary: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX JMP 0x001e7028 LAB_001e7028: JMP 0x001e702a LAB_001e702a: JMP 0x001e702c LAB_001e702c: JMP 0x001e702e LAB_001e702e: JMP 0x001e7030 LAB_001e7030: JMP 0x001e7032 LAB_001e7032: JMP 0x001e7034 LAB_001e7034: JMP 0x001e7036 LAB_001e7036: JMP 0x001e7038 LAB_001e7038: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x158] ADD RCX,0x1 MOV qword ptr [RAX + 0x158],RCX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e6fb0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x40] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x20] XOR EAX,EAX MOV R8D,EAX CALL 0x001fad50 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25d412] MOV EDX,0xa63 CALL 0x001e6590 JMP 0x001e70ae LAB_001e70ae: JMP 0x001e70b0 LAB_001e70b0: JMP 0x001e70b2 LAB_001e70b2: JMP 0x001e70b4 LAB_001e70b4: JMP 0x001e70b6 LAB_001e70b6: JMP 0x001e70b8 LAB_001e70b8: JMP 0x001e70ba LAB_001e70ba: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x18] CMP RAX,RCX JNC 0x001e70d5 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x1 MOV dword ptr [RAX + 0x50],ECX JMP 0x001e70ef LAB_001e70d5: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x2 MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4c],ECX LAB_001e70ef: JMP 0x001e70f1 LAB_001e70f1: JMP 0x001e70f3 LAB_001e70f3: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 CALL 0x001e83b0 JMP 0x001e7102 LAB_001e7102: ADD RSP,0x20 POP RBP RET
void read_block_primary(long param_1,long param_2,int4 param_3,uint param_4) { ulong uVar1; *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; inline_mysql_mutex_unlock(param_1 + 0xc0); uVar1 = my_pread(*(int4 *)(*(long *)(param_2 + 0x20) + 0x18),*(int8 *)(param_2 + 0x40) ,param_3,*(int8 *)(*(long *)(param_2 + 0x20) + 0x20),0); inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xa63); if (uVar1 < param_4) { *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) | 1; } else { *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) | 2; *(int *)(param_2 + 0x4c) = (int)uVar1; } release_whole_queue(param_2 + 0x28); return; }
8,208
stbi__high_bit(unsigned int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__high_bit(unsigned int z) { int n=0; if (z == 0) return -1; if (z >= 0x10000) { n += 16; z >>= 16; } if (z >= 0x00100) { n += 8; z >>= 8; } if (z >= 0x00010) { n += 4; z >>= 4; } if (z >= 0x00004) { n += 2; z >>= 2; } if (z >= 0x00002) { n += 1;/* >>= 1;*/ } return n; }
O1
c
stbi__high_bit(unsigned int): testl %edi, %edi je 0x29826 movl %edi, %eax shrl $0x10, %eax xorl %ecx, %ecx cmpl $0x10000, %edi # imm = 0x10000 setae %cl cmovbl %edi, %eax shll $0x4, %ecx leal 0x8(%rcx), %edx movl %eax, %esi shrl $0x8, %esi cmpl $0x100, %eax # imm = 0x100 cmovbl %eax, %esi cmovbl %ecx, %edx leal 0x4(%rdx), %ecx movl %esi, %edi shrl $0x4, %edi cmpl $0x10, %esi cmovbl %esi, %edi cmovbl %edx, %ecx leal 0x2(%rcx), %eax movl %edi, %edx shrl $0x2, %edx cmpl $0x4, %edi cmovbl %edi, %edx cmovbl %ecx, %eax cmpl $0x2, %edx sbbl $-0x1, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF retq
_ZL14stbi__high_bitj: test edi, edi jz short loc_29826 mov eax, edi shr eax, 10h xor ecx, ecx cmp edi, 10000h setnb cl cmovb eax, edi shl ecx, 4 lea edx, [rcx+8] mov esi, eax shr esi, 8 cmp eax, 100h cmovb esi, eax cmovb edx, ecx lea ecx, [rdx+4] mov edi, esi shr edi, 4 cmp esi, 10h cmovb edi, esi cmovb ecx, edx lea eax, [rcx+2] mov edx, edi shr edx, 2 cmp edi, 4 cmovb edx, edi cmovb eax, ecx cmp edx, 2 sbb eax, 0FFFFFFFFh retn loc_29826: mov eax, 0FFFFFFFFh retn
long long stbi__high_bit(unsigned int a1) { unsigned int v1; // eax int v2; // edx unsigned int v3; // esi int v4; // ecx unsigned int v5; // edi int v6; // eax unsigned int v7; // edx if ( !a1 ) return 0xFFFFFFFFLL; v1 = HIWORD(a1); if ( a1 < 0x10000 ) v1 = a1; v2 = 16 * (a1 >= 0x10000) + 8; v3 = v1 >> 8; if ( v1 < 0x100 ) { v3 = v1; v2 = 16 * (a1 >= 0x10000); } v4 = v2 + 4; v5 = v3 >> 4; if ( v3 < 0x10 ) { v5 = v3; v4 = v2; } v6 = v4 + 2; v7 = v5 >> 2; if ( v5 < 4 ) { v7 = v5; v6 = v4; } return v6 - ((unsigned int)(v7 < 2) - 1); }
8,209
stbi__high_bit(unsigned int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__high_bit(unsigned int z) { int n=0; if (z == 0) return -1; if (z >= 0x10000) { n += 16; z >>= 16; } if (z >= 0x00100) { n += 8; z >>= 8; } if (z >= 0x00010) { n += 4; z >>= 4; } if (z >= 0x00004) { n += 2; z >>= 2; } if (z >= 0x00002) { n += 1;/* >>= 1;*/ } return n; }
O2
c
stbi__high_bit(unsigned int): testl %edi, %edi je 0x168bb movl %edi, %eax shrl $0x10, %eax xorl %ecx, %ecx cmpl $0x10000, %edi # imm = 0x10000 setae %cl cmovbl %edi, %eax shll $0x4, %ecx leal 0x8(%rcx), %edx movl %eax, %esi shrl $0x8, %esi cmpl $0x100, %eax # imm = 0x100 cmovbl %eax, %esi cmovbl %ecx, %edx leal 0x4(%rdx), %ecx movl %esi, %edi shrl $0x4, %edi cmpl $0x10, %esi cmovbl %esi, %edi cmovbl %edx, %ecx leal 0x2(%rcx), %eax movl %edi, %edx shrl $0x2, %edx cmpl $0x4, %edi cmovbl %edi, %edx cmovbl %ecx, %eax cmpl $0x2, %edx sbbl $-0x1, %eax retq pushq $-0x1 popq %rax retq
_ZL14stbi__high_bitj: test edi, edi jz short loc_168BB mov eax, edi shr eax, 10h xor ecx, ecx cmp edi, 10000h setnb cl cmovb eax, edi shl ecx, 4 lea edx, [rcx+8] mov esi, eax shr esi, 8 cmp eax, 100h cmovb esi, eax cmovb edx, ecx lea ecx, [rdx+4] mov edi, esi shr edi, 4 cmp esi, 10h cmovb edi, esi cmovb ecx, edx lea eax, [rcx+2] mov edx, edi shr edx, 2 cmp edi, 4 cmovb edx, edi cmovb eax, ecx cmp edx, 2 sbb eax, 0FFFFFFFFh retn loc_168BB: push 0FFFFFFFFFFFFFFFFh pop rax retn
long long stbi__high_bit(unsigned int a1) { unsigned int v1; // eax int v2; // edx unsigned int v3; // esi int v4; // ecx unsigned int v5; // edi int v6; // eax unsigned int v7; // edx if ( !a1 ) return -1LL; v1 = HIWORD(a1); if ( a1 < 0x10000 ) v1 = a1; v2 = 16 * (a1 >= 0x10000) + 8; v3 = v1 >> 8; if ( v1 < 0x100 ) { v3 = v1; v2 = 16 * (a1 >= 0x10000); } v4 = v2 + 4; v5 = v3 >> 4; if ( v3 < 0x10 ) { v5 = v3; v4 = v2; } v6 = v4 + 2; v7 = v5 >> 2; if ( v5 < 4 ) { v7 = v5; v6 = v4; } return v6 - ((unsigned int)(v7 < 2) - 1); }
stbi__high_bit: TEST EDI,EDI JZ 0x001168bb MOV EAX,EDI SHR EAX,0x10 XOR ECX,ECX CMP EDI,0x10000 SETNC CL CMOVC EAX,EDI SHL ECX,0x4 LEA EDX,[RCX + 0x8] MOV ESI,EAX SHR ESI,0x8 CMP EAX,0x100 CMOVC ESI,EAX CMOVC EDX,ECX LEA ECX,[RDX + 0x4] MOV EDI,ESI SHR EDI,0x4 CMP ESI,0x10 CMOVC EDI,ESI CMOVC ECX,EDX LEA EAX,[RCX + 0x2] MOV EDX,EDI SHR EDX,0x2 CMP EDI,0x4 CMOVC EDX,EDI CMOVC EAX,ECX CMP EDX,0x2 SBB EAX,-0x1 RET LAB_001168bb: PUSH -0x1 POP RAX RET
/* stbi__high_bit(unsigned int) */ ulong stbi__high_bit(uint param_1) { uint uVar1; uint uVar2; int iVar3; int iVar4; if (param_1 == 0) { return 0xffffffffffffffff; } uVar2 = param_1 >> 0x10; if (0xffff >= param_1) { uVar2 = param_1; } iVar3 = (uint)(0xffff < param_1) * 0x10; iVar4 = iVar3 + 8; uVar1 = uVar2 >> 8; if (uVar2 < 0x100) { iVar4 = iVar3; uVar1 = uVar2; } iVar3 = iVar4 + 4; uVar2 = uVar1 >> 4; if (uVar1 < 0x10) { iVar3 = iVar4; uVar2 = uVar1; } iVar4 = iVar3 + 2; uVar1 = uVar2 >> 2; if (uVar2 < 4) { iVar4 = iVar3; uVar1 = uVar2; } return (ulong)((iVar4 + 1) - (uint)(uVar1 < 2)); }
8,210
stbi__high_bit(unsigned int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__high_bit(unsigned int z) { int n=0; if (z == 0) return -1; if (z >= 0x10000) { n += 16; z >>= 16; } if (z >= 0x00100) { n += 8; z >>= 8; } if (z >= 0x00010) { n += 4; z >>= 4; } if (z >= 0x00004) { n += 2; z >>= 2; } if (z >= 0x00002) { n += 1;/* >>= 1;*/ } return n; }
O3
c
stbi__high_bit(unsigned int): testl %edi, %edi je 0x28d85 movl %edi, %eax shrl $0x10, %eax xorl %ecx, %ecx cmpl $0x10000, %edi # imm = 0x10000 setae %cl cmovbl %edi, %eax shll $0x4, %ecx leal 0x8(%rcx), %edx movl %eax, %esi shrl $0x8, %esi cmpl $0x100, %eax # imm = 0x100 cmovbl %eax, %esi cmovbl %ecx, %edx leal 0x4(%rdx), %ecx movl %esi, %edi shrl $0x4, %edi cmpl $0x10, %esi cmovbl %esi, %edi cmovbl %edx, %ecx leal 0x2(%rcx), %eax movl %edi, %edx shrl $0x2, %edx cmpl $0x4, %edi cmovbl %edi, %edx cmovbl %ecx, %eax cmpl $0x2, %edx sbbl $-0x1, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF retq
_ZL14stbi__high_bitj: test edi, edi jz short loc_28D85 mov eax, edi shr eax, 10h xor ecx, ecx cmp edi, 10000h setnb cl cmovb eax, edi shl ecx, 4 lea edx, [rcx+8] mov esi, eax shr esi, 8 cmp eax, 100h cmovb esi, eax cmovb edx, ecx lea ecx, [rdx+4] mov edi, esi shr edi, 4 cmp esi, 10h cmovb edi, esi cmovb ecx, edx lea eax, [rcx+2] mov edx, edi shr edx, 2 cmp edi, 4 cmovb edx, edi cmovb eax, ecx cmp edx, 2 sbb eax, 0FFFFFFFFh retn loc_28D85: mov eax, 0FFFFFFFFh retn
long long stbi__high_bit(unsigned int a1) { unsigned int v1; // eax int v2; // edx unsigned int v3; // esi int v4; // ecx unsigned int v5; // edi int v6; // eax unsigned int v7; // edx if ( !a1 ) return 0xFFFFFFFFLL; v1 = HIWORD(a1); if ( a1 < 0x10000 ) v1 = a1; v2 = 16 * (a1 >= 0x10000) + 8; v3 = v1 >> 8; if ( v1 < 0x100 ) { v3 = v1; v2 = 16 * (a1 >= 0x10000); } v4 = v2 + 4; v5 = v3 >> 4; if ( v3 < 0x10 ) { v5 = v3; v4 = v2; } v6 = v4 + 2; v7 = v5 >> 2; if ( v5 < 4 ) { v7 = v5; v6 = v4; } return v6 - ((unsigned int)(v7 < 2) - 1); }
8,211
my_strxfrm_pad_desc_and_reverse_nopad
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse_nopad(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); memset(frmend, 0x00, fill_length); 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; memset(frmend, 0x00, fill_length); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r12d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %rbx movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r12b sete %dl orb %al, %dl orb %sil, %dl jne 0x58fc5 movl %r8d, %r13d movl %r15d, %eax imull 0x98(%rdi), %r13d subl %r14d, %eax cmpl %eax, %r13d cmovael %eax, %r13d movq %r14, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x261c0 movl 0x10(%rbp), %ecx addq %r13, %r14 movq %rbx, %rdi movq %r14, %rsi movl %r12d, %edx callq 0x5a806 testb %r12b, %r12b jns 0x58ff0 cmpq %r15, %r14 jae 0x58ff0 movq %r15, %rdx subq %r14, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x261c0 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_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, r9d mov r15, rcx mov r14, rdx mov rbx, rsi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r12b, 40h setz dl or dl, al or dl, sil jnz short loc_58FC5 mov r13d, r8d mov eax, r15d imul r13d, [rdi+98h] sub eax, r14d cmp r13d, eax cmovnb r13d, eax mov rdi, r14 xor esi, esi mov rdx, r13 call _memset mov ecx, [rbp+arg_0] add r14, r13 loc_58FC5: mov rdi, rbx mov rsi, r14 mov edx, r12d call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_58FF0 cmp r14, r15 jnb short loc_58FF0 mov rdx, r15 sub rdx, r14 mov rdi, r14 xor esi, esi call _memset mov r14, r15 loc_58FF0: 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_nopad( 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; // r13 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); memset(a3, 0LL, v11); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { memset(v9, 0LL, a4 - v9); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,R9D MOV R15,RCX MOV R14,RDX MOV RBX,RSI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R12B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x00158fc5 MOV R13D,R8D MOV EAX,R15D IMUL R13D,dword ptr [RDI + 0x98] SUB EAX,R14D CMP R13D,EAX CMOVNC R13D,EAX MOV RDI,R14 XOR ESI,ESI MOV RDX,R13 CALL 0x001261c0 MOV ECX,dword ptr [RBP + 0x10] ADD R14,R13 LAB_00158fc5: MOV RDI,RBX MOV RSI,R14 MOV EDX,R12D CALL 0x0015a806 TEST R12B,R12B JNS 0x00158ff0 CMP R14,R15 JNC 0x00158ff0 MOV RDX,R15 SUB RDX,R14 MOV RDI,R14 XOR ESI,ESI CALL 0x001261c0 MOV R14,R15 LAB_00158ff0: 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_nopad (long param_1,long param_2,void *param_3,void *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) { uVar2 = param_5 * *(int *)(param_1 + 0x98); uVar1 = (int)param_4 - (int)param_3; if (uVar1 <= uVar2) { uVar2 = uVar1; } memset(param_3,0,(ulong)uVar2); param_3 = (void *)((long)param_3 + (ulong)uVar2); } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { memset(param_3,0,(long)param_4 - (long)param_3); param_3 = param_4; } return (long)param_3 - param_2; }
8,212
string_from[abi:cxx11](llama_context const*, llama_batch const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const struct llama_context * ctx, const struct llama_batch & batch) { std::stringstream buf; buf << "[ "; bool first = true; for (int i = 0; i < batch.n_tokens; ++i) { if (!first) { buf << ", "; } else { first = false; } auto detokenized = common_token_to_piece(ctx, batch.token[i]); detokenized.erase( std::remove_if( detokenized.begin(), detokenized.end(), [](const unsigned char c) { return !std::isprint(c); }), detokenized.end()); buf << "\n" << std::to_string(i) << ", token '" << detokenized << "'" << ", pos " << std::to_string(batch.pos[i]) << ", n_seq_id " << std::to_string(batch.n_seq_id[i]) << ", seq_id " << std::to_string(batch.seq_id[i][0]) << ", logits " << std::to_string(batch.logits[i]); } buf << " ]"; return buf.str(); }
O2
cpp
string_from[abi:cxx11](llama_context const*, llama_batch const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x278, %rsp # imm = 0x278 movq %rdx, %r15 movq %rsi, 0x40(%rsp) movq %rdi, %rbp leaq 0xf0(%rsp), %rdi callq 0x268b0 leaq 0x100(%rsp), %rdi leaq 0x5fe5c(%rip), %rsi # 0xd00e1 callq 0x26c10 movb $0x1, %al xorl %r12d, %r12d leaq 0x10(%rsp), %r13 movq %rbp, 0x38(%rsp) movq %r15, 0x30(%rsp) movslq (%r15), %rcx cmpq %rcx, %r12 jge 0x70573 testb $0x1, %al jne 0x702c2 leaq 0x100(%rsp), %rdi leaq 0x607c3(%rip), %rsi # 0xd0a80 callq 0x26c10 movq 0x8(%r15), %rax movq %r12, 0x48(%rsp) movl (%rax,%r12,4), %edx movq %r13, %rdi movq 0x40(%rsp), %rsi pushq $0x1 popq %rcx callq 0x7021b movq 0x10(%rsp), %r12 movq 0x18(%rsp), %r14 leaq (%r12,%r14), %rbp movq %r14, %r13 sarq $0x2, %r13 movq %r14, %r15 movq %r12, 0x8(%rsp) testq %r13, %r13 jle 0x70351 movq %r12, %rdi callq 0x746f6 testb %al, %al jne 0x70399 leaq 0x1(%r12), %rbx movq %rbx, %rdi callq 0x746f6 testb %al, %al jne 0x7039c leaq 0x2(%r12), %rbx movq %rbx, %rdi callq 0x746f6 testb %al, %al jne 0x7039c leaq 0x3(%r12), %rbx movq %rbx, %rdi callq 0x746f6 testb %al, %al jne 0x7039c addq $0x4, %r12 decq %r13 addq $-0x4, %r15 jmp 0x702fc cmpq $0x1, %r15 leaq 0x10(%rsp), %r13 je 0x70386 cmpq $0x2, %r15 je 0x70377 cmpq $0x3, %r15 jne 0x703d4 movq %r12, %rdi callq 0x746f6 testb %al, %al jne 0x70394 incq %r12 movq %r12, %rdi callq 0x746f6 testb %al, %al jne 0x70394 incq %r12 movq %r12, %rdi callq 0x746f6 testb %al, %al cmoveq %rbp, %r12 movq %r12, %rbx jmp 0x703a1 movq %r12, %rbx leaq 0x10(%rsp), %r13 cmpq %rbp, %rbx je 0x703d4 movq %rbx, %r12 incq %rbx cmpq %rbp, %rbx je 0x703c8 movq %rbx, %rdi callq 0x746f6 testb %al, %al jne 0x703a9 movb (%rbx), %al movb %al, (%r12) incq %r12 jmp 0x703a9 movq 0x10(%rsp), %rax movq 0x18(%rsp), %r14 jmp 0x703dc movq %rbp, %r12 movq 0x8(%rsp), %rax addq %rax, %r14 movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x26220 leaq 0xb0(%rsp), %r14 leaq 0x100(%rsp), %rdi leaq 0x55104(%rip), %rsi # 0xc5508 callq 0x26c10 movq 0x38(%rsp), %rbp movq 0x30(%rsp), %r15 movq 0x48(%rsp), %r12 movq %rax, %rbx movq %r14, %rdi movl %r12d, %esi callq 0x425ed movq %rbx, %rdi movq %r14, %rsi callq 0x26ab0 movq %rax, %rdi leaq 0x5fcac(%rip), %rsi # 0xd00e7 callq 0x26c10 movq %rax, %rdi movq %r13, %rsi callq 0x26ab0 movq %rax, %rdi leaq 0x5f4a4(%rip), %rsi # 0xcf8f9 callq 0x26c10 movq %rax, %rdi leaq 0x5fc8d(%rip), %rsi # 0xd00f1 callq 0x26c10 movq %rax, %rbx movq 0x18(%r15), %rax movl (%rax,%r12,4), %esi leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0x425ed movq %rbx, %rdi movq %r14, %rsi callq 0x26ab0 movq %rax, %rdi leaq 0x5fc5f(%rip), %rsi # 0xd00f8 callq 0x26c10 movq %rax, %rbx movq 0x20(%r15), %rax movl (%rax,%r12,4), %esi leaq 0x70(%rsp), %r14 movq %r14, %rdi callq 0x425ed movq %rbx, %rdi movq %r14, %rsi callq 0x26ab0 movq %rax, %rdi leaq 0x5fc39(%rip), %rsi # 0xd0104 callq 0x26c10 movq %rax, %rbx movq 0x28(%r15), %rax movq (%rax,%r12,8), %rax movl (%rax), %esi leaq 0x50(%rsp), %r14 movq %r14, %rdi callq 0x425ed movq %rbx, %rdi movq %r14, %rsi callq 0x26ab0 movq %rax, %rdi leaq 0x5fc0f(%rip), %rsi # 0xd010e callq 0x26c10 movq %rax, %rbx movq 0x30(%r15), %rax movsbl (%rax,%r12), %esi leaq 0xd0(%rsp), %r14 movq %r14, %rdi callq 0x425ed movq %rbx, %rdi movq %r14, %rsi callq 0x26ab0 movq %r14, %rdi callq 0x27998 leaq 0x50(%rsp), %rdi callq 0x27998 leaq 0x70(%rsp), %rdi callq 0x27998 leaq 0x90(%rsp), %rdi callq 0x27998 leaq 0xb0(%rsp), %rdi callq 0x27998 movq %r13, %rdi callq 0x27998 incq %r12 xorl %eax, %eax jmp 0x7029e leaq 0x5fb6a(%rip), %rsi # 0xd00e4 leaq 0x100(%rsp), %rdi callq 0x26c10 leaq 0x108(%rsp), %rsi movq %rbp, %rdi callq 0x273d0 leaq 0xf0(%rsp), %rdi callq 0x26920 movq %rbp, %rax addq $0x278, %rsp # imm = 0x278 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x705d5 jmp 0x705d5 jmp 0x705d5 movq %rax, %rbx leaq 0xd0(%rsp), %rdi callq 0x27998 jmp 0x705ea jmp 0x705e7 jmp 0x70605 movq %rax, %rbx jmp 0x70631 jmp 0x705f6 jmp 0x705e2 jmp 0x70617 jmp 0x705e2 movq %rax, %rbx jmp 0x70627 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x27998 jmp 0x705f9 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x27998 jmp 0x70608 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x27998 jmp 0x7061a movq %rax, %rbx leaq 0xb0(%rsp), %rdi callq 0x27998 leaq 0x10(%rsp), %rdi callq 0x27998 leaq 0xf0(%rsp), %rdi callq 0x26920 movq %rbx, %rdi callq 0x27660
_Z11string_fromB5cxx11PK13llama_contextRK11llama_batch: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 278h mov r15, rdx mov [rsp+2A8h+var_268], rsi mov rbp, rdi lea rdi, [rsp+2A8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+2A8h+var_1A8] lea rsi, asc_D00E1; "[ " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov al, 1 xor r12d, r12d lea r13, [rsp+2A8h+var_298] mov [rsp+2A8h+var_270], rbp mov [rsp+2A8h+var_278], r15 loc_7029E: movsxd rcx, dword ptr [r15] cmp r12, rcx jge loc_70573 test al, 1 jnz short loc_702C2 lea rdi, [rsp+2A8h+var_1A8] lea rsi, aZuD+6; ", " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_702C2: mov rax, [r15+8] mov qword ptr [rsp+2A8h+var_260], r12 mov edx, [rax+r12*4] mov rdi, r13; void * mov rsi, [rsp+2A8h+var_268] push 1 pop rcx call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool) mov r12, [rsp+2A8h+var_298] mov r14, [rsp+2A8h+var_290] lea rbp, [r12+r14] mov r13, r14 sar r13, 2 mov r15, r14 mov [rsp+2A8h+var_2A0], r12 loc_702FC: test r13, r13 jle short loc_70351 mov rdi, r12 call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz loc_70399 lea rbx, [r12+1] mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz short loc_7039C lea rbx, [r12+2] mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz short loc_7039C lea rbx, [r12+3] mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz short loc_7039C add r12, 4 dec r13 add r15, 0FFFFFFFFFFFFFFFCh jmp short loc_702FC loc_70351: cmp r15, 1 lea r13, [rsp+2A8h+var_298] jz short loc_70386 cmp r15, 2 jz short loc_70377 cmp r15, 3 jnz short loc_703D4 mov rdi, r12 call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz short loc_70394 inc r12 loc_70377: mov rdi, r12 call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz short loc_70394 inc r12 loc_70386: mov rdi, r12 call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al cmovz r12, rbp loc_70394: mov rbx, r12 jmp short loc_703A1 loc_70399: mov rbx, r12 loc_7039C: lea r13, [rsp+2A8h+var_298] loc_703A1: cmp rbx, rbp jz short loc_703D4 mov r12, rbx loc_703A9: inc rbx cmp rbx, rbp jz short loc_703C8 mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZ11string_fromB5cxx11PK13llama_contextRK11llama_batchE3$_0EclINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<string_from(llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>) test al, al jnz short loc_703A9 mov al, [rbx] mov [r12], al inc r12 jmp short loc_703A9 loc_703C8: mov rax, [rsp+2A8h+var_298] mov r14, [rsp+2A8h+var_290] jmp short loc_703DC loc_703D4: mov r12, rbp mov rax, [rsp+2A8h+var_2A0] loc_703DC: add r14, rax mov rdi, r13 mov rsi, r12 mov rdx, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>) lea r14, [rsp+2A8h+var_1F8] lea rdi, [rsp+2A8h+var_1A8] lea rsi, aBeginOfTextSta+3Ah; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbp, [rsp+2A8h+var_270] mov r15, [rsp+2A8h+var_278] mov r12, qword ptr [rsp+2A8h+var_260] mov rbx, rax mov rdi, r14; this mov esi, r12d; int call _ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, rbx mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax lea rsi, aToken; ", token '" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, r13 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax lea rsi, asc_CF8F7+2; "'" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aPos_0; ", pos " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rax, [r15+18h] mov esi, [rax+r12*4]; int lea r14, [rsp+2A8h+var_218] mov rdi, r14; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, rbx mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax lea rsi, aNSeqId; ", n_seq_id " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rax, [r15+20h] mov esi, [rax+r12*4]; int lea r14, [rsp+2A8h+var_238] mov rdi, r14; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, rbx mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax lea rsi, aSeqId; ", seq_id " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rax, [r15+28h] mov rax, [rax+r12*8] mov esi, [rax]; int lea r14, [rsp+2A8h+var_258] mov rdi, r14; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, rbx mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax lea rsi, aLogits; ", logits " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rax, [r15+30h] movsx esi, byte ptr [rax+r12]; int lea r14, [rsp+2A8h+var_1D8] mov rdi, r14; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, rbx mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2A8h+var_258]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2A8h+var_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2A8h+var_218]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2A8h+var_1F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc r12 xor eax, eax jmp loc_7029E loc_70573: lea rsi, asc_D00E4; " ]" lea rdi, [rsp+2A8h+var_1A8] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+2A8h+var_1A0] mov rdi, rbp call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+2A8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, rbp add rsp, 278h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_705D5 jmp short loc_705D5 jmp short loc_705D5 mov rbx, rax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_705EA jmp short loc_705E7 jmp short loc_70605 loc_705D5: mov rbx, rax jmp short loc_70631 jmp short loc_705F6 jmp short loc_705E2 jmp short loc_70617 jmp short $+2 loc_705E2: mov rbx, rax jmp short loc_70627 loc_705E7: mov rbx, rax loc_705EA: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_705F9 loc_705F6: mov rbx, rax loc_705F9: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70608 loc_70605: mov rbx, rax loc_70608: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7061A loc_70617: mov rbx, rax loc_7061A: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_70627: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_70631: lea rdi, [rsp+arg_E8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, long long a2, _QWORD *a3) { long long v4; // rbp char v5; // al long long v6; // r12 _BYTE *v7; // r12 long long v8; // r14 _BYTE *v9; // rbp long long v10; // r13 long long v11; // r15 _BYTE *v12; // rbx _BYTE *v13; // r12 _BYTE *v14; // rax long long v15; // rax long long v16; // r12 long long v17; // rbx long long v18; // rax long long v19; // rax long long v20; // rax long long v21; // rax long long v22; // rbx long long v23; // rax long long v24; // rbx long long v25; // rax long long v26; // rbx long long v27; // rax long long v28; // rbx _BYTE *v30; // [rsp+8h] [rbp-2A0h] _BYTE *v31; // [rsp+10h] [rbp-298h] BYREF long long v32; // [rsp+18h] [rbp-290h] _QWORD *v33; // [rsp+30h] [rbp-278h] long long v34; // [rsp+38h] [rbp-270h] long long v35; // [rsp+40h] [rbp-268h] int v36[2]; // [rsp+48h] [rbp-260h] _BYTE v37[32]; // [rsp+50h] [rbp-258h] BYREF _BYTE v38[32]; // [rsp+70h] [rbp-238h] BYREF _BYTE v39[32]; // [rsp+90h] [rbp-218h] BYREF _BYTE v40[32]; // [rsp+B0h] [rbp-1F8h] BYREF _BYTE v41[32]; // [rsp+D0h] [rbp-1D8h] BYREF _BYTE v42[16]; // [rsp+F0h] [rbp-1B8h] BYREF char v43[8]; // [rsp+100h] [rbp-1A8h] BYREF char v44[416]; // [rsp+108h] [rbp-1A0h] BYREF v35 = a2; v4 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v42); std::operator<<<std::char_traits<char>>(v43, "[ "); v5 = 1; v6 = 0LL; v34 = a1; v33 = a3; while ( v6 < *(int *)a3 ) { if ( (v5 & 1) == 0 ) std::operator<<<std::char_traits<char>>(v43, ", "); *(_QWORD *)v36 = v6; common_token_to_piece[abi:cxx11](&v31, v35); v7 = v31; v8 = v32; v9 = &v31[v32]; v10 = v32 >> 2; v11 = v32; v30 = v31; while ( 1 ) { if ( v10 <= 0 ) { switch ( v11 ) { case 1LL: LABEL_19: if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7) ) v7 = v9; break; case 2LL: goto LABEL_17; case 3LL: if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7) ) { ++v7; LABEL_17: if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7) ) { ++v7; goto LABEL_19; } } break; default: LABEL_29: v13 = v9; v14 = v30; goto LABEL_30; } v12 = v7; goto LABEL_23; } if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7) ) break; v12 = v7 + 1; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7 + 1) ) goto LABEL_23; v12 = v7 + 2; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7 + 2) ) goto LABEL_23; v12 = v7 + 3; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v7 + 3) ) goto LABEL_23; v7 += 4; --v10; v11 -= 4LL; } v12 = v7; LABEL_23: if ( v12 == v9 ) goto LABEL_29; v13 = v12; while ( ++v12 != v9 ) { if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<string_from[abi:cxx11](llama_context const*,llama_batch const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<char *,std::string>>(v12) ) *v13++ = *v12; } v14 = v31; v8 = v32; LABEL_30: std::string::erase(&v31, v13, &v14[v8]); v15 = std::operator<<<std::char_traits<char>>(v43, "\n"); v4 = v34; a3 = v33; v16 = *(_QWORD *)v36; v17 = v15; std::to_string((std::__cxx11 *)v40, v36[0]); v18 = std::operator<<<char>(v17, v40); v19 = std::operator<<<std::char_traits<char>>(v18, ", token '"); v20 = std::operator<<<char>(v19, &v31); v21 = std::operator<<<std::char_traits<char>>(v20, "'"); v22 = std::operator<<<std::char_traits<char>>(v21, ", pos "); std::to_string((std::__cxx11 *)v39, *(_DWORD *)(a3[3] + 4 * v16)); v23 = std::operator<<<char>(v22, v39); v24 = std::operator<<<std::char_traits<char>>(v23, ", n_seq_id "); std::to_string((std::__cxx11 *)v38, *(_DWORD *)(a3[4] + 4 * v16)); v25 = std::operator<<<char>(v24, v38); v26 = std::operator<<<std::char_traits<char>>(v25, ", seq_id "); std::to_string((std::__cxx11 *)v37, **(_DWORD **)(a3[5] + 8 * v16)); v27 = std::operator<<<char>(v26, v37); v28 = std::operator<<<std::char_traits<char>>(v27, ", logits "); std::to_string((std::__cxx11 *)v41, *(char *)(a3[6] + v16)); std::operator<<<char>(v28, v41); std::string::~string(v41); std::string::~string(v37); std::string::~string(v38); std::string::~string(v39); std::string::~string(v40); std::string::~string(&v31); v6 = v16 + 1; v5 = 0; } std::operator<<<std::char_traits<char>>(v43, " ]"); std::stringbuf::str(v4, v44); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v42); return v4; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x278 MOV R15,RDX MOV qword ptr [RSP + 0x40],RSI MOV RBP,RDI LEA RDI,[RSP + 0xf0] CALL 0x001268b0 LEA RDI,[RSP + 0x100] LAB_0017027e: LEA RSI,[0x1d00e1] CALL 0x00126c10 MOV AL,0x1 XOR R12D,R12D LEA R13,[RSP + 0x10] MOV qword ptr [RSP + 0x38],RBP MOV qword ptr [RSP + 0x30],R15 LAB_0017029e: MOVSXD RCX,dword ptr [R15] CMP R12,RCX JGE 0x00170573 TEST AL,0x1 JNZ 0x001702c2 LAB_001702ae: LEA RDI,[RSP + 0x100] LEA RSI,[0x1d0a80] CALL 0x00126c10 LAB_001702c2: MOV RAX,qword ptr [R15 + 0x8] MOV qword ptr [RSP + 0x48],R12 MOV EDX,dword ptr [RAX + R12*0x4] LAB_001702cf: MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x40] PUSH 0x1 POP RCX CALL 0x0017021b MOV R12,qword ptr [RSP + 0x10] MOV R14,qword ptr [RSP + 0x18] LEA RBP,[R12 + R14*0x1] MOV R13,R14 SAR R13,0x2 MOV R15,R14 MOV qword ptr [RSP + 0x8],R12 LAB_001702fc: TEST R13,R13 JLE 0x00170351 MOV RDI,R12 CALL 0x001746f6 TEST AL,AL JNZ 0x00170399 LEA RBX,[R12 + 0x1] MOV RDI,RBX CALL 0x001746f6 TEST AL,AL JNZ 0x0017039c LEA RBX,[R12 + 0x2] MOV RDI,RBX CALL 0x001746f6 TEST AL,AL JNZ 0x0017039c LEA RBX,[R12 + 0x3] MOV RDI,RBX CALL 0x001746f6 TEST AL,AL JNZ 0x0017039c ADD R12,0x4 DEC R13 ADD R15,-0x4 JMP 0x001702fc LAB_00170351: CMP R15,0x1 LEA R13,[RSP + 0x10] JZ 0x00170386 CMP R15,0x2 JZ 0x00170377 CMP R15,0x3 JNZ 0x001703d4 MOV RDI,R12 CALL 0x001746f6 TEST AL,AL JNZ 0x00170394 INC R12 LAB_00170377: MOV RDI,R12 CALL 0x001746f6 TEST AL,AL JNZ 0x00170394 INC R12 LAB_00170386: MOV RDI,R12 CALL 0x001746f6 TEST AL,AL CMOVZ R12,RBP LAB_00170394: MOV RBX,R12 JMP 0x001703a1 LAB_00170399: MOV RBX,R12 LAB_0017039c: LEA R13,[RSP + 0x10] LAB_001703a1: CMP RBX,RBP JZ 0x001703d4 MOV R12,RBX LAB_001703a9: INC RBX CMP RBX,RBP JZ 0x001703c8 MOV RDI,RBX CALL 0x001746f6 TEST AL,AL JNZ 0x001703a9 MOV AL,byte ptr [RBX] MOV byte ptr [R12],AL INC R12 JMP 0x001703a9 LAB_001703c8: MOV RAX,qword ptr [RSP + 0x10] MOV R14,qword ptr [RSP + 0x18] JMP 0x001703dc LAB_001703d4: MOV R12,RBP MOV RAX,qword ptr [RSP + 0x8] LAB_001703dc: ADD R14,RAX LAB_001703df: MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL 0x00126220 LEA R14,[RSP + 0xb0] LAB_001703f5: LEA RDI,[RSP + 0x100] LEA RSI,[0x1c5508] CALL 0x00126c10 MOV RBP,qword ptr [RSP + 0x38] MOV R15,qword ptr [RSP + 0x30] MOV R12,qword ptr [RSP + 0x48] LAB_00170418: MOV RBX,RAX MOV RDI,R14 MOV ESI,R12D CALL 0x001425ed LAB_00170426: MOV RDI,RBX MOV RSI,R14 CALL 0x00126ab0 MOV RDI,RAX LEA RSI,[0x1d00e7] CALL 0x00126c10 MOV RDI,RAX MOV RSI,R13 CALL 0x00126ab0 MOV RDI,RAX LEA RSI,[0x1cf8f9] CALL 0x00126c10 MOV RDI,RAX LEA RSI,[0x1d00f1] CALL 0x00126c10 MOV RBX,RAX MOV RAX,qword ptr [R15 + 0x18] MOV ESI,dword ptr [RAX + R12*0x4] LAB_00170474: LEA R14,[RSP + 0x90] MOV RDI,R14 CALL 0x001425ed LAB_00170484: MOV RDI,RBX MOV RSI,R14 CALL 0x00126ab0 MOV RDI,RAX LEA RSI,[0x1d00f8] CALL 0x00126c10 MOV RBX,RAX MOV RAX,qword ptr [R15 + 0x20] MOV ESI,dword ptr [RAX + R12*0x4] LAB_001704a9: LEA R14,[RSP + 0x70] MOV RDI,R14 CALL 0x001425ed LAB_001704b6: MOV RDI,RBX MOV RSI,R14 CALL 0x00126ab0 MOV RDI,RAX LEA RSI,[0x1d0104] CALL 0x00126c10 MOV RBX,RAX MOV RAX,qword ptr [R15 + 0x28] MOV RAX,qword ptr [RAX + R12*0x8] MOV ESI,dword ptr [RAX] LAB_001704dd: LEA R14,[RSP + 0x50] MOV RDI,R14 CALL 0x001425ed LAB_001704ea: MOV RDI,RBX MOV RSI,R14 CALL 0x00126ab0 MOV RDI,RAX LEA RSI,[0x1d010e] CALL 0x00126c10 MOV RBX,RAX MOV RAX,qword ptr [R15 + 0x30] MOVSX ESI,byte ptr [RAX + R12*0x1] LAB_00170510: LEA R14,[RSP + 0xd0] MOV RDI,R14 CALL 0x001425ed LAB_00170520: MOV RDI,RBX MOV RSI,R14 CALL 0x00126ab0 MOV RDI,R14 CALL 0x00127998 LEA RDI,[RSP + 0x50] CALL 0x00127998 LEA RDI,[RSP + 0x70] CALL 0x00127998 LEA RDI,[RSP + 0x90] CALL 0x00127998 LEA RDI,[RSP + 0xb0] CALL 0x00127998 MOV RDI,R13 CALL 0x00127998 INC R12 XOR EAX,EAX JMP 0x0017029e LAB_00170573: LEA RSI,[0x1d00e4] LEA RDI,[RSP + 0x100] CALL 0x00126c10 LEA RSI,[RSP + 0x108] MOV RDI,RBP CALL 0x001273d0 LAB_00170597: LEA RDI,[RSP + 0xf0] CALL 0x00126920 MOV RAX,RBP ADD RSP,0x278 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](llama_context const*, llama_batch const&) */ llama_context * string_from_abi_cxx11_(llama_context *param_1,llama_batch *param_2) { _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0> *p_Var1; bool bVar2; _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0> *p_Var3; ostream *poVar4; int *in_RDX; _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0> *p_Var5; _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0> *p_Var6; _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0> *p_Var7; long lVar8; long lVar9; long lVar10; _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::__0> *local_298; long local_290; int *local_278; llama_context *local_270; llama_batch *local_268; long local_260; __cxx11 local_258 [32]; __cxx11 local_238 [32]; __cxx11 local_218 [32]; __cxx11 local_1f8 [32]; __cxx11 local_1d8 [32]; stringstream local_1b8 [16]; ostream local_1a8 [376]; local_268 = param_2; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 0017027e to 00170289 has its CatchHandler @ 001705b9 */ std::operator<<(local_1a8,"[ "); bVar2 = true; lVar8 = 0; local_278 = in_RDX; local_270 = param_1; do { if (*in_RDX <= lVar8) { /* try { // try from 00170573 to 00170596 has its CatchHandler @ 001705bb */ std::operator<<(local_1a8," ]"); std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); return param_1; } if (!bVar2) { /* try { // try from 001702ae to 001702c1 has its CatchHandler @ 001705bd */ std::operator<<(local_1a8,", "); } local_260 = lVar8; /* try { // try from 001702cf to 001702de has its CatchHandler @ 001705d5 */ common_token_to_piece_abi_cxx11_ ((llama_context *)&local_298,(int)local_268, SUB41(*(int4 *)(*(long *)(in_RDX + 2) + lVar8 * 4),0)); lVar8 = local_290; p_Var3 = local_298; p_Var1 = local_298 + local_290; p_Var6 = local_298; lVar10 = local_290; for (lVar9 = local_290 >> 2; p_Var5 = p_Var6, p_Var7 = p_Var1, 0 < lVar9; lVar9 = lVar9 + -1) { bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6); if (bVar2) goto LAB_001703a1; bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6 + 1); p_Var5 = p_Var6 + 1; if (bVar2) goto LAB_001703a1; bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6 + 2); p_Var5 = p_Var6 + 2; if (bVar2) goto LAB_001703a1; bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6 + 3); p_Var5 = p_Var6 + 3; if (bVar2) goto LAB_001703a1; p_Var6 = p_Var6 + 4; lVar10 = lVar10 + -4; } if (lVar10 == 1) { LAB_00170386: bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6); p_Var5 = p_Var6; if (!bVar2) { p_Var5 = p_Var1; } LAB_001703a1: p_Var6 = p_Var5; if (p_Var5 != p_Var1) { while (p_Var5 = p_Var5 + 1, p_Var3 = local_298, p_Var7 = p_Var6, lVar8 = local_290, p_Var5 != p_Var1) { bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var5); if (!bVar2) { *p_Var6 = *p_Var5; p_Var6 = p_Var6 + 1; } } } } else { if (lVar10 == 2) { LAB_00170377: bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6); p_Var5 = p_Var6; if (!bVar2) { p_Var6 = p_Var6 + 1; goto LAB_00170386; } goto LAB_001703a1; } if (lVar10 == 3) { bVar2 = __gnu_cxx::__ops:: _Iter_pred<string_from[abi:cxx11](llama_context_const*,llama_batch_const&)::$_0>:: operator()(p_Var6); if (!bVar2) { p_Var6 = p_Var6 + 1; goto LAB_00170377; } goto LAB_001703a1; } } /* try { // try from 001703df to 001703ec has its CatchHandler @ 001705e2 */ std::__cxx11::string::erase((string *)&local_298,p_Var7,p_Var3 + lVar8); /* try { // try from 001703f5 to 00170408 has its CatchHandler @ 001705e0 */ poVar4 = std::operator<<(local_1a8,"\n"); lVar8 = local_260; param_1 = local_270; in_RDX = local_278; /* try { // try from 00170418 to 00170425 has its CatchHandler @ 001705dc */ std::__cxx11::to_string(local_1f8,(int)local_260); /* try { // try from 00170426 to 00170468 has its CatchHandler @ 00170617 */ poVar4 = std::operator<<(poVar4,(string *)local_1f8); poVar4 = std::operator<<(poVar4,", token \'"); poVar4 = std::operator<<(poVar4,(string *)&local_298); poVar4 = std::operator<<(poVar4,"\'"); poVar4 = std::operator<<(poVar4,", pos "); /* try { // try from 00170474 to 00170483 has its CatchHandler @ 001705de */ std::__cxx11::to_string(local_218,*(int *)(*(long *)(in_RDX + 6) + lVar8 * 4)); /* try { // try from 00170484 to 0017049d has its CatchHandler @ 00170605 */ poVar4 = std::operator<<(poVar4,(string *)local_218); poVar4 = std::operator<<(poVar4,", n_seq_id "); /* try { // try from 001704a9 to 001704b5 has its CatchHandler @ 001705d3 */ std::__cxx11::to_string(local_238,*(int *)(*(long *)(in_RDX + 8) + lVar8 * 4)); /* try { // try from 001704b6 to 001704cf has its CatchHandler @ 001705f6 */ poVar4 = std::operator<<(poVar4,(string *)local_238); poVar4 = std::operator<<(poVar4,", seq_id "); /* try { // try from 001704dd to 001704e9 has its CatchHandler @ 001705da */ std::__cxx11::to_string(local_258,**(int **)(*(long *)(in_RDX + 10) + lVar8 * 8)); /* try { // try from 001704ea to 00170503 has its CatchHandler @ 001705e7 */ poVar4 = std::operator<<(poVar4,(string *)local_258); poVar4 = std::operator<<(poVar4,", logits "); /* try { // try from 00170510 to 0017051f has its CatchHandler @ 001705d1 */ std::__cxx11::to_string(local_1d8,(int)*(char *)(*(long *)(in_RDX + 0xc) + lVar8)); /* try { // try from 00170520 to 0017052a has its CatchHandler @ 001705bf */ std::operator<<(poVar4,(string *)local_1d8); std::__cxx11::string::~string((string *)local_1d8); std::__cxx11::string::~string((string *)local_258); std::__cxx11::string::~string((string *)local_238); std::__cxx11::string::~string((string *)local_218); std::__cxx11::string::~string((string *)local_1f8); std::__cxx11::string::~string((string *)&local_298); lVar8 = lVar8 + 1; bVar2 = false; } while( true ); }
8,213
psi_rwlock_trywrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line); int result= rw_trywrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_trywrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1abc7e(%rip), %rax # 0x1dd8b8 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x3, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x349a0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x31c93 leaq 0x1abc38(%rip), %rax # 0x1dd8b8 movq (%rax), %rax movq 0x1b8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_rwlock_trywrlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 3 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_trywrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_31C93 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_31C93: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))( v6, *(_QWORD *)(a1 + 144), 3LL, a2, a3); v4 = my_rw_trywrlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4); return v4; }
psi_rwlock_trywrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2dd8b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x3 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001349a0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00131c93 LEA RAX,[0x2dd8b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_00131c93: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3); uVar1 = my_rw_trywrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
8,214
testing::TestEventListeners::TestEventListeners()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
TestEventListeners::TestEventListeners() : repeater_(new internal::TestEventRepeater()), default_result_printer_(nullptr), default_xml_generator_(nullptr) {}
O0
cpp
testing::TestEventListeners::TestEventListeners(): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x10(%rsp) movl $0x28, %edi callq 0x16700 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x18(%rsp) callq 0xf2090 jmp 0xe1464 movq 0x10(%rsp), %rax movq 0x8(%rsp), %rcx movq 0x18(%rsp), %rdx movq %rdx, (%rcx) movq $0x0, 0x8(%rax) movq $0x0, 0x10(%rax) addq $0x38, %rsp retq movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) movl $0x28, %esi callq 0x16720 movq 0x28(%rsp), %rdi callq 0x16cf0 nopw %cs:(%rax,%rax)
_ZN7testing18TestEventListenersC2Ev: sub rsp, 38h; Alternative name is 'testing::TestEventListeners::TestEventListeners(void)' mov [rsp+38h+var_8], rdi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_30], rax mov [rsp+38h+var_28], rax mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rsp+38h+var_20], rax call _ZN7testing8internal17TestEventRepeaterC2Ev; testing::internal::TestEventRepeater::TestEventRepeater(void) jmp short $+2 loc_E1464: mov rax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_30] mov rdx, [rsp+38h+var_20] mov [rcx], rdx mov qword ptr [rax+8], 0 mov qword ptr [rax+10h], 0 add rsp, 38h retn mov rdi, [rsp+arg_10]; void * mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax mov esi, 28h ; '('; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) mov rdi, [rsp+arg_20] call __Unwind_Resume
testing::TestEventListeners * testing::TestEventListeners::TestEventListeners( testing::TestEventListeners *this) { testing::TestEventListeners *result; // rax testing::internal::TestEventRepeater *v2; // [rsp+18h] [rbp-20h] v2 = (testing::internal::TestEventRepeater *)operator new(0x28uLL); testing::internal::TestEventRepeater::TestEventRepeater(v2); result = this; *(_QWORD *)this = v2; *((_QWORD *)this + 1) = 0LL; *((_QWORD *)this + 2) = 0LL; return result; }
TestEventListeners: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RAX MOV EDI,0x28 CALL 0x00116700 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX LAB_001e145d: CALL 0x001f2090 LAB_001e1462: JMP 0x001e1464 LAB_001e1464: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x18] MOV qword ptr [RCX],RDX MOV qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX + 0x10],0x0 ADD RSP,0x38 RET
/* testing::TestEventListeners::TestEventListeners() */ void __thiscall testing::TestEventListeners::TestEventListeners(TestEventListeners *this) { TestEventRepeater *this_00; this_00 = (TestEventRepeater *)operator_new(0x28); /* try { // try from 001e145d to 001e1461 has its CatchHandler @ 001e148b */ internal::TestEventRepeater::TestEventRepeater(this_00); *(TestEventRepeater **)this = this_00; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; return; }
8,215
main
davidesantangelo[P]vsort/tests/test_performance.c
int main() { printf("vsort Performance Test\n"); printf("=====================\n\n"); srand(time(NULL)); // FIXED: Limit array sizes to avoid memory issues and bus errors // Original: int sizes[] = {100, 1000, 10000, 100000, 1000000}; int sizes[] = {100, 1000, 10000, 50000, 100000}; int num_sizes = sizeof(sizes) / sizeof(sizes[0]); // Number of test runs per configuration for averaging int runs = 3; printf("%-10s | %-15s | %-15s | %-15s | %-15s\n", "Size", "Random (ms)", "Sorted (ms)", "Reverse (ms)", "Nearly (ms)"); printf("------------------------------------------------------------------------\n"); for (int s = 0; s < num_sizes; s++) { int n = sizes[s]; int *arr = (int *)malloc(n * sizeof(int)); if (!arr) { printf("Memory allocation failed for size %d\n", n); continue; } double random_time = 0.0; double sorted_time = 0.0; double reverse_time = 0.0; double nearly_time = 0.0; for (int r = 0; r < runs; r++) { // Test with random data fill_random(arr, n); random_time += measure_time(vsort, arr, n); if (!is_sorted(arr, n)) { printf("ERROR: Failed to sort random array correctly\n"); } // Test with sorted data fill_sorted(arr, n); sorted_time += measure_time(vsort, arr, n); // Test with reverse-sorted data fill_reverse_sorted(arr, n); reverse_time += measure_time(vsort, arr, n); // Test with nearly-sorted data (5% disorder) fill_nearly_sorted(arr, n, 0.05); nearly_time += measure_time(vsort, arr, n); } // Calculate averages random_time /= runs; sorted_time /= runs; reverse_time /= runs; nearly_time /= runs; printf("%-10d | %-15.2f | %-15.2f | %-15.2f | %-15.2f\n", n, random_time, sorted_time, reverse_time, nearly_time); free(arr); } return 0; }
O0
c
main: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl $0x0, -0x4(%rbp) leaq 0x3d7a(%rip), %rdi # 0x5020 movb $0x0, %al callq 0x10c0 leaq 0x3d84(%rip), %rdi # 0x5038 movb $0x0, %al callq 0x10c0 xorl %eax, %eax movl %eax, %edi callq 0x1120 movl %eax, %edi callq 0x10f0 movq 0x3eae(%rip), %rax # 0x5180 movq %rax, -0x20(%rbp) movq 0x3eab(%rip), %rax # 0x5188 movq %rax, -0x18(%rbp) movl 0x3ea9(%rip), %eax # 0x5190 movl %eax, -0x10(%rbp) movl $0x5, -0x24(%rbp) movl $0x3, -0x28(%rbp) leaq 0x3d51(%rip), %rdi # 0x5050 leaq 0x3d71(%rip), %rsi # 0x5077 leaq 0x3d6f(%rip), %rdx # 0x507c leaq 0x3d74(%rip), %rcx # 0x5088 leaq 0x3d79(%rip), %r8 # 0x5094 leaq 0x3d7f(%rip), %r9 # 0x50a1 movb $0x0, %al callq 0x10c0 leaq 0x3d7d(%rip), %rdi # 0x50ad movb $0x0, %al callq 0x10c0 movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x24(%rbp), %eax jge 0x1517 movslq -0x2c(%rbp), %rax movl -0x20(%rbp,%rax,4), %eax movl %eax, -0x30(%rbp) movslq -0x30(%rbp), %rdi shlq $0x2, %rdi callq 0x1130 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x1383 movl -0x30(%rbp), %esi leaq 0x3d80(%rip), %rdi # 0x50f7 movb $0x0, %al callq 0x10c0 jmp 0x1509 xorps %xmm0, %xmm0 movsd %xmm0, -0x40(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x48(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x50(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x58(%rbp) movl $0x0, -0x5c(%rbp) movl -0x5c(%rbp), %eax cmpl -0x28(%rbp), %eax jge 0x148f movq -0x38(%rbp), %rdi movl -0x30(%rbp), %esi callq 0x1520 movq -0x38(%rbp), %rsi movl -0x30(%rbp), %edx leaq 0x4a0(%rip), %rdi # 0x1870 callq 0x1570 addsd -0x40(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) movq -0x38(%rbp), %rdi movl -0x30(%rbp), %esi callq 0x15d0 cmpl $0x0, %eax jne 0x13fe leaq 0x3d26(%rip), %rdi # 0x511d movb $0x0, %al callq 0x10c0 movq -0x38(%rbp), %rdi movl -0x30(%rbp), %esi callq 0x1630 movq -0x38(%rbp), %rsi movl -0x30(%rbp), %edx leaq 0x458(%rip), %rdi # 0x1870 callq 0x1570 addsd -0x48(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movq -0x38(%rbp), %rdi movl -0x30(%rbp), %esi callq 0x1670 movq -0x38(%rbp), %rsi movl -0x30(%rbp), %edx leaq 0x42f(%rip), %rdi # 0x1870 callq 0x1570 addsd -0x50(%rbp), %xmm0 movsd %xmm0, -0x50(%rbp) movq -0x38(%rbp), %rdi movl -0x30(%rbp), %esi movsd 0x3ba9(%rip), %xmm0 # 0x5008 callq 0x16b0 movq -0x38(%rbp), %rsi movl -0x30(%rbp), %edx leaq 0x3fe(%rip), %rdi # 0x1870 callq 0x1570 addsd -0x58(%rbp), %xmm0 movsd %xmm0, -0x58(%rbp) movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) jmp 0x13aa cvtsi2sdl -0x28(%rbp), %xmm1 movsd -0x40(%rbp), %xmm0 divsd %xmm1, %xmm0 movsd %xmm0, -0x40(%rbp) cvtsi2sdl -0x28(%rbp), %xmm1 movsd -0x48(%rbp), %xmm0 divsd %xmm1, %xmm0 movsd %xmm0, -0x48(%rbp) cvtsi2sdl -0x28(%rbp), %xmm1 movsd -0x50(%rbp), %xmm0 divsd %xmm1, %xmm0 movsd %xmm0, -0x50(%rbp) cvtsi2sdl -0x28(%rbp), %xmm1 movsd -0x58(%rbp), %xmm0 divsd %xmm1, %xmm0 movsd %xmm0, -0x58(%rbp) movl -0x30(%rbp), %esi movsd -0x40(%rbp), %xmm0 movsd -0x48(%rbp), %xmm1 movsd -0x50(%rbp), %xmm2 movsd -0x58(%rbp), %xmm3 leaq 0x3c52(%rip), %rdi # 0x514b movb $0x4, %al callq 0x10c0 movq -0x38(%rbp), %rdi callq 0x1030 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x133e xorl %eax, %eax addq $0x60, %rsp popq %rbp retq nop
main: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_4], 0 lea rdi, aVsortPerforman; "vsort Performance Test\n" mov al, 0 call _printf lea rdi, asc_5038; "=====================\n\n" mov al, 0 call _printf xor eax, eax mov edi, eax call _time mov edi, eax call _srand mov rax, cs:qword_5180 mov [rbp+var_20], rax mov rax, cs:qword_5188 mov [rbp+var_18], rax mov eax, cs:dword_5190 mov [rbp+var_10], eax mov [rbp+var_24], 5 mov [rbp+var_28], 3 lea rdi, a10s15s15s15s15; "%-10s | %-15s | %-15s | %-15s | %-15s\n" lea rsi, aSize; "Size" lea rdx, aRandomMs; "Random (ms)" lea rcx, aSortedMs; "Sorted (ms)" lea r8, aReverseMs; "Reverse (ms)" lea r9, aNearlyMs; "Nearly (ms)" mov al, 0 call _printf lea rdi, asc_50AD; "---------------------------------------"... mov al, 0 call _printf mov [rbp+var_2C], 0 loc_133E: mov eax, [rbp+var_2C] cmp eax, [rbp+var_24] jge loc_1517 movsxd rax, [rbp+var_2C] mov eax, dword ptr [rbp+rax*4+var_20] mov [rbp+var_30], eax movsxd rdi, [rbp+var_30] shl rdi, 2 call _malloc mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_1383 mov esi, [rbp+var_30] lea rdi, aMemoryAllocati; "Memory allocation failed for size %d\n" mov al, 0 call _printf jmp loc_1509 loc_1383: xorps xmm0, xmm0 movsd [rbp+var_40], xmm0 xorps xmm0, xmm0 movsd [rbp+var_48], xmm0 xorps xmm0, xmm0 movsd [rbp+var_50], xmm0 xorps xmm0, xmm0 movsd [rbp+var_58], xmm0 mov [rbp+var_5C], 0 loc_13AA: mov eax, [rbp+var_5C] cmp eax, [rbp+var_28] jge loc_148F mov rdi, [rbp+var_38] mov esi, [rbp+var_30] call fill_random mov rsi, [rbp+var_38] mov edx, [rbp+var_30] lea rdi, vsort call measure_time addsd xmm0, [rbp+var_40] movsd [rbp+var_40], xmm0 mov rdi, [rbp+var_38] mov esi, [rbp+var_30] call is_sorted cmp eax, 0 jnz short loc_13FE lea rdi, aErrorFailedToS; "ERROR: Failed to sort random array corr"... mov al, 0 call _printf loc_13FE: mov rdi, [rbp+var_38] mov esi, [rbp+var_30] call fill_sorted mov rsi, [rbp+var_38] mov edx, [rbp+var_30] lea rdi, vsort call measure_time addsd xmm0, [rbp+var_48] movsd [rbp+var_48], xmm0 mov rdi, [rbp+var_38] mov esi, [rbp+var_30] call fill_reverse_sorted mov rsi, [rbp+var_38] mov edx, [rbp+var_30] lea rdi, vsort call measure_time addsd xmm0, [rbp+var_50] movsd [rbp+var_50], xmm0 mov rdi, [rbp+var_38] mov esi, [rbp+var_30] movsd xmm0, cs:qword_5008 call fill_nearly_sorted mov rsi, [rbp+var_38] mov edx, [rbp+var_30] lea rdi, vsort call measure_time addsd xmm0, [rbp+var_58] movsd [rbp+var_58], xmm0 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax jmp loc_13AA loc_148F: cvtsi2sd xmm1, [rbp+var_28] movsd xmm0, [rbp+var_40] divsd xmm0, xmm1 movsd [rbp+var_40], xmm0 cvtsi2sd xmm1, [rbp+var_28] movsd xmm0, [rbp+var_48] divsd xmm0, xmm1 movsd [rbp+var_48], xmm0 cvtsi2sd xmm1, [rbp+var_28] movsd xmm0, [rbp+var_50] divsd xmm0, xmm1 movsd [rbp+var_50], xmm0 cvtsi2sd xmm1, [rbp+var_28] movsd xmm0, [rbp+var_58] divsd xmm0, xmm1 movsd [rbp+var_58], xmm0 mov esi, [rbp+var_30] movsd xmm0, [rbp+var_40] movsd xmm1, [rbp+var_48] movsd xmm2, [rbp+var_50] movsd xmm3, [rbp+var_58] lea rdi, a10d152f152f152; "%-10d | %-15.2f | %-15.2f | %-15.2f | %"... mov al, 4 call _printf mov rdi, [rbp+var_38] call _free loc_1509: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_133E loc_1517: xor eax, eax add rsp, 60h pop rbp retn
int main(int argc, const char **argv, const char **envp) { long long v3; // rdx unsigned int v4; // eax int j; // [rsp+4h] [rbp-5Ch] double v7; // [rsp+8h] [rbp-58h] double v8; // [rsp+10h] [rbp-50h] double v9; // [rsp+18h] [rbp-48h] double v10; // [rsp+20h] [rbp-40h] long long v11; // [rsp+28h] [rbp-38h] unsigned int v12; // [rsp+30h] [rbp-30h] int i; // [rsp+34h] [rbp-2Ch] _QWORD v14[2]; // [rsp+40h] [rbp-20h] int v15; // [rsp+50h] [rbp-10h] int v16; // [rsp+5Ch] [rbp-4h] v16 = 0; printf("vsort Performance Test\n", argv, envp); printf("=====================\n\n", argv, v3); v4 = time(0LL); srand(v4); v14[0] = 0x3E800000064LL; v14[1] = 214748364810000LL; v15 = 100000; printf("%-10s | %-15s | %-15s | %-15s | %-15s\n", "Size", "Random (ms)", "Sorted (ms)", "Reverse (ms)", "Nearly (ms)"); printf("------------------------------------------------------------------------\n"); for ( i = 0; i < 5; ++i ) { v12 = *((_DWORD *)v14 + i); v11 = malloc(4LL * (int)v12); if ( v11 ) { v10 = 0.0; v9 = 0.0; v8 = 0.0; v7 = 0.0; for ( j = 0; j < 3; ++j ) { fill_random(v11, v12); v10 = measure_time(vsort, v11, v12) + v10; if ( !(unsigned int)is_sorted(v11, v12) ) printf("ERROR: Failed to sort random array correctly\n"); fill_sorted(v11, v12); v9 = measure_time(vsort, v11, v12) + v9; fill_reverse_sorted(v11, v12); v8 = measure_time(vsort, v11, v12) + v8; fill_nearly_sorted(v11, v12, 0.05); v7 = measure_time(vsort, v11, v12) + v7; } printf( "%-10d | %-15.2f | %-15.2f | %-15.2f | %-15.2f\n", v12, v10 / (double)3, v9 / (double)3, v8 / (double)3, v7 / (double)3); free(v11); } else { printf("Memory allocation failed for size %d\n", v12); } } return 0; }
main: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV dword ptr [RBP + -0x4],0x0 LEA RDI,[0x104020] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[0x104038] MOV AL,0x0 CALL 0x001010c0 XOR EAX,EAX MOV EDI,EAX CALL 0x00101120 MOV EDI,EAX CALL 0x001010f0 MOV RAX,qword ptr [0x001049e0] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [0x001049e8] MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [0x001049f0] MOV dword ptr [RBP + -0x10],EAX MOV dword ptr [RBP + -0x24],0x5 MOV dword ptr [RBP + -0x28],0x3 LEA RDI,[0x104050] LEA RSI,[0x104077] LEA RDX,[0x10407c] LEA RCX,[0x104088] LEA R8,[0x104094] LEA R9,[0x1040a1] MOV AL,0x0 CALL 0x001010c0 LEA RDI,[0x1040ad] MOV AL,0x0 CALL 0x001010c0 MOV dword ptr [RBP + -0x2c],0x0 LAB_0010133e: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x24] JGE 0x00101517 MOVSXD RAX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RBP + RAX*0x4 + -0x20] MOV dword ptr [RBP + -0x30],EAX MOVSXD RDI,dword ptr [RBP + -0x30] SHL RDI,0x2 CALL 0x00101130 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00101383 MOV ESI,dword ptr [RBP + -0x30] LEA RDI,[0x1040f7] MOV AL,0x0 CALL 0x001010c0 JMP 0x00101509 LAB_00101383: XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x40],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x48],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x50],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x58],XMM0 MOV dword ptr [RBP + -0x5c],0x0 LAB_001013aa: MOV EAX,dword ptr [RBP + -0x5c] CMP EAX,dword ptr [RBP + -0x28] JGE 0x0010148f MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x30] CALL 0x00101520 MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x30] LEA RDI,[0x101870] CALL 0x00101570 ADDSD XMM0,qword ptr [RBP + -0x40] MOVSD qword ptr [RBP + -0x40],XMM0 MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x30] CALL 0x001015d0 CMP EAX,0x0 JNZ 0x001013fe LEA RDI,[0x10411d] MOV AL,0x0 CALL 0x001010c0 LAB_001013fe: MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x30] CALL 0x00101630 MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x30] LEA RDI,[0x101870] CALL 0x00101570 ADDSD XMM0,qword ptr [RBP + -0x48] MOVSD qword ptr [RBP + -0x48],XMM0 MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x30] CALL 0x00101670 MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x30] LEA RDI,[0x101870] CALL 0x00101570 ADDSD XMM0,qword ptr [RBP + -0x50] MOVSD qword ptr [RBP + -0x50],XMM0 MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x30] MOVSD XMM0,qword ptr [0x00104008] CALL 0x001016b0 MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x30] LEA RDI,[0x101870] CALL 0x00101570 ADDSD XMM0,qword ptr [RBP + -0x58] MOVSD qword ptr [RBP + -0x58],XMM0 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX JMP 0x001013aa LAB_0010148f: CVTSI2SD XMM1,dword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RBP + -0x40] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x40],XMM0 CVTSI2SD XMM1,dword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RBP + -0x48] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x48],XMM0 CVTSI2SD XMM1,dword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RBP + -0x50] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x50],XMM0 CVTSI2SD XMM1,dword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RBP + -0x58] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x58],XMM0 MOV ESI,dword ptr [RBP + -0x30] MOVSD XMM0,qword ptr [RBP + -0x40] MOVSD XMM1,qword ptr [RBP + -0x48] MOVSD XMM2,qword ptr [RBP + -0x50] MOVSD XMM3,qword ptr [RBP + -0x58] LEA RDI,[0x10414b] MOV AL,0x4 CALL 0x001010c0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00101030 LAB_00101509: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0010133e LAB_00101517: XOR EAX,EAX ADD RSP,0x60 POP RBP RET
int8 main(void) { uint uVar1; int iVar2; time_t tVar3; void *__ptr; double dVar4; int local_64; double local_60; double local_58; double local_50; double local_48; int local_34; int8 local_28; int8 local_20; int4 local_18; int4 local_c; local_c = 0; printf("vsort Performance Test\n"); printf("=====================\n\n"); tVar3 = time((time_t *)0x0); srand((uint)tVar3); local_28 = DAT_001049e0; local_20 = DAT_001049e8; local_18 = DAT_001049f0; printf("%-10s | %-15s | %-15s | %-15s | %-15s\n",&DAT_00104077,"Random (ms)","Sorted (ms)", "Reverse (ms)","Nearly (ms)"); printf("------------------------------------------------------------------------\n"); for (local_34 = 0; local_34 < 5; local_34 = local_34 + 1) { uVar1 = *(uint *)((long)&local_28 + (long)local_34 * 4); __ptr = malloc((long)(int)uVar1 << 2); if (__ptr == (void *)0x0) { printf("Memory allocation failed for size %d\n",(ulong)uVar1); } else { local_48 = 0.0; local_50 = 0.0; local_58 = 0.0; local_60 = 0.0; for (local_64 = 0; local_64 < 3; local_64 = local_64 + 1) { fill_random(__ptr,uVar1); dVar4 = (double)measure_time(vsort,__ptr,uVar1); local_48 = dVar4 + local_48; iVar2 = is_sorted(__ptr,uVar1); if (iVar2 == 0) { printf("ERROR: Failed to sort random array correctly\n"); } fill_sorted(__ptr,uVar1); dVar4 = (double)measure_time(vsort,__ptr,uVar1); local_50 = dVar4 + local_50; fill_reverse_sorted(__ptr,uVar1); dVar4 = (double)measure_time(vsort,__ptr,uVar1); local_58 = dVar4 + local_58; fill_nearly_sorted(DAT_00104008,__ptr,uVar1); dVar4 = (double)measure_time(vsort,__ptr,uVar1); local_60 = dVar4 + local_60; } printf("%-10d | %-15.2f | %-15.2f | %-15.2f | %-15.2f\n",local_48 / 3.0,local_50 / 3.0, local_58 / 3.0,local_60 / 3.0,(ulong)uVar1); free(__ptr); } } return 0; }
8,216
ma_get_key
eloqsql/storage/maria/ma_search.c
uchar *_ma_get_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; uchar *page; DBUG_ENTER("_ma_get_key"); page= ma_page->buff; page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos, keyinfo->keylength+nod_flag); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+= keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ while (page <= keypos) { if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, key->data_length + key->ref_length)); DBUG_RETURN(page); }
O0
c
ma_get_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x28(%rbp) movq -0x30(%rbp), %rax movzwl 0xa2(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x6dc6d movl -0x24(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x6dc6d movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %eax addl -0x28(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a130 movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x740(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %ecx movq -0x10(%rbp), %rax subl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x20(%rbp), %rax movq -0x30(%rbp), %rcx movzwl 0xaa(%rcx), %ecx movslq %ecx, %rcx addq %rcx, %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x6dceb movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x744(%rax), %ecx addl -0x28(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb $0x0, (%rax) movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0x6dcdb movq -0x30(%rbp), %rax movq 0xe0(%rax), %rax movq -0x10(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx leaq -0x38(%rbp), %rcx callq *%rax cmpl $0x0, %eax jne 0x6dcd9 movq -0x30(%rbp), %rax movq (%rax), %rdi movl $0x7e, %esi callq 0x34cc0 movq $0x0, -0x8(%rbp) jmp 0x6dceb jmp 0x6dc94 jmp 0x6dcdd jmp 0x6dcdf jmp 0x6dce1 jmp 0x6dce3 movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_get_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov eax, [rax+2Ch] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_28], eax mov rax, [rbp+var_30] movzx eax, word ptr [rax+0A2h] and eax, 28h cmp eax, 0 jnz loc_6DC6D mov eax, [rbp+var_24] and eax, 2 cmp eax, 0 jnz short loc_6DC6D mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_20] mov rax, [rbp+var_30] movzx eax, word ptr [rax+0AAh] add eax, [rbp+var_28] mov eax, eax mov edx, eax call _memmove mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rax+740h] mov rax, [rbp+var_10] mov [rax+14h], ecx mov rax, [rbp+var_30] movzx ecx, word ptr [rax+0AAh] mov rax, [rbp+var_10] sub ecx, [rax+14h] mov rax, [rbp+var_10] mov [rax+10h], ecx mov rax, [rbp+var_10] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_20] mov rcx, [rbp+var_30] movzx ecx, word ptr [rcx+0AAh] movsxd rcx, ecx add rax, rcx mov ecx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax jmp short loc_6DCEB loc_6DC6D: mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rax+744h] add ecx, [rbp+var_28] mov rax, [rbp+var_38] mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov byte ptr [rax], 0 loc_6DC94: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] ja short loc_6DCDB mov rax, [rbp+var_30] mov rax, [rax+0E0h] mov rdi, [rbp+var_10] mov esi, [rbp+var_24] mov edx, [rbp+var_28] lea rcx, [rbp+var_38] call rax cmp eax, 0 jnz short loc_6DCD9 mov rax, [rbp+var_30] mov rdi, [rax] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov [rbp+var_8], 0 jmp short loc_6DCEB loc_6DCD9: jmp short loc_6DC94 loc_6DCDB: jmp short $+2 loc_6DCDD: jmp short $+2 loc_6DCDF: jmp short $+2 loc_6DCE1: jmp short $+2 loc_6DCE3: mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_6DCEB: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_get_key(long long a1, long long a2, unsigned long long a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 int v6; // r9d unsigned long long v8; // [rsp+8h] [rbp-38h] BYREF long long v9; // [rsp+10h] [rbp-30h] unsigned int v10; // [rsp+18h] [rbp-28h] unsigned int v11; // [rsp+1Ch] [rbp-24h] unsigned long long v12; // [rsp+20h] [rbp-20h] long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v9 = *(_QWORD *)(a1 + 8); v8 = *(_QWORD *)(a2 + 16); v11 = *(_DWORD *)(a2 + 44); v10 = *(_DWORD *)(a2 + 40); if ( (*(_WORD *)(v9 + 162) & 0x28) != 0 || (v11 & 2) != 0 ) { v8 += v10 + *(_DWORD *)(*(_QWORD *)v9 + 1860LL); **(_BYTE **)v14 = 0; while ( v8 <= v12 ) { if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(v14, v11, v10, &v8) ) { ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v3, v4, v5, v6); return 0LL; } } return v8; } else { memmove(*(_QWORD *)v14, v12, v10 + *(unsigned __int16 *)(v9 + 170)); *(_DWORD *)(v14 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL); *(_DWORD *)(v14 + 16) = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(v14 + 20); *(_DWORD *)(v14 + 24) = 0; return v10 + *(unsigned __int16 *)(v9 + 170) + v12; } }
_ma_get_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xa2] AND EAX,0x28 CMP EAX,0x0 JNZ 0x0016dc6d MOV EAX,dword ptr [RBP + -0x24] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0016dc6d MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xaa] ADD EAX,dword ptr [RBP + -0x28] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a130 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x740] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RAX + 0xaa] MOV RAX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RCX + 0xaa] MOVSXD RCX,ECX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0016dceb LAB_0016dc6d: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x744] ADD ECX,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX],0x0 LAB_0016dc94: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JA 0x0016dcdb MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0xe0] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] LEA RCX,[RBP + -0x38] CALL RAX CMP EAX,0x0 JNZ 0x0016dcd9 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX] MOV ESI,0x7e CALL 0x00134cc0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0016dceb LAB_0016dcd9: JMP 0x0016dc94 LAB_0016dcdb: JMP 0x0016dcdd LAB_0016dcdd: JMP 0x0016dcdf LAB_0016dcdf: JMP 0x0016dce1 LAB_0016dce1: JMP 0x0016dce3 LAB_0016dce3: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0016dceb: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
void * _ma_get_key(int8 *param_1,long param_2,void *param_3) { int iVar1; void *local_40; long *local_38; uint local_30; uint local_2c; void *local_28; long local_20; int8 *local_18; void *local_10; local_38 = (long *)param_1[1]; local_40 = *(void **)(param_2 + 0x10); local_2c = *(uint *)(param_2 + 0x2c); local_30 = *(uint *)(param_2 + 0x28); local_28 = param_3; local_20 = param_2; local_18 = param_1; if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) { memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)local_38 + 0xaa) + local_30)); *(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740); *(uint *)(local_18 + 2) = (uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14); *(int4 *)(local_18 + 3) = 0; local_10 = (void *)((long)local_28 + (ulong)local_30 + (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa)); } else { local_40 = (void *)((long)local_40 + (ulong)(*(int *)(*local_38 + 0x744) + local_30)); *(int1 *)*param_1 = 0; do { if (local_28 < local_40) { return local_40; } iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40); } while (iVar1 != 0); _ma_set_fatal_error_with_share(*local_38,0x7e); local_10 = (void *)0x0; } return local_10; }
8,217
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0xb6bd1a(%rip), %rax # 0xc0fc20 cmpb $0x0, (%rax) je 0xa3f12 xorl %eax, %eax jmp 0xa3ffa leaq 0xb6bd0b(%rip), %rcx # 0xc0fc24 incl (%rcx) movb $0x1, (%rax) leaq 0x2e9d53(%rip), %r14 # 0x38dc78 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2e9d49(%rip), %rbx # 0x38dc7c movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0xb6c1b8(%rip), %rax # 0xc100f8 movq $0x0, (%rax) leaq 0x3f2c9(%rip), %rdi # 0xe3217 callq 0x2a660 testq %rax, %rax je 0xa3f68 movq %rax, %rdi callq 0xa4036 orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x3f2ae(%rip), %rdi # 0xe321d callq 0x2a660 testq %rax, %rax je 0xa3f88 movq %rax, %rdi callq 0xa4036 orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0xae874 movq 0x2e8054(%rip), %rax # 0x38bfe8 movq (%rax), %rax movq %rax, 0xb6bc92(%rip) # 0xc0fc30 leaq 0xb6bc8b(%rip), %rax # 0xc0fc30 movq $0x0, 0xb6bc88(%rip) # 0xc0fc38 leaq 0xb6bc71(%rip), %rcx # 0xc0fc28 movq %rax, (%rcx) leaq 0x3f266(%rip), %rax # 0xe3227 leaq 0xb6bd10(%rip), %r14 # 0xc0fcd8 movq %rax, (%r14) leaq 0xb6bcfe(%rip), %rax # 0xc0fcd0 movq (%rax), %rbx testq %rbx, %rbx je 0xa3fe8 movq %rbx, %rdi callq 0x970c4 addq %rbx, %rax movq %rax, (%r14) callq 0xa8e84 callq 0xa67d0 movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0xa3fff popq %rbx popq %r14 popq %rbp retq leaq 0x3feab(%rip), %rdi # 0xe3eb1 callq 0x2a660 leaq 0xb6bcb6(%rip), %rbx # 0xc0fcc8 movq %rax, (%rbx) testq %rax, %rax je 0xa402c leaq 0xb6bebf(%rip), %rdi # 0xc0fee0 movq %rax, %rsi callq 0x9d8f5 movq %rax, (%rbx) callq 0xa3184 jmp 0xa3f0b
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_A3F12 loc_A3F0B: xor eax, eax jmp loc_A3FFA loc_A3F12: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_A3F68 mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_A3F68: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_A3F88 mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_A3F88: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_C0FC38, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown_0; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_A3FE8 mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_A3FE8: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_A3FFF loc_A3FFA: pop rbx pop r14 pop rbp retn loc_A3FFF: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_A402C lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_A402C: call my_time_init jmp loc_A3F0B
char my_init() { char result; // al long long v1; // rax long long v2; // rax const char *v3; // rbx char v4; // cl _BYTE *v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_C0FC38 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = &v3[dirname_length(my_progname)]; my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = (_BYTE *)getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename((long long)&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0xd0fc20] CMP byte ptr [RAX],0x0 JZ 0x001a3f12 LAB_001a3f0b: XOR EAX,EAX JMP 0x001a3ffa LAB_001a3f12: LEA RCX,[0xd0fc24] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x48dc78] MOV dword ptr [R14],0x1b0 LEA RBX,[0x48dc7c] MOV dword ptr [RBX],0x1c0 LEA RAX,[0xd100f8] MOV qword ptr [RAX],0x0 LEA RDI,[0x1e3217] CALL 0x0012a660 TEST RAX,RAX JZ 0x001a3f68 MOV RDI,RAX CALL 0x001a4036 OR EAX,0x180 MOV dword ptr [R14],EAX LAB_001a3f68: LEA RDI,[0x1e321d] CALL 0x0012a660 TEST RAX,RAX JZ 0x001a3f88 MOV RDI,RAX CALL 0x001a4036 OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_001a3f88: CALL 0x001ae874 MOV RAX,qword ptr [0x0048bfe8] MOV RAX,qword ptr [RAX] MOV qword ptr [0x00d0fc30],RAX LEA RAX,[0xd0fc30] MOV qword ptr [0x00d0fc38],0x0 LEA RCX,[0xd0fc28] MOV qword ptr [RCX],RAX LEA RAX,[0x1e3227] LEA R14,[0xd0fcd8] MOV qword ptr [R14],RAX LEA RAX,[0xd0fcd0] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x001a3fe8 MOV RDI,RBX CALL 0x001970c4 ADD RAX,RBX MOV qword ptr [R14],RAX LAB_001a3fe8: CALL 0x001a8e84 CALL 0x001a67d0 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x001a3fff LAB_001a3ffa: POP RBX POP R14 POP RBP RET LAB_001a3fff: LEA RDI,[0x1e3eb1] CALL 0x0012a660 LEA RBX,[0xd0fcc8] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x001a402c LEA RDI,[0xd0fee0] MOV RSI,RAX CALL 0x0019d8f5 MOV qword ptr [RBX],RAX LAB_001a402c: CALL 0x001a3184 JMP 0x001a3f0b
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_0048bfe8; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }
8,218
my_once_free
eloqsql/mysys/my_once.c
void my_once_free(void) { reg1 USED_MEM *next,*old; DBUG_ENTER("my_once_free"); for (next=my_once_root_block ; next ; ) { old=next; next= next->next ; free((uchar*) old); } my_once_root_block=0; DBUG_VOID_RETURN; }
O3
c
my_once_free: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0xb6965a(%rip), %rbx # 0xc0a940 movq (%rbx), %rdi testq %rdi, %rdi je 0xa12fe movq (%rdi), %r14 callq 0x29160 movq %r14, %rdi testq %r14, %r14 jne 0xa12ee movq $0x0, (%rbx) popq %rbx popq %r14 popq %rbp retq nop
my_once_free: push rbp mov rbp, rsp push r14 push rbx lea rbx, my_once_root_block mov rdi, [rbx] test rdi, rdi jz short loc_A12FE loc_A12EE: mov r14, [rdi] call _free mov rdi, r14 test r14, r14 jnz short loc_A12EE loc_A12FE: mov qword ptr [rbx], 0 pop rbx pop r14 pop rbp retn
long long my_once_free() { _QWORD *v0; // rdi _QWORD *v1; // r14 long long result; // rax v0 = (_QWORD *)my_once_root_block; if ( my_once_root_block ) { do { v1 = (_QWORD *)*v0; result = free(v0); v0 = v1; } while ( v1 ); } my_once_root_block = 0LL; return result; }
my_once_free: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RBX,[0xd0a940] MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x001a12fe LAB_001a12ee: MOV R14,qword ptr [RDI] CALL 0x00129160 MOV RDI,R14 TEST R14,R14 JNZ 0x001a12ee LAB_001a12fe: MOV qword ptr [RBX],0x0 POP RBX POP R14 POP RBP RET
void my_once_free(void) { long *plVar1; long *__ptr; __ptr = my_once_root_block; if (my_once_root_block != (long *)0x0) { do { plVar1 = (long *)*__ptr; free(__ptr); __ptr = plVar1; } while (plVar1 != (long *)0x0); } my_once_root_block = (long *)0x0; return; }
8,219
js_object___defineGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___defineGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue obj; JSValue prop, value, get, set; int ret, flags; JSAtom atom; prop = argv[0]; value = argv[1]; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; if (check_function(ctx, value)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } flags = JS_PROP_THROW | JS_PROP_HAS_ENUMERABLE | JS_PROP_ENUMERABLE | JS_PROP_HAS_CONFIGURABLE | JS_PROP_CONFIGURABLE; if (magic) { get = JS_UNDEFINED; set = value; flags |= JS_PROP_HAS_SET; } else { get = value; set = JS_UNDEFINED; flags |= JS_PROP_HAS_GET; } ret = JS_DefineProperty(ctx, obj, atom, JS_UNDEFINED, get, set, flags); JS_FreeValue(ctx, obj); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else { return JS_UNDEFINED; } }
O0
c
js_object___defineGetter__: pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, 0xf0(%rsp) movq %rdx, 0xf8(%rsp) movq %rdi, 0xe8(%rsp) movl %ecx, 0xe4(%rsp) movq %r8, 0xd8(%rsp) movl %r9d, 0xd4(%rsp) movq 0xd8(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xb0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xb8(%rsp) movq 0xd8(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0xa0(%rsp) movq 0x18(%rax), %rax movq %rax, 0xa8(%rsp) movq 0xe8(%rsp), %rdi movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx callq 0x37770 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc0(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc188d movl $0x0, 0x100(%rsp) movq $0x6, 0x108(%rsp) jmp 0xc1afd movq 0xe8(%rsp), %rdi movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx callq 0x6da80 cmpl $0x0, %eax je 0xc18e8 movq 0xe8(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x23c90 movl $0x0, 0x100(%rsp) movq $0x6, 0x108(%rsp) jmp 0xc1afd movq 0xe8(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x31200 movl %eax, 0x74(%rsp) cmpl $0x0, 0x74(%rsp) sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xc195b movq 0xe8(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x23c90 movl $0x0, 0x100(%rsp) movq $0x6, 0x108(%rsp) jmp 0xc1afd movl $0x4505, 0x78(%rsp) # imm = 0x4505 cmpl $0x0, 0xd4(%rsp) je 0xc19c7 movl $0x0, 0x50(%rsp) movq $0x3, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x80(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x88(%rsp) movl 0x78(%rsp), %eax orl $0x1000, %eax # imm = 0x1000 movl %eax, 0x78(%rsp) jmp 0xc1a1f movq 0xa0(%rsp), %rax movq %rax, 0x90(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x98(%rsp) movl $0x0, 0x40(%rsp) movq $0x3, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x88(%rsp) movl 0x78(%rsp), %eax orl $0x800, %eax # imm = 0x800 movl %eax, 0x78(%rsp) movq 0xe8(%rsp), %rdi movl 0x74(%rsp), %ecx movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movl 0x78(%rsp), %eax movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx movq 0x30(%rsp), %r8 movq 0x38(%rsp), %r9 leaq 0x90(%rsp), %r11 leaq 0x80(%rsp), %r10 movq (%r11), %rbx movq %rbx, (%rsp) movq 0x8(%r11), %r11 movq %r11, 0x8(%rsp) movq (%r10), %r11 movq %r11, 0x10(%rsp) movq 0x8(%r10), %r10 movq %r10, 0x18(%rsp) movl %eax, 0x20(%rsp) callq 0x33de0 movl %eax, 0x7c(%rsp) movq 0xe8(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x23c90 movq 0xe8(%rsp), %rdi movl 0x74(%rsp), %esi callq 0x29040 cmpl $0x0, 0x7c(%rsp) jge 0xc1ae6 movl $0x0, 0x100(%rsp) movq $0x6, 0x108(%rsp) jmp 0xc1afd movl $0x0, 0x100(%rsp) movq $0x3, 0x108(%rsp) movq 0x100(%rsp), %rax movq 0x108(%rsp), %rdx addq $0x110, %rsp # imm = 0x110 popq %rbx retq nopw %cs:(%rax,%rax)
js_object___defineGetter__: push rbx sub rsp, 110h mov [rsp+118h+var_28], rsi mov [rsp+118h+var_20], rdx mov [rsp+118h+var_30], rdi mov [rsp+118h+var_34], ecx mov [rsp+118h+var_40], r8 mov [rsp+118h+var_44], r9d mov rax, [rsp+118h+var_40] mov rcx, [rax] mov [rsp+118h+var_68], rcx mov rax, [rax+8] mov [rsp+118h+var_60], rax mov rax, [rsp+118h+var_40] mov rcx, [rax+10h] mov [rsp+118h+var_78], rcx mov rax, [rax+18h] mov [rsp+118h+var_70], rax mov rdi, [rsp+118h+var_30] mov rsi, [rsp+118h+var_28] mov rdx, [rsp+118h+var_20] call JS_ToObject mov [rsp+118h+var_B8], rax mov [rsp+118h+var_B0], rdx mov rax, [rsp+118h+var_B8] mov [rsp+118h+var_58], rax mov rax, [rsp+118h+var_B0] mov [rsp+118h+var_50], rax mov rdi, [rsp+118h+var_58] mov rsi, [rsp+118h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_C188D mov dword ptr [rsp+118h+var_18], 0 mov [rsp+118h+var_10], 6 jmp loc_C1AFD loc_C188D: mov rdi, [rsp+118h+var_30] mov rsi, [rsp+118h+var_78] mov rdx, [rsp+118h+var_70] call check_function cmp eax, 0 jz short loc_C18E8 mov rdi, [rsp+118h+var_30] mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] call JS_FreeValue mov dword ptr [rsp+118h+var_18], 0 mov [rsp+118h+var_10], 6 jmp loc_C1AFD loc_C18E8: mov rdi, [rsp+118h+var_30] mov rsi, [rsp+118h+var_68] mov rdx, [rsp+118h+var_60] call JS_ValueToAtom mov [rsp+118h+var_A4], eax cmp [rsp+118h+var_A4], 0 setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_C195B mov rdi, [rsp+118h+var_30] mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] call JS_FreeValue mov dword ptr [rsp+118h+var_18], 0 mov [rsp+118h+var_10], 6 jmp loc_C1AFD loc_C195B: mov [rsp+118h+var_A0], 4505h cmp [rsp+118h+var_44], 0 jz short loc_C19C7 mov dword ptr [rsp+118h+var_C8], 0 mov [rsp+118h+var_C0], 3 mov rax, [rsp+118h+var_C8] mov [rsp+118h+var_88], rax mov rax, [rsp+118h+var_C0] mov [rsp+118h+var_80], rax mov rax, [rsp+118h+var_78] mov [rsp+118h+var_98], rax mov rax, [rsp+118h+var_70] mov [rsp+118h+var_90], rax mov eax, [rsp+118h+var_A0] or eax, 1000h mov [rsp+118h+var_A0], eax jmp short loc_C1A1F loc_C19C7: mov rax, [rsp+118h+var_78] mov [rsp+118h+var_88], rax mov rax, [rsp+118h+var_70] mov [rsp+118h+var_80], rax mov dword ptr [rsp+118h+var_D8], 0 mov [rsp+118h+var_D0], 3 mov rax, [rsp+118h+var_D8] mov [rsp+118h+var_98], rax mov rax, [rsp+118h+var_D0] mov [rsp+118h+var_90], rax mov eax, [rsp+118h+var_A0] or eax, 800h mov [rsp+118h+var_A0], eax loc_C1A1F: mov rdi, [rsp+118h+var_30] mov ecx, [rsp+118h+var_A4] mov dword ptr [rsp+118h+var_E8], 0 mov [rsp+118h+var_E0], 3 mov eax, [rsp+118h+var_A0] mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] mov r8, [rsp+118h+var_E8] mov r9, [rsp+118h+var_E0] lea r11, [rsp+118h+var_88] lea r10, [rsp+118h+var_98] mov rbx, [r11] mov [rsp+118h+var_118], rbx mov r11, [r11+8] mov [rsp+118h+var_110], r11 mov r11, [r10] mov [rsp+118h+var_108], r11 mov r10, [r10+8] mov [rsp+118h+var_100], r10 mov [rsp+118h+var_F8], eax call JS_DefineProperty mov [rsp+118h+var_9C], eax mov rdi, [rsp+118h+var_30] mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] call JS_FreeValue mov rdi, [rsp+118h+var_30] mov esi, [rsp+118h+var_A4] call JS_FreeAtom cmp [rsp+118h+var_9C], 0 jge short loc_C1AE6 mov dword ptr [rsp+118h+var_18], 0 mov [rsp+118h+var_10], 6 jmp short loc_C1AFD loc_C1AE6: mov dword ptr [rsp+118h+var_18], 0 mov [rsp+118h+var_10], 3 loc_C1AFD: mov rax, [rsp+118h+var_18] mov rdx, [rsp+118h+var_10] add rsp, 110h pop rbx retn
long long js_object___defineGetter__( long long a1, _DWORD *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long *a13, long long a14) { long long v14; // rdx double v15; // xmm4_8 double v16; // xmm5_8 __m128 v17; // xmm4 __m128 v18; // xmm5 _DWORD *v20; // [rsp+30h] [rbp-E8h] _DWORD *v21; // [rsp+40h] [rbp-D8h] _DWORD *v22; // [rsp+50h] [rbp-C8h] _DWORD *v23; // [rsp+60h] [rbp-B8h] unsigned int v24; // [rsp+74h] [rbp-A4h] unsigned int v25; // [rsp+78h] [rbp-A0h] _DWORD *v26; // [rsp+80h] [rbp-98h] long long v27; // [rsp+88h] [rbp-90h] _DWORD *v28; // [rsp+90h] [rbp-88h] unsigned int v29; // [rsp+98h] [rbp-80h] long long v30; // [rsp+A0h] [rbp-78h] long long v31; // [rsp+A8h] [rbp-70h] long long v32; // [rsp+B0h] [rbp-68h] long long v33; // [rsp+B8h] [rbp-60h] long long v34; // [rsp+C8h] [rbp-50h] int v35; // [rsp+D4h] [rbp-44h] long long v36; // [rsp+100h] [rbp-18h] v35 = a14; v32 = *a13; v33 = a13[1]; v30 = a13[2]; v31 = a13[3]; v23 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, v30, (long long)a13, a14); v34 = v14; if ( JS_IsException_1((long long)v23, v14) ) { LODWORD(v36) = 0; } else if ( (unsigned int)check_function(a1, v30, v31, a4, a5, a6, a7, v15, v16, a10, a11) || (v24 = JS_ValueToAtom(a1, v32, v33)) == 0 ) { JS_FreeValue(a1, (long long)v23, v34); LODWORD(v36) = 0; } else { if ( v35 ) { LODWORD(v22) = 0; v28 = v22; v29 = 3; v26 = (_DWORD *)v30; v27 = v31; v25 = 21765; } else { v28 = (_DWORD *)v30; v29 = v31; LODWORD(v21) = 0; v26 = v21; v27 = 3LL; v25 = 19717; } LODWORD(v20) = 0; JS_DefineProperty(a1, (long long)v23, v34, v24, v20, 3LL, a4, a5, a6, a7, v17, v18, a10, a11, v28, v29, v26, v27, v25); JS_FreeValue(a1, (long long)v23, v34); JS_FreeAtom(a1, v24); LODWORD(v36) = 0; } return v36; }
js_object___defineGetter__: PUSH RBX SUB RSP,0x110 MOV qword ptr [RSP + 0xf0],RSI MOV qword ptr [RSP + 0xf8],RDX MOV qword ptr [RSP + 0xe8],RDI MOV dword ptr [RSP + 0xe4],ECX MOV qword ptr [RSP + 0xd8],R8 MOV dword ptr [RSP + 0xd4],R9D MOV RAX,qword ptr [RSP + 0xd8] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xb0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0xa0],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] CALL 0x00137770 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xc8] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c188d MOV dword ptr [RSP + 0x100],0x0 MOV qword ptr [RSP + 0x108],0x6 JMP 0x001c1afd LAB_001c188d: MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] CALL 0x0016da80 CMP EAX,0x0 JZ 0x001c18e8 MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x00123c90 MOV dword ptr [RSP + 0x100],0x0 MOV qword ptr [RSP + 0x108],0x6 JMP 0x001c1afd LAB_001c18e8: MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00131200 MOV dword ptr [RSP + 0x74],EAX CMP dword ptr [RSP + 0x74],0x0 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001c195b MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x00123c90 MOV dword ptr [RSP + 0x100],0x0 MOV qword ptr [RSP + 0x108],0x6 JMP 0x001c1afd LAB_001c195b: MOV dword ptr [RSP + 0x78],0x4505 CMP dword ptr [RSP + 0xd4],0x0 JZ 0x001c19c7 MOV dword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0x58],0x3 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x88],RAX MOV EAX,dword ptr [RSP + 0x78] OR EAX,0x1000 MOV dword ptr [RSP + 0x78],EAX JMP 0x001c1a1f LAB_001c19c7: MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x98],RAX MOV dword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x3 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x88],RAX MOV EAX,dword ptr [RSP + 0x78] OR EAX,0x800 MOV dword ptr [RSP + 0x78],EAX LAB_001c1a1f: MOV RDI,qword ptr [RSP + 0xe8] MOV ECX,dword ptr [RSP + 0x74] MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOV EAX,dword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x38] LEA R11,[RSP + 0x90] LEA R10,[RSP + 0x80] MOV RBX,qword ptr [R11] MOV qword ptr [RSP],RBX MOV R11,qword ptr [R11 + 0x8] MOV qword ptr [RSP + 0x8],R11 MOV R11,qword ptr [R10] MOV qword ptr [RSP + 0x10],R11 MOV R10,qword ptr [R10 + 0x8] MOV qword ptr [RSP + 0x18],R10 MOV dword ptr [RSP + 0x20],EAX CALL 0x00133de0 MOV dword ptr [RSP + 0x7c],EAX MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0xe8] MOV ESI,dword ptr [RSP + 0x74] CALL 0x00129040 CMP dword ptr [RSP + 0x7c],0x0 JGE 0x001c1ae6 MOV dword ptr [RSP + 0x100],0x0 MOV qword ptr [RSP + 0x108],0x6 JMP 0x001c1afd LAB_001c1ae6: MOV dword ptr [RSP + 0x100],0x0 MOV qword ptr [RSP + 0x108],0x3 LAB_001c1afd: MOV RAX,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] ADD RSP,0x110 POP RBX RET
int1 [16] js_object___defineGetter__ (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,int param_6) { int8 uVar1; int8 uVar2; int8 uVar3; int iVar4; int iVar5; int1 auVar7 [16]; uint uStack_e4; uint uStack_d4; uint uStack_c4; int4 local_a0; long local_98; int8 local_90; long local_88; int8 local_80; int4 uStack_14; int8 local_10; int8 uVar6; uVar1 = *param_5; uVar2 = param_5[1]; local_88 = param_5[2]; uVar3 = param_5[3]; auVar7 = JS_ToObject(param_1,param_2,param_3); uVar6 = auVar7._8_8_; auVar7._0_8_ = auVar7._0_8_; iVar4 = JS_IsException(auVar7._0_8_,uVar6); if (iVar4 == 0) { iVar4 = check_function(param_1,local_88,uVar3); if (iVar4 == 0) { iVar4 = JS_ValueToAtom(param_1,uVar1,uVar2); if (iVar4 == 0) { JS_FreeValue(param_1,auVar7._0_8_,uVar6); local_10 = 6; } else { if (param_6 == 0) { local_98 = (ulong)uStack_d4 << 0x20; local_90 = 3; local_a0 = 0x4d05; local_80 = uVar3; } else { local_80 = 3; local_a0 = 0x5505; local_98 = local_88; local_90 = uVar3; local_88 = (ulong)uStack_c4 << 0x20; } iVar5 = JS_DefineProperty(param_1,auVar7._0_8_,uVar6,iVar4,(ulong)uStack_e4 << 0x20,3, local_88,local_80,local_98,local_90,local_a0); JS_FreeValue(param_1,auVar7._0_8_,uVar6); JS_FreeAtom(param_1,iVar4); if (iVar5 < 0) { local_10 = 6; } else { local_10 = 3; } } } else { JS_FreeValue(param_1,auVar7._0_8_,uVar6); local_10 = 6; } } else { local_10 = 6; } auVar7._4_8_ = local_10; auVar7._0_4_ = uStack_14; auVar7._12_4_ = 0; return auVar7 << 0x20; }
8,220
js_object___defineGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___defineGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue obj; JSValue prop, value, get, set; int ret, flags; JSAtom atom; prop = argv[0]; value = argv[1]; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; if (check_function(ctx, value)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } flags = JS_PROP_THROW | JS_PROP_HAS_ENUMERABLE | JS_PROP_ENUMERABLE | JS_PROP_HAS_CONFIGURABLE | JS_PROP_CONFIGURABLE; if (magic) { get = JS_UNDEFINED; set = value; flags |= JS_PROP_HAS_SET; } else { get = value; set = JS_UNDEFINED; flags |= JS_PROP_HAS_GET; } ret = JS_DefineProperty(ctx, obj, atom, JS_UNDEFINED, get, set, flags); JS_FreeValue(ctx, obj); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else { return JS_UNDEFINED; } }
O1
c
js_object___defineGetter__: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r9d, 0x3c(%rsp) movq %rdi, %rbx movq (%r8), %r15 movq 0x8(%r8), %rax movq %rax, 0x50(%rsp) movq 0x10(%r8), %rbp movq 0x18(%r8), %r12 callq 0x26ddd movq %rdx, %r14 movl $0x6, %r13d cmpl $0x6, %r14d je 0x717ed movq %rax, 0x30(%rsp) movq %rbx, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x415b1 testl %eax, %eax je 0x71734 movq 0x18(%rbx), %rdi movq 0x30(%rsp), %rsi movq %r14, %rdx callq 0x1d8c6 jmp 0x717ed movq %rbx, %rdi movq %r15, %rsi movq 0x50(%rsp), %rdx callq 0x24093 testl %eax, %eax je 0x7171e cmpl $0x0, 0x3c(%rsp) je 0x7176c movl $0x0, 0x40(%rsp) movq $0x3, 0x48(%rsp) movq %rbp, 0x58(%rsp) movl $0x5505, %ecx # imm = 0x5505 jmp 0x71789 movq %rbp, 0x40(%rsp) movq %r12, 0x48(%rsp) movl $0x0, 0x58(%rsp) movl $0x4d05, %ecx # imm = 0x4D05 movl $0x3, %r12d movq %r12, 0x60(%rsp) movups 0x58(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x40(%rsp), %xmm0 movups %xmm0, (%rsp) movl %ecx, 0x20(%rsp) movl $0x3, %r9d movq %rbx, %rdi movq 0x30(%rsp), %r12 movq %r12, %rsi movq %r14, %rdx movl %eax, %ebp movl %eax, %ecx xorl %r8d, %r8d callq 0x254b9 movl %eax, %r15d movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1d8c6 movq %rbx, %rdi movl %ebp, %esi callq 0x207d8 shrl $0x1f, %r15d leaq (%r15,%r15,2), %r13 addq $0x3, %r13 xorl %eax, %eax movq %r13, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_object___defineGetter__: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_5C], r9d mov rbx, rdi mov r15, [r8] mov rax, [r8+8] mov [rsp+98h+var_48], rax mov rbp, [r8+10h] mov r12, [r8+18h] call JS_ToObject mov r14, rdx mov r13d, 6 cmp r14d, 6 jz loc_717ED mov [rsp+98h+var_68], rax mov rdi, rbx mov rsi, rbp mov rdx, r12 call check_function test eax, eax jz short loc_71734 loc_7171E: mov rdi, [rbx+18h] mov rsi, [rsp+98h+var_68] mov rdx, r14 call JS_FreeValueRT jmp loc_717ED loc_71734: mov rdi, rbx mov rsi, r15 mov rdx, [rsp+98h+var_48] call JS_ValueToAtom test eax, eax jz short loc_7171E cmp [rsp+98h+var_5C], 0 jz short loc_7176C mov dword ptr [rsp+98h+var_58], 0 mov qword ptr [rsp+98h+var_58+8], 3 mov qword ptr [rsp+98h+var_40], rbp mov ecx, 5505h jmp short loc_71789 loc_7176C: mov qword ptr [rsp+98h+var_58], rbp mov qword ptr [rsp+98h+var_58+8], r12 mov dword ptr [rsp+98h+var_40], 0 mov ecx, 4D05h mov r12d, 3 loc_71789: mov qword ptr [rsp+98h+var_40+8], r12 movups xmm0, [rsp+98h+var_40] movups [rsp+98h+var_88], xmm0 movups xmm0, [rsp+98h+var_58] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_78], ecx mov r9d, 3 mov rdi, rbx mov r12, [rsp+98h+var_68] mov rsi, r12 mov rdx, r14 mov ebp, eax mov ecx, eax xor r8d, r8d call JS_DefineProperty mov r15d, eax mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r14 call JS_FreeValueRT mov rdi, rbx mov esi, ebp call JS_FreeAtom shr r15d, 1Fh lea r13, [r15+r15*2] add r13, 3 loc_717ED: xor eax, eax mov rdx, r13 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_object___defineGetter__( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // r15 long long v15; // rbp long long v16; // r12 _DWORD *v17; // rax double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // rdx long long v21; // r14 unsigned int v22; // eax __m128 v23; // xmm4 __m128 v24; // xmm5 unsigned int v25; // ecx int v26; // ebp _DWORD *v28; // [rsp+30h] [rbp-68h] int v29; // [rsp+3Ch] [rbp-5Ch] __m128 v30; // [rsp+40h] [rbp-58h] long long v31; // [rsp+50h] [rbp-48h] _DWORD *v32; // [rsp+58h] [rbp-40h] v29 = a6; v14 = *a5; v31 = a5[1]; v15 = a5[2]; v16 = a5[3]; v17 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v21 = v20; if ( (_DWORD)v20 != 6 ) { v28 = v17; if ( (unsigned int)check_function(a1, v15, v16, a7, a8, a9, a10, v18, v19, a13, a14) || (v22 = JS_ValueToAtom(a1, v14, v31)) == 0 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v28, v21); } else { if ( v29 ) { v30.m128_i32[0] = 0; v30.m128_u64[1] = 3LL; v32 = (_DWORD *)v15; v25 = 21765; } else { v30.m128_u64[0] = v15; v30.m128_u64[1] = v16; LODWORD(v32) = 0; v25 = 19717; v16 = 3LL; } v26 = v22; JS_DefineProperty( a1, (unsigned long long)v28, v21, v22, 0LL, 3LL, v30, a8, a9, a10, v23, v24, a13, a14, v30.m128_u64[0], v30.m128_i64[1], v32, v16, v25); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v28, v21); JS_FreeAtom(a1, v26); } } return 0LL; }
js_object___defineGetter__: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0x3c],R9D MOV RBX,RDI MOV R15,qword ptr [R8] MOV RAX,qword ptr [R8 + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV RBP,qword ptr [R8 + 0x10] MOV R12,qword ptr [R8 + 0x18] CALL 0x00126ddd MOV R14,RDX MOV R13D,0x6 CMP R14D,0x6 JZ 0x001717ed MOV qword ptr [RSP + 0x30],RAX MOV RDI,RBX MOV RSI,RBP MOV RDX,R12 CALL 0x001415b1 TEST EAX,EAX JZ 0x00171734 LAB_0017171e: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R14 CALL 0x0011d8c6 JMP 0x001717ed LAB_00171734: MOV RDI,RBX MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x50] CALL 0x00124093 TEST EAX,EAX JZ 0x0017171e CMP dword ptr [RSP + 0x3c],0x0 JZ 0x0017176c MOV dword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x3 MOV qword ptr [RSP + 0x58],RBP MOV ECX,0x5505 JMP 0x00171789 LAB_0017176c: MOV qword ptr [RSP + 0x40],RBP MOV qword ptr [RSP + 0x48],R12 MOV dword ptr [RSP + 0x58],0x0 MOV ECX,0x4d05 MOV R12D,0x3 LAB_00171789: MOV qword ptr [RSP + 0x60],R12 MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],ECX MOV R9D,0x3 MOV RDI,RBX MOV R12,qword ptr [RSP + 0x30] MOV RSI,R12 MOV RDX,R14 MOV EBP,EAX MOV ECX,EAX XOR R8D,R8D CALL 0x001254b9 MOV R15D,EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R14 CALL 0x0011d8c6 MOV RDI,RBX MOV ESI,EBP CALL 0x001207d8 SHR R15D,0x1f LEA R13,[R15 + R15*0x2] ADD R13,0x3 LAB_001717ed: XOR EAX,EAX MOV RDX,R13 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_object___defineGetter__(long param_1) { int8 uVar1; ulong uVar2; int8 uVar3; int iVar4; uint uVar5; int4 uVar6; int8 *in_R8; int in_R9D; int8 uVar7; ulong uVar8; int1 auVar9 [16]; ulong local_58; int8 uStack_50; ulong local_40; uVar7 = *in_R8; uVar1 = in_R8[1]; uVar2 = in_R8[2]; uVar3 = in_R8[3]; auVar9 = JS_ToObject(); auVar9._8_8_ = auVar9._8_8_; auVar9._0_8_ = auVar9._0_8_; uVar8 = 6; if (auVar9._8_4_ != 6) { iVar4 = check_function(param_1,uVar2,uVar3); if (iVar4 == 0) { iVar4 = JS_ValueToAtom(param_1,uVar7,uVar1); if (iVar4 != 0) { if (in_R9D == 0) { local_40 = local_40 & 0xffffffff00000000; uVar6 = 0x4d05; uVar7 = 3; local_58 = uVar2; uStack_50 = uVar3; } else { local_58 = 0; uStack_50 = 3; uVar6 = 0x5505; uVar7 = uVar3; local_40 = uVar2; } uVar5 = JS_DefineProperty(param_1,auVar9._0_8_,auVar9._8_8_,iVar4,0,3,(int4)local_58, (int4)uStack_50,local_40,uVar7,uVar6); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); JS_FreeAtom(param_1,iVar4); uVar8 = (ulong)(uVar5 >> 0x1f) * 3 + 3; goto LAB_001717ed; } } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); } LAB_001717ed: auVar9._8_8_ = 0; auVar9._0_8_ = uVar8; return auVar9 << 0x40; }
8,221
js_object___defineGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___defineGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue obj; JSValue prop, value, get, set; int ret, flags; JSAtom atom; prop = argv[0]; value = argv[1]; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; if (check_function(ctx, value)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } flags = JS_PROP_THROW | JS_PROP_HAS_ENUMERABLE | JS_PROP_ENUMERABLE | JS_PROP_HAS_CONFIGURABLE | JS_PROP_CONFIGURABLE; if (magic) { get = JS_UNDEFINED; set = value; flags |= JS_PROP_HAS_SET; } else { get = value; set = JS_UNDEFINED; flags |= JS_PROP_HAS_GET; } ret = JS_DefineProperty(ctx, obj, atom, JS_UNDEFINED, get, set, flags); JS_FreeValue(ctx, obj); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else { return JS_UNDEFINED; } }
O2
c
js_object___defineGetter__: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r9d, 0x3c(%rsp) movq %rdi, %rbx movq (%r8), %rbp movq 0x8(%r8), %rax movq %rax, 0x40(%rsp) movq 0x10(%r8), %r15 movq 0x18(%r8), %r12 callq 0x20b92 movq %rdx, %r14 pushq $0x6 popq %r13 cmpl $0x6, %r14d je 0x5f94d movq %rax, 0x30(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x3949a testl %eax, %eax je 0x5f8a2 movq %rbx, %rdi movq 0x30(%rsp), %rsi movq %r14, %rdx callq 0x1801e jmp 0x5f94d movq %rbx, %rdi movq %rbp, %rsi movq 0x40(%rsp), %rdx callq 0x1e0bc testl %eax, %eax je 0x5f88d movl %eax, %ebp cmpl $0x0, 0x3c(%rsp) je 0x5f8d3 andl $0x0, 0x58(%rsp) movq %r15, 0x48(%rsp) movl $0x5505, %eax # imm = 0x5505 pushq $0x3 popq %rcx jmp 0x5f8e9 movq %r15, 0x58(%rsp) andl $0x0, 0x48(%rsp) movl $0x4d05, %eax # imm = 0x4D05 movq %r12, %rcx pushq $0x3 popq %r12 movq %rcx, 0x60(%rsp) movq %r12, 0x50(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x58(%rsp), %xmm0 movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) pushq $0x3 popq %r9 movq %rbx, %rdi movq 0x30(%rsp), %r12 movq %r12, %rsi movq %r14, %rdx movl %ebp, %ecx xorl %r8d, %r8d callq 0x1f1de movl %eax, %r15d movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1801e movq %rbx, %rdi movl %ebp, %esi callq 0x1a995 shrl $0x1f, %r15d leaq (%r15,%r15,2), %r13 addq $0x3, %r13 xorl %eax, %eax movq %r13, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_object___defineGetter__: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_5C], r9d mov rbx, rdi mov rbp, [r8] mov rax, [r8+8] mov [rsp+98h+var_58], rax mov r15, [r8+10h] mov r12, [r8+18h] call JS_ToObject mov r14, rdx push 6 pop r13 cmp r14d, 6 jz loc_5F94D mov [rsp+98h+var_68], rax mov rdi, rbx mov rsi, r15 mov rdx, r12 call check_function test eax, eax jz short loc_5F8A2 loc_5F88D: mov rdi, rbx mov rsi, [rsp+98h+var_68] mov rdx, r14 call JS_FreeValue jmp loc_5F94D loc_5F8A2: mov rdi, rbx mov rsi, rbp mov rdx, [rsp+98h+var_58] call JS_ValueToAtom test eax, eax jz short loc_5F88D mov ebp, eax cmp [rsp+98h+var_5C], 0 jz short loc_5F8D3 and dword ptr [rsp+98h+var_40], 0 mov qword ptr [rsp+98h+var_50], r15 mov eax, 5505h push 3 pop rcx jmp short loc_5F8E9 loc_5F8D3: mov qword ptr [rsp+98h+var_40], r15 and dword ptr [rsp+98h+var_50], 0 mov eax, 4D05h mov rcx, r12 push 3 pop r12 loc_5F8E9: mov qword ptr [rsp+98h+var_40+8], rcx mov qword ptr [rsp+98h+var_50+8], r12 movups xmm0, [rsp+98h+var_50] movups [rsp+98h+var_88], xmm0 movups xmm0, [rsp+98h+var_40] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_78], eax push 3 pop r9 mov rdi, rbx mov r12, [rsp+98h+var_68] mov rsi, r12 mov rdx, r14 mov ecx, ebp xor r8d, r8d call JS_DefineProperty mov r15d, eax mov rdi, rbx mov rsi, r12 mov rdx, r14 call JS_FreeValue mov rdi, rbx mov esi, ebp call JS_FreeAtom shr r15d, 1Fh lea r13, [r15+r15*2] add r13, 3 loc_5F94D: xor eax, eax mov rdx, r13 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_object___defineGetter__( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbp long long v15; // r15 long long v16; // r12 long long v17; // rax double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // rdx long long v21; // r14 unsigned int v22; // eax __m128 v23; // xmm4 __m128 v24; // xmm5 unsigned int v25; // ebp unsigned int v26; // eax long long v27; // rcx long long v29; // [rsp+30h] [rbp-68h] int v30; // [rsp+3Ch] [rbp-5Ch] long long v31; // [rsp+40h] [rbp-58h] _DWORD *v32; // [rsp+48h] [rbp-50h] __m128 v33; // [rsp+58h] [rbp-40h] v30 = a6; v14 = *a5; v31 = a5[1]; v15 = a5[2]; v16 = a5[3]; v17 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v21 = v20; if ( (_DWORD)v20 != 6 ) { v29 = v17; if ( (unsigned int)check_function(a1, v15, v16, a7, a8, a9, a10, v18, v19, a13, a14) || (v22 = JS_ValueToAtom(a1, v14, v31)) == 0 ) { JS_FreeValue(a1, v29, v21); } else { v25 = v22; if ( v30 ) { v33.m128_i32[0] = 0; v32 = (_DWORD *)v15; v26 = 21765; v27 = 3LL; } else { v33.m128_u64[0] = v15; LODWORD(v32) = 0; v26 = 19717; v27 = v16; LODWORD(v16) = 3; } v33.m128_u64[1] = v27; JS_DefineProperty( a1, v29, v21, v25, 0LL, 3LL, v33, a8, a9, a10, v23, v24, a13, a14, v33.m128_u64[0], v27, v32, v16, v26); JS_FreeValue(a1, v29, v21); JS_FreeAtom(a1, v25); } } return 0LL; }
js_object___defineGetter__: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0x3c],R9D MOV RBX,RDI MOV RBP,qword ptr [R8] MOV RAX,qword ptr [R8 + 0x8] MOV qword ptr [RSP + 0x40],RAX MOV R15,qword ptr [R8 + 0x10] MOV R12,qword ptr [R8 + 0x18] CALL 0x00120b92 MOV R14,RDX PUSH 0x6 POP R13 CMP R14D,0x6 JZ 0x0015f94d MOV qword ptr [RSP + 0x30],RAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x0013949a TEST EAX,EAX JZ 0x0015f8a2 LAB_0015f88d: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R14 CALL 0x0011801e JMP 0x0015f94d LAB_0015f8a2: MOV RDI,RBX MOV RSI,RBP MOV RDX,qword ptr [RSP + 0x40] CALL 0x0011e0bc TEST EAX,EAX JZ 0x0015f88d MOV EBP,EAX CMP dword ptr [RSP + 0x3c],0x0 JZ 0x0015f8d3 AND dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x48],R15 MOV EAX,0x5505 PUSH 0x3 POP RCX JMP 0x0015f8e9 LAB_0015f8d3: MOV qword ptr [RSP + 0x58],R15 AND dword ptr [RSP + 0x48],0x0 MOV EAX,0x4d05 MOV RCX,R12 PUSH 0x3 POP R12 LAB_0015f8e9: MOV qword ptr [RSP + 0x60],RCX MOV qword ptr [RSP + 0x50],R12 MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX PUSH 0x3 POP R9 MOV RDI,RBX MOV R12,qword ptr [RSP + 0x30] MOV RSI,R12 MOV RDX,R14 MOV ECX,EBP XOR R8D,R8D CALL 0x0011f1de MOV R15D,EAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x0011801e MOV RDI,RBX MOV ESI,EBP CALL 0x0011a995 SHR R15D,0x1f LEA R13,[R15 + R15*0x2] ADD R13,0x3 LAB_0015f94d: XOR EAX,EAX MOV RDX,R13 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_object___defineGetter__(int8 param_1) { ulong uVar1; int8 uVar2; int iVar3; int4 uVar4; uint uVar5; int8 uVar6; int8 *in_R8; int in_R9D; int8 uVar7; ulong uVar8; int1 auVar9 [16]; ulong local_50; ulong local_40; int4 uStack_38; uVar7 = *in_R8; uVar6 = in_R8[1]; uVar1 = in_R8[2]; uVar2 = in_R8[3]; auVar9 = JS_ToObject(); auVar9._8_8_ = auVar9._8_8_; auVar9._0_8_ = auVar9._0_8_; uVar8 = 6; if (auVar9._8_4_ != 6) { iVar3 = check_function(param_1,uVar1,uVar2); if (iVar3 == 0) { iVar3 = JS_ValueToAtom(param_1,uVar7,uVar6); if (iVar3 != 0) { if (in_R9D == 0) { local_50 = local_50 & 0xffffffff00000000; uVar4 = 0x4d05; uVar7 = 3; uVar6 = uVar2; local_40 = uVar1; } else { local_40 = 0; uVar4 = 0x5505; uVar6 = 3; uVar7 = uVar2; local_50 = uVar1; } uStack_38 = (int4)uVar6; uVar5 = JS_DefineProperty(param_1,auVar9._0_8_,auVar9._8_8_,iVar3,0,3,(int4)local_40, uStack_38,local_50,uVar7,uVar4); JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_); JS_FreeAtom(param_1,iVar3); uVar8 = (ulong)(uVar5 >> 0x1f) * 3 + 3; goto LAB_0015f94d; } } JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_); } LAB_0015f94d: auVar9._8_8_ = 0; auVar9._0_8_ = uVar8; return auVar9 << 0x40; }
8,222
mysql_find_charset_nr
eloqsql/libmariadb/libmariadb/ma_charset.c
const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr) { const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets; if (my_collation_id_is_uca1400(charsetnr)) charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr); do { if (c->nr == charsetnr) { return(c); } ++c; } while (c[0].nr != 0); return(NULL); }
O0
c
mysql_find_charset_nr: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) leaq 0x1b8ede(%rip), %rax # 0x220bb0 movq %rax, -0x18(%rbp) movl -0xc(%rbp), %edi callq 0x67d30 cmpb $0x0, %al je 0x67ced movl -0xc(%rbp), %edi callq 0x67d60 movl %eax, -0xc(%rbp) jmp 0x67cef movq -0x18(%rbp), %rax movl (%rax), %eax cmpl -0xc(%rbp), %eax jne 0x67d04 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x67d21 movq -0x18(%rbp), %rax addq $0x48, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x67cef movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_find_charset_nr: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi lea rax, mariadb_compiled_charsets mov [rbp+var_18], rax mov edi, [rbp+var_C] call my_collation_id_is_uca1400 cmp al, 0 jz short loc_67CED mov edi, [rbp+var_C] call my_uca1400_collation_id_uca400_compat mov [rbp+var_C], eax loc_67CED: jmp short $+2 loc_67CEF: mov rax, [rbp+var_18] mov eax, [rax] cmp eax, [rbp+var_C] jnz short loc_67D04 mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_67D21 loc_67D04: mov rax, [rbp+var_18] add rax, 48h ; 'H' mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_67CEF mov [rbp+var_8], 0 loc_67D21: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
_DWORD * mysql_find_charset_nr(unsigned int a1) { _DWORD *v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+14h] [rbp-Ch] v3 = a1; v2 = &mariadb_compiled_charsets; if ( (unsigned __int8)my_collation_id_is_uca1400(a1) ) v3 = my_uca1400_collation_id_uca400_compat(a1); do { if ( *v2 == v3 ) return v2; v2 += 18; } while ( *v2 ); return 0LL; }
mysql_find_charset_nr: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI LEA RAX,[0x320bb0] MOV qword ptr [RBP + -0x18],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x00167d30 CMP AL,0x0 JZ 0x00167ced MOV EDI,dword ptr [RBP + -0xc] CALL 0x00167d60 MOV dword ptr [RBP + -0xc],EAX LAB_00167ced: JMP 0x00167cef LAB_00167cef: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x00167d04 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x00167d21 LAB_00167d04: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x48 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x00167cef MOV qword ptr [RBP + -0x8],0x0 LAB_00167d21: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int * mysql_find_charset_nr(int param_1) { char cVar1; int *local_20; int local_14; local_20 = &mariadb_compiled_charsets; cVar1 = my_collation_id_is_uca1400(param_1); local_14 = param_1; if (cVar1 != '\0') { local_14 = my_uca1400_collation_id_uca400_compat(param_1); } do { if (*local_20 == local_14) { return local_20; } local_20 = local_20 + 0x12; } while (*local_20 != 0); return (int *)0x0; }
8,223
strip_surrounding(char*, char, char)
eloqsql/client/mysqltest.cc
static int strip_surrounding(char* str, char c1, char c2) { char* ptr= str; /* Check if the first non space character is c1 */ while(*ptr && my_isspace(charset_info, *ptr)) ptr++; if (*ptr == c1) { /* Replace it with a space */ *ptr= ' '; /* Last non space character should be c2 */ ptr= strend(str)-1; while(*ptr && my_isspace(charset_info, *ptr)) ptr--; if (*ptr == c2) { /* Replace it with \0 */ *ptr= 0; } else { /* Mismatch detected */ return 1; } } return 0; }
O0
cpp
strip_surrounding(char*, char, char): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movb %sil, %cl movq %rdi, -0x10(%rbp) movb %cl, -0x11(%rbp) movb %al, -0x12(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, (%rcx) movb %al, -0x21(%rbp) je 0x66380 movq 0x290024(%rip), %rax # 0x2f6388 movq 0x40(%rax), %rax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x66389 jmp 0x66397 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x6634f movq -0x20(%rbp), %rax movsbl (%rax), %eax movsbl -0x11(%rbp), %ecx cmpl %ecx, %eax jne 0x6642d movq -0x20(%rbp), %rax movb $0x20, (%rax) movq -0x10(%rbp), %rdi callq 0x148aa0 addq $-0x1, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, (%rcx) movb %al, -0x22(%rbp) je 0x663f3 movq 0x28ffb1(%rip), %rax # 0x2f6388 movq 0x40(%rax), %rax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x22(%rbp) movb -0x22(%rbp), %al testb $0x1, %al jne 0x663fc jmp 0x6640a movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x663c2 movq -0x20(%rbp), %rax movsbl (%rax), %eax movsbl -0x12(%rbp), %ecx cmpl %ecx, %eax jne 0x66422 movq -0x20(%rbp), %rax movb $0x0, (%rax) jmp 0x6642b movl $0x1, -0x4(%rbp) jmp 0x66434 jmp 0x6642d movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZL17strip_surroundingPccc: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov cl, sil mov [rbp+var_10], rdi mov [rbp+var_11], cl mov [rbp+var_12], al mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_6634F: mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx], 0 mov [rbp+var_21], al jz short loc_66380 mov rax, cs:_ZL12charset_info; charset_info mov rax, [rax+40h] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_21], al loc_66380: mov al, [rbp+var_21] test al, 1 jnz short loc_66389 jmp short loc_66397 loc_66389: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_6634F loc_66397: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_11] cmp eax, ecx jnz loc_6642D mov rax, [rbp+var_20] mov byte ptr [rax], 20h ; ' ' mov rdi, [rbp+var_10] call strend add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax loc_663C2: mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx], 0 mov [rbp+var_22], al jz short loc_663F3 mov rax, cs:_ZL12charset_info; charset_info mov rax, [rax+40h] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_22], al loc_663F3: mov al, [rbp+var_22] test al, 1 jnz short loc_663FC jmp short loc_6640A loc_663FC: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_663C2 loc_6640A: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_12] cmp eax, ecx jnz short loc_66422 mov rax, [rbp+var_20] mov byte ptr [rax], 0 jmp short loc_6642B loc_66422: mov [rbp+var_4], 1 jmp short loc_66434 loc_6642B: jmp short $+2 loc_6642D: mov [rbp+var_4], 0 loc_66434: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long strip_surrounding(char *a1, char a2, char a3) { bool v4; // [rsp+Eh] [rbp-22h] bool v5; // [rsp+Fh] [rbp-21h] char *i; // [rsp+10h] [rbp-20h] _BYTE *j; // [rsp+10h] [rbp-20h] for ( i = a1; ; ++i ) { v5 = 0; if ( *i ) v5 = (*(_BYTE *)(*((_QWORD *)charset_info + 8) + (unsigned __int8)*i + 1LL) & 8) != 0; if ( !v5 ) break; } if ( *i != a2 ) return 0; *i = 32; for ( j = (_BYTE *)(strend(a1) - 1); ; --j ) { v4 = 0; if ( *j ) v4 = (*(_BYTE *)(*((_QWORD *)charset_info + 8) + (unsigned __int8)*j + 1LL) & 8) != 0; if ( !v4 ) break; } if ( (char)*j == a3 ) { *j = 0; return 0; } return 1; }
strip_surrounding: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV CL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],CL MOV byte ptr [RBP + -0x12],AL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_0016634f: MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX],0x0 MOV byte ptr [RBP + -0x21],AL JZ 0x00166380 MOV RAX,qword ptr [0x003f6388] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x21],AL LAB_00166380: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x00166389 JMP 0x00166397 LAB_00166389: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0016634f LAB_00166397: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x11] CMP EAX,ECX JNZ 0x0016642d MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x20 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00248aa0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX LAB_001663c2: MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX],0x0 MOV byte ptr [RBP + -0x22],AL JZ 0x001663f3 MOV RAX,qword ptr [0x003f6388] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x22],AL LAB_001663f3: MOV AL,byte ptr [RBP + -0x22] TEST AL,0x1 JNZ 0x001663fc JMP 0x0016640a LAB_001663fc: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001663c2 LAB_0016640a: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x12] CMP EAX,ECX JNZ 0x00166422 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x0 JMP 0x0016642b LAB_00166422: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00166434 LAB_0016642b: JMP 0x0016642d LAB_0016642d: MOV dword ptr [RBP + -0x4],0x0 LAB_00166434: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
/* strip_surrounding(char*, char, char) */ int4 strip_surrounding(char *param_1,char param_2,char param_3) { bool bVar1; byte *local_28; local_28 = (byte *)param_1; while( true ) { bVar1 = false; if (*local_28 != 0) { bVar1 = (*(byte *)(*(long *)(charset_info + 0x40) + 1 + (ulong)*local_28) & 8) != 0; } if (!bVar1) break; local_28 = local_28 + 1; } if (*local_28 == param_2) { *local_28 = 0x20; local_28 = (byte *)strend(param_1); do { local_28 = local_28 + -1; bVar1 = false; if (*local_28 != 0) { bVar1 = (*(byte *)(*(long *)(charset_info + 0x40) + 1 + (ulong)*local_28) & 8) != 0; } } while (bVar1); if (*local_28 != param_3) { return 1; } *local_28 = 0; } return 0; }
8,224
test_gtid
eloqsql/libmariadb/unittest/libmariadb/connection.c
static int test_gtid(MYSQL *mysql) { int rc; const char *data; size_t len; if (is_mariadb) return SKIP; // https://jira.mariadb.org/browse/XPT-182 SKIP_XPAND; rc= mysql_query(mysql, "SET @@session.session_track_state_change=1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "SET @@session.session_track_gtids=OWN_GTID"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "BEGIN"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql); if (!mysql_session_track_get_first(mysql, SESSION_TRACK_GTIDS, &data, &len)) do { printf("# SESSION_TRACK_GTIDS: %*.*s\n", (int)len, (int)len, data); } while (!mysql_session_track_get_next(mysql, SESSION_TRACK_GTIDS, &data, &len)); rc= mysql_query(mysql, "CREATE TABLE t1 (a int)"); check_mysql_rc(rc, mysql); if (!mysql_session_track_get_first(mysql, SESSION_TRACK_GTIDS, &data, &len)) do { printf("# SESSION_TRACK_GTIDS: %*.*s\n", (int)len, (int)len, data); } while (!mysql_session_track_get_next(mysql, SESSION_TRACK_GTIDS, &data, &len)); rc= mysql_query(mysql, "COMMIT"); check_mysql_rc(rc, mysql); return OK; }
O3
c
test_gtid: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpb $0x0, 0x3c250(%rip) # 0x52681 jne 0x16708 movq %rdi, %rbx movq 0x3c0bf(%rip), %rdi # 0x52500 testq %rdi, %rdi je 0x1645f callq 0x22aa2 leaq 0x24fea(%rip), %rsi # 0x3b43c movq %rax, %rdi callq 0x13100 testq %rax, %rax jne 0x164cd leaq 0x24fdc(%rip), %rdi # 0x3b442 callq 0x135c0 testq %rax, %rax je 0x16483 leaq 0x25a6d(%rip), %rsi # 0x3bee4 movq %rax, %rdi callq 0x13670 testl %eax, %eax je 0x164cd leaq 0x25a60(%rip), %rsi # 0x3beea movq %rbx, %rdi callq 0x21299 testl %eax, %eax je 0x164e0 movl %eax, %r14d movq %rbx, %rdi callq 0x23312 movq %rax, %r15 movq %rbx, %rdi callq 0x232fd leaq 0x24c9a(%rip), %rdi # 0x3b14d leaq 0x250fb(%rip), %r8 # 0x3b5b5 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x758, %r9d # imm = 0x758 jmp 0x166fb leaq 0x259fd(%rip), %rdi # 0x3bed1 xorl %eax, %eax callq 0x1bb8f jmp 0x16708 leaq 0x25a2e(%rip), %rsi # 0x3bf15 movq %rbx, %rdi callq 0x21299 testl %eax, %eax je 0x1652a movl %eax, %r14d movq %rbx, %rdi callq 0x23312 movq %rax, %r15 movq %rbx, %rdi callq 0x232fd leaq 0x24c3d(%rip), %rdi # 0x3b14d leaq 0x2509e(%rip), %r8 # 0x3b5b5 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x75b, %r9d # imm = 0x75B jmp 0x166fb leaq 0x25a0f(%rip), %rsi # 0x3bf40 movq %rbx, %rdi callq 0x21299 testl %eax, %eax je 0x16574 movl %eax, %r14d movq %rbx, %rdi callq 0x23312 movq %rax, %r15 movq %rbx, %rdi callq 0x232fd leaq 0x24bf3(%rip), %rdi # 0x3b14d leaq 0x25054(%rip), %r8 # 0x3b5b5 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x75e, %r9d # imm = 0x75E jmp 0x166fb leaq 0x259cb(%rip), %rsi # 0x3bf46 movq %rbx, %rdi callq 0x21299 testl %eax, %eax je 0x165be movl %eax, %r14d movq %rbx, %rdi callq 0x23312 movq %rax, %r15 movq %rbx, %rdi callq 0x232fd leaq 0x24ba9(%rip), %rdi # 0x3b14d leaq 0x2500a(%rip), %r8 # 0x3b5b5 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x761, %r9d # imm = 0x761 jmp 0x166fb leaq -0x30(%rbp), %rdx leaq -0x28(%rbp), %rcx movq %rbx, %rdi movl $0x3, %esi callq 0x2211d testl %eax, %eax jne 0x16615 leaq 0x25980(%rip), %r14 # 0x3bf5e leaq -0x30(%rbp), %r15 leaq -0x28(%rbp), %r12 movl -0x28(%rbp), %ecx movq -0x30(%rbp), %r8 movl $0x1, %edi movq %r14, %rsi movl %ecx, %edx xorl %eax, %eax callq 0x13030 movq %rbx, %rdi movl $0x3, %esi movq %r15, %rdx movq %r12, %rcx callq 0x220cf testl %eax, %eax je 0x165e6 leaq 0x25960(%rip), %rsi # 0x3bf7c movq %rbx, %rdi callq 0x21299 testl %eax, %eax je 0x1665f movl %eax, %r14d movq %rbx, %rdi callq 0x23312 movq %rax, %r15 movq %rbx, %rdi callq 0x232fd leaq 0x24b08(%rip), %rdi # 0x3b14d leaq 0x24f69(%rip), %r8 # 0x3b5b5 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x769, %r9d # imm = 0x769 jmp 0x166fb leaq -0x30(%rbp), %rdx leaq -0x28(%rbp), %rcx movq %rbx, %rdi movl $0x3, %esi callq 0x2211d testl %eax, %eax jne 0x166b6 leaq 0x258df(%rip), %r14 # 0x3bf5e leaq -0x30(%rbp), %r15 leaq -0x28(%rbp), %r12 movl -0x28(%rbp), %ecx movq -0x30(%rbp), %r8 movl $0x1, %edi movq %r14, %rsi movl %ecx, %edx xorl %eax, %eax callq 0x13030 movq %rbx, %rdi movl $0x3, %esi movq %r15, %rdx movq %r12, %rcx callq 0x220cf testl %eax, %eax je 0x16687 leaq 0x258d7(%rip), %rsi # 0x3bf94 movq %rbx, %rdi callq 0x21299 testl %eax, %eax je 0x16718 movl %eax, %r14d movq %rbx, %rdi callq 0x23312 movq %rax, %r15 movq %rbx, %rdi callq 0x232fd leaq 0x24a67(%rip), %rdi # 0x3b14d leaq 0x24ec8(%rip), %r8 # 0x3b5b5 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x771, %r9d # imm = 0x771 xorl %eax, %eax callq 0x1bb8f movl $0x1, %r14d movl %r14d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq xorl %r14d, %r14d jmp 0x16708
test_gtid: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r14d, 0FFFFFFFFh cmp cs:is_mariadb, 0 jnz loc_16708 mov rbx, rdi mov rdi, cs:mysql_default test rdi, rdi jz short loc_1645F call mysql_get_server_info lea rsi, aXpand; "Xpand" mov rdi, rax call _strstr test rax, rax jnz short loc_164CD loc_1645F: lea rdi, aSrv; "srv" call _getenv test rax, rax jz short loc_16483 lea rsi, aTestDisabledWi_0+13h; "xpand" mov rdi, rax call _strcmp test eax, eax jz short loc_164CD loc_16483: lea rsi, aSetSessionSess; "SET @@session.session_track_state_chang"... mov rdi, rbx call mysql_query test eax, eax jz short loc_164E0 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 758h jmp loc_166FB loc_164CD: lea rdi, aTestDisabledWi_0; "test disabled with xpand" xor eax, eax call diag jmp loc_16708 loc_164E0: lea rsi, aSetSessionSess_0; "SET @@session.session_track_gtids=OWN_G"... mov rdi, rbx call mysql_query test eax, eax jz short loc_1652A mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 75Bh jmp loc_166FB loc_1652A: lea rsi, aBegin; "BEGIN" mov rdi, rbx call mysql_query test eax, eax jz short loc_16574 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 75Eh jmp loc_166FB loc_16574: lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1" mov rdi, rbx call mysql_query test eax, eax jz short loc_165BE mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 761h jmp loc_166FB loc_165BE: lea rdx, [rbp+var_30] lea rcx, [rbp+var_28] mov rdi, rbx mov esi, 3 call mysql_session_track_get_first test eax, eax jnz short loc_16615 lea r14, aSessionTrackGt; "# SESSION_TRACK_GTIDS: %*.*s\n" lea r15, [rbp+var_30] lea r12, [rbp+var_28] loc_165E6: mov ecx, [rbp+var_28] mov r8, [rbp+var_30] mov edi, 1 mov rsi, r14 mov edx, ecx xor eax, eax call ___printf_chk mov rdi, rbx mov esi, 3 mov rdx, r15 mov rcx, r12 call mysql_session_track_get_next test eax, eax jz short loc_165E6 loc_16615: lea rsi, aCreateTableT1A; "CREATE TABLE t1 (a int)" mov rdi, rbx call mysql_query test eax, eax jz short loc_1665F mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 769h jmp loc_166FB loc_1665F: lea rdx, [rbp+var_30] lea rcx, [rbp+var_28] mov rdi, rbx mov esi, 3 call mysql_session_track_get_first test eax, eax jnz short loc_166B6 lea r14, aSessionTrackGt; "# SESSION_TRACK_GTIDS: %*.*s\n" lea r15, [rbp+var_30] lea r12, [rbp+var_28] loc_16687: mov ecx, [rbp+var_28] mov r8, [rbp+var_30] mov edi, 1 mov rsi, r14 mov edx, ecx xor eax, eax call ___printf_chk mov rdi, rbx mov esi, 3 mov rdx, r15 mov rcx, r12 call mysql_session_track_get_next test eax, eax jz short loc_16687 loc_166B6: lea rsi, aCommit; "COMMIT" mov rdi, rbx call mysql_query test eax, eax jz short loc_16718 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 771h loc_166FB: xor eax, eax call diag mov r14d, 1 loc_16708: mov eax, r14d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_16718: xor r14d, r14d jmp short loc_16708
long long test_gtid(long long a1) { unsigned int v1; // r14d long long server_info; // rax char *v3; // rsi int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rax int v9; // eax int v10; // r14d int v11; // r15d int v12; // eax int v13; // esi int v14; // edx int v15; // ecx int v16; // r9d int v17; // eax int v18; // r14d int v19; // r15d int v20; // eax int v21; // eax int v22; // r14d int v23; // r15d int v24; // eax int v25; // eax int v26; // r14d int v27; // r15d int v28; // eax int v29; // eax int v30; // r14d int v31; // r15d int v32; // eax int v33; // eax int v34; // r14d int v35; // r15d int v36; // eax const char *v38; // [rsp+0h] [rbp-30h] BYREF int v39[10]; // [rsp+8h] [rbp-28h] BYREF v1 = -1; if ( !is_mariadb ) { if ( mysql_default && (server_info = mysql_get_server_info(mysql_default), v3 = "Xpand", strstr(server_info, "Xpand")) || (v8 = getenv("srv")) != 0 && (v3 = "xpand", !(unsigned int)strcmp(v8, "xpand")) ) { diag((unsigned int)"test disabled with xpand", (_DWORD)v3, v4, v5, v6, v7); } else { v9 = mysql_query(a1, "SET @@session.session_track_state_change=1"); if ( v9 ) { v10 = v9; v11 = mysql_error(a1); v12 = mysql_errno(a1); v13 = v10; v14 = v11; v15 = v12; v16 = 1880; } else { v17 = mysql_query(a1, "SET @@session.session_track_gtids=OWN_GTID"); if ( v17 ) { v18 = v17; v19 = mysql_error(a1); v20 = mysql_errno(a1); v13 = v18; v14 = v19; v15 = v20; v16 = 1883; } else { v21 = mysql_query(a1, "BEGIN"); if ( v21 ) { v22 = v21; v23 = mysql_error(a1); v24 = mysql_errno(a1); v13 = v22; v14 = v23; v15 = v24; v16 = 1886; } else { v25 = mysql_query(a1, "DROP TABLE IF EXISTS t1"); if ( v25 ) { v26 = v25; v27 = mysql_error(a1); v28 = mysql_errno(a1); v13 = v26; v14 = v27; v15 = v28; v16 = 1889; } else { if ( !(unsigned int)mysql_session_track_get_first(a1, 3LL, &v38, v39) ) { do __printf_chk(1LL, "# SESSION_TRACK_GTIDS: %*.*s\n", v39[0], v39[0], v38); while ( !(unsigned int)mysql_session_track_get_next(a1, 3LL, &v38, v39) ); } v29 = mysql_query(a1, "CREATE TABLE t1 (a int)"); if ( v29 ) { v30 = v29; v31 = mysql_error(a1); v32 = mysql_errno(a1); v13 = v30; v14 = v31; v15 = v32; v16 = 1897; } else { if ( !(unsigned int)mysql_session_track_get_first(a1, 3LL, &v38, v39) ) { do __printf_chk(1LL, "# SESSION_TRACK_GTIDS: %*.*s\n", v39[0], v39[0], v38); while ( !(unsigned int)mysql_session_track_get_next(a1, 3LL, &v38, v39) ); } v33 = mysql_query(a1, "COMMIT"); if ( !v33 ) return 0; v34 = v33; v35 = mysql_error(a1); v36 = mysql_errno(a1); v13 = v34; v14 = v35; v15 = v36; v16 = 1905; } } } } } diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v13, v14, v15, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c", v16); return 1; } } return v1; }
test_gtid: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14D,0xffffffff CMP byte ptr [0x00152681],0x0 JNZ 0x00116708 MOV RBX,RDI MOV RDI,qword ptr [0x00152500] TEST RDI,RDI JZ 0x0011645f CALL 0x00122aa2 LEA RSI,[0x13b43c] MOV RDI,RAX CALL 0x00113100 TEST RAX,RAX JNZ 0x001164cd LAB_0011645f: LEA RDI,[0x13b442] CALL 0x001135c0 TEST RAX,RAX JZ 0x00116483 LEA RSI,[0x13bee4] MOV RDI,RAX CALL 0x00113670 TEST EAX,EAX JZ 0x001164cd LAB_00116483: LEA RSI,[0x13beea] MOV RDI,RBX CALL 0x00121299 TEST EAX,EAX JZ 0x001164e0 MOV R14D,EAX MOV RDI,RBX CALL 0x00123312 MOV R15,RAX MOV RDI,RBX CALL 0x001232fd LEA RDI,[0x13b14d] LEA R8,[0x13b5b5] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x758 JMP 0x001166fb LAB_001164cd: LEA RDI,[0x13bed1] XOR EAX,EAX CALL 0x0011bb8f JMP 0x00116708 LAB_001164e0: LEA RSI,[0x13bf15] MOV RDI,RBX CALL 0x00121299 TEST EAX,EAX JZ 0x0011652a MOV R14D,EAX MOV RDI,RBX CALL 0x00123312 MOV R15,RAX MOV RDI,RBX CALL 0x001232fd LEA RDI,[0x13b14d] LEA R8,[0x13b5b5] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x75b JMP 0x001166fb LAB_0011652a: LEA RSI,[0x13bf40] MOV RDI,RBX CALL 0x00121299 TEST EAX,EAX JZ 0x00116574 MOV R14D,EAX MOV RDI,RBX CALL 0x00123312 MOV R15,RAX MOV RDI,RBX CALL 0x001232fd LEA RDI,[0x13b14d] LEA R8,[0x13b5b5] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x75e JMP 0x001166fb LAB_00116574: LEA RSI,[0x13bf46] MOV RDI,RBX CALL 0x00121299 TEST EAX,EAX JZ 0x001165be MOV R14D,EAX MOV RDI,RBX CALL 0x00123312 MOV R15,RAX MOV RDI,RBX CALL 0x001232fd LEA RDI,[0x13b14d] LEA R8,[0x13b5b5] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x761 JMP 0x001166fb LAB_001165be: LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x28] MOV RDI,RBX MOV ESI,0x3 CALL 0x0012211d TEST EAX,EAX JNZ 0x00116615 LEA R14,[0x13bf5e] LEA R15,[RBP + -0x30] LEA R12,[RBP + -0x28] LAB_001165e6: MOV ECX,dword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV EDI,0x1 MOV RSI,R14 MOV EDX,ECX XOR EAX,EAX CALL 0x00113030 MOV RDI,RBX MOV ESI,0x3 MOV RDX,R15 MOV RCX,R12 CALL 0x001220cf TEST EAX,EAX JZ 0x001165e6 LAB_00116615: LEA RSI,[0x13bf7c] MOV RDI,RBX CALL 0x00121299 TEST EAX,EAX JZ 0x0011665f MOV R14D,EAX MOV RDI,RBX CALL 0x00123312 MOV R15,RAX MOV RDI,RBX CALL 0x001232fd LEA RDI,[0x13b14d] LEA R8,[0x13b5b5] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x769 JMP 0x001166fb LAB_0011665f: LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x28] MOV RDI,RBX MOV ESI,0x3 CALL 0x0012211d TEST EAX,EAX JNZ 0x001166b6 LEA R14,[0x13bf5e] LEA R15,[RBP + -0x30] LEA R12,[RBP + -0x28] LAB_00116687: MOV ECX,dword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV EDI,0x1 MOV RSI,R14 MOV EDX,ECX XOR EAX,EAX CALL 0x00113030 MOV RDI,RBX MOV ESI,0x3 MOV RDX,R15 MOV RCX,R12 CALL 0x001220cf TEST EAX,EAX JZ 0x00116687 LAB_001166b6: LEA RSI,[0x13bf94] MOV RDI,RBX CALL 0x00121299 TEST EAX,EAX JZ 0x00116718 MOV R14D,EAX MOV RDI,RBX CALL 0x00123312 MOV R15,RAX MOV RDI,RBX CALL 0x001232fd LEA RDI,[0x13b14d] LEA R8,[0x13b5b5] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x771 LAB_001166fb: XOR EAX,EAX CALL 0x0011bb8f MOV R14D,0x1 LAB_00116708: MOV EAX,R14D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00116718: XOR R14D,R14D JMP 0x00116708
int8 test_gtid(int8 param_1) { int iVar1; int4 uVar2; char *pcVar3; int8 uVar4; int8 uVar5; int8 local_38; int4 local_30 [2]; if (is_mariadb != '\0') { return 0xffffffff; } if (mysql_default != 0) { pcVar3 = (char *)mysql_get_server_info(); pcVar3 = strstr(pcVar3,"Xpand"); if (pcVar3 != (char *)0x0) goto LAB_001164cd; } pcVar3 = getenv("srv"); if ((pcVar3 == (char *)0x0) || (iVar1 = strcmp(pcVar3,"xpand"), iVar1 != 0)) { iVar1 = mysql_query(param_1,"SET @@session.session_track_state_change=1"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"SET @@session.session_track_gtids=OWN_GTID"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"BEGIN"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS t1"); if (iVar1 == 0) { iVar1 = mysql_session_track_get_first(param_1,3,&local_38,local_30); if (iVar1 == 0) { do { __printf_chk(1,"# SESSION_TRACK_GTIDS: %*.*s\n",local_30[0],local_30[0],local_38); iVar1 = mysql_session_track_get_next(param_1,3,&local_38,local_30); } while (iVar1 == 0); } iVar1 = mysql_query(param_1,"CREATE TABLE t1 (a int)"); if (iVar1 == 0) { iVar1 = mysql_session_track_get_first(param_1,3,&local_38,local_30); if (iVar1 == 0) { do { __printf_chk(1,"# SESSION_TRACK_GTIDS: %*.*s\n",local_30[0],local_30[0],local_38); iVar1 = mysql_session_track_get_next(param_1,3,&local_38,local_30); } while (iVar1 == 0); } iVar1 = mysql_query(param_1,"COMMIT"); if (iVar1 == 0) { return 0; } uVar4 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x771; } else { uVar4 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x769; } } else { uVar4 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x761; } } else { uVar4 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x75e; } } else { uVar4 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x75b; } } else { uVar4 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x758; } diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c", uVar5); return 1; } LAB_001164cd: diag("test disabled with xpand"); return 0xffffffff; }
8,225
JS_GetOwnPropertyInternal
bluesky950520[P]quickjs/quickjs.c
static int JS_GetOwnPropertyInternal(JSContext *ctx, JSPropertyDescriptor *desc, JSObject *p, JSAtom prop) { JSShapeProperty *prs; JSProperty *pr; retry: prs = find_own_property(&pr, p, prop); if (prs) { if (desc) { desc->flags = prs->flags & JS_PROP_C_W_E; desc->getter = JS_UNDEFINED; desc->setter = JS_UNDEFINED; desc->value = JS_UNDEFINED; if (unlikely(prs->flags & JS_PROP_TMASK)) { if ((prs->flags & JS_PROP_TMASK) == JS_PROP_GETSET) { desc->flags |= JS_PROP_GETSET; if (pr->u.getset.getter) desc->getter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.getter)); if (pr->u.getset.setter) desc->setter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.setter)); } else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF) { JSValue val = *pr->u.var_ref->pvalue; if (unlikely(JS_IsUninitialized(val))) { JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } desc->value = js_dup(val); } else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) { /* Instantiate property and retry */ if (JS_AutoInitProperty(ctx, p, prop, pr, prs)) return -1; goto retry; } } else { desc->value = js_dup(pr->u.value); } } else { /* for consistency, send the exception even if desc is NULL */ if (unlikely((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF)) { if (unlikely(JS_IsUninitialized(*pr->u.var_ref->pvalue))) { JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } } else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) { /* nothing to do: delay instantiation until actual value and/or attributes are read */ } } return TRUE; } if (p->is_exotic) { if (p->fast_array) { /* specific case for fast arrays */ if (__JS_AtomIsTaggedInt(prop)) { uint32_t idx; idx = __JS_AtomToUInt32(prop); if (idx < p->u.array.count) { if (desc) { desc->flags = JS_PROP_WRITABLE | JS_PROP_ENUMERABLE | JS_PROP_CONFIGURABLE; desc->getter = JS_UNDEFINED; desc->setter = JS_UNDEFINED; desc->value = JS_GetPropertyUint32(ctx, JS_MKPTR(JS_TAG_OBJECT, p), idx); } return TRUE; } } } else { const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic; if (em && em->get_own_property) { return em->get_own_property(ctx, desc, JS_MKPTR(JS_TAG_OBJECT, p), prop); } } } return FALSE; }
O1
c
JS_GetOwnPropertyInternal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 xorl %r12d, %r12d movl $0x3, %r13d movl $0x3ffffff, %esi # imm = 0x3FFFFFF movq 0x18(%r15), %rax movl 0x20(%rax), %ecx andl %ebp, %ecx notq %rcx movl (%rax,%rcx,4), %edx testl %edx, %edx je 0x23c45 addq $0x40, %rax movl %edx, %ecx leaq (%rax,%rcx,8), %r8 addq $-0x8, %r8 cmpl %ebp, 0x4(%r8) je 0x23c38 movl (%r8), %edx movl $0x0, %ecx movl $0x0, %r8d andl %esi, %edx jne 0x23c14 jmp 0x23c4a decq %rcx shlq $0x4, %rcx addq 0x20(%r15), %rcx jmp 0x23c4a xorl %ecx, %ecx xorl %r8d, %r8d testq %r8, %r8 je 0x23cf1 movl (%r8), %eax testq %rbx, %rbx je 0x23d51 shrl $0x1a, %eax andl $0x7, %eax movl %eax, (%rbx) movl %r12d, 0x18(%rbx) movq %r13, 0x20(%rbx) movl %r12d, 0x28(%rbx) movq %r13, 0x30(%rbx) movl %r12d, 0x8(%rbx) movq %r13, 0x10(%rbx) movl (%r8), %edx shrl $0x1e, %edx je 0x23cbb cmpl $0x1, %edx je 0x23deb cmpl $0x2, %edx je 0x23e26 movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x26292 testl %eax, %eax movl $0x3ffffff, %esi # imm = 0x3FFFFFF je 0x23bfd movl $0xffffffff, %r12d # imm = 0xFFFFFFFF jmp 0x23cdf movq (%rcx), %rax movq 0x8(%rcx), %rcx movq %rax, (%rsp) cmpl $-0x9, %ecx jb 0x23cd1 movq (%rsp), %rdx incl (%rdx) movq %rax, 0x8(%rbx) movq %rcx, 0x10(%rbx) movl $0x1, %r12d movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb 0x5(%r15), %al testb $0x4, %al je 0x23de3 testb $0x8, %al jne 0x23d80 movq 0x18(%r14), %rax movq 0x80(%rax), %rax movzwl 0x6(%r15), %ecx leaq (%rcx,%rcx,4), %rcx movq 0x20(%rax,%rcx,8), %rcx movb $0x1, %al testq %rcx, %rcx je 0x23ddb movq (%rcx), %r9 testq %r9, %r9 je 0x23ddb movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq $-0x1, %rcx movl %ebp, %r8d callq *%r9 movl %eax, %r12d xorl %eax, %eax jmp 0x23ddb andl $0xc0000000, %eax # imm = 0xC0000000 negl %eax jno 0x23cd9 movq (%rcx), %rax movq 0x18(%rax), %rax cmpl $0x4, 0x8(%rax) jne 0x23cd9 movl 0x4(%r8), %esi movq %r14, %rdi callq 0x3d5ee jmp 0x23cb3 testl %ebp, %ebp jns 0x23de3 andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF cmpl 0x40(%r15), %ebp jae 0x23de3 movl $0x1, %r12d testq %rbx, %rbx je 0x23cdf movl $0x7, (%rbx) xorl %eax, %eax movl %eax, 0x18(%rbx) movl $0x3, %ecx movq %rcx, 0x20(%rbx) movl %eax, 0x28(%rbx) movq %rcx, 0x30(%rbx) movl %ebp, %ecx movq %r14, %rdi movq %r15, %rsi movq $-0x1, %rdx callq 0x241b4 movq %rax, 0x8(%rbx) movq %rdx, 0x10(%rbx) jmp 0x23cdf testb %al, %al je 0x23cdf xorl %r12d, %r12d jmp 0x23cdf orl $0x10, %eax movl %eax, (%rbx) movq (%rcx), %rax testq %rax, %rax je 0x23e06 incl (%rax) movq %rax, 0x18(%rbx) movq $-0x1, 0x20(%rbx) movq 0x8(%rcx), %rax testq %rax, %rax je 0x23cd9 incl (%rax) movq %rax, 0x28(%rbx) movq $-0x1, 0x30(%rbx) jmp 0x23cd9 movq (%rcx), %rax movq 0x18(%rax), %rcx movq 0x8(%rcx), %rax movl %eax, %r15d cmpq $0x4, %r15 je 0x23e69 movq (%rcx), %rcx movq %rcx, (%rsp) cmpl $-0x9, %eax jb 0x23e4c movq (%rsp), %rdx incl (%rdx) movq %rcx, 0x8(%rbx) movq %rax, 0x10(%rbx) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpl $0x4, %r15d jne 0x23cd9 jmp 0x23cdf movl 0x4(%r8), %esi movq %r14, %rdi callq 0x3d5ee jmp 0x23e54
JS_GetOwnPropertyInternal: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov r15, rdx mov rbx, rsi mov r14, rdi xor r12d, r12d mov r13d, 3 mov esi, 3FFFFFFh loc_23BFD: mov rax, [r15+18h] mov ecx, [rax+20h] and ecx, ebp not rcx mov edx, [rax+rcx*4] test edx, edx jz short loc_23C45 add rax, 40h ; '@' loc_23C14: mov ecx, edx lea r8, [rax+rcx*8] add r8, 0FFFFFFFFFFFFFFF8h cmp [r8+4], ebp jz short loc_23C38 mov edx, [r8] mov ecx, 0 mov r8d, 0 and edx, esi jnz short loc_23C14 jmp short loc_23C4A loc_23C38: dec rcx shl rcx, 4 add rcx, [r15+20h] jmp short loc_23C4A loc_23C45: xor ecx, ecx xor r8d, r8d loc_23C4A: test r8, r8 jz loc_23CF1 mov eax, [r8] test rbx, rbx jz loc_23D51 shr eax, 1Ah and eax, 7 mov [rbx], eax mov [rbx+18h], r12d mov [rbx+20h], r13 mov [rbx+28h], r12d mov [rbx+30h], r13 mov [rbx+8], r12d mov [rbx+10h], r13 mov edx, [r8] shr edx, 1Eh jz short loc_23CBB cmp edx, 1 jz loc_23DEB cmp edx, 2 jz loc_23E26 mov rdi, r14 mov rsi, r15 mov edx, ebp call JS_AutoInitProperty test eax, eax mov esi, 3FFFFFFh jz loc_23BFD loc_23CB3: mov r12d, 0FFFFFFFFh jmp short loc_23CDF loc_23CBB: mov rax, [rcx] mov rcx, [rcx+8] mov [rsp+38h+var_38], rax cmp ecx, 0FFFFFFF7h jb short loc_23CD1 mov rdx, [rsp+38h+var_38] inc dword ptr [rdx] loc_23CD1: mov [rbx+8], rax mov [rbx+10h], rcx loc_23CD9: mov r12d, 1 loc_23CDF: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_23CF1: mov al, [r15+5] test al, 4 jz loc_23DE3 test al, 8 jnz short loc_23D80 mov rax, [r14+18h] mov rax, [rax+80h] movzx ecx, word ptr [r15+6] lea rcx, [rcx+rcx*4] mov rcx, [rax+rcx*8+20h] mov al, 1 test rcx, rcx jz loc_23DDB mov r9, [rcx] test r9, r9 jz loc_23DDB mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, 0FFFFFFFFFFFFFFFFh mov r8d, ebp call r9 mov r12d, eax xor eax, eax jmp loc_23DDB loc_23D51: and eax, 0C0000000h neg eax jno loc_23CD9 mov rax, [rcx] mov rax, [rax+18h] cmp dword ptr [rax+8], 4 jnz loc_23CD9 mov esi, [r8+4] mov rdi, r14 call JS_ThrowReferenceErrorUninitialized jmp loc_23CB3 loc_23D80: test ebp, ebp jns short loc_23DE3 and ebp, 7FFFFFFFh cmp ebp, [r15+40h] jnb short loc_23DE3 mov r12d, 1 test rbx, rbx jz loc_23CDF mov dword ptr [rbx], 7 xor eax, eax mov [rbx+18h], eax mov ecx, 3 mov [rbx+20h], rcx mov [rbx+28h], eax mov [rbx+30h], rcx mov ecx, ebp mov rdi, r14 mov rsi, r15 mov rdx, 0FFFFFFFFFFFFFFFFh call JS_GetPropertyInt64 mov [rbx+8], rax mov [rbx+10h], rdx jmp loc_23CDF loc_23DDB: test al, al jz loc_23CDF loc_23DE3: xor r12d, r12d jmp loc_23CDF loc_23DEB: or eax, 10h mov [rbx], eax mov rax, [rcx] test rax, rax jz short loc_23E06 inc dword ptr [rax] mov [rbx+18h], rax mov qword ptr [rbx+20h], 0FFFFFFFFFFFFFFFFh loc_23E06: mov rax, [rcx+8] test rax, rax jz loc_23CD9 inc dword ptr [rax] mov [rbx+28h], rax mov qword ptr [rbx+30h], 0FFFFFFFFFFFFFFFFh jmp loc_23CD9 loc_23E26: mov rax, [rcx] mov rcx, [rax+18h] mov rax, [rcx+8] mov r15d, eax cmp r15, 4 jz short loc_23E69 mov rcx, [rcx] mov [rsp+38h+var_38], rcx cmp eax, 0FFFFFFF7h jb short loc_23E4C mov rdx, [rsp+38h+var_38] inc dword ptr [rdx] loc_23E4C: mov [rbx+8], rcx mov [rbx+10h], rax loc_23E54: mov r12d, 0FFFFFFFFh cmp r15d, 4 jnz loc_23CD9 jmp loc_23CDF loc_23E69: mov esi, [r8+4] mov rdi, r14 call JS_ThrowReferenceErrorUninitialized jmp short loc_23E54
long long JS_GetOwnPropertyInternal(long long a1, long long a2, long long a3, int a4) { unsigned int v6; // r12d long long v7; // rax unsigned int v8; // edx long long v9; // rax unsigned int *v10; // r8 unsigned int v11; // edx _QWORD *v12; // rcx unsigned int v13; // eax int v14; // eax unsigned int v15; // edx _DWORD *v16; // rax long long v17; // rcx char v19; // al long long ( **v20)(long long, long long, long long, long long, _QWORD); // rcx char v21; // al long long v22; // rdx _DWORD *v23; // rax _DWORD *v24; // rax long long v25; // rcx long long v26; // rax int v27; // r15d _DWORD *v28; // rcx v6 = 0; while ( 1 ) { v7 = *(_QWORD *)(a3 + 24); v8 = *(_DWORD *)(v7 + 4 * ~(unsigned long long)((unsigned int)a4 & *(_DWORD *)(v7 + 32))); if ( v8 ) { v9 = v7 + 64; while ( 1 ) { v10 = (unsigned int *)(v9 + 8LL * v8 - 8); if ( v10[1] == a4 ) break; v11 = *v10; v12 = 0LL; v10 = 0LL; v8 = v11 & 0x3FFFFFF; if ( !v8 ) goto LABEL_9; } v12 = (_QWORD *)(*(_QWORD *)(a3 + 32) + 16 * (v8 - 1LL)); } else { v12 = 0LL; v10 = 0LL; } LABEL_9: if ( !v10 ) break; v13 = *v10; if ( !a2 ) { if ( __OFSUB__(-(v13 & 0xC0000000), 1) && *(_DWORD *)(*(_QWORD *)(*v12 + 24LL) + 8LL) == 4 ) { JS_ThrowReferenceErrorUninitialized(a1, v10[1]); return (unsigned int)-1; } return 1; } v14 = (v13 >> 26) & 7; *(_DWORD *)a2 = v14; *(_DWORD *)(a2 + 24) = 0; *(_QWORD *)(a2 + 32) = 3LL; *(_DWORD *)(a2 + 40) = 0; *(_QWORD *)(a2 + 48) = 3LL; *(_DWORD *)(a2 + 8) = 0; *(_QWORD *)(a2 + 16) = 3LL; v15 = *v10 >> 30; switch ( v15 ) { case 0u: v16 = (_DWORD *)*v12; v17 = v12[1]; if ( (unsigned int)v17 >= 0xFFFFFFF7 ) ++*v16; *(_QWORD *)(a2 + 8) = v16; *(_QWORD *)(a2 + 16) = v17; return 1; case 1u: *(_DWORD *)a2 = v14 | 0x10; v23 = (_DWORD *)*v12; if ( *v12 ) { ++*v23; *(_QWORD *)(a2 + 24) = v23; *(_QWORD *)(a2 + 32) = -1LL; } v24 = (_DWORD *)v12[1]; if ( v24 ) { ++*v24; *(_QWORD *)(a2 + 40) = v24; *(_QWORD *)(a2 + 48) = -1LL; } return 1; case 2u: v25 = *(_QWORD *)(*v12 + 24LL); v26 = *(_QWORD *)(v25 + 8); v27 = v26; if ( (unsigned int)v26 == 4LL ) { JS_ThrowReferenceErrorUninitialized(a1, v10[1]); } else { v28 = *(_DWORD **)v25; if ( (unsigned int)v26 >= 0xFFFFFFF7 ) ++*v28; *(_QWORD *)(a2 + 8) = v28; *(_QWORD *)(a2 + 16) = v26; } v6 = -1; if ( v27 == 4 ) return v6; return 1; } if ( (unsigned int)JS_AutoInitProperty(a1, a3, (unsigned int)a4, v12) ) return (unsigned int)-1; } v19 = *(_BYTE *)(a3 + 5); if ( (v19 & 4) == 0 ) return 0; if ( (v19 & 8) != 0 ) { if ( a4 < 0 && (a4 & 0x7FFFFFFFu) < *(_DWORD *)(a3 + 64) ) { v6 = 1; if ( a2 ) { *(_DWORD *)a2 = 7; *(_DWORD *)(a2 + 24) = 0; *(_QWORD *)(a2 + 32) = 3LL; *(_DWORD *)(a2 + 40) = 0; *(_QWORD *)(a2 + 48) = 3LL; *(_QWORD *)(a2 + 8) = JS_GetPropertyInt64(a1, a3, -1LL); *(_QWORD *)(a2 + 16) = v22; } return v6; } return 0; } v20 = *(long long ( ***)(long long, long long, long long, long long, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * *(unsigned __int16 *)(a3 + 6) + 32); v21 = 1; if ( v20 && *v20 ) { v6 = (*v20)(a1, a2, a3, -1LL, (unsigned int)a4); v21 = 0; } if ( v21 ) return 0; return v6; }
JS_GetOwnPropertyInternal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV R15,RDX MOV RBX,RSI MOV R14,RDI XOR R12D,R12D MOV R13D,0x3 MOV ESI,0x3ffffff LAB_00123bfd: MOV RAX,qword ptr [R15 + 0x18] MOV ECX,dword ptr [RAX + 0x20] AND ECX,EBP NOT RCX MOV EDX,dword ptr [RAX + RCX*0x4] TEST EDX,EDX JZ 0x00123c45 ADD RAX,0x40 LAB_00123c14: MOV ECX,EDX LEA R8,[RAX + RCX*0x8] ADD R8,-0x8 CMP dword ptr [R8 + 0x4],EBP JZ 0x00123c38 MOV EDX,dword ptr [R8] MOV ECX,0x0 MOV R8D,0x0 AND EDX,ESI JNZ 0x00123c14 JMP 0x00123c4a LAB_00123c38: DEC RCX SHL RCX,0x4 ADD RCX,qword ptr [R15 + 0x20] JMP 0x00123c4a LAB_00123c45: XOR ECX,ECX XOR R8D,R8D LAB_00123c4a: TEST R8,R8 JZ 0x00123cf1 MOV EAX,dword ptr [R8] TEST RBX,RBX JZ 0x00123d51 SHR EAX,0x1a AND EAX,0x7 MOV dword ptr [RBX],EAX MOV dword ptr [RBX + 0x18],R12D MOV qword ptr [RBX + 0x20],R13 MOV dword ptr [RBX + 0x28],R12D MOV qword ptr [RBX + 0x30],R13 MOV dword ptr [RBX + 0x8],R12D MOV qword ptr [RBX + 0x10],R13 MOV EDX,dword ptr [R8] SHR EDX,0x1e JZ 0x00123cbb CMP EDX,0x1 JZ 0x00123deb CMP EDX,0x2 JZ 0x00123e26 MOV RDI,R14 MOV RSI,R15 MOV EDX,EBP CALL 0x00126292 TEST EAX,EAX MOV ESI,0x3ffffff JZ 0x00123bfd LAB_00123cb3: MOV R12D,0xffffffff JMP 0x00123cdf LAB_00123cbb: MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RSP],RAX CMP ECX,-0x9 JC 0x00123cd1 MOV RDX,qword ptr [RSP] INC dword ptr [RDX] LAB_00123cd1: MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RBX + 0x10],RCX LAB_00123cd9: MOV R12D,0x1 LAB_00123cdf: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00123cf1: MOV AL,byte ptr [R15 + 0x5] TEST AL,0x4 JZ 0x00123de3 TEST AL,0x8 JNZ 0x00123d80 MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x80] MOVZX ECX,word ptr [R15 + 0x6] LEA RCX,[RCX + RCX*0x4] MOV RCX,qword ptr [RAX + RCX*0x8 + 0x20] MOV AL,0x1 TEST RCX,RCX JZ 0x00123ddb MOV R9,qword ptr [RCX] TEST R9,R9 JZ 0x00123ddb MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,-0x1 MOV R8D,EBP CALL R9 MOV R12D,EAX XOR EAX,EAX JMP 0x00123ddb LAB_00123d51: AND EAX,0xc0000000 NEG EAX JNO 0x00123cd9 MOV RAX,qword ptr [RCX] MOV RAX,qword ptr [RAX + 0x18] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x00123cd9 MOV ESI,dword ptr [R8 + 0x4] MOV RDI,R14 CALL 0x0013d5ee JMP 0x00123cb3 LAB_00123d80: TEST EBP,EBP JNS 0x00123de3 AND EBP,0x7fffffff CMP EBP,dword ptr [R15 + 0x40] JNC 0x00123de3 MOV R12D,0x1 TEST RBX,RBX JZ 0x00123cdf MOV dword ptr [RBX],0x7 XOR EAX,EAX MOV dword ptr [RBX + 0x18],EAX MOV ECX,0x3 MOV qword ptr [RBX + 0x20],RCX MOV dword ptr [RBX + 0x28],EAX MOV qword ptr [RBX + 0x30],RCX MOV ECX,EBP MOV RDI,R14 MOV RSI,R15 MOV RDX,-0x1 CALL 0x001241b4 MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RBX + 0x10],RDX JMP 0x00123cdf LAB_00123ddb: TEST AL,AL JZ 0x00123cdf LAB_00123de3: XOR R12D,R12D JMP 0x00123cdf LAB_00123deb: OR EAX,0x10 MOV dword ptr [RBX],EAX MOV RAX,qword ptr [RCX] TEST RAX,RAX JZ 0x00123e06 INC dword ptr [RAX] MOV qword ptr [RBX + 0x18],RAX MOV qword ptr [RBX + 0x20],-0x1 LAB_00123e06: MOV RAX,qword ptr [RCX + 0x8] TEST RAX,RAX JZ 0x00123cd9 INC dword ptr [RAX] MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],-0x1 JMP 0x00123cd9 LAB_00123e26: MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RCX + 0x8] MOV R15D,EAX CMP R15,0x4 JZ 0x00123e69 MOV RCX,qword ptr [RCX] MOV qword ptr [RSP],RCX CMP EAX,-0x9 JC 0x00123e4c MOV RDX,qword ptr [RSP] INC dword ptr [RDX] LAB_00123e4c: MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],RAX LAB_00123e54: MOV R12D,0xffffffff CMP R15D,0x4 JNZ 0x00123cd9 JMP 0x00123cdf LAB_00123e69: MOV ESI,dword ptr [R8 + 0x4] MOV RDI,R14 CALL 0x0013d5ee JMP 0x00123e54
/* WARNING: Removing unreachable block (ram,0x00123d5e) */ /* WARNING: Removing unreachable block (ram,0x00123d6f) */ int4 JS_GetOwnPropertyInternal(long param_1,uint *param_2,long param_3,uint param_4) { long lVar1; long lVar2; int8 *puVar3; code *pcVar4; ulong uVar5; int *piVar6; bool bVar7; int iVar8; int4 uVar9; long *plVar10; uint uVar11; uint uVar12; uint *puVar13; int1 auVar14 [16]; do { lVar2 = *(long *)(param_3 + 0x18); uVar11 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_4) * 4); if (uVar11 == 0) { plVar10 = (long *)0x0; puVar13 = (uint *)0x0; } else { do { lVar1 = lVar2 + 0x40 + (ulong)uVar11 * 8; puVar13 = (uint *)(lVar1 + -8); if (*(uint *)(lVar1 + -4) == param_4) { plVar10 = (long *)(((ulong)uVar11 - 1) * 0x10 + *(long *)(param_3 + 0x20)); break; } uVar11 = *puVar13; plVar10 = (long *)0x0; puVar13 = (uint *)0x0; uVar11 = uVar11 & 0x3ffffff; } while (uVar11 != 0); } if (puVar13 == (uint *)0x0) { if ((*(byte *)(param_3 + 5) & 4) != 0) { if ((*(byte *)(param_3 + 5) & 8) == 0) { puVar3 = *(int8 **) (*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)*(ushort *)(param_3 + 6) * 0x28); bVar7 = true; uVar9 = 0; if ((puVar3 != (int8 *)0x0) && (pcVar4 = (code *)*puVar3, uVar9 = 0, pcVar4 != (code *)0x0)) { uVar9 = (*pcVar4)(param_1,param_2,param_3,0xffffffffffffffff,param_4); bVar7 = false; } if (!bVar7) { return uVar9; } } else if (((int)param_4 < 0) && ((param_4 & 0x7fffffff) < *(uint *)(param_3 + 0x40))) { if (param_2 != (uint *)0x0) { *param_2 = 7; param_2[6] = 0; param_2[8] = 3; param_2[9] = 0; param_2[10] = 0; param_2[0xc] = 3; param_2[0xd] = 0; auVar14 = JS_GetPropertyInt64(param_1,param_3,0xffffffffffffffff,param_4 & 0x7fffffff); *(int1 (*) [16])(param_2 + 2) = auVar14; return 1; } return 1; } } return 0; } if (param_2 == (uint *)0x0) { return 1; } uVar11 = *puVar13 >> 0x1a & 7; *param_2 = uVar11; param_2[6] = 0; param_2[8] = 3; param_2[9] = 0; param_2[10] = 0; param_2[0xc] = 3; param_2[0xd] = 0; param_2[2] = 0; param_2[4] = 3; param_2[5] = 0; uVar12 = *puVar13 >> 0x1e; if (uVar12 == 0) { piVar6 = (int *)*plVar10; lVar2 = plVar10[1]; if (0xfffffff6 < (uint)lVar2) { *piVar6 = *piVar6 + 1; } *(int **)(param_2 + 2) = piVar6; *(long *)(param_2 + 4) = lVar2; return 1; } if (uVar12 == 1) { *param_2 = uVar11 | 0x10; piVar6 = (int *)*plVar10; if (piVar6 != (int *)0x0) { *piVar6 = *piVar6 + 1; *(int **)(param_2 + 6) = piVar6; param_2[8] = 0xffffffff; param_2[9] = 0xffffffff; } piVar6 = (int *)plVar10[1]; if (piVar6 == (int *)0x0) { return 1; } *piVar6 = *piVar6 + 1; *(int **)(param_2 + 10) = piVar6; param_2[0xc] = 0xffffffff; param_2[0xd] = 0xffffffff; return 1; } if (uVar12 == 2) { uVar5 = (*(int8 **)(*plVar10 + 0x18))[1]; if ((uVar5 & 0xffffffff) == 4) { JS_ThrowReferenceErrorUninitialized(param_1,puVar13[1]); } else { piVar6 = (int *)**(int8 **)(*plVar10 + 0x18); if (0xfffffff6 < (uint)uVar5) { *piVar6 = *piVar6 + 1; } *(int **)(param_2 + 2) = piVar6; *(ulong *)(param_2 + 4) = uVar5; } if ((uint)uVar5 != 4) { return 1; } return 0xffffffff; } iVar8 = JS_AutoInitProperty(param_1,param_3,param_4); if (iVar8 != 0) { return 0xffffffff; } } while( true ); }
8,226
JS_GetOwnPropertyInternal
bluesky950520[P]quickjs/quickjs.c
static int JS_GetOwnPropertyInternal(JSContext *ctx, JSPropertyDescriptor *desc, JSObject *p, JSAtom prop) { JSShapeProperty *prs; JSProperty *pr; retry: prs = find_own_property(&pr, p, prop); if (prs) { if (desc) { desc->flags = prs->flags & JS_PROP_C_W_E; desc->getter = JS_UNDEFINED; desc->setter = JS_UNDEFINED; desc->value = JS_UNDEFINED; if (unlikely(prs->flags & JS_PROP_TMASK)) { if ((prs->flags & JS_PROP_TMASK) == JS_PROP_GETSET) { desc->flags |= JS_PROP_GETSET; if (pr->u.getset.getter) desc->getter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.getter)); if (pr->u.getset.setter) desc->setter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.setter)); } else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF) { JSValue val = *pr->u.var_ref->pvalue; if (unlikely(JS_IsUninitialized(val))) { JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } desc->value = js_dup(val); } else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) { /* Instantiate property and retry */ if (JS_AutoInitProperty(ctx, p, prop, pr, prs)) return -1; goto retry; } } else { desc->value = js_dup(pr->u.value); } } else { /* for consistency, send the exception even if desc is NULL */ if (unlikely((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF)) { if (unlikely(JS_IsUninitialized(*pr->u.var_ref->pvalue))) { JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } } else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) { /* nothing to do: delay instantiation until actual value and/or attributes are read */ } } return TRUE; } if (p->is_exotic) { if (p->fast_array) { /* specific case for fast arrays */ if (__JS_AtomIsTaggedInt(prop)) { uint32_t idx; idx = __JS_AtomToUInt32(prop); if (idx < p->u.array.count) { if (desc) { desc->flags = JS_PROP_WRITABLE | JS_PROP_ENUMERABLE | JS_PROP_CONFIGURABLE; desc->getter = JS_UNDEFINED; desc->setter = JS_UNDEFINED; desc->value = JS_GetPropertyUint32(ctx, JS_MKPTR(JS_TAG_OBJECT, p), idx); } return TRUE; } } } else { const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic; if (em && em->get_own_property) { return em->get_own_property(ctx, desc, JS_MKPTR(JS_TAG_OBJECT, p), prop); } } } return FALSE; }
O2
c
JS_GetOwnPropertyInternal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 pushq $0x3 popq %r13 leaq 0x65993(%rip), %r12 # 0x83534 pushq $-0x1 popq %rsi movl $0x3ffffff, %edx # imm = 0x3FFFFFF movq 0x18(%r15), %rax movl 0x20(%rax), %ecx andl %ebp, %ecx notq %rcx movl (%rax,%rcx,4), %ecx addq $0x40, %rax testl %ecx, %ecx je 0x1dc6a movl %ecx, %ecx leaq (%rax,%rcx,8), %r8 addq $-0x8, %r8 cmpl %ebp, 0x4(%r8) je 0x1dbdb movl (%r8), %ecx andl %edx, %ecx jmp 0x1dbbc decq %rcx shlq $0x4, %rcx addq 0x20(%r15), %rcx movl (%r8), %edx testq %rbx, %rbx je 0x1dcc0 shrl $0x1a, %edx andl $0x7, %edx movl %edx, (%rbx) andl $0x0, 0x18(%rbx) movq %r13, 0x20(%rbx) andl $0x0, 0x28(%rbx) movq %r13, 0x30(%rbx) andl $0x0, 0x8(%rbx) movq %r13, 0x10(%rbx) movl (%r8), %eax shrl $0x1e, %eax movslq (%r12,%rax,4), %rax addq %r12, %rax jmpq *%rax movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x1fdb2 movl $0x3ffffff, %edx # imm = 0x3FFFFFF pushq $-0x1 popq %rsi testl %eax, %eax je 0x1dba9 movl %esi, %eax jmp 0x1dc5b movq (%rcx), %rax movq 0x8(%rcx), %rcx cmpl $-0x9, %ecx jb 0x1dc50 incl (%rax) movq %rax, 0x8(%rbx) movq %rcx, 0x10(%rbx) pushq $0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb 0x5(%r15), %cl xorl %eax, %eax testb $0x4, %cl je 0x1dc5b testb $0x8, %cl jne 0x1dced movq 0x18(%r14), %rcx movq 0x80(%rcx), %rcx movzwl 0x6(%r15), %edx imulq $0x28, %rdx, %rdx movq 0x20(%rcx,%rdx), %rcx testq %rcx, %rcx je 0x1dc5b movq (%rcx), %r9 testq %r9, %r9 je 0x1dc5b pushq $-0x1 popq %rcx movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movl %ebp, %r8d addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%r9 andl $0xc0000000, %edx # imm = 0xC0000000 pushq $0x1 popq %rax negl %edx jno 0x1dc5b movq (%rcx), %rcx movq 0x18(%rcx), %rcx cmpl $0x4, 0x8(%rcx) jne 0x1dc5b movl %esi, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x35ece movl %ebx, %eax jmp 0x1dc5b testl %ebp, %ebp jns 0x1dc5b testq %rbx, %rbx sete %dl andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF xorl %eax, %eax cmpl 0x40(%r15), %ebp setb %cl setae %sil orb %dl, %sil je 0x1dd1a movb %cl, %al jmp 0x1dc5b movl $0x7, (%rbx) andl $0x0, 0x18(%rbx) movq %r13, 0x20(%rbx) andl $0x0, 0x28(%rbx) movq %r13, 0x30(%rbx) movl %ebp, %ecx pushq $-0x1 popq %rdx movq %r14, %rdi movq %r15, %rsi callq 0x1e178 movq %rax, 0x8(%rbx) movq %rdx, 0x10(%rbx) jmp 0x1dc58 orl $0x10, %edx movl %edx, (%rbx) movq (%rcx), %rax testq %rax, %rax je 0x1dd65 incl (%rax) movq %rax, 0x18(%rbx) orq $-0x1, 0x20(%rbx) movq 0x8(%rcx), %rcx pushq $0x1 popq %rax testq %rcx, %rcx je 0x1dc5b incl (%rcx) movq %rcx, 0x28(%rbx) orq $-0x1, 0x30(%rbx) jmp 0x1dc5b movq (%rcx), %rax movq 0x18(%rax), %rcx movq 0x8(%rcx), %rax cmpl $0x4, %eax je 0x1ddac movq (%rcx), %rcx cmpl $-0x9, %eax jb 0x1dd9f incl (%rcx) movq %rcx, 0x8(%rbx) movq %rax, 0x10(%rbx) jmp 0x1dc58 movl %esi, %ebp movl 0x4(%r8), %esi movq %r14, %rdi callq 0x35ece movl %ebp, %eax jmp 0x1dc5b
JS_GetOwnPropertyInternal: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov r15, rdx mov rbx, rsi mov r14, rdi push 3 pop r13 lea r12, jpt_1DC1F push 0FFFFFFFFFFFFFFFFh pop rsi mov edx, 3FFFFFFh loc_1DBA9: mov rax, [r15+18h] mov ecx, [rax+20h] and ecx, ebp not rcx mov ecx, [rax+rcx*4] add rax, 40h ; '@' loc_1DBBC: test ecx, ecx jz loc_1DC6A mov ecx, ecx lea r8, [rax+rcx*8] add r8, 0FFFFFFFFFFFFFFF8h cmp [r8+4], ebp jz short loc_1DBDB mov ecx, [r8] and ecx, edx jmp short loc_1DBBC loc_1DBDB: dec rcx shl rcx, 4 add rcx, [r15+20h] mov edx, [r8] test rbx, rbx jz loc_1DCC0 shr edx, 1Ah and edx, 7 mov [rbx], edx and dword ptr [rbx+18h], 0 mov [rbx+20h], r13 and dword ptr [rbx+28h], 0 mov [rbx+30h], r13 and dword ptr [rbx+8], 0 mov [rbx+10h], r13 mov eax, [r8] shr eax, 1Eh movsxd rax, ds:(jpt_1DC1F - 83534h)[r12+rax*4]; switch 4 cases add rax, r12 jmp rax; switch jump loc_1DC21: mov rdi, r14; jumptable 000000000001DC1F case 3 mov rsi, r15 mov edx, ebp call JS_AutoInitProperty mov edx, 3FFFFFFh push 0FFFFFFFFFFFFFFFFh pop rsi test eax, eax jz loc_1DBA9 mov eax, esi jmp short loc_1DC5B loc_1DC42: mov rax, [rcx]; jumptable 000000000001DC1F case 0 mov rcx, [rcx+8] cmp ecx, 0FFFFFFF7h jb short loc_1DC50 inc dword ptr [rax] loc_1DC50: mov [rbx+8], rax mov [rbx+10h], rcx loc_1DC58: push 1 pop rax loc_1DC5B: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1DC6A: mov cl, [r15+5] xor eax, eax test cl, 4 jz short loc_1DC5B test cl, 8 jnz short loc_1DCED mov rcx, [r14+18h] mov rcx, [rcx+80h] movzx edx, word ptr [r15+6] imul rdx, 28h ; '(' mov rcx, [rcx+rdx+20h] test rcx, rcx jz short loc_1DC5B mov r9, [rcx] test r9, r9 jz short loc_1DC5B push 0FFFFFFFFFFFFFFFFh pop rcx mov rdi, r14 mov rsi, rbx mov rdx, r15 mov r8d, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp r9 loc_1DCC0: and edx, 0C0000000h push 1 pop rax neg edx jno short loc_1DC5B mov rcx, [rcx] mov rcx, [rcx+18h] cmp dword ptr [rcx+8], 4 jnz short loc_1DC5B mov ebx, esi mov rdi, r14 mov esi, ebp call JS_ThrowReferenceErrorUninitialized mov eax, ebx jmp loc_1DC5B loc_1DCED: test ebp, ebp jns loc_1DC5B test rbx, rbx setz dl and ebp, 7FFFFFFFh xor eax, eax cmp ebp, [r15+40h] setb cl setnb sil or sil, dl jz short loc_1DD1A mov al, cl jmp loc_1DC5B loc_1DD1A: mov dword ptr [rbx], 7 and dword ptr [rbx+18h], 0 mov [rbx+20h], r13 and dword ptr [rbx+28h], 0 mov [rbx+30h], r13 mov ecx, ebp push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, r14 mov rsi, r15 call JS_GetPropertyInt64 mov [rbx+8], rax mov [rbx+10h], rdx jmp loc_1DC58 loc_1DD4D: or edx, 10h; jumptable 000000000001DC1F case 1 mov [rbx], edx mov rax, [rcx] test rax, rax jz short loc_1DD65 inc dword ptr [rax] mov [rbx+18h], rax or qword ptr [rbx+20h], 0FFFFFFFFFFFFFFFFh loc_1DD65: mov rcx, [rcx+8] push 1 pop rax test rcx, rcx jz loc_1DC5B inc dword ptr [rcx] mov [rbx+28h], rcx or qword ptr [rbx+30h], 0FFFFFFFFFFFFFFFFh jmp loc_1DC5B loc_1DD85: mov rax, [rcx]; jumptable 000000000001DC1F case 2 mov rcx, [rax+18h] mov rax, [rcx+8] cmp eax, 4 jz short loc_1DDAC mov rcx, [rcx] cmp eax, 0FFFFFFF7h jb short loc_1DD9F inc dword ptr [rcx] loc_1DD9F: mov [rbx+8], rcx mov [rbx+10h], rax jmp loc_1DC58 loc_1DDAC: mov ebp, esi mov esi, [r8+4] mov rdi, r14 call JS_ThrowReferenceErrorUninitialized mov eax, ebp jmp loc_1DC5B
char JS_GetOwnPropertyInternal(long long a1, long long a2, long long a3, unsigned int a4, unsigned int *a5) { long long v7; // rax unsigned int v8; // ecx long long v9; // rax _QWORD *v10; // rcx unsigned int v11; // edx int v12; // edx char result; // al _DWORD *v14; // rax long long v15; // rcx char v16; // cl long long ( **v17)(long long, long long, long long, long long, _QWORD); // rcx unsigned int v18; // ebp long long v19; // rdx _DWORD *v20; // rax _DWORD *v21; // rcx long long v22; // rcx long long v23; // rax _DWORD *v24; // rcx LABEL_1: v7 = *(_QWORD *)(a3 + 24); v8 = *(_DWORD *)(v7 + 4 * ~(unsigned long long)(a4 & *(_DWORD *)(v7 + 32))); v9 = v7 + 64; while ( v8 ) { a5 = (unsigned int *)(v9 + 8LL * v8 - 8); if ( a5[1] == a4 ) { v10 = (_QWORD *)(*(_QWORD *)(a3 + 32) + 16 * (v8 - 1LL)); v11 = *a5; if ( a2 ) { v12 = (v11 >> 26) & 7; *(_DWORD *)a2 = v12; *(_DWORD *)(a2 + 24) = 0; *(_QWORD *)(a2 + 32) = 3LL; *(_DWORD *)(a2 + 40) = 0; *(_QWORD *)(a2 + 48) = 3LL; *(_DWORD *)(a2 + 8) = 0; *(_QWORD *)(a2 + 16) = 3LL; switch ( *a5 >> 30 ) { case 0u: v14 = (_DWORD *)*v10; v15 = v10[1]; if ( (unsigned int)v15 >= 0xFFFFFFF7 ) ++*v14; *(_QWORD *)(a2 + 8) = v14; *(_QWORD *)(a2 + 16) = v15; return 1; case 1u: *(_DWORD *)a2 = v12 | 0x10; v20 = (_DWORD *)*v10; if ( *v10 ) { ++*v20; *(_QWORD *)(a2 + 24) = v20; *(_QWORD *)(a2 + 32) = -1LL; } v21 = (_DWORD *)v10[1]; result = 1; if ( v21 ) { ++*v21; *(_QWORD *)(a2 + 40) = v21; *(_QWORD *)(a2 + 48) = -1LL; } return result; case 2u: v22 = *(_QWORD *)(*v10 + 24LL); v23 = *(_QWORD *)(v22 + 8); if ( (_DWORD)v23 == 4 ) { JS_ThrowReferenceErrorUninitialized(a1, a5[1]); return -1; } v24 = *(_DWORD **)v22; if ( (unsigned int)v23 >= 0xFFFFFFF7 ) ++*v24; *(_QWORD *)(a2 + 8) = v24; *(_QWORD *)(a2 + 16) = v23; break; case 3u: if ( !(unsigned int)JS_AutoInitProperty(a1, a3, a4, v10, a5) ) goto LABEL_1; return -1; } return 1; } result = 1; if ( __OFSUB__(-(v11 & 0xC0000000), 1) && *(_DWORD *)(*(_QWORD *)(*v10 + 24LL) + 8LL) == 4 ) { JS_ThrowReferenceErrorUninitialized(a1, a4); return -1; } return result; } v8 = *a5 & 0x3FFFFFF; } v16 = *(_BYTE *)(a3 + 5); result = 0; if ( (v16 & 4) != 0 ) { if ( (v16 & 8) != 0 ) { if ( (a4 & 0x80000000) != 0 ) { v18 = a4 & 0x7FFFFFFF; if ( a2 != 0 && v18 < *(_DWORD *)(a3 + 64) ) { *(_DWORD *)a2 = 7; *(_DWORD *)(a2 + 24) = 0; *(_QWORD *)(a2 + 32) = 3LL; *(_DWORD *)(a2 + 40) = 0; *(_QWORD *)(a2 + 48) = 3LL; *(_QWORD *)(a2 + 8) = JS_GetPropertyInt64(a1, a3, -1LL, v18, a5); *(_QWORD *)(a2 + 16) = v19; return 1; } return v18 < *(_DWORD *)(a3 + 64); } } else { v17 = *(long long ( ***)(long long, long long, long long, long long, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * *(unsigned __int16 *)(a3 + 6) + 32); if ( v17 && *v17 ) return (*v17)(a1, a2, a3, -1LL, a4); } } return result; }
JS_GetOwnPropertyInternal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV R15,RDX MOV RBX,RSI MOV R14,RDI PUSH 0x3 POP R13 LEA R12,[0x183534] PUSH -0x1 POP RSI MOV EDX,0x3ffffff MOV RAX,qword ptr [R15 + 0x18] MOV ECX,dword ptr [RAX + 0x20] AND ECX,EBP NOT RCX MOV ECX,dword ptr [RAX + RCX*0x4] ADD RAX,0x40 LAB_0011dbbc: TEST ECX,ECX JZ 0x0011dc6a MOV ECX,ECX LEA R8,[RAX + RCX*0x8] ADD R8,-0x8 CMP dword ptr [R8 + 0x4],EBP JZ 0x0011dbdb MOV ECX,dword ptr [R8] AND ECX,EDX JMP 0x0011dbbc LAB_0011dbdb: DEC RCX SHL RCX,0x4 ADD RCX,qword ptr [R15 + 0x20] MOV EDX,dword ptr [R8] TEST RBX,RBX JZ 0x0011dcc0 SHR EDX,0x1a AND EDX,0x7 MOV dword ptr [RBX],EDX AND dword ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x20],R13 AND dword ptr [RBX + 0x28],0x0 MOV qword ptr [RBX + 0x30],R13 AND dword ptr [RBX + 0x8],0x0 MOV qword ptr [RBX + 0x10],R13 MOV EAX,dword ptr [R8] SHR EAX,0x1e MOVSXD RAX,dword ptr [R12 + RAX*0x4] ADD RAX,R12 JMP RAX LAB_0011dc58: PUSH 0x1 POP RAX LAB_0011dc5b: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011dc6a: MOV CL,byte ptr [R15 + 0x5] XOR EAX,EAX TEST CL,0x4 JZ 0x0011dc5b TEST CL,0x8 JNZ 0x0011dced MOV RCX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RCX + 0x80] MOVZX EDX,word ptr [R15 + 0x6] IMUL RDX,RDX,0x28 MOV RCX,qword ptr [RCX + RDX*0x1 + 0x20] TEST RCX,RCX JZ 0x0011dc5b MOV R9,qword ptr [RCX] TEST R9,R9 JZ 0x0011dc5b PUSH -0x1 POP RCX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV R8D,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP R9 LAB_0011dcc0: AND EDX,0xc0000000 PUSH 0x1 POP RAX NEG EDX JNO 0x0011dc5b MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x18] CMP dword ptr [RCX + 0x8],0x4 JNZ 0x0011dc5b MOV EBX,ESI MOV RDI,R14 MOV ESI,EBP CALL 0x00135ece MOV EAX,EBX JMP 0x0011dc5b LAB_0011dced: TEST EBP,EBP JNS 0x0011dc5b TEST RBX,RBX SETZ DL AND EBP,0x7fffffff XOR EAX,EAX CMP EBP,dword ptr [R15 + 0x40] SETC CL SETNC SIL OR SIL,DL JZ 0x0011dd1a MOV AL,CL JMP 0x0011dc5b LAB_0011dd1a: MOV dword ptr [RBX],0x7 AND dword ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x20],R13 AND dword ptr [RBX + 0x28],0x0 MOV qword ptr [RBX + 0x30],R13 MOV ECX,EBP PUSH -0x1 POP RDX MOV RDI,R14 MOV RSI,R15 CALL 0x0011e178 MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RBX + 0x10],RDX JMP 0x0011dc58
/* WARNING: Removing unreachable block (ram,0x0011dccd) */ /* WARNING: Removing unreachable block (ram,0x0011dcda) */ ulong JS_GetOwnPropertyInternal(long param_1,uint *param_2,long param_3,uint param_4) { long lVar1; long lVar2; int8 *puVar3; code *UNRECOVERED_JUMPTABLE; ulong uVar4; ulong uVar5; uint uVar6; uint *puVar7; bool bVar8; int1 auVar9 [16]; lVar2 = *(long *)(param_3 + 0x18); uVar6 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_4) * 4); while (uVar6 != 0) { lVar1 = lVar2 + 0x40 + (ulong)uVar6 * 8; puVar7 = (uint *)(lVar1 + -8); if (*(uint *)(lVar1 + -4) == param_4) { if (param_2 == (uint *)0x0) { return 1; } *param_2 = *puVar7 >> 0x1a & 7; param_2[6] = 0; param_2[8] = 3; param_2[9] = 0; param_2[10] = 0; param_2[0xc] = 3; param_2[0xd] = 0; param_2[2] = 0; param_2[4] = 3; param_2[5] = 0; /* WARNING: Could not recover jumptable at 0x0011dc1f. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar4 = (*(code *)(&DAT_00183534 + *(int *)(&DAT_00183534 + (ulong)(*puVar7 >> 0x1e) * 4)))(); return uVar4; } uVar6 = *puVar7 & 0x3ffffff; } uVar5 = 0; uVar4 = 0; if ((*(byte *)(param_3 + 5) & 4) != 0) { uVar4 = uVar5; if ((*(byte *)(param_3 + 5) & 8) == 0) { puVar3 = *(int8 **) (*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)*(ushort *)(param_3 + 6) * 0x28); if ((puVar3 != (int8 *)0x0) && (UNRECOVERED_JUMPTABLE = (code *)*puVar3, UNRECOVERED_JUMPTABLE != (code *)0x0)) { /* WARNING: Could not recover jumptable at 0x0011dcbd. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar4 = (*UNRECOVERED_JUMPTABLE)(param_1,param_2,param_3,0xffffffffffffffff,param_4); return uVar4; } } else if ((int)param_4 < 0) { param_4 = param_4 & 0x7fffffff; bVar8 = param_4 < *(uint *)(param_3 + 0x40); if (bVar8 && param_2 != (uint *)0x0) { *param_2 = 7; param_2[6] = 0; param_2[8] = 3; param_2[9] = 0; param_2[10] = 0; param_2[0xc] = 3; param_2[0xd] = 0; auVar9 = JS_GetPropertyInt64(param_1,param_3,0xffffffffffffffff,param_4); *(int1 (*) [16])(param_2 + 2) = auVar9; uVar4 = 1; } else { uVar4 = (ulong)bVar8; } } } return uVar4; }
8,227
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O0
c
my_error_unregister_all: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq 0x19fb01(%rip), %rax # 0x1cc970 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2ce98 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0x2dc80 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x2ce73 movq $0x0, 0x19facd(%rip) # 0x1cc970 leaq 0x19fac6(%rip), %rax # 0x1cc970 movq %rax, 0x19fab7(%rip) # 0x1cc968 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_error_unregister_all: push rbp mov rbp, rsp sub rsp, 10h mov rax, cs:my_errmsgs_globerrs mov [rbp+var_8], rax loc_2CE73: cmp [rbp+var_8], 0 jz short loc_2CE98 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rdi, [rbp+var_8] call my_free mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_2CE73 loc_2CE98: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax add rsp, 10h pop rbp retn
long long *my_error_unregister_all() { long long *result; // rax _QWORD *v1; // [rsp+0h] [rbp-10h] _QWORD *i; // [rsp+8h] [rbp-8h] for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 ) { v1 = (_QWORD *)*i; my_free(i); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr [0x002cc970] MOV qword ptr [RBP + -0x8],RAX LAB_0012ce73: CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012ce98 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012dc80 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0012ce73 LAB_0012ce98: MOV qword ptr [0x002cc970],0x0 LEA RAX,[0x2cc970] MOV qword ptr [0x002cc968],RAX ADD RSP,0x10 POP RBP RET
void my_error_unregister_all(void) { int8 *puVar1; int8 *local_10; local_10 = my_errmsgs_globerrs; while (local_10 != (int8 *)0x0) { puVar1 = (int8 *)*local_10; my_free(local_10); local_10 = puVar1; } my_errmsgs_globerrs = (int8 *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
8,228
my_scan_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_utf32(CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) { const char *str0= str; switch (sequence_type) { case MY_SEQ_SPACES: for ( ; str < end; ) { my_wc_t wc; int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end); if (res < 0 || wc != ' ') break; str+= res; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O3
c
my_scan_utf32: cmpl $0x2, %ecx jne 0x68935 pushq %rbp movq %rsp, %rbp movq %rsi, %rcx movq %rcx, %rax cmpq %rdx, %rcx jae 0x68930 leaq 0x4(%rax), %rcx cmpq %rdx, %rcx ja 0x68930 movzbl (%rax), %ecx shll $0x18, %ecx movzbl 0x1(%rax), %edi shll $0x10, %edi orl %ecx, %edi xorl %ecx, %ecx cmpl $0x110000, %edi # imm = 0x110000 setb %cl movzwl 0x2(%rax), %r8d rolw $0x8, %r8w movzwl %r8w, %r8d orl %edi, %r8d leaq (%rax,%rcx,4), %rcx cmpl $0x20, %r8d je 0x688ea subq %rsi, %rax popq %rbp retq xorl %eax, %eax retq
my_scan_utf32: cmp ecx, 2 jnz short loc_68935 push rbp mov rbp, rsp mov rcx, rsi loc_688EA: mov rax, rcx cmp rcx, rdx jnb short loc_68930 lea rcx, [rax+4] cmp rcx, rdx ja short loc_68930 movzx ecx, byte ptr [rax] shl ecx, 18h movzx edi, byte ptr [rax+1] shl edi, 10h or edi, ecx xor ecx, ecx cmp edi, offset unk_110000 setb cl movzx r8d, word ptr [rax+2] rol r8w, 8 movzx r8d, r8w or r8d, edi lea rcx, [rax+rcx*4] cmp r8d, 20h ; ' ' jz short loc_688EA loc_68930: sub rax, rsi pop rbp retn loc_68935: xor eax, eax retn
long long my_scan_utf32(long long a1, unsigned __int8 *a2, unsigned long long a3, int a4) { unsigned __int8 *v4; // rcx unsigned __int8 *v5; // rax unsigned int v6; // edi if ( a4 != 2 ) return 0LL; v4 = a2; do { v5 = v4; if ( (unsigned long long)v4 >= a3 ) break; if ( (unsigned long long)(v4 + 4) > a3 ) break; v6 = (*v4 << 24) | (v4[1] << 16); v4 += 4 * (v6 < (unsigned int)&unk_110000); } while ( (v6 | (unsigned __int16)__ROL2__(*((_WORD *)v5 + 1), 8)) == 0x20 ); return v5 - a2; }
my_scan_utf32: CMP ECX,0x2 JNZ 0x00168935 PUSH RBP MOV RBP,RSP MOV RCX,RSI LAB_001688ea: MOV RAX,RCX CMP RCX,RDX JNC 0x00168930 LEA RCX,[RAX + 0x4] CMP RCX,RDX JA 0x00168930 MOVZX ECX,byte ptr [RAX] SHL ECX,0x18 MOVZX EDI,byte ptr [RAX + 0x1] SHL EDI,0x10 OR EDI,ECX XOR ECX,ECX CMP EDI,0x110000 SETC CL MOVZX R8D,word ptr [RAX + 0x2] ROL R8W,0x8 MOVZX R8D,R8W OR R8D,EDI LEA RCX,[RAX + RCX*0x4] CMP R8D,0x20 JZ 0x001688ea LAB_00168930: SUB RAX,RSI POP RBP RET LAB_00168935: XOR EAX,EAX RET
long my_scan_utf32(int8 param_1,byte *param_2,byte *param_3,int param_4) { byte *pbVar1; byte *pbVar2; uint uVar3; pbVar1 = param_2; if (param_4 != 2) { return 0; } do { pbVar2 = pbVar1; if ((param_3 <= pbVar2) || (param_3 < pbVar2 + 4)) break; uVar3 = (uint)pbVar2[1] << 0x10 | (uint)*pbVar2 << 0x18; pbVar1 = pbVar2 + (ulong)(uVar3 < 0x110000) * 4; } while (((ushort)(*(ushort *)(pbVar2 + 2) << 8 | *(ushort *)(pbVar2 + 2) >> 8) | uVar3) == 0x20); return (long)pbVar2 - (long)param_2; }
8,229
translog_page_next
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_page_next(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor, struct st_translog_buffer **prev_buffer) { struct st_translog_buffer *buffer= cursor->buffer; DBUG_ENTER("translog_page_next"); *prev_buffer= NULL; if ((cursor->ptr + TRANSLOG_PAGE_SIZE > cursor->buffer->buffer + TRANSLOG_WRITE_BUFFER) || (LSN_OFFSET(*horizon) > log_descriptor.log_file_max_size - TRANSLOG_PAGE_SIZE)) { DBUG_PRINT("info", ("Switch to next buffer Buffer Size: %lu (%lu) => %d " "File size: %lu max: %lu => %d", (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer), (cursor->ptr + TRANSLOG_PAGE_SIZE > cursor->buffer->buffer + TRANSLOG_WRITE_BUFFER), (ulong) LSN_OFFSET(*horizon), (ulong) log_descriptor.log_file_max_size, (LSN_OFFSET(*horizon) > (log_descriptor.log_file_max_size - TRANSLOG_PAGE_SIZE)))); if (translog_buffer_next(horizon, cursor, LSN_OFFSET(*horizon) > (log_descriptor.log_file_max_size - TRANSLOG_PAGE_SIZE))) DBUG_RETURN(1); *prev_buffer= buffer; DBUG_PRINT("info", ("Buffer #%u (%p): have to be flushed", (uint) buffer->buffer_no, buffer)); } else { DBUG_PRINT("info", ("Use the same buffer #%u (%p): " "Buffer Size: %lu (%lu)", (uint) buffer->buffer_no, buffer, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer))); translog_finish_page(horizon, cursor); translog_new_page_header(horizon, cursor); } DBUG_RETURN(0); }
O3
c
translog_page_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq 0x28(%rsi), %r12 movq $0x0, (%rdx) movl $0x2000, %eax # imm = 0x2000 addq 0x20(%rsi), %rax movq %rdi, %r15 movl $0x100000, %ecx # imm = 0x100000 addq 0x28(%rsi), %rcx cmpq %rcx, %rax seta %dl movq (%rdi), %rax movl %eax, %eax movl 0x3dcf90(%rip), %ecx # 0x426bc0 addl $0xffffe000, %ecx # imm = 0xFFFFE000 cmpq %rcx, %rax seta %sil orb %dl, %sil cmpb $0x1, %sil jne 0x49c65 xorl %edx, %edx cmpl %ecx, %eax seta %dl movq %r15, %rdi movq %r14, %rsi callq 0x487a7 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x49c7d movq %r12, (%rbx) jmp 0x49c7b movq %r15, %rdi movq %r14, %rsi callq 0x4628a movq %r15, %rdi movq %r14, %rsi callq 0x45258 xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
translog_page_next: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14, rsi mov r12, [rsi+28h] mov qword ptr [rdx], 0 mov eax, 2000h add rax, [rsi+20h] mov r15, rdi mov ecx, 100000h add rcx, [rsi+28h] cmp rax, rcx setnbe dl mov rax, [rdi] mov eax, eax mov ecx, cs:dword_426BC0 add ecx, 0FFFFE000h cmp rax, rcx setnbe sil or sil, dl cmp sil, 1 jnz short loc_49C65 xor edx, edx cmp eax, ecx setnbe dl mov rdi, r15 mov rsi, r14 call translog_buffer_next mov ecx, eax mov al, 1 test cl, cl jnz short loc_49C7D mov [rbx], r12 jmp short loc_49C7B loc_49C65: mov rdi, r15 mov rsi, r14 call translog_finish_page mov rdi, r15 mov rsi, r14 call translog_new_page_header loc_49C7B: xor eax, eax loc_49C7D: pop rbx pop r12 pop r14 pop r15 pop rbp retn
char translog_page_next(long long *a1, long long a2, _QWORD *a3) { long long v4; // r12 unsigned long long v5; // rax unsigned long long v6; // rcx char v7; // cl char result; // al v4 = *(_QWORD *)(a2 + 40); *a3 = 0LL; v5 = (unsigned int)*a1; v6 = (unsigned int)(dword_426BC0 - 0x2000); if ( *(_QWORD *)(a2 + 32) + 0x2000LL > (unsigned long long)(*(_QWORD *)(a2 + 40) + 0x100000LL) || v5 > v6 ) { v7 = translog_buffer_next(a1, (__int128 *)a2, (unsigned int)v5 > (unsigned int)v6); result = 1; if ( v7 ) return result; *a3 = v4; } else { translog_finish_page(a1, a2); translog_new_page_header((long long)a1, a2); } return 0; }
translog_page_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RSI + 0x28] MOV qword ptr [RDX],0x0 MOV EAX,0x2000 ADD RAX,qword ptr [RSI + 0x20] MOV R15,RDI MOV ECX,0x100000 ADD RCX,qword ptr [RSI + 0x28] CMP RAX,RCX SETA DL MOV RAX,qword ptr [RDI] MOV EAX,EAX MOV ECX,dword ptr [0x00526bc0] ADD ECX,0xffffe000 CMP RAX,RCX SETA SIL OR SIL,DL CMP SIL,0x1 JNZ 0x00149c65 XOR EDX,EDX CMP EAX,ECX SETA DL MOV RDI,R15 MOV RSI,R14 CALL 0x001487a7 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00149c7d MOV qword ptr [RBX],R12 JMP 0x00149c7b LAB_00149c65: MOV RDI,R15 MOV RSI,R14 CALL 0x0014628a MOV RDI,R15 MOV RSI,R14 CALL 0x00145258 LAB_00149c7b: XOR EAX,EAX LAB_00149c7d: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 translog_page_next(ulong *param_1,long param_2,int8 *param_3) { int8 uVar1; char cVar2; uVar1 = *(int8 *)(param_2 + 0x28); *param_3 = 0; if ((ulong)(DAT_00526bc0 - 0x2000U) < (*param_1 & 0xffffffff) || *(long *)(param_2 + 0x28) + 0x100000U < *(long *)(param_2 + 0x20) + 0x2000U) { cVar2 = translog_buffer_next(param_1,param_2,DAT_00526bc0 - 0x2000U < (uint)*param_1); if (cVar2 != '\0') { return 1; } *param_3 = uVar1; } else { translog_finish_page(param_1,param_2); translog_new_page_header(param_1,param_2); } return 0; }
8,230
google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>::AllocateFieldNames(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>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
FieldNamesResult AllocateFieldNames(const std::string& name, const std::string& scope, const std::string* opt_json_name) { GOOGLE_CHECK(has_allocated()); std::string full_name = scope.empty() ? name : StrCat(scope, ".", name); // Fast path for snake_case names, which follow the style guide. if (opt_json_name == nullptr) { switch (GetFieldNameCase(name)) { case FieldNameCase::kAllLower: // Case 1: they are all the same. return {AllocateStrings(name, std::move(full_name)), 0, 0, 0}; case FieldNameCase::kSnakeCase: // Case 2: name==lower, camel==json return {AllocateStrings(name, std::move(full_name), ToCamelCase(name, /* lower_first = */ true)), 0, 2, 2}; default: break; } } std::vector<std::string> names; names.push_back(name); names.push_back(std::move(full_name)); const auto push_name = [&](std::string new_name) { for (size_t i = 0; i < names.size(); ++i) { // Do not compare the full_name. It is unlikely to match, except in // custom json_name. We are not taking this into account in // PlanFieldNames so better to not try it. if (i == 1) continue; if (names[i] == new_name) return i; } names.push_back(std::move(new_name)); return names.size() - 1; }; FieldNamesResult result{nullptr, 0, 0, 0}; std::string lowercase_name = name; LowerString(&lowercase_name); result.lowercase_index = push_name(std::move(lowercase_name)); result.camelcase_index = push_name(ToCamelCase(name, /* lower_first = */ true)); result.json_index = push_name(opt_json_name != nullptr ? *opt_json_name : ToJsonName(name)); std::string* all_names = AllocateArray<std::string>(names.size()); result.array = all_names; std::move(names.begin(), names.end(), all_names); return result; }
O0
cpp
google::protobuf::(anonymous namespace)::FlatAllocatorImpl<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>::AllocateFieldNames(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>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*): subq $0x298, %rsp # imm = 0x298 movq %rdi, 0x80(%rsp) movq %rdi, 0x88(%rsp) movq %rsi, 0x290(%rsp) movq %rdx, 0x288(%rsp) movq %rcx, 0x280(%rsp) movq %r8, 0x278(%rsp) movq 0x290(%rsp), %rdi movq %rdi, 0x90(%rsp) callq 0x63b70 movb $0x0, 0x23f(%rsp) testb $0x1, %al jne 0x5422a jmp 0x5422c jmp 0x54285 leaq 0x1992a1(%rip), %rdx # 0x1ed4d4 leaq 0x240(%rsp), %rdi movq %rdi, 0x70(%rsp) movl $0x3, %esi movl $0x1c9, %ecx # imm = 0x1C9 callq 0x237e0 movq 0x70(%rsp), %rdi movb $0x1, 0x23f(%rsp) leaq 0x19bb74(%rip), %rsi # 0x1efdd7 callq 0x230a0 movq %rax, 0x78(%rsp) jmp 0x5426f movq 0x78(%rsp), %rsi leaq 0x22b(%rsp), %rdi callq 0x23250 jmp 0x54283 jmp 0x54285 testb $0x1, 0x23f(%rsp) jne 0x54291 jmp 0x5429e leaq 0x240(%rsp), %rdi callq 0x23820 movq 0x280(%rsp), %rdi callq 0x147f0 testb $0x1, %al jne 0x542b1 jmp 0x542c8 movq 0x288(%rsp), %rsi leaq 0x208(%rsp), %rdi callq 0x131a0 jmp 0x5432b movq 0x280(%rsp), %rsi leaq 0x1d8(%rsp), %rdi callq 0x781b0 leaq 0x1a8(%rsp), %rdi leaq 0x199a01(%rip), %rsi # 0x1edced callq 0x76c30 movq 0x288(%rsp), %rsi leaq 0x178(%rsp), %rdi callq 0x781b0 leaq 0x208(%rsp), %rdi leaq 0x1d8(%rsp), %rsi leaq 0x1a8(%rsp), %rdx leaq 0x178(%rsp), %rcx callq 0x2b220 cmpq $0x0, 0x278(%rsp) jne 0x544ef movq 0x90(%rsp), %rdi movq 0x288(%rsp), %rsi callq 0x66e20 movl %eax, 0x6c(%rsp) jmp 0x54355 movl 0x6c(%rsp), %eax testl %eax, %eax je 0x543bc jmp 0x5435f movl 0x6c(%rsp), %eax subl $0x1, %eax je 0x54427 jmp 0x544eb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) testb $0x1, 0x23f(%rsp) jne 0x54391 jmp 0x5439e leaq 0x240(%rsp), %rdi callq 0x23820 jmp 0x54825 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) jmp 0x54818 movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x288(%rsp), %rsi leaq 0x208(%rsp), %rdx callq 0x51ad0 movq %rax, 0x60(%rsp) jmp 0x543ed movq 0x80(%rsp), %rax movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rdx movq %rdx, (%rcx) movl $0x0, 0x8(%rax) movl $0x0, 0xc(%rax) movl $0x0, 0x10(%rax) movl $0x1, 0x174(%rsp) jmp 0x547fb movq 0x80(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x288(%rsp), %rsi movq %rsi, 0x50(%rsp) leaq 0x150(%rsp), %rdi movl $0x1, %edx callq 0x5c290 jmp 0x54455 movq 0x50(%rsp), %rsi movq 0x90(%rsp), %rdi leaq 0x208(%rsp), %rdx leaq 0x150(%rsp), %rcx callq 0x6f1f0 movq %rax, 0x40(%rsp) jmp 0x5447e movq 0x80(%rsp), %rax movq 0x48(%rsp), %rcx movq 0x40(%rsp), %rdx movq %rdx, (%rcx) movl $0x0, 0x8(%rax) movl $0x2, 0xc(%rax) movl $0x2, 0x10(%rax) leaq 0x150(%rsp), %rdi callq 0x13290 movl $0x1, 0x174(%rsp) jmp 0x547fb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) leaq 0x150(%rsp), %rdi callq 0x13290 jmp 0x54818 jmp 0x544ed jmp 0x544ef leaq 0x138(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x147e0 movq 0x38(%rsp), %rdi movq 0x288(%rsp), %rsi callq 0x77c50 jmp 0x54515 leaq 0x138(%rsp), %rdi leaq 0x208(%rsp), %rsi callq 0x30e50 jmp 0x5452c movq 0x80(%rsp), %rax leaq 0x138(%rsp), %rcx movq %rcx, 0x130(%rsp) xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq 0x288(%rsp), %rsi leaq 0x110(%rsp), %rdi callq 0x131a0 jmp 0x54569 leaq 0x110(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x84b10 movq 0x20(%rsp), %rsi leaq 0xf0(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x13240 movq 0x28(%rsp), %rsi leaq 0x130(%rsp), %rdi callq 0x6f400 movq %rax, 0x30(%rsp) jmp 0x545ab movq 0x80(%rsp), %rax movq 0x30(%rsp), %rcx movl %ecx, 0x8(%rax) leaq 0xf0(%rsp), %rdi callq 0x13290 movq 0x288(%rsp), %rsi leaq 0xd0(%rsp), %rdi movl $0x1, %edx callq 0x5c290 jmp 0x545e4 leaq 0x130(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x6f400 movq %rax, 0x18(%rsp) jmp 0x54600 movq 0x80(%rsp), %rax movq 0x18(%rsp), %rcx movl %ecx, 0xc(%rax) leaq 0xd0(%rsp), %rdi callq 0x13290 cmpq $0x0, 0x278(%rsp) je 0x54641 movq 0x278(%rsp), %rsi leaq 0xb0(%rsp), %rdi callq 0x131a0 jmp 0x5463f jmp 0x5465a movq 0x288(%rsp), %rsi leaq 0xb0(%rsp), %rdi callq 0x5c130 jmp 0x54658 jmp 0x5465a leaq 0x130(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x6f400 movq %rax, 0x10(%rsp) jmp 0x54676 movq 0x80(%rsp), %rax movq 0x10(%rsp), %rcx movl %ecx, 0x10(%rax) leaq 0xb0(%rsp), %rdi callq 0x13290 leaq 0x138(%rsp), %rdi callq 0x1e260 movq 0x90(%rsp), %rdi movl %eax, %esi callq 0x63940 movq %rax, 0x8(%rsp) jmp 0x546b6 movq 0x80(%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, 0xa8(%rsp) movq 0xa8(%rsp), %rcx movq %rcx, (%rax) leaq 0x138(%rsp), %rdi movq %rdi, (%rsp) callq 0x19110 movq (%rsp), %rdi movq %rax, 0xa0(%rsp) callq 0x19140 movq %rax, 0x98(%rsp) movq 0xa8(%rsp), %rdx movq 0xa0(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x9ee00 jmp 0x5471f movl $0x1, 0x174(%rsp) leaq 0x110(%rsp), %rdi callq 0x13290 leaq 0x138(%rsp), %rdi callq 0x14940 jmp 0x547fb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) jmp 0x547ec movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) leaq 0xf0(%rsp), %rdi callq 0x13290 jmp 0x547df movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) jmp 0x547df movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) leaq 0xd0(%rsp), %rdi callq 0x13290 jmp 0x547df movq %rax, %rcx movl %edx, %eax movq %rcx, 0x230(%rsp) movl %eax, 0x22c(%rsp) leaq 0xb0(%rsp), %rdi callq 0x13290 leaq 0x110(%rsp), %rdi callq 0x13290 leaq 0x138(%rsp), %rdi callq 0x14940 jmp 0x54818 leaq 0x208(%rsp), %rdi callq 0x13290 movq 0x88(%rsp), %rax addq $0x298, %rsp # imm = 0x298 retq leaq 0x208(%rsp), %rdi callq 0x13290 movq 0x230(%rsp), %rdi callq 0x13750 nopw %cs:(%rax,%rax)
_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE18AllocateFieldNamesERKS8_SM_PSL_: sub rsp, 298h mov [rsp+298h+var_218], rdi mov [rsp+298h+var_210], rdi mov [rsp+298h+var_8], rsi mov [rsp+298h+var_10], rdx mov [rsp+298h+var_18], rcx mov [rsp+298h+var_20], r8 mov rdi, [rsp+298h+var_8] mov [rsp+298h+var_208], rdi call _ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13has_allocatedEv; 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>::has_allocated(void) mov [rsp+298h+var_59], 0 test al, 1 jnz short loc_5422A jmp short loc_5422C loc_5422A: jmp short loc_54285 loc_5422C: lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+298h+var_58] mov [rsp+298h+var_228], rdi mov esi, 3 mov ecx, 1C9h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+298h+var_228] mov [rsp+298h+var_59], 1 lea rsi, aCheckFailedHas_1; "CHECK failed: has_allocated(): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+298h+var_220], rax jmp short $+2 loc_5426F: mov rsi, [rsp+298h+var_220] lea rdi, [rsp+298h+var_6D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_54283: jmp short $+2 loc_54285: test [rsp+298h+var_59], 1 jnz short loc_54291 jmp short loc_5429E loc_54291: lea rdi, [rsp+298h+var_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_5429E: mov rdi, [rsp+298h+var_18] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_542B1 jmp short loc_542C8 loc_542B1: mov rsi, [rsp+298h+var_10] lea rdi, [rsp+298h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short loc_5432B loc_542C8: mov rsi, [rsp+298h+var_18] lea rdi, [rsp+298h+var_C0] call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&) lea rdi, [rsp+298h+var_F0]; this lea rsi, aWhichIsNotDefi+77h; char * call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) mov rsi, [rsp+298h+var_10] lea rdi, [rsp+298h+var_120] call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&) lea rdi, [rsp+298h+var_90] lea rsi, [rsp+298h+var_C0] lea rdx, [rsp+298h+var_F0] lea rcx, [rsp+298h+var_120] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) loc_5432B: cmp [rsp+298h+var_20], 0 jnz loc_544EF mov rdi, [rsp+298h+var_208] mov rsi, [rsp+298h+var_10] call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE16GetFieldNameCaseERKS8_; 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>::GetFieldNameCase(std::string const&) mov [rsp+298h+var_22C], eax jmp short $+2 loc_54355: mov eax, [rsp+298h+var_22C] test eax, eax jz short loc_543BC jmp short $+2 loc_5435F: mov eax, [rsp+298h+var_22C] sub eax, 1 jz loc_54427 jmp loc_544EB mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax test [rsp+arg_237], 1 jnz short loc_54391 jmp short loc_5439E loc_54391: lea rdi, [rsp+arg_238]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_5439E: jmp loc_54825 mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax jmp loc_54818 loc_543BC: mov rdi, [rsp+298h+var_208] mov rax, [rsp+298h+var_218] mov [rsp+298h+var_240], rax mov rsi, [rsp+298h+var_10] lea rdx, [rsp+298h+var_90] call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS8_S8_EEEPSM_DpOT_; 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>::AllocateStrings<std::string const&,std::string>(std::string const&,std::string &&) mov [rsp+298h+var_238], rax jmp short $+2 loc_543ED: mov rax, [rsp+298h+var_218] mov rcx, [rsp+298h+var_240] mov rdx, [rsp+298h+var_238] mov [rcx], rdx mov dword ptr [rax+8], 0 mov dword ptr [rax+0Ch], 0 mov dword ptr [rax+10h], 0 mov [rsp+298h+var_124], 1 jmp loc_547FB loc_54427: mov rax, [rsp+298h+var_218] mov [rsp+298h+var_250], rax mov rsi, [rsp+298h+var_10] mov [rsp+298h+var_248], rsi lea rdi, [rsp+298h+var_148] mov edx, 1 call _ZN6google8protobuf12_GLOBAL__N_111ToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; google::protobuf::`anonymous namespace'::ToCamelCase(std::string const&,bool) jmp short $+2 loc_54455: mov rsi, [rsp+298h+var_248] mov rdi, [rsp+298h+var_208] lea rdx, [rsp+298h+var_90] lea rcx, [rsp+298h+var_148] call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS8_S8_S8_EEEPSM_DpOT_; 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>::AllocateStrings<std::string const&,std::string,std::string>(std::string const&,std::string,std::string &&) mov [rsp+298h+var_258], rax jmp short $+2 loc_5447E: mov rax, [rsp+298h+var_218] mov rcx, [rsp+298h+var_250] mov rdx, [rsp+298h+var_258] mov [rcx], rdx mov dword ptr [rax+8], 0 mov dword ptr [rax+0Ch], 2 mov dword ptr [rax+10h], 2 lea rdi, [rsp+298h+var_148] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov [rsp+298h+var_124], 1 jmp loc_547FB mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax lea rdi, [rsp+arg_148] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_54818 loc_544EB: jmp short $+2 loc_544ED: jmp short $+2 loc_544EF: lea rdi, [rsp+298h+var_160] mov [rsp+298h+var_260], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov rdi, [rsp+298h+var_260] mov rsi, [rsp+298h+var_10] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_54515: lea rdi, [rsp+298h+var_160] lea rsi, [rsp+298h+var_90] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_5452C: mov rax, [rsp+298h+var_218] lea rcx, [rsp+298h+var_160] mov [rsp+298h+var_168], rcx xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov rsi, [rsp+298h+var_10] lea rdi, [rsp+298h+var_188] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_54569: lea rdi, [rsp+298h+var_188] mov [rsp+298h+var_278], rdi call _ZN6google8protobuf11LowerStringEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::LowerString(std::string *) mov rsi, [rsp+298h+var_278] lea rdi, [rsp+298h+var_1A8] mov [rsp+298h+var_270], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&) mov rsi, [rsp+298h+var_270] lea rdi, [rsp+298h+var_168] call _ZZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE18AllocateFieldNamesERKS8_SM_PSL_ENKUlS8_E_clES8_; 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>::AllocateFieldNames(std::string const&,std::string const&,std::string const*)::{lambda(std::string)#1}::operator()(std::string) mov [rsp+298h+var_268], rax jmp short $+2 loc_545AB: mov rax, [rsp+298h+var_218] mov rcx, [rsp+298h+var_268] mov [rax+8], ecx lea rdi, [rsp+298h+var_1A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rsi, [rsp+298h+var_10] lea rdi, [rsp+298h+var_1C8] mov edx, 1 call _ZN6google8protobuf12_GLOBAL__N_111ToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; google::protobuf::`anonymous namespace'::ToCamelCase(std::string const&,bool) jmp short $+2 loc_545E4: lea rdi, [rsp+298h+var_168] lea rsi, [rsp+298h+var_1C8] call _ZZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE18AllocateFieldNamesERKS8_SM_PSL_ENKUlS8_E_clES8_; 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>::AllocateFieldNames(std::string const&,std::string const&,std::string const*)::{lambda(std::string)#1}::operator()(std::string) mov [rsp+298h+var_280], rax jmp short $+2 loc_54600: mov rax, [rsp+298h+var_218] mov rcx, [rsp+298h+var_280] mov [rax+0Ch], ecx lea rdi, [rsp+298h+var_1C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() cmp [rsp+298h+var_20], 0 jz short loc_54641 mov rsi, [rsp+298h+var_20] lea rdi, [rsp+298h+var_1E8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_5463F: jmp short loc_5465A loc_54641: mov rsi, [rsp+298h+var_10] lea rdi, [rsp+298h+var_1E8] call _ZN6google8protobuf12_GLOBAL__N_110ToJsonNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::`anonymous namespace'::ToJsonName(std::string const&) jmp short $+2 loc_54658: jmp short $+2 loc_5465A: lea rdi, [rsp+298h+var_168] lea rsi, [rsp+298h+var_1E8] call _ZZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE18AllocateFieldNamesERKS8_SM_PSL_ENKUlS8_E_clES8_; 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>::AllocateFieldNames(std::string const&,std::string const&,std::string const*)::{lambda(std::string)#1}::operator()(std::string) mov [rsp+298h+var_288], rax jmp short $+2 loc_54676: mov rax, [rsp+298h+var_218] mov rcx, [rsp+298h+var_288] mov [rax+10h], ecx lea rdi, [rsp+298h+var_1E8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+298h+var_160] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rdi, [rsp+298h+var_208] mov esi, eax call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayIS8_EEPT_i; 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>::AllocateArray<std::string>(int) mov [rsp+298h+var_290], rax jmp short $+2 loc_546B6: mov rax, [rsp+298h+var_218] mov rcx, [rsp+298h+var_290] mov [rsp+298h+var_1F0], rcx mov rcx, [rsp+298h+var_1F0] mov [rax], rcx lea rdi, [rsp+298h+var_160] mov [rsp+298h+var_298], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov rdi, [rsp+298h+var_298] mov [rsp+298h+var_1F8], rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+298h+var_200], rax mov rdx, [rsp+298h+var_1F0] mov rdi, [rsp+298h+var_1F8] mov rsi, [rsp+298h+var_200] call _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEES8_ET0_T_SE_SD_; std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::string *>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::string *) jmp short $+2 loc_5471F: mov [rsp+298h+var_124], 1 lea rdi, [rsp+298h+var_188] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+298h+var_160] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp loc_547FB mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax jmp loc_547EC mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax lea rdi, [rsp+arg_E8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_547DF mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax jmp short loc_547DF mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax lea rdi, [rsp+arg_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_547DF mov rcx, rax mov eax, edx mov [rsp+arg_228], rcx mov [rsp+arg_224], eax lea rdi, [rsp+arg_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_547DF: lea rdi, [rsp+arg_108] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_547EC: lea rdi, [rsp+arg_130] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_54818 loc_547FB: lea rdi, [rsp+298h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+298h+var_210] add rsp, 298h retn loc_54818: lea rdi, [rsp+arg_200] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_54825: mov rdi, [rsp+arg_228] call __Unwind_Resume
long long 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>::AllocateFieldNames( long long a1, long long a2, long long a3, long long a4, long long a5) { int v5; // ecx int v6; // r8d int v7; // r9d int v8; // r8d int v9; // r9d int v10; // ecx int v11; // r8d int v12; // r9d int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d int v17; // eax int v18; // edx int v19; // ecx int v20; // r8d int v21; // r9d int v23; // [rsp+0h] [rbp-298h] int v24; // [rsp+8h] [rbp-290h] int v25; // [rsp+10h] [rbp-288h] int v26; // [rsp+18h] [rbp-280h] int v27; // [rsp+20h] [rbp-278h] char v28; // [rsp+28h] [rbp-270h] int v29; // [rsp+30h] [rbp-268h] int v30; // [rsp+38h] [rbp-260h] int v31; // [rsp+40h] [rbp-258h] long long v32; // [rsp+40h] [rbp-258h] long long *v33; // [rsp+48h] [rbp-250h] int v34; // [rsp+50h] [rbp-248h] int FieldNameCase; // [rsp+6Ch] [rbp-22Ch] google::protobuf::internal::LogMessage *v36; // [rsp+78h] [rbp-220h] long long v37; // [rsp+98h] [rbp-200h] long long v38; // [rsp+A0h] [rbp-1F8h] long long v39; // [rsp+A8h] [rbp-1F0h] _BYTE v40[32]; // [rsp+B0h] [rbp-1E8h] BYREF _BYTE v41[32]; // [rsp+D0h] [rbp-1C8h] BYREF _BYTE v42[32]; // [rsp+F0h] [rbp-1A8h] BYREF _BYTE v43[32]; // [rsp+110h] [rbp-188h] BYREF long long *v44; // [rsp+130h] [rbp-168h] BYREF long long v45[3]; // [rsp+138h] [rbp-160h] BYREF _BYTE v46[36]; // [rsp+150h] [rbp-148h] BYREF int v47; // [rsp+174h] [rbp-124h] _BYTE v48[48]; // [rsp+178h] [rbp-120h] BYREF _BYTE v49[48]; // [rsp+1A8h] [rbp-F0h] BYREF _BYTE v50[48]; // [rsp+1D8h] [rbp-C0h] BYREF _BYTE v51[35]; // [rsp+208h] [rbp-90h] BYREF _BYTE v52[20]; // [rsp+22Bh] [rbp-6Dh] BYREF char v53; // [rsp+23Fh] [rbp-59h] _BYTE v54[56]; // [rsp+240h] [rbp-58h] BYREF long long v55; // [rsp+278h] [rbp-20h] long long v56; // [rsp+280h] [rbp-18h] long long v57; // [rsp+288h] [rbp-10h] long long v58; // [rsp+290h] [rbp-8h] v58 = a2; v57 = a3; v56 = a4; v55 = a5; v53 = 0; if ( (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>::has_allocated(a2) & 1) == 0 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v54, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 457); v53 = 1; v36 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v54, (long long)"CHECK failed: has_allocated(): "); google::protobuf::internal::LogFinisher::operator=((long long)v52, v36); } if ( (v53 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v54); if ( std::string::empty(v56) ) { std::string::basic_string(v51, v57); } else { google::protobuf::strings::AlphaNum::AlphaNum(v50, v56); google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v49, "."); google::protobuf::strings::AlphaNum::AlphaNum(v48, v57); google::protobuf::StrCat[abi:cxx11]( (long long)v51, (google::protobuf::strings::AlphaNum *)v50, (google::protobuf::strings::AlphaNum *)v49, (google::protobuf::strings::AlphaNum *)v48); } if ( !v55 ) { FieldNameCase = 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>::GetFieldNameCase( a2, v57); if ( !FieldNameCase ) { *(_QWORD *)a1 = 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>::AllocateStrings<std::string const&,std::string>( a2, v57, (long long)v51, v5, v6, v7); *(_DWORD *)(a1 + 8) = 0; *(_DWORD *)(a1 + 12) = 0; *(_DWORD *)(a1 + 16) = 0; v47 = 1; goto LABEL_18; } if ( FieldNameCase == 1 ) { v34 = v57; google::protobuf::`anonymous namespace'::ToCamelCase((unsigned int)v46, v57, 1, v5, v6, v7); v32 = 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>::AllocateStrings<std::string const&,std::string,std::string>( a2, v34, (unsigned int)v51, (unsigned int)v46, v8, v9, v23, v24, v25, v26, v27, v28, v29, v30, v31, a1, v34); *v33 = v32; *(_DWORD *)(a1 + 8) = 0; *(_DWORD *)(a1 + 12) = 2; *(_DWORD *)(a1 + 16) = 2; std::string::~string(v46); v47 = 1; goto LABEL_18; } } std::vector<std::string>::vector((long long)v45); std::vector<std::string>::push_back(v45, v57); std::vector<std::string>::push_back((long long)v45, (long long)v51); v44 = v45; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::string::basic_string(v43, v57); google::protobuf::LowerString(); std::string::basic_string(v42, v43); *(_DWORD *)(a1 + 8) = 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>::AllocateFieldNames(std::string const&,std::string const&,std::string const*)::{lambda(std::string)#1}::operator()( &v44, v42); std::string::~string(v42); google::protobuf::`anonymous namespace'::ToCamelCase((unsigned int)v41, v57, 1, v10, v11, v12); *(_DWORD *)(a1 + 12) = 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>::AllocateFieldNames(std::string const&,std::string const&,std::string const*)::{lambda(std::string)#1}::operator()( &v44, v41); std::string::~string(v41); if ( v55 ) std::string::basic_string(v40, v55); else google::protobuf::`anonymous namespace'::ToJsonName((unsigned int)v40, v57, v13, v14, v15, v16); *(_DWORD *)(a1 + 16) = 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>::AllocateFieldNames(std::string const&,std::string const&,std::string const*)::{lambda(std::string)#1}::operator()( &v44, v40); std::string::~string(v40); v17 = std::vector<std::string>::size(v45); v39 = 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>::AllocateArray<std::string>( a2, v17, v18, v19, v20, v21); *(_QWORD *)a1 = v39; v38 = std::vector<std::string>::begin((long long)v45); v37 = std::vector<std::string>::end((long long)v45); std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::string *>(v38, v37, v39); v47 = 1; std::string::~string(v43); std::vector<std::string>::~vector(v45); LABEL_18: std::string::~string(v51); return a1; }
AllocateFieldNames: SUB RSP,0x298 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x88],RDI MOV qword ptr [RSP + 0x290],RSI MOV qword ptr [RSP + 0x288],RDX MOV qword ptr [RSP + 0x280],RCX MOV qword ptr [RSP + 0x278],R8 MOV RDI,qword ptr [RSP + 0x290] MOV qword ptr [RSP + 0x90],RDI CALL 0x00163b70 MOV byte ptr [RSP + 0x23f],0x0 TEST AL,0x1 JNZ 0x0015422a JMP 0x0015422c LAB_0015422a: JMP 0x00154285 LAB_0015422c: LEA RDX,[0x2ed4d4] LEA RDI,[RSP + 0x240] MOV qword ptr [RSP + 0x70],RDI MOV ESI,0x3 MOV ECX,0x1c9 CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x70] MOV byte ptr [RSP + 0x23f],0x1 LAB_0015425c: LEA RSI,[0x2efdd7] CALL 0x001230a0 MOV qword ptr [RSP + 0x78],RAX JMP 0x0015426f LAB_0015426f: MOV RSI,qword ptr [RSP + 0x78] LEA RDI,[RSP + 0x22b] CALL 0x00123250 LAB_00154281: JMP 0x00154283 LAB_00154283: JMP 0x00154285 LAB_00154285: TEST byte ptr [RSP + 0x23f],0x1 JNZ 0x00154291 JMP 0x0015429e LAB_00154291: LEA RDI,[RSP + 0x240] CALL 0x00123820 LAB_0015429e: MOV RDI,qword ptr [RSP + 0x280] CALL 0x001147f0 TEST AL,0x1 JNZ 0x001542b1 JMP 0x001542c8 LAB_001542b1: MOV RSI,qword ptr [RSP + 0x288] LEA RDI,[RSP + 0x208] CALL 0x001131a0 JMP 0x0015432b LAB_001542c8: MOV RSI,qword ptr [RSP + 0x280] LEA RDI,[RSP + 0x1d8] CALL 0x001781b0 LEA RDI,[RSP + 0x1a8] LEA RSI,[0x2edced] CALL 0x00176c30 MOV RSI,qword ptr [RSP + 0x288] LEA RDI,[RSP + 0x178] CALL 0x001781b0 LEA RDI,[RSP + 0x208] LEA RSI,[RSP + 0x1d8] LEA RDX,[RSP + 0x1a8] LEA RCX,[RSP + 0x178] CALL 0x0012b220 LAB_0015432b: CMP qword ptr [RSP + 0x278],0x0 JNZ 0x001544ef MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x288] LAB_0015434a: CALL 0x00166e20 MOV dword ptr [RSP + 0x6c],EAX JMP 0x00154355 LAB_00154355: MOV EAX,dword ptr [RSP + 0x6c] TEST EAX,EAX JZ 0x001543bc JMP 0x0015435f LAB_0015435f: MOV EAX,dword ptr [RSP + 0x6c] SUB EAX,0x1 JZ 0x00154427 JMP 0x001544eb LAB_001543bc: MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x58],RAX MOV RSI,qword ptr [RSP + 0x288] LEA RDX,[RSP + 0x208] CALL 0x00151ad0 MOV qword ptr [RSP + 0x60],RAX JMP 0x001543ed LAB_001543ed: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] MOV qword ptr [RCX],RDX MOV dword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0xc],0x0 MOV dword ptr [RAX + 0x10],0x0 MOV dword ptr [RSP + 0x174],0x1 JMP 0x001547fb LAB_00154427: MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x48],RAX MOV RSI,qword ptr [RSP + 0x288] MOV qword ptr [RSP + 0x50],RSI LEA RDI,[RSP + 0x150] MOV EDX,0x1 CALL 0x0015c290 JMP 0x00154455 LAB_00154455: MOV RSI,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RSP + 0x90] LEA RDX,[RSP + 0x208] LEA RCX,[RSP + 0x150] CALL 0x0016f1f0 MOV qword ptr [RSP + 0x40],RAX JMP 0x0015447e LAB_0015447e: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x40] MOV qword ptr [RCX],RDX MOV dword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0xc],0x2 MOV dword ptr [RAX + 0x10],0x2 LEA RDI,[RSP + 0x150] CALL 0x00113290 MOV dword ptr [RSP + 0x174],0x1 JMP 0x001547fb LAB_001544eb: JMP 0x001544ed LAB_001544ed: JMP 0x001544ef LAB_001544ef: LEA RDI,[RSP + 0x138] MOV qword ptr [RSP + 0x38],RDI CALL 0x001147e0 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x288] LAB_0015450e: CALL 0x00177c50 JMP 0x00154515 LAB_00154515: LEA RDI,[RSP + 0x138] LEA RSI,[RSP + 0x208] CALL 0x00130e50 JMP 0x0015452c LAB_0015452c: MOV RAX,qword ptr [RSP + 0x80] LEA RCX,[RSP + 0x138] MOV qword ptr [RSP + 0x130],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [RSP + 0x288] LEA RDI,[RSP + 0x110] CALL 0x001131a0 JMP 0x00154569 LAB_00154569: LEA RDI,[RSP + 0x110] MOV qword ptr [RSP + 0x20],RDI CALL 0x00184b10 MOV RSI,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0xf0] MOV qword ptr [RSP + 0x28],RDI CALL 0x00113240 MOV RSI,qword ptr [RSP + 0x28] LAB_00154597: LEA RDI,[RSP + 0x130] CALL 0x0016f400 MOV qword ptr [RSP + 0x30],RAX JMP 0x001545ab LAB_001545ab: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x8],ECX LEA RDI,[RSP + 0xf0] CALL 0x00113290 MOV RSI,qword ptr [RSP + 0x288] LAB_001545d0: LEA RDI,[RSP + 0xd0] MOV EDX,0x1 CALL 0x0015c290 JMP 0x001545e4 LAB_001545e4: LEA RDI,[RSP + 0x130] LEA RSI,[RSP + 0xd0] CALL 0x0016f400 MOV qword ptr [RSP + 0x18],RAX JMP 0x00154600 LAB_00154600: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0xc],ECX LEA RDI,[RSP + 0xd0] CALL 0x00113290 CMP qword ptr [RSP + 0x278],0x0 JZ 0x00154641 MOV RSI,qword ptr [RSP + 0x278] LAB_00154630: LEA RDI,[RSP + 0xb0] CALL 0x001131a0 JMP 0x0015463f LAB_0015463f: JMP 0x0015465a LAB_00154641: MOV RSI,qword ptr [RSP + 0x288] LEA RDI,[RSP + 0xb0] CALL 0x0015c130 JMP 0x00154658 LAB_00154658: JMP 0x0015465a LAB_0015465a: LEA RDI,[RSP + 0x130] LEA RSI,[RSP + 0xb0] CALL 0x0016f400 MOV qword ptr [RSP + 0x10],RAX JMP 0x00154676 LAB_00154676: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x10],ECX LEA RDI,[RSP + 0xb0] CALL 0x00113290 LEA RDI,[RSP + 0x138] CALL 0x0011e260 MOV RDI,qword ptr [RSP + 0x90] MOV ESI,EAX LAB_001546aa: CALL 0x00163940 MOV qword ptr [RSP + 0x8],RAX JMP 0x001546b6 LAB_001546b6: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xa8],RCX MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x138] MOV qword ptr [RSP],RDI CALL 0x00119110 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0xa0],RAX CALL 0x00119140 MOV qword ptr [RSP + 0x98],RAX MOV RDX,qword ptr [RSP + 0xa8] MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x98] CALL 0x0019ee00 LAB_0015471d: JMP 0x0015471f LAB_0015471f: MOV dword ptr [RSP + 0x174],0x1 LEA RDI,[RSP + 0x110] CALL 0x00113290 LEA RDI,[RSP + 0x138] CALL 0x00114940 JMP 0x001547fb LAB_001547fb: LEA RDI,[RSP + 0x208] CALL 0x00113290 MOV RAX,qword ptr [RSP + 0x88] ADD RSP,0x298 RET
/* google::protobuf::(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>::AllocateFieldNames(std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const*) */ string * google::protobuf::(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> ::AllocateFieldNames(string *param_1,string *param_2,string *param_3) { int iVar1; int4 uVar2; ulong uVar3; LogMessage *pLVar4; string *psVar5; int8 uVar6; int8 uVar7; string *in_RCX; string *in_R8; string local_1e8 [32]; _anonymous_namespace_ local_1c8 [32]; string local_1a8 [32]; string local_188 [32]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_168; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_160 [24]; _anonymous_namespace_ local_148 [36]; int4 local_124; AlphaNum local_120 [48]; AlphaNum local_f0 [48]; AlphaNum local_c0 [48]; string local_90 [35]; LogFinisher local_6d [20]; byte local_59; LogMessage local_58 [56]; string *local_20; string *local_18; string *local_10; string *local_8; local_20 = in_R8; local_18 = in_RCX; local_10 = param_3; local_8 = param_2; uVar3 = has_allocated((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> *)param_2); local_59 = 0; if ((uVar3 & 1) == 0) { internal::LogMessage::LogMessage (local_58,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x1c9); local_59 = 1; /* try { // try from 0015425c to 00154280 has its CatchHandler @ 00154371 */ pLVar4 = (LogMessage *) internal::LogMessage::operator<<(local_58,"CHECK failed: has_allocated(): "); internal::LogFinisher::operator=(local_6d,pLVar4); } if ((local_59 & 1) != 0) { internal::LogMessage::~LogMessage(local_58); } uVar3 = std::__cxx11::string::empty(local_18); if ((uVar3 & 1) == 0) { strings::AlphaNum::AlphaNum(local_c0,local_18); strings::AlphaNum::AlphaNum(local_f0,"."); strings::AlphaNum::AlphaNum(local_120,local_10); StrCat_abi_cxx11_((protobuf *)local_90,local_c0,local_f0,local_120); } else { std::__cxx11::string::string(local_90,local_10); } if (local_20 == (string *)0x0) { /* try { // try from 0015434a to 00154452 has its CatchHandler @ 001543a3 */ iVar1 = GetFieldNameCase((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> *)param_2,local_10); psVar5 = local_10; if (iVar1 == 0) { psVar5 = AllocateStrings<std::__cxx11::string_const&,std::__cxx11::string> ((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> *)param_2,local_10,local_90); *(string **)param_1 = psVar5; *(int4 *)(param_1 + 8) = 0; *(int4 *)(param_1 + 0xc) = 0; *(int4 *)(param_1 + 0x10) = 0; local_124 = 1; goto LAB_001547fb; } if (iVar1 == 1) { ToCamelCase(local_148,local_10,true); /* try { // try from 00154455 to 00154476 has its CatchHandler @ 001544c5 */ psVar5 = AllocateStrings<std::__cxx11::string_const&,std::__cxx11::string,std::__cxx11::string> ((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> *)param_2,psVar5,local_90,(string *)local_148); *(string **)param_1 = psVar5; *(int4 *)(param_1 + 8) = 0; *(int4 *)(param_1 + 0xc) = 2; *(int4 *)(param_1 + 0x10) = 2; std::__cxx11::string::~string((string *)local_148); local_124 = 1; goto LAB_001547fb; } } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_160); /* try { // try from 0015450e to 00154566 has its CatchHandler @ 00154749 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back (local_160,local_10); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back (local_160,local_90); local_168 = local_160; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; std::__cxx11::string::string(local_188,local_10); LowerString(local_188); std::__cxx11::string::string(local_1a8,local_188); /* try { // try from 00154597 to 001545a3 has its CatchHandler @ 00154762 */ uVar2 = AllocateFieldNames(std::__cxx11::string_const&,std::__cxx11::string_const&,std::__cxx11::string_const*) ::{lambda(std::__cxx11::string)#1}::operator() ((_lambda_std____cxx11__string__1_ *)&local_168,local_1a8); *(int4 *)(param_1 + 8) = uVar2; std::__cxx11::string::~string(local_1a8); /* try { // try from 001545d0 to 001545e1 has its CatchHandler @ 00154785 */ ToCamelCase(local_1c8,local_10,true); /* try { // try from 001545e4 to 001545f8 has its CatchHandler @ 0015479b */ uVar2 = AllocateFieldNames(std::__cxx11::string_const&,std::__cxx11::string_const&,std::__cxx11::string_const*) ::{lambda(std::__cxx11::string)#1}::operator() ((_lambda_std____cxx11__string__1_ *)&local_168,local_1c8); *(int4 *)(param_1 + 0xc) = uVar2; std::__cxx11::string::~string((string *)local_1c8); if (local_20 == (string *)0x0) { ToJsonName((_anonymous_namespace_ *)local_1e8,local_10); } else { /* try { // try from 00154630 to 00154655 has its CatchHandler @ 00154785 */ std::__cxx11::string::string(local_1e8,local_20); } /* try { // try from 0015465a to 0015466e has its CatchHandler @ 001547be */ uVar2 = AllocateFieldNames(std::__cxx11::string_const&,std::__cxx11::string_const&,std::__cxx11::string_const*) ::{lambda(std::__cxx11::string)#1}::operator() ((_lambda_std____cxx11__string__1_ *)&local_168,local_1e8); *(int4 *)(param_1 + 0x10) = uVar2; std::__cxx11::string::~string(local_1e8); iVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_160); /* try { // try from 001546aa to 0015471c has its CatchHandler @ 00154785 */ psVar5 = AllocateArray<std::__cxx11::string> ((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> *)param_2,iVar1); *(string **)param_1 = psVar5; uVar6 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_160); uVar7 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_160); std:: move<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::__cxx11::string*> (uVar6,uVar7,psVar5); local_124 = 1; std::__cxx11::string::~string(local_188); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_160); LAB_001547fb: std::__cxx11::string::~string(local_90); return param_1; }
8,231
MatrixPerspective
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixPerspective(double fovY, double aspect, double nearPlane, double farPlane) { Matrix result = { 0 }; double top = nearPlane*tan(fovY*0.5); double bottom = -top; double right = top*aspect; double left = -right; // MatrixFrustum(-right, right, -top, top, near, far); float rl = (float)(right - left); float tb = (float)(top - bottom); float fn = (float)(farPlane - nearPlane); result.m0 = ((float)nearPlane*2.0f)/rl; result.m5 = ((float)nearPlane*2.0f)/tb; result.m8 = ((float)right + (float)left)/rl; result.m9 = ((float)top + (float)bottom)/tb; result.m10 = -((float)farPlane + (float)nearPlane)/fn; result.m11 = -1.0f; result.m14 = -((float)farPlane*(float)nearPlane*2.0f)/fn; return result; }
O2
c
MatrixPerspective: pushq %rbx subq $0x20, %rsp movsd %xmm3, 0x8(%rsp) movaps %xmm2, 0x10(%rsp) movsd %xmm1, (%rsp) movq %rdi, %rbx xorps %xmm1, %xmm1 movups %xmm1, 0x30(%rdi) movups %xmm1, 0x24(%rdi) movups %xmm1, 0x14(%rdi) movups %xmm1, 0x4(%rdi) mulsd 0x608ae(%rip), %xmm0 # 0xb9830 callq 0x92e0 movapd 0x10(%rsp), %xmm5 mulsd %xmm5, %xmm0 movsd (%rsp), %xmm1 mulsd %xmm0, %xmm1 cvtsd2ss %xmm1, %xmm2 addsd %xmm1, %xmm1 cvtsd2ss %xmm1, %xmm3 movapd %xmm0, %xmm1 addsd %xmm0, %xmm1 cvtsd2ss %xmm1, %xmm1 movsd 0x8(%rsp), %xmm6 movapd %xmm6, %xmm4 subsd %xmm5, %xmm4 unpcklpd %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0] cvtsd2ss %xmm4, %xmm0 subss %xmm2, %xmm2 divss %xmm3, %xmm2 movss %xmm2, 0x8(%rbx) cvtpd2ps %xmm5, %xmm2 movss 0x6a4f3(%rip), %xmm4 # 0xc34d4 movapd %xmm2, %xmm5 movss %xmm4, %xmm5 # xmm5 = xmm4[0],xmm5[1,2,3] mulps %xmm2, %xmm5 movaps %xmm2, %xmm4 subps %xmm2, %xmm4 shufps $0x1, %xmm5, %xmm4 # xmm4 = xmm4[1,0],xmm5[0,0] shufps $0xe2, %xmm5, %xmm4 # xmm4 = xmm4[2,0],xmm5[2,3] divss %xmm3, %xmm5 movss %xmm5, (%rbx) unpcklps %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1] divps %xmm1, %xmm4 movlps %xmm4, 0x14(%rbx) cvtsd2ss %xmm6, %xmm1 movaps %xmm2, %xmm3 addss %xmm1, %xmm3 xorps 0x5c122(%rip), %xmm3 # 0xb5140 movl $0xbf800000, 0x38(%rbx) # imm = 0xBF800000 mulss %xmm1, %xmm2 mulss 0x607a7(%rip), %xmm2 # 0xb97d8 unpcklps %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1] unpcklps %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1] divps %xmm0, %xmm3 movlps %xmm3, 0x28(%rbx) movq %rbx, %rax addq $0x20, %rsp popq %rbx retq
MatrixPerspective: push rbx sub rsp, 20h movsd [rsp+28h+var_20], xmm3 movaps [rsp+28h+var_18], xmm2 movsd [rsp+28h+var_28], xmm1 mov rbx, rdi xorps xmm1, xmm1 movups xmmword ptr [rdi+30h], xmm1 movups xmmword ptr [rdi+24h], xmm1 movups xmmword ptr [rdi+14h], xmm1 movups xmmword ptr [rdi+4], xmm1 mulsd xmm0, cs:qword_B9830 call _tan movapd xmm5, [rsp+28h+var_18] mulsd xmm0, xmm5 movsd xmm1, [rsp+28h+var_28] mulsd xmm1, xmm0 cvtsd2ss xmm2, xmm1 addsd xmm1, xmm1 cvtsd2ss xmm3, xmm1 movapd xmm1, xmm0 addsd xmm1, xmm0 cvtsd2ss xmm1, xmm1 movsd xmm6, [rsp+28h+var_20] movapd xmm4, xmm6 subsd xmm4, xmm5 unpcklpd xmm5, xmm0 cvtsd2ss xmm0, xmm4 subss xmm2, xmm2 divss xmm2, xmm3 movss dword ptr [rbx+8], xmm2 cvtpd2ps xmm2, xmm5 movss xmm4, cs:dword_C34D4 movapd xmm5, xmm2 movss xmm5, xmm4 mulps xmm5, xmm2 movaps xmm4, xmm2 subps xmm4, xmm2 shufps xmm4, xmm5, 1 shufps xmm4, xmm5, 0E2h divss xmm5, xmm3 movss dword ptr [rbx], xmm5 unpcklps xmm1, xmm1 divps xmm4, xmm1 movlps qword ptr [rbx+14h], xmm4 cvtsd2ss xmm1, xmm6 movaps xmm3, xmm2 addss xmm3, xmm1 xorps xmm3, cs:xmmword_B5140 mov dword ptr [rbx+38h], 0BF800000h mulss xmm2, xmm1 mulss xmm2, cs:dword_B97D8 unpcklps xmm3, xmm2 unpcklps xmm0, xmm0 divps xmm3, xmm0 movlps qword ptr [rbx+28h], xmm3 mov rax, rbx add rsp, 20h pop rbx retn
long long MatrixPerspective(long long a1, __m128 a2, double a3, __m128d a4, double a5) { float v5; // xmm2_4 float v6; // xmm3_4 __m128 v7; // xmm1 __m128d v8; // xmm5 __m128 v9; // xmm2 __m128 v10; // xmm5 __m128 v11; // xmm5 __m128 v12; // xmm3 *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 36) = 0LL; *(_OWORD *)(a1 + 20) = 0LL; *(_OWORD *)(a1 + 4) = 0LL; *(double *)a2.m128_u64 = tan(*(double *)a2.m128_u64 * 0.5) * a4.m128d_f64[0]; v5 = a3 * *(double *)a2.m128_u64; v6 = a3 * *(double *)a2.m128_u64 + a3 * *(double *)a2.m128_u64; v7.m128_u64[1] = a2.m128_u64[1]; *(double *)v7.m128_u64 = *(double *)a2.m128_u64 + *(double *)a2.m128_u64; v7.m128_f32[0] = *(double *)a2.m128_u64 + *(double *)a2.m128_u64; v8 = _mm_unpacklo_pd(a4, (__m128d)a2); a2.m128_f32[0] = a5 - a4.m128d_f64[0]; *(float *)(a1 + 8) = (float)(v5 - v5) / v6; v9 = _mm_cvtpd_ps(v8); v10 = v9; v10.m128_f32[0] = 2.0; v11 = _mm_mul_ps(v10, v9); *(float *)a1 = v11.m128_f32[0] / v6; _mm_storel_ps( (double *)(a1 + 20), _mm_div_ps(_mm_shuffle_ps(_mm_shuffle_ps(_mm_sub_ps(v9, v9), v11, 1), v11, 226), _mm_unpacklo_ps(v7, v7))); v7.m128_f32[0] = a5; v12 = v9; v12.m128_f32[0] = v9.m128_f32[0] + v7.m128_f32[0]; *(_DWORD *)(a1 + 56) = -1082130432; v9.m128_f32[0] = (float)(v9.m128_f32[0] * v7.m128_f32[0]) * -2.0; _mm_storel_ps( (double *)(a1 + 40), _mm_div_ps(_mm_unpacklo_ps(_mm_xor_ps(v12, (__m128)xmmword_B5140), v9), _mm_unpacklo_ps(a2, a2))); return a1; }
MatrixPerspective: PUSH RBX SUB RSP,0x20 MOVSD qword ptr [RSP + 0x8],XMM3 MOVAPS xmmword ptr [RSP + 0x10],XMM2 MOVSD qword ptr [RSP],XMM1 MOV RBX,RDI XORPS XMM1,XMM1 MOVUPS xmmword ptr [RDI + 0x30],XMM1 MOVUPS xmmword ptr [RDI + 0x24],XMM1 MOVUPS xmmword ptr [RDI + 0x14],XMM1 MOVUPS xmmword ptr [RDI + 0x4],XMM1 MULSD XMM0,qword ptr [0x001b9830] CALL 0x001092e0 MOVAPD XMM5,xmmword ptr [RSP + 0x10] MULSD XMM0,XMM5 MOVSD XMM1,qword ptr [RSP] MULSD XMM1,XMM0 CVTSD2SS XMM2,XMM1 ADDSD XMM1,XMM1 CVTSD2SS XMM3,XMM1 MOVAPD XMM1,XMM0 ADDSD XMM1,XMM0 CVTSD2SS XMM1,XMM1 MOVSD XMM6,qword ptr [RSP + 0x8] MOVAPD XMM4,XMM6 SUBSD XMM4,XMM5 UNPCKLPD XMM5,XMM0 CVTSD2SS XMM0,XMM4 SUBSS XMM2,XMM2 DIVSS XMM2,XMM3 MOVSS dword ptr [RBX + 0x8],XMM2 CVTPD2PS XMM2,XMM5 MOVSS XMM4,dword ptr [0x001c34d4] MOVAPD XMM5,XMM2 MOVSS XMM5,XMM4 MULPS XMM5,XMM2 MOVAPS XMM4,XMM2 SUBPS XMM4,XMM2 SHUFPS XMM4,XMM5,0x1 SHUFPS XMM4,XMM5,0xe2 DIVSS XMM5,XMM3 MOVSS dword ptr [RBX],XMM5 UNPCKLPS XMM1,XMM1 DIVPS XMM4,XMM1 MOVLPS qword ptr [RBX + 0x14],XMM4 CVTSD2SS XMM1,XMM6 MOVAPS XMM3,XMM2 ADDSS XMM3,XMM1 XORPS XMM3,xmmword ptr [0x001b5140] MOV dword ptr [RBX + 0x38],0xbf800000 MULSS XMM2,XMM1 MULSS XMM2,dword ptr [0x001b97d8] UNPCKLPS XMM3,XMM2 UNPCKLPS XMM0,XMM0 DIVPS XMM3,XMM0 MOVLPS qword ptr [RBX + 0x28],XMM3 MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ float * MatrixPerspective(double param_1,double param_2,double param_3,double param_4,float *param_5 ) { double dVar1; int1 auVar2 [16]; int4 uVar3; float fVar4; int4 uVar5; float fVar6; float fVar7; int1 auVar8 [16]; int1 auVar10 [16]; int1 auVar11 [16]; int1 auVar9 [16]; param_5[0xc] = 0.0; param_5[0xd] = 0.0; param_5[0xe] = 0.0; param_5[0xf] = 0.0; param_5[9] = 0.0; param_5[10] = 0.0; param_5[0xb] = 0.0; param_5[0xc] = 0.0; param_5[5] = 0.0; param_5[6] = 0.0; param_5[7] = 0.0; param_5[8] = 0.0; param_5[1] = 0.0; param_5[2] = 0.0; param_5[3] = 0.0; param_5[4] = 0.0; dVar1 = tan(param_1 * DAT_001b9830); dVar1 = dVar1 * param_3; uVar3 = (int4)((ulong)dVar1 >> 0x20); param_2 = param_2 * dVar1; uVar5 = (int4)((ulong)(dVar1 + dVar1) >> 0x20); fVar4 = (float)(dVar1 + dVar1); param_5[2] = ((float)param_2 - (float)param_2) / (float)(param_2 + param_2); fVar6 = (float)param_3; fVar7 = (float)dVar1; auVar10._4_4_ = fVar7 - fVar7; auVar10._0_4_ = DAT_001c34d4 * fVar6; auVar10._8_8_ = 0; *param_5 = (DAT_001c34d4 * fVar6) / (float)(param_2 + param_2); auVar2._4_4_ = fVar4; auVar2._0_4_ = fVar4; auVar2._8_4_ = uVar5; auVar2._12_4_ = uVar5; auVar11 = divps(auVar10,auVar2); *(long *)(param_5 + 5) = auVar11._0_8_; auVar8._0_4_ = (uint)(fVar6 + (float)param_4) ^ _DAT_001b5140; auVar9._4_4_ = (uint)fVar7 ^ _UNK_001b5144; auVar9._0_4_ = auVar8._0_4_; param_5[0xe] = -1.0; auVar9._8_4_ = auVar9._4_4_; auVar9._12_4_ = fVar7; auVar8._8_8_ = auVar9._8_8_; auVar8._4_4_ = fVar6 * (float)param_4 * DAT_001b97d8; auVar11._4_4_ = (float)(param_4 - param_3); auVar11._0_4_ = (float)(param_4 - param_3); auVar11._8_4_ = uVar3; auVar11._12_4_ = uVar3; auVar11 = divps(auVar8,auVar11); *(long *)(param_5 + 10) = auVar11._0_8_; return param_5; }
8,232
engine
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/qshell/enginecmd.c
int32_t _engine (SVC_SHELL_IF_T * pif, char** argv, int argc, uint32_t filter) { uint32_t idx = 0 ; int found = 0 ; if (argc < 2) { engine_loginstance ((uint32_t)-1, 0) ; engine_logfilter (ENGINE_LOG_FILTER_DEFAULT, (uint16_t)-1) ; for (idx=0; idx<engine_statemachine_count(); idx++) { svc_shell_print(pif, SVC_SHELL_OUT_STD, "%s\r\n" , engine_statemachine_name(idx)) ; } svc_shell_print(pif, SVC_SHELL_OUT_STD, "statemachine logging disabled\r\n") ; return EOK ; } else { if (engine_logfilter(0,0) == ENGINE_LOG_FILTER_DEFAULT) { engine_logfilter (0, (uint16_t)-1) ; engine_loginstance (0, (uint32_t)-1) ; } for (idx=0; idx<engine_statemachine_count(); idx++) { int n ; for (n = 1; n < argc; n++) { if (strcmp(engine_statemachine_name(idx), argv[n]) == 0) { engine_loginstance (1 << idx, 0) ; engine_logfilter (filter, 0) ; svc_shell_print(pif, SVC_SHELL_OUT_STD, "statemachine '%s' logging enabled\r\n" , engine_statemachine_name(idx)) ; found++ ; } } } } svc_shell_print(pif, SVC_SHELL_OUT_STD, "engine set %d logging instance 0x%x, filter 0x%x\r\n" , found, engine_loginstance(0,0), engine_logfilter(0,0)) ; return EOK ; }
O3
c
engine: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r13 cmpl $0x1, %edx jg 0xe19c movl $0xffffffff, %edi # imm = 0xFFFFFFFF xorl %esi, %esi callq 0xe559 movl $0x6, %edi movl $0xffff, %esi # imm = 0xFFFF callq 0xe53b callq 0xe31c testl %eax, %eax je 0xe181 leaq 0x1bd02(%rip), %rbx # 0x29e56 xorl %r14d, %r14d movl %r14d, %edi callq 0xe328 movq %r13, %rdi movl $0x1, %esi movq %rbx, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x17c60 incl %r14d callq 0xe31c cmpl %eax, %r14d jb 0xe157 leaq 0x17fb4(%rip), %rdx # 0x2613c movq %r13, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x17c60 jmp 0xe29e movl %ecx, %ebx movl %edx, %r12d movq %rsi, %r15 movq %r13, -0x38(%rbp) movl $0x0, -0x2c(%rbp) xorl %edi, %edi xorl %esi, %esi callq 0xe53b cmpl $0x6, %eax jne 0xe1d5 xorl %edi, %edi movl $0xffff, %esi # imm = 0xFFFF callq 0xe53b xorl %edi, %edi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0xe559 callq 0xe31c testl %eax, %eax je 0xe26a movl %r12d, %r12d movzwl %bx, %eax movl %eax, -0x30(%rbp) movl $0x0, -0x2c(%rbp) xorl %r13d, %r13d movl $0x1, %ebx movl %r13d, %ecx shll %cl, %ebx movl $0x1, %r14d movl %r13d, %edi callq 0xe328 movq (%r15,%r14,8), %rsi movq %rax, %rdi callq 0x6320 testl %eax, %eax jne 0xe255 movl %ebx, %edi xorl %esi, %esi callq 0xe559 movl -0x30(%rbp), %edi xorl %esi, %esi callq 0xe53b movl %r13d, %edi callq 0xe328 movq -0x38(%rbp), %rdi movl $0x1, %esi leaq 0x17f14(%rip), %rdx # 0x2615c movq %rax, %rcx xorl %eax, %eax callq 0x17c60 incl -0x2c(%rbp) incq %r14 cmpq %r14, %r12 jne 0xe205 incl %r13d callq 0xe31c cmpl %eax, %r13d jb 0xe1f5 xorl %edi, %edi xorl %esi, %esi callq 0xe559 movl %eax, %ebx xorl %edi, %edi xorl %esi, %esi callq 0xe53b leaq 0x17efb(%rip), %rdx # 0x26180 movq -0x38(%rbp), %rdi movl $0x1, %esi movl -0x2c(%rbp), %ecx movl %ebx, %r8d movl %eax, %r9d xorl %eax, %eax callq 0x17c60 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_engine: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rdi cmp edx, 1 jg short loc_E19C mov edi, 0FFFFFFFFh xor esi, esi call engine_loginstance mov edi, 6 mov esi, 0FFFFh call engine_logfilter call engine_statemachine_count test eax, eax jz short loc_E181 lea rbx, a4x4d2d2d2d2d2d+23h; "%s\r\n" xor r14d, r14d loc_E157: mov edi, r14d call engine_statemachine_name mov rdi, r13 mov esi, 1 mov rdx, rbx mov rcx, rax xor eax, eax call svc_shell_print inc r14d call engine_statemachine_count cmp r14d, eax jb short loc_E157 loc_E181: lea rdx, aStatemachineLo; "statemachine logging disabled\r\n" mov rdi, r13 mov esi, 1 xor eax, eax call svc_shell_print jmp loc_E29E loc_E19C: mov ebx, ecx mov r12d, edx mov r15, rsi mov [rbp+var_38], r13 mov [rbp+var_2C], 0 xor edi, edi xor esi, esi call engine_logfilter cmp eax, 6 jnz short loc_E1D5 xor edi, edi mov esi, 0FFFFh call engine_logfilter xor edi, edi mov esi, 0FFFFFFFFh call engine_loginstance loc_E1D5: call engine_statemachine_count test eax, eax jz loc_E26A mov r12d, r12d movzx eax, bx mov [rbp+var_30], eax mov [rbp+var_2C], 0 xor r13d, r13d loc_E1F5: mov ebx, 1 mov ecx, r13d shl ebx, cl mov r14d, 1 loc_E205: mov edi, r13d call engine_statemachine_name mov rsi, [r15+r14*8] mov rdi, rax call _strcmp test eax, eax jnz short loc_E255 mov edi, ebx xor esi, esi call engine_loginstance mov edi, [rbp+var_30] xor esi, esi call engine_logfilter mov edi, r13d call engine_statemachine_name mov rdi, [rbp+var_38] mov esi, 1 lea rdx, aStatemachineSL; "statemachine '%s' logging enabled\r\n" mov rcx, rax xor eax, eax call svc_shell_print inc [rbp+var_2C] loc_E255: inc r14 cmp r12, r14 jnz short loc_E205 inc r13d call engine_statemachine_count cmp r13d, eax jb short loc_E1F5 loc_E26A: xor edi, edi xor esi, esi call engine_loginstance mov ebx, eax xor edi, edi xor esi, esi call engine_logfilter lea rdx, aEngineSetDLogg; "engine set %d logging instance 0x%x, fi"... mov rdi, [rbp+var_38] mov esi, 1 mov ecx, [rbp+var_2C] mov r8d, ebx mov r9d, eax xor eax, eax call svc_shell_print loc_E29E: xor eax, eax add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long engine(int a1, long long a2, int a3, unsigned __int16 a4) { int v4; // ecx int v5; // r8d int v6; // r9d unsigned int v7; // r14d int v8; // eax int v9; // r8d int v10; // r9d unsigned int v13; // r13d long long v14; // r14 long long v15; // rdi int v16; // eax int v17; // r8d int v18; // r9d int v19; // ebx int v20; // eax char v22; // [rsp+0h] [rbp-40h] int v24; // [rsp+14h] [rbp-2Ch] if ( a3 > 1 ) { v24 = 0; if ( (unsigned int)engine_logfilter(0LL, 0LL) == 6 ) { engine_logfilter(0LL, 0xFFFFLL); engine_loginstance(0LL, 0xFFFFFFFFLL); } if ( (unsigned int)engine_statemachine_count() ) { v24 = 0; v13 = 0; do { v14 = 1LL; do { v15 = engine_statemachine_name(v13); if ( !(unsigned int)strcmp(v15, *(_QWORD *)(a2 + 8 * v14)) ) { engine_loginstance((unsigned int)(1 << v13), 0LL); engine_logfilter(a4, 0LL); v16 = engine_statemachine_name(v13); svc_shell_print(a1, 1, (unsigned int)aStatemachineSL, v16, v17, v18, v22); ++v24; } ++v14; } while ( a3 != v14 ); ++v13; } while ( v13 < (unsigned int)engine_statemachine_count() ); } v19 = engine_loginstance(0LL, 0LL); v20 = engine_logfilter(0LL, 0LL); svc_shell_print(a1, 1, (unsigned int)aEngineSetDLogg, v24, v19, v20, v22); } else { engine_loginstance(0xFFFFFFFFLL, 0LL); engine_logfilter(6LL, 0xFFFFLL); if ( (unsigned int)engine_statemachine_count() ) { v7 = 0; do { v8 = engine_statemachine_name(v7); svc_shell_print(a1, 1, (unsigned int)&a4x4d2d2d2d2d2d[35], v8, v9, v10, v22); ++v7; } while ( v7 < (unsigned int)engine_statemachine_count() ); } svc_shell_print(a1, 1, (unsigned int)aStatemachineLo, v4, v5, v6, v22); } return 0LL; }
_engine: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RDI CMP EDX,0x1 JG 0x0010e19c MOV EDI,0xffffffff XOR ESI,ESI CALL 0x0010e559 MOV EDI,0x6 MOV ESI,0xffff CALL 0x0010e53b CALL 0x0010e31c TEST EAX,EAX JZ 0x0010e181 LEA RBX,[0x129e56] XOR R14D,R14D LAB_0010e157: MOV EDI,R14D CALL 0x0010e328 MOV RDI,R13 MOV ESI,0x1 MOV RDX,RBX MOV RCX,RAX XOR EAX,EAX CALL 0x00117c60 INC R14D CALL 0x0010e31c CMP R14D,EAX JC 0x0010e157 LAB_0010e181: LEA RDX,[0x12613c] MOV RDI,R13 MOV ESI,0x1 XOR EAX,EAX CALL 0x00117c60 JMP 0x0010e29e LAB_0010e19c: MOV EBX,ECX MOV R12D,EDX MOV R15,RSI MOV qword ptr [RBP + -0x38],R13 MOV dword ptr [RBP + -0x2c],0x0 XOR EDI,EDI XOR ESI,ESI CALL 0x0010e53b CMP EAX,0x6 JNZ 0x0010e1d5 XOR EDI,EDI MOV ESI,0xffff CALL 0x0010e53b XOR EDI,EDI MOV ESI,0xffffffff CALL 0x0010e559 LAB_0010e1d5: CALL 0x0010e31c TEST EAX,EAX JZ 0x0010e26a MOV R12D,R12D MOVZX EAX,BX MOV dword ptr [RBP + -0x30],EAX MOV dword ptr [RBP + -0x2c],0x0 XOR R13D,R13D LAB_0010e1f5: MOV EBX,0x1 MOV ECX,R13D SHL EBX,CL MOV R14D,0x1 LAB_0010e205: MOV EDI,R13D CALL 0x0010e328 MOV RSI,qword ptr [R15 + R14*0x8] MOV RDI,RAX CALL 0x00106320 TEST EAX,EAX JNZ 0x0010e255 MOV EDI,EBX XOR ESI,ESI CALL 0x0010e559 MOV EDI,dword ptr [RBP + -0x30] XOR ESI,ESI CALL 0x0010e53b MOV EDI,R13D CALL 0x0010e328 MOV RDI,qword ptr [RBP + -0x38] MOV ESI,0x1 LEA RDX,[0x12615c] MOV RCX,RAX XOR EAX,EAX CALL 0x00117c60 INC dword ptr [RBP + -0x2c] LAB_0010e255: INC R14 CMP R12,R14 JNZ 0x0010e205 INC R13D CALL 0x0010e31c CMP R13D,EAX JC 0x0010e1f5 LAB_0010e26a: XOR EDI,EDI XOR ESI,ESI CALL 0x0010e559 MOV EBX,EAX XOR EDI,EDI XOR ESI,ESI CALL 0x0010e53b LEA RDX,[0x126180] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,0x1 MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,EBX MOV R9D,EAX XOR EAX,EAX CALL 0x00117c60 LAB_0010e29e: XOR EAX,EAX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _engine(int8 param_1,long param_2,uint param_3,int2 param_4) { int iVar1; uint uVar2; int4 uVar3; int4 uVar4; int8 uVar5; char *__s1; uint uVar6; ulong uVar7; int local_34; if ((int)param_3 < 2) { engine_loginstance(0xffffffff,0); engine_logfilter(6,0xffff); iVar1 = engine_statemachine_count(); if (iVar1 != 0) { uVar6 = 0; do { uVar5 = engine_statemachine_name(uVar6); svc_shell_print(param_1,1,&DAT_00129e56,uVar5); uVar6 = uVar6 + 1; uVar2 = engine_statemachine_count(); } while (uVar6 < uVar2); } svc_shell_print(param_1,1,s_statemachine_logging_disabled_0012613c); } else { local_34 = 0; iVar1 = engine_logfilter(0,0); if (iVar1 == 6) { engine_logfilter(0,0xffff); engine_loginstance(0,0xffffffff); } iVar1 = engine_statemachine_count(); if (iVar1 != 0) { local_34 = 0; uVar6 = 0; do { uVar7 = 1; do { __s1 = (char *)engine_statemachine_name(uVar6); iVar1 = strcmp(__s1,*(char **)(param_2 + uVar7 * 8)); if (iVar1 == 0) { engine_loginstance(1 << ((byte)uVar6 & 0x1f),0); engine_logfilter(param_4,0); uVar5 = engine_statemachine_name(uVar6); svc_shell_print(param_1,1,s_statemachine___s__logging_enable_0012615c,uVar5); local_34 = local_34 + 1; } uVar7 = uVar7 + 1; } while (param_3 != uVar7); uVar6 = uVar6 + 1; uVar2 = engine_statemachine_count(); } while (uVar6 < uVar2); } uVar3 = engine_loginstance(0,0); uVar4 = engine_logfilter(0,0); svc_shell_print(param_1,1,s_engine_set__d_logging_instance_0_00126180,local_34,uVar3,uVar4); } return 0; }
8,233
ImPlot3D::NDCToPlot(ImPlot3DPoint const&)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
ImPlot3DPoint NDCToPlot(const ImPlot3DPoint& point) { ImPlot3DContext& gp = *GImPlot3D; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "NDCToPlot() needs to be called between BeginPlot() and EndPlot()!"); ImPlot3DPlot& plot = *gp.CurrentPlot; SetupLock(); ImPlot3DPoint plot_point; for (int i = 0; i < 3; i++) { ImPlot3DAxis& axis = plot.Axes[i]; float ndc_range = 0.5f * plot.BoxScale[i]; float t = ImPlot3D::ImHasFlag(axis.Flags, ImPlot3DAxisFlags_Invert) ? (ndc_range - point[i]) : (point[i] + ndc_range); t /= plot.BoxScale[i]; plot_point[i] = axis.Range.Min + t * (axis.Range.Max - axis.Range.Min); } return plot_point; }
O1
cpp
ImPlot3D::NDCToPlot(ImPlot3DPoint const&): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x2e512e(%rip), %r14 # 0x336c98 cmpq $0x0, 0x28(%r14) jne 0x51b7d leaq 0x243883(%rip), %rdi # 0x2953fb callq 0x2161f4 movq 0x28(%r14), %r14 callq 0x50ce3 movq $0x0, 0x8(%rsp) movl $0x0, 0x10(%rsp) leaq 0x84(%r14), %rax xorl %ecx, %ecx movss 0x23d478(%rip), %xmm0 # 0x28f020 movaps 0x241a61(%rip), %xmm1 # 0x293610 movss 0x1c8(%r14,%rcx,4), %xmm3 movaps %xmm3, %xmm2 mulss %xmm0, %xmm2 cmpb $0x0, -0xc(%rax) movss (%rbx,%rcx,4), %xmm4 jns 0x51bce xorps %xmm1, %xmm4 addss %xmm4, %xmm2 divss %xmm3, %xmm2 movss -0x4(%rax), %xmm3 movss (%rax), %xmm4 subss %xmm3, %xmm4 mulss %xmm2, %xmm4 addss %xmm3, %xmm4 movss %xmm4, 0x8(%rsp,%rcx,4) incq %rcx addq $0x70, %rax cmpq $0x3, %rcx jne 0x51baf movsd 0x8(%rsp), %xmm0 movss 0x10(%rsp), %xmm1 addq $0x18, %rsp popq %rbx popq %r14 retq
_ZN8ImPlot3D9NDCToPlotERK13ImPlot3DPoint: push r14 push rbx sub rsp, 18h mov rbx, rdi mov r14, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D cmp qword ptr [r14+28h], 0 jnz short loc_51B7D lea rdi, aNdctoplotNeeds; "NDCToPlot() needs to be called between "... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_51B7D: mov r14, [r14+28h] call _ZN8ImPlot3D9SetupLockEv; ImPlot3D::SetupLock(void) mov [rsp+28h+var_20], 0 mov [rsp+28h+var_18], 0 lea rax, [r14+84h] xor ecx, ecx movss xmm0, dword ptr cs:xmmword_28F020 movaps xmm1, cs:xmmword_293610 loc_51BAF: movss xmm3, dword ptr [r14+rcx*4+1C8h] movaps xmm2, xmm3 mulss xmm2, xmm0 cmp byte ptr [rax-0Ch], 0 movss xmm4, dword ptr [rbx+rcx*4] jns short loc_51BCE xorps xmm4, xmm1 loc_51BCE: addss xmm2, xmm4 divss xmm2, xmm3 movss xmm3, dword ptr [rax-4] movss xmm4, dword ptr [rax] subss xmm4, xmm3 mulss xmm4, xmm2 addss xmm4, xmm3 movss dword ptr [rsp+rcx*4+28h+var_20], xmm4 inc rcx add rax, 70h ; 'p' cmp rcx, 3 jnz short loc_51BAF movsd xmm0, [rsp+28h+var_20] movss xmm1, [rsp+28h+var_18] add rsp, 18h pop rbx pop r14 retn
double ImPlot3D::NDCToPlot(ImPlot3D *this, const ImPlot3DPoint *a2, double a3) { ImPlot3D *v3; // rbx ImGui *v4; // r14 long long v5; // r14 float *v6; // rax long long i; // rcx float v8; // xmm4_4 double v10; // [rsp+8h] [rbp-20h] int v11; // [rsp+10h] [rbp-18h] v3 = this; v4 = ImPlot3D::GImPlot3D; if ( !*((_QWORD *)ImPlot3D::GImPlot3D + 5) ) { this = (ImPlot3D *)"NDCToPlot() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"NDCToPlot() needs to be called between BeginPlot() and EndPlot()!", (const char *)a2); } v5 = *((_QWORD *)v4 + 5); ImPlot3D::SetupLock(this, (const char *)a2, a3); v10 = 0.0; v11 = 0; v6 = (float *)(v5 + 132); for ( i = 0LL; i != 3; ++i ) { v8 = *((float *)v3 + i); if ( *((char *)v6 - 12) < 0 ) v8 = -v8; *((float *)&v10 + i) = (float)((float)(*v6 - *(v6 - 1)) * (float)((float)((float)(*(float *)(v5 + 4 * i + 456) * 0.5) + v8) / *(float *)(v5 + 4 * i + 456))) + *(v6 - 1); v6 += 28; } return v10; }
NDCToPlot: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R14,qword ptr [0x00436c98] CMP qword ptr [R14 + 0x28],0x0 JNZ 0x00151b7d LEA RDI,[0x3953fb] CALL 0x003161f4 LAB_00151b7d: MOV R14,qword ptr [R14 + 0x28] CALL 0x00150ce3 MOV qword ptr [RSP + 0x8],0x0 MOV dword ptr [RSP + 0x10],0x0 LEA RAX,[R14 + 0x84] XOR ECX,ECX MOVSS XMM0,dword ptr [0x0038f020] MOVAPS XMM1,xmmword ptr [0x00393610] LAB_00151baf: MOVSS XMM3,dword ptr [R14 + RCX*0x4 + 0x1c8] MOVAPS XMM2,XMM3 MULSS XMM2,XMM0 CMP byte ptr [RAX + -0xc],0x0 MOVSS XMM4,dword ptr [RBX + RCX*0x4] JNS 0x00151bce XORPS XMM4,XMM1 LAB_00151bce: ADDSS XMM2,XMM4 DIVSS XMM2,XMM3 MOVSS XMM3,dword ptr [RAX + -0x4] MOVSS XMM4,dword ptr [RAX] SUBSS XMM4,XMM3 MULSS XMM4,XMM2 ADDSS XMM4,XMM3 MOVSS dword ptr [RSP + RCX*0x4 + 0x8],XMM4 INC RCX ADD RAX,0x70 CMP RCX,0x3 JNZ 0x00151baf MOVSD XMM0,qword ptr [RSP + 0x8] MOVSS XMM1,dword ptr [RSP + 0x10] ADD RSP,0x18 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::NDCToPlot(ImPlot3DPoint const&) */ int8 ImPlot3D::NDCToPlot(ImPlot3DPoint *param_1) { float fVar1; long lVar2; float *pfVar3; long lVar4; float fVar5; int8 local_20 [2]; lVar2 = GImPlot3D; if (*(long *)(GImPlot3D + 0x28) == 0) { ImGui::ErrorLog("NDCToPlot() needs to be called between BeginPlot() and EndPlot()!"); } lVar2 = *(long *)(lVar2 + 0x28); SetupLock(); local_20[0] = 0; pfVar3 = (float *)(lVar2 + 0x84); lVar4 = 0; do { fVar1 = *(float *)(lVar2 + 0x1c8 + lVar4 * 4); fVar5 = *(float *)(param_1 + lVar4 * 4); if (*(char *)(pfVar3 + -3) < '\0') { fVar5 = (float)((uint)fVar5 ^ _DAT_00393610); } *(float *)((long)local_20 + lVar4 * 4) = (*pfVar3 - pfVar3[-1]) * ((fVar1 * DAT_0038f020 + fVar5) / fVar1) + pfVar3[-1]; lVar4 = lVar4 + 1; pfVar3 = pfVar3 + 0x1c; } while (lVar4 != 3); return local_20[0]; }
8,234
testing::internal::UnitTestImpl::RegisterParameterizedTests()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void UnitTestImpl::RegisterParameterizedTests() { if (!parameterized_tests_registered_) { parameterized_test_registry_.RegisterTests(); type_parameterized_test_registry_.CheckForInstantiations(); parameterized_tests_registered_ = true; } }
O1
cpp
testing::internal::UnitTestImpl::RegisterParameterizedTests(): cmpb $0x0, 0x1d0(%rdi) jne 0x21557 pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x120(%rdi), %r14 movq 0x128(%rdi), %r15 cmpq %r15, %r14 je 0x2153f movq (%r14), %rdi movq (%rdi), %rax callq *0x20(%rax) addq $0x8, %r14 jmp 0x2152b leaq 0x170(%rbx), %rdi callq 0x1a206 movb $0x1, 0x1d0(%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN7testing8internal12UnitTestImpl26RegisterParameterizedTestsEv: cmp byte ptr [rdi+1D0h], 0 jnz short locret_21557 push r15 push r14 push rbx mov rbx, rdi mov r14, [rdi+120h] mov r15, [rdi+128h] loc_2152B: cmp r14, r15 jz short loc_2153F mov rdi, [r14] mov rax, [rdi] call qword ptr [rax+20h] add r14, 8 jmp short loc_2152B loc_2153F: lea rdi, [rbx+170h]; this call _ZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEv; testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void) mov byte ptr [rbx+1D0h], 1 pop rbx pop r14 pop r15 locret_21557: retn
char * testing::internal::UnitTestImpl::RegisterParameterizedTests(testing::internal::UnitTestImpl *this) { _QWORD *v1; // r14 _QWORD *v2; // r15 char *result; // rax if ( !*((_BYTE *)this + 464) ) { v1 = (_QWORD *)*((_QWORD *)this + 36); v2 = (_QWORD *)*((_QWORD *)this + 37); while ( v1 != v2 ) { (*(void ( **)(_QWORD))(*(_QWORD *)*v1 + 32LL))(*v1); ++v1; } result = testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations((testing::internal::UnitTestImpl *)((char *)this + 368)); *((_BYTE *)this + 464) = 1; } return result; }
RegisterParameterizedTests: CMP byte ptr [RDI + 0x1d0],0x0 JNZ 0x00121557 PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x120] MOV R15,qword ptr [RDI + 0x128] LAB_0012152b: CMP R14,R15 JZ 0x0012153f MOV RDI,qword ptr [R14] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] ADD R14,0x8 JMP 0x0012152b LAB_0012153f: LEA RDI,[RBX + 0x170] CALL 0x0011a206 MOV byte ptr [RBX + 0x1d0],0x1 POP RBX POP R14 POP R15 LAB_00121557: RET
/* testing::internal::UnitTestImpl::RegisterParameterizedTests() */ void __thiscall testing::internal::UnitTestImpl::RegisterParameterizedTests(UnitTestImpl *this) { int8 *puVar1; int8 *puVar2; if (this[0x1d0] == (UnitTestImpl)0x0) { puVar1 = *(int8 **)(this + 0x128); for (puVar2 = *(int8 **)(this + 0x120); puVar2 != puVar1; puVar2 = puVar2 + 1) { (**(code **)(*(long *)*puVar2 + 0x20))(); } TypeParameterizedTestSuiteRegistry::CheckForInstantiations ((TypeParameterizedTestSuiteRegistry *)(this + 0x170)); this[0x1d0] = (UnitTestImpl)0x1; } return; }
8,235
mysql_stmt_prepare
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length) { MYSQL *mysql= stmt->mysql; int rc= 1; my_bool is_multi= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (length == (unsigned long) -1) length= (unsigned long)strlen(query); /* clear flags */ CLEAR_CLIENT_STMT_ERROR(stmt); CLEAR_CLIENT_ERROR(stmt->mysql); stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0; /* check if we have to clear results */ if (stmt->state > MYSQL_STMT_INITTED) { char stmt_id[STMT_ID_LENGTH]; is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF); /* We need to semi-close the prepared statement: reset stmt and free all buffers and close the statement on server side. Statement handle will get a new stmt_id */ if (!is_multi) ma_multi_command(mysql, COM_MULTI_ENABLED); if (mysql_stmt_internal_reset(stmt, 1)) goto fail; ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC)); ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0)); stmt->param_count= 0; stmt->field_count= 0; stmt->fields= NULL; stmt->params= NULL; int4store(stmt_id, stmt->stmt_id); if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id, sizeof(stmt_id), 1, stmt)) goto fail; } if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, query, length, 1, stmt)) goto fail; if (!is_multi && mysql->net.extension->multi_status == COM_MULTI_ENABLED) if (ma_multi_command(mysql, COM_MULTI_END)) goto fail; if (mysql->net.extension->multi_status > COM_MULTI_OFF || mysql->options.extension->skip_read_response) return 0; if (mysql->methods->db_read_prepare_response && mysql->methods->db_read_prepare_response(stmt)) goto fail; return(0); fail: stmt->state= MYSQL_STMT_INITTED; UPDATE_STMT_ERROR(stmt); return(rc); }
O0
c
mysql_stmt_prepare: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x30(%rbp) movl $0x1, -0x34(%rbp) movb $0x0, -0x35(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0xb2f64 jmp 0xb2ef5 movq -0x18(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1ffadb(%rip), %rax # 0x2b29f0 movq (%rax), %rsi movl $0x5, %edx callq 0x3a140 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1ffac1(%rip), %rax # 0x2b2a00 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x3a140 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x10(%rbp) jmp 0xb32e5 cmpq $-0x1, -0x28(%rbp) jne 0xb2f78 movq -0x20(%rbp), %rdi callq 0x3a400 movq %rax, -0x28(%rbp) jmp 0xb2f7a movq -0x18(%rbp), %rax movl $0x0, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x8a5c2(%rip), %rsi # 0x13d55c callq 0x3a410 movq -0x18(%rbp), %rax movb $0x0, 0x10c(%rax) jmp 0xb2fac movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x90(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x8a588(%rip), %rsi # 0x13d55c callq 0x3a410 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x97(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, 0x2a0(%rax) je 0xb3010 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0xb3012 movq -0x30(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x18(%rbp), %rax movq $-0x1, 0xf8(%rax) movq -0x18(%rbp), %rax cmpl $0x0, 0x50(%rax) jbe 0xb3141 movq -0x30(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x0, (%rax) seta %al andb $0x1, %al movzbl %al, %eax movb %al, -0x35(%rbp) cmpb $0x0, -0x35(%rbp) jne 0xb306b movq -0x30(%rbp), %rdi movl $0x2, %esi callq 0x9f4c0 movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0xb0c20 cmpb $0x0, %al je 0xb3082 jmp 0xb3214 movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0xad260 movq -0x18(%rbp), %rax movq 0x340(%rax), %rdi xorl %esi, %esi callq 0xad260 movq -0x18(%rbp), %rax movl $0x0, 0x64(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x60(%rax) movq -0x18(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x18(%rbp), %rax movq $0x0, 0x70(%rax) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movb %al, -0xc(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, -0xb(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, -0xa(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, -0x9(%rbp) movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rdi leaq -0xc(%rbp), %rdx movq -0x18(%rbp), %r9 movl $0x19, %esi movl $0x4, %ecx movl $0x1, %r8d callq *%rax cmpl $0x0, %eax je 0xb313f jmp 0xb3214 jmp 0xb3141 movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x18(%rbp), %r9 movl $0x16, %esi movl $0x1, %r8d callq *%rax cmpl $0x0, %eax je 0xb3177 jmp 0xb3214 cmpb $0x0, -0x35(%rbp) jne 0xb31a4 movq -0x30(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x2, (%rax) jne 0xb31a4 movq -0x30(%rbp), %rdi movl $0x4, %esi callq 0x9f4c0 cmpl $0x0, %eax je 0xb31a2 jmp 0xb3214 jmp 0xb31a4 movq -0x30(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x0, (%rax) ja 0xb31cb movq -0x30(%rbp), %rax movq 0x480(%rax), %rax movsbl 0x148(%rax), %eax cmpl $0x0, %eax je 0xb31d7 movl $0x0, -0x10(%rbp) jmp 0xb32e5 movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax cmpq $0x0, 0x40(%rax) je 0xb3208 movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0xb3208 jmp 0xb3214 movl $0x0, -0x10(%rbp) jmp 0xb32e5 movq -0x18(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x18(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x3a140 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0xb329c movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x48(%rbp) jmp 0xb32c2 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x1ff746(%rip), %rax # 0x2b2a00 movq (%rax,%rcx,8), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x3a140 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movl -0x34(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax movl %eax, -0x4c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xb3306 movl -0x4c(%rbp), %eax addq $0x50, %rsp popq %rbp retq callq 0x3a2a0 nopl (%rax,%rax)
mysql_stmt_prepare: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_30], rax mov [rbp+var_34], 1 mov [rbp+var_35], 0 mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_B2F64 jmp short $+2 loc_B2EF5: mov rax, [rbp+var_18] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_18] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_18] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov [rbp+var_10], 1 jmp loc_B32E5 loc_B2F64: cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh jnz short loc_B2F78 mov rdi, [rbp+var_20] call _strlen mov [rbp+var_28], rax loc_B2F78: jmp short $+2 loc_B2F7A: mov rax, [rbp+var_18] mov dword ptr [rax+108h], 0 mov rdi, [rbp+var_18] add rdi, 30Dh lea rsi, aSetGlobalQuery_0+1Eh; "00000" call _strcpy mov rax, [rbp+var_18] mov byte ptr [rax+10Ch], 0 jmp short $+2 loc_B2FAC: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rsi, aSetGlobalQuery_0+1Eh; "00000" call _strcpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] cmp qword ptr [rax+2A0h], 0 jz short loc_B3010 mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_B3010: jmp short $+2 loc_B3012: mov rax, [rbp+var_30] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_18] mov qword ptr [rax+0F8h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_18] cmp dword ptr [rax+50h], 0 jbe loc_B3141 mov rax, [rbp+var_30] mov rax, [rax+2A0h] cmp dword ptr [rax], 0 setnbe al and al, 1 movzx eax, al mov [rbp+var_35], al cmp [rbp+var_35], 0 jnz short loc_B306B mov rdi, [rbp+var_30] mov esi, 2 call ma_multi_command loc_B306B: mov rdi, [rbp+var_18] mov esi, 1 call mysql_stmt_internal_reset cmp al, 0 jz short loc_B3082 jmp loc_B3214 loc_B3082: mov rdi, [rbp+var_18] mov esi, 1 call ma_free_root mov rax, [rbp+var_18] mov rdi, [rax+340h] xor esi, esi call ma_free_root mov rax, [rbp+var_18] mov dword ptr [rax+64h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+60h], 0 mov rax, [rbp+var_18] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_18] mov qword ptr [rax+70h], 0 mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_C], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 8 mov [rbp+var_B], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 10h mov [rbp+var_A], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 18h mov [rbp+var_9], al mov rax, [rbp+var_30] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rdi, [rbp+var_30] lea rdx, [rbp+var_C] mov r9, [rbp+var_18] mov esi, 19h mov ecx, 4 mov r8d, 1 call rax cmp eax, 0 jz short loc_B313F jmp loc_B3214 loc_B313F: jmp short $+2 loc_B3141: mov rax, [rbp+var_30] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r9, [rbp+var_18] mov esi, 16h mov r8d, 1 call rax cmp eax, 0 jz short loc_B3177 jmp loc_B3214 loc_B3177: cmp [rbp+var_35], 0 jnz short loc_B31A4 mov rax, [rbp+var_30] mov rax, [rax+2A0h] cmp dword ptr [rax], 2 jnz short loc_B31A4 mov rdi, [rbp+var_30] mov esi, 4 call ma_multi_command cmp eax, 0 jz short loc_B31A2 jmp short loc_B3214 loc_B31A2: jmp short $+2 loc_B31A4: mov rax, [rbp+var_30] mov rax, [rax+2A0h] cmp dword ptr [rax], 0 ja short loc_B31CB mov rax, [rbp+var_30] mov rax, [rax+480h] movsx eax, byte ptr [rax+148h] cmp eax, 0 jz short loc_B31D7 loc_B31CB: mov [rbp+var_10], 0 jmp loc_B32E5 loc_B31D7: mov rax, [rbp+var_30] mov rax, [rax+4D0h] cmp qword ptr [rax+40h], 0 jz short loc_B3208 mov rax, [rbp+var_30] mov rax, [rax+4D0h] mov rax, [rax+40h] mov rdi, [rbp+var_18] call rax movsx eax, al cmp eax, 0 jz short loc_B3208 jmp short loc_B3214 loc_B3208: mov [rbp+var_10], 0 jmp loc_B32E5 loc_B3214: mov rax, [rbp+var_18] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_18] mov [rax+108h], ecx mov rdi, [rbp+var_18] add rdi, 30Dh mov rax, [rbp+var_18] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_18] add rax, 10Ch mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_B329C mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h mov [rbp+var_48], rax jmp short loc_B32C2 loc_B329C: mov rax, [rbp+var_18] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_48], rax loc_B32C2: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov eax, [rbp+var_34] mov [rbp+var_10], eax loc_B32E5: mov eax, [rbp+var_10] mov [rbp+var_4C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_B3306 mov eax, [rbp+var_4C] add rsp, 50h pop rbp retn loc_B3306: call ___stack_chk_fail
long long mysql_stmt_prepare(long long a1, long long a2, long long a3) { char *v3; // rax bool v5; // [rsp+1Bh] [rbp-35h] long long v6; // [rsp+20h] [rbp-30h] long long v7; // [rsp+28h] [rbp-28h] _BYTE v9[4]; // [rsp+44h] [rbp-Ch] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] v10 = __readfsqword(0x28u); v7 = a3; v6 = *(_QWORD *)(a1 + 56); v5 = 0; if ( v6 ) { if ( a3 == -1 ) v7 = strlen(a2); *(_DWORD *)(a1 + 264) = 0; strcpy(a1 + 781, "00000"); *(_BYTE *)(a1 + 268) = 0; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0; strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0; *(_QWORD *)(v6 + 824) = -1LL; *(_QWORD *)(a1 + 248) = -1LL; if ( !*(_DWORD *)(a1 + 80) ) goto LABEL_29; v5 = **(_DWORD **)(v6 + 672) != 0; if ( !**(_DWORD **)(v6 + 672) ) ma_multi_command(v6, 2); if ( !mysql_stmt_internal_reset(a1, 1) ) { ma_free_root((_QWORD *)a1, 1); ma_free_root(*(_QWORD **)(a1 + 832), 0); *(_DWORD *)(a1 + 100) = 0; *(_DWORD *)(a1 + 96) = 0; *(_QWORD *)(a1 + 88) = 0LL; *(_QWORD *)(a1 + 112) = 0LL; v9[0] = *(_QWORD *)(a1 + 64); v9[1] = BYTE1(*(_QWORD *)(a1 + 64)); v9[2] = BYTE2(*(_QWORD *)(a1 + 64)); v9[3] = BYTE3(*(_QWORD *)(a1 + 64)); if ( !(*(unsigned int ( **)(long long, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(v6 + 1232) + 16LL))( v6, 25LL, v9, 4LL, 1LL, a1) ) { LABEL_29: if ( !(*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v6 + 1232) + 16LL))( v6, 22LL, a2, v7, 1LL, a1) && (v5 || **(_DWORD **)(v6 + 672) != 2 || !(unsigned int)ma_multi_command(v6, 4)) ) { if ( **(_DWORD **)(v6 + 672) || *(_BYTE *)(*(_QWORD *)(v6 + 1152) + 328LL) ) return 0; if ( !*(_QWORD *)(*(_QWORD *)(v6 + 1232) + 64LL) || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)(v6 + 1232) + 64LL))(a1) ) { return 0; } } } } *(_DWORD *)(a1 + 80) = 0; *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v3 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v3 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v3, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } }
mysql_stmt_prepare: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x34],0x1 MOV byte ptr [RBP + -0x35],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x001b2f64 JMP 0x001b2ef5 LAB_001b2ef5: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d LEA RAX,[0x3b29f0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0013a140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x10c LEA RAX,[0x3b2a00] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x0013a140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x10],0x1 JMP 0x001b32e5 LAB_001b2f64: CMP qword ptr [RBP + -0x28],-0x1 JNZ 0x001b2f78 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0013a400 MOV qword ptr [RBP + -0x28],RAX LAB_001b2f78: JMP 0x001b2f7a LAB_001b2f7a: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d LEA RSI,[0x23d55c] CALL 0x0013a410 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x10c],0x0 JMP 0x001b2fac LAB_001b2fac: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RSI,[0x23d55c] CALL 0x0013a410 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x001b3010 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_001b3010: JMP 0x001b3012 LAB_001b3012: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xf8],-0x1 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x50],0x0 JBE 0x001b3141 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x0 SETA AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x35],AL CMP byte ptr [RBP + -0x35],0x0 JNZ 0x001b306b MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x2 CALL 0x0019f4c0 LAB_001b306b: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 CALL 0x001b0c20 CMP AL,0x0 JZ 0x001b3082 JMP 0x001b3214 LAB_001b3082: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 CALL 0x001ad260 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x340] XOR ESI,ESI CALL 0x001ad260 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x64],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x70],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x30] LEA RDX,[RBP + -0xc] MOV R9,qword ptr [RBP + -0x18] MOV ESI,0x19 MOV ECX,0x4 MOV R8D,0x1 CALL RAX CMP EAX,0x0 JZ 0x001b313f JMP 0x001b3214 LAB_001b313f: JMP 0x001b3141 LAB_001b3141: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x18] MOV ESI,0x16 MOV R8D,0x1 CALL RAX CMP EAX,0x0 JZ 0x001b3177 JMP 0x001b3214 LAB_001b3177: CMP byte ptr [RBP + -0x35],0x0 JNZ 0x001b31a4 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x2 JNZ 0x001b31a4 MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x4 CALL 0x0019f4c0 CMP EAX,0x0 JZ 0x001b31a2 JMP 0x001b3214 LAB_001b31a2: JMP 0x001b31a4 LAB_001b31a4: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x0 JA 0x001b31cb MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0x148] CMP EAX,0x0 JZ 0x001b31d7 LAB_001b31cb: MOV dword ptr [RBP + -0x10],0x0 JMP 0x001b32e5 LAB_001b31d7: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001b3208 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x40] MOV RDI,qword ptr [RBP + -0x18] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x001b3208 JMP 0x001b3214 LAB_001b3208: MOV dword ptr [RBP + -0x10],0x0 JMP 0x001b32e5 LAB_001b3214: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x0013a140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x10c MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x001b329c MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x48],RAX JMP 0x001b32c2 LAB_001b329c: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x3b2a00] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x48],RAX LAB_001b32c2: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x200 CALL 0x0013a140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x10],EAX LAB_001b32e5: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001b3306 MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x50 POP RBP RET LAB_001b3306: CALL 0x0013a2a0
int4 mysql_stmt_prepare(long param_1,char *param_2,size_t param_3) { long lVar1; char cVar2; int iVar3; long in_FS_OFFSET; bool bVar4; char *local_50; size_t local_30; int4 local_18; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(param_1 + 0x38); bVar4 = false; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_003b2a68,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_18 = 1; goto LAB_001b32e5; } local_30 = param_3; if (param_3 == 0xffffffffffffffff) { local_30 = strlen(param_2); } *(int4 *)(param_1 + 0x108) = 0; strcpy((char *)(param_1 + 0x30d),"00000"); *(int1 *)(param_1 + 0x10c) = 0; *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000"); *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0; } *(int8 *)(lVar1 + 0x338) = 0xffffffffffffffff; *(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff; if (*(int *)(param_1 + 0x50) == 0) { LAB_001b3141: iVar3 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x16,param_2,local_30,1,param_1); if ((iVar3 == 0) && (((bVar4 || (**(int **)(lVar1 + 0x2a0) != 2)) || (iVar3 = ma_multi_command(lVar1,4), iVar3 == 0)))) { if ((**(int **)(lVar1 + 0x2a0) != 0) || (*(char *)(*(long *)(lVar1 + 0x480) + 0x148) != '\0')) { local_18 = 0; goto LAB_001b32e5; } if ((*(long *)(*(long *)(lVar1 + 0x4d0) + 0x40) == 0) || (cVar2 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x40))(param_1), cVar2 == '\0')) { local_18 = 0; goto LAB_001b32e5; } } } else { bVar4 = **(int **)(lVar1 + 0x2a0) != 0; if (!bVar4) { ma_multi_command(lVar1,2); } cVar2 = mysql_stmt_internal_reset(param_1,1); if (cVar2 == '\0') { ma_free_root(param_1,1); ma_free_root(*(int8 *)(param_1 + 0x340),0); *(int4 *)(param_1 + 100) = 0; *(int4 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x70) = 0; local_14 = (int1)*(int8 *)(param_1 + 0x40); local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); iVar3 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x19,&local_14,4,1,param_1); if (iVar3 == 0) goto LAB_001b3141; } } *(int4 *)(param_1 + 0x50) = 0; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_50 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_50 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_50,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_18 = 1; LAB_001b32e5: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_18; }
8,236
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) { GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1"); std::vector<llama_token> result; result.reserve(idxs.size()); size_t i = 0; for (; i < draft.size(); i++) { const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first); common_sampler_accept(gsmpl, id, true); result.push_back(id); if (draft[i] != id) { break; } } if (i == draft.size()) { const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first); common_sampler_accept(gsmpl, id, true); result.push_back(id); } return result; }
O2
cpp
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq 0x8(%rcx), %rsi subq (%rcx), %rsi movq 0x8(%r8), %rax subq (%r8), %rax sarq $0x2, %rsi sarq $0x2, %rax incq %rax cmpq %rax, %rsi jne 0x9794a movl %r9d, %ebp movq %r8, %r13 movq %rcx, %r12 movq %rdx, %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) movq %rdi, 0x8(%rsp) callq 0x9854a movq (%r13), %rax xorl %ebx, %ebx movzbl %bpl, %ebp movq 0x8(%r13), %rcx subq %rax, %rcx sarq $0x2, %rcx cmpq %rcx, %rbx jae 0x978fd movq (%r12), %rax movl (%rax,%rbx,4), %edx movq %r14, %rdi movq %r15, %rsi movl %ebp, %ecx callq 0x976ec movl %eax, 0x4(%rsp) movq %r14, %rdi movl %eax, %esi pushq $0x1 popq %rdx callq 0x9759a movq 0x8(%rsp), %rdi leaq 0x4(%rsp), %rsi callq 0x52314 movq (%r13), %rax movl (%rax,%rbx,4), %ecx cmpl 0x4(%rsp), %ecx jne 0x978f2 incq %rbx jmp 0x9789c movq 0x8(%r13), %rcx subq %rax, %rcx sarq $0x2, %rcx cmpq %rbx, %rcx jne 0x97936 movq (%r12), %rax movl (%rax,%rbx,4), %edx movq %r14, %rdi movq %r15, %rsi movl %ebp, %ecx callq 0x976ec movl %eax, 0x14(%rsp) pushq $0x1 popq %rdx movq %r14, %rdi movl %eax, %esi callq 0x9759a leaq 0x14(%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x52314 movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2084c(%rip), %rdi # 0xb819d leaq 0x174e8(%rip), %rdx # 0xaee40 leaq 0x209cb(%rip), %rcx # 0xb832a movl $0x155, %esi # imm = 0x155 xorl %eax, %eax callq 0x23ed0 jmp 0x9796f jmp 0x9796f movq %rax, %r14 movq 0x8(%rsp), %rdi callq 0x27446 movq %r14, %rdi callq 0x23fa0
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rsi, [rcx+8] sub rsi, [rcx] mov rax, [r8+8] sub rax, [r8] sar rsi, 2 sar rax, 2 inc rax cmp rsi, rax jnz loc_9794A mov ebp, r9d mov r13, r8 mov r12, rcx mov r15, rdx xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 mov [rsp+48h+var_40], rdi call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong) mov rax, [r13+0] xor ebx, ebx movzx ebp, bpl loc_9789C: mov rcx, [r13+8] sub rcx, rax sar rcx, 2 cmp rbx, rcx jnb short loc_978FD mov rax, [r12] mov edx, [rax+rbx*4] mov rdi, r14 mov rsi, r15 mov ecx, ebp call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool) mov [rsp+48h+var_44], eax mov rdi, r14 mov esi, eax push 1 pop rdx call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool) mov rdi, [rsp+48h+var_40] lea rsi, [rsp+48h+var_44] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) mov rax, [r13+0] mov ecx, [rax+rbx*4] cmp ecx, [rsp+48h+var_44] jnz short loc_978F2 inc rbx jmp short loc_9789C loc_978F2: mov rcx, [r13+8] sub rcx, rax sar rcx, 2 loc_978FD: cmp rcx, rbx jnz short loc_97936 mov rax, [r12] mov edx, [rax+rbx*4] mov rdi, r14 mov rsi, r15 mov ecx, ebp call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool) mov [rsp+48h+var_34], eax push 1 pop rdx mov rdi, r14 mov esi, eax call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool) lea rsi, [rsp+48h+var_34] mov rdi, [rsp+48h+var_40] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) loc_97936: mov rax, [rsp+48h+var_40] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9794A: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"... mov esi, 155h xor eax, eax call _ggml_abort jmp short loc_9796F jmp short $+2 loc_9796F: mov r14, rax mov rdi, [rsp+48h+var_40] call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_sample_and_accept_n( _QWORD *a1, common_sampler *a2, long long a3, _QWORD *a4, long long *a5, unsigned __int8 a6) { long long v10; // rax unsigned long long i; // rbx unsigned long long v12; // rcx long long v14; // rax unsigned int v15; // [rsp+4h] [rbp-44h] BYREF _QWORD *v16; // [rsp+8h] [rbp-40h] unsigned int v17[13]; // [rsp+14h] [rbp-34h] BYREF if ( (long long)(a4[1] - *a4) >> 2 != ((a5[1] - *a5) >> 2) + 1 ) { v14 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 341LL, "GGML_ASSERT(%s) failed", "idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\""); std::_Vector_base<int>::~_Vector_base(v16); _Unwind_Resume(v14); } *(_OWORD *)a1 = 0LL; a1[2] = 0LL; v16 = a1; std::vector<int>::reserve(); v10 = *a5; for ( i = 0LL; ; ++i ) { v12 = (a5[1] - v10) >> 2; if ( i >= v12 ) break; v15 = common_sampler_sample(a2, a3, *(_DWORD *)(*a4 + 4 * i), a6); common_sampler_accept(a2, v15, 1); std::vector<int>::push_back((long long)v16, &v15); v10 = *a5; if ( *(_DWORD *)(*a5 + 4 * i) != v15 ) { v12 = (a5[1] - v10) >> 2; break; } } if ( v12 == i ) { v17[0] = common_sampler_sample(a2, a3, *(_DWORD *)(*a4 + 4 * i), a6); common_sampler_accept(a2, v17[0], 1); std::vector<int>::push_back((long long)v16, v17); } return v16; }
common_sampler_sample_and_accept_n: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RSI,qword ptr [RCX + 0x8] SUB RSI,qword ptr [RCX] MOV RAX,qword ptr [R8 + 0x8] SUB RAX,qword ptr [R8] SAR RSI,0x2 SAR RAX,0x2 INC RAX CMP RSI,RAX JNZ 0x0019794a MOV EBP,R9D MOV R13,R8 MOV R12,RCX MOV R15,RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LAB_00197888: MOV qword ptr [RSP + 0x8],RDI CALL 0x0019854a MOV RAX,qword ptr [R13] XOR EBX,EBX MOVZX EBP,BPL LAB_0019789c: MOV RCX,qword ptr [R13 + 0x8] SUB RCX,RAX SAR RCX,0x2 CMP RBX,RCX JNC 0x001978fd MOV RAX,qword ptr [R12] MOV EDX,dword ptr [RAX + RBX*0x4] LAB_001978b3: MOV RDI,R14 MOV RSI,R15 MOV ECX,EBP CALL 0x001976ec MOV dword ptr [RSP + 0x4],EAX MOV RDI,R14 MOV ESI,EAX PUSH 0x1 POP RDX CALL 0x0019759a MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x4] CALL 0x00152314 MOV RAX,qword ptr [R13] MOV ECX,dword ptr [RAX + RBX*0x4] CMP ECX,dword ptr [RSP + 0x4] JNZ 0x001978f2 INC RBX JMP 0x0019789c LAB_001978f2: MOV RCX,qword ptr [R13 + 0x8] SUB RCX,RAX SAR RCX,0x2 LAB_001978fd: CMP RCX,RBX JNZ 0x00197936 MOV RAX,qword ptr [R12] MOV EDX,dword ptr [RAX + RBX*0x4] LAB_00197909: MOV RDI,R14 MOV RSI,R15 MOV ECX,EBP CALL 0x001976ec MOV dword ptr [RSP + 0x14],EAX PUSH 0x1 POP RDX MOV RDI,R14 MOV ESI,EAX CALL 0x0019759a LEA RSI,[RSP + 0x14] MOV RDI,qword ptr [RSP + 0x8] CALL 0x00152314 LAB_00197936: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019794a: LEA RDI,[0x1b819d] LEA RDX,[0x1aee40] LEA RCX,[0x1b832a] MOV ESI,0x155 XOR EAX,EAX CALL 0x00123ed0
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, bool) */ common_sampler * common_sampler_sample_and_accept_n (common_sampler *param_1,llama_context *param_2,vector *param_3,vector *param_4, bool param_5) { long *plVar1; long lVar2; ulong uVar3; ulong uVar4; int7 in_register_00000081; bool in_R9B; int local_44; common_sampler *local_40; int local_34; uVar4 = *(long *)(param_4 + 8) - *(long *)param_4 >> 2; if (uVar4 != (*(long *)(CONCAT71(in_register_00000081,param_5) + 8) - *(long *)CONCAT71(in_register_00000081,param_5) >> 2) + 1U) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0x155 ,"GGML_ASSERT(%s) failed", "idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\""); } plVar1 = (long *)CONCAT71(in_register_00000081,param_5); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; local_40 = param_1; /* try { // try from 00197888 to 00197891 has its CatchHandler @ 0019796b */ std::vector<int,std::allocator<int>>::reserve((vector<int,std::allocator<int>> *)param_1,uVar4); lVar2 = *plVar1; uVar4 = 0; do { uVar3 = plVar1[1] - lVar2 >> 2; if (uVar3 <= uVar4) { LAB_001978fd: if (uVar3 == uVar4) { /* try { // try from 00197909 to 00197935 has its CatchHandler @ 0019796d */ local_34 = common_sampler_sample ((common_sampler *)param_2,(llama_context *)param_3, *(int *)(*(long *)param_4 + uVar4 * 4),in_R9B); common_sampler_accept((common_sampler *)param_2,local_34,true); std::vector<int,std::allocator<int>>::push_back ((vector<int,std::allocator<int>> *)local_40,&local_34); } return local_40; } /* try { // try from 001978b3 to 001978df has its CatchHandler @ 0019796f */ local_44 = common_sampler_sample ((common_sampler *)param_2,(llama_context *)param_3, *(int *)(*(long *)param_4 + uVar4 * 4),in_R9B); common_sampler_accept((common_sampler *)param_2,local_44,true); std::vector<int,std::allocator<int>>::push_back ((vector<int,std::allocator<int>> *)local_40,&local_44); lVar2 = *plVar1; if (*(int *)(lVar2 + uVar4 * 4) != local_44) { uVar3 = plVar1[1] - lVar2 >> 2; goto LAB_001978fd; } uVar4 = uVar4 + 1; } while( true ); }
8,237
ggml_pool_2d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_pool_2d( struct ggml_context * ctx, struct ggml_tensor * a, enum ggml_op_pool op, int k0, int k1, int s0, int s1, float p0, float p1) { struct ggml_tensor * result; const int64_t ne[4] = { ggml_calc_pool_output_size(a->ne[0], k0, s0, p0), ggml_calc_pool_output_size(a->ne[1], k1, s1, p1), a->ne[2], a->ne[3], }; result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { op, k0, k1, s0, s1, p0, p1 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_POOL_2D; result->src[0] = a; return result; }
O0
c
ggml_pool_2d: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movl %r8d, -0x1c(%rbp) movl %r9d, -0x20(%rbp) movss %xmm0, -0x24(%rbp) movss %xmm1, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi movl -0x18(%rbp), %esi movl -0x20(%rbp), %edx movss -0x24(%rbp), %xmm0 callq 0x52770 movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi movl -0x1c(%rbp), %esi movl 0x10(%rbp), %edx movss -0x28(%rbp), %xmm0 callq 0x52770 movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rdi leaq -0x50(%rbp), %rcx xorl %esi, %esi movl $0x4, %edx callq 0x42510 movq %rax, -0x30(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x70(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x6c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x68(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x64(%rbp) movl 0x10(%rbp), %eax movl %eax, -0x60(%rbp) cvttss2si -0x24(%rbp), %eax movl %eax, -0x5c(%rbp) cvttss2si -0x28(%rbp), %eax movl %eax, -0x58(%rbp) movq -0x30(%rbp), %rdi leaq -0x70(%rbp), %rsi movl $0x1c, %edx callq 0x4e370 movq -0x30(%rbp), %rax movl $0x34, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x30(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_pool_2d: push rbp mov rbp, rsp sub rsp, 70h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov [rbp+var_1C], r8d mov [rbp+var_20], r9d movss [rbp+var_24], xmm0 movss [rbp+var_28], xmm1 mov rax, [rbp+var_10] mov rdi, [rax+10h] mov esi, [rbp+var_18] mov edx, [rbp+var_20] movss xmm0, [rbp+var_24] call ggml_calc_pool_output_size mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rdi, [rax+18h] mov esi, [rbp+var_1C] mov edx, [rbp+arg_0] movss xmm0, [rbp+var_28] call ggml_calc_pool_output_size mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_38], rax mov rdi, [rbp+var_8] lea rcx, [rbp+var_50] xor esi, esi mov edx, 4 call _ggml_new_tensor mov [rbp+var_30], rax mov eax, [rbp+var_14] mov [rbp+var_70], eax mov eax, [rbp+var_18] mov [rbp+var_6C], eax mov eax, [rbp+var_1C] mov [rbp+var_68], eax mov eax, [rbp+var_20] mov [rbp+var_64], eax mov eax, [rbp+arg_0] mov [rbp+var_60], eax cvttss2si eax, [rbp+var_24] mov [rbp+var_5C], eax cvttss2si eax, [rbp+var_28] mov [rbp+var_58], eax mov rdi, [rbp+var_30] lea rsi, [rbp+var_70] mov edx, 1Ch call ggml_set_op_params mov rax, [rbp+var_30] mov dword ptr [rax+50h], 34h ; '4' mov rcx, [rbp+var_10] mov rax, [rbp+var_30] mov [rax+98h], rcx mov rax, [rbp+var_30] add rsp, 70h pop rbp retn
long long ggml_pool_2d(long long a1, _QWORD *a2, int a3, int a4, int a5, int a6, float a7, float a8, int a9) { _DWORD v10[8]; // [rsp+0h] [rbp-70h] BYREF _QWORD v11[4]; // [rsp+20h] [rbp-50h] BYREF long long v12; // [rsp+40h] [rbp-30h] float v13; // [rsp+48h] [rbp-28h] float v14; // [rsp+4Ch] [rbp-24h] int v15; // [rsp+50h] [rbp-20h] int v16; // [rsp+54h] [rbp-1Ch] int v17; // [rsp+58h] [rbp-18h] int v18; // [rsp+5Ch] [rbp-14h] _QWORD *v19; // [rsp+60h] [rbp-10h] long long v20; // [rsp+68h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = a6; v14 = a7; v13 = a8; v11[0] = ggml_calc_pool_output_size(a2[2], a4, a6, a7); v11[1] = ggml_calc_pool_output_size(a2[3], v16, a9, a8); v11[2] = a2[4]; v11[3] = a2[5]; v12 = ggml_new_tensor(a1, 0, 4u, (long long)v11); v10[0] = v18; v10[1] = v17; v10[2] = v16; v10[3] = v15; v10[4] = a9; v10[5] = (int)v14; v10[6] = (int)v13; ggml_set_op_params(v12, (long long)v10, 0x1CuLL); *(_DWORD *)(v12 + 80) = 52; *(_QWORD *)(v12 + 152) = v19; return v12; }
ggml_pool_2d: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV EAX,dword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x1c],R8D MOV dword ptr [RBP + -0x20],R9D MOVSS dword ptr [RBP + -0x24],XMM0 MOVSS dword ptr [RBP + -0x28],XMM1 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x20] MOVSS XMM0,dword ptr [RBP + -0x24] CALL 0x00152770 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RBP + 0x10] MOVSS XMM0,dword ptr [RBP + -0x28] CALL 0x00152770 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x8] LEA RCX,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x4 CALL 0x00142510 MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x70],EAX MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x6c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x68],EAX MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x60],EAX CVTTSS2SI EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x5c],EAX CVTTSS2SI EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x58],EAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x70] MOV EDX,0x1c CALL 0x0014e370 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x50],0x34 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x70 POP RBP RET
long ggml_pool_2d(float param_1,float param_2,int8 param_3,long param_4,int4 param_5, int4 param_6,int4 param_7,int4 param_8,int4 param_9) { int4 local_78; int4 local_74; int4 local_70; int4 local_6c; int4 local_68; int local_64; int local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; long local_38; float local_30; float local_2c; int4 local_28; int4 local_24; int4 local_20; int4 local_1c; long local_18; int8 local_10; local_30 = param_2; local_2c = param_1; local_28 = param_8; local_24 = param_7; local_20 = param_6; local_1c = param_5; local_18 = param_4; local_10 = param_3; local_58 = ggml_calc_pool_output_size(param_1,*(int8 *)(param_4 + 0x10),param_6,param_8); local_50 = ggml_calc_pool_output_size(local_30,*(int8 *)(local_18 + 0x18),local_24,param_9); local_48 = *(int8 *)(local_18 + 0x20); local_40 = *(int8 *)(local_18 + 0x28); local_38 = ggml_new_tensor(local_10,0,4,&local_58); local_78 = local_1c; local_74 = local_20; local_70 = local_24; local_6c = local_28; local_68 = param_9; local_64 = (int)local_2c; local_60 = (int)local_30; ggml_set_op_params(local_38,&local_78,0x1c); *(int4 *)(local_38 + 0x50) = 0x34; *(long *)(local_38 + 0x98) = local_18; return local_38; }
8,238
ggml_pool_2d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_pool_2d( struct ggml_context * ctx, struct ggml_tensor * a, enum ggml_op_pool op, int k0, int k1, int s0, int s1, float p0, float p1) { struct ggml_tensor * result; const int64_t ne[4] = { ggml_calc_pool_output_size(a->ne[0], k0, s0, p0), ggml_calc_pool_output_size(a->ne[1], k1, s1, p1), a->ne[2], a->ne[3], }; result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { op, k0, k1, s0, s1, p0, p1 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_POOL_2D; result->src[0] = a; return result; }
O2
c
ggml_pool_2d: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, %ebp movl %r8d, %r14d movl %ecx, %r15d movl %edx, %r12d movq %rsi, %rbx movd %r8d, %xmm3 movd %ecx, %xmm2 punpckldq %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] cvtdq2ps %xmm2, %xmm5 movd 0x90(%rsp), %xmm2 movd %r9d, %xmm3 punpckldq %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1] cvtdq2ps %xmm3, %xmm2 cvtsi2ssq 0x18(%rsi), %xmm3 cvtsi2ssq 0x10(%rsi), %xmm4 unpcklps %xmm3, %xmm4 # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1] unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movaps %xmm0, (%rsp) movaps %xmm0, %xmm1 addps %xmm0, %xmm1 addps %xmm4, %xmm1 subps %xmm5, %xmm1 divps %xmm2, %xmm1 addps 0x29600(%rip), %xmm1 # 0x4e030 cvttss2si %xmm1, %rax movq %rax, %xmm0 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %rax movq %rax, %xmm1 punpcklqdq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] leaq 0x30(%rsp), %rcx movdqa %xmm0, (%rcx) movups 0x20(%rsi), %xmm0 movaps %xmm0, 0x10(%rcx) pushq $0x4 popq %rdx xorl %esi, %esi callq 0x1d260 movq %rax, %r13 leaq 0x10(%rsp), %rsi movl %r12d, (%rsi) movl %r15d, 0x4(%rsi) movl %r14d, 0x8(%rsi) movl %ebp, 0xc(%rsi) movl 0x90(%rsp), %eax movl %eax, 0x10(%rsi) cvttps2dq (%rsp), %xmm0 movlps %xmm0, 0x14(%rsi) pushq $0x1c popq %rdx movq %r13, %rdi callq 0x2221d movl $0x34, 0x50(%r13) movq %rbx, 0x98(%r13) movq %r13, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ggml_pool_2d: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebp, r9d mov r14d, r8d mov r15d, ecx mov r12d, edx mov rbx, rsi movd xmm3, r8d movd xmm2, ecx punpckldq xmm2, xmm3 cvtdq2ps xmm5, xmm2 movd xmm2, [rsp+88h+arg_0] movd xmm3, r9d punpckldq xmm3, xmm2 cvtdq2ps xmm2, xmm3 cvtsi2ss xmm3, qword ptr [rsi+18h] cvtsi2ss xmm4, qword ptr [rsi+10h] unpcklps xmm4, xmm3 unpcklps xmm0, xmm1 movaps [rsp+88h+var_88], xmm0 movaps xmm1, xmm0 addps xmm1, xmm0 addps xmm1, xmm4 subps xmm1, xmm5 divps xmm1, xmm2 addps xmm1, cs:xmmword_4E030 cvttss2si rax, xmm1 movq xmm0, rax shufps xmm1, xmm1, 55h ; 'U' cvttss2si rax, xmm1 movq xmm1, rax punpcklqdq xmm0, xmm1 lea rcx, [rsp+88h+var_58] movdqa xmmword ptr [rcx], xmm0 movups xmm0, xmmword ptr [rsi+20h] movaps xmmword ptr [rcx+10h], xmm0 push 4 pop rdx xor esi, esi call _ggml_new_tensor mov r13, rax lea rsi, [rsp+88h+var_78] mov [rsi], r12d mov [rsi+4], r15d mov [rsi+8], r14d mov [rsi+0Ch], ebp mov eax, [rsp+88h+arg_0] mov [rsi+10h], eax cvttps2dq xmm0, [rsp+88h+var_88] movlps qword ptr [rsi+14h], xmm0 push 1Ch pop rdx mov rdi, r13 call ggml_set_op_params mov dword ptr [r13+50h], 34h ; '4' mov [r13+98h], rbx mov rax, r13 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ggml_pool_2d( long long a1, __m128i *a2, int a3, unsigned int a4, unsigned int a5, unsigned int a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, double a12, __m128 a13, __m128 a14, unsigned int a15) { __m128 v19; // xmm3 __m128 v20; // xmm2 __m128 v21; // xmm1 __m128i v22; // xmm0 __m128 v23; // xmm1 long long v24; // r13 __m128 v25; // xmm0 long long v26; // rcx long long v27; // r8 long long v28; // r9 __m128 v29; // xmm4 __m128 v30; // xmm5 __m128 v32; // [rsp+0h] [rbp-88h] _DWORD v33[5]; // [rsp+10h] [rbp-78h] BYREF double v34; // [rsp+24h] [rbp-64h] BYREF __m128i v35[5]; // [rsp+30h] [rbp-58h] BYREF v19 = (__m128)_mm_unpacklo_epi32(_mm_cvtsi32_si128(a6), _mm_cvtsi32_si128(a15)); v20 = _mm_cvtepi32_ps((__m128i)v19); v19.m128_f32[0] = (float)(int)a2[1].m128i_i64[1]; a11.m128_f32[0] = (float)(int)a2[1].m128i_i64[0]; v32 = _mm_unpacklo_ps(a7, a8); v21 = _mm_add_ps( _mm_div_ps( _mm_sub_ps( _mm_add_ps(_mm_add_ps(v32, v32), _mm_unpacklo_ps(a11, v19)), _mm_cvtepi32_ps(_mm_unpacklo_epi32(_mm_cvtsi32_si128(a4), _mm_cvtsi32_si128(a5)))), v20), (__m128)xmmword_4E030); v22 = (__m128i)(unsigned int)(int)v21.m128_f32[0]; v23 = (__m128)(unsigned int)(int)_mm_shuffle_ps(v21, v21, 85).m128_f32[0]; v35[0] = _mm_unpacklo_epi64(v22, (__m128i)v23); v35[1] = a2[2]; v24 = ggml_new_tensor(a1, 0LL, 4LL, (long long)v35); v33[0] = a3; v33[1] = a4; v33[2] = a5; v33[3] = a6; v33[4] = a15; v25 = (__m128)_mm_cvttps_epi32(v32); _mm_storel_ps(&v34, v25); ggml_set_op_params(v24, (long long)v33, 28LL, v25, v23, v20, v19, v29, v30, a13, a14, v26, v27, v28); *(_DWORD *)(v24 + 80) = 52; *(_QWORD *)(v24 + 152) = a2; return v24; }
ggml_pool_2d: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBP,R9D MOV R14D,R8D MOV R15D,ECX MOV R12D,EDX MOV RBX,RSI MOVD XMM3,R8D MOVD XMM2,ECX PUNPCKLDQ XMM2,XMM3 CVTDQ2PS XMM5,XMM2 MOVD XMM2,dword ptr [RSP + 0x90] MOVD XMM3,R9D PUNPCKLDQ XMM3,XMM2 CVTDQ2PS XMM2,XMM3 CVTSI2SS XMM3,qword ptr [RSI + 0x18] CVTSI2SS XMM4,qword ptr [RSI + 0x10] UNPCKLPS XMM4,XMM3 UNPCKLPS XMM0,XMM1 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS XMM1,XMM0 ADDPS XMM1,XMM0 ADDPS XMM1,XMM4 SUBPS XMM1,XMM5 DIVPS XMM1,XMM2 ADDPS XMM1,xmmword ptr [0x0014e030] CVTTSS2SI RAX,XMM1 MOVQ XMM0,RAX SHUFPS XMM1,XMM1,0x55 CVTTSS2SI RAX,XMM1 MOVQ XMM1,RAX PUNPCKLQDQ XMM0,XMM1 LEA RCX,[RSP + 0x30] MOVDQA xmmword ptr [RCX],XMM0 MOVUPS XMM0,xmmword ptr [RSI + 0x20] MOVAPS xmmword ptr [RCX + 0x10],XMM0 PUSH 0x4 POP RDX XOR ESI,ESI CALL 0x0011d260 MOV R13,RAX LEA RSI,[RSP + 0x10] MOV dword ptr [RSI],R12D MOV dword ptr [RSI + 0x4],R15D MOV dword ptr [RSI + 0x8],R14D MOV dword ptr [RSI + 0xc],EBP MOV EAX,dword ptr [RSP + 0x90] MOV dword ptr [RSI + 0x10],EAX CVTTPS2DQ XMM0,xmmword ptr [RSP] MOVLPS qword ptr [RSI + 0x14],XMM0 PUSH 0x1c POP RDX MOV RDI,R13 CALL 0x0012221d MOV dword ptr [R13 + 0x50],0x34 MOV qword ptr [R13 + 0x98],RBX MOV RAX,R13 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ long ggml_pool_2d(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,long param_7,int4 param_8,int param_9, int param_10,int param_11,float param_12) { long lVar1; float fVar2; float fVar3; float fVar4; float fVar6; int1 auVar5 [16]; int1 auVar7 [16]; int4 local_78; int local_74; int local_70; int local_6c; float local_68; int8 local_64; long local_58; long lStack_50; int8 local_48; int8 uStack_40; fVar6 = (float)((ulong)param_2 >> 0x20); fVar4 = (float)param_2; fVar3 = (float)((ulong)param_1 >> 0x20); fVar2 = (float)param_1; auVar7._0_4_ = (float)param_11; auVar7._4_4_ = (float)(int)param_12; auVar7._8_8_ = 0; auVar5._0_4_ = (fVar2 + fVar2 + (float)*(long *)(param_7 + 0x10)) - (float)param_9; auVar5._4_4_ = (fVar4 + fVar4 + (float)*(long *)(param_7 + 0x18)) - (float)param_10; auVar5._8_4_ = (fVar3 + fVar3 + (float)((ulong)param_5 >> 0x20)) - 0.0; auVar5._12_4_ = (fVar6 + fVar6 + param_12) - 0.0; auVar5 = divps(auVar5,auVar7); local_58 = (long)(auVar5._0_4_ + _DAT_0014e030); lStack_50 = (long)(auVar5._4_4_ + _UNK_0014e034); local_48 = *(int8 *)(param_7 + 0x20); uStack_40 = *(int8 *)(param_7 + 0x28); lVar1 = ggml_new_tensor(param_6,0,4); local_68 = param_12; local_64 = CONCAT44((int)fVar4,(int)fVar2); local_78 = param_8; local_74 = param_9; local_70 = param_10; local_6c = param_11; ggml_set_op_params(lVar1,&local_78,0x1c); *(int4 *)(lVar1 + 0x50) = 0x34; *(long *)(lVar1 + 0x98) = param_7; return lVar1; }
8,239
ggml_pool_2d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_pool_2d( struct ggml_context * ctx, struct ggml_tensor * a, enum ggml_op_pool op, int k0, int k1, int s0, int s1, float p0, float p1) { struct ggml_tensor * result; const int64_t ne[4] = { ggml_calc_pool_output_size(a->ne[0], k0, s0, p0), ggml_calc_pool_output_size(a->ne[1], k1, s1, p1), a->ne[2], a->ne[3], }; result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { op, k0, k1, s0, s1, p0, p1 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_POOL_2D; result->src[0] = a; return result; }
O3
c
ggml_pool_2d: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r9d, %ebp movl %r8d, %r14d movl %ecx, %r15d movl %edx, %r12d movq %rsi, %rbx movl 0x70(%rsp), %r13d movd %r8d, %xmm3 movd %ecx, %xmm2 punpckldq %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] cvtdq2ps %xmm2, %xmm5 movd %r13d, %xmm2 movd %r9d, %xmm3 punpckldq %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1] cvtdq2ps %xmm3, %xmm2 xorps %xmm3, %xmm3 cvtsi2ssq 0x18(%rsi), %xmm3 cvtsi2ssq 0x10(%rsi), %xmm4 unpcklps %xmm3, %xmm4 # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1] unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movaps %xmm0, (%rsp) movaps %xmm0, %xmm1 addps %xmm0, %xmm1 addps %xmm4, %xmm1 subps %xmm5, %xmm1 divps %xmm2, %xmm1 addps 0x2dd2d(%rip), %xmm1 # 0x4c0c0 cvttss2si %xmm1, %rax movq %rax, %xmm0 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %rax movq %rax, %xmm1 punpcklqdq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] leaq 0x10(%rsp), %rcx movdqa %xmm0, (%rcx) movups 0x20(%rsi), %xmm0 movaps %xmm0, 0x10(%rcx) xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f testq %rax, %rax je 0x1e410 cvttps2dq (%rsp), %xmm0 movl %r12d, 0x54(%rax) movl %r15d, 0x58(%rax) movl %r14d, 0x5c(%rax) movl %ebp, 0x60(%rax) movl %r13d, 0x64(%rax) movlps %xmm0, 0x68(%rax) movl $0x34, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x30352(%rip), %rdi # 0x4e769 leaq 0x2e247(%rip), %rdx # 0x4c665 leaq 0x30471(%rip), %rcx # 0x4e896 movl $0x70, %esi xorl %eax, %eax callq 0x17cd0
ggml_pool_2d: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov ebp, r9d mov r14d, r8d mov r15d, ecx mov r12d, edx mov rbx, rsi mov r13d, [rsp+68h+arg_0] movd xmm3, r8d movd xmm2, ecx punpckldq xmm2, xmm3 cvtdq2ps xmm5, xmm2 movd xmm2, r13d movd xmm3, r9d punpckldq xmm3, xmm2 cvtdq2ps xmm2, xmm3 xorps xmm3, xmm3 cvtsi2ss xmm3, qword ptr [rsi+18h] cvtsi2ss xmm4, qword ptr [rsi+10h] unpcklps xmm4, xmm3 unpcklps xmm0, xmm1 movaps [rsp+68h+var_68], xmm0 movaps xmm1, xmm0 addps xmm1, xmm0 addps xmm1, xmm4 subps xmm1, xmm5 divps xmm1, xmm2 addps xmm1, cs:xmmword_4C0C0 cvttss2si rax, xmm1 movq xmm0, rax shufps xmm1, xmm1, 55h ; 'U' cvttss2si rax, xmm1 movq xmm1, rax punpcklqdq xmm0, xmm1 lea rcx, [rsp+68h+var_58] movdqa xmmword ptr [rcx], xmm0 movups xmm0, xmmword ptr [rsi+20h] movaps xmmword ptr [rcx+10h], xmm0 xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl test rax, rax jz short loc_1E410 cvttps2dq xmm0, [rsp+68h+var_68] mov [rax+54h], r12d mov [rax+58h], r15d mov [rax+5Ch], r14d mov [rax+60h], ebp mov [rax+64h], r13d movlps qword ptr [rax+68h], xmm0 mov dword ptr [rax+50h], 34h ; '4' mov [rax+98h], rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1E410: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' xor eax, eax call _ggml_abort
long long ggml_pool_2d( long long a1, long long a2, int a3, unsigned int a4, unsigned int a5, unsigned int a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, unsigned int a12) { __m128 v16; // xmm3 __m128 v17; // xmm1 long long result; // rax int v19; // r8d int v20; // r9d __m128 v21; // [rsp+0h] [rbp-68h] __m128i v22; // [rsp+10h] [rbp-58h] BYREF double v23[9]; // [rsp+20h] [rbp-48h] v16 = 0LL; v16.m128_f32[0] = (float)(int)*(_QWORD *)(a2 + 24); a11.m128_f32[0] = (float)(int)*(_QWORD *)(a2 + 16); v21 = _mm_unpacklo_ps(a7, a8); v17 = _mm_add_ps( _mm_div_ps( _mm_sub_ps( _mm_add_ps(_mm_add_ps(v21, v21), _mm_unpacklo_ps(a11, v16)), _mm_cvtepi32_ps(_mm_unpacklo_epi32(_mm_cvtsi32_si128(a4), _mm_cvtsi32_si128(a5)))), _mm_cvtepi32_ps(_mm_unpacklo_epi32(_mm_cvtsi32_si128(a6), _mm_cvtsi32_si128(a12)))), (__m128)xmmword_4C0C0); v22 = _mm_unpacklo_epi64( (__m128i)(unsigned int)(int)v17.m128_f32[0], (__m128i)(unsigned int)(int)_mm_shuffle_ps(v17, v17, 85).m128_f32[0]); *(_OWORD *)v23 = *(_OWORD *)(a2 + 32); result = ggml_new_tensor_impl(a1, 0, 4u, v22.m128i_i64, 0LL, 0LL, v23[0]); if ( !result ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h", 112, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"tensor != NULL", v19, v20); *(_DWORD *)(result + 84) = a3; *(_DWORD *)(result + 88) = a4; *(_DWORD *)(result + 92) = a5; *(_DWORD *)(result + 96) = a6; *(_DWORD *)(result + 100) = a12; _mm_storel_ps((double *)(result + 104), (__m128)_mm_cvttps_epi32(v21)); *(_DWORD *)(result + 80) = 52; *(_QWORD *)(result + 152) = a2; return result; }
ggml_pool_2d: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV EBP,R9D MOV R14D,R8D MOV R15D,ECX MOV R12D,EDX MOV RBX,RSI MOV R13D,dword ptr [RSP + 0x70] MOVD XMM3,R8D MOVD XMM2,ECX PUNPCKLDQ XMM2,XMM3 CVTDQ2PS XMM5,XMM2 MOVD XMM2,R13D MOVD XMM3,R9D PUNPCKLDQ XMM3,XMM2 CVTDQ2PS XMM2,XMM3 XORPS XMM3,XMM3 CVTSI2SS XMM3,qword ptr [RSI + 0x18] CVTSI2SS XMM4,qword ptr [RSI + 0x10] UNPCKLPS XMM4,XMM3 UNPCKLPS XMM0,XMM1 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS XMM1,XMM0 ADDPS XMM1,XMM0 ADDPS XMM1,XMM4 SUBPS XMM1,XMM5 DIVPS XMM1,XMM2 ADDPS XMM1,xmmword ptr [0x0014c0c0] CVTTSS2SI RAX,XMM1 MOVQ XMM0,RAX SHUFPS XMM1,XMM1,0x55 CVTTSS2SI RAX,XMM1 MOVQ XMM1,RAX PUNPCKLQDQ XMM0,XMM1 LEA RCX,[RSP + 0x10] MOVDQA xmmword ptr [RCX],XMM0 MOVUPS XMM0,xmmword ptr [RSI + 0x20] MOVAPS xmmword ptr [RCX + 0x10],XMM0 XOR ESI,ESI MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f TEST RAX,RAX JZ 0x0011e410 CVTTPS2DQ XMM0,xmmword ptr [RSP] MOV dword ptr [RAX + 0x54],R12D MOV dword ptr [RAX + 0x58],R15D MOV dword ptr [RAX + 0x5c],R14D MOV dword ptr [RAX + 0x60],EBP MOV dword ptr [RAX + 0x64],R13D MOVLPS qword ptr [RAX + 0x68],XMM0 MOV dword ptr [RAX + 0x50],0x34 MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011e410: LEA RDI,[0x14e769] LEA RDX,[0x14c665] LEA RCX,[0x14e896] MOV ESI,0x70 XOR EAX,EAX CALL 0x00117cd0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ggml_pool_2d(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,long param_7,int4 param_8,int param_9, int param_10,int param_11,int param_12) { long lVar1; float fVar2; float fVar3; float fVar4; float fVar6; int1 auVar5 [16]; int1 auVar7 [16]; long local_58; long lStack_50; int8 local_48; int8 uStack_40; fVar6 = (float)((ulong)param_2 >> 0x20); fVar4 = (float)param_2; fVar3 = (float)((ulong)param_1 >> 0x20); fVar2 = (float)param_1; auVar7._0_4_ = (float)param_11; auVar7._4_4_ = (float)param_12; auVar7._8_8_ = 0; auVar5._0_4_ = (fVar2 + fVar2 + (float)*(long *)(param_7 + 0x10)) - (float)param_9; auVar5._4_4_ = (fVar4 + fVar4 + (float)*(long *)(param_7 + 0x18)) - (float)param_10; auVar5._8_4_ = (fVar3 + fVar3 + (float)((ulong)param_5 >> 0x20)) - 0.0; auVar5._12_4_ = (fVar6 + fVar6 + 0.0) - 0.0; auVar5 = divps(auVar5,auVar7); local_58 = (long)(auVar5._0_4_ + _DAT_0014c0c0); lStack_50 = (long)(auVar5._4_4_ + _UNK_0014c0c4); local_48 = *(int8 *)(param_7 + 0x20); uStack_40 = *(int8 *)(param_7 + 0x28); lVar1 = ggml_new_tensor_impl(param_6,0,4,&local_58,0,0); if (lVar1 != 0) { *(int4 *)(lVar1 + 0x54) = param_8; *(int *)(lVar1 + 0x58) = param_9; *(int *)(lVar1 + 0x5c) = param_10; *(int *)(lVar1 + 0x60) = param_11; *(int *)(lVar1 + 100) = param_12; *(ulong *)(lVar1 + 0x68) = CONCAT44((int)fVar4,(int)fVar2); *(int4 *)(lVar1 + 0x50) = 0x34; *(long *)(lVar1 + 0x98) = param_7; return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h" ,0x70,"GGML_ASSERT(%s) failed","tensor != NULL"); }
8,240
ftxui::operator|(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::ComponentBase> (std::shared_ptr<ftxui::ComponentBase>)>)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/util.cpp
Component operator|(Component component, ComponentDecorator decorator) { return decorator(component); // NOLINT }
O3
cpp
ftxui::operator|(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::ComponentBase> (std::shared_ptr<ftxui::ComponentBase>)>): pushq %rbx subq $0x10, %rsp movq %rdx, %rax movq %rdi, %rbx movq (%rsi), %rcx movq %rcx, (%rsp) movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rsp) testq %rcx, %rcx je 0x33855 movq 0x25769(%rip), %rdx # 0x58fb0 cmpb $0x0, (%rdx) je 0x33851 incl 0x8(%rcx) jmp 0x33855 lock incl 0x8(%rcx) cmpq $0x0, 0x10(%rax) je 0x33880 movq %rsp, %rdx movq %rbx, %rdi movq %rax, %rsi callq *0x18(%rax) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x33877 callq 0x14af8 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq callq 0xb140 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x33897 callq 0x14af8 movq %rbx, %rdi callq 0xb780
_ZN5ftxuiorESt10shared_ptrINS_13ComponentBaseEESt8functionIFS2_S2_EE: push rbx sub rsp, 10h mov rax, rdx mov rbx, rdi mov rcx, [rsi] mov [rsp+18h+var_18], rcx mov rcx, [rsi+8] mov [rsp+18h+var_10], rcx test rcx, rcx jz short loc_33855 mov rdx, cs:__libc_single_threaded_ptr cmp byte ptr [rdx], 0 jz short loc_33851 inc dword ptr [rcx+8] jmp short loc_33855 loc_33851: lock inc dword ptr [rcx+8] loc_33855: cmp qword ptr [rax+10h], 0 jz short loc_33880 mov rdx, rsp mov rdi, rbx mov rsi, rax call qword ptr [rax+18h] mov rdi, [rsp+18h+var_10] test rdi, rdi jz short loc_33877 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33877: mov rax, rbx add rsp, 10h pop rbx retn loc_33880: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax mov rdi, [rsp+18h+var_10] test rdi, rdi jz short loc_33897 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33897: mov rdi, rbx call __Unwind_Resume
long long ftxui::operator|(long long a1, long long *a2, long long a3) { volatile signed __int32 *v3; // rcx long long v5; // [rsp+0h] [rbp-18h] BYREF volatile signed __int32 *v6; // [rsp+8h] [rbp-10h] v5 = *a2; v3 = (volatile signed __int32 *)a2[1]; v6 = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v3 + 2); else _InterlockedIncrement(v3 + 2); } if ( !*(_QWORD *)(a3 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, long long, long long *))(a3 + 24))(a1, a3, &v5); if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); return a1; }
operator|: PUSH RBX SUB RSP,0x10 MOV RAX,RDX MOV RBX,RDI MOV RCX,qword ptr [RSI] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x8],RCX TEST RCX,RCX JZ 0x00133855 MOV RDX,qword ptr [0x00158fb0] CMP byte ptr [RDX],0x0 JZ 0x00133851 INC dword ptr [RCX + 0x8] JMP 0x00133855 LAB_00133851: INC.LOCK dword ptr [RCX + 0x8] LAB_00133855: CMP qword ptr [RAX + 0x10],0x0 JZ 0x00133880 LAB_0013385c: MOV RDX,RSP MOV RDI,RBX MOV RSI,RAX CALL qword ptr [RAX + 0x18] MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00133877 CALL 0x00114af8 LAB_00133877: MOV RAX,RBX ADD RSP,0x10 POP RBX RET LAB_00133880: CALL 0x0010b140
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::ComponentBase> (std::shared_ptr<ftxui::ComponentBase>)>) */ ftxui * __thiscall ftxui::operator|(ftxui *this,int8 *param_2,long param_3) { int8 local_18; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_10; local_18 = *param_2; local_10 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; if (local_10 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00158fb0 == '\0') { LOCK(); *(int *)(local_10 + 8) = *(int *)(local_10 + 8) + 1; UNLOCK(); } else { *(int *)(local_10 + 8) = *(int *)(local_10 + 8) + 1; } } if (*(long *)(param_3 + 0x10) != 0) { /* try { // try from 0013385c to 00133884 has its CatchHandler @ 00133885 */ (**(code **)(param_3 + 0x18))(this,param_3,&local_18); if (local_10 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_10); } return this; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
8,241
mi_ft_segiterator_init
eloqsql/storage/myisam/ft_update.c
void _mi_ft_segiterator_init(MI_INFO *info, uint keynr, const uchar *record, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_mi_ft_segiterator_init"); ftsi->num=info->s->keyinfo[keynr].keysegs; ftsi->seg=info->s->keyinfo[keynr].seg; ftsi->rec=record; ftsi->pos= 0; /* Avoid warnings from gcc */ ftsi->len= 0; /* Avoid warnings from gcc */ DBUG_VOID_RETURN; }
O0
c
mi_ft_segiterator_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x28(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x20(%rbp), %rax movl $0x0, 0x4(%rax) jmp 0xa2b5e popq %rbp retq
_mi_ft_segiterator_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_C] imul rcx, 70h ; 'p' add rax, rcx movzx ecx, word ptr [rax+8] mov rax, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_C] imul rcx, 70h ; 'p' add rax, rcx mov rcx, [rax+28h] mov rax, [rbp+var_20] mov [rax+8], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+10h], rcx mov rax, [rbp+var_20] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_20] mov dword ptr [rax+4], 0 jmp short $+2 loc_A2B5E: pop rbp retn
long long mi_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4) { long long result; // rax *(_DWORD *)a4 = *(unsigned __int16 *)(112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 8); *(_QWORD *)(a4 + 8) = *(_QWORD *)(112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 40); *(_QWORD *)(a4 + 16) = a3; *(_QWORD *)(a4 + 24) = 0LL; result = a4; *(_DWORD *)(a4 + 4) = 0; return result; }
_mi_ft_segiterator_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x70 ADD RAX,RCX MOVZX ECX,word ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x4],0x0 JMP 0x001a2b5e LAB_001a2b5e: POP RBP RET
void _mi_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4) { *param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 8); *(int8 *)(param_4 + 2) = *(int8 *)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x28); *(int8 *)(param_4 + 4) = param_3; param_4[6] = 0; param_4[7] = 0; param_4[1] = 0; return; }
8,242
inline_mysql_cond_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_destroy( mysql_cond_t *that) { #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_COND_CALL(destroy_cond)(that->m_psi); that->m_psi= NULL; } #endif return pthread_cond_destroy(&that->m_cond); }
O0
c
inline_mysql_cond_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x41ef4 leaq 0x27e361(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rdi callq 0x2a260 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_cond_destroy_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 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_41EF4 lea rax, PSI_server mov rax, [rax] mov rax, [rax+68h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 loc_41EF4: mov rdi, [rbp+var_8] call _pthread_cond_destroy add rsp, 10h pop rbp retn
long long inline_mysql_cond_destroy_0(long long a1) { if ( *(_QWORD *)(a1 + 48) ) { ((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a1 + 48) = 0LL; } return pthread_cond_destroy(a1); }
inline_mysql_cond_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],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 0x00141ef4 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 LAB_00141ef4: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a260 ADD RSP,0x10 POP RBP RET
void inline_mysql_cond_destroy(pthread_cond_t *param_1) { if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x68))(param_1[1].__align); param_1[1].__align = 0; } pthread_cond_destroy(param_1); return; }
8,243
net_field_length_ll
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static unsigned long long net_field_length_ll(uchar **packet) { reg1 uchar *pos= *packet; if (*pos < 251) { (*packet)++; return (unsigned long long) *pos; } if (*pos == 251) { (*packet)++; return (unsigned long long) NULL_LENGTH; } if (*pos == 252) { (*packet)+=3; return (unsigned long long) uint2korr(pos+1); } if (*pos == 253) { (*packet)+=4; return (unsigned long long) uint3korr(pos+1); } (*packet)+=9; /* Must be 254 when here */ #ifdef NO_CLIENT_LONGLONG return (unsigned long long) uint4korr(pos+1); #else return (unsigned long long) uint8korr(pos+1); #endif }
O3
c
net_field_length_ll: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movzbl (%rax), %ecx cmpl $0xfa, %ecx ja 0x1aca6 leaq 0x1(%rax), %rcx movq %rcx, (%rdi) movzbl (%rax), %eax popq %rbp retq cmpl $0xfd, %ecx je 0x1acda cmpl $0xfc, %ecx je 0x1accd cmpl $0xfb, %ecx jne 0x1acf1 incq %rax movq %rax, (%rdi) movq $-0x1, %rax jmp 0x1aca4 leaq 0x3(%rax), %rcx movq %rcx, (%rdi) movzwl 0x1(%rax), %eax jmp 0x1aca4 leaq 0x4(%rax), %rcx movq %rcx, (%rdi) movzwl 0x1(%rax), %ecx movzbl 0x3(%rax), %eax shll $0x10, %eax orq %rcx, %rax jmp 0x1aca4 leaq 0x9(%rax), %rcx movq %rcx, (%rdi) movq 0x1(%rax), %rax jmp 0x1aca4
net_field_length_ll: push rbp mov rbp, rsp mov rax, [rdi] movzx ecx, byte ptr [rax] cmp ecx, 0FAh ja short loc_1ACA6 lea rcx, [rax+1] mov [rdi], rcx movzx eax, byte ptr [rax] loc_1ACA4: pop rbp retn loc_1ACA6: cmp ecx, 0FDh jz short loc_1ACDA cmp ecx, 0FCh jz short loc_1ACCD cmp ecx, 0FBh jnz short loc_1ACF1 inc rax mov [rdi], rax mov rax, 0FFFFFFFFFFFFFFFFh jmp short loc_1ACA4 loc_1ACCD: lea rcx, [rax+3] mov [rdi], rcx movzx eax, word ptr [rax+1] jmp short loc_1ACA4 loc_1ACDA: lea rcx, [rax+4] mov [rdi], rcx movzx ecx, word ptr [rax+1] movzx eax, byte ptr [rax+3] shl eax, 10h or rax, rcx jmp short loc_1ACA4 loc_1ACF1: lea rcx, [rax+9] mov [rdi], rcx mov rax, [rax+1] jmp short loc_1ACA4
unsigned long long net_field_length_ll(unsigned __int8 **a1) { unsigned __int8 *v1; // rax unsigned int v2; // ecx v1 = *a1; v2 = **a1; if ( v2 > 0xFA ) { switch ( v2 ) { case 0xFDu: *a1 = v1 + 4; return *(unsigned __int16 *)(v1 + 1) | (unsigned long long)(v1[3] << 16); case 0xFCu: *a1 = v1 + 3; return *(unsigned __int16 *)(v1 + 1); case 0xFBu: *a1 = v1 + 1; return -1LL; default: *a1 = v1 + 9; return *(_QWORD *)(v1 + 1); } } else { *a1 = v1 + 1; return *v1; } }
net_field_length_ll: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOVZX ECX,byte ptr [RAX] CMP ECX,0xfa JA 0x0011aca6 LEA RCX,[RAX + 0x1] MOV qword ptr [RDI],RCX MOVZX EAX,byte ptr [RAX] LAB_0011aca4: POP RBP RET LAB_0011aca6: CMP ECX,0xfd JZ 0x0011acda CMP ECX,0xfc JZ 0x0011accd CMP ECX,0xfb JNZ 0x0011acf1 INC RAX MOV qword ptr [RDI],RAX MOV RAX,-0x1 JMP 0x0011aca4 LAB_0011accd: LEA RCX,[RAX + 0x3] MOV qword ptr [RDI],RCX MOVZX EAX,word ptr [RAX + 0x1] JMP 0x0011aca4 LAB_0011acda: LEA RCX,[RAX + 0x4] MOV qword ptr [RDI],RCX MOVZX ECX,word ptr [RAX + 0x1] MOVZX EAX,byte ptr [RAX + 0x3] SHL EAX,0x10 OR RAX,RCX JMP 0x0011aca4 LAB_0011acf1: LEA RCX,[RAX + 0x9] MOV qword ptr [RDI],RCX MOV RAX,qword ptr [RAX + 0x1] JMP 0x0011aca4
ulong net_field_length_ll(long *param_1) { byte bVar1; byte *pbVar2; ulong uVar3; pbVar2 = (byte *)*param_1; bVar1 = *pbVar2; if (bVar1 < 0xfb) { *param_1 = (long)(pbVar2 + 1); uVar3 = (ulong)*pbVar2; } else if (bVar1 == 0xfd) { *param_1 = (long)(pbVar2 + 4); uVar3 = (ulong)*(uint3 *)(pbVar2 + 1); } else if (bVar1 == 0xfc) { *param_1 = (long)(pbVar2 + 3); uVar3 = (ulong)*(ushort *)(pbVar2 + 1); } else if (bVar1 == 0xfb) { *param_1 = (long)(pbVar2 + 1); uVar3 = 0xffffffffffffffff; } else { *param_1 = (long)(pbVar2 + 9); uVar3 = *(ulong *)(pbVar2 + 1); } return uVar3; }
8,244
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(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
iterator find(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
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(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x82d25 movq %r14, %rdi movq %rbx, %rsi callq 0x2d1c8 testb %al, %al jne 0x82d22 addq $0x30, %r14 jmp 0x82d04 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_EEE4findERSH_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_82D04: mov rax, [r15+8] cmp r14, rax jz short loc_82D25 mov rdi, r14 mov rsi, rbx call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, al jnz short loc_82D22 add r14, 30h ; '0' jmp short loc_82D04 loc_82D22: mov rax, r14 loc_82D25: pop rbx pop r14 pop r15 retn
_QWORD * 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>>>>::find( long long a1, _QWORD *a2) { _QWORD *i; // r14 _QWORD *result; // rax for ( i = *(_QWORD **)a1; ; i += 6 ) { result = *(_QWORD **)(a1 + 8); if ( i == result ) break; if ( std::operator==<char>(i, a2) ) return i; } return result; }
find: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_00182d04: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x00182d25 MOV RDI,R14 MOV RSI,RBX CALL 0x0012d1c8 TEST AL,AL JNZ 0x00182d22 ADD R14,0x30 JMP 0x00182d04 LAB_00182d22: MOV RAX,R14 LAB_00182d25: POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::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> > > >::find(std::__cxx11::string const&) */ string * __thiscall nlohmann::json_abi_v3_11_3:: 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>>>> ::find(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,string *param_1) { char cVar1; string *psVar2; string *psVar3; psVar3 = *(string **)this; while ((psVar2 = *(string **)(this + 8), psVar3 != *(string **)(this + 8) && (cVar1 = std::operator==(psVar3,param_1), psVar2 = psVar3, cVar1 == '\0'))) { psVar3 = psVar3 + 0x30; } return psVar2; }
8,245
l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*)
eloqsql/mysys/lf_hash.cc
static int l_delete(LF_SLIST **head, CHARSET_INFO *cs, uint32 hashnr, const uchar *key, uint keylen, LF_PINS *pins) { CURSOR cursor; int res; for (;;) { if (!l_find(head, cs, hashnr, key, keylen, &cursor, pins, 0)) { res= 1; /* not found */ break; } else { /* mark the node deleted */ if (my_atomic_casptr((void **) (char*) &(cursor.curr->link), (void **) (char*) &cursor.next, (void *)(((intptr)cursor.next) | 1))) { /* and remove it from the list */ if (my_atomic_casptr((void **)cursor.prev, (void **)(char*)&cursor.curr, cursor.next)) lf_alloc_free(pins, cursor.curr); else { /* somebody already "helped" us and removed the node ? Let's check if we need to help that someone too! (to ensure the number of "set DELETED flag" actions is equal to the number of "remove from the list" actions) */ l_find(head, cs, hashnr, key, keylen, &cursor, pins, 0); } res= 0; break; } } } lf_unpin(pins, 0); lf_unpin(pins, 1); lf_unpin(pins, 2); return res; }
O0
cpp
l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*): pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d movq -0x30(%rbp), %rax leaq -0x48(%rbp), %r9 xorl %r10d, %r10d movq %rax, (%rsp) movq $0x0, 0x8(%rsp) callq 0xfe1e0 cmpl $0x0, %eax jne 0xfdd55 movl $0x1, -0x4c(%rbp) jmp 0xfde68 leaq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rax orq $0x1, %rax movq %rax, -0x58(%rbp) movq -0x38(%rbp), %rax movq -0x58(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0x91(%rbp) movq %rcx, -0x90(%rbp) testb $0x1, %al jne 0xfdda5 movq -0xa0(%rbp), %rax movq -0x90(%rbp), %rcx movq %rcx, (%rax) movb -0x91(%rbp), %al andb $0x1, %al movb %al, -0x59(%rbp) testb $0x1, -0x59(%rbp) je 0xfde61 leaq -0x40(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0x48(%rbp), %rcx movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x40(%rbp), %rax movq -0x68(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0xa9(%rbp) movq %rcx, -0xa8(%rbp) testb $0x1, %al jne 0xfde06 movq -0xb8(%rbp), %rax movq -0xa8(%rbp), %rcx movq %rcx, (%rax) movb -0xa9(%rbp), %al andb $0x1, %al movb %al, -0x69(%rbp) testb $0x1, -0x69(%rbp) je 0xfde26 movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0xfc770 jmp 0xfde58 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d movq -0x30(%rbp), %rax leaq -0x48(%rbp), %r9 xorl %r10d, %r10d movq %rax, (%rsp) movq $0x0, 0x8(%rsp) callq 0xfe1e0 movl $0x0, -0x4c(%rbp) jmp 0xfde68 jmp 0xfde63 jmp 0xfdd12 jmp 0xfde6a jmp 0xfde6c jmp 0xfde6e movq -0x30(%rbp), %rcx movq $0x0, -0x78(%rbp) movq -0x78(%rbp), %rax xchgq %rax, (%rcx) jmp 0xfde83 jmp 0xfde85 jmp 0xfde87 movq -0x30(%rbp), %rcx movq $0x0, -0x80(%rbp) movq -0x80(%rbp), %rax xchgq %rax, 0x8(%rcx) jmp 0xfde9d jmp 0xfde9f jmp 0xfdea1 movq -0x30(%rbp), %rcx movq $0x0, -0x88(%rbp) movq -0x88(%rbp), %rax xchgq %rax, 0x10(%rcx) movl -0x4c(%rbp), %eax addq $0xd0, %rsp popq %rbp retq nopw (%rax,%rax)
_ZL8l_deletePP8LF_SLISTPK15charset_info_stjPKhjP7LF_PINS: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 loc_FDD12: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax mov rax, [rbp+var_30] lea r9, [rbp+var_48] xor r10d, r10d mov [rsp+0D0h+var_D0], rax mov [rsp+0D0h+var_C8], 0 call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *)) cmp eax, 0 jnz short loc_FDD55 mov [rbp+var_4C], 1 jmp loc_FDE68 loc_FDD55: lea rax, [rbp+var_38] mov [rbp+var_A0], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_38] or rax, 1 mov [rbp+var_58], rax mov rax, [rbp+var_38] mov rdx, [rbp+var_58] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_91], al mov [rbp+var_90], rcx test al, 1 jnz short loc_FDDA5 mov rax, [rbp+var_A0] mov rcx, [rbp+var_90] mov [rax], rcx loc_FDDA5: mov al, [rbp+var_91] and al, 1 mov [rbp+var_59], al test [rbp+var_59], 1 jz loc_FDE61 lea rax, [rbp+var_40] mov [rbp+var_B8], rax mov rcx, [rbp+var_48] mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rax, [rbp+var_40] mov rdx, [rbp+var_68] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_A9], al mov [rbp+var_A8], rcx test al, 1 jnz short loc_FDE06 mov rax, [rbp+var_B8] mov rcx, [rbp+var_A8] mov [rax], rcx loc_FDE06: mov al, [rbp+var_A9] and al, 1 mov [rbp+var_69], al test [rbp+var_69], 1 jz short loc_FDE26 mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] call lf_pinbox_free jmp short loc_FDE58 loc_FDE26: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax mov rax, [rbp+var_30] lea r9, [rbp+var_48] xor r10d, r10d mov [rsp+0D0h+var_D0], rax mov [rsp+0D0h+var_C8], 0 call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *)) loc_FDE58: mov [rbp+var_4C], 0 jmp short loc_FDE68 loc_FDE61: jmp short $+2 loc_FDE63: jmp loc_FDD12 loc_FDE68: jmp short $+2 loc_FDE6A: jmp short $+2 loc_FDE6C: jmp short $+2 loc_FDE6E: mov rcx, [rbp+var_30] mov [rbp+var_78], 0 mov rax, [rbp+var_78] xchg rax, [rcx] jmp short $+2 loc_FDE83: jmp short $+2 loc_FDE85: jmp short $+2 loc_FDE87: mov rcx, [rbp+var_30] mov [rbp+var_80], 0 mov rax, [rbp+var_80] xchg rax, [rcx+8] jmp short $+2 loc_FDE9D: jmp short $+2 loc_FDE9F: jmp short $+2 loc_FDEA1: mov rcx, [rbp+var_30] mov [rbp+var_88], 0 mov rax, [rbp+var_88] xchg rax, [rcx+10h] mov eax, [rbp+var_4C] add rsp, 0D0h pop rbp retn
long long l_delete(long long a1, long long a2, int a3, long long a4, int a5, volatile long long *a6) { signed long long v6; // rax signed long long v7; // rtt char *v8; // rtt const char *v9; // rcx bool v11; // [rsp+27h] [rbp-A9h] bool v12; // [rsp+3Fh] [rbp-91h] unsigned int v13; // [rsp+84h] [rbp-4Ch] volatile signed long long *v14; // [rsp+88h] [rbp-48h] BYREF char *v15; // [rsp+90h] [rbp-40h] signed long long v16; // [rsp+98h] [rbp-38h] volatile long long *v17; // [rsp+A0h] [rbp-30h] int v18; // [rsp+ACh] [rbp-24h] long long v19; // [rsp+B0h] [rbp-20h] int v20; // [rsp+BCh] [rbp-14h] long long v21; // [rsp+C0h] [rbp-10h] long long v22; // [rsp+C8h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; do { if ( !(unsigned int)l_find(v22, v21, v20, v19, v18, (unsigned int)&v14, (long long)v17, 0LL) ) { v13 = 1; goto LABEL_14; } v7 = v16; v6 = _InterlockedCompareExchange64((volatile signed long long *)v15, v16 | 1, v16); v12 = v7 == v6; if ( v7 != v6 ) v16 = v6; } while ( !v12 ); v8 = v15; v9 = (const char *)_InterlockedCompareExchange64(v14, v16, (signed long long)v15); v11 = v8 == v9; if ( v8 != v9 ) v15 = (char *)v9; if ( v11 ) lf_pinbox_free((long long)v17, v15); else l_find(v22, v21, v20, v19, v18, (unsigned int)&v14, (long long)v17, 0LL); v13 = 0; LABEL_14: _InterlockedExchange64(v17, 0LL); _InterlockedExchange64(v17 + 1, 0LL); _InterlockedExchange64(v17 + 2, 0LL); return v13; }
l_delete: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LAB_001fdd12: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX MOV RAX,qword ptr [RBP + -0x30] LEA R9,[RBP + -0x48] XOR R10D,R10D MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 CALL 0x001fe1e0 CMP EAX,0x0 JNZ 0x001fdd55 MOV dword ptr [RBP + -0x4c],0x1 JMP 0x001fde68 LAB_001fdd55: LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] OR RAX,0x1 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x58] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x91],AL MOV qword ptr [RBP + -0x90],RCX TEST AL,0x1 JNZ 0x001fdda5 MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x90] MOV qword ptr [RAX],RCX LAB_001fdda5: MOV AL,byte ptr [RBP + -0x91] AND AL,0x1 MOV byte ptr [RBP + -0x59],AL TEST byte ptr [RBP + -0x59],0x1 JZ 0x001fde61 LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0xb8],RAX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x68] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0xa9],AL MOV qword ptr [RBP + -0xa8],RCX TEST AL,0x1 JNZ 0x001fde06 MOV RAX,qword ptr [RBP + -0xb8] MOV RCX,qword ptr [RBP + -0xa8] MOV qword ptr [RAX],RCX LAB_001fde06: MOV AL,byte ptr [RBP + -0xa9] AND AL,0x1 MOV byte ptr [RBP + -0x69],AL TEST byte ptr [RBP + -0x69],0x1 JZ 0x001fde26 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] CALL 0x001fc770 JMP 0x001fde58 LAB_001fde26: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX MOV RAX,qword ptr [RBP + -0x30] LEA R9,[RBP + -0x48] XOR R10D,R10D MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 CALL 0x001fe1e0 LAB_001fde58: MOV dword ptr [RBP + -0x4c],0x0 JMP 0x001fde68 LAB_001fde61: JMP 0x001fde63 LAB_001fde63: JMP 0x001fdd12 LAB_001fde68: JMP 0x001fde6a LAB_001fde6a: JMP 0x001fde6c LAB_001fde6c: JMP 0x001fde6e LAB_001fde6e: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x78],0x0 MOV RAX,qword ptr [RBP + -0x78] XCHG qword ptr [RCX],RAX JMP 0x001fde83 LAB_001fde83: JMP 0x001fde85 LAB_001fde85: JMP 0x001fde87 LAB_001fde87: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x80],0x0 MOV RAX,qword ptr [RBP + -0x80] XCHG qword ptr [RCX + 0x8],RAX JMP 0x001fde9d LAB_001fde9d: JMP 0x001fde9f LAB_001fde9f: JMP 0x001fdea1 LAB_001fdea1: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x88],0x0 MOV RAX,qword ptr [RBP + -0x88] XCHG qword ptr [RCX + 0x10],RAX MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0xd0 POP RBP RET
/* l_delete(LF_SLIST**, charset_info_st const*, unsigned int, unsigned char const*, unsigned int, LF_PINS*) */ int4 l_delete(LF_SLIST **param_1,charset_info_st *param_2,uint param_3,uchar *param_4,uint param_5, LF_PINS *param_6) { ulong *puVar1; int iVar2; ulong uVar3; bool bVar4; int4 local_54; ulong *local_50; ulong *local_48; ulong local_40; LF_PINS *local_38; uint local_2c; uchar *local_28; uint local_1c; charset_info_st *local_18; LF_SLIST **local_10; uVar3 = local_40; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; do { local_40 = uVar3; iVar2 = l_find(local_10,local_18,local_1c,local_28,(ulong)local_2c,(CURSOR *)&local_50,local_38, (_func_char_void_ptr_void_ptr *)0x0); if (iVar2 == 0) { local_54 = 1; goto LAB_001fde68; } LOCK(); uVar3 = *local_48; bVar4 = local_40 == uVar3; if (bVar4) { *local_48 = local_40 | 1; uVar3 = local_40; } UNLOCK(); } while (!bVar4); LOCK(); puVar1 = (ulong *)*local_50; if (local_48 == puVar1) { *local_50 = local_40; } UNLOCK(); if (local_48 == puVar1) { lf_pinbox_free(local_38,local_48); } else { l_find(local_10,local_18,local_1c,local_28,(ulong)local_2c,(CURSOR *)&local_50,local_38, (_func_char_void_ptr_void_ptr *)0x0); } local_54 = 0; LAB_001fde68: LOCK(); *(int8 *)local_38 = 0; UNLOCK(); LOCK(); *(int8 *)(local_38 + 8) = 0; UNLOCK(); LOCK(); *(int8 *)(local_38 + 0x10) = 0; UNLOCK(); return local_54; }
8,246
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; }
O0
c
ma_once_init_block_record: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x3e0(%rax), %eax subl $0x1, %eax shll $0x3, %eax movl %eax, %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax shrq %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x73ef1 movq $-0x1, -0x18(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi leaq -0x18(%rbp), %rdx callq 0x41450 movb %al, -0xd(%rbp) movq -0x18(%rbp), %rdi addq $0x1, %rdi movq -0x8(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, %esi callq 0x63830 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x368(%rax) movb -0xd(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_once_init_block_record: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov eax, [rax+3E0h] sub eax, 1 shl eax, 3 mov eax, eax mov ecx, eax mov eax, 1 shl rax, cl shr rax, 1 mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_73EF1 mov [rbp+var_18], 0FFFFFFFFFFFFFFFFh loc_73EF1: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] lea rdx, [rbp+var_18] call _ma_bitmap_init mov [rbp+var_D], al mov rdi, [rbp+var_18] add rdi, 1 mov rax, [rbp+var_8] mov eax, [rax+7BCh] mov esi, eax call _ma_safe_mul mov rcx, rax mov rax, [rbp+var_8] mov [rax+368h], rcx mov al, [rbp+var_D] add rsp, 20h pop rbp retn
char ma_once_init_block_record(long long a1, int a2) { long long v2; // rcx unsigned long long v4; // [rsp+8h] [rbp-18h] BYREF char v5; // [rsp+13h] [rbp-Dh] int v6; // [rsp+14h] [rbp-Ch] long long v7; // [rsp+18h] [rbp-8h] v7 = a1; v6 = a2; v4 = (unsigned long long)(1LL << (8 * (*(_BYTE *)(a1 + 992) - 1))) >> 1; if ( !v4 ) v4 = -1LL; v5 = ma_bitmap_init(v7, v6, &v4); v2 = ma_safe_mul(v4 + 1, *(unsigned int *)(v7 + 1980)); *(_QWORD *)(v7 + 872) = v2; return v5; }
_ma_once_init_block_record: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x3e0] SUB EAX,0x1 SHL EAX,0x3 MOV EAX,EAX MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL SHR RAX,0x1 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00173ef1 MOV qword ptr [RBP + -0x18],-0x1 LAB_00173ef1: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] LEA RDX,[RBP + -0x18] CALL 0x00141450 MOV byte ptr [RBP + -0xd],AL MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x1 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x7bc] MOV ESI,EAX CALL 0x00163830 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x368],RCX MOV AL,byte ptr [RBP + -0xd] ADD RSP,0x20 POP RBP RET
int1 _ma_once_init_block_record(long param_1,int4 param_2) { int8 uVar1; ulong local_20; int1 local_15; int4 local_14; long local_10; local_20 = (ulong)(1L << (((char)*(int4 *)(param_1 + 0x3e0) + -1) * '\b' & 0x3fU)) >> 1; if (local_20 == 0) { local_20 = 0xffffffffffffffff; } local_14 = param_2; local_10 = param_1; local_15 = _ma_bitmap_init(param_1,param_2,&local_20); uVar1 = _ma_safe_mul(local_20 + 1,*(int4 *)(local_10 + 0x7bc)); *(int8 *)(local_10 + 0x368) = uVar1; return local_15; }
8,247
LefDefParser::defwSpecialNetPathPoint(int, double*, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwSpecialNetPathPoint(int numPts, double *pointx, double *pointy) { int i; defwFunc = DEFW_PATH; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PATH) return DEFW_BAD_ORDER; printPointsNum = 0; for (i = 0; i < numPts; i++) { if ((++defwLineItemCounter & 3) == 0) { fprintf(defwFile, "\n "); defwLines++; } printPoints(defwFile, pointx[i], pointy[i], " ", ""); } return DEFW_OK; }
O0
cpp
LefDefParser::defwSpecialNetPathPoint(int, double*, double*): subq $0x28, %rsp movl %edi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) leaq 0x12b8f(%rip), %rax # 0x2b168 movl $0x37, (%rax) leaq 0x12b72(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x185f9 movl $0x1, 0x24(%rsp) jmp 0x186cf leaq 0x12b64(%rip), %rax # 0x2b164 cmpl $0x37, (%rax) je 0x18612 movl $0x2, 0x24(%rsp) jmp 0x186cf movl $0x0, 0x12b78(%rip) # 0x2b194 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x20(%rsp), %eax jge 0x186c7 leaq 0x12b43(%rip), %rax # 0x2b17c movl (%rax), %eax addl $0x1, %eax leaq 0x12b37(%rip), %rcx # 0x2b17c movl %eax, (%rcx) andl $0x3, %eax cmpl $0x0, %eax jne 0x1867c leaq 0x12b02(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0xc398(%rip), %rsi # 0x249f8 movb $0x0, %al callq 0x10f0 leaq 0x12af2(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x12ae6(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0x12ad5(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x18(%rsp), %rax movslq 0xc(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movq 0x10(%rsp), %rax movslq 0xc(%rsp), %rcx movsd (%rax,%rcx,8), %xmm1 leaq 0xc352(%rip), %rsi # 0x249fd leaq 0xba46(%rip), %rdx # 0x240f8 callq 0x13650 movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x18624 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN12LefDefParser23defwSpecialNetPathPointEiPdS0_: sub rsp, 28h mov [rsp+28h+var_8], edi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 37h ; '7' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_185F9 mov [rsp+28h+var_4], 1 jmp loc_186CF loc_185F9: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 37h ; '7' jz short loc_18612 mov [rsp+28h+var_4], 2 jmp loc_186CF loc_18612: mov cs:_ZN12LefDefParserL14printPointsNumE, 0; LefDefParser::printPointsNum mov [rsp+28h+var_1C], 0 loc_18624: mov eax, [rsp+28h+var_1C] cmp eax, [rsp+28h+var_8] jge loc_186C7 lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov eax, [rax] add eax, 1 lea rcx, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov [rcx], eax and eax, 3 cmp eax, 0 jnz short loc_1867C lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, asc_249F8; "\n " mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx loc_1867C: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] movsxd rcx, [rsp+28h+var_1C] movsd xmm0, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_18] movsxd rcx, [rsp+28h+var_1C] movsd xmm1, qword ptr [rax+rcx*8] lea rsi, asc_249F8+5; " " lea rdx, asc_240F5+3; "" call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*) mov eax, [rsp+28h+var_1C] add eax, 1 mov [rsp+28h+var_1C], eax jmp loc_18624 loc_186C7: mov [rsp+28h+var_4], 0 loc_186CF: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long LefDefParser::defwSpecialNetPathPoint(LefDefParser *this, long long a2, double *a3, double *a4) { int i; // [rsp+Ch] [rbp-1Ch] LefDefParser::defwFunc = 55; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 55 ) { LefDefParser::printPointsNum = 0; for ( i = 0; i < (int)this; ++i ) { if ( (++LefDefParser::defwLineItemCounter & 3) == 0 ) { fprintf(LefDefParser::defwFile, "\n "); ++LefDefParser::defwLines; } LefDefParser::printPoints(LefDefParser::defwFile, " ", "", *(double *)(a2 + 8LL * i), a3[i]); } return 0; } else { return 2; } } else { return 1; } }
defwSpecialNetPathPoint: SUB RSP,0x28 MOV dword ptr [RSP + 0x20],EDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX LEA RAX,[0x12b168] MOV dword ptr [RAX],0x37 LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x001185f9 MOV dword ptr [RSP + 0x24],0x1 JMP 0x001186cf LAB_001185f9: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x37 JZ 0x00118612 MOV dword ptr [RSP + 0x24],0x2 JMP 0x001186cf LAB_00118612: MOV dword ptr [0x0012b194],0x0 MOV dword ptr [RSP + 0xc],0x0 LAB_00118624: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x20] JGE 0x001186c7 LEA RAX,[0x12b17c] MOV EAX,dword ptr [RAX] ADD EAX,0x1 LEA RCX,[0x12b17c] MOV dword ptr [RCX],EAX AND EAX,0x3 CMP EAX,0x0 JNZ 0x0011867c LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x1249f8] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LAB_0011867c: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0xc] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0xc] MOVSD XMM1,qword ptr [RAX + RCX*0x8] LEA RSI,[0x1249fd] LEA RDX,[0x1240f8] CALL 0x00113650 MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x00118624 LAB_001186c7: MOV dword ptr [RSP + 0x24],0x0 LAB_001186cf: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* LefDefParser::defwSpecialNetPathPoint(int, double*, double*) */ int4 LefDefParser::defwSpecialNetPathPoint(int param_1,double *param_2,double *param_3) { int local_1c; int4 local_4; defwFunc = 0x37; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwState == 0x37) { printPointsNum = 0; for (local_1c = 0; local_1c < param_1; local_1c = local_1c + 1) { defwLineItemCounter = defwLineItemCounter + 1; if ((defwLineItemCounter & 3) == 0) { fprintf(defwFile,"\n "); defwLines = defwLines + 1; } printPoints(defwFile,param_2[local_1c],param_3[local_1c]," ",""); } local_4 = 0; } else { local_4 = 2; } return local_4; }
8,248
unlink_deleted_block
eloqsql/storage/maria/ma_dynrec.c
static my_bool unlink_deleted_block(MARIA_HA *info, MARIA_BLOCK_INFO *block_info) { DBUG_ENTER("unlink_deleted_block"); if (block_info->filepos == info->s->state.dellink) { /* First deleted block; We can just use this ! */ info->s->state.dellink=block_info->next_filepos; } else { MARIA_BLOCK_INFO tmp; tmp.second_read=0; /* Unlink block from the previous block */ if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->prev_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+4,block_info->next_filepos); if (info->s->file_write(info, tmp.header+4,8, block_info->prev_filepos+4, MYF(MY_NABP))) DBUG_RETURN(1); /* Unlink block from next block */ if (block_info->next_filepos != HA_OFFSET_ERROR) { if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->next_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+12,block_info->prev_filepos); if (info->s->file_write(info, tmp.header+12,8, block_info->next_filepos+12, MYF(MY_NABP))) DBUG_RETURN(1); } } /* We now have one less deleted block */ info->state->del--; info->state->empty-= block_info->block_len; info->s->state.split--; /* If this was a block that we where accessing through table scan (maria_rrnd() or maria_scan(), then ensure that we skip over this block when doing next maria_rrnd() or maria_scan(). */ if (info->cur_row.nextpos == block_info->filepos) info->cur_row.nextpos+= block_info->block_len; DBUG_RETURN(0); }
O0
c
unlink_deleted_block: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq -0x78(%rbp), %rax movq 0x38(%rax), %rax movq -0x70(%rbp), %rcx movq (%rcx), %rcx cmpq 0xc8(%rcx), %rax jne 0x4cbc3 movq -0x78(%rbp), %rax movq 0x40(%rax), %rcx movq -0x70(%rbp), %rax movq (%rax), %rax movq %rcx, 0xc8(%rax) jmp 0x4ce0f movl $0x0, -0x10(%rbp) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x78(%rbp), %rax movq 0x48(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x4c140 andl $0x4, %eax cmpl $0x0, %eax jne 0x4cbfc jmp 0x4cbf3 movb $0x1, -0x61(%rbp) jmp 0x4ce8c movq -0x78(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rax movq 0x40(%rax), %rax shrq $0x20, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movb %al, -0x59(%rbp) movq -0x90(%rbp), %rax shrq $0x8, %rax movb %al, -0x5a(%rbp) movq -0x90(%rbp), %rax shrq $0x10, %rax movb %al, -0x5b(%rbp) movq -0x90(%rbp), %rax shrq $0x18, %rax movb %al, -0x5c(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movb %al, -0x55(%rbp) movq -0x98(%rbp), %rax shrq $0x8, %rax movb %al, -0x56(%rbp) movq -0x98(%rbp), %rax shrq $0x10, %rax movb %al, -0x57(%rbp) movq -0x98(%rbp), %rax shrq $0x18, %rax movb %al, -0x58(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x70(%rbp), %rdi leaq -0x60(%rbp), %rsi addq $0x4, %rsi movq -0x78(%rbp), %rcx movq 0x48(%rcx), %rcx addq $0x4, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x4cce0 jmp 0x4ccd7 movb $0x1, -0x61(%rbp) jmp 0x4ce8c movq -0x78(%rbp), %rax cmpq $-0x1, 0x40(%rax) je 0x4ce0d movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x78(%rbp), %rax movq 0x40(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x4c140 andl $0x4, %eax cmpl $0x0, %eax jne 0x4cd21 jmp 0x4cd18 movb $0x1, -0x61(%rbp) jmp 0x4ce8c movq -0x78(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0xa0(%rbp) movq -0x78(%rbp), %rax movq 0x48(%rax), %rax shrq $0x20, %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0xb0(%rbp), %rax movb %al, -0x51(%rbp) movq -0xb0(%rbp), %rax shrq $0x8, %rax movb %al, -0x52(%rbp) movq -0xb0(%rbp), %rax shrq $0x10, %rax movb %al, -0x53(%rbp) movq -0xb0(%rbp), %rax shrq $0x18, %rax movb %al, -0x54(%rbp) movq -0xa0(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movb %al, -0x4d(%rbp) movq -0xb8(%rbp), %rax shrq $0x8, %rax movb %al, -0x4e(%rbp) movq -0xb8(%rbp), %rax shrq $0x10, %rax movb %al, -0x4f(%rbp) movq -0xb8(%rbp), %rax shrq $0x18, %rax movb %al, -0x50(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x70(%rbp), %rdi leaq -0x60(%rbp), %rsi addq $0xc, %rsi movq -0x78(%rbp), %rcx movq 0x40(%rcx), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x4ce0b jmp 0x4ce02 movb $0x1, -0x61(%rbp) jmp 0x4ce8c jmp 0x4ce0d jmp 0x4ce0f movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rax movq 0x28(%rax), %rdx movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0xc0(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0xc0(%rax) movq -0x70(%rbp), %rax movq 0xa0(%rax), %rax movq -0x78(%rbp), %rcx cmpq 0x38(%rcx), %rax jne 0x4ce86 movq -0x78(%rbp), %rax movq 0x28(%rax), %rcx movq -0x70(%rbp), %rax addq 0xa0(%rax), %rcx movq %rcx, 0xa0(%rax) jmp 0x4ce88 movb $0x0, -0x61(%rbp) movb -0x61(%rbp), %al movb %al, -0xb9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4ceb6 movb -0xb9(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x29230 nopl (%rax,%rax)
unlink_deleted_block: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov rax, [rbp+var_78] mov rax, [rax+38h] mov rcx, [rbp+var_70] mov rcx, [rcx] cmp rax, [rcx+0C8h] jnz short loc_4CBC3 mov rax, [rbp+var_78] mov rcx, [rax+40h] mov rax, [rbp+var_70] mov rax, [rax] mov [rax+0C8h], rcx jmp loc_4CE0F loc_4CBC3: mov [rbp+var_10], 0 mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_78] mov rcx, [rax+48h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_4CBFC jmp short $+2 loc_4CBF3: mov [rbp+var_61], 1 jmp loc_4CE8C loc_4CBFC: mov rax, [rbp+var_78] mov rax, [rax+40h] mov [rbp+var_80], rax mov rax, [rbp+var_78] mov rax, [rax+40h] shr rax, 20h mov [rbp+var_88], rax mov rax, [rbp+var_88] mov [rbp+var_90], rax mov rax, [rbp+var_90] mov [rbp+var_59], al mov rax, [rbp+var_90] shr rax, 8 mov [rbp+var_5A], al mov rax, [rbp+var_90] shr rax, 10h mov [rbp+var_5B], al mov rax, [rbp+var_90] shr rax, 18h mov [rbp+var_5C], al mov rax, [rbp+var_80] mov [rbp+var_98], rax mov rax, [rbp+var_98] mov [rbp+var_55], al mov rax, [rbp+var_98] shr rax, 8 mov [rbp+var_56], al mov rax, [rbp+var_98] shr rax, 10h mov [rbp+var_57], al mov rax, [rbp+var_98] shr rax, 18h mov [rbp+var_58], al mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_70] lea rsi, [rbp+var_60] add rsi, 4 mov rcx, [rbp+var_78] mov rcx, [rcx+48h] add rcx, 4 mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_4CCE0 jmp short $+2 loc_4CCD7: mov [rbp+var_61], 1 jmp loc_4CE8C loc_4CCE0: mov rax, [rbp+var_78] cmp qword ptr [rax+40h], 0FFFFFFFFFFFFFFFFh jz loc_4CE0D mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_78] mov rcx, [rax+40h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_4CD21 jmp short $+2 loc_4CD18: mov [rbp+var_61], 1 jmp loc_4CE8C loc_4CD21: mov rax, [rbp+var_78] mov rax, [rax+48h] mov [rbp+var_A0], rax mov rax, [rbp+var_78] mov rax, [rax+48h] shr rax, 20h mov [rbp+var_A8], rax mov rax, [rbp+var_A8] mov [rbp+var_B0], rax mov rax, [rbp+var_B0] mov [rbp+var_51], al mov rax, [rbp+var_B0] shr rax, 8 mov [rbp+var_52], al mov rax, [rbp+var_B0] shr rax, 10h mov [rbp+var_53], al mov rax, [rbp+var_B0] shr rax, 18h mov [rbp+var_54], al mov rax, [rbp+var_A0] mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov [rbp+var_4D], al mov rax, [rbp+var_B8] shr rax, 8 mov [rbp+var_4E], al mov rax, [rbp+var_B8] shr rax, 10h mov [rbp+var_4F], al mov rax, [rbp+var_B8] shr rax, 18h mov [rbp+var_50], al mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_70] lea rsi, [rbp+var_60] add rsi, 0Ch mov rcx, [rbp+var_78] mov rcx, [rcx+40h] add rcx, 0Ch mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_4CE0B jmp short $+2 loc_4CE02: mov [rbp+var_61], 1 jmp loc_4CE8C loc_4CE0B: jmp short $+2 loc_4CE0D: jmp short $+2 loc_4CE0F: mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rax, [rbp+var_78] mov rdx, [rax+28h] mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+0C0h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+0C0h], rcx mov rax, [rbp+var_70] mov rax, [rax+0A0h] mov rcx, [rbp+var_78] cmp rax, [rcx+38h] jnz short loc_4CE86 mov rax, [rbp+var_78] mov rcx, [rax+28h] mov rax, [rbp+var_70] add rcx, [rax+0A0h] mov [rax+0A0h], rcx loc_4CE86: jmp short $+2 loc_4CE88: mov [rbp+var_61], 0 loc_4CE8C: mov al, [rbp+var_61] mov [rbp+var_B9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4CEB6 mov al, [rbp+var_B9] add rsp, 0C0h pop rbp retn loc_4CEB6: call ___stack_chk_fail
char unlink_deleted_block(_QWORD *a1, _QWORD *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // r8 int v7; // r9d long long v9; // [rsp+20h] [rbp-A0h] long long v10; // [rsp+40h] [rbp-80h] unsigned __int8 v12[4]; // [rsp+60h] [rbp-60h] BYREF _BYTE v13[8]; // [rsp+64h] [rbp-5Ch] BYREF _BYTE v14[68]; // [rsp+6Ch] [rbp-54h] BYREF int v15; // [rsp+B0h] [rbp-10h] unsigned long long v16; // [rsp+B8h] [rbp-8h] v16 = __readfsqword(0x28u); if ( a2[7] == *(_QWORD *)(*a1 + 200LL) ) { *(_QWORD *)(*a1 + 200LL) = a2[8]; } else { v15 = 0; if ( (ma_get_block_info((long long)a1, v12, *((unsigned int *)a1 + 288), a2[9], a5, a6) & 4) == 0 ) return 1; v10 = a2[8]; v13[2] = BYTE5(v10); v13[3] = BYTE4(v10); v13[0] = HIBYTE(v10); v13[1] = BYTE6(v10); v13[6] = BYTE1(v10); v13[7] = v10; v13[4] = BYTE3(v10); v13[5] = BYTE2(v10); if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(*a1 + 1768LL))( a1, v13, 8LL, a2[9] + 4LL, 4LL) ) { return 1; } if ( a2[8] != -1LL ) { if ( (ma_get_block_info((long long)a1, v12, *((unsigned int *)a1 + 288), a2[8], v6, v7) & 4) == 0 ) return 1; v9 = a2[9]; v14[2] = BYTE5(v9); v14[3] = BYTE4(v9); v14[0] = HIBYTE(v9); v14[1] = BYTE6(v9); v14[6] = BYTE1(v9); v14[7] = v9; v14[4] = BYTE3(v9); v14[5] = BYTE2(v9); if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(*a1 + 1768LL))( a1, v14, 8LL, a2[8] + 12LL, 4LL) ) { return 1; } } } --*(_QWORD *)(a1[4] + 8LL); *(_QWORD *)(a1[4] + 16LL) -= a2[5]; --*(_QWORD *)(*a1 + 192LL); if ( a1[20] == a2[7] ) a1[20] += a2[5]; return 0; }
unlink_deleted_block: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0xc8] JNZ 0x0014cbc3 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xc8],RCX JMP 0x0014ce0f LAB_0014cbc3: MOV dword ptr [RBP + -0x10],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x48] LEA RSI,[RBP + -0x60] CALL 0x0014c140 AND EAX,0x4 CMP EAX,0x0 JNZ 0x0014cbfc JMP 0x0014cbf3 LAB_0014cbf3: MOV byte ptr [RBP + -0x61],0x1 JMP 0x0014ce8c LAB_0014cbfc: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x20 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0x59],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x8 MOV byte ptr [RBP + -0x5a],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x10 MOV byte ptr [RBP + -0x5b],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x18 MOV byte ptr [RBP + -0x5c],AL MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [RBP + -0x55],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x8 MOV byte ptr [RBP + -0x56],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x10 MOV byte ptr [RBP + -0x57],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x18 MOV byte ptr [RBP + -0x58],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x60] ADD RSI,0x4 MOV RCX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RCX + 0x48] ADD RCX,0x4 MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0014cce0 JMP 0x0014ccd7 LAB_0014ccd7: MOV byte ptr [RBP + -0x61],0x1 JMP 0x0014ce8c LAB_0014cce0: MOV RAX,qword ptr [RBP + -0x78] CMP qword ptr [RAX + 0x40],-0x1 JZ 0x0014ce0d MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x40] LEA RSI,[RBP + -0x60] CALL 0x0014c140 AND EAX,0x4 CMP EAX,0x0 JNZ 0x0014cd21 JMP 0x0014cd18 LAB_0014cd18: MOV byte ptr [RBP + -0x61],0x1 JMP 0x0014ce8c LAB_0014cd21: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x48] SHR RAX,0x20 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0xb0] MOV byte ptr [RBP + -0x51],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x8 MOV byte ptr [RBP + -0x52],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x10 MOV byte ptr [RBP + -0x53],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x18 MOV byte ptr [RBP + -0x54],AL MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RBP + -0x4d],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x8 MOV byte ptr [RBP + -0x4e],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x10 MOV byte ptr [RBP + -0x4f],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x18 MOV byte ptr [RBP + -0x50],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x60] ADD RSI,0xc MOV RCX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RCX + 0x40] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0014ce0b JMP 0x0014ce02 LAB_0014ce02: MOV byte ptr [RBP + -0x61],0x1 JMP 0x0014ce8c LAB_0014ce0b: JMP 0x0014ce0d LAB_0014ce0d: JMP 0x0014ce0f LAB_0014ce0f: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc0] ADD RCX,-0x1 MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0xa0] MOV RCX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RCX + 0x38] JNZ 0x0014ce86 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x70] ADD RCX,qword ptr [RAX + 0xa0] MOV qword ptr [RAX + 0xa0],RCX LAB_0014ce86: JMP 0x0014ce88 LAB_0014ce88: MOV byte ptr [RBP + -0x61],0x0 LAB_0014ce8c: MOV AL,byte ptr [RBP + -0x61] MOV byte ptr [RBP + -0xb9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014ceb6 MOV AL,byte ptr [RBP + -0xb9] ADD RSP,0xc0 POP RBP RET LAB_0014ceb6: CALL 0x00129230
int8 unlink_deleted_block(long *param_1,long param_2) { int8 uVar1; int8 uVar2; uint uVar3; long lVar4; long in_FS_OFFSET; int1 local_69; int1 local_68 [4]; int1 local_64; int1 local_63; int1 local_62; int1 local_61; int1 local_60; int1 local_5f; int1 local_5e; int1 local_5d; int1 local_5c; int1 local_5b; int1 local_5a; int1 local_59; int1 local_58; int1 local_57; int1 local_56; int1 local_55; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_2 + 0x38) == *(long *)(*param_1 + 200)) { *(int8 *)(*param_1 + 200) = *(int8 *)(param_2 + 0x40); } else { local_18 = 0; uVar3 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(param_2 + 0x48)); if ((uVar3 & 4) == 0) { local_69 = 1; goto LAB_0014ce8c; } uVar1 = *(int8 *)(param_2 + 0x40); uVar2 = *(int8 *)(param_2 + 0x40); local_61 = (int1)((ulong)uVar2 >> 0x20); local_62 = (int1)((ulong)uVar2 >> 0x28); local_63 = (int1)((ulong)uVar2 >> 0x30); local_64 = (int1)((ulong)uVar2 >> 0x38); local_5d = (int1)uVar1; local_5e = (int1)((ulong)uVar1 >> 8); local_5f = (int1)((ulong)uVar1 >> 0x10); local_60 = (int1)((ulong)uVar1 >> 0x18); lVar4 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_64,8,*(long *)(param_2 + 0x48) + 4,4); if (lVar4 != 0) { local_69 = 1; goto LAB_0014ce8c; } if (*(long *)(param_2 + 0x40) != -1) { uVar3 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(param_2 + 0x40) ); if ((uVar3 & 4) == 0) { local_69 = 1; goto LAB_0014ce8c; } uVar1 = *(int8 *)(param_2 + 0x48); uVar2 = *(int8 *)(param_2 + 0x48); local_59 = (int1)((ulong)uVar2 >> 0x20); local_5a = (int1)((ulong)uVar2 >> 0x28); local_5b = (int1)((ulong)uVar2 >> 0x30); local_5c = (int1)((ulong)uVar2 >> 0x38); local_55 = (int1)uVar1; local_56 = (int1)((ulong)uVar1 >> 8); local_57 = (int1)((ulong)uVar1 >> 0x10); local_58 = (int1)((ulong)uVar1 >> 0x18); lVar4 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_5c,8,*(long *)(param_2 + 0x40) + 0xc,4) ; if (lVar4 != 0) { local_69 = 1; goto LAB_0014ce8c; } } } *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(param_2 + 0x28); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + -1; if (param_1[0x14] == *(long *)(param_2 + 0x38)) { param_1[0x14] = *(long *)(param_2 + 0x28) + param_1[0x14]; } local_69 = 0; LAB_0014ce8c: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_69); }
8,249
simple_delete_forget_test
eloqsql/storage/maria/unittest/ma_pagecache_single.c
int simple_delete_forget_test() { unsigned char *buffw= malloc(TEST_PAGE_SIZE); unsigned char *buffr= malloc(TEST_PAGE_SIZE); int res; DBUG_ENTER("simple_delete_forget_test"); /* prepare the file */ bfill(buffw, TEST_PAGE_SIZE, '\1'); pagecache_write(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); /* test */ bfill(buffw, TEST_PAGE_SIZE, '\2'); pagecache_write(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); pagecache_delete(&pagecache, &file1, 0, PAGECACHE_LOCK_WRITE, 0); flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE, simple_delete_forget_test_file))), "Simple delete-forget page file"); if (res) reset_file(&file1, file1_name); free(buffw); free(buffr); DBUG_RETURN(res); }
O3
c
simple_delete_forget_test: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl $0x400, %edi # imm = 0x400 callq 0x29710 movq %rax, %rbx movl $0x1, %r12d movl $0x400, %edx # imm = 0x400 movq %rax, %rdi movl $0x1, %esi callq 0x292c0 leaq 0x3cd411(%rip), %r14 # 0x3fe460 movl 0x3cd48b(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) xorl %r13d, %r13d movl %r13d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r13d, 0x10(%rsp) movl %r12d, 0x8(%rsp) movl %r13d, (%rsp) leaq 0x3cd602(%rip), %r15 # 0x3fe680 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x3497a movq %r14, %rdi movq %r15, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x35070 movl $0x400, %edx # imm = 0x400 movq %rbx, %rdi movl $0x2, %esi callq 0x292c0 movl 0x3cd41a(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) movl %r13d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r13d, 0x10(%rsp) movl %r12d, 0x8(%rsp) movl %r13d, (%rsp) movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x3497a movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x4, %ecx xorl %r8d, %r8d callq 0x34617 movq %r14, %rdi movq %r15, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x35070 movl $0x9, %ecx movq %rsp, %rdi movq %r15, %rsi rep movsq (%rsi), %es:(%rdi) leaq 0x3cd591(%rip), %rdi # 0x3fe6d0 leaq 0x354f5a(%rip), %rcx # 0x3860a0 movl $0x400, %esi # imm = 0x400 movl $0x400, %edx # imm = 0x400 callq 0x31b78 movl %eax, %r15d xorl %r14d, %r14d testl %eax, %eax setne %r14b leaq 0xa937b(%rip), %rsi # 0xda4e3 movl %r14d, %edi xorl %eax, %eax callq 0x92223 testl %r15d, %r15d je 0x3118a leaq 0x3cd502(%rip), %rdi # 0x3fe680 leaq 0x3cd54b(%rip), %rsi # 0x3fe6d0 callq 0x3016c movq %rbx, %rdi callq 0x29160 movl %r14d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
simple_delete_forget_test: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov edi, 400h call _malloc mov rbx, rax mov r12d, 1 mov edx, 400h mov rdi, rax mov esi, 1 call _memset lea r14, pagecache mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax xor r13d, r13d mov [rsp+70h+var_48], r13d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r13d mov [rsp+70h+var_68], r12d mov [rsp+70h+var_70], r13d lea r15, file1 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, r14 mov rsi, r15 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter mov edx, 400h mov rdi, rbx mov esi, 2 call _memset mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax mov [rsp+70h+var_48], r13d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r13d mov [rsp+70h+var_68], r12d mov [rsp+70h+var_70], r13d mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 4 xor r8d, r8d call pagecache_delete mov rdi, r14 mov rsi, r15 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter mov ecx, 9 mov rdi, rsp mov rsi, r15 rep movsq lea rdi, file1_name lea rcx, simple_delete_forget_test_file mov esi, 400h mov edx, 400h call test_file mov r15d, eax xor r14d, r14d test eax, eax setnz r14b lea rsi, aSimpleDeleteFo; "Simple delete-forget page file" mov edi, r14d xor eax, eax call ok test r15d, r15d jz short loc_3118A lea rdi, file1 lea rsi, file1_name call reset_file loc_3118A: mov rdi, rbx call _free mov eax, r14d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BOOL8 simple_delete_forget_test() { long long v0; // rbx int v1; // r8d int v2; // r9d int v3; // r15d int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d _QWORD v9[9]; // [rsp+0h] [rbp-70h] BYREF v0 = malloc(1024LL); memset(v0, 1LL, 1024LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 0, 1, 0, 0LL, 0LL, 0, dword_3FE4E0); flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL); memset(v0, 2LL, 1024LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 0, 1, 0, 0LL, 0LL, 0, dword_3FE4E0); pagecache_delete(&pagecache, &file1, 0LL, 4LL, 0LL); flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL); qmemcpy(v9, &file1, sizeof(v9)); v3 = test_file((unsigned int)&file1_name, 1024, 1024, (unsigned int)&simple_delete_forget_test_file, v1, v2, v9[0]); ok(v3 != 0, (unsigned int)"Simple delete-forget page file", v4, v5, v6, v7, v9[0]); if ( v3 ) reset_file((long long)&file1, (long long)&file1_name); free(v0); return v3 != 0; }
simple_delete_forget_test: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EDI,0x400 CALL 0x00129710 MOV RBX,RAX MOV R12D,0x1 MOV EDX,0x400 MOV RDI,RAX MOV ESI,0x1 CALL 0x001292c0 LEA R14,[0x4fe460] MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX XOR R13D,R13D MOV dword ptr [RSP + 0x28],R13D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R13D MOV dword ptr [RSP + 0x8],R12D MOV dword ptr [RSP],R13D LEA R15,[0x4fe680] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x0013497a MOV RDI,R14 MOV RSI,R15 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x00135070 MOV EDX,0x400 MOV RDI,RBX MOV ESI,0x2 CALL 0x001292c0 MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x28],R13D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R13D MOV dword ptr [RSP + 0x8],R12D MOV dword ptr [RSP],R13D MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x0013497a MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x4 XOR R8D,R8D CALL 0x00134617 MOV RDI,R14 MOV RSI,R15 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x00135070 MOV ECX,0x9 MOV RDI,RSP MOV RSI,R15 MOVSQ.REP RDI,RSI LEA RDI,[0x4fe6d0] LEA RCX,[0x4860a0] MOV ESI,0x400 MOV EDX,0x400 CALL 0x00131b78 MOV R15D,EAX XOR R14D,R14D TEST EAX,EAX SETNZ R14B LEA RSI,[0x1da4e3] MOV EDI,R14D XOR EAX,EAX CALL 0x00192223 TEST R15D,R15D JZ 0x0013118a LEA RDI,[0x4fe680] LEA RSI,[0x4fe6d0] CALL 0x0013016c LAB_0013118a: MOV RDI,RBX CALL 0x00129160 MOV EAX,R14D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool simple_delete_forget_test(void) { int iVar1; void *__s; long lVar2; int8 *puVar3; int8 *puVar4; byte bVar5; int4 local_78 [2]; int4 local_70; int4 local_68; int8 local_60; int8 uStack_58; int4 local_50; int4 local_48; bVar5 = 0; __s = malloc(0x400); memset(__s,1,0x400); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_70 = 1; local_78[0] = 0; pagecache_write_part(pagecache,&file1,0,3,__s,1); flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); memset(__s,2,0x400); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_70 = 1; local_78[0] = 0; pagecache_write_part(pagecache,&file1,0,3,__s,1); pagecache_delete(pagecache,&file1,0,4,0); flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); puVar3 = &file1; puVar4 = (int8 *)local_78; for (lVar2 = 9; lVar2 != 0; lVar2 = lVar2 + -1) { *puVar4 = *puVar3; puVar3 = puVar3 + (ulong)bVar5 * -2 + 1; puVar4 = puVar4 + (ulong)bVar5 * -2 + 1; } iVar1 = test_file(file1_name,0x400,0x400,simple_delete_forget_test_file); ok(iVar1 != 0,"Simple delete-forget page file"); if (iVar1 != 0) { reset_file(&file1,file1_name); } free(__s); return iVar1 != 0; }
8,250
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x292dd8(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 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 0x387a2 leaq 0x292d8a(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xfca30 movl %eax, -0x34(%rbp) leaq 0x292d59(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x387bb movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xfca30 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open_0: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], 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+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] 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_387A2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_387BB loc_387A2: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_387BB: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open_0( unsigned int a1, long long 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] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] 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+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8); if ( v8 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13); v9 = my_open(v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] 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 0x001387a2 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001fca30 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001387bb LAB_001387a2: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001fca30 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_001387bb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
8,251
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O3
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %rbx movl %ecx, %r14d movq %rdx, %r15 movl %esi, %r12d movl %edi, %esi leaq 0x35411c(%rip), %rax # 0x38f258 movq (%rax), %rax leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %r13 movl $0x2, %edx movq %r15, %rcx movq %r13, %r8 callq *0x148(%rax) movq %rax, (%r13) testq %rax, %rax jne 0x3b182 movq %r15, %rdi movl %r14d, %esi movq %rbx, %rdx callq 0xa69fc movl %eax, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x3540cf(%rip), %r13 # 0x38f258 movq (%r13), %rcx leaq 0xa5eb0(%rip), %rsi # 0xe1044 movq %rax, %rdi movl %r12d, %edx callq *0x1f0(%rcx) movq %r15, %rdi movl %r14d, %esi movq %rbx, %rdx callq 0xa69fc movl %eax, %ebx movq (%r13), %rax movq -0x30(%rbp), %rdi movl %ebx, %esi callq *0x200(%rax) jmp 0x3b171
inline_mysql_file_open: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, r8 mov r14d, ecx mov r15, rdx mov r12d, esi mov esi, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] lea r13, [rbp+var_30] mov edx, 2 mov rcx, r15 mov r8, r13 call qword ptr [rax+148h] mov [r13+0], rax test rax, rax jnz short loc_3B182 mov rdi, r15 mov esi, r14d mov rdx, rbx call my_open mov ebx, eax loc_3B171: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B182: lea r13, PSI_server mov rcx, [r13+0] lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, r12d call qword ptr [rcx+1F0h] mov rdi, r15 mov esi, r14d mov rdx, rbx call my_open mov ebx, eax mov rax, [r13+0] mov rdi, [rbp+var_30] mov esi, ebx call qword ptr [rax+200h] jmp short loc_3B171
long long inline_mysql_file_open(unsigned int a1, unsigned int a2, long long a3, unsigned int a4, long long a5) { long long v8; // rax _BYTE v10[72]; // [rsp+8h] [rbp-78h] BYREF long long v11[6]; // [rsp+50h] [rbp-30h] BYREF v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v10, a1, 2LL, a3, v11); v11[0] = v8; if ( v8 ) { ((void ( *)(long long, const char *, _QWORD))PSI_server[62])( v8, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", a2); a5 = (unsigned int)my_open(a3, a4, a5); ((void ( *)(long long, long long))PSI_server[64])(v11[0], a5); } else { LODWORD(a5) = my_open(a3, a4, a5); } return (unsigned int)a5; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,R8 MOV R14D,ECX MOV R15,RDX MOV R12D,ESI MOV ESI,EDI LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] LEA R13,[RBP + -0x30] MOV EDX,0x2 MOV RCX,R15 MOV R8,R13 CALL qword ptr [RAX + 0x148] MOV qword ptr [R13],RAX TEST RAX,RAX JNZ 0x0013b182 MOV RDI,R15 MOV ESI,R14D MOV RDX,RBX CALL 0x001a69fc MOV EBX,EAX LAB_0013b171: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b182: LEA R13,[0x48f258] MOV RCX,qword ptr [R13] LEA RSI,[0x1e1044] MOV RDI,RAX MOV EDX,R12D CALL qword ptr [RCX + 0x1f0] MOV RDI,R15 MOV ESI,R14D MOV RDX,RBX CALL 0x001a69fc MOV EBX,EAX MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RBP + -0x30] MOV ESI,EBX CALL qword ptr [RAX + 0x200] JMP 0x0013b171
int4 inline_mysql_file_open (int4 param_1,int4 param_2,int8 param_3,int4 param_4, int8 param_5) { int4 uVar1; int1 local_80 [72]; long local_38; local_38 = (**(code **)(PSI_server + 0x148))(local_80,param_1,2,param_3,&local_38); if (local_38 == 0) { uVar1 = my_open(param_3,param_4,param_5); } else { (**(code **)(PSI_server + 0x1f0)) (local_38,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", param_2); uVar1 = my_open(param_3,param_4,param_5); (**(code **)(PSI_server + 0x200))(local_38,uVar1); } return uVar1; }
8,252
pfs_memory_realloc_v1
eloqsql/storage/perfschema/pfs.cc
PSI_memory_key pfs_memory_realloc_v1(PSI_memory_key key, size_t old_size, size_t new_size, PSI_thread **owner) { PFS_thread ** owner_thread_hdl= reinterpret_cast<PFS_thread**>(owner); assert(owner != NULL); PFS_memory_class *klass= find_memory_class(key); if (klass == NULL) { *owner_thread_hdl= NULL; return PSI_NOT_INSTRUMENTED; } PFS_memory_stat *event_name_array; PFS_memory_stat *stat; uint index= klass->m_event_name_index; PFS_memory_stat_delta delta_buffer; PFS_memory_stat_delta *delta; if (flag_thread_instrumentation && ! klass->is_global()) { PFS_thread *pfs_thread= my_thread_get_THR_PFS(); if (likely(pfs_thread != NULL)) { #ifdef PFS_PARANOID PFS_thread *owner_thread= *owner_thread_hdl; if (owner_thread != pfs_thread) { owner_thread= sanitize_thread(owner_thread); if (owner_thread != NULL) { report_memory_accounting_error("pfs_memory_realloc_v1", pfs_thread, old_size, klass, owner_thread); } } #endif /* PFS_PARANOID */ /* Aggregate to MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME */ event_name_array= pfs_thread->write_instr_class_memory_stats(); stat= & event_name_array[index]; if (flag_global_instrumentation && klass->m_enabled) { delta= stat->count_realloc(old_size, new_size, &delta_buffer); *owner_thread_hdl= pfs_thread; } else { delta= stat->count_free(old_size, &delta_buffer); *owner_thread_hdl= NULL; key= PSI_NOT_INSTRUMENTED; } if (delta != NULL) { pfs_thread->carry_memory_stat_delta(delta, index); } return key; } } /* Aggregate to MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME */ event_name_array= global_instr_class_memory_array; stat= & event_name_array[index]; if (flag_global_instrumentation && klass->m_enabled) { (void) stat->count_realloc(old_size, new_size, &delta_buffer); } else { (void) stat->count_free(old_size, &delta_buffer); key= PSI_NOT_INSTRUMENTED; } *owner_thread_hdl= NULL; return key; }
O0
cpp
pfs_memory_realloc_v1: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movl -0x8(%rbp), %edi callq 0x437c0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x558cc movq -0x28(%rbp), %rax movq $0x0, (%rax) movl $0x0, -0x4(%rbp) jmp 0x55a2f movq -0x30(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x44(%rbp) leaq 0x3b6763(%rip), %rax # 0x40c040 testb $0x1, (%rax) je 0x559b9 movq -0x30(%rbp), %rdi callq 0x568a0 testb $0x1, %al jne 0x559b9 callq 0x4d760 movq %rax, -0x78(%rbp) cmpq $0x0, -0x78(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x559b7 movq -0x78(%rbp), %rdi callq 0x2cd50 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl -0x44(%rbp), %ecx imulq $0x48, %rcx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) leaq 0x3b66c4(%rip), %rax # 0x40c000 testb $0x1, (%rax) je 0x55971 movq -0x30(%rbp), %rax testb $0x1, 0x4(%rax) je 0x55971 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx leaq -0x68(%rbp), %rcx callq 0x569d0 movq %rax, -0x70(%rbp) movq -0x78(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0x55998 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x68(%rbp), %rdx callq 0x56b40 movq %rax, -0x70(%rbp) movq -0x28(%rbp), %rax movq $0x0, (%rax) movl $0x0, -0x8(%rbp) cmpq $0x0, -0x70(%rbp) je 0x559af movq -0x78(%rbp), %rdi movq -0x70(%rbp), %rsi movl -0x44(%rbp), %edx callq 0x37c20 movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x55a2f jmp 0x559b9 leaq 0x3b6a08(%rip), %rax # 0x40c3c8 movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl -0x44(%rbp), %ecx imulq $0x48, %rcx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) leaq 0x3b6620(%rip), %rax # 0x40c000 testb $0x1, (%rax) je 0x55a06 movq -0x30(%rbp), %rax testb $0x1, 0x4(%rax) je 0x55a06 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx leaq -0x68(%rbp), %rcx callq 0x569d0 jmp 0x55a1e movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x68(%rbp), %rdx callq 0x56b40 movl $0x0, -0x8(%rbp) movq -0x28(%rbp), %rax movq $0x0, (%rax) movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
pfs_memory_realloc_v1: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_20] mov [rbp+var_28], rax mov edi, [rbp+var_8]; unsigned int call _Z17find_memory_classj; find_memory_class(uint) mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_558CC mov rax, [rbp+var_28] mov qword ptr [rax], 0 mov [rbp+var_4], 0 jmp loc_55A2F loc_558CC: mov rax, [rbp+var_30] mov eax, [rax+10h] mov [rbp+var_44], eax lea rax, flag_thread_instrumentation test byte ptr [rax], 1 jz loc_559B9 mov rdi, [rbp+var_30]; this call _ZNK16PFS_memory_class9is_globalEv; PFS_memory_class::is_global(void) test al, 1 jnz loc_559B9 call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_78], rax cmp [rbp+var_78], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 jz loc_559B7 mov rdi, [rbp+var_78]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov [rbp+var_38], rax mov rax, [rbp+var_38] mov ecx, [rbp+var_44] imul rcx, 48h ; 'H' add rax, rcx mov [rbp+var_40], rax lea rax, flag_global_instrumentation test byte ptr [rax], 1 jz short loc_55971 mov rax, [rbp+var_30] test byte ptr [rax+4], 1 jz short loc_55971 mov rdi, [rbp+var_40]; this mov rsi, [rbp+var_10]; unsigned __int64 mov rdx, [rbp+var_18]; unsigned __int64 lea rcx, [rbp+var_68]; PFS_memory_stat_delta * call _ZN15PFS_memory_stat13count_reallocEmmP21PFS_memory_stat_delta; PFS_memory_stat::count_realloc(ulong,ulong,PFS_memory_stat_delta *) mov [rbp+var_70], rax mov rcx, [rbp+var_78] mov rax, [rbp+var_28] mov [rax], rcx jmp short loc_55998 loc_55971: mov rdi, [rbp+var_40]; this mov rsi, [rbp+var_10]; unsigned __int64 lea rdx, [rbp+var_68]; PFS_memory_stat_delta * call _ZN15PFS_memory_stat10count_freeEmP21PFS_memory_stat_delta; PFS_memory_stat::count_free(ulong,PFS_memory_stat_delta *) mov [rbp+var_70], rax mov rax, [rbp+var_28] mov qword ptr [rax], 0 mov [rbp+var_8], 0 loc_55998: cmp [rbp+var_70], 0 jz short loc_559AF mov rdi, [rbp+var_78]; this mov rsi, [rbp+var_70]; PFS_memory_stat_delta * mov edx, [rbp+var_44]; unsigned int call _ZN10PFS_thread23carry_memory_stat_deltaEP21PFS_memory_stat_deltaj; PFS_thread::carry_memory_stat_delta(PFS_memory_stat_delta *,uint) loc_559AF: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp short loc_55A2F loc_559B7: jmp short $+2 loc_559B9: lea rax, global_instr_class_memory_array mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov ecx, [rbp+var_44] imul rcx, 48h ; 'H' add rax, rcx mov [rbp+var_40], rax lea rax, flag_global_instrumentation test byte ptr [rax], 1 jz short loc_55A06 mov rax, [rbp+var_30] test byte ptr [rax+4], 1 jz short loc_55A06 mov rdi, [rbp+var_40]; this mov rsi, [rbp+var_10]; unsigned __int64 mov rdx, [rbp+var_18]; unsigned __int64 lea rcx, [rbp+var_68]; PFS_memory_stat_delta * call _ZN15PFS_memory_stat13count_reallocEmmP21PFS_memory_stat_delta; PFS_memory_stat::count_realloc(ulong,ulong,PFS_memory_stat_delta *) jmp short loc_55A1E loc_55A06: mov rdi, [rbp+var_40]; this mov rsi, [rbp+var_10]; unsigned __int64 lea rdx, [rbp+var_68]; PFS_memory_stat_delta * call _ZN15PFS_memory_stat10count_freeEmP21PFS_memory_stat_delta; PFS_memory_stat::count_free(ulong,PFS_memory_stat_delta *) mov [rbp+var_8], 0 loc_55A1E: mov rax, [rbp+var_28] mov qword ptr [rax], 0 mov eax, [rbp+var_8] mov [rbp+var_4], eax loc_55A2F: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long pfs_memory_realloc_v1( unsigned int a1, unsigned long long a2, unsigned long long a3, PFS_connection_slice **a4) { PFS_connection_slice *THR_PFS; // [rsp+8h] [rbp-78h] PFS_memory_stat_delta *v6; // [rsp+10h] [rbp-70h] _BYTE v7[36]; // [rsp+18h] [rbp-68h] BYREF unsigned int v8; // [rsp+3Ch] [rbp-44h] PFS_memory_stat *v9; // [rsp+40h] [rbp-40h] PFS_memory_stat *v10; // [rsp+48h] [rbp-38h] PFS_memory_class *memory_class; // [rsp+50h] [rbp-30h] PFS_connection_slice **v12; // [rsp+58h] [rbp-28h] PFS_connection_slice **v13; // [rsp+60h] [rbp-20h] unsigned long long v14; // [rsp+68h] [rbp-18h] unsigned long long v15; // [rsp+70h] [rbp-10h] unsigned int v16; // [rsp+78h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a4; memory_class = (PFS_memory_class *)find_memory_class(a1); if ( memory_class ) { v8 = *((_DWORD *)memory_class + 4); if ( (flag_thread_instrumentation & 1) != 0 && (PFS_memory_class::is_global(memory_class) & 1) == 0 && (THR_PFS = (PFS_connection_slice *)my_thread_get_THR_PFS()) != 0LL ) { v10 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(THR_PFS); v9 = (PFS_memory_stat *)((char *)v10 + 72 * v8); if ( (flag_global_instrumentation & 1) != 0 && (*((_BYTE *)memory_class + 4) & 1) != 0 ) { v6 = (PFS_memory_stat_delta *)PFS_memory_stat::count_realloc(v9, v15, v14, (PFS_memory_stat_delta *)v7); *v12 = THR_PFS; } else { v6 = (PFS_memory_stat_delta *)PFS_memory_stat::count_free(v9, v15, (PFS_memory_stat_delta *)v7); *v12 = 0LL; v16 = 0; } if ( v6 ) PFS_thread::carry_memory_stat_delta(THR_PFS, v6, v8); return v16; } else { v10 = global_instr_class_memory_array; v9 = (PFS_memory_stat *)((char *)global_instr_class_memory_array + 72 * v8); if ( (flag_global_instrumentation & 1) != 0 && (*((_BYTE *)memory_class + 4) & 1) != 0 ) { PFS_memory_stat::count_realloc(v9, v15, v14, (PFS_memory_stat_delta *)v7); } else { PFS_memory_stat::count_free(v9, v15, (PFS_memory_stat_delta *)v7); v16 = 0; } *v12 = 0LL; return v16; } } else { *v12 = 0LL; return 0; } }
pfs_memory_realloc_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV EDI,dword ptr [RBP + -0x8] CALL 0x001437c0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001558cc MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00155a2f LAB_001558cc: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x44],EAX LEA RAX,[0x50c040] TEST byte ptr [RAX],0x1 JZ 0x001559b9 MOV RDI,qword ptr [RBP + -0x30] CALL 0x001568a0 TEST AL,0x1 JNZ 0x001559b9 CALL 0x0014d760 MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x78],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001559b7 MOV RDI,qword ptr [RBP + -0x78] CALL 0x0012cd50 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x44] IMUL RCX,RCX,0x48 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x50c000] TEST byte ptr [RAX],0x1 JZ 0x00155971 MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x4],0x1 JZ 0x00155971 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RCX,[RBP + -0x68] CALL 0x001569d0 MOV qword ptr [RBP + -0x70],RAX MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x00155998 LAB_00155971: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x68] CALL 0x00156b40 MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],0x0 MOV dword ptr [RBP + -0x8],0x0 LAB_00155998: CMP qword ptr [RBP + -0x70],0x0 JZ 0x001559af MOV RDI,qword ptr [RBP + -0x78] MOV RSI,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RBP + -0x44] CALL 0x00137c20 LAB_001559af: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x00155a2f LAB_001559b7: JMP 0x001559b9 LAB_001559b9: LEA RAX,[0x50c3c8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x44] IMUL RCX,RCX,0x48 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x50c000] TEST byte ptr [RAX],0x1 JZ 0x00155a06 MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x4],0x1 JZ 0x00155a06 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RCX,[RBP + -0x68] CALL 0x001569d0 JMP 0x00155a1e LAB_00155a06: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x68] CALL 0x00156b40 MOV dword ptr [RBP + -0x8],0x0 LAB_00155a1e: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],0x0 MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX LAB_00155a2f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
uint pfs_memory_realloc_v1(uint param_1,ulong param_2,ulong param_3,int8 *param_4) { ulong uVar1; PFS_connection_slice *this; PFS_memory_stat_delta *local_78; PFS_memory_stat_delta local_70 [36]; uint local_4c; PFS_memory_stat *local_48; long local_40; PFS_memory_class *local_38; int8 *local_30; int8 *local_28; ulong local_20; ulong local_18; uint local_10; uint local_c; local_30 = param_4; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_38 = (PFS_memory_class *)find_memory_class(param_1); if (local_38 == (PFS_memory_class *)0x0) { *local_30 = 0; local_c = 0; } else { local_4c = *(uint *)(local_38 + 0x10); if ((((flag_thread_instrumentation & 1) == 0) || (uVar1 = PFS_memory_class::is_global(local_38), (uVar1 & 1) != 0)) || (this = (PFS_connection_slice *)my_thread_get_THR_PFS(), this == (PFS_connection_slice *)0x0) ) { local_40 = global_instr_class_memory_array; local_48 = (PFS_memory_stat *)(global_instr_class_memory_array + (ulong)local_4c * 0x48); if (((flag_global_instrumentation & 1) == 0) || (((byte)local_38[4] & 1) == 0)) { PFS_memory_stat::count_free(local_48,local_18,local_70); local_10 = 0; } else { PFS_memory_stat::count_realloc(local_48,local_18,local_20,local_70); } *local_30 = 0; local_c = local_10; } else { local_40 = PFS_connection_slice::write_instr_class_memory_stats(this); local_48 = (PFS_memory_stat *)(local_40 + (ulong)local_4c * 0x48); if (((flag_global_instrumentation & 1) == 0) || (((byte)local_38[4] & 1) == 0)) { local_78 = (PFS_memory_stat_delta *)PFS_memory_stat::count_free(local_48,local_18,local_70); *local_30 = 0; local_10 = 0; } else { local_78 = (PFS_memory_stat_delta *) PFS_memory_stat::count_realloc(local_48,local_18,local_20,local_70); *local_30 = this; } if (local_78 != (PFS_memory_stat_delta *)0x0) { PFS_thread::carry_memory_stat_delta((PFS_thread *)this,local_78,local_4c); } local_c = local_10; } } return local_c; }
8,253
minja::Value::operator-() const
llama.cpp/common/minja/minja.hpp
Value operator-() const { if (is_number_integer()) return -get<int64_t>(); else return -get<double>(); }
O3
cpp
minja::Value::operator-() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al leaq 0x40(%rdi), %r14 movq %rsi, %rdi cmpb $0x1, %al ja 0xe4c98 callq 0xc5716 negq %rax xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movq %r14, %rdi movq %rax, %rsi callq 0x8f820 jmp 0xe4cc2 callq 0xc28d0 xorps 0x30efc(%rip), %xmm0 # 0x115ba0 xorps %xmm1, %xmm1 movups %xmm1, (%rbx) movups %xmm1, 0x10(%rbx) movups %xmm1, 0x20(%rbx) movups %xmm1, 0x30(%rbx) movups %xmm1, 0x40(%rbx) movq %r14, %rdi callq 0x8ede8 movq %r14, %rdi movl $0x1, %esi callq 0x88a76 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK5minja5ValuengEv: push r14 push rbx push rax mov rbx, rdi mov al, [rsi+40h] add al, 0FBh lea r14, [rdi+40h] mov rdi, rsi cmp al, 1 ja short loc_E4C98 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) neg rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::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>::number_integer_t) jmp short loc_E4CC2 loc_E4C98: call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) xorps xmm0, cs:xmmword_115BA0 xorps xmm1, xmm1 movups xmmword ptr [rbx], xmm1 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx+20h], xmm1 movups xmmword ptr [rbx+30h], xmm1 movups xmmword ptr [rbx+40h], xmm1 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::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>::number_float_t) loc_E4CC2: 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 rax, rbx add rsp, 8 pop rbx pop r14 retn
_OWORD * minja::Value::operator-(_OWORD *a1, long long a2) { unsigned __int8 *v2; // r14 long long v3; // rax double v4; // xmm0_8 v2 = (unsigned __int8 *)(a1 + 4); if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u ) { v4 = minja::Value::get<double>((_QWORD *)a2); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; a1[3] = 0LL; a1[4] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::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>>( v2, -v4); } else { v3 = minja::Value::get<long>((_QWORD *)a2); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; a1[3] = 0LL; a1[4] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::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>>( v2, -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 *)v2); return a1; }
operator-: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb LEA R14,[RDI + 0x40] MOV RDI,RSI CMP AL,0x1 JA 0x001e4c98 CALL 0x001c5716 NEG RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,RAX CALL 0x0018f820 JMP 0x001e4cc2 LAB_001e4c98: CALL 0x001c28d0 XORPS XMM0,xmmword ptr [0x00215ba0] XORPS XMM1,XMM1 MOVUPS xmmword ptr [RBX],XMM1 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX + 0x20],XMM1 MOVUPS xmmword ptr [RBX + 0x30],XMM1 MOVUPS xmmword ptr [RBX + 0x40],XMM1 MOV RDI,R14 CALL 0x0018ede8 LAB_001e4cc2: MOV RDI,R14 MOV ESI,0x1 CALL 0x00188a76 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* minja::Value::TEMPNAMEPLACEHOLDERVALUE() const */ Value * __thiscall minja::Value::operator-(Value *this) { Value *pVVar1; double dVar2; long lVar3; Value *in_RSI; uint uVar4; pVVar1 = this + 0x40; if ((byte)((char)in_RSI[0x40] - 5U) < 2) { lVar3 = get<long>(in_RSI); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: 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>> (pVVar1,-lVar3); } else { dVar2 = get<double>(in_RSI); uVar4 = SUB84(dVar2,0) ^ _DAT_00215ba0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: 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>> (uVar4,pVVar1); } 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(pVVar1,0)); return this; }
8,254
mi_store_var_pack_key
eloqsql/storage/myisam/mi_search.c
void _mi_store_var_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { uint length; uchar *start; start=key_pos; if (s_temp->ref_length) { /* Packed against previous key */ store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->ref_length); /* If not same key after */ if (s_temp->ref_length != s_temp->pack_marker) store_key_length_inc(key_pos,s_temp->key_length); } else { /* Not packed against previous key */ store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->key_length); } bmove((uchar*) key_pos,(uchar*) s_temp->key, (length=s_temp->totlength-(uint) (key_pos-start))); if (!s_temp->next_key_pos) /* No following key */ return; key_pos+=length; if (s_temp->prev_length) { /* Extend next key because new key didn't have same prefix as prev key */ if (s_temp->part_of_prev_key) { store_pack_length(s_temp->pack_marker == 128,key_pos, s_temp->part_of_prev_key); store_key_length_inc(key_pos,s_temp->n_length); } else { s_temp->n_length+= s_temp->store_not_null; store_pack_length(s_temp->pack_marker == 128,key_pos, s_temp->n_length); } memcpy(key_pos, s_temp->prev_key, s_temp->prev_length); } else if (s_temp->n_ref_length) { store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_ref_length); if (s_temp->n_ref_length == s_temp->pack_marker) return; /* Identical key */ store_key_length(key_pos,s_temp->n_length); } else { s_temp->n_length+= s_temp->store_not_null; store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_length); } }
O3
c
mi_store_var_pack_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx movl (%rdx), %eax movl 0x1c(%rdx), %ecx testl %eax, %eax je 0x869cc movl $0x1, %r15d cmpl $0x80, %ecx jne 0x869e0 movq %rbx, %rcx jmp 0x869ef movl 0x4(%r14), %eax cmpl $0x80, %ecx jne 0x86a10 leaq 0x1(%rbx), %r15 movb %al, (%rbx) jmp 0x86a35 leaq 0x1(%rbx), %rcx movb %ah, (%rbx) movl (%r14), %eax movl $0x2, %r15d addq %rbx, %r15 movb %al, (%rcx) movl (%r14), %eax cmpl 0x1c(%r14), %eax je 0x86a35 movl 0x4(%r14), %eax cmpl $0xfe, %eax ja 0x86a1f movb %al, (%r15) incq %r15 jmp 0x86a35 movb %ah, (%rbx) movb 0x4(%r14), %al leaq 0x2(%rbx), %r15 movb %al, 0x1(%rbx) jmp 0x86a35 movb $-0x1, (%r15) movzwl 0x4(%r14), %eax rolw $0x8, %ax movw %ax, 0x1(%r15) addq $0x3, %r15 movq 0x20(%r14), %rsi subl %r15d, %ebx addl 0x10(%r14), %ebx movq %r15, %rdi movq %rbx, %rdx callq 0x29120 cmpq $0x0, 0x30(%r14) je 0x86b84 addq %rbx, %r15 cmpl $0x0, 0x18(%r14) movq %r15, %rdi je 0x86a7f movl 0x14(%r14), %eax testl %eax, %eax je 0x86aa9 movl $0x1, %ecx cmpl $0x80, 0x1c(%r14) jne 0x86acf movq %rdi, %rdx jmp 0x86ade movl 0x8(%r14), %ecx testl %ecx, %ecx je 0x86b20 movl $0x1, %eax cmpl $0x80, 0x1c(%r14) movq %rdi, %rsi jne 0x86b3b movq %rdi, %rdx jmp 0x86b4a movsbl 0x38(%r14), %eax addl 0xc(%r14), %eax movl %eax, 0xc(%r14) cmpl $0x80, 0x1c(%r14) je 0x86aee movb %ah, (%rdi) movb 0xc(%r14), %al movb %al, 0x1(%rdi) addq $0x2, %rdi jmp 0x86b09 leaq 0x1(%rdi), %rdx movb %ah, (%rdi) movl 0x14(%r14), %eax movl $0x2, %ecx addq %rcx, %rdi movb %al, (%rdx) movl 0xc(%r14), %eax cmpl $0xfe, %eax ja 0x86af5 movb %al, (%rdi) incq %rdi jmp 0x86b09 movb $-0x1, (%rdi) movzwl 0xc(%r14), %eax rolw $0x8, %ax movw %ax, 0x1(%rdi) addq $0x3, %rdi movq 0x28(%r14), %rsi movl 0x18(%r14), %edx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x29080 movsbl 0x38(%r14), %eax addl 0xc(%r14), %eax movl %eax, 0xc(%r14) cmpl $0x80, 0x1c(%r14) jne 0x86b67 movb %al, (%rdi) jmp 0x86b84 leaq 0x1(%rdi), %rdx movb %ch, (%rdi) movl 0x8(%r14), %ecx movl $0x2, %eax movb %cl, (%rdx) movl 0x8(%r14), %ecx cmpl 0x1c(%r14), %ecx je 0x86b84 movl 0xc(%r14), %ecx cmpl $0xfe, %ecx ja 0x86b72 movb %cl, (%rsi,%rax) jmp 0x86b84 movb %ah, (%rdi) movb 0xc(%r14), %al movb %al, 0x1(%rdi) jmp 0x86b84 movb $-0x1, (%rsi,%rax) movzwl 0xc(%r14), %ecx rolw $0x8, %cx movw %cx, 0x1(%rsi,%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_mi_store_var_pack_key: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdx mov rbx, rsi mov eax, [rdx] mov ecx, [rdx+1Ch] test eax, eax jz short loc_869CC mov r15d, 1 cmp ecx, 80h jnz short loc_869E0 mov rcx, rbx jmp short loc_869EF loc_869CC: mov eax, [r14+4] cmp ecx, 80h jnz short loc_86A10 lea r15, [rbx+1] mov [rbx], al jmp short loc_86A35 loc_869E0: lea rcx, [rbx+1] mov [rbx], ah mov eax, [r14] mov r15d, 2 loc_869EF: add r15, rbx mov [rcx], al mov eax, [r14] cmp eax, [r14+1Ch] jz short loc_86A35 mov eax, [r14+4] cmp eax, 0FEh ja short loc_86A1F mov [r15], al inc r15 jmp short loc_86A35 loc_86A10: mov [rbx], ah mov al, [r14+4] lea r15, [rbx+2] mov [rbx+1], al jmp short loc_86A35 loc_86A1F: mov byte ptr [r15], 0FFh movzx eax, word ptr [r14+4] rol ax, 8 mov [r15+1], ax add r15, 3 loc_86A35: mov rsi, [r14+20h] sub ebx, r15d add ebx, [r14+10h] mov rdi, r15 mov rdx, rbx call _memmove cmp qword ptr [r14+30h], 0 jz loc_86B84 add r15, rbx cmp dword ptr [r14+18h], 0 mov rdi, r15 jz short loc_86A7F mov eax, [r14+14h] test eax, eax jz short loc_86AA9 mov ecx, 1 cmp dword ptr [r14+1Ch], 80h jnz short loc_86ACF mov rdx, rdi jmp short loc_86ADE loc_86A7F: mov ecx, [r14+8] test ecx, ecx jz loc_86B20 mov eax, 1 cmp dword ptr [r14+1Ch], 80h mov rsi, rdi jnz loc_86B3B mov rdx, rdi jmp loc_86B4A loc_86AA9: movsx eax, byte ptr [r14+38h] add eax, [r14+0Ch] mov [r14+0Ch], eax cmp dword ptr [r14+1Ch], 80h jz short loc_86AEE mov [rdi], ah mov al, [r14+0Ch] mov [rdi+1], al add rdi, 2 jmp short loc_86B09 loc_86ACF: lea rdx, [rdi+1] mov [rdi], ah mov eax, [r14+14h] mov ecx, 2 loc_86ADE: add rdi, rcx mov [rdx], al mov eax, [r14+0Ch] cmp eax, 0FEh ja short loc_86AF5 loc_86AEE: mov [rdi], al inc rdi jmp short loc_86B09 loc_86AF5: mov byte ptr [rdi], 0FFh movzx eax, word ptr [r14+0Ch] rol ax, 8 mov [rdi+1], ax add rdi, 3 loc_86B09: mov rsi, [r14+28h] mov edx, [r14+18h] add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _memcpy loc_86B20: movsx eax, byte ptr [r14+38h] add eax, [r14+0Ch] mov [r14+0Ch], eax cmp dword ptr [r14+1Ch], 80h jnz short loc_86B67 mov [rdi], al jmp short loc_86B84 loc_86B3B: lea rdx, [rdi+1] mov [rdi], ch mov ecx, [r14+8] mov eax, 2 loc_86B4A: mov [rdx], cl mov ecx, [r14+8] cmp ecx, [r14+1Ch] jz short loc_86B84 mov ecx, [r14+0Ch] cmp ecx, 0FEh ja short loc_86B72 mov [rsi+rax], cl jmp short loc_86B84 loc_86B67: mov [rdi], ah mov al, [r14+0Ch] mov [rdi+1], al jmp short loc_86B84 loc_86B72: mov byte ptr [rsi+rax], 0FFh movzx ecx, word ptr [r14+0Ch] rol cx, 8 mov [rsi+rax+1], cx loc_86B84: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char mi_store_var_pack_key(long long a1, _BYTE *a2, int *a3) { int v4; // eax int v5; // ecx long long v6; // r15 _BYTE *v7; // rcx int v8; // eax _BYTE *v9; // r15 unsigned int v10; // eax long long v11; // rbx long long v12; // rax _BYTE *v13; // r15 _BYTE *v14; // rdi int v15; // eax long long v16; // rcx _BYTE *v17; // rdx int v18; // ecx _BYTE *v19; // rdx unsigned int v20; // eax _BYTE *v21; // rdi unsigned int v22; // ecx v4 = *a3; v5 = a3[7]; if ( *a3 ) { v6 = 1LL; if ( v5 == 128 ) { v7 = a2; } else { v7 = a2 + 1; *a2 = BYTE1(v4); v4 = *a3; v6 = 2LL; } v9 = &a2[v6]; *v7 = v4; if ( *a3 != a3[7] ) { v10 = a3[1]; if ( v10 > 0xFE ) { *v9 = -1; *(_WORD *)(v9 + 1) = __ROL2__(*((_WORD *)a3 + 2), 8); v9 += 3; } else { *v9++ = v10; } } } else { v8 = a3[1]; if ( v5 == 128 ) { v9 = a2 + 1; *a2 = v8; } else { *a2 = BYTE1(v8); v9 = a2 + 2; a2[1] = *((_BYTE *)a3 + 4); } } v11 = (unsigned int)(a3[4] + (_DWORD)a2 - (_DWORD)v9); LOBYTE(v12) = memmove(v9, *((_QWORD *)a3 + 4), v11); if ( *((_QWORD *)a3 + 6) ) { v13 = &v9[v11]; v14 = v13; if ( a3[6] ) { v15 = a3[5]; if ( v15 ) { v16 = 1LL; if ( a3[7] == 128 ) { v17 = v13; } else { v17 = v13 + 1; *v13 = BYTE1(v15); v15 = a3[5]; v16 = 2LL; } v14 = &v13[v16]; *v17 = v15; v20 = a3[3]; if ( v20 > 0xFE ) { *v14 = -1; *(_WORD *)(v14 + 1) = __ROL2__(*((_WORD *)a3 + 6), 8); v21 = v14 + 3; goto LABEL_26; } } else { v20 = a3[3] + *((char *)a3 + 56); a3[3] = v20; if ( a3[7] != 128 ) { *v13 = BYTE1(v20); v13[1] = *((_BYTE *)a3 + 12); v21 = v13 + 2; LABEL_26: LOBYTE(v12) = memcpy(v21, *((_QWORD *)a3 + 5), (unsigned int)a3[6]); return v12; } } *v14 = v20; v21 = v14 + 1; goto LABEL_26; } v18 = a3[2]; if ( v18 ) { v12 = 1LL; if ( a3[7] == 128 ) { v19 = v13; } else { v19 = v13 + 1; *v13 = BYTE1(v18); v18 = a3[2]; v12 = 2LL; } *v19 = v18; if ( a3[2] != a3[7] ) { v22 = a3[3]; if ( v22 > 0xFE ) { v13[v12] = -1; *(_WORD *)&v13[v12 + 1] = __ROL2__(*((_WORD *)a3 + 6), 8); } else { v13[v12] = v22; } } } else { LODWORD(v12) = a3[3] + *((char *)a3 + 56); a3[3] = v12; if ( a3[7] == 128 ) { *v13 = v12; } else { *v13 = BYTE1(v12); LOBYTE(v12) = *((_BYTE *)a3 + 12); v13[1] = v12; } } } return v12; }
_mi_store_var_pack_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI MOV EAX,dword ptr [RDX] MOV ECX,dword ptr [RDX + 0x1c] TEST EAX,EAX JZ 0x001869cc MOV R15D,0x1 CMP ECX,0x80 JNZ 0x001869e0 MOV RCX,RBX JMP 0x001869ef LAB_001869cc: MOV EAX,dword ptr [R14 + 0x4] CMP ECX,0x80 JNZ 0x00186a10 LEA R15,[RBX + 0x1] MOV byte ptr [RBX],AL JMP 0x00186a35 LAB_001869e0: LEA RCX,[RBX + 0x1] MOV byte ptr [RBX],AH MOV EAX,dword ptr [R14] MOV R15D,0x2 LAB_001869ef: ADD R15,RBX MOV byte ptr [RCX],AL MOV EAX,dword ptr [R14] CMP EAX,dword ptr [R14 + 0x1c] JZ 0x00186a35 MOV EAX,dword ptr [R14 + 0x4] CMP EAX,0xfe JA 0x00186a1f MOV byte ptr [R15],AL INC R15 JMP 0x00186a35 LAB_00186a10: MOV byte ptr [RBX],AH MOV AL,byte ptr [R14 + 0x4] LEA R15,[RBX + 0x2] MOV byte ptr [RBX + 0x1],AL JMP 0x00186a35 LAB_00186a1f: MOV byte ptr [R15],0xff MOVZX EAX,word ptr [R14 + 0x4] ROL AX,0x8 MOV word ptr [R15 + 0x1],AX ADD R15,0x3 LAB_00186a35: MOV RSI,qword ptr [R14 + 0x20] SUB EBX,R15D ADD EBX,dword ptr [R14 + 0x10] MOV RDI,R15 MOV RDX,RBX CALL 0x00129120 CMP qword ptr [R14 + 0x30],0x0 JZ 0x00186b84 ADD R15,RBX CMP dword ptr [R14 + 0x18],0x0 MOV RDI,R15 JZ 0x00186a7f MOV EAX,dword ptr [R14 + 0x14] TEST EAX,EAX JZ 0x00186aa9 MOV ECX,0x1 CMP dword ptr [R14 + 0x1c],0x80 JNZ 0x00186acf MOV RDX,RDI JMP 0x00186ade LAB_00186a7f: MOV ECX,dword ptr [R14 + 0x8] TEST ECX,ECX JZ 0x00186b20 MOV EAX,0x1 CMP dword ptr [R14 + 0x1c],0x80 MOV RSI,RDI JNZ 0x00186b3b MOV RDX,RDI JMP 0x00186b4a LAB_00186aa9: MOVSX EAX,byte ptr [R14 + 0x38] ADD EAX,dword ptr [R14 + 0xc] MOV dword ptr [R14 + 0xc],EAX CMP dword ptr [R14 + 0x1c],0x80 JZ 0x00186aee MOV byte ptr [RDI],AH MOV AL,byte ptr [R14 + 0xc] MOV byte ptr [RDI + 0x1],AL ADD RDI,0x2 JMP 0x00186b09 LAB_00186acf: LEA RDX,[RDI + 0x1] MOV byte ptr [RDI],AH MOV EAX,dword ptr [R14 + 0x14] MOV ECX,0x2 LAB_00186ade: ADD RDI,RCX MOV byte ptr [RDX],AL MOV EAX,dword ptr [R14 + 0xc] CMP EAX,0xfe JA 0x00186af5 LAB_00186aee: MOV byte ptr [RDI],AL INC RDI JMP 0x00186b09 LAB_00186af5: MOV byte ptr [RDI],0xff MOVZX EAX,word ptr [R14 + 0xc] ROL AX,0x8 MOV word ptr [RDI + 0x1],AX ADD RDI,0x3 LAB_00186b09: MOV RSI,qword ptr [R14 + 0x28] MOV EDX,dword ptr [R14 + 0x18] ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00129080 LAB_00186b20: MOVSX EAX,byte ptr [R14 + 0x38] ADD EAX,dword ptr [R14 + 0xc] MOV dword ptr [R14 + 0xc],EAX CMP dword ptr [R14 + 0x1c],0x80 JNZ 0x00186b67 MOV byte ptr [RDI],AL JMP 0x00186b84 LAB_00186b3b: LEA RDX,[RDI + 0x1] MOV byte ptr [RDI],CH MOV ECX,dword ptr [R14 + 0x8] MOV EAX,0x2 LAB_00186b4a: MOV byte ptr [RDX],CL MOV ECX,dword ptr [R14 + 0x8] CMP ECX,dword ptr [R14 + 0x1c] JZ 0x00186b84 MOV ECX,dword ptr [R14 + 0xc] CMP ECX,0xfe JA 0x00186b72 MOV byte ptr [RSI + RAX*0x1],CL JMP 0x00186b84 LAB_00186b67: MOV byte ptr [RDI],AH MOV AL,byte ptr [R14 + 0xc] MOV byte ptr [RDI + 0x1],AL JMP 0x00186b84 LAB_00186b72: MOV byte ptr [RSI + RAX*0x1],0xff MOVZX ECX,word ptr [R14 + 0xc] ROL CX,0x8 MOV word ptr [RSI + RAX*0x1 + 0x1],CX LAB_00186b84: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void _mi_store_var_pack_key(int8 param_1,int1 *param_2,int *param_3) { uint uVar1; int iVar2; int1 *puVar3; ulong __n; long lVar4; int1 *puVar5; iVar2 = *param_3; if (iVar2 == 0) { if (param_3[7] == 0x80) { puVar5 = param_2 + 1; *param_2 = (char)param_3[1]; } else { *param_2 = (char)((uint)param_3[1] >> 8); puVar5 = param_2 + 2; param_2[1] = (char)param_3[1]; } } else { lVar4 = 1; puVar3 = param_2; if (param_3[7] != 0x80) { *param_2 = (char)((uint)iVar2 >> 8); iVar2 = *param_3; lVar4 = 2; puVar3 = param_2 + 1; } puVar5 = param_2 + lVar4; *puVar3 = (char)iVar2; if (*param_3 != param_3[7]) { if ((uint)param_3[1] < 0xff) { *puVar5 = (char)param_3[1]; puVar5 = puVar5 + 1; } else { *puVar5 = 0xff; *(ushort *)(puVar5 + 1) = *(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8; puVar5 = puVar5 + 3; } } } __n = (ulong)(uint)(((int)param_2 - (int)puVar5) + param_3[4]); memmove(puVar5,*(void **)(param_3 + 8),__n); if (*(long *)(param_3 + 0xc) == 0) { return; } puVar5 = puVar5 + __n; if (param_3[6] == 0) { iVar2 = param_3[2]; if (iVar2 == 0) { iVar2 = (int)(char)param_3[0xe] + param_3[3]; param_3[3] = iVar2; if (param_3[7] == 0x80) { *puVar5 = (char)iVar2; return; } *puVar5 = (char)((uint)iVar2 >> 8); puVar5[1] = (char)param_3[3]; return; } lVar4 = 1; puVar3 = puVar5; if (param_3[7] != 0x80) { *puVar5 = (char)((uint)iVar2 >> 8); iVar2 = param_3[2]; lVar4 = 2; puVar3 = puVar5 + 1; } *puVar3 = (char)iVar2; if (param_3[2] == param_3[7]) { return; } if ((uint)param_3[3] < 0xff) { puVar5[lVar4] = (char)param_3[3]; return; } puVar5[lVar4] = 0xff; *(ushort *)(puVar5 + lVar4 + 1) = *(ushort *)(param_3 + 3) << 8 | *(ushort *)(param_3 + 3) >> 8; return; } iVar2 = param_3[5]; if (iVar2 == 0) { uVar1 = (int)(char)param_3[0xe] + param_3[3]; param_3[3] = uVar1; if (param_3[7] != 0x80) { *puVar5 = (char)(uVar1 >> 8); puVar5[1] = (char)param_3[3]; puVar5 = puVar5 + 2; goto LAB_00186b09; } } else { lVar4 = 1; puVar3 = puVar5; if (param_3[7] != 0x80) { *puVar5 = (char)((uint)iVar2 >> 8); iVar2 = param_3[5]; lVar4 = 2; puVar3 = puVar5 + 1; } puVar5 = puVar5 + lVar4; *puVar3 = (char)iVar2; uVar1 = param_3[3]; if (0xfe < uVar1) { *puVar5 = 0xff; *(ushort *)(puVar5 + 1) = *(ushort *)(param_3 + 3) << 8 | *(ushort *)(param_3 + 3) >> 8; puVar5 = puVar5 + 3; goto LAB_00186b09; } } *puVar5 = (char)uVar1; puVar5 = puVar5 + 1; LAB_00186b09: memcpy(puVar5,*(void **)(param_3 + 10),(ulong)(uint)param_3[6]); return; }
8,255
stbi__tga_info(stbi__context*, int*, int*, int*)
llama.cpp/examples/llava/../../common/stb_image.h
static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) { int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; int sz, tga_colormap_type; stbi__get8(s); // discard Offset tga_colormap_type = stbi__get8(s); // colormap type if( tga_colormap_type > 1 ) { stbi__rewind(s); return 0; // only RGB or indexed allowed } tga_image_type = stbi__get8(s); // image type if ( tga_colormap_type == 1 ) { // colormapped (paletted) image if (tga_image_type != 1 && tga_image_type != 9) { stbi__rewind(s); return 0; } stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { stbi__rewind(s); return 0; } stbi__skip(s,4); // skip image x and y origin tga_colormap_bpp = sz; } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { stbi__rewind(s); return 0; // only RGB or grey allowed, +/- RLE } stbi__skip(s,9); // skip colormap specification and image x/y origin tga_colormap_bpp = 0; } tga_w = stbi__get16le(s); if( tga_w < 1 ) { stbi__rewind(s); return 0; // test width } tga_h = stbi__get16le(s); if( tga_h < 1 ) { stbi__rewind(s); return 0; // test height } tga_bits_per_pixel = stbi__get8(s); // bits per pixel stbi__get8(s); // ignore alpha bits if (tga_colormap_bpp != 0) { if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { // when using a colormap, tga_bits_per_pixel is the size of the indexes // I don't think anything but 8 or 16bit indexes makes sense stbi__rewind(s); return 0; } tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); } else { tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); } if(!tga_comp) { stbi__rewind(s); return 0; } if (x) *x = tga_w; if (y) *y = tga_h; if (comp) *comp = tga_comp; return 1; // seems to have passed everything }
O3
c
stbi__tga_info(stbi__context*, int*, int*, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r14 movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r12 movq 0xc0(%rdi), %rax movq 0xc8(%rdi), %rcx cmpq %rcx, %rax jb 0x446b0 cmpl $0x0, 0x30(%r12) je 0x446bb movq %r12, %rdi callq 0x3cfb1 movq 0xc0(%r12), %rax movq 0xc8(%r12), %rcx incq %rax movq %rax, 0xc0(%r12) cmpq %rcx, %rax jb 0x446d8 cmpl $0x0, 0x30(%r12) je 0x44700 movq %r12, %rdi callq 0x3cfb1 movq 0xc0(%r12), %rax movq %rax, %rcx incq %rax movq %rax, 0xc0(%r12) movb (%rcx), %dl cmpb $0x1, %dl ja 0x449a7 movq 0xc8(%r12), %rcx testb %dl, %dl sete %bl jmp 0x44702 movb $0x1, %bl cmpq %rcx, %rax jb 0x44723 cmpl $0x0, 0x30(%r12) je 0x447c9 movq %r12, %rdi callq 0x3cfb1 movq 0xc0(%r12), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r12) movb (%rax), %r13b movq %rcx, %rax movl %r13d, %ecx testb %bl, %bl je 0x44781 andb $-0xa, %cl cmpb $0x2, %cl jne 0x449a7 cmpq $0x0, 0x10(%r12) movq %rbp, 0x10(%rsp) je 0x447d1 movq 0xc8(%r12), %rdx movl %edx, %ecx subl %eax, %ecx cmpl $0x8, %ecx jg 0x447d1 movq %rdx, 0xc0(%r12) movq 0x28(%r12), %rdi movl $0x9, %esi subl %ecx, %esi callq *0x18(%r12) jmp 0x447dd andb $-0x9, %cl cmpb $0x1, %cl jne 0x449a7 cmpq $0x0, 0x10(%r12) je 0x447e4 movq 0xc8(%r12), %rdx movl %edx, %ecx subl %eax, %ecx cmpl $0x3, %ecx jg 0x447e4 movq %rdx, 0xc0(%r12) movq 0x28(%r12), %rdi movl $0x4, %esi subl %ecx, %esi callq *0x18(%r12) movq 0xc0(%r12), %rax jmp 0x447f0 xorl %r13d, %r13d jmp 0x44735 addq $0x9, %rax movq %rax, 0xc0(%r12) xorl %ebx, %ebx jmp 0x44888 addq $0x4, %rax movq %rax, 0xc0(%r12) cmpq 0xc8(%r12), %rax jb 0x44816 cmpl $0x0, 0x30(%r12) je 0x449a7 movq %r12, %rdi callq 0x3cfb1 movq 0xc0(%r12), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r12) movzbl (%rax), %ebx cmpq $0x20, %rbx ja 0x449a7 movabsq $0x101018100, %rdx # imm = 0x101018100 btq %rbx, %rdx jae 0x449a7 cmpq $0x0, 0x10(%r12) movq %rbp, 0x10(%rsp) je 0x4487c movq 0xc8(%r12), %rsi movl %esi, %edx subl %ecx, %edx cmpl $0x3, %edx jg 0x4487c movq %rsi, 0xc0(%r12) movq 0x28(%r12), %rdi movl $0x4, %esi subl %edx, %esi callq *0x18(%r12) jmp 0x44888 addq $0x5, %rax movq %rax, 0xc0(%r12) movq %r12, %rdi callq 0x3f2f7 testl %eax, %eax je 0x449a7 movl %eax, %ebp movq %r12, %rdi callq 0x3f2f7 testl %eax, %eax je 0x449a7 movq 0xc0(%r12), %rsi movq 0xc8(%r12), %rcx cmpq %rcx, %rsi movq %r14, (%rsp) jb 0x448ed cmpl $0x0, 0x30(%r12) je 0x449ca movq %r12, %rdi movl %eax, %r14d callq 0x3cfb1 movl %r14d, %eax movq 0xc0(%r12), %rsi movq 0xc8(%r12), %rcx leaq 0x1(%rsi), %rdx movq %rdx, 0xc0(%r12) movb (%rsi), %r14b movq %rdx, %rsi cmpq %rcx, %rsi jb 0x44924 cmpl $0x0, 0x30(%r12) je 0x4492f movq %r12, %rdi movl %eax, 0xc(%rsp) callq 0x3cfb1 movl 0xc(%rsp), %eax movq 0xc0(%r12), %rsi incq %rsi movq %rsi, 0xc0(%r12) testb %bl, %bl je 0x4495f cmpb $0x8, %r14b je 0x44942 movzbl %r14b, %ecx cmpl $0x10, %ecx jne 0x449a7 movzbl %bl, %esi cmpl $0xf, %esi jle 0x4498d cmpl $0x20, %esi movq (%rsp), %rdx je 0x449d2 cmpl $0x18, %esi je 0x449d2 cmpl $0x10, %esi je 0x449a0 jmp 0x449a7 movzbl %r14b, %esi cmpl $0xf, %esi jle 0x4498d cmpl $0x20, %esi je 0x449da cmpl $0x18, %esi je 0x449da cmpl $0x10, %esi movq (%rsp), %rdx jne 0x449a7 andb $-0x9, %r13b xorl %ecx, %ecx cmpb $0x3, %r13b sete %cl xorl $0x3, %ecx jmp 0x449e6 movl $0x1, %ecx cmpl $0x8, %esi movq (%rsp), %rdx je 0x449e6 cmpl $0xf, %esi jne 0x449a7 movl $0x3, %ecx jmp 0x449e6 movups 0xd0(%r12), %xmm0 movups %xmm0, 0xc0(%r12) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r14d, %r14d jmp 0x448ff shrb $0x3, %bl movzbl %bl, %ecx jmp 0x449e6 shrb $0x3, %r14b movzbl %r14b, %ecx movq (%rsp), %rdx testq %r15, %r15 je 0x449ee movl %ebp, (%r15) movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x449fa movl %eax, (%rsi) movl $0x1, %eax testq %rdx, %rdx je 0x449bb movl %ecx, (%rdx) jmp 0x449bb
_ZL14stbi__tga_infoP13stbi__contextPiS1_S1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rcx mov rbp, rdx mov r15, rsi mov r12, rdi mov rax, [rdi+0C0h] mov rcx, [rdi+0C8h] cmp rax, rcx jb short loc_446B0 cmp dword ptr [r12+30h], 0 jz short loc_446BB mov rdi, r12 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r12+0C0h] mov rcx, [r12+0C8h] loc_446B0: inc rax mov [r12+0C0h], rax loc_446BB: cmp rax, rcx jb short loc_446D8 cmp dword ptr [r12+30h], 0 jz short loc_44700 mov rdi, r12 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r12+0C0h] loc_446D8: mov rcx, rax inc rax mov [r12+0C0h], rax mov dl, [rcx] cmp dl, 1 ja loc_449A7 mov rcx, [r12+0C8h] test dl, dl setz bl jmp short loc_44702 loc_44700: mov bl, 1 loc_44702: cmp rax, rcx jb short loc_44723 cmp dword ptr [r12+30h], 0 jz loc_447C9 mov rdi, r12 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r12+0C0h] loc_44723: lea rcx, [rax+1] mov [r12+0C0h], rcx mov r13b, [rax] mov rax, rcx loc_44735: mov ecx, r13d test bl, bl jz short loc_44781 and cl, 0F6h cmp cl, 2 jnz loc_449A7 cmp qword ptr [r12+10h], 0 mov [rsp+48h+var_38], rbp jz short loc_447D1 mov rdx, [r12+0C8h] mov ecx, edx sub ecx, eax cmp ecx, 8 jg short loc_447D1 mov [r12+0C0h], rdx mov rdi, [r12+28h] mov esi, 9 sub esi, ecx call qword ptr [r12+18h] jmp short loc_447DD loc_44781: and cl, 0F7h cmp cl, 1 jnz loc_449A7 cmp qword ptr [r12+10h], 0 jz short loc_447E4 mov rdx, [r12+0C8h] mov ecx, edx sub ecx, eax cmp ecx, 3 jg short loc_447E4 mov [r12+0C0h], rdx mov rdi, [r12+28h] mov esi, 4 sub esi, ecx call qword ptr [r12+18h] mov rax, [r12+0C0h] jmp short loc_447F0 loc_447C9: xor r13d, r13d jmp loc_44735 loc_447D1: add rax, 9 mov [r12+0C0h], rax loc_447DD: xor ebx, ebx jmp loc_44888 loc_447E4: add rax, 4 mov [r12+0C0h], rax loc_447F0: cmp rax, [r12+0C8h] jb short loc_44816 cmp dword ptr [r12+30h], 0 jz loc_449A7 mov rdi, r12 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r12+0C0h] loc_44816: lea rcx, [rax+1] mov [r12+0C0h], rcx movzx ebx, byte ptr [rax] cmp rbx, 20h ; ' ' ja loc_449A7 mov rdx, 101018100h bt rdx, rbx jnb loc_449A7 cmp qword ptr [r12+10h], 0 mov [rsp+48h+var_38], rbp jz short loc_4487C mov rsi, [r12+0C8h] mov edx, esi sub edx, ecx cmp edx, 3 jg short loc_4487C mov [r12+0C0h], rsi mov rdi, [r12+28h] mov esi, 4 sub esi, edx call qword ptr [r12+18h] jmp short loc_44888 loc_4487C: add rax, 5 mov [r12+0C0h], rax loc_44888: mov rdi, r12 call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) test eax, eax jz loc_449A7 mov ebp, eax mov rdi, r12 call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) test eax, eax jz loc_449A7 mov rsi, [r12+0C0h] mov rcx, [r12+0C8h] cmp rsi, rcx mov [rsp+48h+var_48], r14 jb short loc_448ED cmp dword ptr [r12+30h], 0 jz loc_449CA mov rdi, r12 mov r14d, eax call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov eax, r14d mov rsi, [r12+0C0h] mov rcx, [r12+0C8h] loc_448ED: lea rdx, [rsi+1] mov [r12+0C0h], rdx mov r14b, [rsi] mov rsi, rdx loc_448FF: cmp rsi, rcx jb short loc_44924 cmp dword ptr [r12+30h], 0 jz short loc_4492F mov rdi, r12 mov [rsp+48h+var_3C], eax call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov eax, [rsp+48h+var_3C] mov rsi, [r12+0C0h] loc_44924: inc rsi mov [r12+0C0h], rsi loc_4492F: test bl, bl jz short loc_4495F cmp r14b, 8 jz short loc_44942 movzx ecx, r14b cmp ecx, 10h jnz short loc_449A7 loc_44942: movzx esi, bl cmp esi, 0Fh jle short loc_4498D cmp esi, 20h ; ' ' mov rdx, [rsp+48h+var_48] jz short loc_449D2 cmp esi, 18h jz short loc_449D2 cmp esi, 10h jz short loc_449A0 jmp short loc_449A7 loc_4495F: movzx esi, r14b cmp esi, 0Fh jle short loc_4498D cmp esi, 20h ; ' ' jz short loc_449DA cmp esi, 18h jz short loc_449DA cmp esi, 10h mov rdx, [rsp+48h+var_48] jnz short loc_449A7 and r13b, 0F7h xor ecx, ecx cmp r13b, 3 setz cl xor ecx, 3 jmp short loc_449E6 loc_4498D: mov ecx, 1 cmp esi, 8 mov rdx, [rsp+48h+var_48] jz short loc_449E6 cmp esi, 0Fh jnz short loc_449A7 loc_449A0: mov ecx, 3 jmp short loc_449E6 loc_449A7: movups xmm0, xmmword ptr [r12+0D0h] movups xmmword ptr [r12+0C0h], xmm0 xor eax, eax loc_449BB: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_449CA: xor r14d, r14d jmp loc_448FF loc_449D2: shr bl, 3 movzx ecx, bl jmp short loc_449E6 loc_449DA: shr r14b, 3 movzx ecx, r14b mov rdx, [rsp+48h+var_48] loc_449E6: test r15, r15 jz short loc_449EE mov [r15], ebp loc_449EE: mov rsi, [rsp+48h+var_38] test rsi, rsi jz short loc_449FA mov [rsi], eax loc_449FA: mov eax, 1 test rdx, rdx jz short loc_449BB mov [rdx], ecx jmp short loc_449BB
long long stbi__tga_info(long long a1, _DWORD *a2, _DWORD *a3, int *a4) { char *v7; // rax unsigned long long v8; // rcx char *v9; // rcx char v10; // dl bool v11; // bl char v12; // r13 int v13; // ecx int v14; // ecx unsigned __int8 *v15; // rax unsigned long long v16; // rbx long long v17; // rdx int v18; // edx int v19; // eax int v20; // ebp int v21; // eax unsigned __int8 *v22; // rsi unsigned long long v23; // rcx int v24; // r14d unsigned __int8 v25; // r14 int v26; // esi int *v27; // rdx int v28; // ecx long long result; // rax int *v30; // [rsp+0h] [rbp-48h] int v31; // [rsp+Ch] [rbp-3Ch] _DWORD *v32; // [rsp+10h] [rbp-38h] v7 = *(char **)(a1 + 192); v8 = *(_QWORD *)(a1 + 200); if ( (unsigned long long)v7 >= v8 ) { if ( !*(_DWORD *)(a1 + 48) ) goto LABEL_5; stbi__refill_buffer(a1); v7 = *(char **)(a1 + 192); v8 = *(_QWORD *)(a1 + 200); } *(_QWORD *)(a1 + 192) = ++v7; LABEL_5: if ( (unsigned long long)v7 >= v8 ) { if ( !*(_DWORD *)(a1 + 48) ) { v11 = 1; goto LABEL_11; } stbi__refill_buffer(a1); v7 = *(char **)(a1 + 192); } v9 = v7++; *(_QWORD *)(a1 + 192) = v7; v10 = *v9; if ( (unsigned __int8)*v9 > 1u ) goto LABEL_63; v8 = *(_QWORD *)(a1 + 200); v11 = v10 == 0; LABEL_11: if ( (unsigned long long)v7 < v8 ) { LABEL_14: *(_QWORD *)(a1 + 192) = v7 + 1; v12 = *v7++; goto LABEL_15; } if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v7 = *(char **)(a1 + 192); goto LABEL_14; } v12 = 0; LABEL_15: if ( v11 ) { if ( (v12 & 0xF6) != 2 ) goto LABEL_63; v32 = a3; if ( *(_QWORD *)(a1 + 16) && (v13 = *(_QWORD *)(a1 + 200) - (_DWORD)v7, v13 <= 8) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(9 - v13)); } else { *(_QWORD *)(a1 + 192) = v7 + 9; } LOBYTE(v16) = 0; } else { if ( (v12 & 0xF7) != 1 ) goto LABEL_63; if ( *(_QWORD *)(a1 + 16) && (v14 = *(_QWORD *)(a1 + 200) - (_DWORD)v7, v14 <= 3) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(4 - v14)); v15 = *(unsigned __int8 **)(a1 + 192); } else { v15 = (unsigned __int8 *)(v7 + 4); *(_QWORD *)(a1 + 192) = v15; } if ( (unsigned long long)v15 >= *(_QWORD *)(a1 + 200) ) { if ( !*(_DWORD *)(a1 + 48) ) goto LABEL_63; stbi__refill_buffer(a1); v15 = *(unsigned __int8 **)(a1 + 192); } *(_QWORD *)(a1 + 192) = v15 + 1; v16 = *v15; if ( v16 > 0x20 ) goto LABEL_63; v17 = 0x101018100LL; if ( !_bittest64(&v17, v16) ) goto LABEL_63; v32 = a3; if ( *(_QWORD *)(a1 + 16) && (v18 = *(_QWORD *)(a1 + 200) - ((_DWORD)v15 + 1), v18 <= 3) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(4 - v18)); } else { *(_QWORD *)(a1 + 192) = v15 + 5; } } v19 = stbi__get16le(a1); if ( !v19 ) goto LABEL_63; v20 = v19; v21 = stbi__get16le(a1); if ( !v21 ) goto LABEL_63; v22 = *(unsigned __int8 **)(a1 + 192); v23 = *(_QWORD *)(a1 + 200); v30 = a4; if ( (unsigned long long)v22 < v23 ) goto LABEL_42; if ( *(_DWORD *)(a1 + 48) ) { v24 = v21; stbi__refill_buffer(a1); v21 = v24; v22 = *(unsigned __int8 **)(a1 + 192); v23 = *(_QWORD *)(a1 + 200); LABEL_42: *(_QWORD *)(a1 + 192) = v22 + 1; v25 = *v22++; goto LABEL_43; } v25 = 0; LABEL_43: if ( (unsigned long long)v22 >= v23 ) { if ( !*(_DWORD *)(a1 + 48) ) goto LABEL_47; v31 = v21; stbi__refill_buffer(a1); v21 = v31; v22 = *(unsigned __int8 **)(a1 + 192); } *(_QWORD *)(a1 + 192) = v22 + 1; LABEL_47: if ( (_BYTE)v16 ) { if ( v25 != 8 && v25 != 16 ) goto LABEL_63; v26 = (unsigned __int8)v16; if ( (unsigned __int8)v16 > 0xFu ) { v27 = v30; if ( (unsigned __int8)v16 == 32 || (unsigned __int8)v16 == 24 ) { v28 = (unsigned __int8)v16 >> 3; goto LABEL_68; } if ( (unsigned __int8)v16 != 16 ) goto LABEL_63; goto LABEL_62; } } else { v26 = v25; if ( v25 > 0xFu ) { if ( v25 == 32 || v25 == 24 ) { v28 = v25 >> 3; v27 = v30; goto LABEL_68; } v27 = v30; if ( v25 != 16 ) goto LABEL_63; v28 = ((v12 & 0xF7) == 3) ^ 3; goto LABEL_68; } } v28 = 1; v27 = v30; if ( v26 != 8 ) { if ( v26 == 15 ) { LABEL_62: v28 = 3; goto LABEL_68; } LABEL_63: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return 0LL; } LABEL_68: if ( a2 ) *a2 = v20; if ( v32 ) *v32 = v21; result = 1LL; if ( v27 ) *v27 = v28; return result; }
stbi__tga_info: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RCX MOV RBP,RDX MOV R15,RSI MOV R12,RDI MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,qword ptr [RDI + 0xc8] CMP RAX,RCX JC 0x001446b0 CMP dword ptr [R12 + 0x30],0x0 JZ 0x001446bb MOV RDI,R12 CALL 0x0013cfb1 MOV RAX,qword ptr [R12 + 0xc0] MOV RCX,qword ptr [R12 + 0xc8] LAB_001446b0: INC RAX MOV qword ptr [R12 + 0xc0],RAX LAB_001446bb: CMP RAX,RCX JC 0x001446d8 CMP dword ptr [R12 + 0x30],0x0 JZ 0x00144700 MOV RDI,R12 CALL 0x0013cfb1 MOV RAX,qword ptr [R12 + 0xc0] LAB_001446d8: MOV RCX,RAX INC RAX MOV qword ptr [R12 + 0xc0],RAX MOV DL,byte ptr [RCX] CMP DL,0x1 JA 0x001449a7 MOV RCX,qword ptr [R12 + 0xc8] TEST DL,DL SETZ BL JMP 0x00144702 LAB_00144700: MOV BL,0x1 LAB_00144702: CMP RAX,RCX JC 0x00144723 CMP dword ptr [R12 + 0x30],0x0 JZ 0x001447c9 MOV RDI,R12 CALL 0x0013cfb1 MOV RAX,qword ptr [R12 + 0xc0] LAB_00144723: LEA RCX,[RAX + 0x1] MOV qword ptr [R12 + 0xc0],RCX MOV R13B,byte ptr [RAX] MOV RAX,RCX LAB_00144735: MOV ECX,R13D TEST BL,BL JZ 0x00144781 AND CL,0xf6 CMP CL,0x2 JNZ 0x001449a7 CMP qword ptr [R12 + 0x10],0x0 MOV qword ptr [RSP + 0x10],RBP JZ 0x001447d1 MOV RDX,qword ptr [R12 + 0xc8] MOV ECX,EDX SUB ECX,EAX CMP ECX,0x8 JG 0x001447d1 MOV qword ptr [R12 + 0xc0],RDX MOV RDI,qword ptr [R12 + 0x28] MOV ESI,0x9 SUB ESI,ECX CALL qword ptr [R12 + 0x18] JMP 0x001447dd LAB_00144781: AND CL,0xf7 CMP CL,0x1 JNZ 0x001449a7 CMP qword ptr [R12 + 0x10],0x0 JZ 0x001447e4 MOV RDX,qword ptr [R12 + 0xc8] MOV ECX,EDX SUB ECX,EAX CMP ECX,0x3 JG 0x001447e4 MOV qword ptr [R12 + 0xc0],RDX MOV RDI,qword ptr [R12 + 0x28] MOV ESI,0x4 SUB ESI,ECX CALL qword ptr [R12 + 0x18] MOV RAX,qword ptr [R12 + 0xc0] JMP 0x001447f0 LAB_001447c9: XOR R13D,R13D JMP 0x00144735 LAB_001447d1: ADD RAX,0x9 MOV qword ptr [R12 + 0xc0],RAX LAB_001447dd: XOR EBX,EBX JMP 0x00144888 LAB_001447e4: ADD RAX,0x4 MOV qword ptr [R12 + 0xc0],RAX LAB_001447f0: CMP RAX,qword ptr [R12 + 0xc8] JC 0x00144816 CMP dword ptr [R12 + 0x30],0x0 JZ 0x001449a7 MOV RDI,R12 CALL 0x0013cfb1 MOV RAX,qword ptr [R12 + 0xc0] LAB_00144816: LEA RCX,[RAX + 0x1] MOV qword ptr [R12 + 0xc0],RCX MOVZX EBX,byte ptr [RAX] CMP RBX,0x20 JA 0x001449a7 MOV RDX,0x101018100 BT RDX,RBX JNC 0x001449a7 CMP qword ptr [R12 + 0x10],0x0 MOV qword ptr [RSP + 0x10],RBP JZ 0x0014487c MOV RSI,qword ptr [R12 + 0xc8] MOV EDX,ESI SUB EDX,ECX CMP EDX,0x3 JG 0x0014487c MOV qword ptr [R12 + 0xc0],RSI MOV RDI,qword ptr [R12 + 0x28] MOV ESI,0x4 SUB ESI,EDX CALL qword ptr [R12 + 0x18] JMP 0x00144888 LAB_0014487c: ADD RAX,0x5 MOV qword ptr [R12 + 0xc0],RAX LAB_00144888: MOV RDI,R12 CALL 0x0013f2f7 TEST EAX,EAX JZ 0x001449a7 MOV EBP,EAX MOV RDI,R12 CALL 0x0013f2f7 TEST EAX,EAX JZ 0x001449a7 MOV RSI,qword ptr [R12 + 0xc0] MOV RCX,qword ptr [R12 + 0xc8] CMP RSI,RCX MOV qword ptr [RSP],R14 JC 0x001448ed CMP dword ptr [R12 + 0x30],0x0 JZ 0x001449ca MOV RDI,R12 MOV R14D,EAX CALL 0x0013cfb1 MOV EAX,R14D MOV RSI,qword ptr [R12 + 0xc0] MOV RCX,qword ptr [R12 + 0xc8] LAB_001448ed: LEA RDX,[RSI + 0x1] MOV qword ptr [R12 + 0xc0],RDX MOV R14B,byte ptr [RSI] MOV RSI,RDX LAB_001448ff: CMP RSI,RCX JC 0x00144924 CMP dword ptr [R12 + 0x30],0x0 JZ 0x0014492f MOV RDI,R12 MOV dword ptr [RSP + 0xc],EAX CALL 0x0013cfb1 MOV EAX,dword ptr [RSP + 0xc] MOV RSI,qword ptr [R12 + 0xc0] LAB_00144924: INC RSI MOV qword ptr [R12 + 0xc0],RSI LAB_0014492f: TEST BL,BL JZ 0x0014495f CMP R14B,0x8 JZ 0x00144942 MOVZX ECX,R14B CMP ECX,0x10 JNZ 0x001449a7 LAB_00144942: MOVZX ESI,BL CMP ESI,0xf JLE 0x0014498d CMP ESI,0x20 MOV RDX,qword ptr [RSP] JZ 0x001449d2 CMP ESI,0x18 JZ 0x001449d2 CMP ESI,0x10 JZ 0x001449a0 JMP 0x001449a7 LAB_0014495f: MOVZX ESI,R14B CMP ESI,0xf JLE 0x0014498d CMP ESI,0x20 JZ 0x001449da CMP ESI,0x18 JZ 0x001449da CMP ESI,0x10 MOV RDX,qword ptr [RSP] JNZ 0x001449a7 AND R13B,0xf7 XOR ECX,ECX CMP R13B,0x3 SETZ CL XOR ECX,0x3 JMP 0x001449e6 LAB_0014498d: MOV ECX,0x1 CMP ESI,0x8 MOV RDX,qword ptr [RSP] JZ 0x001449e6 CMP ESI,0xf JNZ 0x001449a7 LAB_001449a0: MOV ECX,0x3 JMP 0x001449e6 LAB_001449a7: MOVUPS XMM0,xmmword ptr [R12 + 0xd0] MOVUPS xmmword ptr [R12 + 0xc0],XMM0 XOR EAX,EAX LAB_001449bb: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001449ca: XOR R14D,R14D JMP 0x001448ff LAB_001449d2: SHR BL,0x3 MOVZX ECX,BL JMP 0x001449e6 LAB_001449da: SHR R14B,0x3 MOVZX ECX,R14B MOV RDX,qword ptr [RSP] LAB_001449e6: TEST R15,R15 JZ 0x001449ee MOV dword ptr [R15],EBP LAB_001449ee: MOV RSI,qword ptr [RSP + 0x10] TEST RSI,RSI JZ 0x001449fa MOV dword ptr [RSI],EAX LAB_001449fa: MOV EAX,0x1 TEST RDX,RDX JZ 0x001449bb MOV dword ptr [RDX],ECX JMP 0x001449bb
/* stbi__tga_info(stbi__context*, int*, int*, int*) */ int8 stbi__tga_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4) { int iVar1; byte *pbVar2; int iVar3; uint uVar4; byte *pbVar5; byte bVar6; byte bVar7; byte bVar8; bool bVar9; pbVar2 = *(byte **)(param_1 + 0xc0); pbVar5 = *(byte **)(param_1 + 200); if (pbVar2 < pbVar5) { LAB_001446b0: pbVar2 = pbVar2 + 1; *(byte **)(param_1 + 0xc0) = pbVar2; } else if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pbVar2 = *(byte **)(param_1 + 0xc0); pbVar5 = *(byte **)(param_1 + 200); goto LAB_001446b0; } if (pbVar2 < pbVar5) { LAB_001446d8: *(byte **)(param_1 + 0xc0) = pbVar2 + 1; if (1 < *pbVar2) goto LAB_001449a7; pbVar5 = *(byte **)(param_1 + 200); bVar9 = *pbVar2 == 0; pbVar2 = pbVar2 + 1; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pbVar2 = *(byte **)(param_1 + 0xc0); goto LAB_001446d8; } bVar9 = true; } if (pbVar2 < pbVar5) { LAB_00144723: *(byte **)(param_1 + 0xc0) = pbVar2 + 1; bVar7 = *pbVar2; pbVar2 = pbVar2 + 1; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pbVar2 = *(byte **)(param_1 + 0xc0); goto LAB_00144723; } bVar7 = 0; } if (bVar9) { if ((bVar7 & 0xf6) != 2) goto LAB_001449a7; if (*(long *)(param_1 + 0x10) == 0) { LAB_001447d1: *(byte **)(param_1 + 0xc0) = pbVar2 + 9; } else { iVar3 = (int)*(int8 *)(param_1 + 200) - (int)pbVar2; if (8 < iVar3) goto LAB_001447d1; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),9 - iVar3); } bVar6 = 0; } else { if ((bVar7 & 0xf7) != 1) goto LAB_001449a7; if (*(long *)(param_1 + 0x10) == 0) { LAB_001447e4: pbVar2 = pbVar2 + 4; *(byte **)(param_1 + 0xc0) = pbVar2; } else { iVar3 = (int)*(int8 *)(param_1 + 200) - (int)pbVar2; if (3 < iVar3) goto LAB_001447e4; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),4 - iVar3); pbVar2 = *(byte **)(param_1 + 0xc0); } if (*(byte **)(param_1 + 200) <= pbVar2) { if (*(int *)(param_1 + 0x30) == 0) goto LAB_001449a7; stbi__refill_buffer(param_1); pbVar2 = *(byte **)(param_1 + 0xc0); } *(byte **)(param_1 + 0xc0) = pbVar2 + 1; bVar6 = *pbVar2; if ((0x20 < (ulong)bVar6) || ((0x101018100U >> ((ulong)bVar6 & 0x3f) & 1) == 0)) goto LAB_001449a7; if (*(long *)(param_1 + 0x10) == 0) { LAB_0014487c: *(byte **)(param_1 + 0xc0) = pbVar2 + 5; } else { iVar3 = (int)*(int8 *)(param_1 + 200) - (int)(pbVar2 + 1); if (3 < iVar3) goto LAB_0014487c; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),4 - iVar3); } } iVar3 = stbi__get16le(param_1); if ((iVar3 == 0) || (iVar1 = stbi__get16le(param_1), iVar1 == 0)) goto LAB_001449a7; pbVar2 = *(byte **)(param_1 + 0xc0); pbVar5 = *(byte **)(param_1 + 200); if (pbVar2 < pbVar5) { LAB_001448ed: *(byte **)(param_1 + 0xc0) = pbVar2 + 1; bVar8 = *pbVar2; pbVar2 = pbVar2 + 1; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pbVar2 = *(byte **)(param_1 + 0xc0); pbVar5 = *(byte **)(param_1 + 200); goto LAB_001448ed; } bVar8 = 0; } if (pbVar2 < pbVar5) { LAB_00144924: *(byte **)(param_1 + 0xc0) = pbVar2 + 1; } else if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pbVar2 = *(byte **)(param_1 + 0xc0); goto LAB_00144924; } if (bVar6 == 0) { if (0xf < bVar8) { if ((bVar8 == 0x20) || (bVar8 == 0x18)) { uVar4 = (uint)(bVar8 >> 3); } else { if (bVar8 != 0x10) goto LAB_001449a7; uVar4 = (bVar7 & 0xf7) == 3 ^ 3; } goto LAB_001449e6; } LAB_0014498d: uVar4 = 1; if (bVar8 == 8) goto LAB_001449e6; if (bVar8 != 0xf) { LAB_001449a7: *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); return 0; } } else { if ((bVar8 != 8) && (bVar8 != 0x10)) goto LAB_001449a7; bVar8 = bVar6; if (bVar6 < 0x10) goto LAB_0014498d; if ((bVar6 == 0x20) || (bVar6 == 0x18)) { uVar4 = (uint)(bVar6 >> 3); goto LAB_001449e6; } if (bVar6 != 0x10) goto LAB_001449a7; } uVar4 = 3; LAB_001449e6: if (param_2 != (int *)0x0) { *param_2 = iVar3; } if (param_3 != (int *)0x0) { *param_3 = iVar1; } if (param_4 == (int *)0x0) { return 1; } *param_4 = uVar4; return 1; }
8,256
mi_check_status
eloqsql/storage/myisam/mi_locking.c
my_bool mi_check_status(void *param) { MI_INFO *info=(MI_INFO*) param; DBUG_ENTER("mi_check_status"); DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u", (long) info->s->state.dellink, (uint) info->s->r_locks, (uint) info->s->w_locks)); /* The test for w_locks == 1 is here because this thread has already done an external lock (in other words: w_locks == 1 means no other threads has a write lock) */ DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR || (myisam_concurrent_insert == 2 && info->s->r_locks && info->s->w_locks == 1))); }
O0
c
mi_check_status: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xb1042 jmp 0xb1044 movq -0x10(%rbp), %rax movq (%rax), %rcx movb $0x1, %al cmpq $-0x1, 0x58(%rcx) movb %al, -0x11(%rbp) je 0xb1098 xorl %eax, %eax leaq 0x20e160(%rip), %rcx # 0x2bf1c0 cmpq $0x2, (%rcx) movb %al, -0x12(%rbp) jne 0xb1092 movq -0x10(%rbp), %rax movq (%rax), %rcx xorl %eax, %eax cmpl $0x0, 0x364(%rcx) movb %al, -0x12(%rbp) je 0xb1092 movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x1, 0x360(%rax) sete %al movb %al, -0x12(%rbp) movb -0x12(%rbp), %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movb %al, -0x13(%rbp) movb -0x13(%rbp), %al popq %rbp retq nopw (%rax,%rax)
mi_check_status: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short $+2 loc_B1042: jmp short $+2 loc_B1044: mov rax, [rbp+var_10] mov rcx, [rax] mov al, 1 cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_11], al jz short loc_B1098 xor eax, eax lea rcx, myisam_concurrent_insert cmp qword ptr [rcx], 2 mov [rbp+var_12], al jnz short loc_B1092 mov rax, [rbp+var_10] mov rcx, [rax] xor eax, eax cmp dword ptr [rcx+364h], 0 mov [rbp+var_12], al jz short loc_B1092 mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+360h], 1 setz al mov [rbp+var_12], al loc_B1092: mov al, [rbp+var_12] mov [rbp+var_11], al loc_B1098: mov al, [rbp+var_11] xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_13], al mov al, [rbp+var_13] pop rbp retn
_BOOL8 mi_check_status(long long a1) { bool v2; // [rsp+2h] [rbp-12h] char v3; // [rsp+3h] [rbp-11h] v3 = 1; if ( *(_QWORD *)(*(_QWORD *)a1 + 88LL) != -1LL ) { v2 = 0; if ( myisam_concurrent_insert == 2LL ) { v2 = 0; if ( *(_DWORD *)(*(_QWORD *)a1 + 868LL) ) v2 = *(_DWORD *)(*(_QWORD *)a1 + 864LL) == 1; } v3 = v2; } return (v3 & 1) == 0; }
mi_check_status: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001b1042 LAB_001b1042: JMP 0x001b1044 LAB_001b1044: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV AL,0x1 CMP qword ptr [RCX + 0x58],-0x1 MOV byte ptr [RBP + -0x11],AL JZ 0x001b1098 XOR EAX,EAX LEA RCX,[0x3bf1c0] CMP qword ptr [RCX],0x2 MOV byte ptr [RBP + -0x12],AL JNZ 0x001b1092 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] XOR EAX,EAX CMP dword ptr [RCX + 0x364],0x0 MOV byte ptr [RBP + -0x12],AL JZ 0x001b1092 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x360],0x1 SETZ AL MOV byte ptr [RBP + -0x12],AL LAB_001b1092: MOV AL,byte ptr [RBP + -0x12] MOV byte ptr [RBP + -0x11],AL LAB_001b1098: MOV AL,byte ptr [RBP + -0x11] XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x13],AL MOV AL,byte ptr [RBP + -0x13] POP RBP RET
byte mi_check_status(long *param_1) { int1 local_1a; int1 local_19; local_19 = true; if (*(long *)(*param_1 + 0x58) != -1) { local_1a = false; if ((myisam_concurrent_insert == 2) && (local_1a = false, *(int *)(*param_1 + 0x364) != 0)) { local_1a = *(int *)(*param_1 + 0x360) == 1; } local_19 = local_1a; } return (local_19 ^ 0xffU) & 1; }
8,257
mi_check_status
eloqsql/storage/myisam/mi_locking.c
my_bool mi_check_status(void *param) { MI_INFO *info=(MI_INFO*) param; DBUG_ENTER("mi_check_status"); DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u", (long) info->s->state.dellink, (uint) info->s->r_locks, (uint) info->s->w_locks)); /* The test for w_locks == 1 is here because this thread has already done an external lock (in other words: w_locks == 1 means no other threads has a write lock) */ DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR || (myisam_concurrent_insert == 2 && info->s->r_locks && info->s->w_locks == 1))); }
O3
c
mi_check_status: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx cmpq $-0x1, 0x58(%rcx) je 0x7c803 leaq 0x308b5a(%rip), %rdx # 0x385340 movb $0x1, %al cmpq $0x2, (%rdx) jne 0x7c805 cmpl $0x0, 0x364(%rcx) je 0x7c805 cmpl $0x1, 0x360(%rcx) setne %al jmp 0x7c805 xorl %eax, %eax popq %rbp retq
mi_check_status: push rbp mov rbp, rsp mov rcx, [rdi] cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh jz short loc_7C803 lea rdx, myisam_concurrent_insert mov al, 1 cmp qword ptr [rdx], 2 jnz short loc_7C805 cmp dword ptr [rcx+364h], 0 jz short loc_7C805 cmp dword ptr [rcx+360h], 1 setnz al jmp short loc_7C805 loc_7C803: xor eax, eax loc_7C805: pop rbp retn
bool mi_check_status(long long *a1) { long long v1; // rcx bool result; // al v1 = *a1; if ( *(_QWORD *)(*a1 + 88) == -1LL ) return 0; result = 1; if ( myisam_concurrent_insert == 2LL ) { if ( *(_DWORD *)(v1 + 868) ) return *(_DWORD *)(v1 + 864) != 1; } return result; }
mi_check_status: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] CMP qword ptr [RCX + 0x58],-0x1 JZ 0x0017c803 LEA RDX,[0x485340] MOV AL,0x1 CMP qword ptr [RDX],0x2 JNZ 0x0017c805 CMP dword ptr [RCX + 0x364],0x0 JZ 0x0017c805 CMP dword ptr [RCX + 0x360],0x1 SETNZ AL JMP 0x0017c805 LAB_0017c803: XOR EAX,EAX LAB_0017c805: POP RBP RET
bool mi_check_status(long *param_1) { long lVar1; bool bVar2; lVar1 = *param_1; if (*(long *)(lVar1 + 0x58) == -1) { bVar2 = false; } else { bVar2 = true; if ((myisam_concurrent_insert == 2) && (*(int *)(lVar1 + 0x364) != 0)) { bVar2 = *(int *)(lVar1 + 0x360) != 1; } } return bVar2; }
8,258
my_convert_fix
eloqsql/strings/ctype.c
size_t my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length, CHARSET_INFO *from_cs, const char *from, size_t from_length, size_t nchars, MY_STRCOPY_STATUS *copy_status, MY_STRCONV_STATUS *conv_status) { int cnvres; my_wc_t wc; my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb; const uchar *from_end= (const uchar*) from + from_length; uchar *to_end= (uchar*) to + to_length; char *to_start= to; DBUG_ASSERT(to_cs != &my_charset_bin); DBUG_ASSERT(from_cs != &my_charset_bin); copy_status->m_well_formed_error_pos= NULL; conv_status->m_cannot_convert_error_pos= NULL; for ( ; nchars; nchars--) { const char *from_prev= from; if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; // End of line // Incomplete byte sequence if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from_prev; wc= '?'; goto outp; } else { from= from_prev; break; } } copy_status->m_source_end_pos= from; return to - to_start; }
O3
c
my_convert_fix: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movq %rdx, %r12 movq %rdi, %r13 movq 0x20(%rbp), %rdi movq 0x18(%rbp), %rdx movq 0x10(%rbp), %r8 movq %rcx, -0x60(%rbp) movq 0xb8(%rcx), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq 0xb8(%r13), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) xorl %eax, %eax movq %rax, 0x8(%rdx) movq %rax, (%rdi) testq %r8, %r8 movq %rsi, -0x48(%rbp) je 0xd1ec7 movq %r8, -0x50(%rbp) addq %r14, %r9 movq %r9, -0x38(%rbp) addq %rsi, %r12 movq %rsi, %rbx movq -0x60(%rbp), %rdi leaq -0x30(%rbp), %rsi movq %r14, %rdx movq -0x38(%rbp), %rcx callq *-0x58(%rbp) movl %eax, %r15d testl %eax, %eax jle 0xd1e3f movl %r15d, %r15d addq %r14, %r15 movq -0x30(%rbp), %rsi jmp 0xd1e77 je 0xd1e62 cmpl $-0x64, %r15d jb 0xd1e5c movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0xd1e54 movq %r14, (%rax) negl %r15d addq %r14, %r15 jmp 0xd1e9f cmpq -0x38(%rbp), %r14 jae 0xd1ec2 movq 0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0xd1e71 movq %r14, 0x8(%rax) leaq 0x1(%r14), %r15 jmp 0xd1e9f movq %r13, %rdi movq %rbx, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jg 0xd1eae testl %eax, %eax jne 0xd1ec2 cmpq $0x3f, -0x30(%rbp) je 0xd1ec2 movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0xd1e9f movq %r14, (%rax) movq $0x3f, -0x30(%rbp) movl $0x3f, %esi jmp 0xd1e77 movl %eax, %eax addq %rax, %rbx movq %r15, %r14 decq -0x50(%rbp) jne 0xd1e1a jmp 0xd1ecd movq %r14, %r15 jmp 0xd1ecd movq %r14, %r15 movq %rsi, %rbx movq 0x18(%rbp), %rax movq %r15, (%rax) subq -0x48(%rbp), %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_convert_fix: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov r12, rdx mov r13, rdi mov rdi, [rbp+arg_10] mov rdx, [rbp+arg_8] mov r8, [rbp+arg_0] mov [rbp+var_60], rcx mov rax, [rcx+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [r13+0B8h] mov rax, [rax+30h] mov [rbp+var_40], rax xor eax, eax mov [rdx+8], rax mov [rdi], rax test r8, r8 mov [rbp+var_48], rsi jz loc_D1EC7 mov [rbp+var_50], r8 add r9, r14 mov [rbp+var_38], r9 add r12, rsi mov rbx, rsi loc_D1E1A: mov rdi, [rbp+var_60] lea rsi, [rbp+var_30] mov rdx, r14 mov rcx, [rbp+var_38] call [rbp+var_58] mov r15d, eax test eax, eax jle short loc_D1E3F mov r15d, r15d add r15, r14 mov rsi, [rbp+var_30] jmp short loc_D1E77 loc_D1E3F: jz short loc_D1E62 cmp r15d, 0FFFFFF9Ch jb short loc_D1E5C mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_D1E54 mov [rax], r14 loc_D1E54: neg r15d add r15, r14 jmp short loc_D1E9F loc_D1E5C: cmp r14, [rbp+var_38] jnb short loc_D1EC2 loc_D1E62: mov rax, [rbp+arg_8] cmp qword ptr [rax+8], 0 jnz short loc_D1E71 mov [rax+8], r14 loc_D1E71: lea r15, [r14+1] jmp short loc_D1E9F loc_D1E77: mov rdi, r13 mov rdx, rbx mov rcx, r12 call [rbp+var_40] test eax, eax jg short loc_D1EAE test eax, eax jnz short loc_D1EC2 cmp [rbp+var_30], 3Fh ; '?' jz short loc_D1EC2 mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_D1E9F mov [rax], r14 loc_D1E9F: mov [rbp+var_30], 3Fh ; '?' mov esi, 3Fh ; '?' jmp short loc_D1E77 loc_D1EAE: mov eax, eax add rbx, rax mov r14, r15 dec [rbp+var_50] jnz loc_D1E1A jmp short loc_D1ECD loc_D1EC2: mov r15, r14 jmp short loc_D1ECD loc_D1EC7: mov r15, r14 mov rbx, rsi loc_D1ECD: mov rax, [rbp+arg_8] mov [rax], r15 sub rbx, [rbp+var_48] mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_convert_fix( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6, long long a7, unsigned long long *a8, unsigned long long *a9) { unsigned long long v9; // r14 long long v10; // r12 long long v11; // rbx int v12; // eax unsigned long long v13; // r15 long long v14; // rsi int v15; // eax long long ( *v18)(long long, long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] long long v19; // [rsp+10h] [rbp-50h] long long ( *v21)(long long, long long, long long, long long); // [rsp+20h] [rbp-40h] unsigned long long v22; // [rsp+28h] [rbp-38h] long long v23[6]; // [rsp+30h] [rbp-30h] BYREF v9 = a5; v18 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL); v21 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL); a8[1] = 0LL; *a9 = 0LL; if ( a7 ) { v19 = a7; v22 = a5 + a6; v10 = a2 + a3; v11 = a2; while ( 1 ) { v12 = v18(a4, v23, v9, v22); if ( v12 > 0 ) { v13 = v9 + (unsigned int)v12; v14 = v23[0]; goto LABEL_14; } if ( !v12 ) goto LABEL_11; if ( (unsigned int)v12 < 0xFFFFFF9C ) break; if ( !*a9 ) *a9 = v9; v13 = v9 + (unsigned int)-v12; LABEL_19: while ( 1 ) { v23[0] = 63LL; v14 = 63LL; LABEL_14: v15 = v21(a1, v14, v11, v10); if ( v15 > 0 ) break; if ( v15 || v23[0] == 63 ) goto LABEL_22; if ( !*a9 ) *a9 = v9; } v11 += (unsigned int)v15; v9 = v13; if ( !--v19 ) goto LABEL_24; } if ( v9 < v22 ) { LABEL_11: if ( !a8[1] ) a8[1] = v9; v13 = v9 + 1; goto LABEL_19; } LABEL_22: v13 = v9; } else { v13 = a5; v11 = a2; } LABEL_24: *a8 = v13; return v11 - a2; }
my_convert_fix: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV R12,RDX MOV R13,RDI MOV RDI,qword ptr [RBP + 0x20] MOV RDX,qword ptr [RBP + 0x18] MOV R8,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RCX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [R13 + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX XOR EAX,EAX MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RDI],RAX TEST R8,R8 MOV qword ptr [RBP + -0x48],RSI JZ 0x001d1ec7 MOV qword ptr [RBP + -0x50],R8 ADD R9,R14 MOV qword ptr [RBP + -0x38],R9 ADD R12,RSI MOV RBX,RSI LAB_001d1e1a: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x30] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x58] MOV R15D,EAX TEST EAX,EAX JLE 0x001d1e3f MOV R15D,R15D ADD R15,R14 MOV RSI,qword ptr [RBP + -0x30] JMP 0x001d1e77 LAB_001d1e3f: JZ 0x001d1e62 CMP R15D,-0x64 JC 0x001d1e5c MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001d1e54 MOV qword ptr [RAX],R14 LAB_001d1e54: NEG R15D ADD R15,R14 JMP 0x001d1e9f LAB_001d1e5c: CMP R14,qword ptr [RBP + -0x38] JNC 0x001d1ec2 LAB_001d1e62: MOV RAX,qword ptr [RBP + 0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x001d1e71 MOV qword ptr [RAX + 0x8],R14 LAB_001d1e71: LEA R15,[R14 + 0x1] JMP 0x001d1e9f LAB_001d1e77: MOV RDI,R13 MOV RDX,RBX MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JG 0x001d1eae TEST EAX,EAX JNZ 0x001d1ec2 CMP qword ptr [RBP + -0x30],0x3f JZ 0x001d1ec2 MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001d1e9f MOV qword ptr [RAX],R14 LAB_001d1e9f: MOV qword ptr [RBP + -0x30],0x3f MOV ESI,0x3f JMP 0x001d1e77 LAB_001d1eae: MOV EAX,EAX ADD RBX,RAX MOV R14,R15 DEC qword ptr [RBP + -0x50] JNZ 0x001d1e1a JMP 0x001d1ecd LAB_001d1ec2: MOV R15,R14 JMP 0x001d1ecd LAB_001d1ec7: MOV R15,R14 MOV RBX,RSI LAB_001d1ecd: MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX],R15 SUB RBX,qword ptr [RBP + -0x48] MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6, long param_7,ulong *param_8,ulong *param_9) { code *pcVar1; code *pcVar2; uint uVar3; long lVar4; ulong uVar5; ulong uVar6; long local_58; long local_38; pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28); pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); param_8[1] = 0; *param_9 = 0; lVar4 = param_2; uVar5 = param_5; if (param_7 != 0) { local_58 = param_7; while( true ) { uVar3 = (*pcVar1)(param_4,&local_38,uVar5,param_6 + param_5); if ((int)uVar3 < 1) break; uVar6 = uVar3 + uVar5; while (uVar3 = (*pcVar2)(param_1,local_38,lVar4,param_3 + param_2), (int)uVar3 < 1) { if ((uVar3 != 0) || (local_38 == 0x3f)) goto LAB_001d1ecd; if (*param_9 == 0) { *param_9 = uVar5; } LAB_001d1e9f: local_38 = 0x3f; } lVar4 = lVar4 + (ulong)uVar3; local_58 = local_58 + -1; uVar5 = uVar6; if (local_58 == 0) goto LAB_001d1ecd; } if (uVar3 != 0) { if (0xffffff9b < uVar3) { if (*param_9 == 0) { *param_9 = uVar5; } uVar6 = -uVar3 + uVar5; goto LAB_001d1e9f; } if (param_6 + param_5 <= uVar5) goto LAB_001d1ecd; } if (param_8[1] == 0) { param_8[1] = uVar5; } uVar6 = uVar5 + 1; goto LAB_001d1e9f; } LAB_001d1ecd: *param_8 = uVar5; return lVar4 - param_2; }
8,259
my_read_charset_file
eloqsql/mysys/charset.c
static my_bool my_read_charset_file(MY_CHARSET_LOADER *loader, const char *filename, myf myflags) { uchar *buf; int fd; size_t len, tmp_len; MY_STAT stat_info; if (!my_stat(filename, &stat_info, MYF(myflags)) || ((len= (uint)stat_info.st_size) > MY_MAX_ALLOWED_BUF) || !(buf= (uchar*) my_malloc(key_memory_charset_loader,len,myflags))) return TRUE; if ((fd= mysql_file_open(key_file_charset, filename, O_RDONLY, myflags)) < 0) goto error; tmp_len= mysql_file_read(fd, buf, len, myflags); mysql_file_close(fd, myflags); if (tmp_len != len) goto error; if (my_parse_charset_xml(loader, (char *) buf, len)) { my_printf_error(EE_UNKNOWN_CHARSET, "Error while parsing '%s': %s\n", MYF(0), filename, loader->error); goto error; } my_free(buf); return FALSE; error: my_free(buf); return TRUE; }
O0
c
my_read_charset_file: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx leaq -0xd0(%rbp), %rsi callq 0x2eba0 cmpq $0x0, %rax je 0x2adb6 movq -0xa0(%rbp), %rax movl %eax, %eax movq %rax, -0x38(%rbp) cmpq $0x100000, %rax # imm = 0x100000 ja 0x2adb6 leaq 0x359357(%rip), %rax # 0x3840f4 movl (%rax), %edi movq -0x38(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x25b50 movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0x2adbf movb $0x1, -0x1(%rbp) jmp 0x2ae8b leaq 0x3589d2(%rip), %rax # 0x383798 movl (%rax), %edi movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r9 leaq 0x4d7e7(%rip), %rsi # 0x785be movl $0x223, %edx # imm = 0x223 xorl %r8d, %r8d callq 0x2aea0 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jge 0x2adf1 jmp 0x2ae7e movl -0x2c(%rbp), %edx movq -0x28(%rbp), %rcx movq -0x38(%rbp), %r8 movq -0x20(%rbp), %r9 leaq 0x4d7b7(%rip), %rdi # 0x785be movl $0x225, %esi # imm = 0x225 callq 0x2af90 movq %rax, -0x40(%rbp) movl -0x2c(%rbp), %edx movq -0x20(%rbp), %rcx leaq 0x4d79b(%rip), %rdi # 0x785be movl $0x226, %esi # imm = 0x226 callq 0x2b100 movq -0x40(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x2ae39 jmp 0x2ae7e movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x6b340 cmpb $0x0, %al je 0x2ae6f movq -0x18(%rbp), %rcx movq -0x10(%rbp), %r8 movl $0x16, %edi leaq 0x4d795(%rip), %rsi # 0x785f7 xorl %eax, %eax movl %eax, %edx movb $0x0, %al callq 0x2df20 jmp 0x2ae7e movq -0x28(%rbp), %rdi callq 0x25ed0 movb $0x0, -0x1(%rbp) jmp 0x2ae8b movq -0x28(%rbp), %rdi callq 0x25ed0 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xd0, %rsp popq %rbp retq nopw (%rax,%rax)
my_read_charset_file: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] lea rsi, [rbp+var_D0] call my_stat cmp rax, 0 jz short loc_2ADB6 mov rax, [rbp+var_A0] mov eax, eax mov [rbp+var_38], rax cmp rax, offset a89; "89:;<=>?" ja short loc_2ADB6 lea rax, key_memory_charset_loader mov edi, [rax] mov rsi, [rbp+var_38] mov rdx, [rbp+var_20] call my_malloc mov [rbp+var_28], rax cmp rax, 0 jnz short loc_2ADBF loc_2ADB6: mov [rbp+var_1], 1 jmp loc_2AE8B loc_2ADBF: lea rax, key_file_charset mov edi, [rax] mov rcx, [rbp+var_18] mov r9, [rbp+var_20] lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 223h xor r8d, r8d call inline_mysql_file_open mov [rbp+var_2C], eax cmp eax, 0 jge short loc_2ADF1 jmp loc_2AE7E loc_2ADF1: mov edx, [rbp+var_2C] mov rcx, [rbp+var_28] mov r8, [rbp+var_38] mov r9, [rbp+var_20] lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 225h call inline_mysql_file_read mov [rbp+var_40], rax mov edx, [rbp+var_2C] mov rcx, [rbp+var_20] lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 226h call inline_mysql_file_close mov rax, [rbp+var_40] cmp rax, [rbp+var_38] jz short loc_2AE39 jmp short loc_2AE7E loc_2AE39: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call my_parse_charset_xml cmp al, 0 jz short loc_2AE6F mov rcx, [rbp+var_18] mov r8, [rbp+var_10] mov edi, 16h lea rsi, aErrorWhilePars; "Error while parsing '%s': %s\n" xor eax, eax mov edx, eax mov al, 0 call my_printf_error jmp short loc_2AE7E loc_2AE6F: mov rdi, [rbp+var_28] call my_free mov [rbp+var_1], 0 jmp short loc_2AE8B loc_2AE7E: mov rdi, [rbp+var_28] call my_free mov [rbp+var_1], 1 loc_2AE8B: mov al, [rbp+var_1] add rsp, 0D0h pop rbp retn
char my_read_charset_file(long long a1, long long a2, long long a3) { int v3; // r9d _BYTE v5[48]; // [rsp+0h] [rbp-D0h] BYREF long long v6; // [rsp+30h] [rbp-A0h] long long v7; // [rsp+90h] [rbp-40h] unsigned long long v8; // [rsp+98h] [rbp-38h] int v9; // [rsp+A4h] [rbp-2Ch] long long v10; // [rsp+A8h] [rbp-28h] long long v11; // [rsp+B0h] [rbp-20h] long long v12; // [rsp+B8h] [rbp-18h] long long v13; // [rsp+C0h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; if ( my_stat(a2, v5, a3) ) { v8 = (unsigned int)v6; if ( (unsigned int)v6 <= (unsigned long long)a89 ) { v10 = my_malloc(key_memory_charset_loader, v8, v11); if ( v10 ) { v9 = inline_mysql_file_open( key_file_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 547LL, v12, 0LL, v11); if ( v9 >= 0 ) { v7 = inline_mysql_file_read( "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 549LL, (unsigned int)v9, v10, v8, v11); inline_mysql_file_close( "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 550LL, (unsigned int)v9, v11); if ( v7 == v8 ) { if ( !(unsigned __int8)my_parse_charset_xml(v13, v10, v8) ) { my_free(v10); return 0; } my_printf_error(22, (unsigned int)"Error while parsing '%s': %s\n", 0, v12, v13, v3); } } my_free(v10); return 1; } } } return 1; }
my_read_charset_file: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xd0] CALL 0x0012eba0 CMP RAX,0x0 JZ 0x0012adb6 MOV RAX,qword ptr [RBP + -0xa0] MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x100000 JA 0x0012adb6 LEA RAX,[0x4840f4] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00125b50 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x0012adbf LAB_0012adb6: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ae8b LAB_0012adbf: LEA RAX,[0x483798] MOV EDI,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV R9,qword ptr [RBP + -0x20] LEA RSI,[0x1785be] MOV EDX,0x223 XOR R8D,R8D CALL 0x0012aea0 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JGE 0x0012adf1 JMP 0x0012ae7e LAB_0012adf1: MOV EDX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x20] LEA RDI,[0x1785be] MOV ESI,0x225 CALL 0x0012af90 MOV qword ptr [RBP + -0x40],RAX MOV EDX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[0x1785be] MOV ESI,0x226 CALL 0x0012b100 MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0012ae39 JMP 0x0012ae7e LAB_0012ae39: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x0016b340 CMP AL,0x0 JZ 0x0012ae6f MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x10] MOV EDI,0x16 LEA RSI,[0x1785f7] XOR EAX,EAX MOV EDX,EAX MOV AL,0x0 CALL 0x0012df20 JMP 0x0012ae7e LAB_0012ae6f: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00125ed0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ae8b LAB_0012ae7e: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00125ed0 MOV byte ptr [RBP + -0x1],0x1 LAB_0012ae8b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xd0 POP RBP RET
int1 my_read_charset_file(int8 param_1,int8 param_2,int8 param_3) { char cVar1; long lVar2; int1 local_d8 [48]; ulong local_a8; ulong local_48; ulong local_40; int local_34; long local_30; int8 local_28; int8 local_20; int8 local_18; local_28 = param_3; local_20 = param_2; local_18 = param_1; lVar2 = my_stat(param_2,local_d8,param_3); if (((lVar2 != 0) && (local_40 = local_a8 & 0xffffffff, local_40 < 0x100001)) && (local_30 = my_malloc(key_memory_charset_loader,local_40,local_28), local_30 != 0)) { local_34 = inline_mysql_file_open (key_file_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x223,local_20, 0,local_28); if (-1 < local_34) { local_48 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x225, local_34,local_30,local_40,local_28); inline_mysql_file_close ("/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x226,local_34,local_28) ; if (local_48 == local_40) { cVar1 = my_parse_charset_xml(local_18,local_30,local_40); if (cVar1 == '\0') { my_free(local_30); return 0; } my_printf_error(0x16,"Error while parsing \'%s\': %s\n",0,local_20,local_18); } } my_free(local_30); } return 1; }
8,260
my_hrtime
eloqsql/mysys/my_getsystime.c
my_hrtime_t my_hrtime() { my_hrtime_t hrtime; #if defined(_WIN32) ulonglong newtime; GetSystemTimePreciseAsFileTime((FILETIME*)&newtime); hrtime.val= (newtime - OFFSET_TO_EPOC)/10; #elif defined(HAVE_CLOCK_GETTIME) struct timespec tp; clock_gettime(CLOCK_REALTIME, &tp); hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL; #else struct timeval t; /* The following loop is here because gettimeofday may fail */ while (gettimeofday(&t, NULL) != 0) {} hrtime.val= t.tv_sec*1000000ULL + t.tv_usec; #endif DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;); DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;); return hrtime; }
O0
c
my_hrtime: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp xorl %edi, %edi leaq -0x18(%rbp), %rsi callq 0x2a2f0 imulq $0xf4240, -0x18(%rbp), %rax # imm = 0xF4240 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0x20(%rbp), %rax addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xf010d jmp 0xf010f jmp 0xf0111 movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_hrtime: push rbp mov rbp, rsp sub rsp, 20h xor edi, edi lea rsi, [rbp+var_18] call _clock_gettime imul rax, [rbp+var_18], 0F4240h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, 3E8h xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_20] add rax, rcx mov [rbp+var_8], rax jmp short $+2 loc_F010D: jmp short $+2 loc_F010F: jmp short $+2 loc_F0111: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
unsigned long long my_hrtime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] clock_gettime(0LL, &v1); return v2 / 0x3E8 + 1000000 * v1; }
my_hrtime: PUSH RBP MOV RBP,RSP SUB RSP,0x20 XOR EDI,EDI LEA RSI,[RBP + -0x18] CALL 0x0012a2f0 IMUL RAX,qword ptr [RBP + -0x18],0xf4240 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,0x3e8 XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001f010d LAB_001f010d: JMP 0x001f010f LAB_001f010f: JMP 0x001f0111 LAB_001f0111: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long my_hrtime(void) { timespec local_20; clock_gettime(0,&local_20); return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000; }
8,261
google::protobuf::EnumDescriptorProto::SharedCtor(google::protobuf::Arena*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
inline void EnumDescriptorProto::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.value_){arena} , decltype(_impl_.reserved_range_){arena} , decltype(_impl_.reserved_name_){arena} , decltype(_impl_.name_){} , decltype(_impl_.options_){nullptr} }; _impl_.name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.name_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING }
O0
cpp
google::protobuf::EnumDescriptorProto::SharedCtor(google::protobuf::Arena*, bool): subq $0x68, %rsp movb %dl, %al movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) andb $0x1, %al movb %al, 0x4f(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x18(%rsp) addq $0x10, %rax movq %rax, 0x20(%rsp) movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x28(%rsp) movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq 0x28(%rsp), %rcx movl $0x0, (%rax) addq $0x4, %rax cmpq %rcx, %rax movq %rax, 0x30(%rsp) jne 0x2e0ba4 movq 0x20(%rsp), %rax movq %rax, %rdi addq $0x4, %rdi movl $0x0, 0x4(%rax) callq 0x1540e0 movq 0x20(%rsp), %rdi addq $0x8, %rdi movq %rdi, 0x8(%rsp) movq 0x50(%rsp), %rsi callq 0x2e6d80 movq 0x20(%rsp), %rdi addq $0x20, %rdi movq %rdi, 0x10(%rsp) movq 0x50(%rsp), %rsi callq 0x2e6db0 jmp 0x2e0c0c movq 0x20(%rsp), %rdi addq $0x38, %rdi movq 0x50(%rsp), %rsi callq 0x192750 jmp 0x2e0c21 movq 0x20(%rsp), %rdi addq $0x50, %rdi xorl %esi, %esi movl $0x8, %edx callq 0x8db70 movq 0x20(%rsp), %rax movq 0x18(%rsp), %rdi movq $0x0, 0x58(%rax) addq $0x10, %rdi addq $0x50, %rdi callq 0x1583d0 addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) jmp 0x2e0c82 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) callq 0x2e0d60 movq 0x8(%rsp), %rdi callq 0x2e0db0 movq 0x40(%rsp), %rdi callq 0x90db0 nopw %cs:(%rax,%rax)
_ZN6google8protobuf19EnumDescriptorProto10SharedCtorEPNS0_5ArenaEb: sub rsp, 68h mov al, dl mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi and al, 1 mov [rsp+68h+var_19], al mov rax, [rsp+68h+var_10] mov [rsp+68h+var_50], rax add rax, 10h mov [rsp+68h+var_48], rax mov [rsp+68h+var_8], rax mov rax, [rsp+68h+var_8] mov rcx, rax add rcx, 4 mov [rsp+68h+var_40], rcx mov [rsp+68h+var_38], rax loc_2E0BA4: mov rax, [rsp+68h+var_38] mov rcx, [rsp+68h+var_40] mov dword ptr [rax], 0 add rax, 4 cmp rax, rcx mov [rsp+68h+var_38], rax jnz short loc_2E0BA4 mov rax, [rsp+68h+var_48] mov rdi, rax add rdi, 4; this mov dword ptr [rax+4], 0 call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void) mov rdi, [rsp+68h+var_48] add rdi, 8 mov [rsp+68h+var_60], rdi mov rsi, [rsp+68h+var_18] call _ZN6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::EnumValueDescriptorProto>::RepeatedPtrField(google::protobuf::Arena *) mov rdi, [rsp+68h+var_48] add rdi, 20h ; ' ' mov [rsp+68h+var_58], rdi mov rsi, [rsp+68h+var_18] call _ZN6google8protobuf16RepeatedPtrFieldINS0_37EnumDescriptorProto_EnumReservedRangeEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto_EnumReservedRange>::RepeatedPtrField(google::protobuf::Arena *) jmp short $+2 loc_2E0C0C: mov rdi, [rsp+68h+var_48] add rdi, 38h ; '8' mov rsi, [rsp+68h+var_18] call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<std::string>::RepeatedPtrField(google::protobuf::Arena *) jmp short $+2 loc_2E0C21: mov rdi, [rsp+68h+var_48] add rdi, 50h ; 'P' xor esi, esi mov edx, 8 call _memset mov rax, [rsp+68h+var_48] mov rdi, [rsp+68h+var_50] mov qword ptr [rax+58h], 0 add rdi, 10h add rdi, 50h ; 'P'; this call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void) add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax jmp short loc_2E0C82 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax call _ZN6google8protobuf16RepeatedPtrFieldINS0_37EnumDescriptorProto_EnumReservedRangeEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto_EnumReservedRange>::~RepeatedPtrField() loc_2E0C82: mov rdi, [rsp+arg_0] call _ZN6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::EnumValueDescriptorProto>::~RepeatedPtrField() mov rdi, [rsp+arg_38] call __Unwind_Resume
google::protobuf::internal::ArenaStringPtr * google::protobuf::EnumDescriptorProto::SharedCtor( google::protobuf::EnumDescriptorProto *this, google::protobuf::Arena *a2) { google::protobuf::EnumDescriptorProto *v3; // [rsp+30h] [rbp-38h] v3 = (google::protobuf::EnumDescriptorProto *)((char *)this + 16); do { *(_DWORD *)v3 = 0; v3 = (google::protobuf::EnumDescriptorProto *)((char *)v3 + 4); } while ( v3 != (google::protobuf::EnumDescriptorProto *)((char *)this + 20) ); *((_DWORD *)this + 5) = 0; google::protobuf::internal::CachedSize::CachedSize((google::protobuf::EnumDescriptorProto *)((char *)this + 20)); google::protobuf::RepeatedPtrField<google::protobuf::EnumValueDescriptorProto>::RepeatedPtrField( (char *)this + 24, a2); google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto_EnumReservedRange>::RepeatedPtrField( (char *)this + 48, a2); google::protobuf::RepeatedPtrField<std::string>::RepeatedPtrField( (google::protobuf::EnumDescriptorProto *)((char *)this + 72), a2); memset((char *)this + 96, 0LL, 8LL); *((_QWORD *)this + 13) = 0LL; return google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::EnumDescriptorProto *)((char *)this + 96)); }
ConvertFromT: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX MOV RAX,qword ptr [RSP + -0x10] RET
/* google::protobuf::internal::RepeatedFieldPrimitiveAccessor<unsigned int>::ConvertFromT(unsigned int const&, void*) const */ void * google::protobuf::internal::RepeatedFieldPrimitiveAccessor<unsigned_int>::ConvertFromT (uint *param_1,void *param_2) { return param_2; }
8,262
my_uca_copy_page
eloqsql/strings/ctype-uca.c
static my_bool my_uca_copy_page(MY_CHARSET_LOADER *loader, const MY_UCA_WEIGHT_LEVEL *src, MY_UCA_WEIGHT_LEVEL *dst, size_t page) { uint chc, size= 256 * dst->lengths[page] * sizeof(uint16); if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size))) return TRUE; DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]); memset(dst->weights[page], 0, size); for (chc=0 ; chc < 256; chc++) { memcpy(dst->weights[page] + chc * dst->lengths[page], src->weights[page] + chc * src->lengths[page], src->lengths[page] * sizeof(uint16)); } return FALSE; }
O0
c
my_uca_copy_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax shll $0x8, %eax cltq shlq %rax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x80(%rax), %rax movl -0x30(%rbp), %ecx movl %ecx, %edi callq *%rax movq -0x20(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x28(%rbp), %rdx movq %rax, (%rcx,%rdx,8) cmpq $0x0, %rax jne 0x4f844 movb $0x1, -0x1(%rbp) jmp 0x4f900 jmp 0x4f846 jmp 0x4f848 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x30(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x24180 movl $0x0, -0x2c(%rbp) cmpl $0x100, -0x2c(%rbp) # imm = 0x100 jae 0x4f8fc movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x2c(%rbp), %eax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rdi movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x2c(%rbp), %eax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx shlq %rdx callq 0x24220 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x4f86b movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_uca_copy_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] shl eax, 8 cdqe shl rax, 1 mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rax, [rax+80h] mov ecx, [rbp+var_30] mov edi, ecx call rax mov rcx, [rbp+var_20] mov rcx, [rcx+10h] mov rdx, [rbp+var_28] mov [rcx+rdx*8], rax cmp rax, 0 jnz short loc_4F844 mov [rbp+var_1], 1 jmp loc_4F900 loc_4F844: jmp short $+2 loc_4F846: jmp short $+2 loc_4F848: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_30] mov edx, eax xor esi, esi call _memset mov [rbp+var_2C], 0 loc_4F86B: cmp [rbp+var_2C], 100h jnb loc_4F8FC mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_20] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rdi, rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rsi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_18] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rsi, rax mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] mov edx, eax shl rdx, 1 call _memcpy mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_4F86B loc_4F8FC: mov [rbp+var_1], 0 loc_4F900: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax unsigned int v6; // [rsp+0h] [rbp-30h] unsigned int i; // [rsp+4h] [rbp-2Ch] v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9; v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6); *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6); for ( i = 0; i < 0x100; ++i ) memcpy( 2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4)); return 0; }
my_uca_copy_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x8 CDQE SHL RAX,0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x30] MOV EDI,ECX CALL RAX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + RDX*0x8],RAX CMP RAX,0x0 JNZ 0x0014f844 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014f900 LAB_0014f844: JMP 0x0014f846 LAB_0014f846: JMP 0x0014f848 LAB_0014f848: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX XOR ESI,ESI CALL 0x00124180 MOV dword ptr [RBP + -0x2c],0x0 LAB_0014f86b: CMP dword ptr [RBP + -0x2c],0x100 JNC 0x0014f8fc MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX SHL RDX,0x1 CALL 0x00124220 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014f86b LAB_0014f8fc: MOV byte ptr [RBP + -0x1],0x0 LAB_0014f900: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4) { size_t __n; long lVar1; int4 local_34; int1 local_9; __n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1; lVar1 = (**(code **)(param_1 + 0x80))(__n); *(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1; if (lVar1 == 0) { local_9 = 1; } else { memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n); for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) { memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2), (void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2), (ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1); } local_9 = 0; } return local_9; }
8,263
thr_reschedule_write_lock
eloqsql/mysys/thr_lock.c
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data, ulong lock_wait_timeout) { THR_LOCK *lock=data->lock; enum thr_lock_type write_lock_type; DBUG_ENTER("thr_reschedule_write_lock"); mysql_mutex_lock(&lock->mutex); if (!lock->read_wait.data) /* No waiting read locks */ { mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(0); } write_lock_type= data->type; data->type=TL_WRITE_DELAYED; if (lock->update_status) (*lock->update_status)(data->status_param); if (((*data->prev)=data->next)) /* remove from lock-list */ data->next->prev= data->prev; else lock->write.last=data->prev; if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ data->next->prev= &data->next; else lock->write_wait.last= &data->next; data->prev= &lock->write_wait.data; data->cond=get_cond(); /* This was zero */ lock->write_wait.data=data; free_all_read_locks(lock,0); mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(thr_upgrade_write_delay_lock(data, write_lock_type, lock_wait_timeout)); }
O3
c
thr_reschedule_write_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %r15 movq 0x18(%rdi), %r12 leaq 0x18(%r12), %rbx cmpq $0x0, 0x58(%r12) jne 0xa6de7 movq %rbx, %rdi callq 0x291d0 cmpq $0x0, 0x60(%r12) je 0xa6dc4 movq %r14, -0x38(%rbp) leaq 0x60(%r12), %r13 movl 0x40(%r15), %eax movl %eax, -0x2c(%rbp) movl $0x9, 0x40(%r15) movq 0xc0(%r12), %rax testq %rax, %rax je 0xa6c98 movq 0x28(%r15), %rdi callq *%rax leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x98(%r12), %rdx leaq 0x10(%rcx), %rsi testq %rcx, %rcx cmoveq %rdx, %rsi movq 0x10(%r15), %rcx movq %rcx, (%rsi) leaq 0x80(%r12), %rcx movq 0x80(%r12), %rdx movq %rdx, 0x8(%r15) leaq 0x88(%r12), %rsi leaq 0x10(%rdx), %rdi testq %rdx, %rdx cmoveq %rsi, %rdi movq %rax, (%rdi) movq %rcx, 0x10(%r15) callq 0xa4ab2 addq $0x8, %rax movq %rax, 0x20(%r15) movq %r15, 0x80(%r12) movq 0x60(%r12), %r14 movq 0x78(%r12), %rax movq %r14, (%rax) movq 0x78(%r12), %rax movq %rax, 0x10(%r14) movq 0x68(%r12), %rax movq %rax, 0x78(%r12) movq %r13, 0x68(%r12) movq 0x20(%r14), %r13 cmpl $0x5, 0x40(%r14) jne 0xa6d3c incl 0xa8(%r12) movq $0x0, 0x20(%r14) movq 0x30(%r13), %rdi testq %rdi, %rdi jne 0xa6d60 movq %r13, %rdi callq 0x29540 movq 0x8(%r14), %r14 testq %r14, %r14 jne 0xa6d29 jmp 0xa6d72 leaq 0x2e22e9(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x170(%rax) jmp 0xa6d4d movq 0x68(%r12), %rax movq $0x0, (%rax) cmpq $0x0, 0x60(%r12) jne 0xa6d92 movq $0x0, 0xa0(%r12) movq 0x58(%r12), %rdi testq %rdi, %rdi movq -0x38(%rbp), %r14 jne 0xa6e00 movq %rbx, %rdi callq 0x291a0 movq %r15, %rdi movl -0x2c(%rbp), %esi movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa67ab movq 0x58(%r12), %rdi testq %rdi, %rdi jne 0xa6e12 movq %rbx, %rdi callq 0x291a0 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x37a87(%rip), %rsi # 0xde875 movq %rbx, %rdi movl $0x5de, %edx # imm = 0x5DE callq 0x2ee0b jmp 0xa6c61 leaq 0x2e2249(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x160(%rax) jmp 0xa6da0 leaq 0x2e2237(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x160(%rax) jmp 0xa6dce
thr_reschedule_write_lock: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov r15, rdi mov r12, [rdi+18h] lea rbx, [r12+18h] cmp qword ptr [r12+58h], 0 jnz loc_A6DE7 mov rdi, rbx call _pthread_mutex_lock loc_A6C61: cmp qword ptr [r12+60h], 0 jz loc_A6DC4 mov [rbp+var_38], r14 lea r13, [r12+60h] mov eax, [r15+40h] mov [rbp+var_2C], eax mov dword ptr [r15+40h], 9 mov rax, [r12+0C0h] test rax, rax jz short loc_A6C98 mov rdi, [r15+28h] call rax loc_A6C98: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [r12+98h] lea rsi, [rcx+10h] test rcx, rcx cmovz rsi, rdx mov rcx, [r15+10h] mov [rsi], rcx lea rcx, [r12+80h] mov rdx, [r12+80h] mov [r15+8], rdx lea rsi, [r12+88h] lea rdi, [rdx+10h] test rdx, rdx cmovz rdi, rsi mov [rdi], rax mov [r15+10h], rcx call _my_thread_var add rax, 8 mov [r15+20h], rax mov [r12+80h], r15 mov r14, [r12+60h] mov rax, [r12+78h] mov [rax], r14 mov rax, [r12+78h] mov [r14+10h], rax mov rax, [r12+68h] mov [r12+78h], rax mov [r12+68h], r13 loc_A6D29: mov r13, [r14+20h] cmp dword ptr [r14+40h], 5 jnz short loc_A6D3C inc dword ptr [r12+0A8h] loc_A6D3C: mov qword ptr [r14+20h], 0 mov rdi, [r13+30h] test rdi, rdi jnz short loc_A6D60 loc_A6D4D: mov rdi, r13 call _pthread_cond_signal mov r14, [r14+8] test r14, r14 jnz short loc_A6D29 jmp short loc_A6D72 loc_A6D60: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A6D4D loc_A6D72: mov rax, [r12+68h] mov qword ptr [rax], 0 cmp qword ptr [r12+60h], 0 jnz short loc_A6D92 mov qword ptr [r12+0A0h], 0 loc_A6D92: mov rdi, [r12+58h] test rdi, rdi mov r14, [rbp+var_38] jnz short loc_A6E00 loc_A6DA0: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r15 mov esi, [rbp+var_2C] mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp thr_upgrade_write_delay_lock loc_A6DC4: mov rdi, [r12+58h] test rdi, rdi jnz short loc_A6E12 loc_A6DCE: mov rdi, rbx call _pthread_mutex_unlock xor eax, eax add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A6DE7: lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 5DEh call psi_mutex_lock jmp loc_A6C61 loc_A6E00: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A6DA0 loc_A6E12: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A6DCE
char thr_reschedule_write_lock(long long a1, long long a2) { long long v3; // r12 void ( *v4)(_QWORD); // rax long long v5; // rax long long v6; // rcx _QWORD *v7; // rsi long long v8; // rdx long long v9; // rsi long long *v10; // rdi long long v11; // rdx long long v12; // rcx long long v13; // r14 long long v14; // r13 long long v15; // rdi long long v16; // rdi int v19; // [rsp+14h] [rbp-2Ch] v3 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v3 + 88) ) psi_mutex_lock(v3 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5DEu); else pthread_mutex_lock(v3 + 24); if ( *(_QWORD *)(v3 + 96) ) { v19 = *(_DWORD *)(a1 + 64); *(_DWORD *)(a1 + 64) = 9; v4 = *(void ( **)(_QWORD))(v3 + 192); if ( v4 ) v4(*(_QWORD *)(a1 + 40)); v5 = a1 + 8; v6 = *(_QWORD *)(a1 + 8); **(_QWORD **)(a1 + 16) = v6; v7 = (_QWORD *)(v6 + 16); if ( !v6 ) v7 = (_QWORD *)(v3 + 152); *v7 = *(_QWORD *)(a1 + 16); v8 = *(_QWORD *)(v3 + 128); *(_QWORD *)(a1 + 8) = v8; v9 = v3 + 136; v10 = (long long *)(v8 + 16); if ( !v8 ) v10 = (long long *)(v3 + 136); *v10 = v5; *(_QWORD *)(a1 + 16) = v3 + 128; *(_QWORD *)(a1 + 32) = my_thread_var() + 8; *(_QWORD *)(v3 + 128) = a1; v13 = *(_QWORD *)(v3 + 96); **(_QWORD **)(v3 + 120) = v13; *(_QWORD *)(v13 + 16) = *(_QWORD *)(v3 + 120); *(_QWORD *)(v3 + 120) = *(_QWORD *)(v3 + 104); *(_QWORD *)(v3 + 104) = v3 + 96; do { v14 = *(_QWORD *)(v13 + 32); if ( *(_DWORD *)(v13 + 64) == 5 ) ++*(_DWORD *)(v3 + 168); *(_QWORD *)(v13 + 32) = 0LL; v15 = *(_QWORD *)(v14 + 48); if ( v15 ) ((void ( *)(long long, long long, long long, long long))PSI_server[46])(v15, v9, v11, v12); pthread_cond_signal(v14); v13 = *(_QWORD *)(v13 + 8); } while ( v13 ); **(_QWORD **)(v3 + 104) = 0LL; if ( !*(_QWORD *)(v3 + 96) ) *(_QWORD *)(v3 + 160) = 0LL; v16 = *(_QWORD *)(v3 + 88); if ( v16 ) ((void ( *)(long long, long long, long long, long long))PSI_server[44])(v16, v9, v11, v12); pthread_mutex_unlock(v3 + 24); return thr_upgrade_write_delay_lock(a1, v19, a2); } else { if ( *(_QWORD *)(v3 + 88) ) PSI_server[44](); pthread_mutex_unlock(v3 + 24); return 0; } }
thr_reschedule_write_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV R15,RDI MOV R12,qword ptr [RDI + 0x18] LEA RBX,[R12 + 0x18] CMP qword ptr [R12 + 0x58],0x0 JNZ 0x001a6de7 MOV RDI,RBX CALL 0x001291d0 LAB_001a6c61: CMP qword ptr [R12 + 0x60],0x0 JZ 0x001a6dc4 MOV qword ptr [RBP + -0x38],R14 LEA R13,[R12 + 0x60] MOV EAX,dword ptr [R15 + 0x40] MOV dword ptr [RBP + -0x2c],EAX MOV dword ptr [R15 + 0x40],0x9 MOV RAX,qword ptr [R12 + 0xc0] TEST RAX,RAX JZ 0x001a6c98 MOV RDI,qword ptr [R15 + 0x28] CALL RAX LAB_001a6c98: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[R12 + 0x98] LEA RSI,[RCX + 0x10] TEST RCX,RCX CMOVZ RSI,RDX MOV RCX,qword ptr [R15 + 0x10] MOV qword ptr [RSI],RCX LEA RCX,[R12 + 0x80] MOV RDX,qword ptr [R12 + 0x80] MOV qword ptr [R15 + 0x8],RDX LEA RSI,[R12 + 0x88] LEA RDI,[RDX + 0x10] TEST RDX,RDX CMOVZ RDI,RSI MOV qword ptr [RDI],RAX MOV qword ptr [R15 + 0x10],RCX CALL 0x001a4ab2 ADD RAX,0x8 MOV qword ptr [R15 + 0x20],RAX MOV qword ptr [R12 + 0x80],R15 MOV R14,qword ptr [R12 + 0x60] MOV RAX,qword ptr [R12 + 0x78] MOV qword ptr [RAX],R14 MOV RAX,qword ptr [R12 + 0x78] MOV qword ptr [R14 + 0x10],RAX MOV RAX,qword ptr [R12 + 0x68] MOV qword ptr [R12 + 0x78],RAX MOV qword ptr [R12 + 0x68],R13 LAB_001a6d29: MOV R13,qword ptr [R14 + 0x20] CMP dword ptr [R14 + 0x40],0x5 JNZ 0x001a6d3c INC dword ptr [R12 + 0xa8] LAB_001a6d3c: MOV qword ptr [R14 + 0x20],0x0 MOV RDI,qword ptr [R13 + 0x30] TEST RDI,RDI JNZ 0x001a6d60 LAB_001a6d4d: MOV RDI,R13 CALL 0x00129540 MOV R14,qword ptr [R14 + 0x8] TEST R14,R14 JNZ 0x001a6d29 JMP 0x001a6d72 LAB_001a6d60: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a6d4d LAB_001a6d72: MOV RAX,qword ptr [R12 + 0x68] MOV qword ptr [RAX],0x0 CMP qword ptr [R12 + 0x60],0x0 JNZ 0x001a6d92 MOV qword ptr [R12 + 0xa0],0x0 LAB_001a6d92: MOV RDI,qword ptr [R12 + 0x58] TEST RDI,RDI MOV R14,qword ptr [RBP + -0x38] JNZ 0x001a6e00 LAB_001a6da0: MOV RDI,RBX CALL 0x001291a0 MOV RDI,R15 MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a67ab LAB_001a6dc4: MOV RDI,qword ptr [R12 + 0x58] TEST RDI,RDI JNZ 0x001a6e12 LAB_001a6dce: MOV RDI,RBX CALL 0x001291a0 XOR EAX,EAX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a6de7: LEA RSI,[0x1de875] MOV RDI,RBX MOV EDX,0x5de CALL 0x0012ee0b JMP 0x001a6c61 LAB_001a6e00: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a6da0 LAB_001a6e12: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a6dce
int8 thr_reschedule_write_lock(long param_1,int8 param_2) { pthread_mutex_t *__mutex; int4 uVar1; long lVar2; pthread_cond_t *__cond; long lVar3; int8 uVar4; int8 *puVar5; long *plVar6; lVar2 = *(long *)(param_1 + 0x18); __mutex = (pthread_mutex_t *)(lVar2 + 0x18); if (*(long *)(lVar2 + 0x58) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5de); } if (*(long *)(lVar2 + 0x60) != 0) { uVar1 = *(int4 *)(param_1 + 0x40); *(int4 *)(param_1 + 0x40) = 9; if (*(code **)(lVar2 + 0xc0) != (code *)0x0) { (**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28)); } lVar3 = *(long *)(param_1 + 8); **(long **)(param_1 + 0x10) = lVar3; puVar5 = (int8 *)(lVar3 + 0x10); if (lVar3 == 0) { puVar5 = (int8 *)(lVar2 + 0x98); } *puVar5 = *(int8 *)(param_1 + 0x10); lVar3 = *(long *)(lVar2 + 0x80); *(long *)(param_1 + 8) = lVar3; plVar6 = (long *)(lVar3 + 0x10); if (lVar3 == 0) { plVar6 = (long *)(lVar2 + 0x88); } *plVar6 = param_1 + 8; *(long *)(param_1 + 0x10) = lVar2 + 0x80; lVar3 = _my_thread_var(); *(long *)(param_1 + 0x20) = lVar3 + 8; *(long *)(lVar2 + 0x80) = param_1; lVar3 = *(long *)(lVar2 + 0x60); **(long **)(lVar2 + 0x78) = lVar3; *(int8 *)(lVar3 + 0x10) = *(int8 *)(lVar2 + 0x78); *(int8 *)(lVar2 + 0x78) = *(int8 *)(lVar2 + 0x68); *(long *)(lVar2 + 0x68) = lVar2 + 0x60; do { __cond = *(pthread_cond_t **)(lVar3 + 0x20); if (*(int *)(lVar3 + 0x40) == 5) { *(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + 1; } *(int8 *)(lVar3 + 0x20) = 0; if (__cond[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(__cond); lVar3 = *(long *)(lVar3 + 8); } while (lVar3 != 0); **(int8 **)(lVar2 + 0x68) = 0; if (*(long *)(lVar2 + 0x60) == 0) { *(int8 *)(lVar2 + 0xa0) = 0; } if (*(long *)(lVar2 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); uVar4 = thr_upgrade_write_delay_lock(param_1,uVar1,param_2); return uVar4; } if (*(long *)(lVar2 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return 0; }
8,264
mi_dynmap_file
eloqsql/storage/myisam/mi_dynrec.c
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); if (size == 0 || size > (my_off_t) (~((size_t) 0))) { if (size) DBUG_PRINT("warning", ("File is too large for mmap")); else DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* I wonder if it is good to use MAP_NORESERVE. From the Linux man page: MAP_NORESERVE Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. */ info->s->file_map= (uchar*) my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, info->dfile, 0L); if (info->s->file_map == (uchar*) MAP_FAILED) { info->s->file_map= NULL; DBUG_RETURN(1); } #if defined(HAVE_MADVISE) madvise((char*) info->s->file_map, size, MADV_RANDOM); #endif info->s->mmaped_length= (size_t) size; info->s->file_read= mi_mmap_pread; info->s->file_write= mi_mmap_pwrite; DBUG_RETURN(0); }
O3
c
mi_dynmap_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movb $0x1, %r14b testq %rsi, %rsi je 0x76617 movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rax xorl %ecx, %ecx cmpl $0x0, 0x358(%rax) setne %cl leal 0x1(,%rcx,2), %edx movl 0x1c0(%rdi), %r8d xorl %edi, %edi movl $0x4001, %ecx # imm = 0x4001 xorl %r9d, %r9d callq 0x295f0 movq (%rbx), %rcx movq %rax, 0x270(%rcx) movq (%rbx), %rax movq 0x270(%rax), %rdi cmpq $-0x1, %rdi je 0x7660c movq %r15, %rsi movl $0x1, %edx callq 0x29490 movq (%rbx), %rax movq %r15, 0x4d0(%rax) movq (%rbx), %rax leaq 0x36(%rip), %rcx # 0x76625 movq %rcx, 0x2e0(%rax) movq (%rbx), %rax leaq 0x1f3(%rip), %rcx # 0x767f3 movq %rcx, 0x2e8(%rax) xorl %r14d, %r14d jmp 0x76617 movq $0x0, 0x270(%rax) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mi_dynmap_file: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14b, 1 test rsi, rsi jz loc_76617 mov r15, rsi mov rbx, rdi mov rax, [rdi] xor ecx, ecx cmp dword ptr [rax+358h], 0 setnz cl lea edx, ds:1[rcx*2] mov r8d, [rdi+1C0h] xor edi, edi mov ecx, 4001h xor r9d, r9d call _mmap64 mov rcx, [rbx] mov [rcx+270h], rax mov rax, [rbx] mov rdi, [rax+270h] cmp rdi, 0FFFFFFFFFFFFFFFFh jz short loc_7660C mov rsi, r15 mov edx, 1 call _madvise mov rax, [rbx] mov [rax+4D0h], r15 mov rax, [rbx] lea rcx, mi_mmap_pread mov [rax+2E0h], rcx mov rax, [rbx] lea rcx, mi_mmap_pwrite mov [rax+2E8h], rcx xor r14d, r14d jmp short loc_76617 loc_7660C: mov qword ptr [rax+270h], 0 loc_76617: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mi_dynmap_file(unsigned int *a1, long long a2) { long long v2; // rax unsigned int v3; // r14d long long v5; // rax long long v6; // rdi LOBYTE(v3) = 1; if ( a2 ) { *(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64( 0LL, a2, 2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 856LL) != 0) + 1, 16385LL, a1[112], 0LL, v2); v5 = *(_QWORD *)a1; v6 = *(_QWORD *)(*(_QWORD *)a1 + 624LL); if ( v6 == -1 ) { *(_QWORD *)(v5 + 624) = 0LL; } else { madvise(v6, a2, 1LL); *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2; *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite; return 0; } } return v3; }
mi_dynmap_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14B,0x1 TEST RSI,RSI JZ 0x00176617 MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] XOR ECX,ECX CMP dword ptr [RAX + 0x358],0x0 SETNZ CL LEA EDX,[0x1 + RCX*0x2] MOV R8D,dword ptr [RDI + 0x1c0] XOR EDI,EDI MOV ECX,0x4001 XOR R9D,R9D CALL 0x001295f0 MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0x270],RAX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x270] CMP RDI,-0x1 JZ 0x0017660c MOV RSI,R15 MOV EDX,0x1 CALL 0x00129490 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x4d0],R15 MOV RAX,qword ptr [RBX] LEA RCX,[0x176625] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBX] LEA RCX,[0x1767f3] MOV qword ptr [RAX + 0x2e8],RCX XOR R14D,R14D JMP 0x00176617 LAB_0017660c: MOV qword ptr [RAX + 0x270],0x0 LAB_00176617: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong mi_dynmap_file(long *param_1,size_t param_2) { void *pvVar1; int8 unaff_R14; ulong uVar2; uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_2 != 0) { pvVar1 = mmap64((void *)0x0,param_2,(uint)(*(int *)(*param_1 + 0x358) != 0) * 2 + 1,0x4001, (int)param_1[0x38],0); *(void **)(*param_1 + 0x270) = pvVar1; pvVar1 = *(void **)(*param_1 + 0x270); if (pvVar1 == (void *)0xffffffffffffffff) { *(int8 *)(*param_1 + 0x270) = 0; } else { madvise(pvVar1,param_2,1); *(size_t *)(*param_1 + 0x4d0) = param_2; *(code **)(*param_1 + 0x2e0) = mi_mmap_pread; *(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite; uVar2 = 0; } } return uVar2 & 0xffffffff; }
8,265
my_strnncollsp_simple
eloqsql/strings/ctype-simple.c
int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *map= cs->sort_order, *end; size_t length; int res; end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (map[*a++] != map[*b++]) return ((int) map[a[-1]] - (int) map[b[-1]]); } res= 0; if (a_length != b_length) { int swap= 1; /* Check the next not space character of the longer key. If it's < ' ', then it's smaller than the other key. */ if (a_length < b_length) { /* put shorter key in s */ a_length= b_length; a= b; swap= -1; /* swap sign of result */ res= -res; } for (end= a + a_length-length; a < end ; a++) { if (map[*a] != map[' ']) return (map[*a] < map[' ']) ? -swap : swap; } } return res; }
O3
c
my_strnncollsp_simple: pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi cmpq %r8, %rdx movq %r8, %r9 cmovbq %rdx, %r9 leaq (%rsi,%r9), %r10 cmpq %r10, %rsi jae 0x382fd movzbl (%rsi), %eax incq %rsi movzbl (%rdi,%rax), %eax movzbl (%rcx), %r11d incq %rcx movzbl (%rdi,%r11), %r11d cmpb %r11b, %al je 0x382d8 subl %r11d, %eax jmp 0x38353 cmpq %r8, %rdx jne 0x38306 xorl %eax, %eax jmp 0x38353 xorl %eax, %eax cmpq %r8, %rdx cmovaq %rdx, %r8 cmovbq %rcx, %rsi movl $0x0, %ecx sbbl %ecx, %ecx leaq (%rsi,%r8), %rdx subq %r9, %rdx cmpq %rdx, %rsi jae 0x38353 orl $0x1, %ecx movb 0x20(%rdi), %dl subq %r9, %r8 xorl %eax, %eax movzbl (%rsi,%rax), %r9d movb (%rdi,%r9), %r9b cmpb %dl, %r9b jne 0x38349 incq %rax cmpq %rax, %r8 jne 0x38331 jmp 0x38302 movl %ecx, %eax negl %eax cmpb %dl, %r9b cmovael %ecx, %eax popq %rbp retq
my_strnncollsp_simple: push rbp mov rbp, rsp mov rdi, [rdi+58h] cmp rdx, r8 mov r9, r8 cmovb r9, rdx lea r10, [rsi+r9] loc_382D8: cmp rsi, r10 jnb short loc_382FD movzx eax, byte ptr [rsi] inc rsi movzx eax, byte ptr [rdi+rax] movzx r11d, byte ptr [rcx] inc rcx movzx r11d, byte ptr [rdi+r11] cmp al, r11b jz short loc_382D8 sub eax, r11d jmp short loc_38353 loc_382FD: cmp rdx, r8 jnz short loc_38306 loc_38302: xor eax, eax jmp short loc_38353 loc_38306: xor eax, eax cmp rdx, r8 cmova r8, rdx cmovb rsi, rcx mov ecx, 0 sbb ecx, ecx lea rdx, [rsi+r8] sub rdx, r9 cmp rsi, rdx jnb short loc_38353 or ecx, 1 mov dl, [rdi+20h] sub r8, r9 xor eax, eax loc_38331: movzx r9d, byte ptr [rsi+rax] mov r9b, [rdi+r9] cmp r9b, dl jnz short loc_38349 inc rax cmp r8, rax jnz short loc_38331 jmp short loc_38302 loc_38349: mov eax, ecx neg eax cmp r9b, dl cmovnb eax, ecx loc_38353: pop rbp retn
long long my_strnncollsp_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5) { long long v5; // rdi unsigned long long v6; // r9 unsigned __int8 *v7; // r10 long long v8; // rax int v9; // eax long long v10; // r11 int v11; // r11d long long result; // rax bool v13; // cf unsigned int v14; // ecx unsigned __int8 v15; // dl unsigned long long v16; // r8 long long v17; // rax unsigned __int8 v18; // r9 v5 = *(_QWORD *)(a1 + 88); v6 = a5; if ( a3 < a5 ) v6 = a3; v7 = &a2[v6]; while ( a2 < v7 ) { v8 = *a2++; v9 = *(unsigned __int8 *)(v5 + v8); v10 = *a4++; v11 = *(unsigned __int8 *)(v5 + v10); if ( (_BYTE)v9 != (_BYTE)v11 ) return (unsigned int)(v9 - v11); } if ( a3 == a5 ) return 0LL; result = 0LL; v13 = a3 < a5; if ( a3 > a5 ) a5 = a3; if ( v13 ) a2 = a4; if ( a2 < &a2[a5 - v6] ) { v14 = v13 ? -1 : 1; v15 = *(_BYTE *)(v5 + 32); v16 = a5 - v6; v17 = 0LL; while ( 1 ) { v18 = *(_BYTE *)(v5 + a2[v17]); if ( v18 != v15 ) break; if ( v16 == ++v17 ) return 0LL; } result = -v14; if ( v18 >= v15 ) return v14; } return result; }
my_strnncollsp_simple: PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] CMP RDX,R8 MOV R9,R8 CMOVC R9,RDX LEA R10,[RSI + R9*0x1] LAB_001382d8: CMP RSI,R10 JNC 0x001382fd MOVZX EAX,byte ptr [RSI] INC RSI MOVZX EAX,byte ptr [RDI + RAX*0x1] MOVZX R11D,byte ptr [RCX] INC RCX MOVZX R11D,byte ptr [RDI + R11*0x1] CMP AL,R11B JZ 0x001382d8 SUB EAX,R11D JMP 0x00138353 LAB_001382fd: CMP RDX,R8 JNZ 0x00138306 LAB_00138302: XOR EAX,EAX JMP 0x00138353 LAB_00138306: XOR EAX,EAX CMP RDX,R8 CMOVA R8,RDX CMOVC RSI,RCX MOV ECX,0x0 SBB ECX,ECX LEA RDX,[RSI + R8*0x1] SUB RDX,R9 CMP RSI,RDX JNC 0x00138353 OR ECX,0x1 MOV DL,byte ptr [RDI + 0x20] SUB R8,R9 XOR EAX,EAX LAB_00138331: MOVZX R9D,byte ptr [RSI + RAX*0x1] MOV R9B,byte ptr [RDI + R9*0x1] CMP R9B,DL JNZ 0x00138349 INC RAX CMP R8,RAX JNZ 0x00138331 JMP 0x00138302 LAB_00138349: MOV EAX,ECX NEG EAX CMP R9B,DL CMOVNC EAX,ECX LAB_00138353: POP RBP RET
uint my_strnncollsp_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5) { byte *pbVar1; byte bVar2; byte bVar3; long lVar4; long lVar5; uint uVar6; ulong uVar7; ulong uVar8; lVar4 = *(long *)(param_1 + 0x58); uVar8 = param_5; if (param_3 < param_5) { uVar8 = param_3; } pbVar1 = param_2 + uVar8; while (param_2 < pbVar1) { bVar2 = *param_2; param_2 = param_2 + 1; bVar3 = *param_4; param_4 = param_4 + 1; if (*(byte *)(lVar4 + (ulong)bVar2) != *(byte *)(lVar4 + (ulong)bVar3)) { return (uint)*(byte *)(lVar4 + (ulong)bVar2) - (uint)*(byte *)(lVar4 + (ulong)bVar3); } } if (param_3 != param_5) { uVar7 = param_5; if (param_5 < param_3) { uVar7 = param_3; } if (param_3 < param_5) { param_2 = param_4; } if (param_2 + (uVar7 - uVar8) <= param_2) { return 0; } uVar6 = -(uint)(param_3 < param_5) | 1; lVar5 = 0; do { if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) != *(byte *)(lVar4 + 0x20)) { if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) < *(byte *)(lVar4 + 0x20)) { return -uVar6; } return uVar6; } lVar5 = lVar5 + 1; } while (uVar7 - uVar8 != lVar5); } return 0; }
8,266
Cache::setByte(unsigned int, unsigned char, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) { this->referenceCounter++; this->statistics.numWrite++; // If in cache, write to it directly int blockId; if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->statistics.numHit++; this->statistics.totalCycles += this->policy.hitLatency; this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; if (!this->writeBack) { this->writeBlockToLowerLevel(this->blocks[blockId]); this->statistics.totalCycles += this->policy.missLatency; } if (cycles) *cycles = this->policy.hitLatency; return; } // Else, load the data from cache // TODO: implement bypassing this->statistics.numMiss++; this->statistics.totalCycles += this->policy.missLatency; if (this->writeAllocate) { this->loadBlockFromLowerLevel(addr, cycles); if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; return; } else { fprintf(stderr, "Error: data not in top level cache!\n"); exit(-1); } } else { if (this->lowerCache == nullptr) { this->memory->setByteNoCache(addr, val); } else { this->lowerCache->setByte(addr, val); } } }
O0
cpp
Cache::setByte(unsigned int, unsigned char, unsigned int*): subq $0x48, %rsp movb %dl, %al movq %rdi, 0x40(%rsp) movl %esi, 0x3c(%rsp) movb %al, 0x3b(%rsp) movq %rcx, 0x30(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movl 0x18(%rdi), %eax addl $0x1, %eax movl %eax, 0x18(%rdi) movl 0x4(%rdi), %eax addl $0x1, %eax movl %eax, 0x4(%rdi) movl 0x3c(%rsp), %esi callq 0x7f20 movl %eax, 0x2c(%rsp) cmpl $-0x1, %eax je 0x8805 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x82a0 movq 0x18(%rsp), %rdi movl %eax, 0x28(%rsp) movl 0x8(%rdi), %eax addl $0x1, %eax movl %eax, 0x8(%rdi) movl 0x40(%rdi), %eax addq 0x10(%rdi), %rax movq %rax, 0x10(%rdi) addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movq 0x18(%rsp), %rdi movb $0x1, 0x1(%rax) movl 0x18(%rdi), %eax movl %eax, 0x10(%rsp) addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movl 0x10(%rsp), %ecx movq 0x18(%rsp), %rdi movl %ecx, 0x10(%rax) movb 0x3b(%rsp), %al movb %al, 0x17(%rsp) addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movq %rax, %rdi addq $0x18, %rdi movl 0x28(%rsp), %eax movl %eax, %esi callq 0x8ee0 movb 0x17(%rsp), %dl movq %rax, %rcx movq 0x18(%rsp), %rax movb %dl, (%rcx) testb $0x1, 0x1c(%rax) jne 0x87e9 movq 0x18(%rsp), %rdi addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x8940 movq 0x18(%rsp), %rax movl 0x44(%rax), %ecx addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) cmpq $0x0, 0x30(%rsp) je 0x8800 movq 0x18(%rsp), %rax movl 0x40(%rax), %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) jmp 0x8935 movq 0x18(%rsp), %rax movl 0xc(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xc(%rax) movl 0x44(%rax), %ecx addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) testb $0x1, 0x1d(%rax) je 0x88f3 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi movq 0x30(%rsp), %rdx callq 0x82e0 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x7f20 movl %eax, 0x2c(%rsp) cmpl $-0x1, %eax je 0x88d1 movq 0x18(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x82a0 movq 0x18(%rsp), %rdi movl %eax, 0x24(%rsp) addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movq 0x18(%rsp), %rdi movb $0x1, 0x1(%rax) movl 0x18(%rdi), %eax movl %eax, 0x8(%rsp) addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movl 0x8(%rsp), %ecx movq 0x18(%rsp), %rdi movl %ecx, 0x10(%rax) movb 0x3b(%rsp), %al movb %al, 0xf(%rsp) addq $0x48, %rdi movslq 0x2c(%rsp), %rsi callq 0x8ec0 movq %rax, %rdi addq $0x18, %rdi movl 0x24(%rsp), %eax movl %eax, %esi callq 0x8ee0 movb 0xf(%rsp), %cl movb %cl, (%rax) jmp 0x8935 movq 0x6700(%rip), %rax # 0xefd8 movq (%rax), %rdi leaq 0x295a(%rip), %rsi # 0xb23c movb $0x0, %al callq 0x6190 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x6140 movq 0x18(%rsp), %rax cmpq $0x0, 0x28(%rax) jne 0x8918 movq 0x18(%rsp), %rax movq 0x20(%rax), %rdi movl 0x3c(%rsp), %esi movzbl 0x3b(%rsp), %edx callq 0x7200 jmp 0x8933 movq 0x18(%rsp), %rax movq 0x28(%rax), %rdi movl 0x3c(%rsp), %esi xorl %eax, %eax movl %eax, %ecx movzbl 0x3b(%rsp), %edx callq 0x86d0 jmp 0x8935 addq $0x48, %rsp retq nopw (%rax,%rax)
_ZN5Cache7setByteEjhPj: sub rsp, 48h mov al, dl mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], esi mov [rsp+48h+var_D], al mov [rsp+48h+var_18], rcx mov rdi, [rsp+48h+var_8]; this mov [rsp+48h+var_30], rdi mov eax, [rdi+18h] add eax, 1 mov [rdi+18h], eax mov eax, [rdi+4] add eax, 1 mov [rdi+4], eax mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) mov [rsp+48h+var_1C], eax cmp eax, 0FFFFFFFFh jz loc_8805 mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache9getOffsetEj; Cache::getOffset(uint) mov rdi, [rsp+48h+var_30] mov [rsp+48h+var_20], eax mov eax, [rdi+8] add eax, 1 mov [rdi+8], eax mov eax, [rdi+40h] add rax, [rdi+10h] mov [rdi+10h], rax add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, [rsp+48h+var_30] mov byte ptr [rax+1], 1 mov eax, [rdi+18h] mov [rsp+48h+var_38], eax add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov ecx, [rsp+48h+var_38] mov rdi, [rsp+48h+var_30] mov [rax+10h], ecx mov al, [rsp+48h+var_D] mov [rsp+48h+var_31], al add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, rax add rdi, 18h mov eax, [rsp+48h+var_20] mov esi, eax call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong) mov dl, [rsp+48h+var_31] mov rcx, rax mov rax, [rsp+48h+var_30] mov [rcx], dl test byte ptr [rax+1Ch], 1 jnz short loc_87E9 mov rdi, [rsp+48h+var_30] add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, [rsp+48h+var_30]; this mov rsi, rax; Cache::Block * call _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE; Cache::writeBlockToLowerLevel(Cache::Block &) mov rax, [rsp+48h+var_30] mov ecx, [rax+44h] add rcx, [rax+10h] mov [rax+10h], rcx loc_87E9: cmp [rsp+48h+var_18], 0 jz short loc_8800 mov rax, [rsp+48h+var_30] mov ecx, [rax+40h] mov rax, [rsp+48h+var_18] mov [rax], ecx loc_8800: jmp loc_8935 loc_8805: mov rax, [rsp+48h+var_30] mov ecx, [rax+0Ch] add ecx, 1 mov [rax+0Ch], ecx mov ecx, [rax+44h] add rcx, [rax+10h] mov [rax+10h], rcx test byte ptr [rax+1Dh], 1 jz loc_88F3 mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int mov rdx, [rsp+48h+var_18]; unsigned int * call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *) mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) mov [rsp+48h+var_1C], eax cmp eax, 0FFFFFFFFh jz short loc_88D1 mov rdi, [rsp+48h+var_30]; this mov esi, [rsp+48h+var_C]; unsigned int call _ZN5Cache9getOffsetEj; Cache::getOffset(uint) mov rdi, [rsp+48h+var_30] mov [rsp+48h+var_24], eax add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, [rsp+48h+var_30] mov byte ptr [rax+1], 1 mov eax, [rdi+18h] mov [rsp+48h+var_40], eax add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov ecx, [rsp+48h+var_40] mov rdi, [rsp+48h+var_30] mov [rax+10h], ecx mov al, [rsp+48h+var_D] mov [rsp+48h+var_39], al add rdi, 48h ; 'H' movsxd rsi, [rsp+48h+var_1C] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rdi, rax add rdi, 18h mov eax, [rsp+48h+var_24] mov esi, eax call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong) mov cl, [rsp+48h+var_39] mov [rax], cl jmp short loc_8935 loc_88D1: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aErrorDataNotIn; "Error: data not in top level cache!\n" mov al, 0 call _fprintf mov edi, 0FFFFFFFFh call _exit loc_88F3: mov rax, [rsp+48h+var_30] cmp qword ptr [rax+28h], 0 jnz short loc_8918 mov rax, [rsp+48h+var_30] mov rdi, [rax+20h]; this mov esi, [rsp+48h+var_C]; unsigned int movzx edx, [rsp+48h+var_D]; unsigned __int8 call _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar) jmp short loc_8933 loc_8918: mov rax, [rsp+48h+var_30] mov rdi, [rax+28h]; this mov esi, [rsp+48h+var_C]; unsigned int xor eax, eax mov ecx, eax; unsigned int * movzx edx, [rsp+48h+var_D]; unsigned __int8 call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *) loc_8933: jmp short $+2 loc_8935: add rsp, 48h retn
char Cache::setByte( Cache *this, unsigned int a2, char a3, unsigned int *a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { double v12; // xmm4_8 double v13; // xmm5_8 long long v14; // rax _BYTE *v15; // rcx _BYTE *v16; // rax Cache::Block *v17; // rax long long v18; // rax int v20; // [rsp+8h] [rbp-40h] int v21; // [rsp+10h] [rbp-38h] unsigned int Offset; // [rsp+24h] [rbp-24h] unsigned int v23; // [rsp+28h] [rbp-20h] int BlockId; // [rsp+2Ch] [rbp-1Ch] int v25; // [rsp+2Ch] [rbp-1Ch] ++*((_DWORD *)this + 6); ++*((_DWORD *)this + 1); BlockId = Cache::getBlockId(this, a2); if ( BlockId == -1 ) { ++*((_DWORD *)this + 3); *((_QWORD *)this + 2) += *((unsigned int *)this + 17); if ( (*((_BYTE *)this + 29) & 1) != 0 ) { Cache::loadBlockFromLowerLevel(this, a2, a4, a5, a6, a7, a8, v12, v13, a11, a12); v25 = Cache::getBlockId(this, a2); if ( v25 == -1 ) { fprintf(stderr, "Error: data not in top level cache!\n"); exit(0xFFFFFFFFLL); } Offset = Cache::getOffset(this, a2); *(_BYTE *)(std::vector<Cache::Block>::operator[]((char *)this + 72, v25) + 1) = 1; v20 = *((_DWORD *)this + 6); *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, v25) + 16) = v20; v18 = std::vector<Cache::Block>::operator[]((char *)this + 72, v25); v16 = (_BYTE *)std::vector<unsigned char>::operator[](v18 + 24, Offset); *v16 = a3; } else if ( *((_QWORD *)this + 5) ) { LOBYTE(v16) = Cache::setByte(*((Cache **)this + 5), a2, a3, 0LL); } else { LOBYTE(v16) = MemoryManager::setByteNoCache( *((MemoryManager **)this + 4), a2, a3, a5, a6, a7, a8, v12, v13, a11, a12); } } else { v23 = Cache::getOffset(this, a2); ++*((_DWORD *)this + 2); *((_QWORD *)this + 2) += *((unsigned int *)this + 16); *(_BYTE *)(std::vector<Cache::Block>::operator[]((char *)this + 72, BlockId) + 1) = 1; v21 = *((_DWORD *)this + 6); *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, BlockId) + 16) = v21; v14 = std::vector<Cache::Block>::operator[]((char *)this + 72, BlockId); v15 = (_BYTE *)std::vector<unsigned char>::operator[](v14 + 24, v23); LOBYTE(v16) = (_BYTE)this; *v15 = a3; if ( (*((_BYTE *)this + 28) & 1) == 0 ) { v17 = (Cache::Block *)std::vector<Cache::Block>::operator[]((char *)this + 72, BlockId); Cache::writeBlockToLowerLevel(this, v17); LOBYTE(v16) = (_BYTE)this; *((_QWORD *)this + 2) += *((unsigned int *)this + 17); } if ( a4 ) { LOBYTE(v16) = (_BYTE)a4; *a4 = *((_DWORD *)this + 16); } } return (char)v16; }
setByte: SUB RSP,0x48 MOV AL,DL MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ESI MOV byte ptr [RSP + 0x3b],AL MOV qword ptr [RSP + 0x30],RCX MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RDI MOV EAX,dword ptr [RDI + 0x18] ADD EAX,0x1 MOV dword ptr [RDI + 0x18],EAX MOV EAX,dword ptr [RDI + 0x4] ADD EAX,0x1 MOV dword ptr [RDI + 0x4],EAX MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00107f20 MOV dword ptr [RSP + 0x2c],EAX CMP EAX,-0x1 JZ 0x00108805 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001082a0 MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x28],EAX MOV EAX,dword ptr [RDI + 0x8] ADD EAX,0x1 MOV dword ptr [RDI + 0x8],EAX MOV EAX,dword ptr [RDI + 0x40] ADD RAX,qword ptr [RDI + 0x10] MOV qword ptr [RDI + 0x10],RAX ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x1],0x1 MOV EAX,dword ptr [RDI + 0x18] MOV dword ptr [RSP + 0x10],EAX ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV ECX,dword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x10],ECX MOV AL,byte ptr [RSP + 0x3b] MOV byte ptr [RSP + 0x17],AL ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV RDI,RAX ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x28] MOV ESI,EAX CALL 0x00108ee0 MOV DL,byte ptr [RSP + 0x17] MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RCX],DL TEST byte ptr [RAX + 0x1c],0x1 JNZ 0x001087e9 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX CALL 0x00108940 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX + 0x44] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX LAB_001087e9: CMP qword ptr [RSP + 0x30],0x0 JZ 0x00108800 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX + 0x40] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX LAB_00108800: JMP 0x00108935 LAB_00108805: MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX + 0xc] ADD ECX,0x1 MOV dword ptr [RAX + 0xc],ECX MOV ECX,dword ptr [RAX + 0x44] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX TEST byte ptr [RAX + 0x1d],0x1 JZ 0x001088f3 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] MOV RDX,qword ptr [RSP + 0x30] CALL 0x001082e0 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00107f20 MOV dword ptr [RSP + 0x2c],EAX CMP EAX,-0x1 JZ 0x001088d1 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001082a0 MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x24],EAX ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x1],0x1 MOV EAX,dword ptr [RDI + 0x18] MOV dword ptr [RSP + 0x8],EAX ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV ECX,dword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x10],ECX MOV AL,byte ptr [RSP + 0x3b] MOV byte ptr [RSP + 0xf],AL ADD RDI,0x48 MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00108ec0 MOV RDI,RAX ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x24] MOV ESI,EAX CALL 0x00108ee0 MOV CL,byte ptr [RSP + 0xf] MOV byte ptr [RAX],CL JMP 0x00108935 LAB_001088d1: MOV RAX,qword ptr [0x0010efd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x10b23c] MOV AL,0x0 CALL 0x00106190 MOV EDI,0xffffffff CALL 0x00106140 LAB_001088f3: MOV RAX,qword ptr [RSP + 0x18] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x00108918 MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x20] MOV ESI,dword ptr [RSP + 0x3c] MOVZX EDX,byte ptr [RSP + 0x3b] CALL 0x00107200 JMP 0x00108933 LAB_00108918: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x28] MOV ESI,dword ptr [RSP + 0x3c] XOR EAX,EAX MOV ECX,EAX MOVZX EDX,byte ptr [RSP + 0x3b] CALL 0x001086d0 LAB_00108933: JMP 0x00108935 LAB_00108935: ADD RSP,0x48 RET
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */ void __thiscall Cache::setByte(Cache *this,uint param_1,uchar param_2,uint *param_3) { int4 uVar1; int iVar2; uint uVar3; long lVar4; uchar *puVar5; Block *pBVar6; *(int *)(this + 0x18) = *(int *)(this + 0x18) + 1; *(int *)(this + 4) = *(int *)(this + 4) + 1; iVar2 = getBlockId(this,param_1); if (iVar2 == -1) { *(int *)(this + 0xc) = *(int *)(this + 0xc) + 1; *(ulong *)(this + 0x10) = (ulong)*(uint *)(this + 0x44) + *(long *)(this + 0x10); if (((byte)this[0x1d] & 1) == 0) { if (*(long *)(this + 0x28) == 0) { MemoryManager::setByteNoCache(*(MemoryManager **)(this + 0x20),param_1,param_2); } else { setByte(*(Cache **)(this + 0x28),param_1,param_2,(uint *)0x0); } } else { loadBlockFromLowerLevel(this,param_1,param_3); iVar2 = getBlockId(this,param_1); if (iVar2 == -1) { fprintf(*(FILE **)PTR_stderr_0010efd8,"Error: data not in top level cache!\n"); /* WARNING: Subroutine does not return */ exit(-1); } uVar3 = getOffset(this,param_1); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (long)iVar2); *(int1 *)(lVar4 + 1) = 1; uVar1 = *(int4 *)(this + 0x18); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (long)iVar2); *(int4 *)(lVar4 + 0x10) = uVar1; lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (long)iVar2); puVar5 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[] ((vector<unsigned_char,std::allocator<unsigned_char>> *) (lVar4 + 0x18),(ulong)uVar3); *puVar5 = param_2; } } else { uVar3 = getOffset(this,param_1); *(int *)(this + 8) = *(int *)(this + 8) + 1; *(ulong *)(this + 0x10) = (ulong)*(uint *)(this + 0x40) + *(long *)(this + 0x10); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (long)iVar2); *(int1 *)(lVar4 + 1) = 1; uVar1 = *(int4 *)(this + 0x18); lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (long)iVar2); *(int4 *)(lVar4 + 0x10) = uVar1; lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (long)iVar2); puVar5 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[] ((vector<unsigned_char,std::allocator<unsigned_char>> *) (lVar4 + 0x18),(ulong)uVar3); *puVar5 = param_2; if (((byte)this[0x1c] & 1) == 0) { pBVar6 = (Block *)std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *) (this + 0x48),(long)iVar2); writeBlockToLowerLevel(this,pBVar6); *(ulong *)(this + 0x10) = (ulong)*(uint *)(this + 0x44) + *(long *)(this + 0x10); } if (param_3 != (uint *)0x0) { *param_3 = *(uint *)(this + 0x40); } } return; }
8,267
Cache::setByte(unsigned int, unsigned char, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) { this->referenceCounter++; this->statistics.numWrite++; // If in cache, write to it directly int blockId; if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->statistics.numHit++; this->statistics.totalCycles += this->policy.hitLatency; this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; if (!this->writeBack) { this->writeBlockToLowerLevel(this->blocks[blockId]); this->statistics.totalCycles += this->policy.missLatency; } if (cycles) *cycles = this->policy.hitLatency; return; } // Else, load the data from cache // TODO: implement bypassing this->statistics.numMiss++; this->statistics.totalCycles += this->policy.missLatency; if (this->writeAllocate) { this->loadBlockFromLowerLevel(addr, cycles); if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; return; } else { fprintf(stderr, "Error: data not in top level cache!\n"); exit(-1); } } else { if (this->lowerCache == nullptr) { this->memory->setByteNoCache(addr, val); } else { this->lowerCache->setByte(addr, val); } } }
O1
cpp
Cache::setByte(unsigned int, unsigned char, unsigned int*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r15 movl %edx, %ebp movl %esi, %r14d movq %rdi, %rbx incl 0x18(%rdi) incl 0x4(%rdi) movl %r14d, %esi callq 0x3056 cmpl $-0x1, %eax jne 0x356c incl 0xc(%rbx) movl 0x44(%rbx), %eax addq %rax, 0x10(%rbx) cmpb $0x1, 0x1d(%rbx) je 0x35f2 movq 0x28(%rbx), %rdi movl $0x0, %r15d testq %rdi, %rdi jne 0x3519 movq 0x20(%rbx), %rdi movzbl %bpl, %edx movl %r14d, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x2906 movl 0x34(%rbx), %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %esi, %esi je 0x3598 xorl %ecx, %ecx cmpl $0x1, %esi je 0x3598 cmpl $0x2, %esi jb 0x3598 xorl %ecx, %ecx movl %esi, %edi shrl %edi incl %ecx cmpl $0x3, %esi movl %edi, %esi ja 0x358d shll %cl, %edx notl %edx incl 0x8(%rbx) movl 0x40(%rbx), %ecx addq %rcx, 0x10(%rbx) andl %r14d, %edx cltq movq 0x48(%rbx), %rcx leaq (%rax,%rax,2), %rsi shlq $0x4, %rsi movb $0x1, 0x1(%rcx,%rsi) movl 0x18(%rbx), %eax movl %eax, 0x10(%rcx,%rsi) movq 0x18(%rcx,%rsi), %rax movb %bpl, (%rax,%rdx) cmpb $0x0, 0x1c(%rbx) jne 0x35e5 addq 0x48(%rbx), %rsi movq %rbx, %rdi callq 0x3676 movl 0x44(%rbx), %eax addq %rax, 0x10(%rbx) testq %r15, %r15 je 0x3666 movl 0x40(%rbx), %eax movl %eax, (%r15) jmp 0x3666 movq %rbx, %rdi movl %r14d, %esi movq %r15, %rdx callq 0x32dc movq %rbx, %rdi movl %r14d, %esi callq 0x3056 cmpl $-0x1, %eax je 0x3671 movl 0x34(%rbx), %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %esi, %esi je 0x363c xorl %ecx, %ecx cmpl $0x1, %esi je 0x363c cmpl $0x2, %esi jb 0x363c xorl %ecx, %ecx movl %esi, %edi shrl %edi incl %ecx cmpl $0x3, %esi movl %edi, %esi ja 0x3631 shll %cl, %edx notl %edx andl %r14d, %edx cltq movq 0x48(%rbx), %rcx leaq (%rax,%rax,2), %rax shlq $0x4, %rax movb $0x1, 0x1(%rcx,%rax) movl 0x18(%rbx), %esi movl %esi, 0x10(%rcx,%rax) movq 0x18(%rcx,%rax), %rax movb %bpl, (%rax,%rdx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x236a
_ZN5Cache7setByteEjhPj: push rbp push r15 push r14 push rbx push rax mov r15, rcx mov ebp, edx mov r14d, esi loc_3519: mov rbx, rdi inc dword ptr [rdi+18h] inc dword ptr [rdi+4] mov esi, r14d; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) cmp eax, 0FFFFFFFFh jnz short loc_356C inc dword ptr [rbx+0Ch] mov eax, [rbx+44h] add [rbx+10h], rax cmp byte ptr [rbx+1Dh], 1 jz loc_35F2 mov rdi, [rbx+28h] mov r15d, 0 test rdi, rdi jnz short loc_3519 mov rdi, [rbx+20h]; this movzx edx, bpl; unsigned __int8 mov esi, r14d; unsigned int add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar) loc_356C: mov esi, [rbx+34h] mov edx, 0FFFFFFFFh mov ecx, 0FFFFFFFFh test esi, esi jz short loc_3598 xor ecx, ecx cmp esi, 1 jz short loc_3598 cmp esi, 2 jb short loc_3598 xor ecx, ecx mov edi, esi loc_358D: shr edi, 1 inc ecx cmp esi, 3 mov esi, edi ja short loc_358D loc_3598: shl edx, cl not edx inc dword ptr [rbx+8] mov ecx, [rbx+40h] add [rbx+10h], rcx and edx, r14d cdqe mov rcx, [rbx+48h] lea rsi, [rax+rax*2] shl rsi, 4 mov byte ptr [rcx+rsi+1], 1 mov eax, [rbx+18h] mov [rcx+rsi+10h], eax mov rax, [rcx+rsi+18h] mov [rax+rdx], bpl cmp byte ptr [rbx+1Ch], 0 jnz short loc_35E5 add rsi, [rbx+48h] mov rdi, rbx call _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE; Cache::writeBlockToLowerLevel(Cache::Block &) mov eax, [rbx+44h] add [rbx+10h], rax loc_35E5: test r15, r15 jz short loc_3666 mov eax, [rbx+40h] mov [r15], eax jmp short loc_3666 loc_35F2: mov rdi, rbx; this mov esi, r14d; unsigned int mov rdx, r15; unsigned int * call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *) mov rdi, rbx; this mov esi, r14d; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) cmp eax, 0FFFFFFFFh jz short loc_3671 mov esi, [rbx+34h] mov edx, 0FFFFFFFFh mov ecx, 0FFFFFFFFh test esi, esi jz short loc_363C xor ecx, ecx cmp esi, 1 jz short loc_363C cmp esi, 2 jb short loc_363C xor ecx, ecx mov edi, esi loc_3631: shr edi, 1 inc ecx cmp esi, 3 mov esi, edi ja short loc_3631 loc_363C: shl edx, cl not edx and edx, r14d cdqe mov rcx, [rbx+48h] lea rax, [rax+rax*2] shl rax, 4 mov byte ptr [rcx+rax+1], 1 mov esi, [rbx+18h] mov [rcx+rax+10h], esi mov rax, [rcx+rax+18h] mov [rax+rdx], bpl loc_3666: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_3671: call _ZN5Cache7setByteEjhPj_cold_1; Cache::setByte(uint,uchar,uint *) [clone]
char Cache::setByte( Cache *this, unsigned int a2, unsigned __int8 a3, unsigned int *a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { Cache *v15; // rbx int BlockId; // eax long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // rax unsigned int v23; // esi char v24; // cl unsigned int v25; // edi bool v26; // cc long long v27; // rdx long long v28; // rcx long long v29; // rsi int v30; // eax unsigned int v31; // esi char v32; // cl unsigned int v33; // edi long long v34; // rdx long long v35; // rcx long long v36; // rax while ( 1 ) { v15 = this; ++*((_DWORD *)this + 6); ++*((_DWORD *)this + 1); BlockId = Cache::getBlockId(this, a2); if ( BlockId != -1 ) break; ++*((_DWORD *)this + 3); *((_QWORD *)this + 2) += *((unsigned int *)this + 17); if ( *((_BYTE *)this + 29) == 1 ) { Cache::loadBlockFromLowerLevel( (MemoryManager **)this, a2, a4, *(double *)a5.m128_u64, *(double *)a6.m128_u64, a7, a8, *(double *)v20.m128_u64, *(double *)v21.m128_u64, a11, a12); v30 = Cache::getBlockId(this, a2); if ( v30 == -1 ) Cache::setByte(this); v31 = *((_DWORD *)this + 13); v32 = -1; if ( v31 ) { v32 = 0; if ( v31 != 1 ) { v32 = 0; v33 = *((_DWORD *)this + 13); do { v33 >>= 1; ++v32; v26 = v31 <= 3; v31 = v33; } while ( !v26 ); } } v34 = a2 & ~(-1 << v32); v35 = *((_QWORD *)v15 + 9); v36 = 48LL * v30; *(_BYTE *)(v35 + v36 + 1) = 1; *(_DWORD *)(v35 + v36 + 16) = *((_DWORD *)v15 + 6); v22 = *(_QWORD *)(v35 + v36 + 24); *(_BYTE *)(v22 + v34) = a3; return v22; } this = (Cache *)*((_QWORD *)this + 5); a4 = 0LL; if ( !this ) { LOBYTE(v22) = MemoryManager::setByteNoCache( *((MemoryManager **)v15 + 4), a2, a3, v17, v18, v19, a5, a6, a7, a8, v20, v21, a11, a12); return v22; } } v23 = *((_DWORD *)this + 13); v24 = -1; if ( v23 ) { v24 = 0; if ( v23 != 1 ) { v24 = 0; v25 = *((_DWORD *)this + 13); do { v25 >>= 1; ++v24; v26 = v23 <= 3; v23 = v25; } while ( !v26 ); } } ++*((_DWORD *)v15 + 2); *((_QWORD *)v15 + 2) += *((unsigned int *)v15 + 16); v27 = a2 & ~(-1 << v24); v28 = *((_QWORD *)v15 + 9); v29 = 48LL * BlockId; *(_BYTE *)(v28 + v29 + 1) = 1; *(_DWORD *)(v28 + v29 + 16) = *((_DWORD *)v15 + 6); v22 = *(_QWORD *)(v28 + v29 + 24); *(_BYTE *)(v22 + v27) = a3; if ( !*((_BYTE *)v15 + 28) ) { Cache::writeBlockToLowerLevel(v15, *((_QWORD *)v15 + 9) + v29); v22 = *((unsigned int *)v15 + 17); *((_QWORD *)v15 + 2) += v22; } if ( a4 ) { LODWORD(v22) = *((_DWORD *)v15 + 16); *a4 = v22; } return v22; }
setByte: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15,RCX MOV EBP,EDX MOV R14D,ESI LAB_00103519: MOV RBX,RDI INC dword ptr [RDI + 0x18] INC dword ptr [RDI + 0x4] MOV ESI,R14D CALL 0x00103056 CMP EAX,-0x1 JNZ 0x0010356c INC dword ptr [RBX + 0xc] MOV EAX,dword ptr [RBX + 0x44] ADD qword ptr [RBX + 0x10],RAX CMP byte ptr [RBX + 0x1d],0x1 JZ 0x001035f2 MOV RDI,qword ptr [RBX + 0x28] MOV R15D,0x0 TEST RDI,RDI JNZ 0x00103519 MOV RDI,qword ptr [RBX + 0x20] MOVZX EDX,BPL MOV ESI,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00102906 LAB_0010356c: MOV ESI,dword ptr [RBX + 0x34] MOV EDX,0xffffffff MOV ECX,0xffffffff TEST ESI,ESI JZ 0x00103598 XOR ECX,ECX CMP ESI,0x1 JZ 0x00103598 CMP ESI,0x2 JC 0x00103598 XOR ECX,ECX MOV EDI,ESI LAB_0010358d: SHR EDI,0x1 INC ECX CMP ESI,0x3 MOV ESI,EDI JA 0x0010358d LAB_00103598: SHL EDX,CL NOT EDX INC dword ptr [RBX + 0x8] MOV ECX,dword ptr [RBX + 0x40] ADD qword ptr [RBX + 0x10],RCX AND EDX,R14D CDQE MOV RCX,qword ptr [RBX + 0x48] LEA RSI,[RAX + RAX*0x2] SHL RSI,0x4 MOV byte ptr [RCX + RSI*0x1 + 0x1],0x1 MOV EAX,dword ptr [RBX + 0x18] MOV dword ptr [RCX + RSI*0x1 + 0x10],EAX MOV RAX,qword ptr [RCX + RSI*0x1 + 0x18] MOV byte ptr [RAX + RDX*0x1],BPL CMP byte ptr [RBX + 0x1c],0x0 JNZ 0x001035e5 ADD RSI,qword ptr [RBX + 0x48] MOV RDI,RBX CALL 0x00103676 MOV EAX,dword ptr [RBX + 0x44] ADD qword ptr [RBX + 0x10],RAX LAB_001035e5: TEST R15,R15 JZ 0x00103666 MOV EAX,dword ptr [RBX + 0x40] MOV dword ptr [R15],EAX JMP 0x00103666 LAB_001035f2: MOV RDI,RBX MOV ESI,R14D MOV RDX,R15 CALL 0x001032dc MOV RDI,RBX MOV ESI,R14D CALL 0x00103056 CMP EAX,-0x1 JZ 0x00103671 MOV ESI,dword ptr [RBX + 0x34] MOV EDX,0xffffffff MOV ECX,0xffffffff TEST ESI,ESI JZ 0x0010363c XOR ECX,ECX CMP ESI,0x1 JZ 0x0010363c CMP ESI,0x2 JC 0x0010363c XOR ECX,ECX MOV EDI,ESI LAB_00103631: SHR EDI,0x1 INC ECX CMP ESI,0x3 MOV ESI,EDI JA 0x00103631 LAB_0010363c: SHL EDX,CL NOT EDX AND EDX,R14D CDQE MOV RCX,qword ptr [RBX + 0x48] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x4 MOV byte ptr [RCX + RAX*0x1 + 0x1],0x1 MOV ESI,dword ptr [RBX + 0x18] MOV dword ptr [RCX + RAX*0x1 + 0x10],ESI MOV RAX,qword ptr [RCX + RAX*0x1 + 0x18] MOV byte ptr [RAX + RDX*0x1],BPL LAB_00103666: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00103671: CALL 0x0010236a
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */ void Cache::setByte(uint param_1,uchar param_2,uint *param_3) { long lVar1; bool bVar2; uchar uVar3; int iVar4; long lVar5; byte bVar6; uint *in_RCX; uint *extraout_RDX; int7 in_register_00000031; Block *pBVar7; uint uVar8; int4 in_register_0000003c; Cache *this; Cache *pCVar9; ulong uVar10; uint uVar11; uVar3 = (uchar)param_3; pCVar9 = (Cache *)CONCAT44(in_register_0000003c,param_1); while( true ) { this = pCVar9; *(int *)(this + 0x18) = *(int *)(this + 0x18) + 1; *(int *)(this + 4) = *(int *)(this + 4) + 1; uVar11 = (uint)CONCAT71(in_register_00000031,param_2); iVar4 = getBlockId(this,uVar11); if (iVar4 != -1) { uVar8 = *(uint *)(this + 0x34); bVar6 = 0xff; if (uVar8 != 0) { bVar6 = 0; if ((uVar8 != 1) && (bVar6 = 0, 1 < uVar8)) { bVar6 = 0; do { bVar6 = bVar6 + 1; bVar2 = 3 < uVar8; uVar8 = uVar8 >> 1; } while (bVar2); } } *(int *)(this + 8) = *(int *)(this + 8) + 1; *(ulong *)(this + 0x10) = *(long *)(this + 0x10) + (ulong)*(uint *)(this + 0x40); lVar1 = *(long *)(this + 0x48); lVar5 = (long)iVar4 * 0x30; *(int1 *)(lVar1 + 1 + lVar5) = 1; *(int4 *)(lVar1 + 0x10 + lVar5) = *(int4 *)(this + 0x18); *(uchar *)(*(long *)(lVar1 + 0x18 + lVar5) + (ulong)(~(-1 << (bVar6 & 0x1f)) & uVar11)) = uVar3; if (this[0x1c] == (Cache)0x0) { writeBlockToLowerLevel(this,(Block *)(lVar5 + *(long *)(this + 0x48))); *(ulong *)(this + 0x10) = *(long *)(this + 0x10) + (ulong)*(uint *)(this + 0x44); } if (in_RCX != (uint *)0x0) { *in_RCX = *(uint *)(this + 0x40); } return; } *(int *)(this + 0xc) = *(int *)(this + 0xc) + 1; *(ulong *)(this + 0x10) = *(long *)(this + 0x10) + (ulong)*(uint *)(this + 0x44); if (this[0x1d] == (Cache)0x1) break; in_RCX = (uint *)0x0; pCVar9 = *(Cache **)(this + 0x28); if (*(Cache **)(this + 0x28) == (Cache *)0x0) { MemoryManager::setByteNoCache(*(MemoryManager **)(this + 0x20),uVar11,uVar3); return; } } loadBlockFromLowerLevel(this,uVar11,in_RCX); pBVar7 = (Block *)(CONCAT71(in_register_00000031,param_2) & 0xffffffff); pCVar9 = this; iVar4 = getBlockId(this,uVar11); if (iVar4 != -1) { uVar8 = *(uint *)(this + 0x34); bVar6 = 0xff; if (uVar8 != 0) { bVar6 = 0; if ((uVar8 != 1) && (bVar6 = 0, 1 < uVar8)) { bVar6 = 0; do { bVar6 = bVar6 + 1; bVar2 = 3 < uVar8; uVar8 = uVar8 >> 1; } while (bVar2); } } lVar1 = *(long *)(this + 0x48); lVar5 = (long)iVar4 * 0x30; *(int1 *)(lVar1 + 1 + lVar5) = 1; *(int4 *)(lVar1 + 0x10 + lVar5) = *(int4 *)(this + 0x18); *(uchar *)(*(long *)(lVar1 + 0x18 + lVar5) + (ulong)(~(-1 << (bVar6 & 0x1f)) & uVar11)) = uVar3; return; } setByte((uint)pCVar9,(uchar)pBVar7,extraout_RDX); iVar4 = getAddr(pCVar9,pBVar7); if (*(long *)(pCVar9 + 0x28) == 0) { if (*(int *)(pBVar7 + 0xc) != 0) { uVar10 = 0; do { MemoryManager::setByteNoCache (*(MemoryManager **)(pCVar9 + 0x20),iVar4 + (int)uVar10, *(uchar *)(*(long *)(pBVar7 + 0x18) + uVar10)); uVar10 = uVar10 + 1; } while (uVar10 < *(uint *)(pBVar7 + 0xc)); } } else if (*(int *)(pBVar7 + 0xc) != 0) { uVar10 = 0; do { setByte((uint)*(int8 *)(pCVar9 + 0x28),(char)iVar4 + (char)uVar10, (uint *)(ulong)*(byte *)(*(long *)(pBVar7 + 0x18) + uVar10)); uVar10 = uVar10 + 1; } while (uVar10 < *(uint *)(pBVar7 + 0xc)); } return; }
8,268
Cache::setByte(unsigned int, unsigned char, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) { this->referenceCounter++; this->statistics.numWrite++; // If in cache, write to it directly int blockId; if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->statistics.numHit++; this->statistics.totalCycles += this->policy.hitLatency; this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; if (!this->writeBack) { this->writeBlockToLowerLevel(this->blocks[blockId]); this->statistics.totalCycles += this->policy.missLatency; } if (cycles) *cycles = this->policy.hitLatency; return; } // Else, load the data from cache // TODO: implement bypassing this->statistics.numMiss++; this->statistics.totalCycles += this->policy.missLatency; if (this->writeAllocate) { this->loadBlockFromLowerLevel(addr, cycles); if ((blockId = this->getBlockId(addr)) != -1) { uint32_t offset = this->getOffset(addr); this->blocks[blockId].modified = true; this->blocks[blockId].lastReference = this->referenceCounter; this->blocks[blockId].data[offset] = val; return; } else { fprintf(stderr, "Error: data not in top level cache!\n"); exit(-1); } } else { if (this->lowerCache == nullptr) { this->memory->setByteNoCache(addr, val); } else { this->lowerCache->setByte(addr, val); } } }
O2
cpp
Cache::setByte(unsigned int, unsigned char, unsigned int*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %r14 movl %edx, %ebp movl %esi, %r15d movq %rdi, %rbx incl 0x18(%rdi) incl 0x4(%rdi) movl %r15d, %esi callq 0x3f1e cmpl $-0x1, %eax jne 0x42ff incl 0xc(%rbx) movl 0x44(%rbx), %eax addq %rax, 0x10(%rbx) cmpb $0x1, 0x1d(%rbx) je 0x435f movq 0x28(%rbx), %rdi movl $0x0, %r14d testq %rdi, %rdi jne 0x42ae movq 0x20(%rbx), %rdi movzbl %bpl, %edx movl %r15d, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x3822 movl %eax, %r12d movq %rbx, %rdi movl %r15d, %esi callq 0x40ee incl 0x8(%rbx) movl 0x40(%rbx), %ecx addq %rcx, 0x10(%rbx) movslq %r12d, %rcx movq 0x48(%rbx), %rdx imulq $0x30, %rcx, %rsi movb $0x1, 0x1(%rdx,%rsi) movl 0x18(%rbx), %ecx movl %ecx, 0x10(%rdx,%rsi) movl %eax, %eax movq 0x18(%rdx,%rsi), %rcx movb %bpl, (%rcx,%rax) cmpb $0x0, 0x1c(%rbx) jne 0x4352 addq 0x48(%rbx), %rsi movq %rbx, %rdi callq 0x43da movl 0x44(%rbx), %eax addq %rax, 0x10(%rbx) testq %r14, %r14 je 0x43ad movl 0x40(%rbx), %eax movl %eax, (%r14) jmp 0x43ad movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x4108 movq %rbx, %rdi movl %r15d, %esi callq 0x3f1e cmpl $-0x1, %eax je 0x43b6 movl %eax, %r14d movq %rbx, %rdi movl %r15d, %esi callq 0x40ee movslq %r14d, %rcx movq 0x48(%rbx), %rdx imulq $0x30, %rcx, %rcx movb $0x1, 0x1(%rdx,%rcx) movl 0x18(%rbx), %esi movl %esi, 0x10(%rdx,%rcx) movl %eax, %eax movq 0x18(%rdx,%rcx), %rcx movb %bpl, (%rcx,%rax) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0x3c1b(%rip), %rax # 0x7fd8 movq (%rax), %rcx leaq 0xe99(%rip), %rdi # 0x5260 pushq $0x24 popq %rsi pushq $0x1 popq %rdx callq 0x31f0 pushq $-0x1 popq %rdi callq 0x3140
_ZN5Cache7setByteEjhPj: push rbp push r15 push r14 push r12 push rbx mov r14, rcx mov ebp, edx mov r15d, esi loc_42AE: mov rbx, rdi inc dword ptr [rdi+18h] inc dword ptr [rdi+4] mov esi, r15d; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) cmp eax, 0FFFFFFFFh jnz short loc_42FF inc dword ptr [rbx+0Ch] mov eax, [rbx+44h] add [rbx+10h], rax cmp byte ptr [rbx+1Dh], 1 jz loc_435F mov rdi, [rbx+28h] mov r14d, 0 test rdi, rdi jnz short loc_42AE mov rdi, [rbx+20h]; this movzx edx, bpl; unsigned __int8 mov esi, r15d; unsigned int pop rbx pop r12 pop r14 pop r15 pop rbp jmp _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar) loc_42FF: mov r12d, eax mov rdi, rbx; this mov esi, r15d; unsigned int call _ZN5Cache9getOffsetEj; Cache::getOffset(uint) inc dword ptr [rbx+8] mov ecx, [rbx+40h] add [rbx+10h], rcx movsxd rcx, r12d mov rdx, [rbx+48h] imul rsi, rcx, 30h ; '0' mov byte ptr [rdx+rsi+1], 1 mov ecx, [rbx+18h] mov [rdx+rsi+10h], ecx mov eax, eax mov rcx, [rdx+rsi+18h] mov [rcx+rax], bpl cmp byte ptr [rbx+1Ch], 0 jnz short loc_4352 add rsi, [rbx+48h] mov rdi, rbx call _ZN5Cache22writeBlockToLowerLevelERNS_5BlockE; Cache::writeBlockToLowerLevel(Cache::Block &) mov eax, [rbx+44h] add [rbx+10h], rax loc_4352: test r14, r14 jz short loc_43AD mov eax, [rbx+40h] mov [r14], eax jmp short loc_43AD loc_435F: mov rdi, rbx; this mov esi, r15d; unsigned int mov rdx, r14; unsigned int * call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *) mov rdi, rbx; this mov esi, r15d; unsigned int call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint) cmp eax, 0FFFFFFFFh jz short loc_43B6 mov r14d, eax mov rdi, rbx; this mov esi, r15d; unsigned int call _ZN5Cache9getOffsetEj; Cache::getOffset(uint) movsxd rcx, r14d mov rdx, [rbx+48h] imul rcx, 30h ; '0' mov byte ptr [rdx+rcx+1], 1 mov esi, [rbx+18h] mov [rdx+rcx+10h], esi mov eax, eax mov rcx, [rdx+rcx+18h] mov [rcx+rax], bpl loc_43AD: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_43B6: mov rax, cs:stderr_ptr mov rcx, [rax] lea rdi, aErrorDataNotIn; "Error: data not in top level cache!\n" push 24h ; '$' pop rsi push 1 pop rdx call _fwrite push 0FFFFFFFFFFFFFFFFh pop rdi call _exit
char Cache::setByte( Cache *this, unsigned int a2, unsigned __int8 a3, unsigned int *a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { Cache *v14; // rbx int BlockId; // eax long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rax int v22; // r12d long long v23; // rdx long long v24; // rsi int v25; // eax int v26; // r14d long long v27; // rdx long long v28; // rcx while ( 1 ) { v14 = this; ++*((_DWORD *)this + 6); ++*((_DWORD *)this + 1); BlockId = Cache::getBlockId(this, a2); if ( BlockId != -1 ) break; ++*((_DWORD *)this + 3); *((_QWORD *)this + 2) += *((unsigned int *)this + 17); if ( *((_BYTE *)this + 29) == 1 ) { Cache::loadBlockFromLowerLevel( (MemoryManager **)this, a2, a4, *(double *)a5.m128_u64, a6, a7, a8, *(double *)v19.m128_u64, *(double *)v20.m128_u64, a11, a12); v25 = Cache::getBlockId(this, a2); if ( v25 == -1 ) { fwrite("Error: data not in top level cache!\n", 36LL, 1LL, stderr); exit(-1LL); } v26 = v25; LODWORD(v21) = Cache::getOffset(this, a2); v27 = *((_QWORD *)this + 9); v28 = 48LL * v26; *(_BYTE *)(v27 + v28 + 1) = 1; *(_DWORD *)(v27 + v28 + 16) = *((_DWORD *)this + 6); *(_BYTE *)(*(_QWORD *)(v27 + v28 + 24) + (unsigned int)v21) = a3; return v21; } this = (Cache *)*((_QWORD *)this + 5); a4 = 0LL; if ( !this ) { LOBYTE(v21) = MemoryManager::setByteNoCache( *((MemoryManager **)v14 + 4), a2, a3, v16, v17, v18, a5, a6, a7, a8, v19, v20, a11, a12); return v21; } } v22 = BlockId; LODWORD(v21) = Cache::getOffset(this, a2); ++*((_DWORD *)this + 2); *((_QWORD *)this + 2) += *((unsigned int *)this + 16); v23 = *((_QWORD *)this + 9); v24 = 48LL * v22; *(_BYTE *)(v23 + v24 + 1) = 1; *(_DWORD *)(v23 + v24 + 16) = *((_DWORD *)this + 6); *(_BYTE *)(*(_QWORD *)(v23 + v24 + 24) + (unsigned int)v21) = a3; if ( !*((_BYTE *)this + 28) ) { Cache::writeBlockToLowerLevel(this, *((_QWORD *)this + 9) + v24); v21 = *((unsigned int *)this + 17); *((_QWORD *)this + 2) += v21; } if ( a4 ) { LODWORD(v21) = *((_DWORD *)this + 16); *a4 = v21; } return v21; }
setByte: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RCX MOV EBP,EDX MOV R15D,ESI LAB_001042ae: MOV RBX,RDI INC dword ptr [RDI + 0x18] INC dword ptr [RDI + 0x4] MOV ESI,R15D CALL 0x00103f1e CMP EAX,-0x1 JNZ 0x001042ff INC dword ptr [RBX + 0xc] MOV EAX,dword ptr [RBX + 0x44] ADD qword ptr [RBX + 0x10],RAX CMP byte ptr [RBX + 0x1d],0x1 JZ 0x0010435f MOV RDI,qword ptr [RBX + 0x28] MOV R14D,0x0 TEST RDI,RDI JNZ 0x001042ae MOV RDI,qword ptr [RBX + 0x20] MOVZX EDX,BPL MOV ESI,R15D POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00103822 LAB_001042ff: MOV R12D,EAX MOV RDI,RBX MOV ESI,R15D CALL 0x001040ee INC dword ptr [RBX + 0x8] MOV ECX,dword ptr [RBX + 0x40] ADD qword ptr [RBX + 0x10],RCX MOVSXD RCX,R12D MOV RDX,qword ptr [RBX + 0x48] IMUL RSI,RCX,0x30 MOV byte ptr [RDX + RSI*0x1 + 0x1],0x1 MOV ECX,dword ptr [RBX + 0x18] MOV dword ptr [RDX + RSI*0x1 + 0x10],ECX MOV EAX,EAX MOV RCX,qword ptr [RDX + RSI*0x1 + 0x18] MOV byte ptr [RCX + RAX*0x1],BPL CMP byte ptr [RBX + 0x1c],0x0 JNZ 0x00104352 ADD RSI,qword ptr [RBX + 0x48] MOV RDI,RBX CALL 0x001043da MOV EAX,dword ptr [RBX + 0x44] ADD qword ptr [RBX + 0x10],RAX LAB_00104352: TEST R14,R14 JZ 0x001043ad MOV EAX,dword ptr [RBX + 0x40] MOV dword ptr [R14],EAX JMP 0x001043ad LAB_0010435f: MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x00104108 MOV RDI,RBX MOV ESI,R15D CALL 0x00103f1e CMP EAX,-0x1 JZ 0x001043b6 MOV R14D,EAX MOV RDI,RBX MOV ESI,R15D CALL 0x001040ee MOVSXD RCX,R14D MOV RDX,qword ptr [RBX + 0x48] IMUL RCX,RCX,0x30 MOV byte ptr [RDX + RCX*0x1 + 0x1],0x1 MOV ESI,dword ptr [RBX + 0x18] MOV dword ptr [RDX + RCX*0x1 + 0x10],ESI MOV EAX,EAX MOV RCX,qword ptr [RDX + RCX*0x1 + 0x18] MOV byte ptr [RCX + RAX*0x1],BPL LAB_001043ad: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001043b6: MOV RAX,qword ptr [0x00107fd8] MOV RCX,qword ptr [RAX] LEA RDI,[0x105260] PUSH 0x24 POP RSI PUSH 0x1 POP RDX CALL 0x001031f0 PUSH -0x1 POP RDI CALL 0x00103140
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */ void __thiscall Cache::setByte(Cache *this,uint param_1,uchar param_2,uint *param_3) { long lVar1; int iVar2; uint uVar3; long lVar4; Cache *this_00; while( true ) { this_00 = this; *(int *)(this_00 + 0x18) = *(int *)(this_00 + 0x18) + 1; *(int *)(this_00 + 4) = *(int *)(this_00 + 4) + 1; iVar2 = getBlockId(this_00,param_1); if (iVar2 != -1) { uVar3 = getOffset(this_00,param_1); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; *(ulong *)(this_00 + 0x10) = *(long *)(this_00 + 0x10) + (ulong)*(uint *)(this_00 + 0x40); lVar1 = *(long *)(this_00 + 0x48); lVar4 = (long)iVar2 * 0x30; *(int1 *)(lVar1 + 1 + lVar4) = 1; *(int4 *)(lVar1 + 0x10 + lVar4) = *(int4 *)(this_00 + 0x18); *(uchar *)(*(long *)(lVar1 + 0x18 + lVar4) + (ulong)uVar3) = param_2; if (this_00[0x1c] == (Cache)0x0) { writeBlockToLowerLevel(this_00,(Block *)(lVar4 + *(long *)(this_00 + 0x48))); *(ulong *)(this_00 + 0x10) = *(long *)(this_00 + 0x10) + (ulong)*(uint *)(this_00 + 0x44); } if (param_3 != (uint *)0x0) { *param_3 = *(uint *)(this_00 + 0x40); } return; } *(int *)(this_00 + 0xc) = *(int *)(this_00 + 0xc) + 1; *(ulong *)(this_00 + 0x10) = *(long *)(this_00 + 0x10) + (ulong)*(uint *)(this_00 + 0x44); if (this_00[0x1d] == (Cache)0x1) break; param_3 = (uint *)0x0; this = *(Cache **)(this_00 + 0x28); if (*(Cache **)(this_00 + 0x28) == (Cache *)0x0) { MemoryManager::setByteNoCache(*(MemoryManager **)(this_00 + 0x20),param_1,param_2); return; } } loadBlockFromLowerLevel(this_00,param_1,param_3); iVar2 = getBlockId(this_00,param_1); if (iVar2 != -1) { uVar3 = getOffset(this_00,param_1); lVar1 = *(long *)(this_00 + 0x48); lVar4 = (long)iVar2 * 0x30; *(int1 *)(lVar1 + 1 + lVar4) = 1; *(int4 *)(lVar1 + 0x10 + lVar4) = *(int4 *)(this_00 + 0x18); *(uchar *)(*(long *)(lVar1 + 0x18 + lVar4) + (ulong)uVar3) = param_2; return; } fwrite("Error: data not in top level cache!\n",0x24,1,*(FILE **)PTR_stderr_00107fd8); /* WARNING: Subroutine does not return */ exit(-1); }
8,269
ggml_threadpool_params_from_cpu_params(cpu_params const&)
llama.cpp/common/common.cpp
struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) { struct ggml_threadpool_params tpp; ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults if (params.mask_valid) { std::memcpy(&tpp.cpumask, &params.cpumask, GGML_MAX_N_THREADS); } tpp.prio = params.priority; tpp.poll = params.poll; tpp.strict_cpu = params.strict_cpu; return tpp; }
O3
cpp
ggml_threadpool_params_from_cpu_params(cpu_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl (%rsi), %esi callq 0x212d0 cmpb $0x1, 0x204(%r14) jne 0xf95d5 leaq 0x4(%r14), %rsi movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi callq 0x200e0 movl 0x208(%r14), %eax movl %eax, 0x204(%rbx) movl 0x210(%r14), %eax movl %eax, 0x208(%rbx) movb 0x20c(%r14), %al movb %al, 0x20c(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov esi, [rsi] call _ggml_threadpool_params_init cmp byte ptr [r14+204h], 1 jnz short loc_F95D5 lea rsi, [r14+4] mov edx, 200h mov rdi, rbx call _memcpy loc_F95D5: mov eax, [r14+208h] mov [rbx+204h], eax mov eax, [r14+210h] mov [rbx+208h], eax mov al, [r14+20Ch] mov [rbx+20Ch], al mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2) { ggml_threadpool_params_init(a1, *a2); if ( *((_BYTE *)a2 + 516) == 1 ) memcpy(a1, a2 + 1, 512LL); *(_DWORD *)(a1 + 516) = a2[130]; *(_DWORD *)(a1 + 520) = a2[132]; *(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524); return a1; }
ggml_threadpool_params_from_cpu_params: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI] CALL 0x001212d0 CMP byte ptr [R14 + 0x204],0x1 JNZ 0x001f95d5 LEA RSI,[R14 + 0x4] MOV EDX,0x200 MOV RDI,RBX CALL 0x001200e0 LAB_001f95d5: MOV EAX,dword ptr [R14 + 0x208] MOV dword ptr [RBX + 0x204],EAX MOV EAX,dword ptr [R14 + 0x210] MOV dword ptr [RBX + 0x208],EAX MOV AL,byte ptr [R14 + 0x20c] MOV byte ptr [RBX + 0x20c],AL MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */ cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1) { int4 *in_RSI; ggml_threadpool_params_init(param_1,*in_RSI); if (*(char *)(in_RSI + 0x81) == '\x01') { memcpy(param_1,in_RSI + 1,0x200); } *(int4 *)(param_1 + 0x204) = in_RSI[0x82]; *(int4 *)(param_1 + 0x208) = in_RSI[0x84]; param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83); return param_1; }
8,270
minja::SliceExpr::~SliceExpr()
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O3
cpp
minja::SliceExpr::~SliceExpr(): pushq %rbx movq %rdi, %rbx leaq 0x741b5(%rip), %rax # 0xe6af8 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x72958 callq 0x33e7e movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x72966 callq 0x33e7e leaq 0x73efb(%rip), %rax # 0xe6868 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x72982 callq 0x33e7e movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x197b0
_ZN5minja9SliceExprD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_72958 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_72958: mov rdi, [rbx+28h] test rdi, rdi jz short loc_72966 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_72966: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_72982 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_72982: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi volatile signed __int32 *v4; // rdi *(_QWORD *)this = &`vtable for'minja::SliceExpr + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); v3 = (volatile signed __int32 *)*((_QWORD *)this + 5); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v4 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); operator delete(this, 0x40uLL); }
~SliceExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x1e6af8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x00172958 CALL 0x00133e7e LAB_00172958: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x00172966 CALL 0x00133e7e LAB_00172966: LEA RAX,[0x1e6868] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x00172982 CALL 0x00133e7e LAB_00172982: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x001197b0
/* minja::SliceExpr::~SliceExpr() */ void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this) { *(int ***)this = &PTR_do_evaluate_001e6b08; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28)); } *(int ***)this = &PTR___cxa_pure_virtual_001e6878; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); } operator_delete(this,0x40); return; }
8,271
Path::is_root_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
HansKristian-Work[P]pyroveil/layer-util/path_utils.cpp
bool is_root_path(const std::string &path) { if (path.empty()) return false; if (path.front() == '/' && path.size() == 1) return true; #ifdef _WIN32 { auto index = std::min(path.find(":/"), path.find(":\\")); if (index != std::string::npos && (index + 2) == path.size()) return true; } #endif auto index = path.find("://"); return index != std::string::npos && (index + 3) == path.size(); }
O0
cpp
Path::is_root_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x16a760 testb $0x1, %al jne 0x28fbeb jmp 0x28fbf1 movb $0x0, -0x1(%rbp) jmp 0x28fc68 movq -0x10(%rbp), %rdi callq 0x167640 movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x28fc17 movq -0x10(%rbp), %rdi callq 0x16aa70 cmpq $0x1, %rax jne 0x28fc17 movb $0x1, -0x1(%rbp) jmp 0x28fc68 movq -0x10(%rbp), %rdi leaq 0x66a4e6(%rip), %rsi # 0x8fa108 xorl %eax, %eax movl %eax, %edx callq 0x165740 movq %rax, -0x18(%rbp) xorl %eax, %eax cmpq $-0x1, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x28fc60 movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x16aa70 movq %rax, %rcx movq -0x28(%rbp), %rax cmpq %rcx, %rax sete %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN4Path12is_root_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_28FBEB jmp short loc_28FBF1 loc_28FBEB: mov [rbp+var_1], 0 jmp short loc_28FC68 loc_28FBF1: mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5frontEv; std::string::front(void) movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_28FC17 mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) cmp rax, 1 jnz short loc_28FC17 mov [rbp+var_1], 1 jmp short loc_28FC68 loc_28FC17: mov rdi, [rbp+var_10] lea rsi, aFile+4; "://" xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong) mov [rbp+var_18], rax xor eax, eax cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh mov [rbp+var_19], al jz short loc_28FC60 mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_28], rax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_28] cmp rax, rcx setz al mov [rbp+var_19], al loc_28FC60: mov al, [rbp+var_19] and al, 1 mov [rbp+var_1], al loc_28FC68: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char Path::is_root_path(long long a1) { bool v2; // [rsp+17h] [rbp-19h] long long v3; // [rsp+18h] [rbp-18h] if ( (std::string::empty(a1) & 1) != 0 ) return 0; if ( *(_BYTE *)std::string::front(a1) == 47 && std::string::size(a1) == 1 ) return 1; v3 = std::string::find(a1, "://", 0LL); v2 = 0; if ( v3 != -1 ) return v3 + 3 == std::string::size(a1); return v2; }
_M_next: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] POP RBP RET
/* std::__detail::_Hash_node<std::pair<unsigned int const, std::unique_ptr<spirv_cross::CFG, std::default_delete<spirv_cross::CFG> > >, false>::_M_next() const */ int8 __thiscall std::__detail:: _Hash_node<std::pair<unsigned_int_const,std::unique_ptr<spirv_cross::CFG,std::default_delete<spirv_cross::CFG>>>,false> ::_M_next(_Hash_node<std::pair<unsigned_int_const,std::unique_ptr<spirv_cross::CFG,std::default_delete<spirv_cross::CFG>>>,false> *this) { return *(int8 *)this; }
8,272
Path::is_root_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
HansKristian-Work[P]pyroveil/layer-util/path_utils.cpp
bool is_root_path(const std::string &path) { if (path.empty()) return false; if (path.front() == '/' && path.size() == 1) return true; #ifdef _WIN32 { auto index = std::min(path.find(":/"), path.find(":\\")); if (index != std::string::npos && (index + 2) == path.size()) return true; } #endif auto index = path.find("://"); return index != std::string::npos && (index + 3) == path.size(); }
O2
cpp
Path::is_root_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x8(%rdi), %rax testq %rax, %rax je 0x1256bd movq %rdi, %rbx cmpq $0x1, %rax jne 0x125695 movq (%rbx), %rax movb $0x1, %r14b cmpb $0x2f, (%rax) je 0x1256c0 leaq 0x251aec(%rip), %rsi # 0x377188 xorl %r14d, %r14d movq %rbx, %rdi xorl %edx, %edx callq 0xa5fa0 cmpq $-0x1, %rax je 0x1256c0 addq $0x3, %rax cmpq 0x8(%rbx), %rax sete %r14b jmp 0x1256c0 xorl %r14d, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
_ZN4Path12is_root_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp push r14 push rbx mov rax, [rdi+8] test rax, rax jz short loc_1256BD mov rbx, rdi cmp rax, 1 jnz short loc_125695 mov rax, [rbx] mov r14b, 1 cmp byte ptr [rax], 2Fh ; '/' jz short loc_1256C0 loc_125695: lea rsi, aFile+4; "://" xor r14d, r14d mov rdi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_1256C0 add rax, 3 cmp rax, [rbx+8] setz r14b jmp short loc_1256C0 loc_1256BD: xor r14d, r14d loc_1256C0: mov eax, r14d pop rbx pop r14 pop rbp retn
long long Path::is_root_path(long long a1) { unsigned int v1; // r14d long long v2; // rax long long v3; // rax v2 = *(_QWORD *)(a1 + 8); if ( v2 ) { if ( v2 != 1 || (LOBYTE(v1) = 1, **(_BYTE **)a1 != 47) ) { v1 = 0; v3 = std::string::find(a1, "://", 0LL); if ( v3 != -1 ) LOBYTE(v1) = v3 + 3 == *(_QWORD *)(a1 + 8); } } else { return 0; } return v1; }
8,273
Path::is_root_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
HansKristian-Work[P]pyroveil/layer-util/path_utils.cpp
bool is_root_path(const std::string &path) { if (path.empty()) return false; if (path.front() == '/' && path.size() == 1) return true; #ifdef _WIN32 { auto index = std::min(path.find(":/"), path.find(":\\")); if (index != std::string::npos && (index + 2) == path.size()) return true; } #endif auto index = path.find("://"); return index != std::string::npos && (index + 3) == path.size(); }
O3
cpp
Path::is_root_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x8(%rdi), %rax testq %rax, %rax je 0x11902a movq %rdi, %rbx cmpq $0x1, %rax jne 0x118ffd movq (%rbx), %rax movb $0x1, %r14b cmpb $0x2f, (%rax) je 0x11902d leaq 0x2c3f64(%rip), %rsi # 0x3dcf68 xorl %r14d, %r14d movl $0x3, %ecx movq %rbx, %rdi xorl %edx, %edx callq 0x7f870 cmpq $-0x1, %rax je 0x11902d addq $0x3, %rax cmpq 0x8(%rbx), %rax sete %r14b jmp 0x11902d xorl %r14d, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
_ZN4Path12is_root_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp push r14 push rbx mov rax, [rdi+8] test rax, rax jz short loc_11902A mov rbx, rdi cmp rax, 1 jnz short loc_118FFD mov rax, [rbx] mov r14b, 1 cmp byte ptr [rax], 2Fh ; '/' jz short loc_11902D loc_118FFD: lea rsi, aFile+4; "://" xor r14d, r14d mov ecx, 3 mov rdi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_11902D add rax, 3 cmp rax, [rbx+8] setz r14b jmp short loc_11902D loc_11902A: xor r14d, r14d loc_11902D: mov eax, r14d pop rbx pop r14 pop rbp retn
long long Path::is_root_path(long long a1) { unsigned int v1; // r14d long long v2; // rax long long v3; // rax v2 = *(_QWORD *)(a1 + 8); if ( v2 ) { if ( v2 != 1 || (LOBYTE(v1) = 1, **(_BYTE **)a1 != 47) ) { v1 = 0; v3 = std::string::find(a1, "://", 0LL); if ( v3 != -1 ) LOBYTE(v1) = v3 + 3 == *(_QWORD *)(a1 + 8); } } else { return 0; } return v1; }
8,274
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x2891e(%rip), %rsi # 0xb126a leaq 0x7(%rsp), %rdx callq 0x27d88 movl %ebx, %eax shrl $0x4, %eax leaq 0x2dbdb(%rip), %rcx # 0xb653d movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, [rsp+18h+var_11] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes( _QWORD *a1, unsigned int a2) { std::string::basic_string<std::allocator<char>>(a1, (long long)"FF"); *(_BYTE *)*a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RSI,[0x1b126a] LEA RDX,[RSP + 0x7] CALL 0x00127d88 MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1b653d] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::hex_bytes(unsigned char) */ serializer<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>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<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>> ::hex_bytes(serializer<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,uchar param_1) { int7 in_register_00000031; allocator local_11; std::__cxx11::string::string<std::allocator<char>>((string *)this,"FF",&local_11); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
8,275
JS_NewUint8Array
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewUint8Array(JSContext *ctx, uint8_t *buf, size_t len, JSFreeArrayBufferDataFunc *free_func, void *opaque, JS_BOOL is_shared) { JSClassID class_id = is_shared ? JS_CLASS_SHARED_ARRAY_BUFFER : JS_CLASS_ARRAY_BUFFER; JSValue buffer = js_array_buffer_constructor3(ctx, JS_UNDEFINED, len, NULL, class_id, buf, free_func, opaque, FALSE); return js_new_uint8array(ctx, buffer); }
O1
c
JS_NewUint8Array: pushq %rbx movq %r8, %rax movq %rcx, %r10 movq %rdx, %rcx movq %rsi, %r11 movq %rdi, %rbx cmpl $0x1, %r9d movl $0x14, %r9d sbbl $0x0, %r9d movl $0x3, %edx xorl %esi, %esi xorl %r8d, %r8d pushq $0x0 pushq %rax pushq %r10 pushq %r11 callq 0x38c19 addq $0x20, %rsp movq %rbx, %rdi movq %rax, %rsi popq %rbx jmp 0x39811
JS_NewUint8Array: push rbx mov rax, r8 mov r10, rcx mov rcx, rdx mov r11, rsi mov rbx, rdi cmp r9d, 1 mov r9d, 14h sbb r9d, 0 mov edx, 3 xor esi, esi xor r8d, r8d push 0 push rax push r10 push r11 call js_array_buffer_constructor3 add rsp, 20h mov rdi, rbx mov rsi, rax pop rbx jmp short $+2
long long JS_NewUint8Array( long long a1, long long a2, unsigned long long a3, long long ( *a4)(), long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v14; // rax v14 = js_array_buffer_constructor3( a1, 0LL, 3LL, a3, 0LL, 20 - (unsigned int)(a6 == 0), a7, a8, a9, a10, a11, a12, a13, a14, a2, a4, a5, 0); return js_new_uint8array(a1, v14); }
8,276
JS_NewUint8Array
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewUint8Array(JSContext *ctx, uint8_t *buf, size_t len, JSFreeArrayBufferDataFunc *free_func, void *opaque, JS_BOOL is_shared) { JSClassID class_id = is_shared ? JS_CLASS_SHARED_ARRAY_BUFFER : JS_CLASS_ARRAY_BUFFER; JSValue buffer = js_array_buffer_constructor3(ctx, JS_UNDEFINED, len, NULL, class_id, buf, free_func, opaque, FALSE); return js_new_uint8array(ctx, buffer); }
O2
c
JS_NewUint8Array: pushq %rbx subq $0x20, %rsp movq %rdx, %rax movq %rdi, %rbx cmpl $0x1, %r9d pushq $0x14 popq %r9 sbbl $0x0, %r9d movq %r8, 0x10(%rsp) movq %rcx, 0x8(%rsp) andl $0x0, 0x18(%rsp) movq %rsi, (%rsp) pushq $0x3 popq %rdx xorl %esi, %esi movq %rax, %rcx xorl %r8d, %r8d callq 0x31db1 movq %rbx, %rdi movq %rax, %rsi addq $0x20, %rsp popq %rbx jmp 0x32969
JS_NewUint8Array: push rbx sub rsp, 20h mov rax, rdx mov rbx, rdi cmp r9d, 1 push 14h pop r9 sbb r9d, 0 mov [rsp+28h+var_18], r8 mov [rsp+28h+var_20], rcx and [rsp+28h+var_10], 0 mov [rsp+28h+var_28], rsi push 3 pop rdx xor esi, esi mov rcx, rax xor r8d, r8d call js_array_buffer_constructor3 mov rdi, rbx mov rsi, rax add rsp, 20h pop rbx jmp short $+2
long long JS_NewUint8Array( long long a1, long long a2, unsigned long long a3, long long ( *a4)(), long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v14; // rax v14 = js_array_buffer_constructor3( a1, 0LL, 3LL, a3, 0LL, 20 - (unsigned int)(a6 == 0), a7, a8, a9, a10, a11, a12, a13, a14, a2, a4, a5, 0); return js_new_uint8array(a1, v14); }
JS_NewUint8Array: PUSH RBX SUB RSP,0x20 MOV RAX,RDX MOV RBX,RDI CMP R9D,0x1 PUSH 0x14 POP R9 SBB R9D,0x0 MOV qword ptr [RSP + 0x10],R8 MOV qword ptr [RSP + 0x8],RCX AND dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP],RSI PUSH 0x3 POP RDX XOR ESI,ESI MOV RCX,RAX XOR R8D,R8D CALL 0x00131db1 MOV RDI,RBX MOV RSI,RAX ADD RSP,0x20 POP RBX JMP 0x00132969
void JS_NewUint8Array(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int param_6) { int8 uVar1; uVar1 = js_array_buffer_constructor3 (param_1,0,3,param_3,0,0x14 - (uint)(param_6 == 0),param_2,param_4,param_5,0); js_new_uint8array(param_1,uVar1); return; }
8,277
exec_REDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT
eloqsql/storage/maria/ma_recovery.c
prototype_redo_exec_hook(UNDO_KEY_DELETE_WITH_ROOT) { MARIA_HA *info= get_MARIA_HA_from_UNDO_record(rec); MARIA_SHARE *share; set_undo_lsn_for_active_trans(rec->short_trid, rec->lsn); if (info == NULL) return 0; share= info->s; if (cmp_translog_addr(rec->lsn, share->state.is_of_horizon) >= 0) { uint key_nr; my_off_t page; key_nr= key_nr_korr(rec->header + LSN_STORE_SIZE + FILEID_STORE_SIZE); page= page_korr(rec->header + LSN_STORE_SIZE + FILEID_STORE_SIZE + KEY_NR_STORE_SIZE); share->state.key_root[key_nr]= (page == IMPOSSIBLE_PAGE_NO ? HA_OFFSET_ERROR : page * share->block_size); } _ma_unpin_all_pages(info, rec->lsn); return 0; }
O3
c
exec_REDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x5596f movzwl 0x10(%rbx), %ecx movq 0xbd3d7c(%rip), %rdx # 0xc27c40 movl %ecx, %edi shll $0x5, %edi cmpq $0x0, 0x18(%rdx,%rdi) je 0x53ef0 movq (%rbx), %rsi addq %rdx, %rdi movq %rsi, 0x8(%rdi) shll $0x5, %ecx cmpq $0x0, 0x10(%rdx,%rcx) jne 0x53ef0 addq %rdx, %rcx addq $0x10, %rcx movq %rsi, (%rcx) testq %rax, %rax je 0x53f4f movq (%rax), %rcx movq (%rbx), %rsi cmpq 0x180(%rcx), %rsi jl 0x53f47 movzbl 0x21(%rbx), %edx movl 0x22(%rbx), %edi movzbl 0x26(%rbx), %esi shlq $0x20, %rsi orq %rdi, %rsi movq $-0x1, %rdi movabsq $0xffffffffff, %r8 # imm = 0xFFFFFFFFFF cmpq %r8, %rsi je 0x53f39 movl 0x7bc(%rcx), %edi imulq %rdi, %rsi movq %rsi, %rdi movq 0x118(%rcx), %rcx movq %rdi, (%rcx,%rdx,8) movq (%rbx), %rsi movq %rax, %rdi callq 0x604f8 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
exec_REDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call get_MARIA_HA_from_UNDO_record movzx ecx, word ptr [rbx+10h] mov rdx, cs:all_active_trans mov edi, ecx shl edi, 5 cmp qword ptr [rdx+rdi+18h], 0 jz short loc_53EF0 mov rsi, [rbx] add rdi, rdx mov [rdi+8], rsi shl ecx, 5 cmp qword ptr [rdx+rcx+10h], 0 jnz short loc_53EF0 add rcx, rdx add rcx, 10h mov [rcx], rsi loc_53EF0: test rax, rax jz short loc_53F4F mov rcx, [rax] mov rsi, [rbx] cmp rsi, [rcx+180h] jl short loc_53F47 movzx edx, byte ptr [rbx+21h] mov edi, [rbx+22h] movzx esi, byte ptr [rbx+26h] shl rsi, 20h or rsi, rdi mov rdi, 0FFFFFFFFFFFFFFFFh mov r8, 0FFFFFFFFFFh cmp rsi, r8 jz short loc_53F39 mov edi, [rcx+7BCh] imul rsi, rdi mov rdi, rsi loc_53F39: mov rcx, [rcx+118h] mov [rcx+rdx*8], rdi mov rsi, [rbx] loc_53F47: mov rdi, rax call _ma_unpin_all_pages loc_53F4F: xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long exec_REDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT(long long *a1) { long long MARIA_HA_from_UNDO_record; // rax int v3; // ecx long long v4; // rdx long long v5; // rdi long long v6; // rsi long long v7; // rcx long long v8; // rcx long long v9; // rsi unsigned long long v10; // rsi long long v11; // rdi MARIA_HA_from_UNDO_record = get_MARIA_HA_from_UNDO_record(a1); v3 = *((unsigned __int16 *)a1 + 8); v4 = all_active_trans; v5 = (unsigned int)(32 * v3); if ( *(_QWORD *)(all_active_trans + v5 + 24) ) { v6 = *a1; *(_QWORD *)(all_active_trans + v5 + 8) = *a1; v7 = (unsigned int)(32 * v3); if ( !*(_QWORD *)(v4 + v7 + 16) ) *(_QWORD *)(v4 + v7 + 16) = v6; } if ( MARIA_HA_from_UNDO_record ) { v8 = *(_QWORD *)MARIA_HA_from_UNDO_record; v9 = *a1; if ( *a1 >= *(_QWORD *)(*(_QWORD *)MARIA_HA_from_UNDO_record + 384LL) ) { v10 = *(unsigned int *)((char *)a1 + 34) | ((unsigned long long)*((unsigned __int8 *)a1 + 38) << 32); v11 = -1LL; if ( v10 != 0xFFFFFFFFFFLL ) v11 = *(unsigned int *)(v8 + 1980) * v10; *(_QWORD *)(*(_QWORD *)(v8 + 280) + 8LL * *((unsigned __int8 *)a1 + 33)) = v11; v9 = *a1; } ma_unpin_all_pages(MARIA_HA_from_UNDO_record, v9); } return 0LL; }
exec_REDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0015596f MOVZX ECX,word ptr [RBX + 0x10] MOV RDX,qword ptr [0x00d27c40] MOV EDI,ECX SHL EDI,0x5 CMP qword ptr [RDX + RDI*0x1 + 0x18],0x0 JZ 0x00153ef0 MOV RSI,qword ptr [RBX] ADD RDI,RDX MOV qword ptr [RDI + 0x8],RSI SHL ECX,0x5 CMP qword ptr [RDX + RCX*0x1 + 0x10],0x0 JNZ 0x00153ef0 ADD RCX,RDX ADD RCX,0x10 MOV qword ptr [RCX],RSI LAB_00153ef0: TEST RAX,RAX JZ 0x00153f4f MOV RCX,qword ptr [RAX] MOV RSI,qword ptr [RBX] CMP RSI,qword ptr [RCX + 0x180] JL 0x00153f47 MOVZX EDX,byte ptr [RBX + 0x21] MOV EDI,dword ptr [RBX + 0x22] MOVZX ESI,byte ptr [RBX + 0x26] SHL RSI,0x20 OR RSI,RDI MOV RDI,-0x1 MOV R8,0xffffffffff CMP RSI,R8 JZ 0x00153f39 MOV EDI,dword ptr [RCX + 0x7bc] IMUL RSI,RDI MOV RDI,RSI LAB_00153f39: MOV RCX,qword ptr [RCX + 0x118] MOV qword ptr [RCX + RDX*0x8],RDI MOV RSI,qword ptr [RBX] LAB_00153f47: MOV RDI,RAX CALL 0x001604f8 LAB_00153f4f: XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 exec_REDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT(long *param_1) { ushort uVar1; long lVar2; long lVar3; long *plVar4; long lVar5; plVar4 = (long *)get_MARIA_HA_from_UNDO_record(); lVar3 = all_active_trans; uVar1 = *(ushort *)(param_1 + 2); lVar5 = (ulong)uVar1 * 0x20; if (*(long *)(all_active_trans + 0x18 + lVar5) != 0) { lVar2 = *param_1; *(long *)(lVar5 + all_active_trans + 8) = lVar2; lVar5 = (ulong)uVar1 * 0x20; if (*(long *)(lVar3 + 0x10 + lVar5) == 0) { *(long *)(lVar5 + lVar3 + 0x10) = lVar2; } } if (plVar4 != (long *)0x0) { lVar3 = *plVar4; lVar5 = *param_1; if (*(long *)(lVar3 + 0x180) <= lVar5) { lVar5 = -1; if ((ulong)*(uint5 *)((long)param_1 + 0x22) != 0xffffffffff) { lVar5 = (ulong)*(uint5 *)((long)param_1 + 0x22) * (ulong)*(uint *)(lVar3 + 0x7bc); } *(long *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)((long)param_1 + 0x21) * 8) = lVar5; lVar5 = *param_1; } _ma_unpin_all_pages(plVar4,lVar5); } return 0; }
8,278
bool 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>::contains<char const (&) [6], 0>(char const (&) [6]) const
hkr04[P]cpp-mcp/common/json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O3
cpp
bool 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>::contains<char const (&) [6], 0>(char const (&) [6]) const: cmpb $0x1, (%rdi) jne 0x15017 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x8(%rdi), %r12 movq (%r12), %rbx cmpq 0x8(%r12), %rbx je 0x1501a movq %rsi, %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x8120 testl %eax, %eax je 0x1500a addq $0x30, %rbx cmpq 0x8(%r12), %rbx jne 0x14ff0 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx jmp 0x1501d xorl %eax, %eax retq movq %rbx, %rax cmpq %rbx, %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_15017 push r15 push r14 push r12 push rbx push rax mov r14, rdi mov r12, [rdi+8] mov rbx, [r12] cmp rbx, [r12+8] jz short loc_1501A mov r15, rsi loc_14FF0: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_1500A add rbx, 30h ; '0' cmp rbx, [r12+8] jnz short loc_14FF0 loc_1500A: mov rax, rbx mov rcx, [r14+8] mov rbx, [rcx+8] jmp short loc_1501D loc_15017: xor eax, eax retn loc_1501A: mov rax, rbx loc_1501D: cmp rax, rbx setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; if ( *v2 == v2[1] ) { v4 = *v2; } else { do { if ( !(unsigned int)std::string::compare(v3, a2) ) break; v3 += 48LL; } while ( v3 != v2[1] ); v4 = v3; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } return v4 != v3; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x00115017 PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV R12,qword ptr [RDI + 0x8] MOV RBX,qword ptr [R12] CMP RBX,qword ptr [R12 + 0x8] JZ 0x0011501a MOV R15,RSI LAB_00114ff0: MOV RDI,RBX MOV RSI,R15 CALL 0x00108120 TEST EAX,EAX JZ 0x0011500a ADD RBX,0x30 CMP RBX,qword ptr [R12 + 0x8] JNZ 0x00114ff0 LAB_0011500a: MOV RAX,RBX MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] JMP 0x0011501d LAB_00115017: XOR EAX,EAX RET LAB_0011501a: MOV RAX,RBX LAB_0011501d: CMP RAX,RBX SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)*plVar1; pcVar4 = pcVar3; if (pcVar3 != (char *)plVar1[1]) { do { iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar3 = pcVar3 + 0x30; } while (pcVar3 != (char *)plVar1[1]); pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4); }
8,279
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)::Impl::~Impl()
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/renderer.cpp
Component Renderer(std::function<Element()> render) { class Impl : public ComponentBase { public: explicit Impl(std::function<Element()> render) : render_(std::move(render)) {} Element Render() override { return render_(); } std::function<Element()> render_; }; return Make<Impl>(std::move(render)); }
O2
cpp
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)::Impl::~Impl(): pushq %rbx movq %rdi, %rbx callq 0x268ba pushq $0x48 popq %rsi movq %rbx, %rdi popq %rbx jmp 0xc480 nop
_ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEEEN4ImplD0Ev: push rbx mov rbx, rdi call _ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEEEN4ImplD2Ev; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl() push 48h ; 'H' pop rsi; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl( ftxui::ComponentBase *a1) { ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl(a1); operator delete(a1, 0x48uLL); }
~Impl: PUSH RBX MOV RBX,RDI CALL 0x001268ba PUSH 0x48 POP RSI MOV RDI,RBX POP RBX JMP 0x0010c480
/* ~Impl() */ void __thiscall ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node>()>)::Impl::~Impl(Impl *this) { ~Impl(this); operator_delete(this,0x48); return; }
8,280
minja::Value::to_str[abi:cxx11]() const
monkey531[P]llama/common/minja.hpp
std::string to_str() const { if (is_string()) return get<std::string>(); if (is_number_integer()) return std::to_string(get<int64_t>()); if (is_number_float()) return std::to_string(get<double>()); if (is_boolean()) return get<bool>() ? "True" : "False"; if (is_null()) return "None"; return dump(); }
O3
cpp
minja::Value::to_str[abi:cxx11]() const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movzbl 0x40(%rsi), %eax cmpl $0x3, %eax jne 0x96da1 movq %rbx, %rdi callq 0x875f0 jmp 0x96f0a leal -0x5(%rax), %ecx cmpb $0x1, %cl ja 0x96e28 movq %rsi, %rdi callq 0x8650c movq %rax, %r15 movq %rax, %r14 negq %r14 cmovsq %rax, %r14 movl $0x1, %r12d cmpq $0xa, %r14 jb 0x96edd movl $0x4, %r12d movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B movq %r14, %rcx cmpq $0x63, %rcx jbe 0x96ed4 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x96eda cmpq $0x2710, %rcx # imm = 0x2710 jb 0x96edd movq %rcx, %rax mulq %rsi shrq $0xb, %rdx addl $0x4, %r12d cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x96de1 addl $-0x3, %r12d jmp 0x96edd cmpl $0x4, %eax je 0x96e5c cmpl $0x7, %eax jne 0x96e8b movq %rsi, %rdi callq 0x86656 movq 0x950ff(%rip), %rsi # 0x12bf40 leaq 0x59c44(%rip), %rcx # 0xf0a8c movl $0x148, %edx # imm = 0x148 movq %rbx, %rdi movb $0x1, %al callq 0x97c57 jmp 0x96f0a movq %rsi, %rdi callq 0x874e0 leaq 0x58fd1(%rip), %rcx # 0xefe3c leaq 0x58fcf(%rip), %rsi # 0xefe41 testb %al, %al cmovneq %rcx, %rsi leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movzbl %al, %edx xorq $0x5, %rdx addq %rsi, %rdx jmp 0x96eb9 testl %eax, %eax jne 0x96ec3 cmpq $0x0, 0x20(%rsi) jne 0x96ec3 cmpq $0x0, 0x10(%rsi) jne 0x96ec3 cmpq $0x0, 0x30(%rsi) jne 0x96ec3 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x593aa(%rip), %rsi # 0xf025c leaq 0x593a7(%rip), %rdx # 0xf0260 movq %rbx, %rdi callq 0x222de jmp 0x96f0a movq %rbx, %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x867a2 jmp 0x96f0a addl $-0x2, %r12d jmp 0x96edd decl %r12d shrq $0x3f, %r15 leal (%r15,%r12), %esi leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi movl $0x2d, %edx callq 0x1aa60 addq (%rbx), %r15 movq %r15, %rdi movl %r12d, %esi movq %r14, %rdx callq 0x5d987 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK5minja5Value6to_strB5cxx11Ev: push r15 push r14 push r12 push rbx push rax mov rbx, rdi movzx eax, byte ptr [rsi+40h] cmp eax, 3 jnz short loc_96DA1 mov rdi, rbx call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) jmp loc_96F0A loc_96DA1: lea ecx, [rax-5] cmp cl, 1 ja short loc_96E28 mov rdi, rsi call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov r14, rax neg r14 cmovs r14, rax mov r12d, 1 cmp r14, 0Ah jb loc_96EDD mov r12d, 4 mov rsi, 346DC5D63886594Bh mov rcx, r14 loc_96DE1: cmp rcx, 63h ; 'c' jbe loc_96ED4 cmp rcx, 3E7h jbe loc_96EDA cmp rcx, 2710h jb loc_96EDD mov rax, rcx mul rsi shr rdx, 0Bh add r12d, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_96DE1 add r12d, 0FFFFFFFDh jmp loc_96EDD loc_96E28: cmp eax, 4 jz short loc_96E5C cmp eax, 7 jnz short loc_96E8B mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) mov rsi, cs:vsnprintf_ptr lea rcx, asc_F0A8C; "%f" mov edx, 148h mov rdi, rbx mov al, 1 call _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z; __gnu_cxx::__to_xstring<std::string,char>(int (*)(char *,ulong,char const*,__va_list_tag *),ulong,char const*,...) jmp loc_96F0A loc_96E5C: mov rdi, rsi call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse; "False" test al, al cmovnz rsi, rcx lea rcx, [rbx+10h] mov [rbx], rcx movzx edx, al xor rdx, 5 add rdx, rsi jmp short loc_96EB9 loc_96E8B: test eax, eax jnz short loc_96EC3 cmp qword ptr [rsi+20h], 0 jnz short loc_96EC3 cmp qword ptr [rsi+10h], 0 jnz short loc_96EC3 cmp qword ptr [rsi+30h], 0 jnz short loc_96EC3 lea rax, [rbx+10h] mov [rbx], rax lea rsi, aNone_0; "None" lea rdx, aNone_0+4; "" loc_96EB9: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp short loc_96F0A loc_96EC3: mov rdi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short loc_96F0A loc_96ED4: add r12d, 0FFFFFFFEh jmp short loc_96EDD loc_96EDA: dec r12d loc_96EDD: shr r15, 3Fh lea esi, [r15+r12] lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r15, [rbx] mov rdi, r15 mov esi, r12d mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) loc_96F0A: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
_QWORD * minja::Value::to_str[abi:cxx11](_QWORD *a1, long long a2) { char v2; // al int v3; // eax long long v4; // rax unsigned long long v5; // rcx unsigned long long v6; // r14 int v7; // r12d bool v8; // cc int v9; // r8d int v10; // r9d unsigned __int8 v11; // al char *v12; // rsi char *v13; // rdx unsigned long long v14; // r15 char v16; // [rsp-8h] [rbp-28h] v16 = v2; v3 = *(unsigned __int8 *)(a2 + 64); if ( v3 == 3 ) { minja::Value::get<std::string>((long long)a1, (_QWORD *)a2); } else { if ( (unsigned __int8)(v3 - 5) > 1u ) { if ( v3 == 4 ) { v11 = minja::Value::get<bool>((_QWORD *)a2); v12 = "False"; if ( v11 ) v12 = "True"; *a1 = a1 + 2; v13 = &v12[v11 ^ 5LL]; } else { if ( v3 == 7 ) { minja::Value::get<double>(a2); __gnu_cxx::__to_xstring<std::string,char>( (_DWORD)a1, (unsigned int)&vsnprintf, 328, (unsigned int)"%f", v9, v10, v16); return a1; } if ( *(_BYTE *)(a2 + 64) || *(_QWORD *)(a2 + 32) || *(_QWORD *)(a2 + 16) || *(_QWORD *)(a2 + 48) ) { minja::Value::dump[abi:cxx11]((long long)a1, a2, 0xFFFFFFFF, 0); return a1; } *a1 = a1 + 2; v12 = "None"; v13 = ""; } std::string::_M_construct<char const*>((long long)a1, v12, (long long)v13); return a1; } v4 = minja::Value::get<long>(a2); v6 = -v4; if ( v4 > 0 ) v6 = v4; v7 = 1; if ( v6 >= 0xA ) { v7 = 4; v5 = v6; while ( 1 ) { if ( v5 <= 0x63 ) { v7 -= 2; goto LABEL_28; } if ( v5 <= 0x3E7 ) break; if ( v5 < 0x2710 ) goto LABEL_28; v7 += 4; v8 = v5 <= 0x1869F; v5 /= 0x2710uLL; if ( v8 ) { v7 -= 3; goto LABEL_28; } } --v7; } LABEL_28: v14 = (unsigned long long)v4 >> 63; *a1 = a1 + 2; std::string::_M_construct(a1, (unsigned int)((unsigned long long)v4 >> 63) + v7, 45LL, v5); std::__detail::__to_chars_10_impl<unsigned long>((char *)(*a1 + v14), v7, v6); } return a1; }
to_str[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOVZX EAX,byte ptr [RSI + 0x40] CMP EAX,0x3 JNZ 0x00196da1 MOV RDI,RBX CALL 0x001875f0 JMP 0x00196f0a LAB_00196da1: LEA ECX,[RAX + -0x5] CMP CL,0x1 JA 0x00196e28 MOV RDI,RSI CALL 0x0018650c MOV R15,RAX MOV R14,RAX NEG R14 CMOVS R14,RAX MOV R12D,0x1 CMP R14,0xa JC 0x00196edd MOV R12D,0x4 MOV RSI,0x346dc5d63886594b MOV RCX,R14 LAB_00196de1: CMP RCX,0x63 JBE 0x00196ed4 CMP RCX,0x3e7 JBE 0x00196eda CMP RCX,0x2710 JC 0x00196edd MOV RAX,RCX MUL RSI SHR RDX,0xb ADD R12D,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x00196de1 ADD R12D,-0x3 JMP 0x00196edd LAB_00196e28: CMP EAX,0x4 JZ 0x00196e5c CMP EAX,0x7 JNZ 0x00196e8b MOV RDI,RSI CALL 0x00186656 MOV RSI,qword ptr [0x0022bf40] LEA RCX,[0x1f0a8c] MOV EDX,0x148 MOV RDI,RBX MOV AL,0x1 CALL 0x00197c57 JMP 0x00196f0a LAB_00196e5c: MOV RDI,RSI CALL 0x001874e0 LEA RCX,[0x1efe3c] LEA RSI,[0x1efe41] TEST AL,AL CMOVNZ RSI,RCX LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOVZX EDX,AL XOR RDX,0x5 ADD RDX,RSI JMP 0x00196eb9 LAB_00196e8b: TEST EAX,EAX JNZ 0x00196ec3 CMP qword ptr [RSI + 0x20],0x0 JNZ 0x00196ec3 CMP qword ptr [RSI + 0x10],0x0 JNZ 0x00196ec3 CMP qword ptr [RSI + 0x30],0x0 JNZ 0x00196ec3 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f025c] LEA RDX,[0x1f0260] LAB_00196eb9: MOV RDI,RBX CALL 0x001222de JMP 0x00196f0a LAB_00196ec3: MOV RDI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001867a2 JMP 0x00196f0a LAB_00196ed4: ADD R12D,-0x2 JMP 0x00196edd LAB_00196eda: DEC R12D LAB_00196edd: SHR R15,0x3f LEA ESI,[R15 + R12*0x1] LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RDI,RBX MOV EDX,0x2d CALL 0x0011aa60 ADD R15,qword ptr [RBX] MOV RDI,R15 MOV ESI,R12D MOV RDX,R14 CALL 0x0015d987 LAB_00196f0a: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Value::to_str[abi:cxx11]() const */ void minja::Value::to_str_abi_cxx11_(void) { Value VVar1; bool bVar2; uint uVar3; ulong uVar4; ulong uVar5; Value *in_RSI; _func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr *in_RDI; uint uVar6; ulong uVar7; VVar1 = in_RSI[0x40]; if (VVar1 == (Value)0x3) { get<std::__cxx11::string>(); } else if ((byte)((char)VVar1 - 5U) < 2) { uVar4 = get<long>(in_RSI); uVar7 = -uVar4; if (0 < (long)uVar4) { uVar7 = uVar4; } uVar6 = 1; if (9 < uVar7) { uVar5 = uVar7; uVar3 = 4; do { uVar6 = uVar3; if (uVar5 < 100) { uVar6 = uVar6 - 2; goto LAB_00196edd; } if (uVar5 < 1000) { uVar6 = uVar6 - 1; goto LAB_00196edd; } if (uVar5 < 10000) goto LAB_00196edd; bVar2 = 99999 < uVar5; uVar5 = uVar5 / 10000; uVar3 = uVar6 + 4; } while (bVar2); uVar6 = uVar6 + 1; } LAB_00196edd: *(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10; std::__cxx11::string::_M_construct((ulong)in_RDI,(char)uVar6 - (char)((long)uVar4 >> 0x3f)); std::__detail::__to_chars_10_impl<unsigned_long> ((char *)(*(long *)in_RDI - ((long)uVar4 >> 0x3f)),uVar6,uVar7); } else { if (VVar1 == (Value)0x4) { get<bool>(in_RSI); *(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10; } else { if (VVar1 == (Value)0x7) { get<double>(in_RSI); __gnu_cxx::__to_xstring<std::__cxx11::string,char> (in_RDI,(ulong)PTR_vsnprintf_0022bf40,(char *)0x148,&DAT_001f0a8c); return; } if ((((VVar1 != (Value)0x0) || (*(long *)(in_RSI + 0x20) != 0)) || (*(long *)(in_RSI + 0x10) != 0)) || (*(long *)(in_RSI + 0x30) != 0)) { dump_abi_cxx11_((int)in_RDI,SUB81(in_RSI,0)); return; } *(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10; } std::__cxx11::string::_M_construct<char_const*>(); } return; }
8,281
my_mb_wc_sjis
eloqsql/strings/ctype-sjis.c
static int my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= sjis_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]])) return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O0
c
my_mb_wc_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x9642a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x96588 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x96452 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x96588 cmpl $0xa1, -0x2c(%rbp) jl 0x96488 cmpl $0xdf, -0x2c(%rbp) jg 0x96488 movslq -0x2c(%rbp), %rcx leaq 0x247cc1(%rip), %rax # 0x2de130 movzwl (%rax,%rcx,2), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x96588 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x964a2 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x96588 movl -0x2c(%rbp), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x247c74(%rip), %rax # 0x2de130 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x96581 movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x964ed movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0x9f, %eax jle 0x96514 movl -0x2c(%rbp), %eax movzbl %al, %edx xorl %eax, %eax movl $0xe0, %ecx cmpl %edx, %ecx movb %al, -0x2d(%rbp) jg 0x9656c movl -0x2c(%rbp), %eax movzbl %al, %ecx xorl %eax, %eax cmpl $0xfc, %ecx movb %al, -0x2d(%rbp) jg 0x9656c movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0x96537 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0x7e, %ecx movb %al, -0x2e(%rbp) jle 0x96566 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %edx xorl %eax, %eax movl $0x80, %ecx cmpl %edx, %ecx movb %al, -0x2f(%rbp) jg 0x96560 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfc, %eax setle %al movb %al, -0x2f(%rbp) movb -0x2f(%rbp), %al movb %al, -0x2e(%rbp) movb -0x2e(%rbp), %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %dl xorl %eax, %eax movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x96588 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_mb_wc_sjis: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_9642A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_96588 loc_9642A: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_96452 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_96588 loc_96452: cmp [rbp+var_2C], 0A1h jl short loc_96488 cmp [rbp+var_2C], 0DFh jg short loc_96488 movsxd rcx, [rbp+var_2C] lea rax, sjis_to_unicode movzx eax, word ptr [rax+rcx*2] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_96588 loc_96488: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_964A2 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_96588 loc_964A2: mov eax, [rbp+var_2C] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax lea rax, sjis_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz loc_96581 mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_964ED mov eax, [rbp+var_2C] movzx eax, al cmp eax, 9Fh jle short loc_96514 loc_964ED: mov eax, [rbp+var_2C] movzx edx, al xor eax, eax mov ecx, 0E0h cmp ecx, edx mov [rbp+var_2D], al jg short loc_9656C mov eax, [rbp+var_2C] movzx ecx, al xor eax, eax cmp ecx, 0FCh mov [rbp+var_2D], al jg short loc_9656C loc_96514: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_96537 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 7Eh ; '~' mov [rbp+var_2E], al jle short loc_96566 loc_96537: mov rax, [rbp+var_20] movzx edx, byte ptr [rax+1] xor eax, eax mov ecx, 80h cmp ecx, edx mov [rbp+var_2F], al jg short loc_96560 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FCh setle al mov [rbp+var_2F], al loc_96560: mov al, [rbp+var_2F] mov [rbp+var_2E], al loc_96566: mov al, [rbp+var_2E] mov [rbp+var_2D], al loc_9656C: mov dl, [rbp+var_2D] xor eax, eax mov ecx, 0FFFFFFFEh test dl, 1 cmovnz eax, ecx mov [rbp+var_4], eax jmp short loc_96588 loc_96581: mov [rbp+var_4], 2 loc_96588: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long v4; // rax unsigned int v5; // eax bool v7; // [rsp+1h] [rbp-2Fh] char v8; // [rsp+2h] [rbp-2Eh] char v9; // [rsp+3h] [rbp-2Dh] unsigned int v10; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v10 = *a3; if ( v10 >= 0x80 ) { if ( *a3 < 0xA1u || *a3 > 0xDFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { v4 = sjis_to_unicode[a3[1] + (v10 << 8)]; *a2 = v4; if ( v4 ) { return 2; } else { if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu || (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) ) { if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) ) { v7 = 0; if ( a3[1] >= 0x80u ) v7 = a3[1] <= 0xFCu; v8 = v7; } v9 = v8; } v5 = 0; if ( (v9 & 1) != 0 ) return (unsigned int)-2; return v5; } } else { return (unsigned int)-102; } } else { *a2 = sjis_to_unicode[*a3]; return 1; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_sjis: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0019642a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00196588 LAB_0019642a: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x00196452 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00196588 LAB_00196452: CMP dword ptr [RBP + -0x2c],0xa1 JL 0x00196488 CMP dword ptr [RBP + -0x2c],0xdf JG 0x00196488 MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x3de130] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00196588 LAB_00196488: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001964a2 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00196588 LAB_001964a2: MOV EAX,dword ptr [RBP + -0x2c] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x3de130] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x00196581 MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x001964ed MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0x9f JLE 0x00196514 LAB_001964ed: MOV EAX,dword ptr [RBP + -0x2c] MOVZX EDX,AL XOR EAX,EAX MOV ECX,0xe0 CMP ECX,EDX MOV byte ptr [RBP + -0x2d],AL JG 0x0019656c MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL XOR EAX,EAX CMP ECX,0xfc MOV byte ptr [RBP + -0x2d],AL JG 0x0019656c LAB_00196514: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x00196537 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0x7e MOV byte ptr [RBP + -0x2e],AL JLE 0x00196566 LAB_00196537: MOV RAX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RAX + 0x1] XOR EAX,EAX MOV ECX,0x80 CMP ECX,EDX MOV byte ptr [RBP + -0x2f],AL JG 0x00196560 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfc SETLE AL MOV byte ptr [RBP + -0x2f],AL LAB_00196560: MOV AL,byte ptr [RBP + -0x2f] MOV byte ptr [RBP + -0x2e],AL LAB_00196566: MOV AL,byte ptr [RBP + -0x2e] MOV byte ptr [RBP + -0x2d],AL LAB_0019656c: MOV DL,byte ptr [RBP + -0x2d] XOR EAX,EAX MOV ECX,0xfffffffe TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00196588 LAB_00196581: MOV dword ptr [RBP + -0x4],0x2 LAB_00196588: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { ushort uVar1; bool bVar2; uint uVar3; int4 local_c; if (param_3 < param_4) { uVar3 = (uint)*param_3; if (uVar3 < 0x80) { *param_2 = (long)(int)uVar3; local_c = 1; } else if ((uVar3 < 0xa1) || (0xdf < uVar3)) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { uVar1 = *(ushort *)(sjis_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { if ((((0x80 < uVar3) && (uVar3 < 0xa0)) || ((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) && (((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) && (bVar2 = false, 0x7f < param_3[1])))) { bVar2 = param_3[1] < 0xfd; } local_c = 0; if (bVar2) { local_c = 0xfffffffe; } } else { local_c = 2; } } } else { *param_2 = (ulong)*(ushort *)(sjis_to_unicode + (long)(int)uVar3 * 2); local_c = 1; } } else { local_c = 0xffffff9b; } return local_c; }
8,282
ftxui::(anonymous namespace)::Split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/input.cpp
std::vector<std::string> Split(const std::string& input) { std::vector<std::string> output; std::stringstream ss(input); std::string line; while (std::getline(ss, line)) { output.push_back(line); } if (input.back() == '\n') { output.emplace_back(""); } return output; }
O3
cpp
ftxui::(anonymous namespace)::Split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b0, %rsp # imm = 0x1B0 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) leaq 0x28(%rsp), %r15 movq %r15, %rdi movl $0x18, %edx callq 0xb6c0 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) leaq 0x8(%rsp), %r12 movq 0x28(%rsp), %rax movq -0x18(%rax), %rdi addq %r15, %rdi movl $0xa, %esi callq 0xb3c0 movsbl %al, %edx movq %r15, %rdi movq %r12, %rsi callq 0xb7e0 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x2b541 movq %rbx, %rdi movq %r12, %rsi callq 0x2c19e jmp 0x2b502 movq (%r14), %rax movq 0x8(%r14), %rcx cmpb $0xa, -0x1(%rax,%rcx) jne 0x2b55e leaq 0x116bb(%rip), %rsi # 0x3cc11 movq %rbx, %rdi callq 0x2c1dc movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2b575 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq 0x2d9f4(%rip), %rsi # 0x58f70 leaq 0x28(%rsp), %rdi callq 0xb2e0 leaq 0xa8(%rsp), %rdi callq 0xb120 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x2b5ab movq %rax, %r14 jmp 0x2b5e3 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2b5c5 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq 0x2d9a4(%rip), %rsi # 0x58f70 leaq 0x28(%rsp), %rdi callq 0xb2e0 leaq 0xa8(%rsp), %rdi callq 0xb120 movq %rbx, %rdi callq 0x1043c movq %r14, %rdi callq 0xb780 nop
_ZN5ftxui12_GLOBAL__N_15SplitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 1B0h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 lea r15, [rsp+1D8h+var_1B0] mov rdi, r15 mov edx, 18h call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(std::string const&,std::_Ios_Openmode) lea r13, [rsp+1D8h+var_1C0] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 lea r12, [rsp+1D8h+var_1D0] loc_2B502: mov rax, [rsp+1D8h+var_1B0] mov rdi, [rax-18h] add rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx edx, al mov rdi, r15 mov rsi, r12 call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_2B541 mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short loc_2B502 loc_2B541: mov rax, [r14] mov rcx, [r14+8] cmp byte ptr [rax+rcx-1], 0Ah jnz short loc_2B55E lea rsi, asc_3CC0F+2; "" mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRA1_KcEEERS5_DpOT_; std::vector<std::string>::emplace_back<char const(&)[1]>(char const(&)[1] &&) loc_2B55E: mov rdi, [rsp+1D8h+var_1D0]; void * cmp rdi, r13 jz short loc_2B575 mov rsi, [rsp+1D8h+var_1C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2B575: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 1B0h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_2B5AB mov r14, rax jmp short loc_2B5E3 loc_2B5AB: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_2B5C5 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2B5C5: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_20] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_A0]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_2B5E3: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
void ftxui::`anonymous namespace'::Split(long long a1, _QWORD *a2) { char v2; // al _QWORD *v3; // rax void *v4[2]; // [rsp+8h] [rbp-1D0h] BYREF _QWORD v5[2]; // [rsp+18h] [rbp-1C0h] BYREF _QWORD v6[16]; // [rsp+28h] [rbp-1B0h] BYREF _BYTE v7[304]; // [rsp+A8h] [rbp-130h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v6, a2, 24LL); v4[0] = v5; v4[1] = 0LL; LOBYTE(v5[0]) = 0; while ( 1 ) { v2 = std::ios::widen((char *)v6 + *(_QWORD *)(v6[0] - 24LL), 10LL); v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v6, v4, (unsigned int)v2); if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 ) break; std::vector<std::string>::push_back(a1, v4); } if ( *(_BYTE *)(*a2 + a2[1] - 1LL) == 10 ) std::vector<std::string>::emplace_back<char const(&)[1]>(a1, ""); if ( v4[0] != v5 ) operator delete(v4[0], v5[0] + 1LL); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v6, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v7); }
Split: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b0 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 LAB_0012b4d5: LEA R15,[RSP + 0x28] MOV RDI,R15 MOV EDX,0x18 CALL 0x0010b6c0 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 LEA R12,[RSP + 0x8] LAB_0012b502: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,R15 LAB_0012b50e: MOV ESI,0xa CALL 0x0010b3c0 MOVSX EDX,AL MOV RDI,R15 MOV RSI,R12 CALL 0x0010b7e0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0012b541 MOV RDI,RBX MOV RSI,R12 CALL 0x0012c19e JMP 0x0012b502 LAB_0012b541: MOV RAX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] CMP byte ptr [RAX + RCX*0x1 + -0x1],0xa JNZ 0x0012b55e LAB_0012b54f: LEA RSI,[0x13cc11] MOV RDI,RBX CALL 0x0012c1dc LAB_0012b55e: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0012b575 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010b400 LAB_0012b575: MOV RSI,qword ptr [0x00158f70] LEA RDI,[RSP + 0x28] CALL 0x0010b2e0 LEA RDI,[RSP + 0xa8] CALL 0x0010b120 ADD RSP,0x1b0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ftxui::(anonymous namespace)::Split(std::__cxx11::string const&) */ void __thiscall ftxui::(anonymous_namespace)::Split(_anonymous_namespace_ *this,string *param_1) { char cVar1; istream *piVar2; int1 *local_1d0; int8 local_1c8; int1 local_1c0; int7 uStack_1bf; long local_1b0 [16]; ios_base local_130 [264]; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; /* try { // try from 0012b4d5 to 0012b4e6 has its CatchHandler @ 0012b5a6 */ std::__cxx11::stringstream::stringstream((stringstream *)local_1b0,param_1,0x18); local_1c8 = 0; local_1c0 = 0; local_1d0 = &local_1c0; while( true ) { /* try { // try from 0012b50e to 0012b53e has its CatchHandler @ 0012b5ab */ cVar1 = std::ios::widen((char)*(int8 *)(local_1b0[0] + -0x18) + (char)(istream *)local_1b0 ); piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_1b0,(string *)&local_1d0,cVar1); if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, (string *)&local_1d0); } if (*(char *)(*(long *)param_1 + -1 + *(long *)(param_1 + 8)) == '\n') { /* try { // try from 0012b54f to 0012b55d has its CatchHandler @ 0012b5a4 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<char_const(&)[1]> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,""); } if (local_1d0 != &local_1c0) { operator_delete(local_1d0,CONCAT71(uStack_1bf,local_1c0) + 1); } std::__cxx11::stringstream::~stringstream((stringstream *)local_1b0); std::ios_base::~ios_base(local_130); return; }
8,283
void google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::EnumDescriptor, google::protobuf::EnumDescriptorProto>(google::protobuf::EnumDescriptor const&, google::protobuf::EnumDescriptorProto&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
void Generator::PrintSerializedPbInterval(const DescriptorT& descriptor, DescriptorProtoT& proto, const std::string& name) const { descriptor.CopyTo(&proto); std::string sp; proto.SerializeToString(&sp); int offset = file_descriptor_serialized_.find(sp); GOOGLE_CHECK_GE(offset, 0); printer_->Print( "$name$._serialized_start=$serialized_start$\n" "$name$._serialized_end=$serialized_end$\n", "name", name, "serialized_start", StrCat(offset), "serialized_end", StrCat(offset + sp.size())); }
O0
cpp
void google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::EnumDescriptor, google::protobuf::EnumDescriptorProto>(google::protobuf::EnumDescriptor const&, google::protobuf::EnumDescriptorProto&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: subq $0x178, %rsp # imm = 0x178 movq %rdi, 0x170(%rsp) movq %rsi, 0x168(%rsp) movq %rdx, 0x160(%rsp) movq %rcx, 0x158(%rsp) movq 0x170(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x168(%rsp), %rdi movq 0x160(%rsp), %rsi callq 0x24f1c0 leaq 0x138(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x21390 movq 0x40(%rsp), %rsi movq 0x160(%rsp), %rdi callq 0x1f4590 jmp 0xc089f movq 0x38(%rsp), %rdi addq $0x38, %rdi leaq 0x138(%rsp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x216f0 movl %eax, 0x128(%rsp) movl 0x128(%rsp), %eax movb $0x0, 0xef(%rsp) cmpl $0x0, %eax jl 0xc08d6 jmp 0xc092f leaq 0x2f575e(%rip), %rdx # 0x3b603b leaq 0xf0(%rsp), %rdi movl $0x3, %esi movl $0x48b, %ecx # imm = 0x48B callq 0x219560 jmp 0xc08f6 movb $0x1, 0xef(%rsp) leaq 0x2f6744(%rip), %rsi # 0x3b7049 leaq 0xf0(%rsp), %rdi callq 0x218e20 movq %rax, 0x30(%rsp) jmp 0xc0919 movq 0x30(%rsp), %rsi leaq 0xee(%rsp), %rdi callq 0x218fd0 jmp 0xc092d jmp 0xc092f testb $0x1, 0xef(%rsp) jne 0xc093b jmp 0xc0948 leaq 0xf0(%rsp), %rdi callq 0x2195a0 movq 0x38(%rsp), %rax movq 0x58(%rax), %rax movq %rax, 0x20(%rsp) movq 0x158(%rsp), %rax movq %rax, 0x28(%rsp) movl 0x128(%rsp), %esi leaq 0x98(%rsp), %rdi callq 0x4d6f0 jmp 0xc0979 leaq 0xc8(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x587b0 jmp 0xc0990 movslq 0x128(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x138(%rsp), %rdi callq 0x21300 movq 0x18(%rsp), %rsi addq %rax, %rsi leaq 0x48(%rsp), %rdi callq 0x5ad00 jmp 0xc09be leaq 0x78(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x587b0 jmp 0xc09cf movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rdi movq %rsp, %rax leaq 0x78(%rsp), %rdx movq %rdx, 0x8(%rax) leaq 0x2f66e3(%rip), %rdx # 0x3b70cf movq %rdx, (%rax) leaq 0x2f6673(%rip), %rsi # 0x3b7069 leaq 0x2f51c0(%rip), %rdx # 0x3b5bbd leaq 0x2f66ba(%rip), %r8 # 0x3b70be leaq 0xc8(%rsp), %r9 callq 0xc11a0 jmp 0xc0a13 leaq 0x78(%rsp), %rdi callq 0x21cc8 leaq 0xc8(%rsp), %rdi callq 0x21cc8 leaq 0x138(%rsp), %rdi callq 0x21cc8 addq $0x178, %rsp # imm = 0x178 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) jmp 0xc0ac5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) testb $0x1, 0xef(%rsp) jne 0xc0a75 jmp 0xc0a82 leaq 0xf0(%rsp), %rdi callq 0x2195a0 jmp 0xc0ac5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) jmp 0xc0ab8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) leaq 0x78(%rsp), %rdi callq 0x21cc8 leaq 0xc8(%rsp), %rdi callq 0x21cc8 leaq 0x138(%rsp), %rdi callq 0x21cc8 movq 0x130(%rsp), %rdi callq 0x21700 nop
_ZNK6google8protobuf8compiler6python9Generator25PrintSerializedPbIntervalINS0_10DescriptorENS0_15DescriptorProtoEEEvRKT_RT0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 178h mov [rsp+178h+var_8], rdi mov [rsp+178h+var_10], rsi mov [rsp+178h+var_18], rdx mov [rsp+178h+var_20], rcx mov rax, [rsp+178h+var_8] mov [rsp+178h+var_140], rax mov rdi, [rsp+178h+var_10]; this mov rsi, [rsp+178h+var_18]; google::protobuf::DescriptorProto * call _ZNK6google8protobuf10Descriptor6CopyToEPNS0_15DescriptorProtoE; google::protobuf::Descriptor::CopyTo(google::protobuf::DescriptorProto *) lea rdi, [rsp+178h+var_40] mov [rsp+178h+var_138], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rsi, [rsp+178h+var_138] mov rdi, [rsp+178h+var_18] call _ZNK6google8protobuf11MessageLite17SerializeToStringEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::MessageLite::SerializeToString(std::string *) jmp short $+2 loc_C089F: mov rdi, [rsp+178h+var_140] add rdi, 38h ; '8' lea rsi, [rsp+178h+var_40] xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong) mov [rsp+178h+var_50], eax mov eax, [rsp+178h+var_50] mov [rsp+178h+var_89], 0 cmp eax, 0 jl short loc_C08D6 jmp short loc_C092F loc_C08D6: lea rdx, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+178h+var_88] mov esi, 3 mov ecx, 48Bh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) jmp short $+2 loc_C08F6: mov [rsp+178h+var_89], 1 lea rsi, aCheckFailedOff; "CHECK failed: (offset) >= (0): " lea rdi, [rsp+178h+var_88] call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+178h+var_148], rax jmp short $+2 loc_C0919: mov rsi, [rsp+178h+var_148] lea rdi, [rsp+178h+var_8A] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_C092D: jmp short $+2 loc_C092F: test [rsp+178h+var_89], 1 jnz short loc_C093B jmp short loc_C0948 loc_C093B: lea rdi, [rsp+178h+var_88]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_C0948: mov rax, [rsp+178h+var_140] mov rax, [rax+58h] mov [rsp+178h+var_158], rax mov rax, [rsp+178h+var_20] mov [rsp+178h+var_150], rax mov esi, [rsp+178h+var_50]; int lea rdi, [rsp+178h+var_E0]; this call _ZN6google8protobuf7strings8AlphaNumC2Ei; google::protobuf::strings::AlphaNum::AlphaNum(int) jmp short $+2 loc_C0979: lea rdi, [rsp+178h+var_B0] lea rsi, [rsp+178h+var_E0] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumE; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&) jmp short $+2 loc_C0990: movsxd rax, [rsp+178h+var_50] mov [rsp+178h+var_160], rax lea rdi, [rsp+178h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rsi, [rsp+178h+var_160] add rsi, rax; unsigned __int64 lea rdi, [rsp+178h+var_130]; this call _ZN6google8protobuf7strings8AlphaNumC2Em; google::protobuf::strings::AlphaNum::AlphaNum(ulong) jmp short $+2 loc_C09BE: lea rdi, [rsp+178h+var_100] lea rsi, [rsp+178h+var_130] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumE; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&) jmp short $+2 loc_C09CF: mov rcx, [rsp+178h+var_150] mov rdi, [rsp+178h+var_158] mov rax, rsp lea rdx, [rsp+178h+var_100] mov [rax+8], rdx lea rdx, aSerializedEnd; "serialized_end" mov [rax], rdx lea rsi, aNameSerialized; "$name$._serialized_start=$serialized_st"... lea rdx, aGoogleProtobuf_24+34h; "name" lea r8, aSerializedStar; "serialized_start" lea r9, [rsp+178h+var_B0] call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA17_cSA_A15_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string,char [17],std::string,char [15],std::string>(char const*,char [5],std::string,char [17],std::string,char [15],std::string const&) jmp short $+2 loc_C0A13: lea rdi, [rsp+178h+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+178h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+178h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 178h retn mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax jmp short loc_C0AC5 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax test [rsp+arg_E7], 1 jnz short loc_C0A75 jmp short loc_C0A82 loc_C0A75: lea rdi, [rsp+arg_E8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_C0A82: jmp short loc_C0AC5 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax jmp short loc_C0AB8 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C0AB8: lea rdi, [rsp+arg_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C0AC5: lea rdi, [rsp+arg_130]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_128] call __Unwind_Resume
void google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::Descriptor,google::protobuf::DescriptorProto>( long long a1, google::protobuf::Descriptor *a2, google::protobuf::DescriptorProto *a3, long long a4) { char *v4; // rdx long long v5; // rax char *v6; // rdx long long v7; // [rsp+18h] [rbp-160h] long long v8; // [rsp+20h] [rbp-158h] int v9; // [rsp+28h] [rbp-150h] long long v10; // [rsp+30h] [rbp-148h] _BYTE v11[48]; // [rsp+48h] [rbp-130h] BYREF _BYTE v12[32]; // [rsp+78h] [rbp-100h] BYREF _BYTE v13[48]; // [rsp+98h] [rbp-E0h] BYREF _BYTE v14[38]; // [rsp+C8h] [rbp-B0h] BYREF char v15; // [rsp+EEh] [rbp-8Ah] BYREF char v16; // [rsp+EFh] [rbp-89h] _BYTE v17[56]; // [rsp+F0h] [rbp-88h] BYREF int v18; // [rsp+128h] [rbp-50h] _BYTE v19[32]; // [rsp+138h] [rbp-40h] BYREF long long v20; // [rsp+158h] [rbp-20h] google::protobuf::DescriptorProto *v21; // [rsp+160h] [rbp-18h] google::protobuf::Descriptor *v22; // [rsp+168h] [rbp-10h] long long v23; // [rsp+170h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; google::protobuf::Descriptor::CopyTo(a2, a3); std::string::basic_string(v19); google::protobuf::MessageLite::SerializeToString(v21, v19); v18 = std::string::find(a1 + 56, v19, 0LL); v16 = 0; if ( v18 < 0 ) { google::protobuf::internal::LogMessage::LogMessage( v17, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc", 1163LL); v16 = 1; v10 = google::protobuf::internal::LogMessage::operator<<(v17, "CHECK failed: (offset) >= (0): "); google::protobuf::internal::LogFinisher::operator=(&v15, v10); } if ( (v16 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v17); v8 = *(_QWORD *)(a1 + 88); v9 = v20; google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v13, v18, v4); google::protobuf::StrCat[abi:cxx11]((long long)v14, (google::protobuf::strings::AlphaNum *)v13); v7 = v18; v5 = std::string::size(v19); google::protobuf::strings::AlphaNum::AlphaNum( (google::protobuf::strings::AlphaNum *)v11, (google::protobuf *)(v5 + v7), v6); google::protobuf::StrCat[abi:cxx11]((long long)v12, (google::protobuf::strings::AlphaNum *)v11); google::protobuf::io::Printer::Print<char [5],std::string,char [17],std::string,char [15],std::string>( v8, (unsigned int)"$name$._serialized_start=$serialized_start$\n$name$._serialized_end=$serialized_end$\n", (unsigned int)"name", v9, (unsigned int)"serialized_start", (unsigned int)v14, (long long)"serialized_end", (long long)v12); std::string::~string(v12); std::string::~string(v14); std::string::~string(v19); }
PrintSerializedPbInterval<google::protobuf::Descriptor,google::protobuf::DescriptorProto>: SUB RSP,0x178 MOV qword ptr [RSP + 0x170],RDI MOV qword ptr [RSP + 0x168],RSI MOV qword ptr [RSP + 0x160],RDX MOV qword ptr [RSP + 0x158],RCX MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x168] MOV RSI,qword ptr [RSP + 0x160] CALL 0x0034f1c0 LEA RDI,[RSP + 0x138] MOV qword ptr [RSP + 0x40],RDI CALL 0x00121390 MOV RSI,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RSP + 0x160] LAB_001c0898: CALL 0x002f4590 JMP 0x001c089f LAB_001c089f: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x38 LEA RSI,[RSP + 0x138] XOR EAX,EAX MOV EDX,EAX CALL 0x001216f0 MOV dword ptr [RSP + 0x128],EAX MOV EAX,dword ptr [RSP + 0x128] MOV byte ptr [RSP + 0xef],0x0 CMP EAX,0x0 JL 0x001c08d6 JMP 0x001c092f LAB_001c08d6: LEA RDX,[0x4b603b] LEA RDI,[RSP + 0xf0] MOV ESI,0x3 MOV ECX,0x48b CALL 0x00319560 JMP 0x001c08f6 LAB_001c08f6: MOV byte ptr [RSP + 0xef],0x1 LAB_001c08fe: LEA RSI,[0x4b7049] LEA RDI,[RSP + 0xf0] CALL 0x00318e20 MOV qword ptr [RSP + 0x30],RAX JMP 0x001c0919 LAB_001c0919: MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0xee] CALL 0x00318fd0 JMP 0x001c092d LAB_001c092d: JMP 0x001c092f LAB_001c092f: TEST byte ptr [RSP + 0xef],0x1 JNZ 0x001c093b JMP 0x001c0948 LAB_001c093b: LEA RDI,[RSP + 0xf0] CALL 0x003195a0 LAB_001c0948: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x158] MOV qword ptr [RSP + 0x28],RAX MOV ESI,dword ptr [RSP + 0x128] LAB_001c096a: LEA RDI,[RSP + 0x98] CALL 0x0014d6f0 JMP 0x001c0979 LAB_001c0979: LEA RDI,[RSP + 0xc8] LEA RSI,[RSP + 0x98] CALL 0x001587b0 JMP 0x001c0990 LAB_001c0990: MOVSXD RAX,dword ptr [RSP + 0x128] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x138] CALL 0x00121300 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,RAX LAB_001c09b2: LEA RDI,[RSP + 0x48] CALL 0x0015ad00 JMP 0x001c09be LAB_001c09be: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x48] CALL 0x001587b0 JMP 0x001c09cf LAB_001c09cf: MOV RCX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP + 0x20] MOV RAX,RSP LEA RDX,[RSP + 0x78] MOV qword ptr [RAX + 0x8],RDX LEA RDX,[0x4b70cf] MOV qword ptr [RAX],RDX LEA RSI,[0x4b7069] LEA RDX,[0x4b5bbd] LEA R8,[0x4b70be] LEA R9,[RSP + 0xc8] CALL 0x001c11a0 LAB_001c0a11: JMP 0x001c0a13 LAB_001c0a13: LEA RDI,[RSP + 0x78] CALL 0x00121cc8 LEA RDI,[RSP + 0xc8] CALL 0x00121cc8 LEA RDI,[RSP + 0x138] CALL 0x00121cc8 ADD RSP,0x178 RET
/* void google::protobuf::compiler::python::Generator::PrintSerializedPbInterval<google::protobuf::Descriptor, google::protobuf::DescriptorProto>(google::protobuf::Descriptor const&, google::protobuf::DescriptorProto&, std::__cxx11::string const&) const */ void __thiscall google::protobuf::compiler::python::Generator:: PrintSerializedPbInterval<google::protobuf::Descriptor,google::protobuf::DescriptorProto> (Generator *this,Descriptor *param_1,DescriptorProto *param_2,string *param_3) { Printer *this_00; string *psVar1; LogMessage *pLVar2; long lVar3; long lVar4; AlphaNum local_130 [48]; protobuf local_100 [32]; AlphaNum local_e0 [48]; protobuf local_b0 [38]; LogFinisher local_8a; byte local_89; LogMessage local_88 [56]; int local_50; string local_40 [32]; string *local_20; DescriptorProto *local_18; Descriptor *local_10; Generator *local_8; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; Descriptor::CopyTo(param_1,param_2); std::__cxx11::string::string(local_40); /* try { // try from 001c0898 to 001c08f3 has its CatchHandler @ 001c0a3f */ MessageLite::SerializeToString((MessageLite *)local_18,local_40); local_50 = std::__cxx11::string::find((string *)(this + 0x38),(ulong)local_40); local_89 = 0; if (local_50 < 0) { internal::LogMessage::LogMessage (local_88,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc" ,0x48b); local_89 = 1; /* try { // try from 001c08fe to 001c092a has its CatchHandler @ 001c0a55 */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_88,"CHECK failed: (offset) >= (0): "); internal::LogFinisher::operator=(&local_8a,pLVar2); } if ((local_89 & 1) != 0) { internal::LogMessage::~LogMessage(local_88); } psVar1 = local_20; this_00 = *(Printer **)(this + 0x58); /* try { // try from 001c096a to 001c098d has its CatchHandler @ 001c0a3f */ strings::AlphaNum::AlphaNum(local_e0,local_50); StrCat_abi_cxx11_(local_b0,local_e0); lVar3 = (long)local_50; lVar4 = std::__cxx11::string::size(); /* try { // try from 001c09b2 to 001c09cc has its CatchHandler @ 001c0a84 */ strings::AlphaNum::AlphaNum(local_130,lVar3 + lVar4); StrCat_abi_cxx11_(local_100,local_130); /* try { // try from 001c09cf to 001c0a10 has its CatchHandler @ 001c0a9a */ io::Printer:: Print<char[5],std::__cxx11::string,char[17],std::__cxx11::string,char[15],std::__cxx11::string> (this_00, "$name$._serialized_start=$serialized_start$\n$name$._serialized_end=$serialized_end$\n" ,"name",psVar1,"serialized_start",(string *)local_b0,"serialized_end", (string *)local_100); std::__cxx11::string::~string((string *)local_100); std::__cxx11::string::~string((string *)local_b0); std::__cxx11::string::~string(local_40); return; }
8,284
ftxui::GlyphPrevious(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/string.cpp
size_t GlyphPrevious(const std::string& input, size_t start) { while (true) { if (start == 0) { return 0; } start--; // Skip the UTF8 continuation bytes. if ((input[start] & 0b1100'0000) == 0b1000'0000) { continue; } uint32_t codepoint = 0; size_t end = 0; const bool eaten = EatCodePoint(input, start, &end, &codepoint); // Ignore invalid, control characters and combining characters. if (!eaten || IsControl(codepoint) || IsCombining(codepoint)) { continue; } return start; } }
O3
cpp
ftxui::GlyphPrevious(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %r13 decq %rbx leaq 0x8(%rsp), %r15 leaq 0x4(%rsp), %r12 cmpq $-0x1, %rbx je 0x3aba9 movb (%r13,%rbx), %al andb $-0x40, %al negb %al jo 0x3aba4 movl $0x0, 0x4(%rsp) movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x3a5b4 testb %al, %al je 0x3aba4 movl 0x4(%rsp), %edi testl %edi, %edi je 0x3aba4 cmpl $0x1f, %edi ja 0x3ab93 cmpl $0xa, %edi je 0x3ab9b jmp 0x3aba4 leal -0x7f(%rdi), %eax cmpl $0x21, %eax jb 0x3aba4 callq 0x3a6d0 testb %al, %al je 0x3abab decq %rbx jmp 0x3ab51 xorl %ebx, %ebx movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi mov r13, [rdi] dec rbx lea r15, [rsp+38h+var_34+4] lea r12, [rsp+38h+var_34] loc_3AB51: cmp rbx, 0FFFFFFFFFFFFFFFFh jz short loc_3ABA9 mov al, [r13+rbx+0] and al, 0C0h neg al jo short loc_3ABA4 mov dword ptr [rsp+38h+var_34], 0 mov rdi, r14 mov rsi, rbx; unsigned int mov rdx, r15 mov rcx, r12 call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj; ftxui::EatCodePoint(std::string const&,ulong,ulong *,uint *) test al, al jz short loc_3ABA4 mov edi, dword ptr [rsp+38h+var_34]; this test edi, edi jz short loc_3ABA4 cmp edi, 1Fh ja short loc_3AB93 cmp edi, 0Ah jz short loc_3AB9B jmp short loc_3ABA4 loc_3AB93: lea eax, [rdi-7Fh] cmp eax, 21h ; '!' jb short loc_3ABA4 loc_3AB9B: call _ZN5ftxui11IsCombiningEj; ftxui::IsCombining(uint) test al, al jz short loc_3ABAB loc_3ABA4: dec rbx jmp short loc_3AB51 loc_3ABA9: xor ebx, ebx loc_3ABAB: mov rax, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
unsigned long long ftxui::GlyphPrevious(long long *a1, long long a2) { long long v2; // r13 unsigned long long i; // rbx unsigned int v5[13]; // [rsp+4h] [rbp-34h] BYREF v2 = *a1; for ( i = a2 - 1; i != -1LL; --i ) { if ( !__OFSUB__(-(*(_BYTE *)(v2 + i) & 0xC0), 1) ) { v5[0] = 0; if ( ftxui::EatCodePoint(a1, i, &v5[1], (int *)v5) ) { if ( v5[0] ) { if ( v5[0] > 0x1F ) { if ( v5[0] - 127 < 0x21 ) continue; } else if ( v5[0] != 10 ) { continue; } if ( !ftxui::IsCombining((ftxui *)v5[0]) ) return i; } } } } return 0LL; }
GlyphPrevious: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI MOV R13,qword ptr [RDI] DEC RBX LEA R15,[RSP + 0x8] LEA R12,[RSP + 0x4] LAB_0013ab51: CMP RBX,-0x1 JZ 0x0013aba9 MOV AL,byte ptr [R13 + RBX*0x1] AND AL,0xc0 NEG AL JO 0x0013aba4 MOV dword ptr [RSP + 0x4],0x0 MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL 0x0013a5b4 TEST AL,AL JZ 0x0013aba4 MOV EDI,dword ptr [RSP + 0x4] TEST EDI,EDI JZ 0x0013aba4 CMP EDI,0x1f JA 0x0013ab93 CMP EDI,0xa JZ 0x0013ab9b JMP 0x0013aba4 LAB_0013ab93: LEA EAX,[RDI + -0x7f] CMP EAX,0x21 JC 0x0013aba4 LAB_0013ab9b: CALL 0x0013a6d0 TEST AL,AL JZ 0x0013abab LAB_0013aba4: DEC RBX JMP 0x0013ab51 LAB_0013aba9: XOR EBX,EBX LAB_0013abab: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ftxui::GlyphPrevious(std::__cxx11::string const&, unsigned long) */ ulong ftxui::GlyphPrevious(string *param_1,ulong param_2) { char cVar1; ulong uVar2; uint local_34; ulong local_30; uVar2 = param_2 - 1; do { if (uVar2 == 0xffffffffffffffff) { return 0; } local_34 = 0; cVar1 = EatCodePoint(param_1,uVar2,&local_30,&local_34); if ((cVar1 != '\0') && (local_34 != 0)) { if (local_34 < 0x20) { if (local_34 == 10) { LAB_0013ab9b: cVar1 = IsCombining(local_34); if (cVar1 == '\0') { return uVar2; } } } else if (0x20 < local_34 - 0x7f) goto LAB_0013ab9b; } uVar2 = uVar2 - 1; } while( true ); }
8,285
CLIPTokenizer::get_pairs(std::vector<std::__cxx11::basic_string<char32_t, std::char_traits<char32_t>, std::allocator<char32_t>>, std::allocator<std::__cxx11::basic_string<char32_t, std::char_traits<char32_t>, std::allocator<char32_t>>>> const&)
7CodeWizard[P]stablediffusion/clip.hpp
static std::set<std::pair<std::u32string, std::u32string>> get_pairs(const std::vector<std::u32string>& subwords) { std::set<std::pair<std::u32string, std::u32string>> pairs; if (subwords.size() == 0) { return pairs; } std::u32string prev_subword = subwords[0]; for (int i = 1; i < subwords.size(); i++) { std::u32string subword = subwords[i]; std::pair<std::u32string, std::u32string> pair(prev_subword, subword); pairs.insert(pair); prev_subword = subword; } return pairs; }
O0
cpp
CLIPTokenizer::get_pairs(std::vector<std::__cxx11::basic_string<char32_t, std::char_traits<char32_t>, std::allocator<char32_t>>, std::allocator<std::__cxx11::basic_string<char32_t, std::char_traits<char32_t>, std::allocator<char32_t>>>> const&): subq $0xe8, %rsp movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movb $0x0, 0xd7(%rsp) callq 0x7a3d0 movq 0xd8(%rsp), %rdi callq 0x56f00 cmpq $0x0, %rax jne 0x7961c movb $0x1, 0xd7(%rsp) movl $0x1, 0xd0(%rsp) jmp 0x797cb movq 0xd8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x7a3e0 movq %rax, %rsi leaq 0xb0(%rsp), %rdi callq 0x57e20 jmp 0x7963f movl $0x1, 0xa0(%rsp) movslq 0xa0(%rsp), %rax movq %rax, 0x18(%rsp) movq 0xd8(%rsp), %rdi callq 0x56f00 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jae 0x7979a movq 0xd8(%rsp), %rdi movslq 0xa0(%rsp), %rsi callq 0x7a3e0 movq %rax, %rsi leaq 0x80(%rsp), %rdi callq 0x57e20 jmp 0x7969c leaq 0x40(%rsp), %rdi leaq 0xb0(%rsp), %rsi leaq 0x80(%rsp), %rdx callq 0x7a400 jmp 0x796b8 movq 0x20(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x7a470 movb %dl, 0xf(%rsp) movq %rax, 0x10(%rsp) jmp 0x796d2 movb 0xf(%rsp), %al movq 0x10(%rsp), %rcx movq %rcx, 0x30(%rsp) movb %al, 0x38(%rsp) leaq 0xb0(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x7a4d0 jmp 0x796fb leaq 0x40(%rsp), %rdi callq 0x44b20 leaq 0x80(%rsp), %rdi callq 0x37b20 movl 0xa0(%rsp), %eax addl $0x1, %eax movl %eax, 0xa0(%rsp) jmp 0x7964a movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0x797ec movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0x797bc movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0x7978b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0x40(%rsp), %rdi callq 0x44b20 leaq 0x80(%rsp), %rdi callq 0x37b20 jmp 0x797bc movb $0x1, 0xd7(%rsp) movl $0x1, 0xd0(%rsp) leaq 0xb0(%rsp), %rdi callq 0x37b20 jmp 0x797cb leaq 0xb0(%rsp), %rdi callq 0x37b20 jmp 0x797ec testb $0x1, 0xd7(%rsp) jne 0x797df movq 0x20(%rsp), %rdi callq 0x79e40 movq 0x28(%rsp), %rax addq $0xe8, %rsp retq movq 0x20(%rsp), %rdi callq 0x79e40 movq 0xa8(%rsp), %rdi callq 0xbd30 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN13CLIPTokenizer9get_pairsERKSt6vectorINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESaIS6_EE: sub rsp, 0E8h mov [rsp+0E8h+var_C8], rdi mov rax, rdi mov [rsp+0E8h+var_C0], rax mov [rsp+0E8h+var_8], rdi mov [rsp+0E8h+var_10], rsi mov [rsp+0E8h+var_11], 0 call _ZNSt3setISt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES6_ESt4lessIS7_ESaIS7_EEC2Ev; std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::set(void) mov rdi, [rsp+0E8h+var_10] call _ZNKSt6vectorINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESaIS5_EE4sizeEv; std::vector<std::basic_string<char32_t>>::size(void) cmp rax, 0 jnz short loc_7961C mov [rsp+0E8h+var_11], 1 mov [rsp+0E8h+var_18], 1 jmp loc_797CB loc_7961C: mov rdi, [rsp+0E8h+var_10] xor eax, eax mov esi, eax call _ZNKSt6vectorINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESaIS5_EEixEm; std::vector<std::basic_string<char32_t>>::operator[](ulong) mov rsi, rax lea rdi, [rsp+0E8h+var_38] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEC2ERKS4_; std::basic_string<char32_t>::basic_string(std::basic_string<char32_t> const&) jmp short $+2 loc_7963F: mov [rsp+0E8h+var_48], 1 loc_7964A: movsxd rax, [rsp+0E8h+var_48] mov [rsp+0E8h+var_D0], rax mov rdi, [rsp+0E8h+var_10] call _ZNKSt6vectorINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESaIS5_EE4sizeEv; std::vector<std::basic_string<char32_t>>::size(void) mov rcx, rax mov rax, [rsp+0E8h+var_D0] cmp rax, rcx jnb loc_7979A mov rdi, [rsp+0E8h+var_10] movsxd rsi, [rsp+0E8h+var_48] call _ZNKSt6vectorINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESaIS5_EEixEm; std::vector<std::basic_string<char32_t>>::operator[](ulong) mov rsi, rax lea rdi, [rsp+0E8h+var_68] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEC2ERKS4_; std::basic_string<char32_t>::basic_string(std::basic_string<char32_t> const&) jmp short $+2 loc_7969C: lea rdi, [rsp+0E8h+var_A8] lea rsi, [rsp+0E8h+var_38] lea rdx, [rsp+0E8h+var_68] call _ZNSt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES5_EC2IRS5_S8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_ jmp short $+2 loc_796B8: mov rdi, [rsp+0E8h+var_C8] lea rsi, [rsp+0E8h+var_A8] call _ZNSt3setISt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES6_ESt4lessIS7_ESaIS7_EE6insertERKS7_; std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::insert(std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const&) mov [rsp+0E8h+var_D9], dl mov [rsp+0E8h+var_D8], rax jmp short $+2 loc_796D2: mov al, [rsp+0E8h+var_D9] mov rcx, [rsp+0E8h+var_D8] mov [rsp+0E8h+var_B8], rcx mov [rsp+0E8h+var_B0], al lea rdi, [rsp+0E8h+var_38] lea rsi, [rsp+0E8h+var_68] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSERKS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t> const&) jmp short $+2 loc_796FB: lea rdi, [rsp+0E8h+var_A8] call _ZNSt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES5_ED2Ev; std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>::~pair() lea rdi, [rsp+0E8h+var_68] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() mov eax, [rsp+0E8h+var_48] add eax, 1 mov [rsp+0E8h+var_48], eax jmp loc_7964A mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp loc_797EC mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp short loc_797BC mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp short loc_7978B mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_38] call _ZNSt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES5_ED2Ev; std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>::~pair() loc_7978B: lea rdi, [rsp+arg_78] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_797BC loc_7979A: mov [rsp+0E8h+var_11], 1 mov [rsp+0E8h+var_18], 1 lea rdi, [rsp+0E8h+var_38] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_797CB loc_797BC: lea rdi, [rsp+arg_A8] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_797EC loc_797CB: test [rsp+0E8h+var_11], 1 jnz short loc_797DF mov rdi, [rsp+0E8h+var_C8] call _ZNSt3setISt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES6_ESt4lessIS7_ESaIS7_EED2Ev; std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::~set() loc_797DF: mov rax, [rsp+0E8h+var_C0] add rsp, 0E8h retn loc_797EC: mov rdi, [rsp+arg_18] call _ZNSt3setISt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES6_ESt4lessIS7_ESaIS7_EED2Ev; std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::~set() mov rdi, [rsp+arg_A0] call __Unwind_Resume
long long CLIPTokenizer::get_pairs(long long a1, _QWORD *a2) { long long v2; // rax long long v3; // rax int v4; // ecx int v5; // r8d int v6; // r9d long long v8; // [rsp+0h] [rbp-E8h] int v9; // [rsp+8h] [rbp-E0h] long long v10; // [rsp+10h] [rbp-D8h] unsigned long long v11; // [rsp+18h] [rbp-D0h] _BYTE v12[64]; // [rsp+40h] [rbp-A8h] BYREF _QWORD v13[4]; // [rsp+80h] [rbp-68h] BYREF int i; // [rsp+A0h] [rbp-48h] _QWORD v15[4]; // [rsp+B0h] [rbp-38h] BYREF int v16; // [rsp+D0h] [rbp-18h] char v17; // [rsp+D7h] [rbp-11h] _QWORD *v18; // [rsp+D8h] [rbp-10h] long long v19; // [rsp+E0h] [rbp-8h] v19 = a1; v18 = a2; v17 = 0; std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::set(); if ( std::vector<std::basic_string<char32_t>>::size(a2) ) { v2 = std::vector<std::basic_string<char32_t>>::operator[](v18, 0LL); std::basic_string<char32_t>::basic_string(v15, v2); for ( i = 1; ; ++i ) { v11 = i; if ( v11 >= std::vector<std::basic_string<char32_t>>::size(v18) ) break; v3 = std::vector<std::basic_string<char32_t>>::operator[](v18, i); std::basic_string<char32_t>::basic_string(v13, v3); ZNSt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES5_EC2IRS5_S8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_( (unsigned int)v12, (unsigned int)v15, (unsigned int)v13, v4, v5, v6, v8, v9, v10); v10 = std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::insert(a1, v12); std::basic_string<char32_t>::operator=(v15, v13); std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>::~pair((long long)v12); std::basic_string<char32_t>::~basic_string((long long)v13); } v17 = 1; v16 = 1; std::basic_string<char32_t>::~basic_string((long long)v15); } else { v17 = 1; v16 = 1; } if ( (v17 & 1) == 0 ) std::set<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>::~set(a1); return a1; }
get_pairs: SUB RSP,0xe8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0xe0],RDI MOV qword ptr [RSP + 0xd8],RSI MOV byte ptr [RSP + 0xd7],0x0 CALL 0x0017a3d0 MOV RDI,qword ptr [RSP + 0xd8] CALL 0x00156f00 CMP RAX,0x0 JNZ 0x0017961c MOV byte ptr [RSP + 0xd7],0x1 MOV dword ptr [RSP + 0xd0],0x1 JMP 0x001797cb LAB_0017961c: MOV RDI,qword ptr [RSP + 0xd8] XOR EAX,EAX MOV ESI,EAX CALL 0x0017a3e0 MOV RSI,RAX LAB_00179630: LEA RDI,[RSP + 0xb0] CALL 0x00157e20 JMP 0x0017963f LAB_0017963f: MOV dword ptr [RSP + 0xa0],0x1 LAB_0017964a: MOVSXD RAX,dword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0xd8] CALL 0x00156f00 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] CMP RAX,RCX JNC 0x0017979a MOV RDI,qword ptr [RSP + 0xd8] MOVSXD RSI,dword ptr [RSP + 0xa0] CALL 0x0017a3e0 MOV RSI,RAX LAB_0017968d: LEA RDI,[RSP + 0x80] CALL 0x00157e20 JMP 0x0017969c LAB_0017969c: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0xb0] LEA RDX,[RSP + 0x80] CALL 0x0017a400 JMP 0x001796b8 LAB_001796b8: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x40] CALL 0x0017a470 MOV byte ptr [RSP + 0xf],DL MOV qword ptr [RSP + 0x10],RAX JMP 0x001796d2 LAB_001796d2: MOV AL,byte ptr [RSP + 0xf] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RCX MOV byte ptr [RSP + 0x38],AL LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x80] CALL 0x0017a4d0 LAB_001796f9: JMP 0x001796fb LAB_001796fb: LEA RDI,[RSP + 0x40] CALL 0x00144b20 LEA RDI,[RSP + 0x80] CALL 0x00137b20 MOV EAX,dword ptr [RSP + 0xa0] ADD EAX,0x1 MOV dword ptr [RSP + 0xa0],EAX JMP 0x0017964a LAB_0017979a: MOV byte ptr [RSP + 0xd7],0x1 MOV dword ptr [RSP + 0xd0],0x1 LEA RDI,[RSP + 0xb0] CALL 0x00137b20 JMP 0x001797cb LAB_001797cb: TEST byte ptr [RSP + 0xd7],0x1 JNZ 0x001797df MOV RDI,qword ptr [RSP + 0x20] CALL 0x00179e40 LAB_001797df: MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0xe8 RET
/* CLIPTokenizer::get_pairs(std::vector<std::__cxx11::u32string, std::allocator<std::__cxx11::u32string > > const&) */ CLIPTokenizer * __thiscall CLIPTokenizer::get_pairs(CLIPTokenizer *this,vector *param_1) { long lVar1; u32string *puVar2; ulong uVar3; ulong uVar4; pair<std::__cxx11::u32string,std::__cxx11::u32string> local_a8 [64]; u32string local_68 [32]; int local_48; u32string local_38 [32]; int4 local_18; byte local_11; vector<std::__cxx11::u32string,std::allocator<std::__cxx11::u32string>> *local_10; CLIPTokenizer *local_8; local_11 = 0; local_10 = (vector<std::__cxx11::u32string,std::allocator<std::__cxx11::u32string>> *)param_1; local_8 = this; std:: set<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>,std::less<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>,std::allocator<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>> ::set((set<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>,std::less<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>,std::allocator<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>> *)this); lVar1 = std::vector<std::__cxx11::u32string,std::allocator<std::__cxx11::u32string>>::size (local_10); if (lVar1 == 0) { local_11 = 1; local_18 = 1; } else { puVar2 = (u32string *) std::vector<std::__cxx11::u32string,std::allocator<std::__cxx11::u32string>>:: operator[](local_10,0); /* try { // try from 00179630 to 0017963c has its CatchHandler @ 00179728 */ std::__cxx11::u32string::u32string(local_38,puVar2); local_48 = 1; while( true ) { uVar3 = (ulong)local_48; uVar4 = std::vector<std::__cxx11::u32string,std::allocator<std::__cxx11::u32string>>::size (local_10); if (uVar4 <= uVar3) break; puVar2 = (u32string *) std::vector<std::__cxx11::u32string,std::allocator<std::__cxx11::u32string>>:: operator[](local_10,(long)local_48); /* try { // try from 0017968d to 00179699 has its CatchHandler @ 00179741 */ std::__cxx11::u32string::u32string(local_68,puVar2); /* try { // try from 0017969c to 001796b5 has its CatchHandler @ 00179757 */ _ZNSt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES5_EC2IRS5_S8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_ (local_a8,local_38,local_68); /* try { // try from 001796b8 to 001796f8 has its CatchHandler @ 0017976d */ std:: set<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>,std::less<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>,std::allocator<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>> ::insert((set<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>,std::less<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>,std::allocator<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>> *)this,local_a8); std::__cxx11::u32string::operator=(local_38,local_68); std::pair<std::__cxx11::u32string,std::__cxx11::u32string>::~pair(local_a8); std::__cxx11::u32string::~u32string(local_68); local_48 = local_48 + 1; } local_11 = 1; local_18 = 1; std::__cxx11::u32string::~u32string(local_38); } if ((local_11 & 1) == 0) { std:: set<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>,std::less<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>,std::allocator<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>> ::~set((set<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>,std::less<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>,std::allocator<std::pair<std::__cxx11::u32string,std::__cxx11::u32string>>> *)this); } return this; }
8,286
minja::ElifTemplateToken::~ElifTemplateToken()
monkey531[P]llama/common/minja.hpp
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
O3
cpp
minja::ElifTemplateToken::~ElifTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x83375(%rip), %rax # 0xdfb88 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x5c828 callq 0x32e06 leaq 0x82999(%rip), %rax # 0xdf1c8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x5c844 callq 0x32e06 movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x186e0
_ZN5minja17ElifTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_5C828 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5C828: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_5C844 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5C844: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~ElifTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1dfb88] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0015c828 CALL 0x00132e06 LAB_0015c828: LEA RAX,[0x1df1c8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0015c844 CALL 0x00132e06 LAB_0015c844: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x001186e0
/* minja::ElifTemplateToken::~ElifTemplateToken() */ void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this) { *(int ***)this = &PTR__ElifTemplateToken_001dfb98; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_001df1d8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x40); return; }
8,287
minja::Parser::parseLogicalAnd()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalAnd() { auto left = parseLogicalNot(); if (!left) throw std::runtime_error("Expected left side of 'logical and' expression"); static std::regex and_tok(R"(and\b)"); auto location = get_location(); while (!consumeToken(and_tok).empty()) { auto right = parseLogicalNot(); if (!right) throw std::runtime_error("Expected right side of 'and' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And); } return left; }
O2
cpp
minja::Parser::parseLogicalAnd(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x636e8 cmpq $0x0, (%rbx) je 0x635d5 leaq 0x9cbb0(%rip), %rax # 0x100098 movb (%rax), %al testb %al, %al je 0x63605 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x619f6 leaq 0x28(%rsp), %rbp leaq 0x48(%rsp), %r12 leaq 0xc(%rsp), %r13 movq %rbp, %rdi movq %r14, %rsi leaq 0x9cb5d(%rip), %rdx # 0x100078 pushq $0x1 popq %rcx callq 0x61e1a movq 0x30(%rsp), %r15 movq %rbp, %rdi callq 0x242a8 testq %r15, %r15 je 0x63587 movq %rbp, %rdi movq %r14, %rsi callq 0x636e8 cmpq $0x0, 0x28(%rsp) je 0x635a3 movl $0xe, 0xc(%rsp) movq %r12, %rdi leaq 0x10(%rsp), %rsi movq %rbx, %rdx movq %rbp, %rcx movq %r13, %r8 callq 0x636c0 movq %rbx, %rdi movq %r12, %rsi callq 0x727fe leaq 0x50(%rsp), %rdi callq 0x51272 leaq 0x30(%rsp), %rdi callq 0x51272 jmp 0x6350e leaq 0x18(%rsp), %rdi callq 0x51272 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x51b71(%rip), %rsi # 0xb5126 movq %rax, %rdi callq 0x23330 movq 0x9ba24(%rip), %rsi # 0xfefe8 movq 0x9b97d(%rip), %rdx # 0xfef48 movq %r15, %rdi callq 0x23fb0 jmp 0x63605 pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x51b0a(%rip), %rsi # 0xb50f1 movq %rax, %rdi callq 0x23330 movq 0x9b9f2(%rip), %rsi # 0xfefe8 movq 0x9b94b(%rip), %rdx # 0xfef48 movq %r15, %rdi callq 0x23fb0 leaq 0x9ca8c(%rip), %rdi # 0x100098 callq 0x240b0 testl %eax, %eax je 0x634f2 leaq 0x9ca58(%rip), %rdi # 0x100078 leaq 0x51af9(%rip), %rsi # 0xb5120 pushq $0x10 popq %rdx callq 0x47dc4 leaq -0x1b64c(%rip), %rdi # 0x47fea leaq 0x9ca3b(%rip), %rsi # 0x100078 leaq 0x9c314(%rip), %rdx # 0xff958 callq 0x237c0 leaq 0x9ca48(%rip), %rdi # 0x100098 callq 0x235e0 jmp 0x634f2 movq %rax, %r14 leaq 0x9ca34(%rip), %rdi # 0x100098 callq 0x235d0 jmp 0x636ac jmp 0x6367a movq %rax, %r14 movq %r15, %rdi callq 0x23690 jmp 0x636ac movq %rax, %r14 jmp 0x636ac jmp 0x63690 movq %rax, %r14 movq %r15, %rdi callq 0x23690 jmp 0x63693 jmp 0x6369f movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x51272 jmp 0x636a2 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x51272 addq $0x8, %rbx movq %rbx, %rdi callq 0x51272 movq %r14, %rdi callq 0x24030
_ZN5minja6Parser15parseLogicalAndEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp qword ptr [rbx], 0 jz loc_635D5 lea rax, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok mov al, [rax] test al, al jz loc_63605 loc_634F2: lea rdi, [rsp+88h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rbp, [rsp+88h+var_60] lea r12, [rsp+88h+var_40] lea r13, [rsp+88h+var_7C] loc_6350E: mov rdi, rbp mov rsi, r14 lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov r15, [rsp+88h+var_58] mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15, r15 jz short loc_63587 mov rdi, rbp; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+88h+var_60], 0 jz short loc_635A3 mov [rsp+88h+var_7C], 0Eh mov rdi, r12 lea rsi, [rsp+88h+var_78] mov rdx, rbx mov rcx, rbp mov r8, r13 call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) mov rdi, rbx mov rsi, r12 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+88h+var_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_6350E loc_63587: lea rdi, [rsp+88h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_635A3: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_63605 loc_635D5: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_63605: lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_634F2 lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rsi, aAndB; "and\\b" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_634F2 mov r14, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_636AC jmp short loc_6367A mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_636AC loc_6367A: mov r14, rax jmp short loc_636AC jmp short loc_63690 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_63693 jmp short loc_6369F loc_63690: mov r14, rax loc_63693: lea rdi, [rsp+arg_28] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_636A2 loc_6369F: mov r14, rax loc_636A2: lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_636AC: add rbx, 8 mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, _QWORD *a2) { long long v2; // r15 std::runtime_error *v4; // r15 std::runtime_error *exception; // r15 int v6; // [rsp+Ch] [rbp-7Ch] BYREF _BYTE v7[8]; // [rsp+10h] [rbp-78h] BYREF long long v8; // [rsp+18h] [rbp-70h] BYREF long long v9; // [rsp+28h] [rbp-60h] BYREF _QWORD v10[3]; // [rsp+30h] [rbp-58h] BYREF _BYTE v11[8]; // [rsp+48h] [rbp-40h] BYREF _QWORD v12[7]; // [rsp+50h] [rbp-38h] BYREF minja::Parser::parseLogicalNot(this); if ( !*(_QWORD *)this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], (long long)"and\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]); } minja::Parser::get_location((minja::Parser *)v7, a2); while ( 1 ) { minja::Parser::consumeToken( &v9, (long long)a2, (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u); v2 = v10[0]; std::string::~string(&v9); if ( !v2 ) break; minja::Parser::parseLogicalNot((minja::Parser *)&v9); if ( !v9 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected right side of 'and' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = 14; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( v11, v7, this, &v9, &v6); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v8); return this; }
parseLogicalAnd: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV RBX,RDI CALL 0x001636e8 CMP qword ptr [RBX],0x0 JZ 0x001635d5 LEA RAX,[0x200098] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00163605 LAB_001634f2: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x001619f6 LEA RBP,[RSP + 0x28] LEA R12,[RSP + 0x48] LEA R13,[RSP + 0xc] LAB_0016350e: MOV RDI,RBP MOV RSI,R14 LEA RDX,[0x200078] PUSH 0x1 POP RCX CALL 0x00161e1a MOV R15,qword ptr [RSP + 0x30] MOV RDI,RBP CALL 0x001242a8 TEST R15,R15 JZ 0x00163587 LAB_00163535: MOV RDI,RBP MOV RSI,R14 CALL 0x001636e8 CMP qword ptr [RSP + 0x28],0x0 JZ 0x001635a3 MOV dword ptr [RSP + 0xc],0xe LAB_00163550: MOV RDI,R12 LEA RSI,[RSP + 0x10] MOV RDX,RBX MOV RCX,RBP MOV R8,R13 CALL 0x001636c0 LAB_00163566: MOV RDI,RBX MOV RSI,R12 CALL 0x001727fe LEA RDI,[RSP + 0x50] CALL 0x00151272 LEA RDI,[RSP + 0x30] CALL 0x00151272 JMP 0x0016350e LAB_00163587: LEA RDI,[RSP + 0x18] CALL 0x00151272 MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001635a3: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_001635ae: LEA RSI,[0x1b5126] MOV RDI,RAX CALL 0x00123330 LAB_001635bd: MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R15 CALL 0x00123fb0 LAB_001635d5: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_001635e0: LEA RSI,[0x1b50f1] MOV RDI,RAX CALL 0x00123330 LAB_001635ef: MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R15 CALL 0x00123fb0 LAB_00163605: LEA RDI,[0x200098] CALL 0x001240b0 TEST EAX,EAX JZ 0x001634f2 LAB_00163619: LEA RDI,[0x200078] LEA RSI,[0x1b5120] PUSH 0x10 POP RDX CALL 0x00147dc4 LAB_0016362f: LEA RDI,[0x147fea] LEA RSI,[0x200078] LEA RDX,[0x1ff958] CALL 0x001237c0 LEA RDI,[0x200098] CALL 0x001235e0 JMP 0x001634f2
/* minja::Parser::parseLogicalAnd() */ void minja::Parser::parseLogicalAnd(void) { long lVar1; int iVar2; runtime_error *prVar3; __shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI; shared_ptr local_78 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [16]; long local_60; long local_58 [3]; Location local_40 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8]; parseLogicalNot(); if (*(long *)in_RDI == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001635e0 to 001635ee has its CatchHandler @ 0016366d */ std::runtime_error::runtime_error(prVar3,"Expected left side of \'logical and\' expression"); /* try { // try from 001635ef to 00163604 has its CatchHandler @ 0016366b */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 00163619 to 0016362e has its CatchHandler @ 0016365a */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_); } } /* try { // try from 001634f2 to 001634fe has its CatchHandler @ 0016367a */ get_location(); while( true ) { /* try { // try from 0016350e to 00163522 has its CatchHandler @ 0016369f */ consumeToken((string *)&local_60); lVar1 = local_58[0]; std::__cxx11::string::~string((string *)&local_60); if (lVar1 == 0) { std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70); return; } /* try { // try from 00163535 to 0016353f has its CatchHandler @ 0016368e */ parseLogicalNot(); if (local_60 == 0) break; /* try { // try from 00163550 to 00163565 has its CatchHandler @ 00163690 */ std:: make_shared<minja::BinaryOpExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op> (local_40,local_78,in_RDI,(Op *)&local_60); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= (in_RDI,(__shared_ptr *)local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_58); } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001635ae to 001635bc has its CatchHandler @ 00163681 */ std::runtime_error::runtime_error(prVar3,"Expected right side of \'and\' expression"); /* try { // try from 001635bd to 001635d2 has its CatchHandler @ 0016367f */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); }
8,288
minja::Parser::parseLogicalAnd()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalAnd() { auto left = parseLogicalNot(); if (!left) throw std::runtime_error("Expected left side of 'logical and' expression"); static std::regex and_tok(R"(and\b)"); auto location = get_location(); while (!consumeToken(and_tok).empty()) { auto right = parseLogicalNot(); if (!right) throw std::runtime_error("Expected right side of 'and' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And); } return left; }
O3
cpp
minja::Parser::parseLogicalAnd(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x879ae cmpq $0x0, (%rbx) je 0x878b5 leaq 0xa792e(%rip), %rax # 0x12f078 movb (%rax), %al testb %al, %al je 0x878e7 movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0x8777f movq 0xa6807(%rip), %rcx # 0x12df78 cmpb $0x0, (%rcx) je 0x8777b incl 0x8(%rax) jmp 0x8777f lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x20(%rsp), %rcx movq %rax, 0x10(%rcx) movq %rsp, %r13 leaq 0xa51de(%rip), %r12 # 0x12c978 addq $0x10, %r12 movq %r13, %rdi movq %r14, %rsi leaq 0xa78ad(%rip), %rdx # 0x12f058 movl $0x1, %ecx callq 0x86154 movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x877d5 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8e0 testq %r15, %r15 je 0x87860 movq %r13, %rdi movq %r14, %rsi callq 0x879ae cmpq $0x0, (%rsp) je 0x87881 movl $0x58, %edi callq 0x1b8b0 movq %rax, %rbp movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbp) movq %r12, (%rbp) movq %rbp, %r15 addq $0x10, %r15 movq %r15, %rdi leaq 0x20(%rsp), %rsi movq %rbx, %rdx movq %r13, %rcx movl $0xe, %r8d callq 0x98092 movq %r15, (%rbx) movq 0x8(%rbx), %rdi movq %rbp, 0x8(%rbx) testq %rdi, %rdi je 0x87848 callq 0x701e6 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x8779e callq 0x701e6 jmp 0x8779e movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x8786f callq 0x701e6 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %r15 leaq 0x6a8a1(%rip), %rsi # 0xf2136 movq %rax, %rdi callq 0x1b330 movq 0xa6744(%rip), %rsi # 0x12dfe8 movq 0xa66a5(%rip), %rdx # 0x12df50 movq %r15, %rdi callq 0x1bfb0 jmp 0x878e7 movl $0x10, %edi callq 0x1b450 movq %rax, %r15 leaq 0x6a838(%rip), %rsi # 0xf2101 movq %rax, %rdi callq 0x1b330 movq 0xa6710(%rip), %rsi # 0x12dfe8 movq 0xa6671(%rip), %rdx # 0x12df50 movq %r15, %rdi callq 0x1bfb0 leaq 0xa778a(%rip), %rdi # 0x12f078 callq 0x1c0a0 testl %eax, %eax je 0x87754 leaq 0xa7756(%rip), %rdi # 0x12f058 leaq 0x6a827(%rip), %rsi # 0xf2130 movl $0x10, %edx callq 0x65174 leaq -0x224a2(%rip), %rdi # 0x65478 leaq 0xa7737(%rip), %rsi # 0x12f058 leaq 0xa7010(%rip), %rdx # 0x12e938 callq 0x1b7a0 leaq 0xa7744(%rip), %rdi # 0x12f078 callq 0x1b5b0 jmp 0x87754 movq %rax, %r14 leaq 0xa7730(%rip), %rdi # 0x12f078 callq 0x1b5a0 jmp 0x87998 movq %rax, %r14 jmp 0x87998 movq %rax, %r14 movq %r15, %rdi callq 0x1b670 jmp 0x87998 jmp 0x87972 movq %rax, %r14 movq %r15, %rdi callq 0x1b670 jmp 0x87975 jmp 0x87986 movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x87989 callq 0x701e6 jmp 0x87989 movq %rax, %r14 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x87998 callq 0x701e6 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x879a6 callq 0x701e6 movq %r14, %rdi callq 0x1c030
_ZN5minja6Parser15parseLogicalAndEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp qword ptr [rbx], 0 jz loc_878B5 lea rax, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok mov al, [rax] test al, al jz loc_878E7 loc_87754: mov rax, [r14] mov [rsp+68h+var_48], rax mov rax, [r14+8] mov [rsp+68h+var_40], rax test rax, rax jz short loc_8777F mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_8777B inc dword ptr [rax+8] jmp short loc_8777F loc_8777B: lock inc dword ptr [rax+8] loc_8777F: mov rax, [r14+20h] sub rax, [r14+10h] lea rcx, [rsp+68h+var_48] mov [rcx+10h], rax mov r13, rsp lea r12, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add r12, 10h loc_8779E: mov rdi, r13 mov rsi, r14 lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, [rsp+68h+var_68]; void * mov r15, [rsp+68h+var_60] lea rax, [rsp+68h+var_58] cmp rdi, rax jz short loc_877D5 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_877D5: test r15, r15 jz loc_87860 mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+68h+var_68], 0 jz loc_87881 mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax mov rax, 100000001h mov [rbp+8], rax mov [rbp+0], r12 mov r15, rbp add r15, 10h mov rdi, r15 lea rsi, [rsp+68h+var_48] mov rdx, rbx mov rcx, r13 mov r8d, 0Eh call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r15 mov rdi, [rbx+8] mov [rbx+8], rbp test rdi, rdi jz short loc_87848 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_87848: mov rdi, [rsp+68h+var_60] test rdi, rdi jz loc_8779E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_8779E loc_87860: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_8786F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8786F: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_87881: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_878E7 loc_878B5: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_878E7: lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_87754 lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rsi, aAndB; "and\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_87754 mov r14, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_87998 mov r14, rax jmp short loc_87998 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_87998 jmp short loc_87972 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_87975 jmp short loc_87986 loc_87972: mov r14, rax loc_87975: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_87989 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_87989 loc_87986: mov r14, rax loc_87989: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_87998 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_87998: mov rdi, [rbx+8] test rdi, rdi jz short loc_879A6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_879A6: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalAnd(volatile signed __int32 **this, long long *a2) { volatile signed __int32 *v3; // rax volatile signed __int32 *v4; // r15 volatile signed __int32 *v5; // rbp volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-68h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-60h] long long v12; // [rsp+10h] [rbp-58h] BYREF long long v13; // [rsp+20h] [rbp-48h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-40h] long long v15; // [rsp+30h] [rbp-38h] minja::Parser::parseLogicalNot((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], (long long)"and\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]); } v13 = *a2; v3 = (volatile signed __int32 *)a2[1]; v14 = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v3 + 2); else _InterlockedIncrement(v3 + 2); } v15 = a2[4] - a2[2]; while ( 1 ) { minja::Parser::consumeToken( (long long)&v10, (long long)a2, (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u); v4 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( !v4 ) break; minja::Parser::parseLogicalNot((minja::Parser *)&v10); if ( !v10 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'and' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v5 = (volatile signed __int32 *)operator new(0x58uLL); *((_QWORD *)v5 + 1) = 0x100000001LL; *(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 14LL); *this = v5 + 4; v6 = this[1]; this[1] = v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); } if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return (minja::Parser *)this; }
parseLogicalAnd: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV RBX,RDI CALL 0x001879ae CMP qword ptr [RBX],0x0 JZ 0x001878b5 LEA RAX,[0x22f078] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x001878e7 LAB_00187754: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x0018777f MOV RCX,qword ptr [0x0022df78] CMP byte ptr [RCX],0x0 JZ 0x0018777b INC dword ptr [RAX + 0x8] JMP 0x0018777f LAB_0018777b: INC.LOCK dword ptr [RAX + 0x8] LAB_0018777f: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x20] MOV qword ptr [RCX + 0x10],RAX MOV R13,RSP LEA R12,[0x22c978] ADD R12,0x10 LAB_0018779e: MOV RDI,R13 MOV RSI,R14 LEA RDX,[0x22f058] MOV ECX,0x1 CALL 0x00186154 MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001877d5 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011b8e0 LAB_001877d5: TEST R15,R15 JZ 0x00187860 LAB_001877de: MOV RDI,R13 MOV RSI,R14 CALL 0x001879ae CMP qword ptr [RSP],0x0 JZ 0x00187881 LAB_001877f4: MOV EDI,0x58 CALL 0x0011b8b0 LAB_001877fe: MOV RBP,RAX MOV RAX,0x100000001 MOV qword ptr [RBP + 0x8],RAX MOV qword ptr [RBP],R12 MOV R15,RBP ADD R15,0x10 MOV RDI,R15 LEA RSI,[RSP + 0x20] MOV RDX,RBX MOV RCX,R13 MOV R8D,0xe CALL 0x00198092 MOV qword ptr [RBX],R15 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP TEST RDI,RDI JZ 0x00187848 CALL 0x001701e6 LAB_00187848: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0018779e CALL 0x001701e6 JMP 0x0018779e LAB_00187860: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0018786f CALL 0x001701e6 LAB_0018786f: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00187881: MOV EDI,0x10 CALL 0x0011b450 MOV R15,RAX LAB_0018788e: LEA RSI,[0x1f2136] MOV RDI,RAX CALL 0x0011b330 LAB_0018789d: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,R15 CALL 0x0011bfb0 LAB_001878b5: MOV EDI,0x10 CALL 0x0011b450 MOV R15,RAX LAB_001878c2: LEA RSI,[0x1f2101] MOV RDI,RAX CALL 0x0011b330 LAB_001878d1: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,R15 CALL 0x0011bfb0 LAB_001878e7: LEA RDI,[0x22f078] CALL 0x0011c0a0 TEST EAX,EAX JZ 0x00187754 LAB_001878fb: LEA RDI,[0x22f058] LEA RSI,[0x1f2130] MOV EDX,0x10 CALL 0x00165174 LAB_00187913: LEA RDI,[0x165478] LEA RSI,[0x22f058] LEA RDX,[0x22e938] CALL 0x0011b7a0 LEA RDI,[0x22f078] CALL 0x0011b5b0 JMP 0x00187754
/* minja::Parser::parseLogicalAnd() */ void minja::Parser::parseLogicalAnd(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; int8 *puVar3; runtime_error *prVar4; int8 *in_RSI; long *in_RDI; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58 [2]; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; parseLogicalNot(); if (*in_RDI == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001878c2 to 001878d0 has its CatchHandler @ 00187954 */ std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical and\' expression"); /* try { // try from 001878d1 to 001878e6 has its CatchHandler @ 0018794f */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); } if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 001878fb to 00187912 has its CatchHandler @ 0018793e */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_); } } local_48 = *in_RSI; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022df78 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } local_38 = in_RSI[4] - in_RSI[2]; while( true ) { /* try { // try from 0018779e to 001877b4 has its CatchHandler @ 00187986 */ consumeToken(&local_68); p_Var1 = local_60; if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 001877de to 001877e8 has its CatchHandler @ 00187970 */ parseLogicalNot(); if (local_68 == (long *)0x0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018788e to 0018789c has its CatchHandler @ 00187963 */ std::runtime_error::runtime_error(prVar4,"Expected right side of \'and\' expression"); /* try { // try from 0018789d to 001878b2 has its CatchHandler @ 00187961 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); } /* try { // try from 001877f4 to 001877fd has its CatchHandler @ 00187972 */ puVar3 = (int8 *)operator_new(0x58); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_0022c988; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48); *in_RDI = (long)(puVar3 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar3; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return; }
8,289
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>>>>>::get_codepoint()
monkey531[P]llama/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
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>>>>>::get_codepoint(): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x75, 0x14(%rax) je 0xdf3ba leaq 0x13cf03(%rip), %rdi # 0x21c2a3 movl $0x1d79, %esi # imm = 0x1D79 leaq 0x135f2b(%rip), %rdx # 0x2152d7 leaq 0x13dc23(%rip), %rcx # 0x21cfd6 movb $0x0, %al callq 0x5ef40 movl $0x0, 0x54(%rsp) movl $0xc, 0x30(%rsp) movl $0x8, 0x34(%rsp) movl $0x4, 0x38(%rsp) movl $0x0, 0x3c(%rsp) leaq 0x30(%rsp), %rax movq %rax, 0x40(%rsp) movq $0x4, 0x48(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0xdf6b0 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0xdf6c0 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rax cmpq 0x18(%rsp), %rax je 0xdf4f8 movq 0x8(%rsp), %rdi movq 0x20(%rsp), %rax movl (%rax), %eax movl %eax, 0x14(%rsp) callq 0xdef60 movq 0x8(%rsp), %rax cmpl $0x30, 0x14(%rax) jl 0xdf473 movq 0x8(%rsp), %rax cmpl $0x39, 0x14(%rax) jg 0xdf473 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x30, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xdf4e3 movq 0x8(%rsp), %rax cmpl $0x41, 0x14(%rax) jl 0xdf4a4 movq 0x8(%rsp), %rax cmpl $0x46, 0x14(%rax) jg 0xdf4a4 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x37, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xdf4e1 movq 0x8(%rsp), %rax cmpl $0x61, 0x14(%rax) jl 0xdf4d5 movq 0x8(%rsp), %rax cmpl $0x66, 0x14(%rax) jg 0xdf4d5 movq 0x8(%rsp), %rax movl 0x14(%rax), %eax subl $0x57, %eax movl 0x14(%rsp), %ecx shll %cl, %eax addl 0x54(%rsp), %eax movl %eax, 0x54(%rsp) jmp 0xdf4df movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0xdf533 jmp 0xdf4e1 jmp 0xdf4e3 jmp 0xdf4e5 movq 0x20(%rsp), %rax addq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0xdf41d xorl %eax, %eax cmpl 0x54(%rsp), %eax jg 0xdf50a cmpl $0xffff, 0x54(%rsp) # imm = 0xFFFF jle 0xdf52b leaq 0x13cd92(%rip), %rdi # 0x21c2a3 movl $0x1d93, %esi # imm = 0x1D93 leaq 0x135dba(%rip), %rdx # 0x2152d7 leaq 0x13dac1(%rip), %rcx # 0x21cfe5 movb $0x0, %al callq 0x5ef40 movl 0x54(%rsp), %eax movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %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_EEEEE13get_codepointEv: sub rsp, 68h mov [rsp+68h+var_10], rdi mov rax, [rsp+68h+var_10] mov [rsp+68h+var_60], rax cmp dword ptr [rax+14h], 75h ; 'u' jz short loc_DF3BA lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1D79h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov al, 0 call _ggml_abort loc_DF3BA: mov [rsp+68h+var_14], 0 mov [rsp+68h+var_38], 0Ch mov [rsp+68h+var_34], 8 mov [rsp+68h+var_30], 4 mov [rsp+68h+var_2C], 0 lea rax, [rsp+68h+var_38] mov [rsp+68h+var_28], rax mov [rsp+68h+var_20], 4 lea rax, [rsp+68h+var_28] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_40] call _ZNKSt16initializer_listIjE5beginEv; std::initializer_list<uint>::begin(void) mov [rsp+68h+var_48], rax mov rdi, [rsp+68h+var_40] call _ZNKSt16initializer_listIjE3endEv; std::initializer_list<uint>::end(void) mov [rsp+68h+var_50], rax loc_DF41D: mov rax, [rsp+68h+var_48] cmp rax, [rsp+68h+var_50] jz loc_DF4F8 mov rdi, [rsp+68h+var_60] mov rax, [rsp+68h+var_48] mov eax, [rax] mov [rsp+68h+var_54], eax 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 rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 30h ; '0' jl short loc_DF473 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 39h ; '9' jg short loc_DF473 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 30h ; '0' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_DF4E3 loc_DF473: mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 41h ; 'A' jl short loc_DF4A4 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 46h ; 'F' jg short loc_DF4A4 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 37h ; '7' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_DF4E1 loc_DF4A4: mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 61h ; 'a' jl short loc_DF4D5 mov rax, [rsp+68h+var_60] cmp dword ptr [rax+14h], 66h ; 'f' jg short loc_DF4D5 mov rax, [rsp+68h+var_60] mov eax, [rax+14h] sub eax, 57h ; 'W' mov ecx, [rsp+68h+var_54] shl eax, cl add eax, [rsp+68h+var_14] mov [rsp+68h+var_14], eax jmp short loc_DF4DF loc_DF4D5: mov [rsp+68h+var_4], 0FFFFFFFFh jmp short loc_DF533 loc_DF4DF: jmp short $+2 loc_DF4E1: jmp short $+2 loc_DF4E3: jmp short $+2 loc_DF4E5: mov rax, [rsp+68h+var_48] add rax, 4 mov [rsp+68h+var_48], rax jmp loc_DF41D loc_DF4F8: xor eax, eax cmp eax, [rsp+68h+var_14] jg short loc_DF50A cmp [rsp+68h+var_14], 0FFFFh jle short loc_DF52B loc_DF50A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1D93h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"... mov al, 0 call _ggml_abort loc_DF52B: mov eax, [rsp+68h+var_14] mov [rsp+68h+var_4], eax loc_DF533: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long 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_codepoint( long long a1) { int v2; // [rsp+14h] [rbp-54h] long long v3; // [rsp+18h] [rbp-50h] int *v4; // [rsp+20h] [rbp-48h] _DWORD v5[4]; // [rsp+30h] [rbp-38h] BYREF _QWORD v6[2]; // [rsp+40h] [rbp-28h] BYREF unsigned int v7; // [rsp+54h] [rbp-14h] long long v8; // [rsp+58h] [rbp-10h] v8 = a1; if ( *(_DWORD *)(a1 + 20) != 117 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); v7 = 0; v5[0] = 12; v5[1] = 8; v5[2] = 4; v5[3] = 0; v6[0] = v5; v6[1] = 4LL; v4 = (int *)std::initializer_list<unsigned int>::begin(v6); v3 = std::initializer_list<unsigned int>::end(v6); while ( v4 != (int *)v3 ) { v2 = *v4; 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); if ( *(int *)(a1 + 20) < 48 || *(int *)(a1 + 20) > 57 ) { if ( *(int *)(a1 + 20) < 65 || *(int *)(a1 + 20) > 70 ) { if ( *(int *)(a1 + 20) < 97 || *(int *)(a1 + 20) > 102 ) return (unsigned int)-1; v7 += (*(_DWORD *)(a1 + 20) - 87) << v2; } else { v7 += (*(_DWORD *)(a1 + 20) - 55) << v2; } } else { v7 += (*(_DWORD *)(a1 + 20) - 48) << v2; } ++v4; } if ( v7 >= 0x10000 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7571LL, "GGML_ASSERT(%s) failed", "0x0000 <= codepoint && codepoint <= 0xFFFF"); return v7; }
get_codepoint: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RAX + 0x14],0x75 JZ 0x001df3ba LEA RDI,[0x31c2a3] MOV ESI,0x1d79 LEA RDX,[0x3152d7] LEA RCX,[0x31cfd6] MOV AL,0x0 CALL 0x0015ef40 LAB_001df3ba: MOV dword ptr [RSP + 0x54],0x0 MOV dword ptr [RSP + 0x30],0xc MOV dword ptr [RSP + 0x34],0x8 MOV dword ptr [RSP + 0x38],0x4 MOV dword ptr [RSP + 0x3c],0x0 LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],0x4 LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001df6b0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001df6c0 MOV qword ptr [RSP + 0x18],RAX LAB_001df41d: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x18] JZ 0x001df4f8 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x14],EAX CALL 0x001def60 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x30 JL 0x001df473 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x39 JG 0x001df473 MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x30 MOV ECX,dword ptr [RSP + 0x14] SHL EAX,CL ADD EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x54],EAX JMP 0x001df4e3 LAB_001df473: MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x41 JL 0x001df4a4 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x46 JG 0x001df4a4 MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x37 MOV ECX,dword ptr [RSP + 0x14] SHL EAX,CL ADD EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x54],EAX JMP 0x001df4e1 LAB_001df4a4: MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x61 JL 0x001df4d5 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x14],0x66 JG 0x001df4d5 MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x57 MOV ECX,dword ptr [RSP + 0x14] SHL EAX,CL ADD EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x54],EAX JMP 0x001df4df LAB_001df4d5: MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x001df533 LAB_001df4df: JMP 0x001df4e1 LAB_001df4e1: JMP 0x001df4e3 LAB_001df4e3: JMP 0x001df4e5 LAB_001df4e5: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x4 MOV qword ptr [RSP + 0x20],RAX JMP 0x001df41d LAB_001df4f8: XOR EAX,EAX CMP EAX,dword ptr [RSP + 0x54] JG 0x001df50a CMP dword ptr [RSP + 0x54],0xffff JLE 0x001df52b LAB_001df50a: LEA RDI,[0x31c2a3] MOV ESI,0x1d93 LEA RDX,[0x3152d7] LEA RCX,[0x31cfe5] MOV AL,0x0 CALL 0x0015ef40 LAB_001df52b: MOV EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x64],EAX LAB_001df533: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 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 > > >::get_codepoint() */ int __thiscall 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>>> ::get_codepoint(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>>> *this) { int4 uVar1; int iVar2; int4 *puVar3; byte bVar4; int4 *local_48; int4 local_38; int4 local_34; int4 local_30; int4 local_2c; int4 *local_28; int8 local_20; int local_14; 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>>> *local_10; local_10 = this; if (*(int *)(this + 0x14) != 0x75) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); } local_14 = 0; local_38 = 0xc; local_34 = 8; local_30 = 4; local_2c = 0; local_28 = &local_38; local_20 = 4; local_48 = (int4 *) std::initializer_list<unsigned_int>::begin((initializer_list<unsigned_int> *)&local_28) ; puVar3 = (int4 *) std::initializer_list<unsigned_int>::end((initializer_list<unsigned_int> *)&local_28); do { if (local_48 == puVar3) { if ((local_14 < 0) || (0xffff < local_14)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 0x1d93,"GGML_ASSERT(%s) failed","0x0000 <= codepoint && codepoint <= 0xFFFF"); } return local_14; } uVar1 = *local_48; get(this); bVar4 = (byte)uVar1; if ((*(int *)(this + 0x14) < 0x30) || (0x39 < *(int *)(this + 0x14))) { if ((*(int *)(this + 0x14) < 0x41) || (0x46 < *(int *)(this + 0x14))) { if ((*(int *)(this + 0x14) < 0x61) || (0x66 < *(int *)(this + 0x14))) { return -1; } iVar2 = *(int *)(this + 0x14) + -0x57 << (bVar4 & 0x1f); } else { iVar2 = *(int *)(this + 0x14) + -0x37 << (bVar4 & 0x1f); } } else { iVar2 = *(int *)(this + 0x14) + -0x30 << (bVar4 & 0x1f); } local_14 = iVar2 + local_14; local_48 = local_48 + 1; } while( true ); }
8,290
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>>>>>::get_codepoint()
monkey531[P]llama/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O1
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>>>>>::get_codepoint(): pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x6bf54 leaq 0x14(%rdi), %rsi leaq 0xc(%rsp), %rbx movq %rbx, %rdx callq 0x1c575 movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq leaq 0x88da1(%rip), %rdi # 0xf4cfc leaq 0x81673(%rip), %rdx # 0xed5d5 leaq 0x89aab(%rip), %rcx # 0xf5a14 movl $0x1d79, %esi # imm = 0x1D79 xorl %eax, %eax callq 0x1bef0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_6BF54 lea rsi, [rdi+14h] lea rbx, [rsp+18h+var_C] mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; 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_codepoint(void) [clone] mov eax, [rbx] add rsp, 10h pop rbx retn loc_6BF54: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h xor eax, eax call _ggml_abort nop
long long 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_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF if ( a1[1].m128i_i32[1] == 117 ) { 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_codepoint( a1, &a1[1].m128i_i32[1], v14); return v14[0]; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); return 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( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, v10, v11, v12, v13, a7, a8, a9); } }
get_codepoint: PUSH RBX SUB RSP,0x10 CMP dword ptr [RDI + 0x14],0x75 JNZ 0x0016bf54 LEA RSI,[RDI + 0x14] LEA RBX,[RSP + 0xc] MOV RDX,RBX CALL 0x0011c575 MOV EAX,dword ptr [RBX] ADD RSP,0x10 POP RBX RET LAB_0016bf54: LEA RDI,[0x1f4cfc] LEA RDX,[0x1ed5d5] LEA RCX,[0x1f5a14] MOV ESI,0x1d79 XOR EAX,EAX CALL 0x0011bef0
/* 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 > > >::get_codepoint() */ int4 __thiscall 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>>> ::get_codepoint(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>>> *this) { int4 local_c; if (*(int *)(this + 0x14) == 0x75) { get_codepoint(); return local_c; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); }
8,291
add_sub_mpi
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/bignum.c
static int add_sub_mpi(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B, int flip_B) { int ret, s; MPI_VALIDATE_RET(X != NULL); MPI_VALIDATE_RET(A != NULL); MPI_VALIDATE_RET(B != NULL); s = A->s; if (A->s * B->s * flip_B < 0) { int cmp = mbedtls_mpi_cmp_abs(A, B); if (cmp >= 0) { MBEDTLS_MPI_CHK(mbedtls_mpi_sub_abs(X, A, B)); /* If |A| = |B|, the result is 0 and we must set the sign bit * to +1 regardless of which of A or B was negative. Otherwise, * since |A| > |B|, the sign is the sign of A. */ X->s = cmp == 0 ? 1 : s; } else { MBEDTLS_MPI_CHK(mbedtls_mpi_sub_abs(X, B, A)); /* Since |A| < |B|, the sign is the opposite of A. */ X->s = -s; } } else { MBEDTLS_MPI_CHK(mbedtls_mpi_add_abs(X, A, B)); X->s = s; } cleanup: return ret; }
O3
c
add_sub_mpi: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl (%rsi), %r12d imull %r12d, %ecx imull (%rdx), %ecx testl %ecx, %ecx js 0x7f40b movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x7f186 testl %eax, %eax jne 0x7f455 jmp 0x7f450 movq %r15, %rdi movq %r14, %rsi callq 0x7f041 testl %eax, %eax js 0x7f43b movl %eax, %ebp movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x7f27f testl %eax, %eax jne 0x7f455 testl %ebp, %ebp movl $0x1, %eax cmovel %eax, %r12d jmp 0x7f450 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x7f27f testl %eax, %eax jne 0x7f455 negl %r12d movl %r12d, (%rbx) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
add_sub_mpi: push rbp push r15 push r14 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi mov r12d, [rsi] imul ecx, r12d imul ecx, [rdx] test ecx, ecx js short loc_7F40B mov rdi, rbx mov rsi, r15 mov rdx, r14 call mbedtls_mpi_add_abs test eax, eax jnz short loc_7F455 jmp short loc_7F450 loc_7F40B: mov rdi, r15 mov rsi, r14 call mbedtls_mpi_cmp_abs test eax, eax js short loc_7F43B mov ebp, eax mov rdi, rbx mov rsi, r15 mov rdx, r14 call mbedtls_mpi_sub_abs test eax, eax jnz short loc_7F455 test ebp, ebp mov eax, 1 cmovz r12d, eax jmp short loc_7F450 loc_7F43B: mov rdi, rbx mov rsi, r14 mov rdx, r15 call mbedtls_mpi_sub_abs test eax, eax jnz short loc_7F455 neg r12d loc_7F450: mov [rbx], r12d xor eax, eax loc_7F455: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long add_sub_mpi(int *a1, int *a2, _DWORD *a3, int a4) { int v5; // r12d long long result; // rax int v7; // eax int v8; // ebp v5 = *a2; if ( *a3 * *a2 * a4 < 0 ) { v7 = mbedtls_mpi_cmp_abs((long long)a2, (long long)a3); if ( v7 < 0 ) { result = mbedtls_mpi_sub_abs((long long)a1, (long long)a3, (long long)a2); if ( (_DWORD)result ) return result; v5 = -v5; } else { v8 = v7; result = mbedtls_mpi_sub_abs((long long)a1, (long long)a2, (long long)a3); if ( (_DWORD)result ) return result; if ( !v8 ) v5 = 1; } } else { result = mbedtls_mpi_add_abs((long long)a1, (long long)a2, (long long)a3); if ( (_DWORD)result ) return result; } *a1 = v5; return 0LL; }
add_sub_mpi: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV R12D,dword ptr [RSI] IMUL ECX,R12D IMUL ECX,dword ptr [RDX] TEST ECX,ECX JS 0x0017f40b MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0017f186 TEST EAX,EAX JNZ 0x0017f455 JMP 0x0017f450 LAB_0017f40b: MOV RDI,R15 MOV RSI,R14 CALL 0x0017f041 TEST EAX,EAX JS 0x0017f43b MOV EBP,EAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0017f27f TEST EAX,EAX JNZ 0x0017f455 TEST EBP,EBP MOV EAX,0x1 CMOVZ R12D,EAX JMP 0x0017f450 LAB_0017f43b: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0017f27f TEST EAX,EAX JNZ 0x0017f455 NEG R12D LAB_0017f450: MOV dword ptr [RBX],R12D XOR EAX,EAX LAB_0017f455: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 add_sub_mpi(int *param_1,int *param_2,int *param_3,int param_4) { int iVar1; int8 uVar2; int iVar3; iVar3 = *param_2; if (param_4 * iVar3 * *param_3 < 0) { iVar1 = mbedtls_mpi_cmp_abs(param_2,param_3); if (iVar1 < 0) { uVar2 = mbedtls_mpi_sub_abs(param_1,param_3,param_2); if ((int)uVar2 != 0) { return uVar2; } iVar3 = -iVar3; } else { uVar2 = mbedtls_mpi_sub_abs(param_1,param_2,param_3); if ((int)uVar2 != 0) { return uVar2; } if (iVar1 == 0) { iVar3 = 1; } } } else { uVar2 = mbedtls_mpi_add_abs(param_1,param_2,param_3); if ((int)uVar2 != 0) { return uVar2; } } *param_1 = iVar3; return 0; }
8,292
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, 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::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
monkey531[P]llama/common/minja.hpp
ForTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, location, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O2
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, 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::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %rbx movq %r9, %r14 movq %r8, %r15 movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %rbx pushq $0x6 popq %rsi callq 0x3c6d4 leaq 0x7afdb(%rip), %rax # 0xcfc40 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r15, %rsi callq 0x37e98 movb 0x28(%rsp), %al movq 0x20(%rsp), %rcx andq $0x0, 0x50(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x48(%rbx) andq $0x0, (%r14) andq $0x0, 0x60(%rbx) movups (%rcx), %xmm0 andq $0x0, 0x8(%rcx) movups %xmm0, 0x58(%rbx) andq $0x0, (%rcx) movb %al, 0x68(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x554c2 movq %r14, %rdi callq 0x20bf0
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push rbx mov r14, r9 mov r15, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov rbx, rdi push 6 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+18h+arg_8] mov rcx, [rsp+18h+arg_0] and qword ptr [rbx+50h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+48h], xmm0 and qword ptr [r14], 0 and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [rcx] and qword ptr [rcx+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [rcx], 0 mov [rbx+68h], al pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN5minja13TemplateTokenD2Ev; minja::TemplateToken::~TemplateToken() mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, long long a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 minja::TemplateToken::TemplateToken(a1, 6, a2, a3, a4); *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector((_QWORD *)(a1 + 48), a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV RBX,RDI PUSH 0x6 POP RSI CALL 0x0013c6d4 LEA RAX,[0x1cfc40] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_00154c70: MOV RSI,R15 CALL 0x00137e98 LAB_00154c78: MOV AL,byte ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 AND qword ptr [R14],0x0 AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [RCX] AND qword ptr [RCX + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [RCX],0x0 MOV byte ptr [RBX + 0x68],AL POP RBX POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,6,param_1,param_3,param_4); *(int ***)this = &PTR__ForTemplateToken_001cfc50; /* try { // try from 00154c70 to 00154c77 has its CatchHandler @ 00154cb5 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar1 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar1; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar1 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar1; *param_7 = 0; this[0x68] = param_8; return; }
8,293
my_close
eloqsql/mysys/my_open.c
int my_close(File fd, myf MyFlags) { int err; char *name= NULL; DBUG_ENTER("my_close"); DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE))) MyFlags|= my_global_flags; if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN) { name= my_file_info[fd].name; my_file_info[fd].name= NULL; my_file_info[fd].type= UNOPEN; } #ifndef _WIN32 err= close(fd); #else err= my_win_close(fd); #endif if (err) { DBUG_PRINT("error",("Got error %d on close",err)); my_errno=errno; if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), name,errno); } if (name) { my_free(name); } my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED); DBUG_RETURN(err); }
O3
c
my_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 xorl %ebx, %ebx movl $0x0, %r14d testb $0x18, %r12b jne 0xa017a leaq 0xb68041(%rip), %rax # 0xc081b8 movq (%rax), %r14 leaq 0x2e598f(%rip), %rax # 0x385b10 cmpl %edi, (%rax) jbe 0xa01b9 leaq 0x2e598c(%rip), %rax # 0x385b18 movq (%rax), %rdx movslq %edi, %rcx shlq $0x4, %rcx cmpl $0x0, 0x8(%rdx,%rcx) je 0xa01b7 addq %rcx, %rdx movq (%rdx), %rbx movq $0x0, (%rdx) movq (%rax), %rax movl $0x0, 0x8(%rax,%rcx) jmp 0xa01b9 xorl %ebx, %ebx callq 0x291b0 movl %eax, %r15d testl %eax, %eax je 0xa0202 orq %r12, %r14 callq 0x297b0 movq %rax, %r12 movl (%rax), %r13d callq 0xa16ee movl %r13d, (%rax) testb $0x18, %r14b je 0xa0202 andl $0x440, %r14d # imm = 0x440 orq $0x4, %r14 movl (%r12), %ecx movl $0x4, %edi movq %r14, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x9dda3 testq %rbx, %rbx je 0xa020f movq %rbx, %rdi callq 0x9fbaa leaq 0xb67fae(%rip), %rax # 0xc081c4 lock decl (%rax) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
my_close: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rsi xor ebx, ebx mov r14d, 0 test r12b, 18h jnz short loc_A017A lea rax, my_global_flags mov r14, [rax] loc_A017A: lea rax, my_file_limit cmp [rax], edi jbe short loc_A01B9 lea rax, my_file_info mov rdx, [rax] movsxd rcx, edi shl rcx, 4 cmp dword ptr [rdx+rcx+8], 0 jz short loc_A01B7 add rdx, rcx mov rbx, [rdx] mov qword ptr [rdx], 0 mov rax, [rax] mov dword ptr [rax+rcx+8], 0 jmp short loc_A01B9 loc_A01B7: xor ebx, ebx loc_A01B9: call _close mov r15d, eax test eax, eax jz short loc_A0202 or r14, r12 call ___errno_location mov r12, rax mov r13d, [rax] call _my_thread_var mov [rax], r13d test r14b, 18h jz short loc_A0202 and r14d, 440h or r14, 4 mov ecx, [r12] mov edi, 4 mov rsi, r14 mov rdx, rbx xor eax, eax call my_error loc_A0202: test rbx, rbx jz short loc_A020F mov rdi, rbx call my_free loc_A020F: lea rax, my_file_opened lock dec dword ptr [rax] mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_close(long long a1, const char *a2) { long long v2; // rbx __int16 v3; // r14 long long v4; // rcx unsigned int v5; // r15d __int16 v6; // r14 unsigned int *v7; // r12 unsigned int v8; // r13d v2 = 0LL; v3 = 0; if ( ((unsigned __int8)a2 & 0x18) == 0 ) v3 = my_global_flags; if ( my_file_limit > (unsigned int)a1 ) { v4 = 16LL * (int)a1; if ( *(_DWORD *)((char *)my_file_info + v4 + 8) ) { v2 = *(_QWORD *)((char *)my_file_info + v4); *(_QWORD *)((char *)my_file_info + v4) = 0LL; *(_DWORD *)((char *)my_file_info + v4 + 8) = 0; } else { v2 = 0LL; } } v5 = close(a1); if ( v5 ) { v6 = (unsigned __int16)a2 | v3; v7 = (unsigned int *)__errno_location(a1); v8 = *v7; *(_DWORD *)my_thread_var(a1, a2) = v8; if ( (v6 & 0x18) != 0 ) my_error(4u, v6 & 0x440 | 4LL, v2, *v7); } if ( v2 ) my_free(v2); _InterlockedDecrement(my_file_opened); return v5; }
my_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RSI XOR EBX,EBX MOV R14D,0x0 TEST R12B,0x18 JNZ 0x001a017a LEA RAX,[0xd081b8] MOV R14,qword ptr [RAX] LAB_001a017a: LEA RAX,[0x485b10] CMP dword ptr [RAX],EDI JBE 0x001a01b9 LEA RAX,[0x485b18] MOV RDX,qword ptr [RAX] MOVSXD RCX,EDI SHL RCX,0x4 CMP dword ptr [RDX + RCX*0x1 + 0x8],0x0 JZ 0x001a01b7 ADD RDX,RCX MOV RBX,qword ptr [RDX] MOV qword ptr [RDX],0x0 MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + RCX*0x1 + 0x8],0x0 JMP 0x001a01b9 LAB_001a01b7: XOR EBX,EBX LAB_001a01b9: CALL 0x001291b0 MOV R15D,EAX TEST EAX,EAX JZ 0x001a0202 OR R14,R12 CALL 0x001297b0 MOV R12,RAX MOV R13D,dword ptr [RAX] CALL 0x001a16ee MOV dword ptr [RAX],R13D TEST R14B,0x18 JZ 0x001a0202 AND R14D,0x440 OR R14,0x4 MOV ECX,dword ptr [R12] MOV EDI,0x4 MOV RSI,R14 MOV RDX,RBX XOR EAX,EAX CALL 0x0019dda3 LAB_001a0202: TEST RBX,RBX JZ 0x001a020f MOV RDI,RBX CALL 0x0019fbaa LAB_001a020f: LEA RAX,[0xd081c4] DEC.LOCK dword ptr [RAX] MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_close(uint param_1,ulong param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; long lVar5; long lVar6; ulong uVar7; lVar6 = 0; uVar7 = 0; if ((param_2 & 0x18) == 0) { uVar7 = my_global_flags; } if (param_1 < my_file_limit) { lVar5 = (long)(int)param_1 * 0x10; if (*(int *)(my_file_info + lVar5 + 8) == 0) { lVar6 = 0; } else { lVar6 = *(long *)(my_file_info + lVar5); *(long *)(my_file_info + lVar5) = 0; *(int4 *)(my_file_info + lVar5 + 8) = 0; } } iVar2 = close(param_1); if (iVar2 != 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if (((uVar7 | param_2) & 0x18) != 0) { my_error(4,(uint)(uVar7 | param_2) & 0x440 | 4,lVar6,*piVar3); } } if (lVar6 != 0) { my_free(lVar6); } LOCK(); my_file_opened = my_file_opened + -1; UNLOCK(); return iVar2; }
8,294
maria_rtree_delete_key
eloqsql/storage/maria/ma_rt_key.c
int maria_rtree_delete_key(MARIA_PAGE *page, uchar *key, uint key_length) { MARIA_HA *info= page->info; MARIA_SHARE *share= info->s; uint key_length_with_nod_flag; uchar *key_start; key_start= key - page->node; if (!page->node) key_length+= share->base.rec_reflength; memmove(key_start, key + key_length, page->size - key_length - (key - page->buff)); key_length_with_nod_flag= key_length + page->node; page->size-= key_length_with_nod_flag; page_store_size(share, page); if (share->now_transactional && _ma_log_delete(page, key_start, 0, key_length_with_nod_flag, 0, KEY_OP_DEBUG_LOG_DEL_CHANGE_RT)) return -1; return 0; }
O3
c
maria_rtree_delete_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebx movq %rdi, %r14 movq (%rdi), %rax movq (%rax), %r12 movl 0x28(%rdi), %eax movq %rsi, %r15 subq %rax, %r15 testq %rax, %rax jne 0x6cf1c addl 0x3e0(%r12), %ebx movl %ebx, %eax addq %rsi, %rax movl 0x20(%r14), %ecx subl %ebx, %ecx movq 0x10(%r14), %rdx subq %rsi, %rdx addq %rcx, %rdx movq %r15, %rdi movq %rax, %rsi callq 0x29120 addl 0x28(%r14), %ebx movl 0x20(%r14), %eax subl %ebx, %eax movl %eax, 0x20(%r14) movq 0x10(%r14), %rcx movl 0x744(%r12), %edx movb %al, -0x1(%rcx,%rdx) movq 0x10(%r14), %rcx movl 0x744(%r12), %edx movb %ah, -0x2(%rcx,%rdx) cmpb $0x0, 0x7e7(%r12) je 0x6cf98 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl %ebx, %ecx xorl %r8d, %r8d movl $0x12, %r9d callq 0x681ae movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl jne 0x6cf9a xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
maria_rtree_delete_key: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov ebx, edx mov r14, rdi mov rax, [rdi] mov r12, [rax] mov eax, [rdi+28h] mov r15, rsi sub r15, rax test rax, rax jnz short loc_6CF1C add ebx, [r12+3E0h] loc_6CF1C: mov eax, ebx add rax, rsi mov ecx, [r14+20h] sub ecx, ebx mov rdx, [r14+10h] sub rdx, rsi add rdx, rcx mov rdi, r15 mov rsi, rax call _memmove add ebx, [r14+28h] mov eax, [r14+20h] sub eax, ebx mov [r14+20h], eax mov rcx, [r14+10h] mov edx, [r12+744h] mov [rcx+rdx-1], al mov rcx, [r14+10h] mov edx, [r12+744h] mov [rcx+rdx-2], ah cmp byte ptr [r12+7E7h], 0 jz short loc_6CF98 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, ebx xor r8d, r8d mov r9d, 12h call _ma_log_delete mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jnz short loc_6CF9A loc_6CF98: xor eax, eax loc_6CF9A: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long maria_rtree_delete_key(long long a1, long long a2, unsigned int a3) { unsigned int v3; // ebx long long v4; // r12 long long v5; // r15 int v6; // ebx int v7; // eax bool v8; // cl long long result; // rax v3 = a3; v4 = **(_QWORD **)a1; v5 = a2 - *(unsigned int *)(a1 + 40); if ( !*(_DWORD *)(a1 + 40) ) v3 = *(_DWORD *)(v4 + 992) + a3; memmove(v5, a2 + v3, *(_DWORD *)(a1 + 32) - v3 + *(_QWORD *)(a1 + 16) - a2); v6 = *(_DWORD *)(a1 + 40) + v3; v7 = *(_DWORD *)(a1 + 32) - v6; *(_DWORD *)(a1 + 32) = v7; *(_BYTE *)(*(_QWORD *)(a1 + 16) + *(unsigned int *)(v4 + 1860) - 1LL) = v7; *(_BYTE *)(*(_QWORD *)(a1 + 16) + *(unsigned int *)(v4 + 1860) - 2LL) = BYTE1(v7); if ( !*(_BYTE *)(v4 + 2023) ) return 0LL; v8 = ma_log_delete(a1, v5, 0, v6); result = 0xFFFFFFFFLL; if ( !v8 ) return 0LL; return result; }
maria_rtree_delete_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14,RDI MOV RAX,qword ptr [RDI] MOV R12,qword ptr [RAX] MOV EAX,dword ptr [RDI + 0x28] MOV R15,RSI SUB R15,RAX TEST RAX,RAX JNZ 0x0016cf1c ADD EBX,dword ptr [R12 + 0x3e0] LAB_0016cf1c: MOV EAX,EBX ADD RAX,RSI MOV ECX,dword ptr [R14 + 0x20] SUB ECX,EBX MOV RDX,qword ptr [R14 + 0x10] SUB RDX,RSI ADD RDX,RCX MOV RDI,R15 MOV RSI,RAX CALL 0x00129120 ADD EBX,dword ptr [R14 + 0x28] MOV EAX,dword ptr [R14 + 0x20] SUB EAX,EBX MOV dword ptr [R14 + 0x20],EAX MOV RCX,qword ptr [R14 + 0x10] MOV EDX,dword ptr [R12 + 0x744] MOV byte ptr [RCX + RDX*0x1 + -0x1],AL MOV RCX,qword ptr [R14 + 0x10] MOV EDX,dword ptr [R12 + 0x744] MOV byte ptr [RCX + RDX*0x1 + -0x2],AH CMP byte ptr [R12 + 0x7e7],0x0 JZ 0x0016cf98 MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,EBX XOR R8D,R8D MOV R9D,0x12 CALL 0x001681ae MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JNZ 0x0016cf9a LAB_0016cf98: XOR EAX,EAX LAB_0016cf9a: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 maria_rtree_delete_key(int8 *param_1,long param_2,uint param_3) { long lVar1; char cVar2; int iVar3; int iVar4; ulong uVar5; void *__dest; uVar5 = (ulong)param_3; lVar1 = *(long *)*param_1; __dest = (void *)(param_2 - (ulong)*(uint *)(param_1 + 5)); if ((ulong)*(uint *)(param_1 + 5) == 0) { uVar5 = (ulong)(param_3 + *(int *)(lVar1 + 0x3e0)); } memmove(__dest,(void *)(uVar5 + param_2), (param_1[2] - param_2) + (ulong)(uint)(*(int *)(param_1 + 4) - (int)uVar5)); iVar4 = (int)uVar5 + *(int *)(param_1 + 5); iVar3 = *(int *)(param_1 + 4) - iVar4; *(int *)(param_1 + 4) = iVar3; *(char *)(param_1[2] + -1 + (ulong)*(uint *)(lVar1 + 0x744)) = (char)iVar3; *(char *)(param_1[2] + -2 + (ulong)*(uint *)(lVar1 + 0x744)) = (char)((uint)iVar3 >> 8); if ((*(char *)(lVar1 + 0x7e7) != '\0') && (cVar2 = _ma_log_delete(param_1,__dest,0,iVar4,0,0x12), cVar2 != '\0')) { return 0xffffffff; } return 0; }
8,295
my_mutex_end
eloqsql/mysys/thr_mutex.c
void my_mutex_end() { #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP pthread_mutexattr_destroy(&my_fast_mutexattr); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP pthread_mutexattr_destroy(&my_errorcheck_mutexattr); #endif }
O0
c
my_mutex_end: pushq %rbp movq %rsp, %rbp leaq 0xb897b5(%rip), %rdi # 0xc83630 callq 0x2a200 leaq 0xb897ad(%rip), %rdi # 0xc83634 callq 0x2a200 popq %rbp retq nop
my_mutex_end: push rbp mov rbp, rsp lea rdi, my_fast_mutexattr call _pthread_mutexattr_destroy lea rdi, my_errorcheck_mutexattr call _pthread_mutexattr_destroy pop rbp retn
long long my_mutex_end() { pthread_mutexattr_destroy(&my_fast_mutexattr); return pthread_mutexattr_destroy(&my_errorcheck_mutexattr); }
my_mutex_end: PUSH RBP MOV RBP,RSP LEA RDI,[0xd83630] CALL 0x0012a200 LEA RDI,[0xd83634] CALL 0x0012a200 POP RBP RET
void my_mutex_end(void) { pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr); return; }
8,296
MNN::Express::Executor::RuntimeManager::createRuntimeManager(MNN::ScheduleConfig const&)
mnn-tts/MNN/express/Executor.cpp
Executor::RuntimeManager* Executor::RuntimeManager::createRuntimeManager(const ScheduleConfig &config) { auto res = new RuntimeManager; auto glo = ExecutorScope::Current(); std::lock_guard<std::mutex> _l(glo->mMutex); auto& originRt = glo->mRuntimeInfo; auto type = Schedule::getApprociateType(config); int numThread = config.numThread; if(config.type == MNN_FORWARD_AUTO) { if(type == MNN_FORWARD_OPENCL || type == MNN_FORWARD_METAL) { // AUTO set default gpu-mode MNN_GPU_TUNING_FAST numThread = 16; } } auto rt = glo->_getOrCreateRuntime(type, config.backendConfig, numThread, false); res->mInside->mRuntime.second = originRt.second; res->mInside->mRuntime.first.insert(std::make_pair(type, rt)); res->mInside->mInfo = rt; res->mInside->mContent->mNumberThread = numThread; if (nullptr != config.backendConfig) { res->mInside->mContent->mConfig = *config.backendConfig; res->mInside->mContent->mUserConfig = true; } else { res->mInside->mContent->mUserConfig = false; } return res; }
O0
cpp
MNN::Express::Executor::RuntimeManager::createRuntimeManager(MNN::ScheduleConfig const&): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movl $0x30, %edi callq 0x123b0 movq %rax, %rdi movq %rdi, 0x20(%rsp) callq 0x121d0 movq 0x20(%rsp), %rax movq %rax, 0x88(%rsp) leaq 0x78(%rsp), %rdi callq 0x12420 leaq 0x78(%rsp), %rdi callq 0x14ac0 movq %rax, %rsi addq $0x70, %rsi leaq 0x70(%rsp), %rdi callq 0x12fa0 leaq 0x78(%rsp), %rdi callq 0x14ac0 addq $0x8, %rax movq %rax, 0x68(%rsp) movq 0x90(%rsp), %rdi callq 0x12330 movl %eax, 0x64(%rsp) movq 0x90(%rsp), %rax movl 0x1c(%rax), %eax movl %eax, 0x60(%rsp) movq 0x90(%rsp), %rax cmpl $0x4, 0x18(%rax) jne 0x14e61 cmpl $0x3, 0x64(%rsp) je 0x14e57 cmpl $0x1, 0x64(%rsp) jne 0x14e5f movl $0x10, 0x60(%rsp) jmp 0x14e61 leaq 0x78(%rsp), %rdi callq 0x14ac0 movq %rax, %rsi movl 0x64(%rsp), %edx movq 0x90(%rsp), %rax movq 0x60(%rax), %rcx movl 0x60(%rsp), %r8d leaq 0x50(%rsp), %rdi xorl %r9d, %r9d callq 0x121e0 movq 0x68(%rsp), %rsi addq $0x18, %rsi movq 0x88(%rsp), %rax movq 0x28(%rax), %rdi addq $0x10, %rdi addq $0x18, %rdi callq 0x13bc0 movq 0x88(%rsp), %rax movq 0x28(%rax), %rax addq $0x10, %rax movq %rax, 0x10(%rsp) leaq 0x38(%rsp), %rdi leaq 0x64(%rsp), %rsi leaq 0x50(%rsp), %rdx callq 0x13690 movq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x13630 movq %rax, 0x28(%rsp) movb %dl, 0x30(%rsp) leaq 0x38(%rsp), %rdi callq 0x136d0 movq 0x88(%rsp), %rax movq 0x28(%rax), %rdi addq $0x38, %rdi leaq 0x50(%rsp), %rsi callq 0x13bc0 movl 0x60(%rsp), %eax movl %eax, 0x1c(%rsp) movq 0x88(%rsp), %rax movq 0x28(%rax), %rdi callq 0x15090 movl 0x1c(%rsp), %ecx movl %ecx, 0xb4(%rax) movq 0x90(%rsp), %rcx xorl %eax, %eax cmpq 0x60(%rcx), %rax je 0x14fab movq 0x90(%rsp), %rax movq 0x60(%rax), %rax movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rax movq 0x28(%rax), %rdi callq 0x15090 movq 0x8(%rsp), %rcx movq (%rcx), %rdx movq %rdx, 0x98(%rax) movq 0x8(%rcx), %rdx movq %rdx, 0xa0(%rax) movq 0x10(%rcx), %rcx movq %rcx, 0xa8(%rax) movq 0x88(%rsp), %rax movq 0x28(%rax), %rdi callq 0x15090 movb $0x1, 0xb0(%rax) jmp 0x14fc3 movq 0x88(%rsp), %rax movq 0x28(%rax), %rdi callq 0x15090 movb $0x0, 0xb0(%rax) movq 0x88(%rsp), %rax movq %rax, (%rsp) leaq 0x50(%rsp), %rdi callq 0x132c0 leaq 0x70(%rsp), %rdi callq 0x13300 leaq 0x78(%rsp), %rdi callq 0x14b10 movq (%rsp), %rax addq $0x98, %rsp retq nopl (%rax)
_ZN3MNN7Express8Executor14RuntimeManager20createRuntimeManagerERKNS_14ScheduleConfigE: sub rsp, 98h mov [rsp+98h+var_8], rdi mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov [rsp+98h+var_78], rdi call __ZN3MNN7Express8Executor14RuntimeManagerC2Ev; MNN::Express::Executor::RuntimeManager::RuntimeManager(void) mov rax, [rsp+98h+var_78] mov [rsp+98h+var_10], rax lea rdi, [rsp+98h+var_20]; this call __ZN3MNN7Express13ExecutorScope7CurrentEv; MNN::Express::ExecutorScope::Current(void) lea rdi, [rsp+98h+var_20] call _ZNKSt3__110shared_ptrIN3MNN7Express8ExecutorEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Executor>::operator->(void) mov rsi, rax add rsi, 70h ; 'p' lea rdi, [rsp+98h+var_28] call _ZNSt3__110lock_guardINS_5mutexEEC2B8nn200100ERS1_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) lea rdi, [rsp+98h+var_20] call _ZNKSt3__110shared_ptrIN3MNN7Express8ExecutorEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Executor>::operator->(void) add rax, 8 mov [rsp+98h+var_30], rax mov rdi, [rsp+98h+var_8] call __ZN3MNN8Schedule17getApprociateTypeERKNS_14ScheduleConfigE; MNN::Schedule::getApprociateType(MNN::ScheduleConfig const&) mov [rsp+98h+var_34], eax mov rax, [rsp+98h+var_8] mov eax, [rax+1Ch] mov [rsp+98h+var_38], eax mov rax, [rsp+98h+var_8] cmp dword ptr [rax+18h], 4 jnz short loc_14E61 cmp [rsp+98h+var_34], 3 jz short loc_14E57 cmp [rsp+98h+var_34], 1 jnz short loc_14E5F loc_14E57: mov [rsp+98h+var_38], 10h loc_14E5F: jmp short $+2 loc_14E61: lea rdi, [rsp+98h+var_20] call _ZNKSt3__110shared_ptrIN3MNN7Express8ExecutorEEptB8nn200100Ev; std::shared_ptr<MNN::Express::Executor>::operator->(void) mov rsi, rax mov edx, [rsp+98h+var_34] mov rax, [rsp+98h+var_8] mov rcx, [rax+60h] mov r8d, [rsp+98h+var_38] lea rdi, [rsp+98h+var_48] xor r9d, r9d call __ZN3MNN7Express8Executor19_getOrCreateRuntimeE14MNNForwardTypePKNS_13BackendConfigEib; MNN::Express::Executor::_getOrCreateRuntime(MNNForwardType,MNN::BackendConfig const*,int,bool) mov rsi, [rsp+98h+var_30] add rsi, 18h mov rax, [rsp+98h+var_10] mov rdi, [rax+28h] add rdi, 10h add rdi, 18h call _ZNSt3__110shared_ptrIN3MNN7RuntimeEEaSB8nn200100ERKS3_; std::shared_ptr<MNN::Runtime>::operator=(std::shared_ptr<MNN::Runtime> const&) mov rax, [rsp+98h+var_10] mov rax, [rax+28h] add rax, 10h mov [rsp+98h+var_88], rax lea rdi, [rsp+98h+var_60] lea rsi, [rsp+98h+var_34] lea rdx, [rsp+98h+var_48] call _ZNSt3__19make_pairB8nn200100IR14MNNForwardTypeRNS_10shared_ptrIN3MNN7RuntimeEEEEENS_4pairINS_18__unwrap_referenceIu7__decayIT_EE4typeENS9_Iu7__decayIT0_EE4typeEEEOSA_OSE_ mov rdi, [rsp+98h+var_88] lea rsi, [rsp+98h+var_60] call _ZNSt3__13mapI14MNNForwardTypeNS_10shared_ptrIN3MNN7RuntimeEEENS_4lessIS1_EENS_9allocatorINS_4pairIKS1_S5_EEEEE6insertB8nn200100INS9_IS1_S5_EETnNS_9enable_ifIXsr16is_constructibleISB_T_EE5valueEiE4typeELi0EEENS9_INS_14__map_iteratorINS_15__tree_iteratorINS_12__value_typeIS1_S5_EEPNS_11__tree_nodeISN_PvEElEEEEbEEOSH_ mov [rsp+98h+var_70], rax mov [rsp+98h+var_68], dl lea rdi, [rsp+98h+var_60] call _ZNSt3__14pairI14MNNForwardTypeNS_10shared_ptrIN3MNN7RuntimeEEEED2Ev; std::pair<MNNForwardType,std::shared_ptr<MNN::Runtime>>::~pair() mov rax, [rsp+98h+var_10] mov rdi, [rax+28h] add rdi, 38h ; '8' lea rsi, [rsp+98h+var_48] call _ZNSt3__110shared_ptrIN3MNN7RuntimeEEaSB8nn200100ERKS3_; std::shared_ptr<MNN::Runtime>::operator=(std::shared_ptr<MNN::Runtime> const&) mov eax, [rsp+98h+var_38] mov [rsp+98h+var_7C], eax mov rax, [rsp+98h+var_10] mov rdi, [rax+28h] call _ZNKSt3__110shared_ptrIN3MNN7Express11RuntimeAttr9ImmutableEEptB8nn200100Ev; std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->(void) mov ecx, [rsp+98h+var_7C] mov [rax+0B4h], ecx mov rcx, [rsp+98h+var_8] xor eax, eax cmp rax, [rcx+60h] jz short loc_14FAB mov rax, [rsp+98h+var_8] mov rax, [rax+60h] mov [rsp+98h+var_90], rax mov rax, [rsp+98h+var_10] mov rdi, [rax+28h] call _ZNKSt3__110shared_ptrIN3MNN7Express11RuntimeAttr9ImmutableEEptB8nn200100Ev; std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->(void) mov rcx, [rsp+98h+var_90] mov rdx, [rcx] mov [rax+98h], rdx mov rdx, [rcx+8] mov [rax+0A0h], rdx mov rcx, [rcx+10h] mov [rax+0A8h], rcx mov rax, [rsp+98h+var_10] mov rdi, [rax+28h] call _ZNKSt3__110shared_ptrIN3MNN7Express11RuntimeAttr9ImmutableEEptB8nn200100Ev; std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->(void) mov byte ptr [rax+0B0h], 1 jmp short loc_14FC3 loc_14FAB: mov rax, [rsp+98h+var_10] mov rdi, [rax+28h] call _ZNKSt3__110shared_ptrIN3MNN7Express11RuntimeAttr9ImmutableEEptB8nn200100Ev; std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->(void) mov byte ptr [rax+0B0h], 0 loc_14FC3: mov rax, [rsp+98h+var_10] mov [rsp+98h+var_98], rax lea rdi, [rsp+98h+var_48] call _ZNSt3__110shared_ptrIN3MNN7RuntimeEED2B8nn200100Ev; std::shared_ptr<MNN::Runtime>::~shared_ptr() lea rdi, [rsp+98h+var_28] call _ZNSt3__110lock_guardINS_5mutexEED2B8nn200100Ev; std::lock_guard<std::mutex>::~lock_guard() lea rdi, [rsp+98h+var_20] call _ZNSt3__110shared_ptrIN3MNN7Express8ExecutorEED2B8nn200100Ev; std::shared_ptr<MNN::Express::Executor>::~shared_ptr() mov rax, [rsp+98h+var_98] add rsp, 98h retn
MNN::Express::Executor::RuntimeManager * MNN::Express::Executor::RuntimeManager::createRuntimeManager( MNN::Express::Executor::RuntimeManager *this, const MNN::ScheduleConfig *a2) { std::mutex *v2; // rsi long long v3; // rax _QWORD *v4; // rax MNN::Express::Executor::RuntimeManager *v6; // [rsp+0h] [rbp-98h] _QWORD *v7; // [rsp+8h] [rbp-90h] long long v8; // [rsp+10h] [rbp-88h] unsigned int v9; // [rsp+1Ch] [rbp-7Ch] MNN::Express::Executor::RuntimeManager *v10; // [rsp+20h] [rbp-78h] _BYTE v11[24]; // [rsp+38h] [rbp-60h] BYREF _QWORD v12[2]; // [rsp+50h] [rbp-48h] BYREF unsigned int v13; // [rsp+60h] [rbp-38h] unsigned int ApprociateType; // [rsp+64h] [rbp-34h] BYREF long long v15; // [rsp+68h] [rbp-30h] std::mutex *v16; // [rsp+70h] [rbp-28h] BYREF _BYTE v17[16]; // [rsp+78h] [rbp-20h] BYREF MNN::Express::Executor::RuntimeManager *v18; // [rsp+88h] [rbp-10h] MNN::Schedule *v19; // [rsp+90h] [rbp-8h] v19 = this; v10 = (MNN::Express::Executor::RuntimeManager *)operator new(0x30uLL); MNN::Express::Executor::RuntimeManager::RuntimeManager(v10); v18 = v10; MNN::Express::ExecutorScope::Current((MNN::Express::ExecutorScope *)v17); v2 = (std::mutex *)(std::shared_ptr<MNN::Express::Executor>::operator->[abi:nn200100]((long long)v17) + 112); std::lock_guard<std::mutex>::lock_guard[abi:nn200100](&v16, v2); v15 = std::shared_ptr<MNN::Express::Executor>::operator->[abi:nn200100]((long long)v17) + 8; ApprociateType = MNN::Schedule::getApprociateType(v19, v2); v13 = *((_DWORD *)v19 + 7); if ( *((_DWORD *)v19 + 6) == 4 && (ApprociateType == 3 || ApprociateType == 1) ) v13 = 16; v3 = std::shared_ptr<MNN::Express::Executor>::operator->[abi:nn200100]((long long)v17); MNN::Express::Executor::_getOrCreateRuntime(v12, v3, ApprociateType, *((_QWORD *)v19 + 12), v13, 0LL); std::shared_ptr<MNN::Runtime>::operator=[abi:nn200100](*((_QWORD *)v18 + 5) + 40LL, (_QWORD *)(v15 + 24)); v8 = *((_QWORD *)v18 + 5) + 16LL; std::make_pair[abi:nn200100]<MNNForwardType &,std::shared_ptr<MNN::Runtime> &>( (long long)v11, (long long)&ApprociateType, (long long)v12); ZNSt3__13mapI14MNNForwardTypeNS_10shared_ptrIN3MNN7RuntimeEEENS_4lessIS1_EENS_9allocatorINS_4pairIKS1_S5_EEEEE6insertB8nn200100INS9_IS1_S5_EETnNS_9enable_ifIXsr16is_constructibleISB_T_EE5valueEiE4typeELi0EEENS9_INS_14__map_iteratorINS_15__tree_iteratorINS_12__value_typeIS1_S5_EEPNS_11__tree_nodeISN_PvEElEEEEbEEOSH_( v8, (long long)v11); std::pair<MNNForwardType,std::shared_ptr<MNN::Runtime>>::~pair((long long)v11); std::shared_ptr<MNN::Runtime>::operator=[abi:nn200100](*((_QWORD *)v18 + 5) + 56LL, v12); v9 = v13; *(_DWORD *)(std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi:nn200100](*((_QWORD *)v18 + 5)) + 180) = v9; if ( *((_QWORD *)v19 + 12) ) { v7 = (_QWORD *)*((_QWORD *)v19 + 12); v4 = (_QWORD *)std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi:nn200100](*((_QWORD *)v18 + 5)); v4[19] = *v7; v4[20] = v7[1]; v4[21] = v7[2]; *(_BYTE *)(std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi:nn200100](*((_QWORD *)v18 + 5)) + 176) = 1; } else { *(_BYTE *)(std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi:nn200100](*((_QWORD *)v18 + 5)) + 176) = 0; } v6 = v18; std::shared_ptr<MNN::Runtime>::~shared_ptr[abi:nn200100]((long long)v12); std::lock_guard<std::mutex>::~lock_guard[abi:nn200100](&v16); std::shared_ptr<MNN::Express::Executor>::~shared_ptr[abi:nn200100]((long long)v17); return v6; }
createRuntimeManager: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV EDI,0x30 CALL 0x001123b0 MOV RDI,RAX MOV qword ptr [RSP + 0x20],RDI CALL 0x001121d0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x88],RAX LEA RDI,[RSP + 0x78] CALL 0x00112420 LEA RDI,[RSP + 0x78] CALL 0x00114ac0 MOV RSI,RAX ADD RSI,0x70 LEA RDI,[RSP + 0x70] CALL 0x00112fa0 LEA RDI,[RSP + 0x78] CALL 0x00114ac0 ADD RAX,0x8 MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x00112330 MOV dword ptr [RSP + 0x64],EAX MOV RAX,qword ptr [RSP + 0x90] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RSP + 0x60],EAX MOV RAX,qword ptr [RSP + 0x90] CMP dword ptr [RAX + 0x18],0x4 JNZ 0x00114e61 CMP dword ptr [RSP + 0x64],0x3 JZ 0x00114e57 CMP dword ptr [RSP + 0x64],0x1 JNZ 0x00114e5f LAB_00114e57: MOV dword ptr [RSP + 0x60],0x10 LAB_00114e5f: JMP 0x00114e61 LAB_00114e61: LEA RDI,[RSP + 0x78] CALL 0x00114ac0 MOV RSI,RAX MOV EDX,dword ptr [RSP + 0x64] MOV RAX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RAX + 0x60] MOV R8D,dword ptr [RSP + 0x60] LEA RDI,[RSP + 0x50] XOR R9D,R9D CALL 0x001121e0 MOV RSI,qword ptr [RSP + 0x68] ADD RSI,0x18 MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX + 0x28] ADD RDI,0x10 ADD RDI,0x18 CALL 0x00113bc0 MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x28] ADD RAX,0x10 MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x64] LEA RDX,[RSP + 0x50] CALL 0x00113690 MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x38] CALL 0x00113630 MOV qword ptr [RSP + 0x28],RAX MOV byte ptr [RSP + 0x30],DL LEA RDI,[RSP + 0x38] CALL 0x001136d0 MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX + 0x28] ADD RDI,0x38 LEA RSI,[RSP + 0x50] CALL 0x00113bc0 MOV EAX,dword ptr [RSP + 0x60] MOV dword ptr [RSP + 0x1c],EAX MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00115090 MOV ECX,dword ptr [RSP + 0x1c] MOV dword ptr [RAX + 0xb4],ECX MOV RCX,qword ptr [RSP + 0x90] XOR EAX,EAX CMP RAX,qword ptr [RCX + 0x60] JZ 0x00114fab MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00115090 MOV RCX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX + 0x98],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0xa0],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00115090 MOV byte ptr [RAX + 0xb0],0x1 JMP 0x00114fc3 LAB_00114fab: MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00115090 MOV byte ptr [RAX + 0xb0],0x0 LAB_00114fc3: MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x50] CALL 0x001132c0 LEA RDI,[RSP + 0x70] CALL 0x00113300 LEA RDI,[RSP + 0x78] CALL 0x00114b10 MOV RAX,qword ptr [RSP] ADD RSP,0x98 RET
/* MNN::Express::Executor::RuntimeManager::createRuntimeManager(MNN::ScheduleConfig const&) */ RuntimeManager * MNN::Express::Executor::RuntimeManager::createRuntimeManager(ScheduleConfig *param_1) { int8 *puVar1; int4 uVar2; RuntimeManager *pRVar3; long lVar4; int8 uVar5; __decay local_60 [24]; shared_ptr local_48 [16]; int4 local_38; int local_34; long local_30; lock_guard<std::mutex> local_28 [8]; ExecutorScope local_20 [16]; RuntimeManager *local_10; ScheduleConfig *local_8; local_8 = param_1; pRVar3 = (RuntimeManager *)operator_new(0x30); RuntimeManager(pRVar3); local_10 = pRVar3; ExecutorScope::Current(local_20); lVar4 = std::shared_ptr<MNN::Express::Executor>::operator->[abi_nn200100_((Executor> *)local_20); std::lock_guard<std::mutex>::lock_guard_abi_nn200100_(local_28,(mutex *)(lVar4 + 0x70)); local_30 = std::shared_ptr<MNN::Express::Executor>::operator->[abi_nn200100_ ((Executor> *)local_20); local_30 = local_30 + 8; local_34 = MNN::Schedule::getApprociateType(local_8); local_38 = *(int4 *)(local_8 + 0x1c); if ((*(int *)(local_8 + 0x18) == 4) && ((local_34 == 3 || (local_34 == 1)))) { local_38 = 0x10; } uVar5 = std::shared_ptr<MNN::Express::Executor>::operator->[abi_nn200100_((Executor> *)local_20); _getOrCreateRuntime(local_48,uVar5,local_34,*(int8 *)(local_8 + 0x60),local_38,0); std::shared_ptr<MNN::Runtime>::operator=[abi_nn200100_ ((shared_ptr<MNN::Runtime> *)(*(long *)(local_10 + 0x28) + 0x28), (shared_ptr *)(local_30 + 0x18)); lVar4 = *(long *)(local_10 + 0x28); std::make_pair_abi_nn200100_<MNNForwardType&,std::shared_ptr<MNN::Runtime>&> (local_60,(__decay *)&local_34); _ZNSt3__13mapI14MNNForwardTypeNS_10shared_ptrIN3MNN7RuntimeEEENS_4lessIS1_EENS_9allocatorINS_4pairIKS1_S5_EEEEE6insertB8nn200100INS9_IS1_S5_EETnNS_9enable_ifIXsr16is_constructibleISB_T_EE5valueEiE4typeELi0EEENS9_INS_14__map_iteratorINS_15__tree_iteratorINS_12__value_typeIS1_S5_EEPNS_11__tree_nodeISN_PvEElEEEEbEEOSH_ (lVar4 + 0x10,local_60); std::pair<MNNForwardType,std::shared_ptr<MNN::Runtime>>::~pair ((pair<MNNForwardType,std::shared_ptr<MNN::Runtime>> *)local_60); std::shared_ptr<MNN::Runtime>::operator=[abi_nn200100_ ((shared_ptr<MNN::Runtime> *)(*(long *)(local_10 + 0x28) + 0x38),local_48); uVar2 = local_38; lVar4 = std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi_nn200100_ (*(Immutable> **)(local_10 + 0x28)); *(int4 *)(lVar4 + 0xb4) = uVar2; if (*(long *)(local_8 + 0x60) == 0) { lVar4 = std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi_nn200100_ (*(Immutable> **)(local_10 + 0x28)); *(int1 *)(lVar4 + 0xb0) = 0; } else { puVar1 = *(int8 **)(local_8 + 0x60); lVar4 = std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi_nn200100_ (*(Immutable> **)(local_10 + 0x28)); *(int8 *)(lVar4 + 0x98) = *puVar1; *(int8 *)(lVar4 + 0xa0) = puVar1[1]; *(int8 *)(lVar4 + 0xa8) = puVar1[2]; lVar4 = std::shared_ptr<MNN::Express::RuntimeAttr::Immutable>::operator->[abi_nn200100_ (*(Immutable> **)(local_10 + 0x28)); *(int1 *)(lVar4 + 0xb0) = 1; } pRVar3 = local_10; std::shared_ptr<MNN::Runtime>::~shared_ptr_abi_nn200100_((shared_ptr<MNN::Runtime> *)local_48); std::lock_guard<std::mutex>::~lock_guard_abi_nn200100_(local_28); std::shared_ptr<MNN::Express::Executor>::~shared_ptr_abi_nn200100_ ((shared_ptr<MNN::Express::Executor> *)local_20); return pRVar3; }
8,297
pvio_socket_is_blocking
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_is_blocking(MARIADB_PVIO *pvio) { struct st_pvio_socket *csock= NULL; my_bool r; if (!pvio || !pvio->data) return 0; csock= (struct st_pvio_socket *)pvio->data; r = !(csock->fcntl_mode & O_NONBLOCK); return r; }
O3
c
pvio_socket_is_blocking: testq %rdi, %rdi je 0x2fe27 movq (%rdi), %rax testq %rax, %rax je 0x2fe27 pushq %rbp movq %rsp, %rbp testb $0x8, 0x5(%rax) sete %al popq %rbp retq xorl %eax, %eax retq
pvio_socket_is_blocking: test rdi, rdi jz short loc_2FE27 mov rax, [rdi] test rax, rax jz short loc_2FE27 push rbp mov rbp, rsp test byte ptr [rax+5], 8 setz al pop rbp retn loc_2FE27: xor eax, eax retn
bool pvio_socket_is_blocking(long long a1) { return a1 && *(_QWORD *)a1 && (*(_BYTE *)(*(_QWORD *)a1 + 5LL) & 8) == 0; }
pvio_socket_is_blocking: TEST RDI,RDI JZ 0x0012fe27 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0012fe27 PUSH RBP MOV RBP,RSP TEST byte ptr [RAX + 0x5],0x8 SETZ AL POP RBP RET LAB_0012fe27: XOR EAX,EAX RET
int8 pvio_socket_is_blocking(long *param_1) { long lVar1; if ((param_1 != (long *)0x0) && (lVar1 = *param_1, lVar1 != 0)) { return CONCAT71((int7)((ulong)lVar1 >> 8),(*(byte *)(lVar1 + 5) & 8) == 0); } return 0; }
8,298
minja::VariableExpr::~VariableExpr()
monkey531[P]llama/common/minja.hpp
VariableExpr(const Location & location, const std::string& n) : Expression(location), name(n) {}
O3
cpp
minja::VariableExpr::~VariableExpr(): pushq %rbx movq %rdi, %rbx leaq 0x9274d(%rip), %rax # 0x12adc0 addq $0x10, %rax movq %rax, (%rdi) movq 0x20(%rdi), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0x98692 movq (%rax), %rsi incq %rsi callq 0x1a8d0 leaq 0x91d1f(%rip), %rax # 0x12a3b8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x986ae callq 0x6d59a movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1a8d0
_ZN5minja12VariableExprD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+20h]; void * lea rax, [rbx+30h] cmp rdi, rax jz short loc_98692 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_98692: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_986AE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_986AE: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::VariableExpr::~VariableExpr(minja::VariableExpr *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::VariableExpr + 2; v2 = (char *)*((_QWORD *)this + 4); if ( v2 != (char *)this + 48 ) operator delete(v2, *((_QWORD *)this + 6) + 1LL); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~VariableExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x22adc0] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x20] LEA RAX,[RBX + 0x30] CMP RDI,RAX JZ 0x00198692 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a8d0 LAB_00198692: LEA RAX,[0x22a3b8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x001986ae CALL 0x0016d59a LAB_001986ae: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011a8d0
/* minja::VariableExpr::~VariableExpr() */ void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this) { *(int ***)this = &PTR_do_evaluate_0022add0; if (*(VariableExpr **)(this + 0x20) != this + 0x30) { operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1); } *(int ***)this = &PTR___cxa_pure_virtual_0022a3c8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); } operator_delete(this,0x40); return; }
8,299
ImPlot3D::GetAutoColor(int)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
ImVec4 GetAutoColor(ImPlot3DCol idx) { switch (idx) { case ImPlot3DCol_Line: return IMPLOT3D_AUTO_COL; // Plot dependent case ImPlot3DCol_Fill: return IMPLOT3D_AUTO_COL; // Plot dependent case ImPlot3DCol_MarkerOutline: return IMPLOT3D_AUTO_COL; // Plot dependent case ImPlot3DCol_MarkerFill: return IMPLOT3D_AUTO_COL; // Plot dependent case ImPlot3DCol_TitleText: return ImGui::GetStyleColorVec4(ImGuiCol_Text); case ImPlot3DCol_InlayText: return ImGui::GetStyleColorVec4(ImGuiCol_Text); case ImPlot3DCol_FrameBg: return ImGui::GetStyleColorVec4(ImGuiCol_FrameBg); case ImPlot3DCol_PlotBg: return ImGui::GetStyleColorVec4(ImGuiCol_WindowBg); case ImPlot3DCol_PlotBorder: return ImGui::GetStyleColorVec4(ImGuiCol_Border); case ImPlot3DCol_LegendBg: return ImGui::GetStyleColorVec4(ImGuiCol_PopupBg); case ImPlot3DCol_LegendBorder: return ImGui::GetStyleColorVec4(ImGuiCol_Border); case ImPlot3DCol_LegendText: return ImGui::GetStyleColorVec4(ImGuiCol_Text); case ImPlot3DCol_AxisText: return ImGui::GetStyleColorVec4(ImGuiCol_Text); case ImPlot3DCol_AxisGrid: return ImGui::GetStyleColorVec4(ImGuiCol_Text) * ImVec4(1, 1, 1, 0.25f); case ImPlot3DCol_AxisTick: return GetStyleColorVec4(ImPlot3DCol_AxisGrid); default: return IMPLOT3D_AUTO_COL; } }
O1
cpp
ImPlot3D::GetAutoColor(int): pushq %rax addl $-0x4, %edi cmpl $0xa, %edi ja 0x53f85 leaq 0x24085f(%rip), %rax # 0x294770 movslq (%rax,%rdi,4), %rcx addq %rax, %rcx jmpq *%rcx xorl %edi, %edi jmp 0x53f75 movl $0x5, %edi jmp 0x53f75 movl $0x7, %edi jmp 0x53f75 movl $0x2, %edi jmp 0x53f75 movq 0x2e2d5e(%rip), %rax # 0x336c98 movss 0x1bc(%rax), %xmm0 ucomiss 0x23b0bb(%rip), %xmm0 # 0x28f004 jne 0x53f92 jp 0x53f92 xorl %edi, %edi callq 0x215eee movsd (%rax), %xmm0 movups (%rax), %xmm1 movss 0xc(%rax), %xmm2 mulss 0x240410(%rip), %xmm2 # 0x294378 movhlps %xmm1, %xmm1 # xmm1 = xmm1[1,1] unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] jmp 0x53f83 movl $0x4, %edi callq 0x215eee movsd (%rax), %xmm0 movsd 0x8(%rax), %xmm1 popq %rax retq movsd 0x240603(%rip), %xmm1 # 0x294590 xorps %xmm0, %xmm0 jmp 0x53f83 movsd 0x1b0(%rax), %xmm0 movsd 0x1b8(%rax), %xmm1 jmp 0x53f83
_ZN8ImPlot3D12GetAutoColorEi: push rax add edi, 0FFFFFFFCh; switch 11 cases cmp edi, 0Ah ja short def_53F18; jumptable 0000000000053F18 default case lea rax, jpt_53F18 movsxd rcx, ds:(jpt_53F18 - 294770h)[rax+rdi*4] add rcx, rax jmp rcx; switch jump loc_53F1A: xor edi, edi; jumptable 0000000000053F18 cases 4,5,11,12 jmp short loc_53F75 loc_53F1E: mov edi, 5; jumptable 0000000000053F18 cases 8,10 jmp short loc_53F75 loc_53F25: mov edi, 7; jumptable 0000000000053F18 case 6 jmp short loc_53F75 loc_53F2C: mov edi, 2; jumptable 0000000000053F18 case 7 jmp short loc_53F75 loc_53F33: mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; jumptable 0000000000053F18 case 14 movss xmm0, dword ptr [rax+1BCh] ucomiss xmm0, cs:flt_28F004 jnz short loc_53F92 jp short loc_53F92 loc_53F4D: xor edi, edi; jumptable 0000000000053F18 case 13 call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int) movsd xmm0, qword ptr [rax] movups xmm1, xmmword ptr [rax] movss xmm2, dword ptr [rax+0Ch] mulss xmm2, cs:flt_294378 movhlps xmm1, xmm1 unpcklps xmm1, xmm2 jmp short loc_53F83 loc_53F70: mov edi, offset byte_4; jumptable 0000000000053F18 case 9 loc_53F75: call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int) movsd xmm0, qword ptr [rax] movsd xmm1, qword ptr [rax+8] loc_53F83: pop rax retn def_53F18: movsd xmm1, qword ptr cs:xmmword_294590; jumptable 0000000000053F18 default case xorps xmm0, xmm0 jmp short loc_53F83 loc_53F92: movsd xmm0, qword ptr [rax+1B0h] movsd xmm1, qword ptr [rax+1B8h] jmp short loc_53F83
double __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> ImPlot3D::GetAutoColor(ImPlot3D *this, int a2) { ImGui *v2; // rdi double result; // xmm0_8 switch ( (int)this ) { case 4: case 5: case 11: case 12: v2 = 0LL; return *(double *)ImGui::GetStyleColorVec4(v2, a2); case 6: v2 = (ImGui *)&byte_7; return *(double *)ImGui::GetStyleColorVec4(v2, a2); case 7: v2 = (ImGui *)(&dword_0 + 2); return *(double *)ImGui::GetStyleColorVec4(v2, a2); case 8: case 10: v2 = (ImGui *)&byte_5; return *(double *)ImGui::GetStyleColorVec4(v2, a2); case 9: v2 = (ImGui *)&byte_4; return *(double *)ImGui::GetStyleColorVec4(v2, a2); case 13: goto LABEL_7; case 14: if ( *((float *)ImPlot3D::GImPlot3D + 111) == -1.0 ) LABEL_7: result = *(double *)ImGui::GetStyleColorVec4(0LL, a2); else result = *((double *)ImPlot3D::GImPlot3D + 54); break; default: result = 0.0; break; } return result; }
GetAutoColor: PUSH RAX ADD EDI,-0x4 CMP EDI,0xa JA 0x00153f85 LEA RAX,[0x394770] MOVSXD RCX,dword ptr [RAX + RDI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_4: XOR EDI,EDI JMP 0x00153f75 caseD_8: MOV EDI,0x5 JMP 0x00153f75 caseD_6: MOV EDI,0x7 JMP 0x00153f75 caseD_7: MOV EDI,0x2 JMP 0x00153f75 caseD_e: MOV RAX,qword ptr [0x00436c98] MOVSS XMM0,dword ptr [RAX + 0x1bc] UCOMISS XMM0,dword ptr [0x0038f004] JNZ 0x00153f92 JP 0x00153f92 caseD_d: XOR EDI,EDI CALL 0x00315eee MOVSD XMM0,qword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX] MOVSS XMM2,dword ptr [RAX + 0xc] MULSS XMM2,dword ptr [0x00394378] MOVHLPS XMM1,XMM1 UNPCKLPS XMM1,XMM2 JMP 0x00153f83 caseD_9: MOV EDI,0x4 LAB_00153f75: CALL 0x00315eee MOVSD XMM0,qword ptr [RAX] MOVSD XMM1,qword ptr [RAX + 0x8] default: POP RAX RET LAB_00153f85: MOVSD XMM1,qword ptr [0x00394590] XORPS XMM0,XMM0 JMP 0x00153f83 LAB_00153f92: MOVSD XMM0,qword ptr [RAX + 0x1b0] MOVSD XMM1,qword ptr [RAX + 0x1b8] JMP 0x00153f83
/* ImPlot3D::GetAutoColor(int) */ int8 ImPlot3D::GetAutoColor(int param_1) { int8 in_RAX; int iVar1; switch(param_1) { case 4: case 5: case 0xb: case 0xc: iVar1 = 0; break; case 6: iVar1 = 7; break; case 7: iVar1 = 2; break; case 8: case 10: iVar1 = 5; break; case 9: iVar1 = 4; break; case 0xe: if (*(float *)(GImPlot3D + 0x1bc) != DAT_0038f004) { return in_RAX; } if (NAN(*(float *)(GImPlot3D + 0x1bc)) || NAN(DAT_0038f004)) { return in_RAX; } case 0xd: ImGui::GetStyleColorVec4(0); return in_RAX; default: goto switchD_00153f18_default; } ImGui::GetStyleColorVec4(iVar1); switchD_00153f18_default: return in_RAX; }