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
48,700
mysql_stmt_bind_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) { uint i; if (stmt->state < MYSQL_STMT_PREPARED) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->field_count) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_STMT_METADATA, SQLSTATE_UNKNOWN, 0); return(1); } if (!bind) return(1); /* In case of a stored procedure we don't allocate memory for bind in mysql_stmt_prepare */ if (stmt->field_count && !stmt->bind) { MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } } memcpy(stmt->bind, bind, sizeof(MYSQL_BIND) * stmt->field_count); for (i=0; i < stmt->field_count; i++) { if (stmt->mysql->methods->db_supported_buffer_type && !stmt->mysql->methods->db_supported_buffer_type(bind[i].buffer_type)) { SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->bind[i].is_null) stmt->bind[i].is_null= &stmt->bind[i].is_null_value; if (!stmt->bind[i].length) stmt->bind[i].length= &stmt->bind[i].length_value; if (!stmt->bind[i].error) stmt->bind[i].error= &stmt->bind[i].error_value; /* set length values for numeric types */ switch(bind[i].buffer_type) { case MYSQL_TYPE_NULL: *stmt->bind[i].length= stmt->bind[i].length_value= 0; break; case MYSQL_TYPE_TINY: *stmt->bind[i].length= stmt->bind[i].length_value= 1; break; case MYSQL_TYPE_SHORT: case MYSQL_TYPE_YEAR: *stmt->bind[i].length= stmt->bind[i].length_value= 2; break; case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: case MYSQL_TYPE_FLOAT: *stmt->bind[i].length= stmt->bind[i].length_value= 4; break; case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_DOUBLE: *stmt->bind[i].length= stmt->bind[i].length_value= 8; break; case MYSQL_TYPE_TIME: case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: *stmt->bind[i].length= stmt->bind[i].length_value= sizeof(MYSQL_TIME); break; default: break; } } stmt->bind_result_done= 1; CLEAR_CLIENT_STMT_ERROR(stmt); return(0); }
O3
c
mysql_stmt_bind_result: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, 0x50(%rdi) je 0x22988 movl 0x60(%rbx), %eax testq %rax, %rax je 0x229ce movq %rsi, %r15 movb $0x1, %r14b testq %rsi, %rsi je 0x22a26 movq 0x78(%rbx), %rdi testq %rdi, %rdi jne 0x2288e movq 0x340(%rbx), %rdi imulq $0x70, %rax, %rsi callq 0x2022f movq %rax, 0x78(%rbx) testq %rax, %rax je 0x22a7e movq %rax, %rdi movl 0x60(%rbx), %eax movl %eax, %eax imulq $0x70, %rax, %rdx movq %r15, %rsi callq 0x13390 cmpl $0x0, 0x60(%rbx) je 0x22955 movl $0x50, %r12d xorl %r13d, %r13d movq 0x38(%rbx), %rax movq 0x4d0(%rax), %rax movq 0x38(%rax), %rax testq %rax, %rax je 0x228d2 movl 0x10(%r15,%r12), %edi callq *%rax testb %al, %al je 0x22a38 movq 0x78(%rbx), %rax cmpq $0x0, -0x48(%rax,%r12) jne 0x228ed addq %r12, %rax addq $0x17, %rax movq %rax, -0x5f(%rax) movq 0x78(%rbx), %rax cmpq $0x0, -0x50(%rax,%r12) jne 0x22902 leaq (%rax,%r12), %rcx movq %rcx, -0x50(%rax,%r12) movq 0x78(%rbx), %rax cmpq $0x0, -0x38(%rax,%r12) jne 0x22915 addq %r12, %rax addq $0x14, %rax movq %rax, -0x4c(%rax) movl 0x10(%r15,%r12), %eax decl %eax cmpl $0xc, %eax ja 0x22942 movl %eax, %eax leaq 0x19e8e(%rip), %rcx # 0x3c7b8 movq (%rcx,%rax,8), %rax movq 0x78(%rbx), %rcx movq %rax, (%rcx,%r12) movq 0x78(%rbx), %rcx movq -0x50(%rcx,%r12), %rcx movq %rax, (%rcx) incq %r13 movl 0x60(%rbx), %eax addq $0x70, %r12 cmpq %rax, %r13 jb 0x228af movb $0x1, 0xe8(%rbx) movl $0x0, 0x108(%rbx) movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030 movw $0x30, 0x311(%rbx) movb $0x0, 0x10c(%rbx) xorl %r14d, %r14d jmp 0x22a26 movl $0x7ee, 0x108(%rbx) # imm = 0x7EE leaq 0x30d(%rbx), %rdi leaq 0x2b270(%rip), %rax # 0x4dc10 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2b25b(%rip), %rax # 0x4dc20 movq 0xf0(%rax), %rsi jmp 0x22a12 movl $0x804, 0x108(%rbx) # imm = 0x804 leaq 0x30d(%rbx), %rdi leaq 0x2b22a(%rip), %rax # 0x4dc10 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2b215(%rip), %rax # 0x4dc20 movq 0x1a0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movb $0x1, %r14b movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x7f4, 0x108(%rbx) # imm = 0x7F4 leaq 0x30d(%rbx), %rdi leaq 0x2b1c0(%rip), %rax # 0x4dc10 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2b1ab(%rip), %rax # 0x4dc20 movq 0x120(%rax), %rsi jmp 0x22abf movl $0x7d8, 0x108(%rbx) # imm = 0x7D8 leaq 0x30d(%rbx), %rdi leaq 0x2b17a(%rip), %rax # 0x4dc10 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2b165(%rip), %rax # 0x4dc20 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r15b, 0x30b(%rbx) jmp 0x22a26
mysql_stmt_bind_result: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp dword ptr [rdi+50h], 0 jz loc_22988 mov eax, [rbx+60h] test rax, rax jz loc_229CE mov r15, rsi mov r14b, 1 test rsi, rsi jz loc_22A26 mov rdi, [rbx+78h] test rdi, rdi jnz short loc_2288E mov rdi, [rbx+340h] imul rsi, rax, 70h ; 'p' call ma_alloc_root mov [rbx+78h], rax test rax, rax jz loc_22A7E mov rdi, rax mov eax, [rbx+60h] loc_2288E: mov eax, eax imul rdx, rax, 70h ; 'p' mov rsi, r15 call _memcpy cmp dword ptr [rbx+60h], 0 jz loc_22955 mov r12d, 50h ; 'P' xor r13d, r13d loc_228AF: mov rax, [rbx+38h] mov rax, [rax+4D0h] mov rax, [rax+38h] test rax, rax jz short loc_228D2 mov edi, [r15+r12+10h] call rax test al, al jz loc_22A38 loc_228D2: mov rax, [rbx+78h] cmp qword ptr [rax+r12-48h], 0 jnz short loc_228ED add rax, r12 add rax, 17h mov [rax-5Fh], rax mov rax, [rbx+78h] loc_228ED: cmp qword ptr [rax+r12-50h], 0 jnz short loc_22902 lea rcx, [rax+r12] mov [rax+r12-50h], rcx mov rax, [rbx+78h] loc_22902: cmp qword ptr [rax+r12-38h], 0 jnz short loc_22915 add rax, r12 add rax, 14h mov [rax-4Ch], rax loc_22915: mov eax, [r15+r12+10h] dec eax cmp eax, 0Ch ja short loc_22942 mov eax, eax lea rcx, unk_3C7B8 mov rax, [rcx+rax*8] mov rcx, [rbx+78h] mov [rcx+r12], rax mov rcx, [rbx+78h] mov rcx, [rcx+r12-50h] mov [rcx], rax loc_22942: inc r13 mov eax, [rbx+60h] add r12, 70h ; 'p' cmp r13, rax jb loc_228AF loc_22955: mov byte ptr [rbx+0E8h], 1 mov dword ptr [rbx+108h], 0 mov dword ptr [rbx+30Dh], 30303030h mov word ptr [rbx+311h], 30h ; '0' mov byte ptr [rbx+10Ch], 0 xor r14d, r14d jmp loc_22A26 loc_22988: mov dword ptr [rbx+108h], 7EEh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+0F0h] jmp short loc_22A12 loc_229CE: mov dword ptr [rbx+108h], 804h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+1A0h] loc_22A12: mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14b, 1 loc_22A26: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_22A38: mov dword ptr [rbx+108h], 7F4h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [rbx+312h], r15b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+120h] jmp short loc_22ABF loc_22A7E: mov dword ptr [rbx+108h], 7D8h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [rbx+312h], r15b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+40h] loc_22ABF: mov edx, 200h call _strncpy mov [rbx+30Bh], r15b jmp loc_22A26
long long mysql_stmt_bind_result(long long a1, long long a2) { unsigned int v2; // r14d char *v4; // rax char *v5; // rdi long long v6; // r12 unsigned long long v7; // r13 unsigned __int8 ( *v8)(_QWORD); // rax long long v9; // rax unsigned int v10; // eax long long v11; // rax long long v12; // rdi char *v13; // rsi long long v15; // rdi char *v16; // rsi if ( !*(_DWORD *)(a1 + 80) ) { *(_DWORD *)(a1 + 264) = 2030; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); v2 = 0; *(_BYTE *)(a1 + 786) = 0; v12 = a1 + 268; v13 = client_errors[30]; LABEL_23: strncpy(v12, v13, 512LL); *(_BYTE *)(a1 + 779) = 0; LOBYTE(v2) = 1; return v2; } v4 = (char *)*(unsigned int *)(a1 + 96); if ( !*(_DWORD *)(a1 + 96) ) { *(_DWORD *)(a1 + 264) = 2052; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); v2 = 0; *(_BYTE *)(a1 + 786) = 0; v12 = a1 + 268; v13 = client_errors[52]; goto LABEL_23; } LOBYTE(v2) = 1; if ( a2 ) { v5 = *(char **)(a1 + 120); if ( !v5 ) { v4 = ma_alloc_root(*(_QWORD *)(a1 + 832), 112LL * (_QWORD)v4); *(_QWORD *)(a1 + 120) = v4; if ( !v4 ) { *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v15 = a1 + 268; v16 = client_errors[8]; LABEL_27: strncpy(v15, v16, 512LL); *(_BYTE *)(a1 + 779) = 0; return v2; } v5 = v4; LODWORD(v4) = *(_DWORD *)(a1 + 96); } memcpy(v5, a2, 112LL * (unsigned int)v4); if ( *(_DWORD *)(a1 + 96) ) { v6 = 80LL; v7 = 0LL; while ( 1 ) { v8 = *(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 56LL); if ( v8 ) { if ( !v8(*(unsigned int *)(a2 + v6 + 16)) ) break; } v9 = *(_QWORD *)(a1 + 120); if ( !*(_QWORD *)(v9 + v6 - 72) ) { *(_QWORD *)(v6 + v9 - 72) = v6 + v9 + 23; v9 = *(_QWORD *)(a1 + 120); } if ( !*(_QWORD *)(v9 + v6 - 80) ) { *(_QWORD *)(v9 + v6 - 80) = v9 + v6; v9 = *(_QWORD *)(a1 + 120); } if ( !*(_QWORD *)(v9 + v6 - 56) ) *(_QWORD *)(v6 + v9 - 56) = v6 + v9 + 20; v10 = *(_DWORD *)(a2 + v6 + 16) - 1; if ( v10 <= 0xC ) { v11 = qword_3C7B8[v10]; *(_QWORD *)(*(_QWORD *)(a1 + 120) + v6) = v11; **(_QWORD **)(*(_QWORD *)(a1 + 120) + v6 - 80) = v11; } ++v7; v6 += 112LL; if ( v7 >= *(unsigned int *)(a1 + 96) ) goto LABEL_20; } *(_DWORD *)(a1 + 264) = 2036; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v15 = a1 + 268; v16 = client_errors[36]; goto LABEL_27; } LABEL_20: *(_BYTE *)(a1 + 232) = 1; *(_DWORD *)(a1 + 264) = 0; strcpy((char *)(a1 + 781), "00000"); *(_BYTE *)(a1 + 268) = 0; return 0; } return v2; }
mysql_stmt_bind_result: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI + 0x50],0x0 JZ 0x00122988 MOV EAX,dword ptr [RBX + 0x60] TEST RAX,RAX JZ 0x001229ce MOV R15,RSI MOV R14B,0x1 TEST RSI,RSI JZ 0x00122a26 MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JNZ 0x0012288e MOV RDI,qword ptr [RBX + 0x340] IMUL RSI,RAX,0x70 CALL 0x0012022f MOV qword ptr [RBX + 0x78],RAX TEST RAX,RAX JZ 0x00122a7e MOV RDI,RAX MOV EAX,dword ptr [RBX + 0x60] LAB_0012288e: MOV EAX,EAX IMUL RDX,RAX,0x70 MOV RSI,R15 CALL 0x00113390 CMP dword ptr [RBX + 0x60],0x0 JZ 0x00122955 MOV R12D,0x50 XOR R13D,R13D LAB_001228af: MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x38] TEST RAX,RAX JZ 0x001228d2 MOV EDI,dword ptr [R15 + R12*0x1 + 0x10] CALL RAX TEST AL,AL JZ 0x00122a38 LAB_001228d2: MOV RAX,qword ptr [RBX + 0x78] CMP qword ptr [RAX + R12*0x1 + -0x48],0x0 JNZ 0x001228ed ADD RAX,R12 ADD RAX,0x17 MOV qword ptr [RAX + -0x5f],RAX MOV RAX,qword ptr [RBX + 0x78] LAB_001228ed: CMP qword ptr [RAX + R12*0x1 + -0x50],0x0 JNZ 0x00122902 LEA RCX,[RAX + R12*0x1] MOV qword ptr [RAX + R12*0x1 + -0x50],RCX MOV RAX,qword ptr [RBX + 0x78] LAB_00122902: CMP qword ptr [RAX + R12*0x1 + -0x38],0x0 JNZ 0x00122915 ADD RAX,R12 ADD RAX,0x14 MOV qword ptr [RAX + -0x4c],RAX LAB_00122915: MOV EAX,dword ptr [R15 + R12*0x1 + 0x10] DEC EAX CMP EAX,0xc JA 0x00122942 MOV EAX,EAX LEA RCX,[0x13c7b8] MOV RAX,qword ptr [RCX + RAX*0x8] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX + R12*0x1],RAX MOV RCX,qword ptr [RBX + 0x78] MOV RCX,qword ptr [RCX + R12*0x1 + -0x50] MOV qword ptr [RCX],RAX LAB_00122942: INC R13 MOV EAX,dword ptr [RBX + 0x60] ADD R12,0x70 CMP R13,RAX JC 0x001228af LAB_00122955: MOV byte ptr [RBX + 0xe8],0x1 MOV dword ptr [RBX + 0x108],0x0 MOV dword ptr [RBX + 0x30d],0x30303030 MOV word ptr [RBX + 0x311],0x30 MOV byte ptr [RBX + 0x10c],0x0 XOR R14D,R14D JMP 0x00122a26 LAB_00122988: MOV dword ptr [RBX + 0x108],0x7ee LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dc10] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dc20] MOV RSI,qword ptr [RAX + 0xf0] JMP 0x00122a12 LAB_001229ce: MOV dword ptr [RBX + 0x108],0x804 LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dc10] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dc20] MOV RSI,qword ptr [RAX + 0x1a0] LAB_00122a12: MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV R14B,0x1 LAB_00122a26: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00122a38: MOV dword ptr [RBX + 0x108],0x7f4 LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dc10] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [RBX + 0x312],R15B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dc20] MOV RSI,qword ptr [RAX + 0x120] JMP 0x00122abf LAB_00122a7e: MOV dword ptr [RBX + 0x108],0x7d8 LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dc10] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [RBX + 0x312],R15B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dc20] MOV RSI,qword ptr [RAX + 0x40] LAB_00122abf: MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R15B JMP 0x00122a26
ulong mysql_stmt_bind_result(long param_1,void *param_2) { code *pcVar1; int8 uVar2; char cVar3; uint uVar4; void *__dest; long lVar5; char *pcVar6; long lVar7; ulong uVar8; int8 unaff_R14; ulong uVar9; if (*(int *)(param_1 + 0x50) == 0) { *(int4 *)(param_1 + 0x108) = 0x7ee; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Statement_is_not_prepared_0014dd10; } else { uVar8 = (ulong)*(uint *)(param_1 + 0x60); if (uVar8 != 0) { uVar9 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_2 != (void *)0x0) { __dest = *(void **)(param_1 + 0x78); if (__dest == (void *)0x0) { __dest = (void *)ma_alloc_root(*(int8 *)(param_1 + 0x340),uVar8 * 0x70); *(void **)(param_1 + 0x78) = __dest; if (__dest == (void *)0x0) { *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Client_run_out_of_memory_0014dc60; LAB_00122abf: strncpy((char *)(param_1 + 0x10c),pcVar6,0x200); *(int1 *)(param_1 + 0x30b) = 0; goto LAB_00122a26; } uVar8 = (ulong)*(uint *)(param_1 + 0x60); } memcpy(__dest,param_2,uVar8 * 0x70); if (*(int *)(param_1 + 0x60) != 0) { lVar7 = 0x50; uVar8 = 0; do { pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x38); if (pcVar1 != (code *)0x0) { cVar3 = (*pcVar1)(*(int4 *)((long)param_2 + lVar7 + 0x10)); if (cVar3 == '\0') { *(int4 *)(param_1 + 0x108) = 0x7f4; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Buffer_type_is_not_supported_0014dd40; goto LAB_00122abf; } } lVar5 = *(long *)(param_1 + 0x78); if (*(long *)(lVar5 + -0x48 + lVar7) == 0) { *(long *)(lVar5 + lVar7 + -0x48) = lVar5 + lVar7 + 0x17; lVar5 = *(long *)(param_1 + 0x78); } if (*(long *)(lVar5 + -0x50 + lVar7) == 0) { *(long *)(lVar5 + -0x50 + lVar7) = lVar5 + lVar7; lVar5 = *(long *)(param_1 + 0x78); } if (*(long *)(lVar5 + -0x38 + lVar7) == 0) { *(long *)(lVar5 + lVar7 + -0x38) = lVar5 + lVar7 + 0x14; } uVar4 = *(int *)((long)param_2 + lVar7 + 0x10) - 1; if (uVar4 < 0xd) { uVar2 = *(int8 *)(&DAT_0013c7b8 + (ulong)uVar4 * 8); *(int8 *)(*(long *)(param_1 + 0x78) + lVar7) = uVar2; **(int8 **)(*(long *)(param_1 + 0x78) + -0x50 + lVar7) = uVar2; } uVar8 = uVar8 + 1; lVar7 = lVar7 + 0x70; } while (uVar8 < *(uint *)(param_1 + 0x60)); } *(int1 *)(param_1 + 0xe8) = 1; *(int4 *)(param_1 + 0x108) = 0; *(int4 *)(param_1 + 0x30d) = 0x30303030; *(int2 *)(param_1 + 0x311) = 0x30; *(int1 *)(param_1 + 0x10c) = 0; uVar9 = 0; } goto LAB_00122a26; } *(int4 *)(param_1 + 0x108) = 0x804; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Prepared_statement_contains_no_m_0014ddc0; } strncpy((char *)(param_1 + 0x10c),pcVar6,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar9 = 1; LAB_00122a26: return uVar9 & 0xffffffff; }
48,701
key_cache_write
eloqsql/mysys/mf_keycache.c
int key_cache_write(KEY_CACHE *keycache, File file, void *file_extra, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int force_write) { if (keycache->can_be_used) return keycache->interface_funcs->write(keycache->keycache_cb, file, file_extra, filepos, level, buff, length, block_length, force_write); /* We can't use mutex here as the key cache may not be initialized */ if (my_pwrite(file, buff, length, filepos, MYF(MY_NABP | MY_WAIT_IF_FULL))) return 1; return 0; }
O3
c
key_cache_write: cmpb $0x0, 0x49(%rdi) je 0x99612 movq 0x8(%rdi), %rax movq 0x10(%rdi), %rdi movq 0x28(%rdi), %r11 movq %rax, %rdi jmpq *%r11 pushq %rbp movq %rsp, %rbp movl 0x10(%rbp), %edx movl $0x24, %r8d movl %esi, %edi movq %r9, %rsi callq 0xa171a xorl %ecx, %ecx testq %rax, %rax setne %cl movl %ecx, %eax popq %rbp retq
key_cache_write: cmp byte ptr [rdi+49h], 0 jz short loc_99612 mov rax, [rdi+8] mov rdi, [rdi+10h] mov r11, [rdi+28h] mov rdi, rax jmp r11 loc_99612: push rbp mov rbp, rsp mov edx, [rbp+10h] mov r8d, 24h ; '$' mov edi, esi mov rsi, r9 call my_pwrite xor ecx, ecx test rax, rax setnz cl mov eax, ecx pop rbp retn
long long key_cache_write( long long a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6, unsigned int a7) { if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD))(*(_QWORD *)(a1 + 16) + 40LL))(*(_QWORD *)(a1 + 8)); else return my_pwrite(a2, a6, a7, a4, 36LL) != 0; }
key_cache_write: CMP byte ptr [RDI + 0x49],0x0 JZ 0x00199612 MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV R11,qword ptr [RDI + 0x28] MOV RDI,RAX JMP R11 LAB_00199612: PUSH RBP MOV RBP,RSP MOV EDX,dword ptr [RBP + 0x10] MOV R8D,0x24 MOV EDI,ESI MOV RSI,R9 CALL 0x001a171a XOR ECX,ECX TEST RAX,RAX SETNZ CL MOV EAX,ECX POP RBP RET
ulong key_cache_write(long param_1,int4 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int4 param_7) { ulong uVar1; long lVar2; if (*(char *)(param_1 + 0x49) != '\0') { /* WARNING: Could not recover jumptable at 0x0019960f. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (**(code **)(*(long *)(param_1 + 0x10) + 0x28))(*(int8 *)(param_1 + 8)); return uVar1; } lVar2 = my_pwrite(param_2,param_6,param_7,param_4,0x24); return (ulong)(lVar2 != 0); }
48,702
stbi__getn(stbi__context*, unsigned char*, int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) { if (s->io.read) { int blen = (int) (s->img_buffer_end - s->img_buffer); if (blen < n) { int res, count; memcpy(buffer, s->img_buffer, blen); count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); res = (count == (n-blen)); s->img_buffer = s->img_buffer_end; return res; } } if (s->img_buffer+n <= s->img_buffer_end) { memcpy(buffer, s->img_buffer, n); s->img_buffer += n; return 1; } else return 0; }
O2
c
stbi__getn(stbi__context*, unsigned char*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x10(%rdi) je 0x3e2d7 movq 0xc0(%rbx), %rsi movq 0xc8(%rbx), %rcx movq %rcx, %rax subq %rsi, %rax movl %edx, %ebp subl %eax, %ebp jle 0x3e2e5 movslq %eax, %r15 movq %r14, %rdi movq %r15, %rdx callq 0x26a10 movq 0x28(%rbx), %rdi addq %r15, %r14 movq %r14, %rsi movl %ebp, %edx callq *0x10(%rbx) movl %eax, %ecx xorl %eax, %eax cmpl %ebp, %ecx sete %al movq 0xc8(%rbx), %rcx movq %rcx, 0xc0(%rbx) jmp 0x3e308 movq 0xc0(%rbx), %rsi movq 0xc8(%rbx), %rcx movslq %edx, %r15 leaq (%rsi,%r15), %rdx xorl %eax, %eax cmpq %rcx, %rdx ja 0x3e308 movq %r14, %rdi movq %r15, %rdx callq 0x26a10 addq %r15, 0xc0(%rbx) pushq $0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZL10stbi__getnP13stbi__contextPhi: push rbp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi cmp qword ptr [rdi+10h], 0 jz short loc_3E2D7 mov rsi, [rbx+0C0h] mov rcx, [rbx+0C8h] mov rax, rcx sub rax, rsi mov ebp, edx sub ebp, eax jle short loc_3E2E5 movsxd r15, eax mov rdi, r14 mov rdx, r15 call _memcpy mov rdi, [rbx+28h] add r14, r15 mov rsi, r14 mov edx, ebp call qword ptr [rbx+10h] mov ecx, eax xor eax, eax cmp ecx, ebp setz al mov rcx, [rbx+0C8h] mov [rbx+0C0h], rcx jmp short loc_3E308 loc_3E2D7: mov rsi, [rbx+0C0h] mov rcx, [rbx+0C8h] loc_3E2E5: movsxd r15, edx lea rdx, [rsi+r15] xor eax, eax cmp rdx, rcx ja short loc_3E308 mov rdi, r14 mov rdx, r15 call _memcpy add [rbx+0C0h], r15 push 1 pop rax loc_3E308: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
_BOOL8 stbi__getn(long long a1, long long a2, int a3) { long long v4; // rsi unsigned long long v5; // rcx int v6; // eax unsigned int v7; // ebp long long v8; // r15 _BOOL8 result; // rax long long v10; // r15 if ( *(_QWORD *)(a1 + 16) ) { v4 = *(_QWORD *)(a1 + 192); v5 = *(_QWORD *)(a1 + 200); v6 = v5 - v4; v7 = a3 - (v5 - v4); if ( a3 > (int)v5 - (int)v4 ) { v8 = v6; memcpy(a2, v4, v6); result = (*(unsigned int ( **)(_QWORD, long long, _QWORD))(a1 + 16))(*(_QWORD *)(a1 + 40), v8 + a2, v7) == v7; *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); return result; } } else { v4 = *(_QWORD *)(a1 + 192); v5 = *(_QWORD *)(a1 + 200); } v10 = a3; result = 0LL; if ( v4 + a3 <= v5 ) { memcpy(a2, v4, a3); *(_QWORD *)(a1 + 192) += v10; return 1LL; } return result; }
stbi__getn: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RDI + 0x10],0x0 JZ 0x0013e2d7 MOV RSI,qword ptr [RBX + 0xc0] MOV RCX,qword ptr [RBX + 0xc8] MOV RAX,RCX SUB RAX,RSI MOV EBP,EDX SUB EBP,EAX JLE 0x0013e2e5 MOVSXD R15,EAX MOV RDI,R14 MOV RDX,R15 CALL 0x00126a10 MOV RDI,qword ptr [RBX + 0x28] ADD R14,R15 MOV RSI,R14 MOV EDX,EBP CALL qword ptr [RBX + 0x10] MOV ECX,EAX XOR EAX,EAX CMP ECX,EBP SETZ AL MOV RCX,qword ptr [RBX + 0xc8] MOV qword ptr [RBX + 0xc0],RCX JMP 0x0013e308 LAB_0013e2d7: MOV RSI,qword ptr [RBX + 0xc0] MOV RCX,qword ptr [RBX + 0xc8] LAB_0013e2e5: MOVSXD R15,EDX LEA RDX,[RSI + R15*0x1] XOR EAX,EAX CMP RDX,RCX JA 0x0013e308 MOV RDI,R14 MOV RDX,R15 CALL 0x00126a10 ADD qword ptr [RBX + 0xc0],R15 PUSH 0x1 POP RAX LAB_0013e308: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* stbi__getn(stbi__context*, unsigned char*, int) */ bool stbi__getn(stbi__context *param_1,uchar *param_2,int param_3) { bool bVar1; int iVar2; ulong uVar3; int iVar4; void *__src; size_t __n; if (*(long *)(param_1 + 0x10) == 0) { __src = *(void **)(param_1 + 0xc0); uVar3 = *(ulong *)(param_1 + 200); } else { __src = *(void **)(param_1 + 0xc0); uVar3 = *(ulong *)(param_1 + 200); iVar2 = (int)uVar3 - (int)__src; iVar4 = param_3 - iVar2; if (iVar4 != 0 && iVar2 <= param_3) { memcpy(param_2,__src,(long)iVar2); iVar2 = (**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x28),param_2 + iVar2,iVar4); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); return iVar2 == iVar4; } } __n = (size_t)param_3; bVar1 = (long)__src + __n <= uVar3; if (bVar1) { memcpy(param_2,__src,__n); *(size_t *)(param_1 + 0xc0) = *(long *)(param_1 + 0xc0) + __n; } return bVar1; }
48,703
js_error_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_error_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue name, msg; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); name = JS_GetProperty(ctx, this_val, JS_ATOM_name); if (JS_IsUndefined(name)) name = JS_AtomToString(ctx, JS_ATOM_Error); else name = JS_ToStringFree(ctx, name); if (JS_IsException(name)) return JS_EXCEPTION; msg = JS_GetProperty(ctx, this_val, JS_ATOM_message); if (JS_IsUndefined(msg)) msg = JS_AtomToString(ctx, JS_ATOM_empty_string); else msg = JS_ToStringFree(ctx, msg); if (JS_IsException(msg)) { JS_FreeValue(ctx, name); return JS_EXCEPTION; } if (!JS_IsEmptyString(name) && !JS_IsEmptyString(msg)) name = JS_ConcatString3(ctx, "", name, ": "); return JS_ConcatString(ctx, name, msg); }
O0
c
js_error_toString: subq $0xc8, %rsp movq %rsi, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) movq %rdi, 0xa0(%rsp) movl %ecx, 0x9c(%rsp) movq %r8, 0x90(%rsp) movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0x2af70 cmpl $0x0, %eax jne 0xbde5a movq 0xa0(%rsp), %rdi callq 0x2f5a0 movq %rax, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) jmp 0xbe123 movq 0xa0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdx movl $0x37, %ecx callq 0x29d80 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax je 0xbdef2 movq 0xa0(%rsp), %rdi movl $0x95, %esi callq 0x29000 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x88(%rsp) jmp 0xbdf33 movq 0xa0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x50670 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xbdf69 movl $0x0, 0xb8(%rsp) movq $0x6, 0xc0(%rsp) jmp 0xbe123 movq 0xa0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdx movl $0x33, %ecx callq 0x29d80 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax je 0xbdfef movq 0xa0(%rsp), %rdi movl $0x2f, %esi callq 0x29000 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x78(%rsp) jmp 0xbe024 movq 0xa0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x50670 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xbe071 movq 0xa0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x23c90 movl $0x0, 0xb8(%rsp) movq $0x6, 0xc0(%rsp) jmp 0xbe123 movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x851a0 cmpl $0x0, %eax jne 0xbe0ec movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x851a0 cmpl $0x0, %eax jne 0xbe0ec movq 0xa0(%rsp), %rdi movq 0x80(%rsp), %rdx movq 0x88(%rsp), %rcx leaq 0x4b5a2(%rip), %rsi # 0x109660 leaq 0x4ba2f(%rip), %r8 # 0x109af4 callq 0x6f970 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x80(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x88(%rsp) movq 0xa0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x70(%rsp), %rcx movq 0x78(%rsp), %r8 callq 0x6ab90 movq %rax, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rdx addq $0xc8, %rsp retq nopl (%rax,%rax)
js_error_toString: sub rsp, 0C8h mov [rsp+0C8h+var_20], rsi mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_28], rdi mov [rsp+0C8h+var_2C], ecx mov [rsp+0C8h+var_38], r8 mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_18] call JS_IsObject cmp eax, 0 jnz short loc_BDE5A mov rdi, [rsp+0C8h+var_28] call JS_ThrowTypeErrorNotAnObject mov [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_8], rdx jmp loc_BE123 loc_BDE5A: mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_20] mov rdx, [rsp+0C8h+var_18] mov ecx, 37h ; '7' call JS_GetProperty mov [rsp+0C8h+var_68], rax mov [rsp+0C8h+var_60], rdx mov rax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_60] mov [rsp+0C8h+var_40], rax mov rdi, [rsp+0C8h+var_48] mov rsi, [rsp+0C8h+var_40] call JS_IsUndefined_0 cmp eax, 0 jz short loc_BDEF2 mov rdi, [rsp+0C8h+var_28] mov esi, 95h call JS_AtomToString mov [rsp+0C8h+var_78], rax mov [rsp+0C8h+var_70], rdx mov rax, [rsp+0C8h+var_78] mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_70] mov [rsp+0C8h+var_40], rax jmp short loc_BDF33 loc_BDEF2: mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_48] mov rdx, [rsp+0C8h+var_40] call JS_ToStringFree mov [rsp+0C8h+var_88], rax mov [rsp+0C8h+var_80], rdx mov rax, [rsp+0C8h+var_88] mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_80] mov [rsp+0C8h+var_40], rax loc_BDF33: mov rdi, [rsp+0C8h+var_48] mov rsi, [rsp+0C8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_BDF69 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 6 jmp loc_BE123 loc_BDF69: mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_20] mov rdx, [rsp+0C8h+var_18] mov ecx, 33h ; '3' call JS_GetProperty mov [rsp+0C8h+var_98], rax mov [rsp+0C8h+var_90], rdx mov rax, [rsp+0C8h+var_98] mov [rsp+0C8h+var_58], rax mov rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_50], rax mov rdi, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_50] call JS_IsUndefined_0 cmp eax, 0 jz short loc_BDFEF mov rdi, [rsp+0C8h+var_28] mov esi, 2Fh ; '/' call JS_AtomToString mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], rdx mov rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_58], rax mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_50], rax jmp short loc_BE024 loc_BDFEF: mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_ToStringFree mov [rsp+0C8h+var_B8], rax mov [rsp+0C8h+var_B0], rdx mov rax, [rsp+0C8h+var_B8] mov [rsp+0C8h+var_58], rax mov rax, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_50], rax loc_BE024: mov rdi, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_BE071 mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_48] mov rdx, [rsp+0C8h+var_40] call JS_FreeValue mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 6 jmp loc_BE123 loc_BE071: mov rdi, [rsp+0C8h+var_48] mov rsi, [rsp+0C8h+var_40] call JS_IsEmptyString cmp eax, 0 jnz short loc_BE0EC mov rdi, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_50] call JS_IsEmptyString cmp eax, 0 jnz short loc_BE0EC mov rdi, [rsp+0C8h+var_28] mov rdx, [rsp+0C8h+var_48] mov rcx, [rsp+0C8h+var_40] lea rsi, aIncludeQuickjs+1Bh; "" lea r8, aPossiblyUnhand+24h; ": " call JS_ConcatString3 mov [rsp+0C8h+var_C8], rax mov [rsp+0C8h+var_C0], rdx mov rax, [rsp+0C8h+var_C8] mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_40], rax loc_BE0EC: mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_48] mov rdx, [rsp+0C8h+var_40] mov rcx, [rsp+0C8h+var_58] mov r8, [rsp+0C8h+var_50] call JS_ConcatString mov [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_8], rdx loc_BE123: mov rax, [rsp+0C8h+var_10] mov rdx, [rsp+0C8h+var_8] add rsp, 0C8h retn
long long js_error_toString( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v13; // rdx long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 long long v23; // rdx long long v24; // rdx long long v25; // rcx long long v26; // r8 long long v27; // r9 long long v28; // rdx long long v29; // r9 long long v30; // rdx long long v32; // [rsp+30h] [rbp-98h] long long Property; // [rsp+60h] [rbp-68h] long long v34; // [rsp+70h] [rbp-58h] long long v35; // [rsp+78h] [rbp-50h] long long v36; // [rsp+78h] [rbp-50h] long long v37; // [rsp+80h] [rbp-48h] long long v38; // [rsp+88h] [rbp-40h] long long v39; // [rsp+88h] [rbp-40h] int v41; // [rsp+A8h] [rbp-20h] int v42; // [rsp+B0h] [rbp-18h] long long v43; // [rsp+B8h] [rbp-10h] v41 = a2; v42 = a3; if ( !JS_IsObject(a2, a3) ) return JS_ThrowTypeErrorNotAnObject(a1, a4, a5, a6, a7, v17, v18, a10, a11, a3, v13, v14, v15, v16); Property = JS_GetProperty(a1, v41, v42, 55); v38 = v19; if ( JS_IsUndefined_0(Property, v19) ) v37 = JS_AtomToString(a1, 0x95u); else v37 = JS_ToStringFree(a1, Property, v38, v20, v21, v22); v39 = v23; if ( JS_IsException_1(v37, v23) ) { LODWORD(v43) = 0; } else { v32 = JS_GetProperty(a1, v41, v42, 51); v35 = v24; if ( JS_IsUndefined_0(v32, v24) ) v34 = JS_AtomToString(a1, 0x2Fu); else v34 = JS_ToStringFree(a1, v32, v35, v25, v26, v27); v36 = v28; if ( JS_IsException_1(v34, v28) ) { JS_FreeValue(a1, v37, v39); LODWORD(v43) = 0; } else { if ( !JS_IsEmptyString(v37, v39) && !JS_IsEmptyString(v34, v36) ) { v37 = JS_ConcatString3(a1, (long long)"", v37, v39, (long long)": ", v29); v39 = v30; } return JS_ConcatString(a1, v37, v39, v34, v36, v29); } } return v43; }
js_error_toString: SUB RSP,0xc8 MOV qword ptr [RSP + 0xa8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa0],RDI MOV dword ptr [RSP + 0x9c],ECX MOV qword ptr [RSP + 0x90],R8 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x0012af70 CMP EAX,0x0 JNZ 0x001bde5a MOV RDI,qword ptr [RSP + 0xa0] CALL 0x0012f5a0 MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RDX JMP 0x001be123 LAB_001bde5a: MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] MOV ECX,0x37 CALL 0x00129d80 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x0012e260 CMP EAX,0x0 JZ 0x001bdef2 MOV RDI,qword ptr [RSP + 0xa0] MOV ESI,0x95 CALL 0x00129000 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x88],RAX JMP 0x001bdf33 LAB_001bdef2: MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x00150670 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x88],RAX LAB_001bdf33: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001bdf69 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x6 JMP 0x001be123 LAB_001bdf69: MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] MOV ECX,0x33 CALL 0x00129d80 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x0012e260 CMP EAX,0x0 JZ 0x001bdfef MOV RDI,qword ptr [RSP + 0xa0] MOV ESI,0x2f CALL 0x00129000 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX JMP 0x001be024 LAB_001bdfef: MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00150670 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x78],RAX LAB_001be024: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001be071 MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x00123c90 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x6 JMP 0x001be123 LAB_001be071: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x001851a0 CMP EAX,0x0 JNZ 0x001be0ec MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x001851a0 CMP EAX,0x0 JNZ 0x001be0ec MOV RDI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x88] LEA RSI,[0x209660] LEA R8,[0x209af4] CALL 0x0016f970 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x88],RAX LAB_001be0ec: MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x70] MOV R8,qword ptr [RSP + 0x78] CALL 0x0016ab90 MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RDX LAB_001be123: MOV RAX,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
int1 [16] js_error_toString(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int1 auVar2 [16]; int1 auVar3 [16]; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int4 local_10; int4 uStack_c; int8 local_8; iVar1 = JS_IsObject(param_2,param_3); if (iVar1 == 0) { auVar2 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { auVar2 = JS_GetProperty(param_1,param_2,param_3,0x37); iVar1 = JS_IsUndefined(auVar2._0_8_,auVar2._8_8_); if (iVar1 == 0) { auVar2 = JS_ToStringFree(param_1,auVar2._0_8_,auVar2._8_8_); } else { auVar2 = JS_AtomToString(param_1,0x95); } local_40 = auVar2._8_8_; local_48 = auVar2._0_8_; iVar1 = JS_IsException(local_48,local_40); if (iVar1 == 0) { auVar3 = JS_GetProperty(param_1,param_2,param_3,0x33); iVar1 = JS_IsUndefined(auVar3._0_8_,auVar3._8_8_); if (iVar1 == 0) { auVar3 = JS_ToStringFree(param_1,auVar3._0_8_,auVar3._8_8_); } else { auVar3 = JS_AtomToString(param_1,0x2f); } local_50 = auVar3._8_8_; local_58 = auVar3._0_8_; iVar1 = JS_IsException(local_58,local_50); if (iVar1 == 0) { iVar1 = JS_IsEmptyString(local_48,local_40); if (iVar1 == 0) { iVar1 = JS_IsEmptyString(local_58,local_50); if (iVar1 == 0) { auVar2 = JS_ConcatString3(param_1,"",local_48,local_40,": "); } } local_40 = auVar2._8_8_; local_48 = auVar2._0_8_; auVar2 = JS_ConcatString(param_1,local_48,local_40,local_58,local_50); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { JS_FreeValue(param_1,local_48,local_40); local_10 = 0; local_8 = 6; } } else { local_10 = 0; local_8 = 6; } } auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
48,704
js_error_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_error_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue name, msg; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); name = JS_GetProperty(ctx, this_val, JS_ATOM_name); if (JS_IsUndefined(name)) name = JS_AtomToString(ctx, JS_ATOM_Error); else name = JS_ToStringFree(ctx, name); if (JS_IsException(name)) return JS_EXCEPTION; msg = JS_GetProperty(ctx, this_val, JS_ATOM_message); if (JS_IsUndefined(msg)) msg = JS_AtomToString(ctx, JS_ATOM_empty_string); else msg = JS_ToStringFree(ctx, msg); if (JS_IsException(msg)) { JS_FreeValue(ctx, name); return JS_EXCEPTION; } if (!JS_IsEmptyString(name) && !JS_IsEmptyString(msg)) name = JS_ConcatString3(ctx, "", name, ": "); return JS_ConcatString(ctx, name, msg); }
O1
c
js_error_toString: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r13 movq %rdi, %rbx cmpl $-0x1, %r13d jne 0x6fc9c movq %rsi, %rbp movq %rbx, %rdi movq %r13, %rdx movl $0x37, %ecx movq %rsi, %r8 movq %r13, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rdx, %r15 cmpl $0x3, %r15d jne 0x6fcbb movq 0x18(%rbx), %rax movq 0x68(%rax), %rax movq 0x4a8(%rax), %rsi movq 0x4(%rsi), %rcx movq %rcx, %rdx shrq $0x3e, %rdx cmpl $0x1, %edx je 0x6fc8c movl $0xfffffff9, %edx # imm = 0xFFFFFFF9 addq $-0x7ffffff9, %rdx # imm = 0x80000007 movl %ecx, %ecx cmpl %edx, %ecx jne 0x6fc8c movq 0x178(%rax), %rsi movq %rsi, 0x8(%rsp) incl (%rsi) movq $-0x7, %r14 jmp 0x6fce5 leaq 0x2f382(%rip), %rsi # 0x9f025 xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %r12d jmp 0x6fd89 movq %rax, %r12 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x27add movq %rax, 0x8(%rsp) movq %rdx, %r14 movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 movq %r14, (%rsp) movl %r14d, %r14d movl $0x6, %r12d cmpq $0x6, %r14 je 0x6fd86 movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl $0x33, %ecx movq %rbp, %r8 movq %r13, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rdx, %r13 cmpl $0x3, %r13d jne 0x6fd41 movq 0x18(%rbx), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r15 incl (%r15) movq $-0x7, %rbp jmp 0x6fd69 movq %rax, %r15 movq %rbx, %rdi movq %rax, %rsi movq %r13, %rdx xorl %ecx, %ecx callq 0x27add movq %rdx, %rbp movq 0x18(%rbx), %rdi movq %r15, %rsi movq %rax, %r15 movq %r13, %rdx callq 0x1d8c6 movq 0x8(%rsp), %r9 movl %ebp, %eax cmpq $0x6, %rax jne 0x6fda3 movq 0x18(%rbx), %rdi movq %r9, %rsi movq (%rsp), %rdx callq 0x1d8c6 xorl %r14d, %r14d xorl %ecx, %ecx orq %rcx, %r14 movq %r14, %rax movq %r12, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xfffffff9, %ecx # imm = 0xFFFFFFF9 movq %r9, 0x10(%rsp) cmpl %ecx, %r14d jne 0x6fdc1 movq 0x10(%rsp), %rdx movq 0x4(%rdx), %rdx shlq $0x21, %rdx je 0x6fdfe movq %r15, 0x10(%rsp) cmpl %ecx, %eax movq (%rsp), %rcx jne 0x6fddd movq 0x10(%rsp), %rax movq 0x4(%rax), %rax shlq $0x21, %rax je 0x6fe02 leaq 0x2b7fc(%rip), %rsi # 0x9b5e0 leaq 0x2bbf1(%rip), %r8 # 0x9b9dc movq %rbx, %rdi movq %r9, %rdx callq 0x41f02 movq %rax, %r9 movq %rdx, %rcx jmp 0x6fe02 movq (%rsp), %rcx movq %rbx, %rdi movq %r9, %rsi movq %rcx, %rdx movq %r15, %rcx movq %rbp, %r8 callq 0x40436 movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r14d jmp 0x6fd8b
js_error_toString: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rdx mov rbx, rdi cmp r13d, 0FFFFFFFFh jnz short loc_6FC9C mov rbp, rsi mov rdi, rbx mov rdx, r13 mov ecx, 37h ; '7' mov r8, rsi mov r9, r13 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r15, rdx cmp r15d, 3 jnz short loc_6FCBB mov rax, [rbx+18h] mov rax, [rax+68h] mov rsi, [rax+4A8h] mov rcx, [rsi+4] mov rdx, rcx shr rdx, 3Eh cmp edx, 1 jz short loc_6FC8C mov edx, 0FFFFFFF9h add rdx, 0FFFFFFFF80000007h mov ecx, ecx cmp ecx, edx jnz short loc_6FC8C mov rsi, [rax+178h] loc_6FC8C: mov [rsp+48h+var_40], rsi inc dword ptr [rsi] mov r14, 0FFFFFFFFFFFFFFF9h jmp short loc_6FCE5 loc_6FC9C: lea rsi, aOperandPrototy+20h; "not an object" xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r12d, 6 jmp loc_6FD89 loc_6FCBB: mov r12, rax mov rdi, rbx mov rsi, rax mov rdx, r15 xor ecx, ecx call JS_ToStringInternal mov [rsp+48h+var_40], rax mov r14, rdx mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT loc_6FCE5: mov [rsp+48h+var_48], r14 mov r14d, r14d mov r12d, 6 cmp r14, 6 jz loc_6FD86 mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, 33h ; '3' mov r8, rbp mov r9, r13 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r13, rdx cmp r13d, 3 jnz short loc_6FD41 mov rax, [rbx+18h] mov rax, [rax+68h] mov r15, [rax+178h] inc dword ptr [r15] mov rbp, 0FFFFFFFFFFFFFFF9h jmp short loc_6FD69 loc_6FD41: mov r15, rax mov rdi, rbx mov rsi, rax mov rdx, r13 xor ecx, ecx call JS_ToStringInternal mov rbp, rdx mov rdi, [rbx+18h] mov rsi, r15 mov r15, rax mov rdx, r13 call JS_FreeValueRT loc_6FD69: mov r9, [rsp+48h+var_40] mov eax, ebp cmp rax, 6 jnz short loc_6FDA3 mov rdi, [rbx+18h] mov rsi, r9 mov rdx, [rsp+48h+var_48] call JS_FreeValueRT loc_6FD86: xor r14d, r14d loc_6FD89: xor ecx, ecx loc_6FD8B: or r14, rcx mov rax, r14 mov rdx, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6FDA3: mov ecx, 0FFFFFFF9h mov [rsp+48h+var_38], r9 cmp r14d, ecx jnz short loc_6FDC1 mov rdx, [rsp+48h+var_38] mov rdx, [rdx+4] shl rdx, 21h jz short loc_6FDFE loc_6FDC1: mov [rsp+48h+var_38], r15 cmp eax, ecx mov rcx, [rsp+48h+var_48] jnz short loc_6FDDD mov rax, [rsp+48h+var_38] mov rax, [rax+4] shl rax, 21h jz short loc_6FE02 loc_6FDDD: lea rsi, aIncludeQuickjs+1Bh; "" lea r8, aPossiblyUnhand+24h; ": " mov rdi, rbx mov rdx, r9 call JS_ConcatString3 mov r9, rax mov rcx, rdx jmp short loc_6FE02 loc_6FDFE: mov rcx, [rsp+48h+var_48] loc_6FE02: mov rdi, rbx mov rsi, r9 mov rdx, rcx mov rcx, r15 mov r8, rbp call JS_ConcatString mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r14d, eax jmp loc_6FD8B
unsigned long long js_error_toString( 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) { unsigned long long PropertyInternal2; // rax long long v17; // rdx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // r15 long long v23; // rax unsigned long long v24; // rsi unsigned long long v25; // rcx long long v26; // r14 long long v27; // r14 _DWORD *v28; // r12 long long v29; // rdx unsigned long long v30; // rax long long v31; // rdx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 long long v36; // r13 unsigned long long v37; // r15 long long v38; // rbp _DWORD *v39; // r15 unsigned long long v40; // rax long long v41; // rdx _DWORD *v42; // rsi _DWORD *v43; // r9 unsigned long long v44; // rcx long long v46; // rcx long long v47; // rdx unsigned long long v48; // rax char v49; // [rsp+0h] [rbp-48h] unsigned long long v50; // [rsp+8h] [rbp-40h] if ( (_DWORD)a3 != -1 ) { v27 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v49); LABEL_16: v44 = 0LL; return v44 | v27; } PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x37u, a2, a3, 0LL, 0); v22 = v17; if ( (_DWORD)v17 == 3 ) { v23 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL); v24 = *(_QWORD *)(v23 + 1192); v25 = *(_QWORD *)(v24 + 4); if ( v25 >> 62 != 1 && (_DWORD)v25 == 0x80000000 ) v24 = *(_QWORD *)(v23 + 376); v50 = v24; ++*(_DWORD *)v24; v26 = -7LL; } else { v28 = (_DWORD *)PropertyInternal2; v50 = JS_ToStringInternal(a1, PropertyInternal2, v17, 0, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14); v26 = v29; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v28, v22); } if ( (unsigned int)v26 == 6LL ) { LABEL_15: v27 = 0LL; goto LABEL_16; } v30 = JS_GetPropertyInternal2(a1, a2, a3, 0x33u, a2, a3, 0LL, 0); v36 = v31; if ( (_DWORD)v31 == 3 ) { v37 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*(_DWORD *)v37; v38 = -7LL; } else { v39 = (_DWORD *)v30; v40 = JS_ToStringInternal(a1, v30, v31, 0, v32, v33, a7, a8, a9, a10, v34, v35, a13, a14); v38 = v41; v42 = v39; v37 = v40; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v42, v36); } v43 = (_DWORD *)v50; if ( (unsigned int)v38 == 6LL ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v50, v26); goto LABEL_15; } if ( (_DWORD)v26 == -7 && !(*(_QWORD *)(v50 + 4) << 33) ) { v46 = v26; } else { v46 = v26; if ( (_DWORD)v38 != -7 || *(_QWORD *)(v37 + 4) << 33 ) { v43 = JS_ConcatString3( a1, (long long)"", (_DWORD *)v50, v26, (long long)": ", v50, a7, a8, a9, a10, v34, v35, a13, a14); v46 = v47; } } v48 = (unsigned long long)JS_ConcatString( a1, v43, v46, (_DWORD *)v37, v38, (long long)v43, a7, a8, a9, a10, v34, v35, a13, a14); v44 = v48 & 0xFFFFFFFF00000000LL; v27 = (unsigned int)v48; return v44 | v27; }
js_error_toString: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RDX MOV RBX,RDI CMP R13D,-0x1 JNZ 0x0016fc9c MOV RBP,RSI MOV RDI,RBX MOV RDX,R13 MOV ECX,0x37 MOV R8,RSI MOV R9,R13 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV R15,RDX CMP R15D,0x3 JNZ 0x0016fcbb MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV RSI,qword ptr [RAX + 0x4a8] MOV RCX,qword ptr [RSI + 0x4] MOV RDX,RCX SHR RDX,0x3e CMP EDX,0x1 JZ 0x0016fc8c MOV EDX,0xfffffff9 ADD RDX,-0x7ffffff9 MOV ECX,ECX CMP ECX,EDX JNZ 0x0016fc8c MOV RSI,qword ptr [RAX + 0x178] LAB_0016fc8c: MOV qword ptr [RSP + 0x8],RSI INC dword ptr [RSI] MOV R14,-0x7 JMP 0x0016fce5 LAB_0016fc9c: LEA RSI,[0x19f025] XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 MOV R12D,0x6 JMP 0x0016fd89 LAB_0016fcbb: MOV R12,RAX MOV RDI,RBX MOV RSI,RAX MOV RDX,R15 XOR ECX,ECX CALL 0x00127add MOV qword ptr [RSP + 0x8],RAX MOV R14,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 LAB_0016fce5: MOV qword ptr [RSP],R14 MOV R14D,R14D MOV R12D,0x6 CMP R14,0x6 JZ 0x0016fd86 MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV ECX,0x33 MOV R8,RBP MOV R9,R13 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV R13,RDX CMP R13D,0x3 JNZ 0x0016fd41 MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R15,qword ptr [RAX + 0x178] INC dword ptr [R15] MOV RBP,-0x7 JMP 0x0016fd69 LAB_0016fd41: MOV R15,RAX MOV RDI,RBX MOV RSI,RAX MOV RDX,R13 XOR ECX,ECX CALL 0x00127add MOV RBP,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 MOV R15,RAX MOV RDX,R13 CALL 0x0011d8c6 LAB_0016fd69: MOV R9,qword ptr [RSP + 0x8] MOV EAX,EBP CMP RAX,0x6 JNZ 0x0016fda3 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R9 MOV RDX,qword ptr [RSP] CALL 0x0011d8c6 LAB_0016fd86: XOR R14D,R14D LAB_0016fd89: XOR ECX,ECX LAB_0016fd8b: OR R14,RCX MOV RAX,R14 MOV RDX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016fda3: MOV ECX,0xfffffff9 MOV qword ptr [RSP + 0x10],R9 CMP R14D,ECX JNZ 0x0016fdc1 MOV RDX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RDX + 0x4] SHL RDX,0x21 JZ 0x0016fdfe LAB_0016fdc1: MOV qword ptr [RSP + 0x10],R15 CMP EAX,ECX MOV RCX,qword ptr [RSP] JNZ 0x0016fddd MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x4] SHL RAX,0x21 JZ 0x0016fe02 LAB_0016fddd: LEA RSI,[0x19b5e0] LEA R8,[0x19b9dc] MOV RDI,RBX MOV RDX,R9 CALL 0x00141f02 MOV R9,RAX MOV RCX,RDX JMP 0x0016fe02 LAB_0016fdfe: MOV RCX,qword ptr [RSP] LAB_0016fe02: MOV RDI,RBX MOV RSI,R9 MOV RDX,RCX MOV RCX,R15 MOV R8,RBP CALL 0x00140436 MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R14D,EAX JMP 0x0016fd8b
int1 [16] js_error_toString(long param_1,int8 param_2,int8 param_3) { long lVar1; ulong uVar2; int *piVar3; int8 uVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; long local_40; if ((int)param_3 == -1) { auVar6 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x37,param_2,param_3,0,0); if (auVar6._8_4_ == 3) { lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x68); piVar3 = *(int **)(lVar1 + 0x4a8); if (((uint)((ulong)*(int8 *)(piVar3 + 1) >> 0x3e) != 1) && ((int)*(int8 *)(piVar3 + 1) == -0x80000000)) { piVar3 = *(int **)(lVar1 + 0x178); } *piVar3 = *piVar3 + 1; auVar8._8_8_ = 0xfffffffffffffff9; auVar8._0_8_ = piVar3; } else { auVar8 = JS_ToStringInternal(param_1,auVar6._0_8_,auVar6._8_8_,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_); } uVar2 = auVar8._8_8_; local_40 = auVar8._0_8_; if ((uVar2 & 0xffffffff) != 6) { auVar6 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x33,param_2,param_3,0,0); if (auVar6._8_4_ == 3) { piVar3 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar3 = *piVar3 + 1; auVar7._8_8_ = 0xfffffffffffffff9; auVar7._0_8_ = piVar3; } else { auVar7 = JS_ToStringInternal(param_1,auVar6._0_8_,auVar6._8_8_,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_); } if ((auVar7._8_8_ & 0xffffffff) != 6) { if (((auVar8._8_4_ != -7) || ((*(ulong *)(local_40 + 4) & 0x7fffffff) != 0)) && ((auVar7._8_4_ != -7 || ((*(ulong *)(auVar7._0_8_ + 4) & 0x7fffffff) != 0)))) { auVar8 = JS_ConcatString3(param_1,"",local_40,uVar2,": "); } auVar6 = JS_ConcatString(param_1,auVar8._0_8_,auVar8._8_8_,auVar7._0_8_,auVar7._8_8_); uVar4 = auVar6._8_8_; uVar2 = auVar6._0_8_ & 0xffffffff00000000; uVar5 = auVar6._0_8_ & 0xffffffff; goto LAB_0016fd8b; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_40,uVar2); } } else { JS_ThrowTypeError(param_1,"not an object"); } uVar5 = 0; uVar4 = 6; uVar2 = 0; LAB_0016fd8b: auVar6._8_8_ = uVar4; auVar6._0_8_ = uVar5 | uVar2; return auVar6; }
48,705
translog_write_variable_record_chunk2_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record_chunk2_page(struct st_translog_parts *parts, TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { uchar chunk2_header[1]; DBUG_ENTER("translog_write_variable_record_chunk2_page"); chunk2_header[0]= TRANSLOG_CHUNK_NOHDR; if (translog_chaser_page_next(horizon, cursor)) DBUG_RETURN(1); /* Puts chunk type */ translog_write_data_on_page(horizon, cursor, 1, chunk2_header); /* Puts chunk body */ translog_write_parts_on_page(horizon, cursor, log_descriptor.page_capacity_chunk_2, parts); DBUG_RETURN(0); }
O0
c
translog_write_variable_record_chunk2_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb $-0x80, -0x21(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x5c000 cmpb $0x0, %al je 0x5bc51 jmp 0x5bc4b movb $0x1, -0x1(%rbp) jmp 0x5bc83 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi leaq -0x21(%rbp), %rcx movl $0x1, %edx callq 0x5c080 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movzwl 0x41d770(%rip), %edx # 0x4793e6 movq -0x10(%rbp), %rcx callq 0x5b5c0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
translog_write_variable_record_chunk2_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_21], 80h mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call translog_chaser_page_next cmp al, 0 jz short loc_5BC51 jmp short $+2 loc_5BC4B: mov [rbp+var_1], 1 jmp short loc_5BC83 loc_5BC51: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] lea rcx, [rbp+var_21] mov edx, 1 call translog_write_data_on_page mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] movzx edx, cs:word_4793E6 mov rcx, [rbp+var_10] call translog_write_parts_on_page mov [rbp+var_1], 0 loc_5BC83: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char translog_write_variable_record_chunk2_page(long long a1, _QWORD *a2, long long a3) { char v4; // [rsp+Fh] [rbp-21h] BYREF long long v5; // [rsp+10h] [rbp-20h] _QWORD *v6; // [rsp+18h] [rbp-18h] long long v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; v5 = a3; v4 = 0x80; if ( (unsigned __int8)translog_chaser_page_next(a2, a3) ) return 1; translog_write_data_on_page(v6, v5, 1LL, &v4); translog_write_parts_on_page(v6, v5, (unsigned __int16)word_4793E6, v7); return 0; }
translog_write_variable_record_chunk2_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 byte ptr [RBP + -0x21],0x80 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0015c000 CMP AL,0x0 JZ 0x0015bc51 JMP 0x0015bc4b LAB_0015bc4b: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015bc83 LAB_0015bc51: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x21] MOV EDX,0x1 CALL 0x0015c080 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOVZX EDX,word ptr [0x005793e6] MOV RCX,qword ptr [RBP + -0x10] CALL 0x0015b5c0 MOV byte ptr [RBP + -0x1],0x0 LAB_0015bc83: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool translog_write_variable_record_chunk2_page (int8 param_1,int8 param_2,int8 param_3) { char cVar1; int1 local_29; int8 local_28; int8 local_20; int8 local_18; bool local_9; local_29 = 0x80; local_28 = param_3; local_20 = param_2; local_18 = param_1; cVar1 = translog_chaser_page_next(param_2,param_3); if (cVar1 == '\0') { translog_write_data_on_page(local_20,local_28,1,&local_29); translog_write_parts_on_page(local_20,local_28,DAT_005793e6,local_18); } local_9 = cVar1 != '\0'; return local_9; }
48,706
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
inline void grisu2(char* buf, int& len, int& decimal_exponent, diyfp m_minus, diyfp v, diyfp m_plus) { JSON_ASSERT(m_plus.e == m_minus.e); JSON_ASSERT(m_plus.e == v.e); // --------(-----------------------+-----------------------)-------- (A) // m- v m+ // // --------------------(-----------+-----------------------)-------- (B) // m- v m+ // // First scale v (and m- and m+) such that the exponent is in the range // [alpha, gamma]. const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] const diyfp w = diyfp::mul(v, c_minus_k); const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); // ----(---+---)---------------(---+---)---------------(---+---)---- // w- w w+ // = c*m- = c*v = c*m+ // // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and // w+ are now off by a small amount. // In fact: // // w - v * 10^k < 1 ulp // // To account for this inaccuracy, add resp. subtract 1 ulp. // // --------+---[---------------(---+---)---------------]---+-------- // w- M- w M+ w+ // // Now any number in [M-, M+] (bounds included) will round to w when input, // regardless of how the input rounding algorithm breaks ties. // // And digit_gen generates the shortest possible such number in [M-, M+]. // Note that this does not mean that Grisu2 always generates the shortest // possible number in the interval (m-, m+). const diyfp M_minus(w_minus.f + 1, w_minus.e); const diyfp M_plus (w_plus.f - 1, w_plus.e ); decimal_exponent = -cached.k; // = -(-k) = k grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %rax movq %rcx, 0x58(%rsp) movl %r8d, 0x60(%rsp) movl 0xc8(%rsp), %edi cmpl %r8d, %edi jne 0xb9f5c movq %rax, 0x20(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) leaq 0xb0(%rsp), %r13 cmpl 0x8(%r13), %edi jne 0xb9f78 callq 0xba033 movq %rdx, %r12 leaq 0x68(%rsp), %r14 movq %rax, (%r14) movl %r12d, 0x8(%r14) movq %r13, %rdi movq %r14, %rsi callq 0xba174 movq %rax, %r15 movl %edx, %ebx leaq 0x58(%rsp), %rdi movq %r14, %rsi callq 0xba174 movq %rax, %r13 movl %edx, %ebp leaq 0xc0(%rsp), %rdi movq %r14, %rsi callq 0xba174 incq %r13 decq %rax shrq $0x20, %r12 negl %r12d movq 0x30(%rsp), %rcx movl %r12d, (%rcx) movq %r15, 0x48(%rsp) movl %ebx, 0x50(%rsp) movq %rax, 0x38(%rsp) movl %edx, 0x40(%rsp) movups 0x38(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq %rcx, %rdx movq %r13, %rcx movl %ebp, %r8d callq 0xba1d0 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x355f6(%rip), %rdi # 0xef559 leaq 0x35639(%rip), %rdx # 0xef5a3 leaq 0x3ade8(%rip), %rcx # 0xf4d59 movl $0x454b, %esi # imm = 0x454B jmp 0xb9f92 leaq 0x355da(%rip), %rdi # 0xef559 leaq 0x3561d(%rip), %rdx # 0xef5a3 leaq 0x3ade2(%rip), %rcx # 0xf4d6f movl $0x454c, %esi # imm = 0x454C xorl %eax, %eax callq 0x1bec0 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rax, rdi mov [rsp+0A8h+var_50], rcx mov [rsp+0A8h+var_48], r8d mov edi, dword ptr [rsp+0A8h+arg_18]; this cmp edi, r8d jnz loc_B9F5C mov [rsp+0A8h+var_88], rax mov [rsp+0A8h+var_80], rsi mov [rsp+0A8h+var_78], rdx lea r13, [rsp+0A8h+arg_0] cmp edi, [r13+8] jnz loc_B9F78 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) mov r12, rdx lea r14, [rsp+0A8h+var_40] mov [r14], rax mov [r14+8], r12d mov rdi, r13 mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r15, rax mov ebx, edx lea rdi, [rsp+0A8h+var_50] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r13, rax mov ebp, edx lea rdi, [rsp+0A8h+arg_10] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) inc r13 dec rax shr r12, 20h neg r12d mov rcx, [rsp+0A8h+var_78] mov [rcx], r12d mov qword ptr [rsp+0A8h+var_60], r15 mov dword ptr [rsp+0A8h+var_60+8], ebx mov qword ptr [rsp+0A8h+var_70], rax mov dword ptr [rsp+0A8h+var_70+8], edx movups xmm0, [rsp+0A8h+var_70] movups [rsp+0A8h+var_98], xmm0 movups xmm0, [rsp+0A8h+var_60] movups [rsp+0A8h+var_A8], xmm0 mov rdi, [rsp+0A8h+var_88] mov rsi, [rsp+0A8h+var_80] mov rdx, rcx mov rcx, r13 mov r8d, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B9F5C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e" mov esi, 454Bh jmp short loc_B9F92 loc_B9F78: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEVE; "m_plus.e == v.e" mov esi, 454Ch loc_B9F92: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( int a1, int a2, _DWORD *a3, long long a4, int a5, int a6, char a7, int a8, char a9, nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a10) { long long cached_power_for_binary_exponent; // rax int v11; // rdx^4 int v12; // r12^4 int v13; // edx char v14; // r15 int v15; // edx int v16; // ebx int v17; // r13d int v18; // edx int v19; // ebp char v20; // al int v21; // edx int v22; // r9d long long v24; // rsi long long v26; // [rsp+58h] [rbp-50h] BYREF int v27; // [rsp+60h] [rbp-48h] long long v28; // [rsp+68h] [rbp-40h] BYREF int v29; // [rsp+70h] [rbp-38h] v26 = a4; v27 = a5; if ( (_DWORD)a10 == a5 ) { if ( (_DWORD)a10 == a8 ) { cached_power_for_binary_exponent = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(unsigned int)a10, a2); v12 = v11; v28 = cached_power_for_binary_exponent; v29 = v13; v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v28); v16 = v15; v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v26, &v28); v19 = v18; v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v28); *a3 = -v12; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( a1, a2, (_DWORD)a3, v17 + 1, v19, v22, v14, v16, v20 - 1, v21); } v24 = 17740LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17740LL, "GGML_ASSERT(%s) failed", "m_plus.e == v.e"); } else { v24 = 17739LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17739LL, "GGML_ASSERT(%s) failed", "m_plus.e == m_minus.e"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v24); }
grisu2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RAX,RDI MOV qword ptr [RSP + 0x58],RCX MOV dword ptr [RSP + 0x60],R8D MOV EDI,dword ptr [RSP + 0xc8] CMP EDI,R8D JNZ 0x001b9f5c MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX LEA R13,[RSP + 0xb0] CMP EDI,dword ptr [R13 + 0x8] JNZ 0x001b9f78 CALL 0x001ba033 MOV R12,RDX LEA R14,[RSP + 0x68] MOV qword ptr [R14],RAX MOV dword ptr [R14 + 0x8],R12D MOV RDI,R13 MOV RSI,R14 CALL 0x001ba174 MOV R15,RAX MOV EBX,EDX LEA RDI,[RSP + 0x58] MOV RSI,R14 CALL 0x001ba174 MOV R13,RAX MOV EBP,EDX LEA RDI,[RSP + 0xc0] MOV RSI,R14 CALL 0x001ba174 INC R13 DEC RAX SHR R12,0x20 NEG R12D MOV RCX,qword ptr [RSP + 0x30] MOV dword ptr [RCX],R12D MOV qword ptr [RSP + 0x48],R15 MOV dword ptr [RSP + 0x50],EBX MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x40],EDX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,RCX MOV RCX,R13 MOV R8D,EBP CALL 0x001ba1d0 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b9f5c: LEA RDI,[0x1ef559] LEA RDX,[0x1ef5a3] LEA RCX,[0x1f4d59] MOV ESI,0x454b JMP 0x001b9f92 LAB_001b9f78: LEA RDI,[0x1ef559] LEA RDX,[0x1ef5a3] LEA RCX,[0x1f4d6f] MOV ESI,0x454c LAB_001b9f92: XOR EAX,EAX CALL 0x0011bec0
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2 (int8 param_1,int8 param_2,int *param_3,int8 param_4,int param_5, int8 param_6,int8 param_7,int param_8,int8 param_9,int param_10) { int4 uVar1; char *pcVar2; int4 extraout_EDX; int8 uVar3; int1 auVar4 [12]; int1 auVar5 [12]; int1 auVar6 [16]; int4 uStack_64; int8 local_50; int local_48; int8 local_40; int4 local_38; local_50 = param_4; local_48 = param_5; if (param_10 == param_5) { if (param_10 == param_8) { auVar6 = get_cached_power_for_binary_exponent(param_10); local_40 = auVar6._0_8_; local_38 = auVar6._8_4_; uVar1 = diyfp::mul((diyfp *)&param_7,(diyfp *)&local_40); auVar4 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40); auVar5 = diyfp::mul((diyfp *)&param_9,(diyfp *)&local_40); *param_3 = -auVar6._12_4_; grisu2_digit_gen(param_1,param_2,param_3,auVar4._0_8_ + 1,auVar4._8_4_,param_6,uVar1, extraout_EDX,auVar5._0_8_ + -1,CONCAT44(uStack_64,auVar5._8_4_)); return; } pcVar2 = "m_plus.e == v.e"; uVar3 = 0x454c; } else { pcVar2 = "m_plus.e == m_minus.e"; uVar3 = 0x454b; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
48,707
inflateBackInit_
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/infback.c
int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) z_streamp strm; int windowBits; unsigned char FAR *window; const char *version; int stream_size; { struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || stream_size != (int)(sizeof(z_stream))) return Z_VERSION_ERROR; if (strm == Z_NULL || window == Z_NULL || windowBits < 8 || windowBits > 15) return Z_STREAM_ERROR; strm->msg = Z_NULL; /* in case we return an error */ if (strm->zalloc == (alloc_func)0) { #ifdef Z_SOLO return Z_STREAM_ERROR; #else strm->zalloc = zcalloc; strm->opaque = (voidpf)0; #endif } if (strm->zfree == (free_func)0) #ifdef Z_SOLO return Z_STREAM_ERROR; #else strm->zfree = zcfree; #endif state = (struct inflate_state FAR *)ZALLOC(strm, 1, sizeof(struct inflate_state)); if (state == Z_NULL) return Z_MEM_ERROR; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; state->dmax = 32768U; state->wbits = (uInt)windowBits; state->wsize = 1U << windowBits; state->window = window; state->wnext = 0; state->whave = 0; state->sane = 1; return Z_OK; }
O3
c
inflateBackInit_: movl $0xfffffffa, %eax # imm = 0xFFFFFFFA testq %rcx, %rcx je 0xb0f5 cmpl $0x70, %r8d jne 0xb0f5 cmpb $0x31, (%rcx) jne 0xb0f5 pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %r14d leal -0x10(%r14), %ecx movl $0xfffffffe, %eax # imm = 0xFFFFFFFE cmpl $-0x8, %ecx jb 0xb0eb movq %rdi, %r15 testq %rdi, %rdi je 0xb0eb movq %rdx, %rbx testq %rdx, %rdx je 0xb0eb movq $0x0, 0x30(%r15) movq 0x40(%r15), %rax testq %rax, %rax jne 0xb089 leaq 0x3c02(%rip), %rax # 0xec7f movq %rax, 0x40(%r15) movq $0x0, 0x50(%r15) cmpq $0x0, 0x48(%r15) jne 0xb09b leaq 0x3bf2(%rip), %rcx # 0xec89 movq %rcx, 0x48(%r15) movq 0x50(%r15), %rdi movl $0x1, %ebp movl $0x1, %esi movl $0x1bf8, %edx # imm = 0x1BF8 callq *%rax testq %rax, %rax je 0xb0e6 movq %rax, 0x38(%r15) movl $0x8000, 0x1c(%rax) # imm = 0x8000 movl %r14d, 0x38(%rax) movl %r14d, %ecx shll %cl, %ebp movl %ebp, 0x3c(%rax) movq %rbx, 0x48(%rax) movq $0x0, 0x40(%rax) movl $0x1, 0x1be8(%rax) xorl %eax, %eax jmp 0xb0eb movl $0xfffffffc, %eax # imm = 0xFFFFFFFC addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
inflateBackInit_: mov eax, 0FFFFFFFAh test rcx, rcx jz locret_B0F5 cmp r8d, 70h ; 'p' jnz locret_B0F5 cmp byte ptr [rcx], 31h ; '1' jnz locret_B0F5 push rbp push r15 push r14 push rbx push rax mov r14d, esi lea ecx, [r14-10h] mov eax, 0FFFFFFFEh cmp ecx, 0FFFFFFF8h jb loc_B0EB mov r15, rdi test rdi, rdi jz loc_B0EB mov rbx, rdx test rdx, rdx jz loc_B0EB mov qword ptr [r15+30h], 0 mov rax, [r15+40h] test rax, rax jnz short loc_B089 lea rax, zcalloc mov [r15+40h], rax mov qword ptr [r15+50h], 0 loc_B089: cmp qword ptr [r15+48h], 0 jnz short loc_B09B lea rcx, zcfree mov [r15+48h], rcx loc_B09B: mov rdi, [r15+50h] mov ebp, 1 mov esi, 1 mov edx, 1BF8h call rax test rax, rax jz short loc_B0E6 mov [r15+38h], rax mov dword ptr [rax+1Ch], 8000h mov [rax+38h], r14d mov ecx, r14d shl ebp, cl mov [rax+3Ch], ebp mov [rax+48h], rbx mov qword ptr [rax+40h], 0 mov dword ptr [rax+1BE8h], 1 xor eax, eax jmp short loc_B0EB loc_B0E6: mov eax, 0FFFFFFFCh loc_B0EB: add rsp, 8 pop rbx pop r14 pop r15 pop rbp locret_B0F5: retn
long long inflateBackInit_(_QWORD *a1, int a2, long long a3, _BYTE *a4, int a5) { long long result; // rax long long ( *v7)(); // rax long long v8; // rax result = 4294967290LL; if ( a4 ) { if ( a5 == 112 && *a4 == 49 ) { result = 4294967294LL; if ( (unsigned int)(a2 - 16) >= 0xFFFFFFF8 && a1 && a3 ) { a1[6] = 0LL; v7 = (long long ( *)())a1[8]; if ( !v7 ) { v7 = zcalloc; a1[8] = zcalloc; a1[10] = 0LL; } if ( !a1[9] ) a1[9] = zcfree; v8 = ((long long ( *)(_QWORD, long long, long long))v7)(a1[10], 1LL, 7160LL); if ( v8 ) { a1[7] = v8; *(_DWORD *)(v8 + 28) = 0x8000; *(_DWORD *)(v8 + 56) = a2; *(_DWORD *)(v8 + 60) = 1 << a2; *(_QWORD *)(v8 + 72) = a3; *(_QWORD *)(v8 + 64) = 0LL; *(_DWORD *)(v8 + 7144) = 1; return 0LL; } else { return 4294967292LL; } } } } return result; }
inflateBackInit_: MOV EAX,0xfffffffa TEST RCX,RCX JZ 0x0010b0f5 CMP R8D,0x70 JNZ 0x0010b0f5 CMP byte ptr [RCX],0x31 JNZ 0x0010b0f5 PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,ESI LEA ECX,[R14 + -0x10] MOV EAX,0xfffffffe CMP ECX,-0x8 JC 0x0010b0eb MOV R15,RDI TEST RDI,RDI JZ 0x0010b0eb MOV RBX,RDX TEST RDX,RDX JZ 0x0010b0eb MOV qword ptr [R15 + 0x30],0x0 MOV RAX,qword ptr [R15 + 0x40] TEST RAX,RAX JNZ 0x0010b089 LEA RAX,[0x10ec7f] MOV qword ptr [R15 + 0x40],RAX MOV qword ptr [R15 + 0x50],0x0 LAB_0010b089: CMP qword ptr [R15 + 0x48],0x0 JNZ 0x0010b09b LEA RCX,[0x10ec89] MOV qword ptr [R15 + 0x48],RCX LAB_0010b09b: MOV RDI,qword ptr [R15 + 0x50] MOV EBP,0x1 MOV ESI,0x1 MOV EDX,0x1bf8 CALL RAX TEST RAX,RAX JZ 0x0010b0e6 MOV qword ptr [R15 + 0x38],RAX MOV dword ptr [RAX + 0x1c],0x8000 MOV dword ptr [RAX + 0x38],R14D MOV ECX,R14D SHL EBP,CL MOV dword ptr [RAX + 0x3c],EBP MOV qword ptr [RAX + 0x48],RBX MOV qword ptr [RAX + 0x40],0x0 MOV dword ptr [RAX + 0x1be8],0x1 XOR EAX,EAX JMP 0x0010b0eb LAB_0010b0e6: MOV EAX,0xfffffffc LAB_0010b0eb: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP LAB_0010b0f5: RET
int8 inflateBackInit_(long param_1,int param_2,long param_3,char *param_4,int param_5) { int8 uVar1; code *pcVar2; long lVar3; uVar1 = 0xfffffffa; if ((((param_4 != (char *)0x0) && (param_5 == 0x70)) && (*param_4 == '1')) && (((uVar1 = 0xfffffffe, 0xfffffff7 < param_2 - 0x10U && (param_1 != 0)) && (param_3 != 0)))) { *(int8 *)(param_1 + 0x30) = 0; pcVar2 = *(code **)(param_1 + 0x40); if (pcVar2 == (code *)0x0) { pcVar2 = zcalloc; *(code **)(param_1 + 0x40) = zcalloc; *(int8 *)(param_1 + 0x50) = 0; } if (*(long *)(param_1 + 0x48) == 0) { *(code **)(param_1 + 0x48) = zcfree; } lVar3 = (*pcVar2)(*(int8 *)(param_1 + 0x50),1,0x1bf8); if (lVar3 == 0) { uVar1 = 0xfffffffc; } else { *(long *)(param_1 + 0x38) = lVar3; *(int4 *)(lVar3 + 0x1c) = 0x8000; *(int *)(lVar3 + 0x38) = param_2; *(int *)(lVar3 + 0x3c) = 1 << ((byte)param_2 & 0x1f); *(long *)(lVar3 + 0x48) = param_3; *(int8 *)(lVar3 + 0x40) = 0; *(int4 *)(lVar3 + 0x1be8) = 1; uVar1 = 0; } } return uVar1; }
48,708
uf_space_endspace
eloqsql/storage/maria/ma_packrec.c
static void uf_space_endspace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill(to, (end-to), ' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill(end - spaces, spaces, ' '); } }
O3
c
uf_space_endspace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl 0x4(%rsi), %eax testl %eax, %eax je 0x3ac31 movl (%r15), %r12d decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jae 0x3ac4e subq %r14, %rbx movq %r14, %rdi movl $0x20, %esi movq %rbx, %rdx jmp 0x3acfe movq %r15, %rdi callq 0x3a694 movl $0x1f, 0x4(%r15) movl (%r15), %r12d movl $0x1f, %eax testl %r12d, %r12d js 0x3ac1e movq %r13, %rdx movl 0x24(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0x3ac9a subl %eax, %r13d movl %eax, %eax leaq 0xa64b4(%rip), %rcx # 0xe1120 andl (%rcx,%rax,4), %r12d movl %r13d, %ecx shll %cl, %r12d movq %r15, %rdi callq 0x3a694 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r12d jmp 0x3acaf movl %ecx, 0x4(%r15) shrl %cl, %r12d movl 0x24(%rdx), %eax leaq 0xa6475(%rip), %rcx # 0xe1120 andl (%rcx,%rax,4), %r12d movl %r12d, %r13d leaq (%r14,%r13), %rax cmpq %rbx, %rax jbe 0x3acd2 movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r12 negq %r12 cmpq %rbx, %rax je 0x3acf0 leaq (%rbx,%r12), %rcx movq -0x30(%rbp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x3a851 addq %r12, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292c0
uf_space_endspace: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r13, rdi mov eax, [rsi+4] test eax, eax jz short loc_3AC31 mov r12d, [r15] dec eax mov [r15+4], eax bt r12d, eax jnb short loc_3AC4E loc_3AC1E: sub rbx, r14 mov rdi, r14 mov esi, 20h ; ' ' mov rdx, rbx jmp loc_3ACFE loc_3AC31: mov rdi, r15 call fill_buffer mov dword ptr [r15+4], 1Fh mov r12d, [r15] mov eax, 1Fh test r12d, r12d js short loc_3AC1E loc_3AC4E: mov rdx, r13 mov r13d, [r13+24h] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_3AC9A sub r13d, eax mov eax, eax lea rcx, mask and r12d, [rcx+rax*4] mov ecx, r13d shl r12d, cl mov rdi, r15 call fill_buffer mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add r12d, eax jmp short loc_3ACAF loc_3AC9A: mov [r15+4], ecx shr r12d, cl mov eax, [rdx+24h] lea rcx, mask and r12d, [rcx+rax*4] loc_3ACAF: mov r13d, r12d lea rax, [r14+r13] cmp rax, rbx jbe short loc_3ACD2 mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3ACD2: mov r12, r13 neg r12 cmp rax, rbx jz short loc_3ACF0 lea rcx, [rbx+r12] mov rdi, [rbp+var_30] mov rsi, r15 mov rdx, r14 call decode_bytes loc_3ACF0: add rbx, r12 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 loc_3ACFE: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
unsigned long long uf_space_endspace(long long a1, unsigned int *a2, _BYTE *a3, unsigned long long a4) { unsigned int v6; // eax unsigned int v7; // r12d unsigned int v8; // eax unsigned long long result; // rax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r12d unsigned int v14; // r12d v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return memset(a3, 32LL, a4 - (_QWORD)a3); } else { fill_buffer((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) != 0 ) return memset(a3, 32LL, a4 - (_QWORD)a3); } v10 = *(_DWORD *)(a1 + 36); v11 = v8 - v10; if ( v8 >= v10 ) { a2[1] = v11; v14 = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v11); } else { v12 = v10 - v8; v13 = (mask[v8] & v7) << v12; fill_buffer((long long)a2); a2[1] = 32 - v12; v14 = (*a2 >> -(char)v12) + v13; } result = (unsigned long long)&a3[v14]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes(a1, (long long)a2, a3, (_BYTE *)(a4 - v14)); return memset(a4 - v14, 32LL, v14); } else { a2[10] = 1; } return result; }
uf_space_endspace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R13,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x0013ac31 MOV R12D,dword ptr [R15] DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JNC 0x0013ac4e LAB_0013ac1e: SUB RBX,R14 MOV RDI,R14 MOV ESI,0x20 MOV RDX,RBX JMP 0x0013acfe LAB_0013ac31: MOV RDI,R15 CALL 0x0013a694 MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] MOV EAX,0x1f TEST R12D,R12D JS 0x0013ac1e LAB_0013ac4e: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x24] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x0013ac9a SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e1120] AND R12D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R12D,CL MOV RDI,R15 CALL 0x0013a694 MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R12D,EAX JMP 0x0013acaf LAB_0013ac9a: MOV dword ptr [R15 + 0x4],ECX SHR R12D,CL MOV EAX,dword ptr [RDX + 0x24] LEA RCX,[0x1e1120] AND R12D,dword ptr [RCX + RAX*0x4] LAB_0013acaf: MOV R13D,R12D LEA RAX,[R14 + R13*0x1] CMP RAX,RBX JBE 0x0013acd2 MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013acd2: MOV R12,R13 NEG R12 CMP RAX,RBX JZ 0x0013acf0 LEA RCX,[RBX + R12*0x1] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,R14 CALL 0x0013a851 LAB_0013acf0: ADD RBX,R12 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 LAB_0013acfe: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292c0
void uf_space_endspace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; size_t __n; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; uVar3 = 0x1f; if (-1 < (int)uVar5) goto LAB_0013ac4e; } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) { LAB_0013ac4e: uVar1 = *(uint *)(param_1 + 0x24); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)]; } __n = (size_t)uVar5; if (param_4 < (long)param_3 + __n) { param_2[10] = 1; return; } if ((long)param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } param_3 = (void *)(param_4 + -__n); goto LAB_0013acfe; } } __n = param_4 - (long)param_3; LAB_0013acfe: memset(param_3,0x20,__n); return; }
48,709
testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0)
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest.h
TestInfo* RegisterTest(const char* test_suite_name, const char* test_name, const char* type_param, const char* value_param, const char* file, int line, Factory factory) { using TestT = typename std::remove_pointer<decltype(factory())>::type; class FactoryImpl : public internal::TestFactoryBase { public: explicit FactoryImpl(Factory f) : factory_(std::move(f)) {} Test* CreateTest() override { return factory_(); } private: Factory factory_; }; return internal::MakeAndRegisterTestInfo( test_suite_name, test_name, type_param, value_param, internal::CodeLocation(file, line), internal::GetTypeId<TestT>(), internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line), internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line), new FactoryImpl{std::move(factory)}); }
O0
c
testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0): subq $0x198, %rsp # imm = 0x198 movq 0x1a0(%rsp), %rax movq %rax, 0x78(%rsp) movq %rdi, 0x190(%rsp) movq %rsi, 0x188(%rsp) movq %rdx, 0x180(%rsp) movq %rcx, 0x178(%rsp) movq %r8, 0x170(%rsp) movl %r9d, 0x16c(%rsp) movq 0x190(%rsp), %rax movq %rax, 0x80(%rsp) leaq 0x147(%rsp), %rdi movq %rdi, 0x88(%rsp) callq 0x15de0 movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx leaq 0x148(%rsp), %rdi callq 0x1bd40 jmp 0xfe008 movq 0x188(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x180(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x178(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x170(%rsp), %rax movq %rax, 0x68(%rsp) leaq 0xe7(%rsp), %rdi movq %rdi, 0x70(%rsp) callq 0x15de0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0xe8(%rsp), %rdi callq 0x1bd40 jmp 0xfe067 movl 0x16c(%rsp), %edx leaq 0x108(%rsp), %rdi leaq 0xe8(%rsp), %rsi callq 0x1be00 jmp 0xfe085 callq 0x11fbb0 movq %rax, 0x48(%rsp) jmp 0xfe091 movq 0x170(%rsp), %rdi movl 0x16c(%rsp), %esi callq 0x11fbc0 movq %rax, 0x40(%rsp) jmp 0xfe0ac movq 0x170(%rsp), %rdi movl 0x16c(%rsp), %esi callq 0x11fd20 movq %rax, 0x38(%rsp) jmp 0xfe0c7 movl $0x50, %edi callq 0x15760 movq %rax, 0x30(%rsp) jmp 0xfe0d8 movq 0x78(%rsp), %rsi movb $0x1, 0x97(%rsp) leaq 0x98(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x11fe80 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x11fec0 jmp 0xfe108 movq 0x48(%rsp), %r9 movq 0x60(%rsp), %rcx movq 0x58(%rsp), %rdx movq 0x50(%rsp), %rsi movq 0x40(%rsp), %rdi movq 0x38(%rsp), %r8 movq 0x30(%rsp), %r10 movb $0x0, 0x97(%rsp) movq %rsp, %rax movq %r10, 0x10(%rax) movq %r8, 0x8(%rax) movq %rdi, (%rax) leaq 0x148(%rsp), %rdi leaq 0x108(%rsp), %r8 callq 0x1078e0 movq %rax, 0x20(%rsp) jmp 0xfe15d leaq 0x98(%rsp), %rdi callq 0xfe2b0 leaq 0x108(%rsp), %rdi callq 0x1c150 leaq 0xe8(%rsp), %rdi callq 0x1c160 leaq 0xe7(%rsp), %rdi callq 0x157f0 leaq 0x148(%rsp), %rdi callq 0x1c160 leaq 0x147(%rsp), %rdi callq 0x157f0 movq 0x20(%rsp), %rax addq $0x198, %rsp # imm = 0x198 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x138(%rsp) movl %eax, 0x134(%rsp) jmp 0xfe288 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x138(%rsp) movl %eax, 0x134(%rsp) jmp 0xfe26e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x138(%rsp) movl %eax, 0x134(%rsp) jmp 0xfe261 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x138(%rsp) movl %eax, 0x134(%rsp) jmp 0xfe254 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x138(%rsp) movl %eax, 0x134(%rsp) leaq 0x98(%rsp), %rdi callq 0xfe2b0 testb $0x1, 0x97(%rsp) jne 0xfe243 jmp 0xfe252 movq 0x30(%rsp), %rdi movl $0x50, %esi callq 0x15780 jmp 0xfe254 leaq 0x108(%rsp), %rdi callq 0x1c150 leaq 0xe8(%rsp), %rdi callq 0x1c160 leaq 0xe7(%rsp), %rdi callq 0x157f0 leaq 0x148(%rsp), %rdi callq 0x1c160 leaq 0x147(%rsp), %rdi callq 0x157f0 movq 0x138(%rsp), %rdi callq 0x15dd0 nopw %cs:(%rax,%rax)
_ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_: sub rsp, 198h mov rax, qword ptr [rsp+198h+arg_0] mov qword ptr [rsp+198h+var_120], rax; int mov qword ptr [rsp+198h+var_8], rdi mov qword ptr [rsp+198h+var_10], rsi mov qword ptr [rsp+198h+var_18], rdx mov qword ptr [rsp+198h+var_20], rcx mov qword ptr [rsp+198h+var_28], r8 mov [rsp+198h+var_2C], r9d mov rax, qword ptr [rsp+198h+var_8] mov qword ptr [rsp+198h+var_118], rax; int lea rdi, [rsp+198h+var_51] mov [rsp+198h+var_110], rdi; __int64 call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+198h+var_118] mov rdx, [rsp+198h+var_110] lea rdi, [rsp+198h+var_51+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_FE008: mov rax, qword ptr [rsp+198h+var_10] mov qword ptr [rsp+198h+var_148], rax; int mov rax, qword ptr [rsp+198h+var_18] mov qword ptr [rsp+198h+var_140], rax; char mov rax, qword ptr [rsp+198h+var_20] mov qword ptr [rsp+198h+var_138], rax; int mov rax, qword ptr [rsp+198h+var_28] mov qword ptr [rsp+198h+var_130], rax; int lea rdi, [rsp+198h+var_B1] mov qword ptr [rsp+198h+var_128], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+198h+var_130] mov rdx, qword ptr [rsp+198h+var_128] lea rdi, [rsp+198h+var_B1+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_FE067: mov edx, [rsp+198h+var_2C] lea rdi, [rsp+198h+var_90] lea rsi, [rsp+198h+var_B1+1] call _ZN7testing8internal12CodeLocationC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; testing::internal::CodeLocation::CodeLocation(std::string,int) jmp short $+2 loc_FE085: call _ZN7testing8internal9GetTypeIdINS0_12_GLOBAL__N_111FailureTestEEEPKvv; testing::internal::GetTypeId<testing::internal::`anonymous namespace'::FailureTest>(void) mov qword ptr [rsp+198h+var_150], rax; int jmp short $+2 loc_FE091: mov rdi, qword ptr [rsp+198h+var_28] mov esi, [rsp+198h+var_2C] call _ZN7testing8internal16SuiteApiResolverINS0_12_GLOBAL__N_111FailureTestEE19GetSetUpCaseOrSuiteEPKci; testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetSetUpCaseOrSuite(char const*,int) mov qword ptr [rsp+198h+var_158], rax; int jmp short $+2 loc_FE0AC: mov rdi, qword ptr [rsp+198h+var_28] mov esi, [rsp+198h+var_2C] call _ZN7testing8internal16SuiteApiResolverINS0_12_GLOBAL__N_111FailureTestEE22GetTearDownCaseOrSuiteEPKci; testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetTearDownCaseOrSuite(char const*,int) mov [rsp+198h+var_160], rax; void * jmp short $+2 loc_FE0C7: mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rsp+198h+var_168], rax; int jmp short $+2 loc_FE0D8: mov rsi, qword ptr [rsp+198h+var_120] mov [rsp+198h+var_101], 1 lea rdi, [rsp+198h+var_100] mov qword ptr [rsp+198h+var_170], rdi; int call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0C2EOSA_; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::$_0($_0&&) mov rdi, qword ptr [rsp+198h+var_168] mov rsi, qword ptr [rsp+198h+var_170] call _ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImplC2ESC_ jmp short $+2 loc_FE108: mov r9, qword ptr [rsp+198h+var_150] mov rcx, qword ptr [rsp+198h+var_138] mov rdx, qword ptr [rsp+198h+var_140] mov rsi, qword ptr [rsp+198h+var_148] mov rdi, qword ptr [rsp+198h+var_158] mov r8, [rsp+198h+var_160] mov r10, qword ptr [rsp+198h+var_168] mov [rsp+198h+var_101], 0 mov rax, rsp mov [rax+10h], r10 mov [rax+8], r8 mov [rax], rdi lea rdi, [rsp+198h+var_51+1]; int lea r8, [rsp+198h+var_90] call _ZN7testing8internal23MakeAndRegisterTestInfoENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcS8_S8_NS0_12CodeLocationEPKvPFvvESD_PNS0_15TestFactoryBaseE; testing::internal::MakeAndRegisterTestInfo(std::string,char const*,char const*,char const*,testing::internal::CodeLocation,void const*,void (*)(void),void (*)(void),testing::internal::TestFactoryBase *) mov [rsp+198h+var_178], rax jmp short $+2 loc_FE15D: lea rdi, [rsp+198h+var_100] call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0D2Ev; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0() lea rdi, [rsp+198h+var_90]; this call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation() lea rdi, [rsp+198h+var_B1+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+198h+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+198h+var_51+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+198h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+198h+var_178] add rsp, 198h retn mov rcx, rax mov eax, edx mov [rsp+arg_130], rcx mov [rsp+arg_12C], eax jmp loc_FE288 mov rcx, rax mov eax, edx mov [rsp+arg_130], rcx mov [rsp+arg_12C], eax jmp loc_FE26E mov rcx, rax mov eax, edx mov [rsp+arg_130], rcx mov [rsp+arg_12C], eax jmp short loc_FE261 mov rcx, rax mov eax, edx mov [rsp+arg_130], rcx mov [rsp+arg_12C], eax jmp short loc_FE254 mov rcx, rax mov eax, edx mov [rsp+arg_130], rcx mov [rsp+arg_12C], eax lea rdi, [rsp+arg_90] call _ZZN7testing8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12CodeLocationEbEN3$_0D2Ev; testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0() test [rsp+arg_8F], 1 jnz short loc_FE243 jmp short loc_FE252 loc_FE243: mov rdi, [rsp+arg_28]; void * mov esi, 50h ; 'P'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_FE252: jmp short $+2 loc_FE254: lea rdi, [rsp+arg_100]; this call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation() loc_FE261: lea rdi, [rsp+arg_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_FE26E: lea rdi, [rsp+arg_DF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+arg_140]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_FE288: lea rdi, [rsp+arg_13F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_130] call __Unwind_Resume
long long ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, long long a7) { long long v7; // rdx int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d int v12; // edx int v13; // ecx int v14; // r8d int v15; // r9d const char *v16; // rsi int v18; // [rsp+18h] [rbp-180h] int v19; // [rsp+20h] [rbp-178h] long long v20; // [rsp+20h] [rbp-178h] long long v21; // [rsp+30h] [rbp-168h] void (*TearDownCaseOrSuite)(void); // [rsp+38h] [rbp-160h] void (*SetUpCaseOrSuite)(void); // [rsp+40h] [rbp-158h] int v24; // [rsp+48h] [rbp-150h] int v25[2]; // [rsp+50h] [rbp-148h] char v26; // [rsp+58h] [rbp-140h] int v27; // [rsp+60h] [rbp-138h] long long v28; // [rsp+68h] [rbp-130h] int v29; // [rsp+90h] [rbp-108h] int v30[8]; // [rsp+98h] [rbp-100h] BYREF char v31; // [rsp+B8h] [rbp-E0h] int v32[8]; // [rsp+E7h] [rbp-B1h] BYREF _BYTE v33[63]; // [rsp+108h] [rbp-90h] BYREF char v34; // [rsp+147h] [rbp-51h] BYREF _BYTE v35[36]; // [rsp+148h] [rbp-50h] BYREF int v36; // [rsp+16Ch] [rbp-2Ch] int v37[2]; // [rsp+170h] [rbp-28h] int v38[2]; // [rsp+178h] [rbp-20h] char v39[8]; // [rsp+180h] [rbp-18h] int v40[2]; // [rsp+188h] [rbp-10h] int v41[2]; // [rsp+190h] [rbp-8h] *(_QWORD *)v41 = a1; *(_QWORD *)v40 = a2; *(_QWORD *)v39 = a3; *(_QWORD *)v38 = a4; *(_QWORD *)v37 = a5; v36 = a6; std::allocator<char>::allocator(&v34, a2, a3); std::string::basic_string<std::allocator<char>>((long long)v35, a1, (long long)&v34); *(_QWORD *)v25 = *(_QWORD *)v40; v26 = v39[0]; v27 = v38[0]; v28 = *(_QWORD *)v37; std::allocator<char>::allocator(v32, a1, v7); std::string::basic_string<std::allocator<char>>((long long)v32 + 1, v28, (long long)v32); testing::internal::CodeLocation::CodeLocation((long long)v33, (long long)v32 + 1, v36); v24 = testing::internal::GetTypeId<testing::internal::`anonymous namespace'::FailureTest>(); SetUpCaseOrSuite = (void (*)(void))testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetSetUpCaseOrSuite( v37[0], v36, v8, v9, v10, v11); TearDownCaseOrSuite = (void (*)(void))testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetTearDownCaseOrSuite( v37[0], v36, v12, v13, v14, v15); v21 = operator new(0x50uLL); testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::$_0(v30, a7); ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImplC2ESC_( v21, v30); v16 = *(const char **)v25; v20 = testing::internal::MakeAndRegisterTestInfo( (int)v35, SetUpCaseOrSuite, TearDownCaseOrSuite, v21, v18, v19, (int)v30, v21, TearDownCaseOrSuite, (int)SetUpCaseOrSuite, v24, v25[0], v26, v27, v28, (int)v32, a7, a1, (long long)&v34, v29, v30[0], v30[2], v30[4], v30[6], v31); testing::internal::InsertSyntheticTestCase(std::string const&,testing::internal::CodeLocation,bool)::$_0::~$_0(v30); testing::internal::CodeLocation::~CodeLocation((testing::internal::CodeLocation *)v33); std::string::~string((char *)v32 + 1); std::allocator<char>::~allocator(v32, v16); std::string::~string(v35); std::allocator<char>::~allocator(&v34, v16); return v20; }
_ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_: SUB RSP,0x198 MOV RAX,qword ptr [RSP + 0x1a0] MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x190],RDI MOV qword ptr [RSP + 0x188],RSI MOV qword ptr [RSP + 0x180],RDX MOV qword ptr [RSP + 0x178],RCX MOV qword ptr [RSP + 0x170],R8 MOV dword ptr [RSP + 0x16c],R9D MOV RAX,qword ptr [RSP + 0x190] MOV qword ptr [RSP + 0x80],RAX LEA RDI,[RSP + 0x147] MOV qword ptr [RSP + 0x88],RDI CALL 0x00115de0 MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] LAB_001fdff9: LEA RDI,[RSP + 0x148] CALL 0x0011bd40 JMP 0x001fe008 LAB_001fe008: MOV RAX,qword ptr [RSP + 0x188] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x180] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x178] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x68],RAX LEA RDI,[RSP + 0xe7] MOV qword ptr [RSP + 0x70],RDI CALL 0x00115de0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LAB_001fe058: LEA RDI,[RSP + 0xe8] CALL 0x0011bd40 JMP 0x001fe067 LAB_001fe067: MOV EDX,dword ptr [RSP + 0x16c] LAB_001fe06e: LEA RDI,[RSP + 0x108] LEA RSI,[RSP + 0xe8] CALL 0x0011be00 JMP 0x001fe085 LAB_001fe085: CALL 0x0021fbb0 MOV qword ptr [RSP + 0x48],RAX JMP 0x001fe091 LAB_001fe091: MOV RDI,qword ptr [RSP + 0x170] MOV ESI,dword ptr [RSP + 0x16c] CALL 0x0021fbc0 MOV qword ptr [RSP + 0x40],RAX JMP 0x001fe0ac LAB_001fe0ac: MOV RDI,qword ptr [RSP + 0x170] MOV ESI,dword ptr [RSP + 0x16c] CALL 0x0021fd20 MOV qword ptr [RSP + 0x38],RAX JMP 0x001fe0c7 LAB_001fe0c7: MOV EDI,0x50 CALL 0x00115760 MOV qword ptr [RSP + 0x30],RAX JMP 0x001fe0d8 LAB_001fe0d8: MOV RSI,qword ptr [RSP + 0x78] MOV byte ptr [RSP + 0x97],0x1 LEA RDI,[RSP + 0x98] MOV qword ptr [RSP + 0x28],RDI CALL 0x0021fe80 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] LAB_001fe101: CALL 0x0021fec0 JMP 0x001fe108 LAB_001fe108: MOV R9,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x38] MOV R10,qword ptr [RSP + 0x30] MOV byte ptr [RSP + 0x97],0x0 MOV RAX,RSP MOV qword ptr [RAX + 0x10],R10 MOV qword ptr [RAX + 0x8],R8 MOV qword ptr [RAX],RDI LEA RDI,[RSP + 0x148] LEA R8,[RSP + 0x108] CALL 0x002078e0 LAB_001fe156: MOV qword ptr [RSP + 0x20],RAX JMP 0x001fe15d LAB_001fe15d: LEA RDI,[RSP + 0x98] CALL 0x001fe2b0 LEA RDI,[RSP + 0x108] CALL 0x0011c150 LEA RDI,[RSP + 0xe8] CALL 0x0011c160 LEA RDI,[RSP + 0xe7] CALL 0x001157f0 LEA RDI,[RSP + 0x148] CALL 0x0011c160 LEA RDI,[RSP + 0x147] CALL 0x001157f0 MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x198 RET
int8 _ZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_ (char *param_1,int8 param_2,int8 param_3,int8 param_4,char *param_5, int param_6,__0 *param_7) { char *pcVar1; int8 uVar2; int8 uVar3; void *pvVar4; int8 uVar5; int8 uVar6; void *pvVar7; int8 uVar8; __0 local_100 [79]; allocator local_b1; string local_b0 [32]; CodeLocation local_90 [63]; allocator local_51; string local_50 [36]; int local_2c; char *local_28; int8 local_20; int8 local_18; int8 local_10; char *local_8; local_2c = param_6; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001fdff9 to 001fe005 has its CatchHandler @ 001fe1b8 */ std::__cxx11::string::string<std::allocator<char>>(local_50,param_1,&local_51); uVar3 = local_10; uVar2 = local_18; uVar8 = local_20; pcVar1 = local_28; std::allocator<char>::allocator(); /* try { // try from 001fe058 to 001fe064 has its CatchHandler @ 001fe1d1 */ std::__cxx11::string::string<std::allocator<char>>(local_b0,pcVar1,&local_b1); /* try { // try from 001fe06e to 001fe082 has its CatchHandler @ 001fe1ea */ testing::internal::CodeLocation::CodeLocation(local_90,local_b0,local_2c); /* try { // try from 001fe085 to 001fe0d0 has its CatchHandler @ 001fe200 */ pvVar4 = testing::internal::GetTypeId<testing::internal::(anonymous_namespace)::FailureTest>(); uVar5 = testing::internal::SuiteApiResolver<testing::internal::(anonymous_namespace)::FailureTest> ::GetSetUpCaseOrSuite(local_28,local_2c); uVar6 = testing::internal::SuiteApiResolver<testing::internal::(anonymous_namespace)::FailureTest> ::GetTearDownCaseOrSuite(local_28,local_2c); pvVar7 = operator_new(0x50); testing::internal:: InsertSyntheticTestCase(std::__cxx11::string_const&,testing::internal::CodeLocation,bool)::$_0:: __0(local_100,param_7); /* try { // try from 001fe101 to 001fe155 has its CatchHandler @ 001fe216 */ _ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImplC2ESC_ (pvVar7,local_100); uVar8 = testing::internal::MakeAndRegisterTestInfo (local_50,uVar3,uVar2,uVar8,local_90,pvVar4,uVar5,uVar6,pvVar7); testing::internal:: InsertSyntheticTestCase(std::__cxx11::string_const&,testing::internal::CodeLocation,bool)::$_0:: ~__0(local_100); testing::internal::CodeLocation::~CodeLocation(local_90); std::__cxx11::string::~string(local_b0); std::allocator<char>::~allocator((allocator<char> *)&local_b1); std::__cxx11::string::~string(local_50); std::allocator<char>::~allocator((allocator<char> *)&local_51); return uVar8; }
48,710
remove_reader
eloqsql/mysys/mf_keycache.c
static void remove_reader(BLOCK_LINK *block) { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link && block->hash_link->block == block); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); DBUG_ASSERT(block->hash_link->requests); if (! --block->hash_link->requests && block->condvar) keycache_pthread_cond_signal(block->condvar); }
O3
c
remove_reader: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq 0x20(%rdi), %rax decl 0x28(%rax) je 0xb8e72 addq $0x8, %rsp popq %rbx popq %rbp retq movq 0x68(%rdi), %rbx testq %rbx, %rbx je 0xb8e6b movq 0x30(%rbx), %rdi testq %rdi, %rdi jne 0xb8e92 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x2b680 leaq 0x2ffd6f(%rip), %rax # 0x3b8c08 movq (%rax), %rax callq *0x170(%rax) jmp 0xb8e84
remove_reader: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi+20h] dec dword ptr [rax+28h] jz short loc_B8E72 loc_B8E6B: add rsp, 8 pop rbx pop rbp retn loc_B8E72: mov rbx, [rdi+68h] test rbx, rbx jz short loc_B8E6B mov rdi, [rbx+30h] test rdi, rdi jnz short loc_B8E92 loc_B8E84: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _pthread_cond_signal loc_B8E92: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_B8E84
long long remove_reader(long long a1) { long long result; // rax long long v3; // rbx long long v4; // rdi result = *(_QWORD *)(a1 + 32); if ( (*(_DWORD *)(result + 40))-- == 1 ) { v3 = *(_QWORD *)(a1 + 104); if ( v3 ) { v4 = *(_QWORD *)(v3 + 48); if ( v4 ) ((void ( *)(long long))PSI_server[46])(v4); return pthread_cond_signal(v3); } } return result; }
remove_reader: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI + 0x20] DEC dword ptr [RAX + 0x28] JZ 0x001b8e72 LAB_001b8e6b: ADD RSP,0x8 POP RBX POP RBP RET LAB_001b8e72: MOV RBX,qword ptr [RDI + 0x68] TEST RBX,RBX JZ 0x001b8e6b MOV RDI,qword ptr [RBX + 0x30] TEST RDI,RDI JNZ 0x001b8e92 LAB_001b8e84: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x0012b680 LAB_001b8e92: LEA RAX,[0x4b8c08] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001b8e84
void remove_reader(long param_1) { int *piVar1; pthread_cond_t *__cond; piVar1 = (int *)(*(long *)(param_1 + 0x20) + 0x28); *piVar1 = *piVar1 + -1; if ((*piVar1 == 0) && (__cond = *(pthread_cond_t **)(param_1 + 0x68), __cond != (pthread_cond_t *)0x0)) { if (__cond[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(__cond); return; } return; }
48,711
cleanup_statement_class()
eloqsql/storage/perfschema/pfs_instr_class.cc
void cleanup_statement_class(void) { PFS_FREE_ARRAY(& builtin_memory_statement_class, statement_class_max, sizeof(PFS_statement_class), statement_class_array); statement_class_array= NULL; statement_class_dirty_count= statement_class_allocated_count= 0; statement_class_max= 0; }
O0
cpp
cleanup_statement_class(): pushq %rbp movq %rsp, %rbp movq 0x3cff95(%rip), %rsi # 0x40a0a0 movq 0x3d0826(%rip), %rcx # 0x40a938 leaq 0x3ce4e7(%rip), %rdi # 0x408600 movl $0xc0, %edx callq 0x29bc0 movq $0x0, 0x3d080a(%rip) # 0x40a938 movl $0x0, 0x3d07f8(%rip) # 0x40a930 movl $0x0, 0x3d07f2(%rip) # 0x40a934 movq $0x0, 0x3cff53(%rip) # 0x40a0a0 popq %rbp retq nop
_Z23cleanup_statement_classv: push rbp mov rbp, rsp mov rsi, cs:statement_class_max mov rcx, cs:_ZL21statement_class_array; statement_class_array lea rdi, builtin_memory_statement_class mov edx, 0C0h call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) mov cs:_ZL21statement_class_array, 0; statement_class_array mov cs:_ZL31statement_class_allocated_count, 0; statement_class_allocated_count mov cs:_ZL27statement_class_dirty_count, 0; statement_class_dirty_count mov cs:statement_class_max, 0 pop rbp retn
long long cleanup_statement_class(void) { long long result; // rax result = pfs_free_array( (PFS_builtin_memory_class *)&builtin_memory_statement_class, statement_class_max, 192LL, (void *)statement_class_array); statement_class_array = 0LL; statement_class_allocated_count = 0; statement_class_dirty_count = 0; statement_class_max = 0LL; return result; }
cleanup_statement_class: PUSH RBP MOV RBP,RSP MOV RSI,qword ptr [0x0050a0a0] MOV RCX,qword ptr [0x0050a938] LEA RDI,[0x508600] MOV EDX,0xc0 CALL 0x00129bc0 MOV qword ptr [0x0050a938],0x0 MOV dword ptr [0x0050a930],0x0 MOV dword ptr [0x0050a934],0x0 MOV qword ptr [0x0050a0a0],0x0 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cleanup_statement_class() */ void cleanup_statement_class(void) { pfs_free_array((PFS_builtin_memory_class *)builtin_memory_statement_class,statement_class_max,0xc0 ,statement_class_array); statement_class_array = (void *)0x0; statement_class_allocated_count = 0; statement_class_dirty_count = 0; statement_class_max = 0; return; }
48,712
ma_store_length
eloqsql/storage/maria/ma_blockrec.c
uchar *ma_store_length(uchar *to, ulong nr) { if (nr < 251) { *to=(uchar) nr; return to+1; } if (nr < 65536) { if (nr <= 255) { to[0]= (uchar) 251; to[1]= (uchar) nr; return to+2; } to[0]= (uchar) 252; int2store(to+1, nr); return to+3; } if (nr < 16777216) { *to++= (uchar) 253; int3store(to, nr); return to+3; } *to++= (uchar) 254; int4store(to, nr); return to+4; }
O0
c
ma_store_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0xfb, -0x18(%rbp) jae 0x7a823 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x7a917 cmpq $0x10000, -0x18(%rbp) # imm = 0x10000 jae 0x7a88e cmpq $0xff, -0x18(%rbp) ja 0x7a85c movq -0x10(%rbp), %rax movb $-0x5, (%rax) movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) jmp 0x7a917 movq -0x10(%rbp), %rax movb $-0x4, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x8(%rbp) jmp 0x7a917 cmpq $0x1000000, -0x18(%rbp) # imm = 0x1000000 jae 0x7a8e5 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $-0x3, (%rax) movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x8(%rbp) jmp 0x7a917 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $-0x2, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax addq $0x4, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
ma_store_length: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0FBh jnb short loc_7A823 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_8], rax jmp loc_7A917 loc_7A823: cmp [rbp+var_18], 10000h jnb short loc_7A88E cmp [rbp+var_18], 0FFh ja short loc_7A85C mov rax, [rbp+var_10] mov byte ptr [rax], 0FBh mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_8], rax jmp loc_7A917 loc_7A85C: mov rax, [rbp+var_10] mov byte ptr [rax], 0FCh mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_20] mov [rax], cx mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_8], rax jmp loc_7A917 loc_7A88E: cmp [rbp+var_18], 1000000h jnb short loc_7A8E5 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0FDh mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_18] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_18] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_8], rax jmp short loc_7A917 loc_7A8E5: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0FEh mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov ecx, eax mov rax, [rbp+var_28] mov [rax], ecx mov rax, [rbp+var_10] add rax, 4 mov [rbp+var_8], rax loc_7A917: mov rax, [rbp+var_8] pop rbp retn
long long ma_store_length(long long a1, unsigned long long a2) { if ( a2 >= 0xFB ) { if ( a2 >= 0x10000 ) { if ( a2 >= 0x1000000 ) { *(_BYTE *)a1 = -2; *(_DWORD *)(a1 + 1) = a2; return a1 + 5; } else { *(_BYTE *)a1 = -3; *(_WORD *)(a1 + 1) = a2; *(_BYTE *)(a1 + 3) = BYTE2(a2); return a1 + 4; } } else if ( a2 > 0xFF ) { *(_BYTE *)a1 = -4; *(_WORD *)(a1 + 1) = a2; return a1 + 3; } else { *(_BYTE *)a1 = -5; *(_BYTE *)(a1 + 1) = a2; return a1 + 2; } } else { *(_BYTE *)a1 = a2; return a1 + 1; } }
ma_store_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0xfb JNC 0x0017a823 MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017a917 LAB_0017a823: CMP qword ptr [RBP + -0x18],0x10000 JNC 0x0017a88e CMP qword ptr [RBP + -0x18],0xff JA 0x0017a85c MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xfb MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017a917 LAB_0017a85c: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xfc MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017a917 LAB_0017a88e: CMP qword ptr [RBP + -0x18],0x1000000 JNC 0x0017a8e5 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0xfd MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017a917 LAB_0017a8e5: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0xfe MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x4 MOV qword ptr [RBP + -0x8],RAX LAB_0017a917: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * ma_store_length(int1 *param_1,ulong param_2) { int1 uVar1; int1 *local_10; uVar1 = (int1)param_2; if (param_2 < 0xfb) { *param_1 = uVar1; local_10 = param_1 + 1; } else if (param_2 < 0x10000) { if (param_2 < 0x100) { *param_1 = 0xfb; param_1[1] = uVar1; local_10 = param_1 + 2; } else { *param_1 = 0xfc; *(short *)(param_1 + 1) = (short)param_2; local_10 = param_1 + 3; } } else if (param_2 < 0x1000000) { *param_1 = 0xfd; param_1[1] = uVar1; param_1[2] = (char)(param_2 >> 8); param_1[3] = (char)(param_2 >> 0x10); local_10 = param_1 + 4; } else { *param_1 = 0xfe; *(int *)(param_1 + 1) = (int)param_2; local_10 = param_1 + 5; } return local_10; }
48,713
ma_net_safe_read
eloqsql/libmariadb/libmariadb/mariadb_lib.c
ulong ma_net_safe_read(MYSQL *mysql) { NET *net= &mysql->net; ulong len=0; restart: if (net->pvio != 0) len=ma_net_read(net); if (len == packet_error || len == 0) { end_server(mysql); #ifdef HAVE_TLS /* don't overwrite possible tls protocol errors */ if (net->last_errno != CR_SSL_CONNECTION_ERROR) #endif { my_set_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ? CR_NET_PACKET_TOO_LARGE: CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0, errno); } return(packet_error); } if (net->read_pos[0] == 255) { if (len > 3) { char *pos=(char*) net->read_pos+1; uint last_errno=uint2korr(pos); pos+=2; len-=2; if (last_errno== 65535 && ((mariadb_connection(mysql) && (mysql->server_capabilities & CLIENT_PROGRESS)) || (!(mysql->extension->mariadb_server_capabilities & MARIADB_CLIENT_PROGRESS << 32)))) { if (cli_report_progress(mysql, (uchar *)pos, (uint) (len-1))) { /* Wrong packet */ my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0); return (packet_error); } goto restart; } net->last_errno= last_errno; if (pos[0]== '#') { ma_strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH); pos+= SQLSTATE_LENGTH + 1; } else { strncpy(net->sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH); } ma_strmake(net->last_error,(char*) pos, min(len,sizeof(net->last_error)-1)); } else { my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); } mysql->server_status&= ~SERVER_MORE_RESULTS_EXIST; return(packet_error); } return len; }
O3
c
ma_net_safe_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r12d, %r12d cmpq $0x0, (%rbx) movq %r12, %r14 je 0x15ef3 movq %rbx, %rdi callq 0x32130 movq %rax, %r14 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x1601a testq %r14, %r14 je 0x1601a movq 0x20(%rbx), %r15 cmpb $-0x1, (%r15) jne 0x16120 cmpq $0x4, %r14 jb 0x1609c movzwl 0x1(%r15), %eax leaq 0x3(%r15), %r13 leaq -0x2(%r14), %r12 cmpl $0xffff, %eax # imm = 0xFFFF jne 0x160b9 addl $-0x3, %r14d cmpl $0x5, %r14d jb 0x16076 movq 0x480(%rbx), %rax testq %rax, %rax je 0x15edf movq 0x80(%rax), %rax testq %rax, %rax je 0x15edf movzbl 0x9(%r15), %r8d cmpq $0xfa, %r8 ja 0x15fc0 leaq 0xa(%r15), %rcx movl %r8d, %edx addq %rcx, %rdx movl %r14d, %esi addq %rsi, %r13 cmpq %r13, %rdx ja 0x16076 movzbl 0x4(%r15), %esi movzbl 0x5(%r15), %edx movzwl 0x6(%r15), %edi movzbl 0x8(%r15), %r9d shll $0x10, %r9d orl %edi, %r9d xorps %xmm0, %xmm0 cvtsi2sd %r9d, %xmm0 divsd 0x22cfa(%rip), %xmm0 # 0x38cb0 movq %rbx, %rdi callq *%rax jmp 0x15edf cmpq $0xfd, %r8 je 0x15ff3 cmpl $0xfc, %r8d je 0x15fe8 cmpl $0xfb, %r8d jne 0x1600d leaq 0xa(%r15), %rcx movq $-0x1, %r8 jmp 0x15f76 leaq 0xc(%r15), %rcx movzwl 0xa(%r15), %r8d jmp 0x15f76 leaq 0xd(%r15), %rcx movzwl 0xa(%r15), %edx movzbl 0xc(%r15), %r8d shll $0x10, %r8d orq %rdx, %r8 jmp 0x15f76 leaq 0x12(%r15), %rcx movl 0xa(%r15), %r8d jmp 0x15f76 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %rbx, %rdi callq 0x16132 movl 0x90(%rbx), %eax cmpl $0x7ea, %eax # imm = 0x7EA je 0x16120 cmpl $0x481, %eax # imm = 0x481 movl $0x7e4, %eax # imm = 0x7E4 movl $0x7dd, %r15d # imm = 0x7DD cmovel %eax, %r15d leaq 0x34acc(%rip), %rax # 0x4ab20 movq (%rax), %r12 callq 0x13060 movl (%rax), %r8d movq %rbx, %rdi movl %r15d, %esi movq %r12, %rdx xorl %ecx, %ecx xorl %eax, %eax callq 0x16165 jmp 0x16120 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF leaq 0x34a9d(%rip), %rax # 0x4ab20 movq (%rax), %rdx movq %rbx, %rdi movl $0x7eb, %esi # imm = 0x7EB xorl %ecx, %ecx xorl %eax, %eax callq 0x16165 jmp 0x16120 leaq 0x34a7d(%rip), %rax # 0x4ab20 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d0, %esi # imm = 0x7D0 xorl %ecx, %ecx xorl %eax, %eax callq 0x16165 jmp 0x16113 movl %eax, 0x90(%rbx) leaq 0x297(%rbx), %rdi cmpb $0x23, (%r13) jne 0x160e4 leaq 0x4(%r15), %rsi movl $0x5, %edx callq 0x25a97 addq $0x9, %r15 movq %r15, %r13 jmp 0x160f8 leaq 0x34a35(%rip), %rax # 0x4ab20 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 leaq 0x97(%rbx), %rdi movl $0x1ff, %edx # imm = 0x1FF cmpq %rdx, %r12 cmovbq %r12, %rdx movq %r13, %rsi callq 0x25a97 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF andb $-0x9, 0x380(%rbx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_net_safe_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor r12d, r12d loc_15EDF: cmp qword ptr [rbx], 0 mov r14, r12 jz short loc_15EF3 mov rdi, rbx call ma_net_read mov r14, rax loc_15EF3: mov eax, 0FFFFFFFFh cmp r14, rax jz loc_1601A test r14, r14 jz loc_1601A mov r15, [rbx+20h] cmp byte ptr [r15], 0FFh jnz loc_16120 cmp r14, 4 jb loc_1609C movzx eax, word ptr [r15+1] lea r13, [r15+3] lea r12, [r14-2] cmp eax, 0FFFFh jnz loc_160B9 add r14d, 0FFFFFFFDh cmp r14d, 5 jb loc_16076 mov rax, [rbx+480h] test rax, rax jz short loc_15EDF mov rax, [rax+80h] test rax, rax jz loc_15EDF movzx r8d, byte ptr [r15+9] cmp r8, 0FAh ja short loc_15FC0 lea rcx, [r15+0Ah] loc_15F76: mov edx, r8d add rdx, rcx mov esi, r14d add r13, rsi cmp rdx, r13 ja loc_16076 movzx esi, byte ptr [r15+4] movzx edx, byte ptr [r15+5] movzx edi, word ptr [r15+6] movzx r9d, byte ptr [r15+8] shl r9d, 10h or r9d, edi xorps xmm0, xmm0 cvtsi2sd xmm0, r9d divsd xmm0, cs:qword_38CB0 mov rdi, rbx call rax jmp loc_15EDF loc_15FC0: cmp r8, 0FDh jz short loc_15FF3 cmp r8d, 0FCh jz short loc_15FE8 cmp r8d, 0FBh jnz short loc_1600D lea rcx, [r15+0Ah] mov r8, 0FFFFFFFFFFFFFFFFh jmp short loc_15F76 loc_15FE8: lea rcx, [r15+0Ch] movzx r8d, word ptr [r15+0Ah] jmp short loc_15F76 loc_15FF3: lea rcx, [r15+0Dh] movzx edx, word ptr [r15+0Ah] movzx r8d, byte ptr [r15+0Ch] shl r8d, 10h or r8, rdx jmp loc_15F76 loc_1600D: lea rcx, [r15+12h] mov r8d, [r15+0Ah] jmp loc_15F76 loc_1601A: mov r14d, 0FFFFFFFFh mov rdi, rbx call end_server mov eax, [rbx+90h] cmp eax, 7EAh jz loc_16120 cmp eax, 481h mov eax, 7E4h mov r15d, 7DDh cmovz r15d, eax lea rax, SQLSTATE_UNKNOWN mov r12, [rax] call ___errno_location mov r8d, [rax] mov rdi, rbx mov esi, r15d mov rdx, r12 xor ecx, ecx xor eax, eax call my_set_error jmp loc_16120 loc_16076: mov r14d, 0FFFFFFFFh lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7EBh xor ecx, ecx xor eax, eax call my_set_error jmp loc_16120 loc_1609C: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D0h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_16113 loc_160B9: mov [rbx+90h], eax lea rdi, [rbx+297h] cmp byte ptr [r13+0], 23h ; '#' jnz short loc_160E4 lea rsi, [r15+4] mov edx, 5 call ma_strmake add r15, 9 mov r13, r15 jmp short loc_160F8 loc_160E4: lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy loc_160F8: lea rdi, [rbx+97h] mov edx, 1FFh cmp r12, rdx cmovb rdx, r12 mov rsi, r13 call ma_strmake loc_16113: mov r14d, 0FFFFFFFFh and byte ptr [rbx+380h], 0F7h loc_16120: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long ma_net_safe_read( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { char v6; // al unsigned long long v8; // r12 unsigned long long v9; // r14 long long v10; // r15 int v11; // eax _BYTE *v12; // r13 unsigned int v13; // r14d long long v14; // rax void ( *v15)(long long, _QWORD, _QWORD, double); // rax long long v16; // rcx int v17; // eax int v18; // r15d int v19; // r12d _DWORD *v20; // rax int v21; // r9d long long v22; // rdi long long v23; // rdx char v25; // [rsp-8h] [rbp-30h] v25 = v6; v8 = 0LL; while ( 1 ) { v9 = v8; if ( *(_QWORD *)a1 ) v9 = ma_net_read(a1); if ( v9 == 0xFFFFFFFF || !v9 ) break; v10 = *(_QWORD *)(a1 + 32); if ( *(_BYTE *)v10 != 0xFF ) return v9; if ( v9 < 4 ) { my_set_error(a1, 2000, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6, v25); LABEL_35: v9 = 0xFFFFFFFFLL; *(_BYTE *)(a1 + 896) &= ~8u; return v9; } v11 = *(unsigned __int16 *)(v10 + 1); v12 = (_BYTE *)(v10 + 3); v8 = v9 - 2; if ( v11 != 0xFFFF ) { *(_DWORD *)(a1 + 144) = v11; v22 = a1 + 663; if ( *v12 == 35 ) { ma_strmake(v22, v10 + 4, 5LL); v12 = (_BYTE *)(v10 + 9); } else { strncpy(v22, SQLSTATE_UNKNOWN, 5LL); } v23 = 511LL; if ( v8 < 0x1FF ) v23 = v9 - 2; ma_strmake(a1 + 151, v12, v23); goto LABEL_35; } v13 = v9 - 3; if ( v13 < 5 ) goto LABEL_27; v14 = *(_QWORD *)(a1 + 1152); if ( v14 ) { v15 = *(void ( **)(long long, _QWORD, _QWORD, double))(v14 + 128); if ( v15 ) { a5 = *(unsigned __int8 *)(v10 + 9); if ( a5 > 0xFA ) { if ( a5 == 253 ) { v16 = v10 + 13; LODWORD(a5) = *(unsigned __int16 *)(v10 + 10) | (*(unsigned __int8 *)(v10 + 12) << 16); } else if ( (_DWORD)a5 == 252 ) { v16 = v10 + 12; LODWORD(a5) = *(unsigned __int16 *)(v10 + 10); } else if ( (_DWORD)a5 == 251 ) { v16 = v10 + 10; LODWORD(a5) = -1; } else { v16 = v10 + 18; LODWORD(a5) = *(_DWORD *)(v10 + 10); } } else { v16 = v10 + 10; } if ( v16 + (unsigned long long)(unsigned int)a5 > (unsigned long long)&v12[v13] ) { LABEL_27: v9 = 0xFFFFFFFFLL; my_set_error(a1, 2027, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6, v25); return v9; } v15( a1, *(unsigned __int8 *)(v10 + 4), *(unsigned __int8 *)(v10 + 5), (double)(*(unsigned __int16 *)(v10 + 6) | (*(unsigned __int8 *)(v10 + 8) << 16)) / 1000.0); } } } v9 = 0xFFFFFFFFLL; end_server(a1); v17 = *(_DWORD *)(a1 + 144); if ( v17 != 2026 ) { v18 = 2013; if ( v17 == 1153 ) v18 = 2020; v19 = (int)SQLSTATE_UNKNOWN; v20 = (_DWORD *)__errno_location(); my_set_error(a1, v18, v19, 0, *v20, v21, v25); } return v9; }
ma_net_safe_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR R12D,R12D LAB_00115edf: CMP qword ptr [RBX],0x0 MOV R14,R12 JZ 0x00115ef3 MOV RDI,RBX CALL 0x00132130 MOV R14,RAX LAB_00115ef3: MOV EAX,0xffffffff CMP R14,RAX JZ 0x0011601a TEST R14,R14 JZ 0x0011601a MOV R15,qword ptr [RBX + 0x20] CMP byte ptr [R15],0xff JNZ 0x00116120 CMP R14,0x4 JC 0x0011609c MOVZX EAX,word ptr [R15 + 0x1] LEA R13,[R15 + 0x3] LEA R12,[R14 + -0x2] CMP EAX,0xffff JNZ 0x001160b9 ADD R14D,-0x3 CMP R14D,0x5 JC 0x00116076 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x00115edf MOV RAX,qword ptr [RAX + 0x80] TEST RAX,RAX JZ 0x00115edf MOVZX R8D,byte ptr [R15 + 0x9] CMP R8,0xfa JA 0x00115fc0 LEA RCX,[R15 + 0xa] LAB_00115f76: MOV EDX,R8D ADD RDX,RCX MOV ESI,R14D ADD R13,RSI CMP RDX,R13 JA 0x00116076 MOVZX ESI,byte ptr [R15 + 0x4] MOVZX EDX,byte ptr [R15 + 0x5] MOVZX EDI,word ptr [R15 + 0x6] MOVZX R9D,byte ptr [R15 + 0x8] SHL R9D,0x10 OR R9D,EDI XORPS XMM0,XMM0 CVTSI2SD XMM0,R9D DIVSD XMM0,qword ptr [0x00138cb0] MOV RDI,RBX CALL RAX JMP 0x00115edf LAB_00115fc0: CMP R8,0xfd JZ 0x00115ff3 CMP R8D,0xfc JZ 0x00115fe8 CMP R8D,0xfb JNZ 0x0011600d LEA RCX,[R15 + 0xa] MOV R8,-0x1 JMP 0x00115f76 LAB_00115fe8: LEA RCX,[R15 + 0xc] MOVZX R8D,word ptr [R15 + 0xa] JMP 0x00115f76 LAB_00115ff3: LEA RCX,[R15 + 0xd] MOVZX EDX,word ptr [R15 + 0xa] MOVZX R8D,byte ptr [R15 + 0xc] SHL R8D,0x10 OR R8,RDX JMP 0x00115f76 LAB_0011600d: LEA RCX,[R15 + 0x12] MOV R8D,dword ptr [R15 + 0xa] JMP 0x00115f76 LAB_0011601a: MOV R14D,0xffffffff MOV RDI,RBX CALL 0x00116132 MOV EAX,dword ptr [RBX + 0x90] CMP EAX,0x7ea JZ 0x00116120 CMP EAX,0x481 MOV EAX,0x7e4 MOV R15D,0x7dd CMOVZ R15D,EAX LEA RAX,[0x14ab20] MOV R12,qword ptr [RAX] CALL 0x00113060 MOV R8D,dword ptr [RAX] MOV RDI,RBX MOV ESI,R15D MOV RDX,R12 XOR ECX,ECX XOR EAX,EAX CALL 0x00116165 JMP 0x00116120 LAB_00116076: MOV R14D,0xffffffff LEA RAX,[0x14ab20] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7eb XOR ECX,ECX XOR EAX,EAX CALL 0x00116165 JMP 0x00116120 LAB_0011609c: LEA RAX,[0x14ab20] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d0 XOR ECX,ECX XOR EAX,EAX CALL 0x00116165 JMP 0x00116113 LAB_001160b9: MOV dword ptr [RBX + 0x90],EAX LEA RDI,[RBX + 0x297] CMP byte ptr [R13],0x23 JNZ 0x001160e4 LEA RSI,[R15 + 0x4] MOV EDX,0x5 CALL 0x00125a97 ADD R15,0x9 MOV R13,R15 JMP 0x001160f8 LAB_001160e4: LEA RAX,[0x14ab20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 LAB_001160f8: LEA RDI,[RBX + 0x97] MOV EDX,0x1ff CMP R12,RDX CMOVC RDX,R12 MOV RSI,R13 CALL 0x00125a97 LAB_00116113: MOV R14D,0xffffffff AND byte ptr [RBX + 0x380],0xf7 LAB_00116120: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong ma_net_safe_read(long *param_1) { byte bVar1; char *pcVar2; code *pcVar3; int *puVar4; ulong uVar5; int *piVar6; char *pcVar7; uint uVar8; ulong uVar9; uint uVar10; int4 uVar11; char *pcVar12; uVar9 = 0; do { do { uVar5 = uVar9; if (*param_1 != 0) { uVar5 = ma_net_read(param_1); } if ((uVar5 == 0xffffffff) || (uVar5 == 0)) { end_server(param_1); puVar4 = SQLSTATE_UNKNOWN; if ((int)param_1[0x12] == 0x7ea) { return 0xffffffff; } uVar11 = 0x7dd; if ((int)param_1[0x12] == 0x481) { uVar11 = 0x7e4; } piVar6 = __errno_location(); my_set_error(param_1,uVar11,puVar4,0,*piVar6); return 0xffffffff; } pcVar2 = (char *)param_1[4]; if (*pcVar2 != -1) { return uVar5; } if (uVar5 < 4) { my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0); LAB_00116113: *(byte *)(param_1 + 0x70) = *(byte *)(param_1 + 0x70) & 0xf7; return 0xffffffff; } pcVar12 = pcVar2 + 3; uVar9 = uVar5 - 2; if (*(ushort *)(pcVar2 + 1) != 0xffff) { *(uint *)(param_1 + 0x12) = (uint)*(ushort *)(pcVar2 + 1); if (*pcVar12 == '#') { ma_strmake((char *)((long)param_1 + 0x297),pcVar2 + 4,5); pcVar12 = pcVar2 + 9; } else { strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5); } uVar5 = 0x1ff; if (uVar9 < 0x1ff) { uVar5 = uVar9; } ma_strmake((long)param_1 + 0x97,pcVar12,uVar5); goto LAB_00116113; } uVar10 = (int)uVar5 - 3; if (uVar10 < 5) goto LAB_00116076; } while ((param_1[0x90] == 0) || (pcVar3 = *(code **)(param_1[0x90] + 0x80), pcVar3 == (code *)0x0)); bVar1 = pcVar2[9]; uVar8 = (uint)bVar1; if (uVar8 < 0xfb) { pcVar7 = pcVar2 + 10; } else if (uVar8 == 0xfd) { pcVar7 = pcVar2 + 0xd; uVar8 = (uint)*(uint3 *)(pcVar2 + 10); } else if (bVar1 == 0xfc) { pcVar7 = pcVar2 + 0xc; uVar8 = (uint)*(ushort *)(pcVar2 + 10); } else if (bVar1 == 0xfb) { pcVar7 = pcVar2 + 10; uVar8 = 0xffffffff; } else { pcVar7 = pcVar2 + 0x12; uVar8 = *(uint *)(pcVar2 + 10); } if (pcVar12 + uVar10 < pcVar7 + uVar8) { LAB_00116076: my_set_error(param_1,0x7eb,SQLSTATE_UNKNOWN,0); return 0xffffffff; } (*pcVar3)((double)*(uint3 *)(pcVar2 + 6) / _DAT_00138cb0,param_1,pcVar2[4],pcVar2[5]); } while( true ); }
48,714
ma_bitmap_find_new_place
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_find_new_place(MARIA_HA *info, MARIA_ROW *row, pgcache_page_no_t page, uint free_size, MARIA_BITMAP_BLOCKS *blocks) { MARIA_SHARE *share= info->s; my_bool res= 1; uint position; uint head_length, row_length, rest_length, extents_length; ulonglong bitmap_page; DBUG_ENTER("_ma_bitmap_find_new_place"); blocks->count= 0; blocks->tail_page_skipped= blocks->page_skipped= 0; row->extents_count= 0; info->bitmap_blocks.elements= ELEMENTS_RESERVED_FOR_MAIN_PART; mysql_mutex_lock(&share->bitmap.bitmap_lock); /* First allocate all blobs (so that we can find out the needed size for the main block. */ if (row->blob_length && allocate_blobs(info, row)) goto abort; /* Switch bitmap to current head page */ bitmap_page= page - page % share->bitmap.pages_covered; if (share->bitmap.page != bitmap_page && _ma_change_bitmap_page(info, &share->bitmap, bitmap_page)) goto abort; extents_length= row->extents_count * ROW_EXTENT_SIZE; if ((head_length= (row->head_length + extents_length + 3)) <= free_size) { /* Main row part fits into one page */ position= ELEMENTS_RESERVED_FOR_MAIN_PART - 1; use_head(info, page, head_length, position); row->space_on_head_page= head_length; goto end; } /* Allocate enough space */ head_length+= ELEMENTS_RESERVED_FOR_MAIN_PART * ROW_EXTENT_SIZE; /* The first segment size is stored in 'row_length' We have to add ELEMENTS_RESERVED_FOR_MAIN_PART here as the extent information may be up to this size when the header splits. */ row_length= find_where_to_split_row(share, row, row->extents_count + ELEMENTS_RESERVED_FOR_MAIN_PART-1, free_size); position= 0; rest_length= head_length - row_length; if (rest_length <= MAX_TAIL_SIZE(share->block_size)) position= ELEMENTS_RESERVED_FOR_MAIN_PART -2; /* Only head and tail */ use_head(info, page, row_length, position); row->space_on_head_page= row_length; if (write_rest_of_head(info, position, rest_length)) goto abort; end: blocks->block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK*); blocks->block->sub_blocks= ELEMENTS_RESERVED_FOR_MAIN_PART - position; /* First block's page_count is for all blocks */ blocks->count= info->bitmap_blocks.elements - position; res= 0; abort: mysql_mutex_unlock(&share->bitmap.bitmap_lock); DBUG_RETURN(res); }
O0
c
ma_bitmap_find_new_place: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movb $0x1, -0x31(%rbp) movq -0x28(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x28(%rbp), %rax movb $0x0, 0xd(%rax) movq -0x28(%rbp), %rax movb $0x0, 0xc(%rax) movq -0x10(%rbp), %rax movl $0x0, 0xac(%rax) movq -0x8(%rbp), %rax movl $0x4, 0x2c8(%rax) movq -0x30(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0x10e709(%rip), %rsi # 0x151683 movl $0x8b1, %edx # imm = 0x8B1 callq 0x41c20 movq -0x10(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0x42fac movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x42c10 movsbl %al, %eax cmpl $0x0, %eax je 0x42fac jmp 0x4312f movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx xorl %edx, %edx divq 0xb48(%rcx) movq -0x58(%rbp), %rax subq %rdx, %rax movq %rax, -0x50(%rbp) movq -0x30(%rbp), %rax movq 0xa20(%rax), %rax cmpq -0x50(%rbp), %rax je 0x43006 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 movq -0x50(%rbp), %rdx callq 0x43160 movsbl %al, %eax cmpl $0x0, %eax je 0x43006 jmp 0x4312f movq -0x10(%rbp), %rax imull $0x7, 0xac(%rax), %eax movl %eax, -0x48(%rbp) movq -0x10(%rbp), %rax movl 0xa0(%rax), %eax addl -0x48(%rbp), %eax addl $0x3, %eax movl %eax, -0x3c(%rbp) cmpl -0x1c(%rbp), %eax ja 0x43058 movl $0x3, -0x38(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x3c(%rbp), %edx movl -0x38(%rbp), %ecx callq 0x431e0 movl -0x3c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xb8(%rax) jmp 0x430e9 movl -0x3c(%rbp), %eax addl $0x1c, %eax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movl 0xac(%rax), %edx addl $0x4, %edx subl $0x1, %edx movl -0x1c(%rbp), %ecx callq 0x42cc0 movl %eax, -0x40(%rbp) movl $0x0, -0x38(%rbp) movl -0x3c(%rbp), %eax subl -0x40(%rbp), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax movq -0x30(%rbp), %rcx imull $0x3, 0x7bc(%rcx), %ecx shrl $0x2, %ecx cmpl %ecx, %eax ja 0x430b0 movl $0x2, -0x38(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x40(%rbp), %edx movl -0x38(%rbp), %ecx callq 0x431e0 movl -0x40(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xb8(%rax) movq -0x8(%rbp), %rdi movl -0x38(%rbp), %esi movl -0x44(%rbp), %eax movl %eax, %edx callq 0x42dc0 cmpb $0x0, %al je 0x430e7 jmp 0x4312f jmp 0x430e9 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rcx movl -0x38(%rbp), %eax imulq $0x18, %rax, %rax addq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movl $0x4, %ecx subl -0x38(%rbp), %ecx movq -0x28(%rbp), %rax movq (%rax), %rax movl %ecx, 0x10(%rax) movq -0x8(%rbp), %rax movl 0x2c8(%rax), %ecx subl -0x38(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x8(%rax) movb $0x0, -0x31(%rbp) movq -0x30(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x41ed0 movb -0x31(%rbp), %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_bitmap_find_new_place: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_30], rax mov [rbp+var_31], 1 mov rax, [rbp+var_28] mov dword ptr [rax+8], 0 mov rax, [rbp+var_28] mov byte ptr [rax+0Dh], 0 mov rax, [rbp+var_28] mov byte ptr [rax+0Ch], 0 mov rax, [rbp+var_10] mov dword ptr [rax+0ACh], 0 mov rax, [rbp+var_8] mov dword ptr [rax+2C8h], 4 mov rdi, [rbp+var_30] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 8B1h call inline_mysql_mutex_lock_4 mov rax, [rbp+var_10] cmp qword ptr [rax+88h], 0 jz short loc_42FAC mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call allocate_blobs movsx eax, al cmp eax, 0 jz short loc_42FAC jmp loc_4312F loc_42FAC: mov rax, [rbp+var_18] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_30] xor edx, edx div qword ptr [rcx+0B48h] mov rax, [rbp+var_58] sub rax, rdx mov [rbp+var_50], rax mov rax, [rbp+var_30] mov rax, [rax+0A20h] cmp rax, [rbp+var_50] jz short loc_43006 mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] add rsi, 0A10h mov rdx, [rbp+var_50] call _ma_change_bitmap_page movsx eax, al cmp eax, 0 jz short loc_43006 jmp loc_4312F loc_43006: mov rax, [rbp+var_10] imul eax, [rax+0ACh], 7 mov [rbp+var_48], eax mov rax, [rbp+var_10] mov eax, [rax+0A0h] add eax, [rbp+var_48] add eax, 3 mov [rbp+var_3C], eax cmp eax, [rbp+var_1C] ja short loc_43058 mov [rbp+var_38], 3 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov edx, [rbp+var_3C] mov ecx, [rbp+var_38] call use_head mov ecx, [rbp+var_3C] mov rax, [rbp+var_10] mov [rax+0B8h], ecx jmp loc_430E9 loc_43058: mov eax, [rbp+var_3C] add eax, 1Ch mov [rbp+var_3C], eax mov rdi, [rbp+var_30] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] mov edx, [rax+0ACh] add edx, 4 sub edx, 1 mov ecx, [rbp+var_1C] call find_where_to_split_row mov [rbp+var_40], eax mov [rbp+var_38], 0 mov eax, [rbp+var_3C] sub eax, [rbp+var_40] mov [rbp+var_44], eax mov eax, [rbp+var_44] mov rcx, [rbp+var_30] imul ecx, [rcx+7BCh], 3 shr ecx, 2 cmp eax, ecx ja short loc_430B0 mov [rbp+var_38], 2 loc_430B0: mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov edx, [rbp+var_40] mov ecx, [rbp+var_38] call use_head mov ecx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+0B8h], ecx mov rdi, [rbp+var_8] mov esi, [rbp+var_38] mov eax, [rbp+var_44] mov edx, eax call write_rest_of_head cmp al, 0 jz short loc_430E7 jmp short loc_4312F loc_430E7: jmp short $+2 loc_430E9: mov rax, [rbp+var_8] mov rcx, [rax+2C0h] mov eax, [rbp+var_38] imul rax, 18h add rcx, rax mov rax, [rbp+var_28] mov [rax], rcx mov ecx, 4 sub ecx, [rbp+var_38] mov rax, [rbp+var_28] mov rax, [rax] mov [rax+10h], ecx mov rax, [rbp+var_8] mov ecx, [rax+2C8h] sub ecx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax+8], ecx mov [rbp+var_31], 0 loc_4312F: mov rdi, [rbp+var_30] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_4 mov al, [rbp+var_31] mov [rbp+var_59], al mov al, [rbp+var_59] add rsp, 60h pop rbp retn
char ma_bitmap_find_new_place(long long *a1, long long a2, unsigned long long a3, unsigned int a4, long long a5) { unsigned long long v6; // [rsp+10h] [rbp-50h] unsigned int v7; // [rsp+1Ch] [rbp-44h] unsigned int where_to_split_row; // [rsp+20h] [rbp-40h] unsigned int v9; // [rsp+24h] [rbp-3Ch] unsigned int v10; // [rsp+28h] [rbp-38h] char v11; // [rsp+2Fh] [rbp-31h] long long v12; // [rsp+30h] [rbp-30h] v12 = *a1; v11 = 1; *(_DWORD *)(a5 + 8) = 0; *(_BYTE *)(a5 + 13) = 0; *(_BYTE *)(a5 + 12) = 0; *(_DWORD *)(a2 + 172) = 0; *((_DWORD *)a1 + 178) = 4; inline_mysql_mutex_lock_4( v12 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x8B1u); if ( !*(_QWORD *)(a2 + 136) || !allocate_blobs(a1, a2) ) { v6 = a3 - a3 % *(_QWORD *)(v12 + 2888); if ( *(_QWORD *)(v12 + 2592) == v6 || !(unsigned __int8)ma_change_bitmap_page(a1, v12 + 2576, v6) ) { v9 = 7 * *(_DWORD *)(a2 + 172) + *(_DWORD *)(a2 + 160) + 3; if ( v9 <= a4 ) { v10 = 3; use_head(a1, a3, v9, 3LL); *(_DWORD *)(a2 + 184) = v9; LABEL_10: *(_QWORD *)a5 = 24LL * v10 + a1[88]; *(_DWORD *)(*(_QWORD *)a5 + 16LL) = 4 - v10; *(_DWORD *)(a5 + 8) = *((_DWORD *)a1 + 178) - v10; v11 = 0; goto LABEL_11; } where_to_split_row = find_where_to_split_row((unsigned int *)v12, a2, *(_DWORD *)(a2 + 172) + 3, a4); v10 = 0; v7 = v9 + 28 - where_to_split_row; if ( v7 <= (unsigned int)(3 * *(_DWORD *)(v12 + 1980)) >> 2 ) v10 = 2; use_head(a1, a3, where_to_split_row, v10); *(_DWORD *)(a2 + 184) = where_to_split_row; if ( !write_rest_of_head(a1, v10, v7) ) goto LABEL_10; } } LABEL_11: inline_mysql_mutex_unlock_4(v12 + 2712); return v11; }
_ma_bitmap_find_new_place: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV byte ptr [RBP + -0x31],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0xd],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0xc],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xac],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c8],0x4 MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x251683] MOV EDX,0x8b1 CALL 0x00141c20 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x88],0x0 JZ 0x00142fac MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00142c10 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00142fac JMP 0x0014312f LAB_00142fac: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] XOR EDX,EDX DIV qword ptr [RCX + 0xb48] MOV RAX,qword ptr [RBP + -0x58] SUB RAX,RDX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0xa20] CMP RAX,qword ptr [RBP + -0x50] JZ 0x00143006 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] ADD RSI,0xa10 MOV RDX,qword ptr [RBP + -0x50] CALL 0x00143160 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00143006 JMP 0x0014312f LAB_00143006: MOV RAX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RAX + 0xac],0x7 MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xa0] ADD EAX,dword ptr [RBP + -0x48] ADD EAX,0x3 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,dword ptr [RBP + -0x1c] JA 0x00143058 MOV dword ptr [RBP + -0x38],0x3 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x3c] MOV ECX,dword ptr [RBP + -0x38] CALL 0x001431e0 MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xb8],ECX JMP 0x001430e9 LAB_00143058: MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1c MOV dword ptr [RBP + -0x3c],EAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xac] ADD EDX,0x4 SUB EDX,0x1 MOV ECX,dword ptr [RBP + -0x1c] CALL 0x00142cc0 MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x38],0x0 MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] MOV RCX,qword ptr [RBP + -0x30] IMUL ECX,dword ptr [RCX + 0x7bc],0x3 SHR ECX,0x2 CMP EAX,ECX JA 0x001430b0 MOV dword ptr [RBP + -0x38],0x2 LAB_001430b0: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x38] CALL 0x001431e0 MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xb8],ECX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX CALL 0x00142dc0 CMP AL,0x0 JZ 0x001430e7 JMP 0x0014312f LAB_001430e7: JMP 0x001430e9 LAB_001430e9: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x2c0] MOV EAX,dword ptr [RBP + -0x38] IMUL RAX,RAX,0x18 ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV ECX,0x4 SUB ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x2c8] SUB ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x8],ECX MOV byte ptr [RBP + -0x31],0x0 LAB_0014312f: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x00141ed0 MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x59],AL MOV AL,byte ptr [RBP + -0x59] ADD RSP,0x60 POP RBP RET
int1 _ma_bitmap_find_new_place(long *param_1,long param_2,ulong param_3,uint param_4,long *param_5) { long lVar1; char cVar2; int iVar3; uint uVar4; int iVar5; long lVar6; uint local_40; int1 local_39; lVar1 = *param_1; local_39 = 1; *(int4 *)(param_5 + 1) = 0; *(int1 *)((long)param_5 + 0xd) = 0; *(int1 *)((long)param_5 + 0xc) = 0; *(int4 *)(param_2 + 0xac) = 0; *(int4 *)(param_1 + 0x59) = 4; inline_mysql_mutex_lock (lVar1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x8b1); if (((*(long *)(param_2 + 0x88) == 0) || (cVar2 = allocate_blobs(param_1,param_2), cVar2 == '\0')) && ((lVar6 = param_3 - param_3 % *(ulong *)(lVar1 + 0xb48), *(long *)(lVar1 + 0xa20) == lVar6 || (cVar2 = _ma_change_bitmap_page(param_1,lVar1 + 0xa10,lVar6), cVar2 == '\0')))) { iVar3 = *(int *)(param_2 + 0xa0) + *(int *)(param_2 + 0xac) * 7; uVar4 = iVar3 + 3; if (param_4 < uVar4) { iVar5 = find_where_to_split_row(lVar1,param_2,*(int *)(param_2 + 0xac) + 3,param_4); local_40 = 0; uVar4 = (iVar3 + 0x1f) - iVar5; if (uVar4 <= (uint)(*(int *)(lVar1 + 0x7bc) * 3) >> 2) { local_40 = 2; } use_head(param_1,param_3,iVar5,local_40); *(int *)(param_2 + 0xb8) = iVar5; cVar2 = write_rest_of_head(param_1,local_40,uVar4); if (cVar2 != '\0') goto LAB_0014312f; } else { local_40 = 3; use_head(param_1,param_3,uVar4,3); *(uint *)(param_2 + 0xb8) = uVar4; } *param_5 = param_1[0x58] + (ulong)local_40 * 0x18; *(uint *)(*param_5 + 0x10) = 4 - local_40; *(uint *)(param_5 + 1) = (int)param_1[0x59] - local_40; local_39 = 0; } LAB_0014312f: inline_mysql_mutex_unlock(lVar1 + 0xa98); return local_39; }
48,715
gguf_get_key
monkey531[P]llama/ggml/src/gguf.cpp
const char * gguf_get_key(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); return ctx->kv[key_id].get_key().c_str(); }
O2
cpp
gguf_get_key: testq %rsi, %rsi js 0x3ed3a movq 0x8(%rdi), %rcx movq 0x10(%rdi), %rax subq %rcx, %rax pushq $0x58 popq %rdi cqto idivq %rdi cmpq %rsi, %rax jle 0x3ed3a imulq $0x58, %rsi, %rax movq (%rcx,%rax), %rax retq pushq %rax leaq 0x1bac3(%rip), %rdi # 0x5a805 leaq 0xc884(%rip), %rdx # 0x4b5cd leaq 0x1bf40(%rip), %rcx # 0x5ac90 movl $0x2fb, %esi # imm = 0x2FB xorl %eax, %eax callq 0x1e760
gguf_get_key: test rsi, rsi js short loc_3ED3A mov rcx, [rdi+8] mov rax, [rdi+10h] sub rax, rcx push 58h ; 'X' pop rdi cqo idiv rdi cmp rax, rsi jle short loc_3ED3A imul rax, rsi, 58h ; 'X' mov rax, [rcx+rax] retn loc_3ED3A: push rax lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 2FBh xor eax, eax call _ggml_abort
long long gguf_get_key( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // rax long long v15; // rcx if ( a2 < 0 || (v15 = *(_QWORD *)(a1 + 8), v14 = (*(_QWORD *)(a1 + 16) - v15) / 88, v14 <= a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", 763, (long long)"GGML_ASSERT(%s) failed", (long long)"key_id >= 0 && key_id < gguf_get_n_kv(ctx)", a13, a14, a3, a4, a5, a6, a7, a8, a9, a10, v14); return *(_QWORD *)(v15 + 88 * a2); }
gguf_get_key: TEST RSI,RSI JS 0x0013ed3a MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI + 0x10] SUB RAX,RCX PUSH 0x58 POP RDI CQO IDIV RDI CMP RAX,RSI JLE 0x0013ed3a IMUL RAX,RSI,0x58 MOV RAX,qword ptr [RCX + RAX*0x1] RET LAB_0013ed3a: PUSH RAX LEA RDI,[0x15a805] LEA RDX,[0x14b5cd] LEA RCX,[0x15ac90] MOV ESI,0x2fb XOR EAX,EAX CALL 0x0011e760
int8 gguf_get_key(long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6) { long in_RAX; if (-1 < param_2) { in_RAX = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8)) / 0x58; if (param_2 < in_RAX) { return *(int8 *)(*(long *)(param_1 + 8) + param_2 * 0x58); } } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",0x2fb, "GGML_ASSERT(%s) failed","key_id >= 0 && key_id < gguf_get_n_kv(ctx)",param_5,param_6, in_RAX); }
48,716
reset_weak_ref
bluesky950520[P]quickjs/quickjs.c
static void reset_weak_ref(JSRuntime *rt, JSWeakRefRecord **first_weak_ref) { JSWeakRefRecord *wr, *wr_next; JSWeakRefData *wrd; JSMapRecord *mr; JSMapState *s; JSFinRecEntry *fre; /* first pass to remove the records from the WeakMap/WeakSet lists */ for(wr = *first_weak_ref; wr != NULL; wr = wr->next_weak_ref) { switch(wr->kind) { case JS_WEAK_REF_KIND_MAP: mr = wr->u.map_record; s = mr->map; assert(s->is_weak); assert(!mr->empty); /* no iterator on WeakMap/WeakSet */ list_del(&mr->hash_link); list_del(&mr->link); break; case JS_WEAK_REF_KIND_WEAK_REF: wrd = wr->u.weak_ref_data; wrd->target = JS_UNDEFINED; break; case JS_WEAK_REF_KIND_FINALIZATION_REGISTRY_ENTRY: fre = wr->u.fin_rec_entry; list_del(&fre->link); break; default: abort(); } } /* second pass to free the values to avoid modifying the weak reference list while traversing it. */ for(wr = *first_weak_ref; wr != NULL; wr = wr_next) { wr_next = wr->next_weak_ref; switch(wr->kind) { case JS_WEAK_REF_KIND_MAP: mr = wr->u.map_record; JS_FreeValueRT(rt, mr->value); js_free_rt(rt, mr); break; case JS_WEAK_REF_KIND_WEAK_REF: wrd = wr->u.weak_ref_data; JS_SetOpaqueInternal(wrd->obj, &js_weakref_sentinel); js_free_rt(rt, wrd); break; case JS_WEAK_REF_KIND_FINALIZATION_REGISTRY_ENTRY: { fre = wr->u.fin_rec_entry; JSFinalizationRegistryData *frd = JS_GetOpaque(fre->obj, JS_CLASS_FINALIZATION_REGISTRY); assert(frd != NULL); /** * During the GC sweep phase the held object might be collected first. */ if (!rt->in_free && (!JS_IsObject(fre->held_val) || JS_IsLiveObject(rt, fre->held_val))) { JSValue args[2]; args[0] = frd->cb; args[1] = fre->held_val; JS_EnqueueJob(frd->ctx, js_finrec_job, 2, args); } JS_FreeValueRT(rt, fre->held_val); JS_FreeValueRT(rt, fre->token); js_free_rt(rt, fre); break; } default: abort(); } js_free_rt(rt, wr); } *first_weak_ref = NULL; /* fail safe */ }
O2
c
reset_weak_ref: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 xorps %xmm0, %xmm0 movq %rsi, %rax movq (%rax), %rax testq %rax, %rax je 0x34838 movl (%rax), %ecx cmpl $0x2, %ecx je 0x3481d cmpl $0x1, %ecx je 0x3480c testl %ecx, %ecx jne 0x3493c movq 0x10(%rax), %rcx movq 0x20(%rcx), %rdx movq 0x28(%rcx), %rsi movq %rsi, 0x8(%rdx) movq %rdx, (%rsi) movups %xmm0, 0x20(%rcx) movq 0x10(%rcx), %rdx movq 0x18(%rcx), %rsi movq %rsi, 0x8(%rdx) movq %rdx, (%rsi) movups %xmm0, 0x10(%rcx) jmp 0x34832 movq 0x10(%rax), %rcx andl $0x0, (%rcx) movq $0x3, 0x8(%rcx) jmp 0x34832 movq 0x10(%rax), %rcx movq (%rcx), %rdx movq 0x8(%rcx), %rsi movq %rsi, 0x8(%rdx) movq %rdx, (%rsi) movups %xmm0, (%rcx) addq $0x8, %rax jmp 0x347c4 movq (%rbx), %r12 leaq 0x86dd6(%rip), %rbp # 0xbb618 testq %r12, %r12 je 0x34929 movq 0x8(%r12), %r13 movl (%r12), %eax cmpl $0x2, %eax je 0x34885 cmpl $0x1, %eax je 0x34870 testl %eax, %eax jne 0x3493c movq 0x10(%r12), %r15 jmp 0x348fb movq 0x10(%r12), %rsi movq 0x10(%rsi), %rax movq %rbp, 0x30(%rax) movq %r14, %rdi jmp 0x34911 movq 0x10(%r12), %r15 cmpl $-0x1, 0x18(%r15) jne 0x348a2 movq 0x10(%r15), %rax cmpw $0x3b, 0x6(%rax) jne 0x348a2 movq 0x30(%rax), %rax jmp 0x348a4 xorl %eax, %eax cmpb $0x0, 0x102(%r14) jne 0x348eb leaq 0x30(%r15), %rcx cmpl $-0x1, 0x38(%r15) jne 0x348c2 movq (%rcx), %rdx testb $0x2, 0x5(%rdx) jne 0x348eb movups 0x18(%rax), %xmm0 movaps %xmm0, (%rsp) movups (%rcx), %xmm0 leaq 0x10(%rsp), %rcx movups %xmm0, (%rcx) movq 0x10(%rax), %rdi leaq 0x61(%rip), %rsi # 0x34941 pushq $0x2 popq %rdx movq %rsp, %rcx callq 0x17ea9 movq 0x30(%r15), %rsi movq 0x38(%r15), %rdx movq %r14, %rdi callq 0x18031 movq 0x40(%r15), %rsi movq 0x48(%r15), %rdx movq %r14, %rdi callq 0x18031 movq %r14, %rdi movq %r15, %rsi callq 0x170cb movq %r14, %rdi movq %r12, %rsi callq 0x170cb movq %r13, %r12 jmp 0x34842 andq $0x0, (%rbx) addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xe090
reset_weak_ref: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rsi mov r14, rdi xorps xmm0, xmm0 mov rax, rsi loc_347C4: mov rax, [rax] test rax, rax jz short loc_34838 mov ecx, [rax] cmp ecx, 2 jz short loc_3481D cmp ecx, 1 jz short loc_3480C test ecx, ecx jnz loc_3493C mov rcx, [rax+10h] mov rdx, [rcx+20h] mov rsi, [rcx+28h] mov [rdx+8], rsi mov [rsi], rdx movups xmmword ptr [rcx+20h], xmm0 mov rdx, [rcx+10h] mov rsi, [rcx+18h] mov [rdx+8], rsi mov [rsi], rdx movups xmmword ptr [rcx+10h], xmm0 jmp short loc_34832 loc_3480C: mov rcx, [rax+10h] and dword ptr [rcx], 0 mov qword ptr [rcx+8], 3 jmp short loc_34832 loc_3481D: mov rcx, [rax+10h] mov rdx, [rcx] mov rsi, [rcx+8] mov [rdx+8], rsi mov [rsi], rdx movups xmmword ptr [rcx], xmm0 loc_34832: add rax, 8 jmp short loc_347C4 loc_34838: mov r12, [rbx] lea rbp, js_weakref_sentinel loc_34842: test r12, r12 jz loc_34929 mov r13, [r12+8] mov eax, [r12] cmp eax, 2 jz short loc_34885 cmp eax, 1 jz short loc_34870 test eax, eax jnz loc_3493C mov r15, [r12+10h] jmp loc_348FB loc_34870: mov rsi, [r12+10h] mov rax, [rsi+10h] mov [rax+30h], rbp mov rdi, r14 jmp loc_34911 loc_34885: mov r15, [r12+10h] cmp dword ptr [r15+18h], 0FFFFFFFFh jnz short loc_348A2 mov rax, [r15+10h] cmp word ptr [rax+6], 3Bh ; ';' jnz short loc_348A2 mov rax, [rax+30h] jmp short loc_348A4 loc_348A2: xor eax, eax loc_348A4: cmp byte ptr [r14+102h], 0 jnz short loc_348EB lea rcx, [r15+30h] cmp dword ptr [r15+38h], 0FFFFFFFFh jnz short loc_348C2 mov rdx, [rcx] test byte ptr [rdx+5], 2 jnz short loc_348EB loc_348C2: movups xmm0, xmmword ptr [rax+18h] movaps [rsp+58h+var_58], xmm0 movups xmm0, xmmword ptr [rcx] lea rcx, [rsp+58h+var_48] movups xmmword ptr [rcx], xmm0 mov rdi, [rax+10h] lea rsi, js_finrec_job push 2 pop rdx mov rcx, rsp call JS_EnqueueJob loc_348EB: mov rsi, [r15+30h] mov rdx, [r15+38h] mov rdi, r14 call JS_FreeValueRT loc_348FB: mov rsi, [r15+40h] mov rdx, [r15+48h] mov rdi, r14 call JS_FreeValueRT mov rdi, r14 mov rsi, r15 loc_34911: call js_free_rt mov rdi, r14 mov rsi, r12 call js_free_rt mov r12, r13 jmp loc_34842 loc_34929: and qword ptr [rbx], 0 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3493C: call _abort
long long reset_weak_ref(const char *a1, long long *a2) { long long v3; // r14 __int128 v4; // xmm0 long long *i; // rax long long result; // rax int v7; // ecx _QWORD *v8; // rcx long long v9; // rdx _QWORD *v10; // rsi long long v11; // rdx _QWORD *v12; // rsi long long v13; // rcx long long *v14; // rcx long long v15; // rdx _QWORD *v16; // rsi long long j; // r12 long long v18; // r13 int v19; // eax long long v20; // r15 long long v21; // rsi long long v22; // rdi long long v23; // rax long long v24; // rax long long v25; // rcx _OWORD v26[5]; // [rsp+0h] [rbp-58h] BYREF v3 = (long long)a1; *(_QWORD *)&v4 = 0LL; for ( i = a2; ; i = (long long *)(result + 8) ) { result = *i; if ( !result ) break; v7 = *(_DWORD *)result; if ( *(_DWORD *)result == 2 ) { v14 = *(long long **)(result + 16); v15 = *v14; v16 = (_QWORD *)v14[1]; *(_QWORD *)(v15 + 8) = v16; *v16 = v15; *(_OWORD *)v14 = 0LL; } else if ( v7 == 1 ) { v13 = *(_QWORD *)(result + 16); *(_DWORD *)v13 = 0; *(_QWORD *)(v13 + 8) = 3LL; } else { if ( v7 ) LABEL_29: abort(a1, *(double *)&v4); v8 = *(_QWORD **)(result + 16); v9 = v8[4]; v10 = (_QWORD *)v8[5]; *(_QWORD *)(v9 + 8) = v10; *v10 = v9; *((_OWORD *)v8 + 2) = 0LL; v11 = v8[2]; v12 = (_QWORD *)v8[3]; *(_QWORD *)(v11 + 8) = v12; *v12 = v11; *((_OWORD *)v8 + 1) = 0LL; } } for ( j = *a2; j; j = v18 ) { v18 = *(_QWORD *)(j + 8); v19 = *(_DWORD *)j; if ( *(_DWORD *)j == 2 ) { v20 = *(_QWORD *)(j + 16); if ( *(_DWORD *)(v20 + 24) == -1 && (v23 = *(_QWORD *)(v20 + 16), *(_WORD *)(v23 + 6) == 59) ) v24 = *(_QWORD *)(v23 + 48); else v24 = 0LL; if ( !*(_BYTE *)(v3 + 258) ) { v25 = v20 + 48; if ( *(_DWORD *)(v20 + 56) != -1 || (*(_BYTE *)(*(_QWORD *)v25 + 5LL) & 2) == 0 ) { v26[0] = *(_OWORD *)(v24 + 24); v4 = *(_OWORD *)v25; v26[1] = *(_OWORD *)v25; JS_EnqueueJob(*(_QWORD *)(v24 + 16), (long long)js_finrec_job, 2u, (long long)v26); } } JS_FreeValueRT(v3, *(unsigned int **)(v20 + 48), *(_QWORD *)(v20 + 56)); } else { if ( v19 == 1 ) { v21 = *(_QWORD *)(j + 16); *(_QWORD *)(*(_QWORD *)(v21 + 16) + 48LL) = &js_weakref_sentinel; v22 = v3; goto LABEL_27; } if ( v19 ) goto LABEL_29; v20 = *(_QWORD *)(j + 16); } JS_FreeValueRT(v3, *(unsigned int **)(v20 + 64), *(_QWORD *)(v20 + 72)); v22 = v3; v21 = v20; LABEL_27: js_free_rt(v22, v21); a1 = (const char *)v3; result = js_free_rt(v3, j); } *a2 = 0LL; return result; }
reset_weak_ref: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI XORPS XMM0,XMM0 MOV RAX,RSI LAB_001347c4: MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00134838 MOV ECX,dword ptr [RAX] CMP ECX,0x2 JZ 0x0013481d CMP ECX,0x1 JZ 0x0013480c TEST ECX,ECX JNZ 0x0013493c MOV RCX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RCX + 0x20] MOV RSI,qword ptr [RCX + 0x28] MOV qword ptr [RDX + 0x8],RSI MOV qword ptr [RSI],RDX MOVUPS xmmword ptr [RCX + 0x20],XMM0 MOV RDX,qword ptr [RCX + 0x10] MOV RSI,qword ptr [RCX + 0x18] MOV qword ptr [RDX + 0x8],RSI MOV qword ptr [RSI],RDX MOVUPS xmmword ptr [RCX + 0x10],XMM0 JMP 0x00134832 LAB_0013480c: MOV RCX,qword ptr [RAX + 0x10] AND dword ptr [RCX],0x0 MOV qword ptr [RCX + 0x8],0x3 JMP 0x00134832 LAB_0013481d: MOV RCX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x8] MOV qword ptr [RDX + 0x8],RSI MOV qword ptr [RSI],RDX MOVUPS xmmword ptr [RCX],XMM0 LAB_00134832: ADD RAX,0x8 JMP 0x001347c4 LAB_00134838: MOV R12,qword ptr [RBX] LEA RBP,[0x1bb618] LAB_00134842: TEST R12,R12 JZ 0x00134929 MOV R13,qword ptr [R12 + 0x8] MOV EAX,dword ptr [R12] CMP EAX,0x2 JZ 0x00134885 CMP EAX,0x1 JZ 0x00134870 TEST EAX,EAX JNZ 0x0013493c MOV R15,qword ptr [R12 + 0x10] JMP 0x001348fb LAB_00134870: MOV RSI,qword ptr [R12 + 0x10] MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RAX + 0x30],RBP MOV RDI,R14 JMP 0x00134911 LAB_00134885: MOV R15,qword ptr [R12 + 0x10] CMP dword ptr [R15 + 0x18],-0x1 JNZ 0x001348a2 MOV RAX,qword ptr [R15 + 0x10] CMP word ptr [RAX + 0x6],0x3b JNZ 0x001348a2 MOV RAX,qword ptr [RAX + 0x30] JMP 0x001348a4 LAB_001348a2: XOR EAX,EAX LAB_001348a4: CMP byte ptr [R14 + 0x102],0x0 JNZ 0x001348eb LEA RCX,[R15 + 0x30] CMP dword ptr [R15 + 0x38],-0x1 JNZ 0x001348c2 MOV RDX,qword ptr [RCX] TEST byte ptr [RDX + 0x5],0x2 JNZ 0x001348eb LAB_001348c2: MOVUPS XMM0,xmmword ptr [RAX + 0x18] MOVAPS xmmword ptr [RSP],XMM0 MOVUPS XMM0,xmmword ptr [RCX] LEA RCX,[RSP + 0x10] MOVUPS xmmword ptr [RCX],XMM0 MOV RDI,qword ptr [RAX + 0x10] LEA RSI,[0x134941] PUSH 0x2 POP RDX MOV RCX,RSP CALL 0x00117ea9 LAB_001348eb: MOV RSI,qword ptr [R15 + 0x30] MOV RDX,qword ptr [R15 + 0x38] MOV RDI,R14 CALL 0x00118031 LAB_001348fb: MOV RSI,qword ptr [R15 + 0x40] MOV RDX,qword ptr [R15 + 0x48] MOV RDI,R14 CALL 0x00118031 MOV RDI,R14 MOV RSI,R15 LAB_00134911: CALL 0x001170cb MOV RDI,R14 MOV RSI,R12 CALL 0x001170cb MOV R12,R13 JMP 0x00134842 LAB_00134929: AND qword ptr [RBX],0x0 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013493c: CALL 0x0010e090
void reset_weak_ref(long param_1,int *param_2) { int iVar1; long *plVar2; int4 *puVar3; long *plVar4; int *piVar5; int *piVar6; long lVar7; long lVar8; int8 local_58; int8 uStack_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; for (piVar6 = param_2; piVar6 = *(int **)piVar6, piVar6 != (int *)0x0; piVar6 = piVar6 + 2) { iVar1 = *piVar6; if (iVar1 == 2) { plVar2 = *(long **)(piVar6 + 4); lVar8 = *plVar2; plVar4 = (long *)plVar2[1]; *(long **)(lVar8 + 8) = plVar4; *plVar4 = lVar8; *plVar2 = 0; plVar2[1] = 0; } else if (iVar1 == 1) { puVar3 = *(int4 **)(piVar6 + 4); *puVar3 = 0; *(int8 *)(puVar3 + 2) = 3; } else { if (iVar1 != 0) goto LAB_0013493c; lVar8 = *(long *)(piVar6 + 4); lVar7 = *(long *)(lVar8 + 0x20); plVar2 = *(long **)(lVar8 + 0x28); *(long **)(lVar7 + 8) = plVar2; *plVar2 = lVar7; *(int8 *)(lVar8 + 0x20) = 0; *(int8 *)(lVar8 + 0x28) = 0; lVar7 = *(long *)(lVar8 + 0x10); plVar2 = *(long **)(lVar8 + 0x18); *(long **)(lVar7 + 8) = plVar2; *plVar2 = lVar7; *(int8 *)(lVar8 + 0x10) = 0; *(int8 *)(lVar8 + 0x18) = 0; } } piVar6 = *(int **)param_2; do { if (piVar6 == (int *)0x0) { param_2[0] = 0; param_2[1] = 0; return; } piVar5 = *(int **)(piVar6 + 2); iVar1 = *piVar6; if (iVar1 == 2) { lVar8 = *(long *)(piVar6 + 4); if ((*(int *)(lVar8 + 0x18) == -1) && (*(short *)(*(long *)(lVar8 + 0x10) + 6) == 0x3b)) { lVar7 = *(long *)(*(long *)(lVar8 + 0x10) + 0x30); } else { lVar7 = 0; } if ((*(char *)(param_1 + 0x102) == '\0') && ((*(int *)(lVar8 + 0x38) != -1 || ((*(byte *)(*(long *)(lVar8 + 0x30) + 5) & 2) == 0)))) { local_58 = *(int8 *)(lVar7 + 0x18); uStack_50 = *(int8 *)(lVar7 + 0x20); local_48 = *(int4 *)(lVar8 + 0x30); uStack_44 = *(int4 *)(lVar8 + 0x34); uStack_40 = *(int4 *)(lVar8 + 0x38); uStack_3c = *(int4 *)(lVar8 + 0x3c); JS_EnqueueJob(*(int8 *)(lVar7 + 0x10),js_finrec_job,2,&local_58); } JS_FreeValueRT(param_1,*(int8 *)(lVar8 + 0x30),*(int8 *)(lVar8 + 0x38)); LAB_001348fb: JS_FreeValueRT(param_1,*(int8 *)(lVar8 + 0x40),*(int8 *)(lVar8 + 0x48)); } else { if (iVar1 != 1) { if (iVar1 != 0) { LAB_0013493c: /* WARNING: Subroutine does not return */ abort(); } lVar8 = *(long *)(piVar6 + 4); goto LAB_001348fb; } lVar8 = *(long *)(piVar6 + 4); *(int1 **)(*(long *)(lVar8 + 0x10) + 0x30) = js_weakref_sentinel; } js_free_rt(param_1,lVar8); js_free_rt(param_1,piVar6); piVar6 = piVar5; } while( true ); }
48,717
add_fast_array_element
bluesky950520[P]quickjs/quickjs.c
static int add_fast_array_element(JSContext *ctx, JSObject *p, JSValue val, int flags) { uint32_t new_len, array_len; /* extend the array by one */ /* XXX: convert to slow array if new_len > 2^31-1 elements */ new_len = p->u.array.count + 1; /* update the length if necessary. We assume that if the length is not an integer, then if it >= 2^31. */ if (likely(JS_VALUE_GET_TAG(p->prop[0].u.value) == JS_TAG_INT)) { array_len = JS_VALUE_GET_INT(p->prop[0].u.value); if (new_len > array_len) { if (unlikely(!(get_shape_prop(p->shape)->flags & JS_PROP_WRITABLE))) { JS_FreeValue(ctx, val); return JS_ThrowTypeErrorReadOnly(ctx, flags, JS_ATOM_length); } p->prop[0].u.value = js_int32(new_len); } } if (unlikely(new_len > p->u.array.u1.size)) { if (expand_fast_array(ctx, p, new_len)) { JS_FreeValue(ctx, val); return -1; } } p->u.array.u.values[new_len - 1] = val; p->u.array.count = new_len; return TRUE; }
O2
c
add_fast_array_element: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movl 0x40(%rsi), %r15d leal 0x1(%r15), %ebp movq 0x20(%rsi), %rax cmpl $0x0, 0x8(%rax) jne 0x39e9a cmpl (%rax), %ebp jbe 0x39e9a movq 0x18(%r12), %rcx testb $0x8, 0x43(%rcx) je 0x39eed movl %ebp, %ecx movq %rcx, (%rax) andq $0x0, 0x8(%rax) cmpl 0x30(%r12), %ebp ja 0x39eca movq 0x38(%r12), %rax shlq $0x4, %r15 movq %r14, (%rax,%r15) movq %rbx, 0x8(%rax,%r15) movl %ebp, 0x40(%r12) pushq $0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdi, %r13 movq %r12, %rsi movl %ebp, %edx callq 0x39f55 testl %eax, %eax je 0x39ea1 movq %r13, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1bbce pushq $-0x1 jmp 0x39eba movl %r8d, %r13d movq %rdi, %r15 movq %r14, %rsi movq %rbx, %rdx callq 0x1bbce pushq $0x32 popq %rdx movq %r15, %rdi movl %r13d, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x39f17
add_fast_array_element: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r12, rsi mov r15d, [rsi+40h] lea ebp, [r15+1] mov rax, [rsi+20h] cmp dword ptr [rax+8], 0 jnz short loc_39E9A cmp ebp, [rax] jbe short loc_39E9A mov rcx, [r12+18h] test byte ptr [rcx+43h], 8 jz short loc_39EED mov ecx, ebp mov [rax], rcx and qword ptr [rax+8], 0 loc_39E9A: cmp ebp, [r12+30h] ja short loc_39ECA loc_39EA1: mov rax, [r12+38h] shl r15, 4 mov [rax+r15], r14 mov [rax+r15+8], rbx mov [r12+40h], ebp push 1 loc_39EBA: pop rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39ECA: mov r13, rdi mov rsi, r12 mov edx, ebp call expand_fast_array test eax, eax jz short loc_39EA1 mov rdi, r13 mov rsi, r14 mov rdx, rbx call JS_FreeValue push 0FFFFFFFFFFFFFFFFh jmp short loc_39EBA loc_39EED: mov r13d, r8d mov r15, rdi mov rsi, r14 mov rdx, rbx call JS_FreeValue push 32h ; '2' pop rdx mov rdi, r15 mov esi, r13d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp short $+2
long long add_fast_array_element(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v7; // r15 unsigned int v8; // ebp _QWORD *v9; // rax long long v10; // rax long long v11; // r15 v7 = *(unsigned int *)(a2 + 64); v8 = v7 + 1; v9 = *(_QWORD **)(a2 + 32); if ( !*((_DWORD *)v9 + 2) && v8 > *(_DWORD *)v9 ) { if ( (*(_BYTE *)(*(_QWORD *)(a2 + 24) + 67LL) & 8) == 0 ) { JS_FreeValue(a1, a3, a4); return JS_ThrowTypeErrorReadOnly(a1, a5, 50LL); } *v9 = v8; v9[1] = 0LL; } if ( v8 > *(_DWORD *)(a2 + 48) && (unsigned int)expand_fast_array(a1, a2, v8) ) { JS_FreeValue(a1, a3, a4); return -1LL; } else { v10 = *(_QWORD *)(a2 + 56); v11 = 16 * v7; *(_QWORD *)(v10 + v11) = a3; *(_QWORD *)(v10 + v11 + 8) = a4; *(_DWORD *)(a2 + 64) = v8; return 1LL; } }
add_fast_array_element: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15D,dword ptr [RSI + 0x40] LEA EBP,[R15 + 0x1] MOV RAX,qword ptr [RSI + 0x20] CMP dword ptr [RAX + 0x8],0x0 JNZ 0x00139e9a CMP EBP,dword ptr [RAX] JBE 0x00139e9a MOV RCX,qword ptr [R12 + 0x18] TEST byte ptr [RCX + 0x43],0x8 JZ 0x00139eed MOV ECX,EBP MOV qword ptr [RAX],RCX AND qword ptr [RAX + 0x8],0x0 LAB_00139e9a: CMP EBP,dword ptr [R12 + 0x30] JA 0x00139eca LAB_00139ea1: MOV RAX,qword ptr [R12 + 0x38] SHL R15,0x4 MOV qword ptr [RAX + R15*0x1],R14 MOV qword ptr [RAX + R15*0x1 + 0x8],RBX MOV dword ptr [R12 + 0x40],EBP PUSH 0x1 LAB_00139eba: POP RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139eca: MOV R13,RDI MOV RSI,R12 MOV EDX,EBP CALL 0x00139f55 TEST EAX,EAX JZ 0x00139ea1 MOV RDI,R13 MOV RSI,R14 MOV RDX,RBX CALL 0x0011bbce PUSH -0x1 JMP 0x00139eba LAB_00139eed: MOV R13D,R8D MOV R15,RDI MOV RSI,R14 MOV RDX,RBX CALL 0x0011bbce PUSH 0x32 POP RDX MOV RDI,R15 MOV ESI,R13D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00139f17
int8 add_fast_array_element (int8 param_1,long param_2,int8 param_3,int8 param_4,int4 param_5) { uint uVar1; ulong *puVar2; long lVar3; int iVar4; int8 uVar5; uint uVar6; long lVar7; uVar1 = *(uint *)(param_2 + 0x40); uVar6 = uVar1 + 1; puVar2 = *(ulong **)(param_2 + 0x20); if (((uint)puVar2[1] == 0) && ((uint)*puVar2 < uVar6)) { if ((*(byte *)(*(long *)(param_2 + 0x18) + 0x43) & 8) == 0) { JS_FreeValue(param_1,param_3,param_4); uVar5 = JS_ThrowTypeErrorReadOnly(param_1,param_5,0x32); return uVar5; } *puVar2 = (ulong)uVar6; puVar2[1] = 0; } if ((*(uint *)(param_2 + 0x30) < uVar6) && (iVar4 = expand_fast_array(param_1,param_2,uVar6), iVar4 != 0)) { JS_FreeValue(param_1,param_3,param_4); return 0xffffffffffffffff; } lVar3 = *(long *)(param_2 + 0x38); lVar7 = (ulong)uVar1 * 0x10; *(int8 *)(lVar3 + lVar7) = param_3; *(int8 *)(lVar3 + 8 + lVar7) = param_4; *(uint *)(param_2 + 0x40) = uVar6; return 1; }
48,718
type_inference_resolve_type
tsotchke[P]eshkol/src/frontend/type_inference/inference.c
Type* type_inference_resolve_type(TypeInferenceContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); // First check for explicit type Type* explicit_type = type_inference_get_explicit_type(context, node); if (explicit_type) { return explicit_type; } // If it's a function, check for separate declaration if (node->type == AST_FUNCTION_DEF && node->as.function_def.name->type == AST_IDENTIFIER) { StringId name = node->as.function_def.name->as.identifier.name; Type* signature = type_inference_get_function_signature(context, name); if (signature) { return signature; } } // Fall back to inferred type return type_inference_get_type(context, node); }
O3
c
type_inference_resolve_type: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0xa213 movq %rsi, %rbx testq %rsi, %rsi je 0xa232 movq %rdi, %r14 movq %rbx, %rsi callq 0x8cc2 testq %rax, %rax je 0xa1e2 addq $0x8, %rsp popq %rbx popq %r14 retq cmpl $0x1b, (%rbx) jne 0xa201 movq 0x48(%rbx), %rax cmpl $0x6, (%rax) jne 0xa201 movq 0x48(%rax), %rsi movq %r14, %rdi callq 0x8d26 testq %rax, %rax jne 0xa1da movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8c5e leaq 0xfb45(%rip), %rdi # 0x19d5f leaq 0x11b6f(%rip), %rsi # 0x1bd90 leaq 0x11c57(%rip), %rcx # 0x1be7f movl $0x395, %edx # imm = 0x395 callq 0x2180 leaq 0x11696(%rip), %rdi # 0x1b8cf leaq 0x11b50(%rip), %rsi # 0x1bd90 leaq 0x11c38(%rip), %rcx # 0x1be7f movl $0x396, %edx # imm = 0x396 callq 0x2180 nopl (%rax)
type_inference_resolve_type: push r14 push rbx push rax test rdi, rdi jz short loc_A213 mov rbx, rsi test rsi, rsi jz short loc_A232 mov r14, rdi mov rsi, rbx call type_inference_get_explicit_type test rax, rax jz short loc_A1E2 loc_A1DA: add rsp, 8 pop rbx pop r14 retn loc_A1E2: cmp dword ptr [rbx], 1Bh jnz short loc_A201 mov rax, [rbx+48h] cmp dword ptr [rax], 6 jnz short loc_A201 mov rsi, [rax+48h] mov rdi, r14 call type_inference_get_function_signature test rax, rax jnz short loc_A1DA loc_A201: mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp type_inference_get_type loc_A213: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"... lea rcx, aTypeTypeInfere_3; "Type *type_inference_resolve_type(TypeI"... mov edx, 395h call ___assert_fail loc_A232: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"... lea rcx, aTypeTypeInfere_3; "Type *type_inference_resolve_type(TypeI"... mov edx, 396h call ___assert_fail
long long type_inference_resolve_type(_QWORD *a1, long long a2) { long long result; // rax long long v3; // rax if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/inference.c", 917LL, "Type *type_inference_resolve_type(TypeInferenceContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/inference.c", 918LL, "Type *type_inference_resolve_type(TypeInferenceContext *, const AstNode *)"); result = type_inference_get_explicit_type(a1, a2); if ( !result ) { if ( *(_DWORD *)a2 != 27 ) return type_inference_get_type(a1, a2); v3 = *(_QWORD *)(a2 + 72); if ( *(_DWORD *)v3 != 6 ) return type_inference_get_type(a1, a2); result = type_inference_get_function_signature(a1, *(_QWORD *)(v3 + 72)); if ( !result ) return type_inference_get_type(a1, a2); } return result; }
type_inference_resolve_type: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x0010a213 MOV RBX,RSI TEST RSI,RSI JZ 0x0010a232 MOV R14,RDI MOV RSI,RBX CALL 0x00108cc2 TEST RAX,RAX JZ 0x0010a1e2 LAB_0010a1da: ADD RSP,0x8 POP RBX POP R14 RET LAB_0010a1e2: CMP dword ptr [RBX],0x1b JNZ 0x0010a201 MOV RAX,qword ptr [RBX + 0x48] CMP dword ptr [RAX],0x6 JNZ 0x0010a201 MOV RSI,qword ptr [RAX + 0x48] MOV RDI,R14 CALL 0x00108d26 TEST RAX,RAX JNZ 0x0010a1da LAB_0010a201: MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00108c5e LAB_0010a213: LEA RDI,[0x119d5f] LEA RSI,[0x11bd90] LEA RCX,[0x11be7f] MOV EDX,0x395 CALL 0x00102180 LAB_0010a232: LEA RDI,[0x11b8cf] LEA RSI,[0x11bd90] LEA RCX,[0x11be7f] MOV EDX,0x396 CALL 0x00102180
void type_inference_resolve_type(long param_1,int *param_2) { long lVar1; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/inference.c" ,0x395, "Type *type_inference_resolve_type(TypeInferenceContext *, const AstNode *)"); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/inference.c" ,0x396, "Type *type_inference_resolve_type(TypeInferenceContext *, const AstNode *)"); } lVar1 = type_inference_get_explicit_type(param_1,param_2); if (lVar1 != 0) { return; } if (((*param_2 == 0x1b) && (**(int **)(param_2 + 0x12) == 6)) && (lVar1 = type_inference_get_function_signature (param_1,*(int8 *)(*(int **)(param_2 + 0x12) + 0x12)), lVar1 != 0)) { return; } type_inference_get_type(param_1,param_2); return; }
48,719
ma_cmp_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_cmp_dynamic_record(register MARIA_HA *info, register const uchar *record) { uint flag, reclength, b_type,cmp_length; my_off_t filepos; uchar *buffer; MARIA_BLOCK_INFO block_info; my_bool error= 1, buff_alloced= 0; size_t UNINIT_VAR(buffer_length); DBUG_ENTER("_ma_cmp_dynamic_record"); if (info->opt_flag & WRITE_CACHE_USED) { info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK); if (flush_io_cache(&info->rec_cache)) DBUG_RETURN(1); } info->rec_cache.seek_not_done=1; /* If nobody have touched the database we don't have to test rec */ buffer=info->rec_buff; if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ if (info->s->base.blobs) { buffer_length= (info->s->base.pack_reclength + _ma_calc_total_blob_length(info,record)); alloc_on_stack(*info->stack_end_ptr, buffer, buff_alloced, buffer_length); if (!buffer) DBUG_RETURN(1); } if (!(reclength= _ma_rec_pack(info,buffer,record))) goto err; record= buffer; filepos= info->cur_row.lastpos; flag=block_info.second_read=0; block_info.next_filepos=filepos; while (reclength > 0) { if ((b_type= _ma_get_block_info(info, &block_info, info->dfile.file, block_info.next_filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_CHANGED; goto err; } if (flag == 0) /* First block */ { flag=1; if (reclength != block_info.rec_len) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } } else if (reclength < block_info.data_len) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } reclength-= block_info.data_len; cmp_length= block_info.data_len; if (!reclength && info->s->calc_checksum) cmp_length--; /* 'record' may not contain checksum */ if (_ma_cmp_buffer(info->dfile.file, record, block_info.filepos, cmp_length)) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } flag=1; record+=block_info.data_len; } } my_errno=0; error= 0; err: stack_alloc_free(buffer, buff_alloced); DBUG_PRINT("exit", ("result: %d", error)); DBUG_RETURN(error); }
O0
c
ma_cmp_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movb $0x1, -0x99(%rbp) movb $0x0, -0x9a(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x403ab movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx andl $0xfffff6ff, %ecx # imm = 0xFFFFF6FF movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe0be0 cmpl $0x0, %eax je 0x403a9 jmp 0x403a0 movb $0x1, -0x61(%rbp) jmp 0x406aa jmp 0x403ab movq -0x70(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rax movq %rax, -0x98(%rbp) movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x40678 movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x3f0(%rax) je 0x40505 movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rax movq %rax, -0xc0(%rbp) movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x3cb60 movq %rax, %rcx movq -0xc0(%rbp), %rax addq %rcx, %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0x70(%rbp), %rax movq 0x78(%rax), %rax movq (%rax), %rax leaq -0xb0(%rbp), %rcx subq %rcx, %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax cmpq -0xb0(%rbp), %rax jbe 0x404cb movq -0xb8(%rbp), %rcx subq -0xb0(%rbp), %rcx movl $0x10000, %eax # imm = 0x10000 cmpq %rcx, %rax jb 0x404a3 movq -0xb8(%rbp), %rcx subq -0xb0(%rbp), %rcx movl $0x8000, %eax # imm = 0x8000 cmpq %rcx, %rax jae 0x404cb movl $0x1000, %eax # imm = 0x1000 cmpq -0xb0(%rbp), %rax ja 0x404cb movb $0x0, -0x9a(%rbp) movq -0xa8(%rbp), %rcx addq $0xf, %rcx andq $-0x10, %rcx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x98(%rbp) jmp 0x404ec movb $0x1, -0x9a(%rbp) movq -0xa8(%rbp), %rsi xorl %edi, %edi movl $0x10010, %edx # imm = 0x10010 callq 0xf3860 movq %rax, -0x98(%rbp) jmp 0x404ee cmpq $0x0, -0x98(%rbp) jne 0x40503 jmp 0x404fa movb $0x1, -0x61(%rbp) jmp 0x406aa jmp 0x40505 movq -0x70(%rbp), %rdi movq -0x98(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0x3baa0 movl %eax, -0x80(%rbp) cmpl $0x0, %eax jne 0x40526 jmp 0x4068a movq -0x98(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x90(%rbp) movl $0x0, -0x10(%rbp) movl $0x0, -0x7c(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x20(%rbp) cmpl $0x0, -0x80(%rbp) jbe 0x40676 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x20(%rbp), %rcx leaq -0x60(%rbp), %rsi callq 0x3e0e0 movl %eax, -0x84(%rbp) andl $0x3c, %eax cmpl $0x0, %eax je 0x405ad movl -0x84(%rbp), %eax andl $0x14, %eax cmpl $0x0, %eax je 0x405a8 callq 0xf60c0 movl $0x7b, (%rax) jmp 0x4068a cmpl $0x0, -0x7c(%rbp) jne 0x405d5 movl $0x1, -0x7c(%rbp) movl -0x80(%rbp), %eax cmpq -0x48(%rbp), %rax je 0x405d3 callq 0xf60c0 movl $0x7b, (%rax) jmp 0x4068a jmp 0x405f3 movl -0x80(%rbp), %eax cmpq -0x40(%rbp), %rax jae 0x405f1 movq -0x70(%rbp), %rdi movl $0x7f, %esi callq 0x338b0 jmp 0x4068a jmp 0x405f3 movq -0x40(%rbp), %rcx movl -0x80(%rbp), %eax subq %rcx, %rax movl %eax, -0x80(%rbp) movq -0x40(%rbp), %rax movl %eax, -0x88(%rbp) cmpl $0x0, -0x80(%rbp) jne 0x40630 movq -0x70(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x6a8(%rax) je 0x40630 movl -0x88(%rbp), %eax addl $-0x1, %eax movl %eax, -0x88(%rbp) movq -0x70(%rbp), %rax movl 0x480(%rax), %edi movq -0x78(%rbp), %rsi movq -0x28(%rbp), %rdx movl -0x88(%rbp), %ecx callq 0x406e0 cmpb $0x0, %al je 0x4065e callq 0xf60c0 movl $0x7b, (%rax) jmp 0x4068a movl $0x1, -0x7c(%rbp) movq -0x40(%rbp), %rax addq -0x78(%rbp), %rax movq %rax, -0x78(%rbp) jmp 0x4055c jmp 0x40678 callq 0xf60c0 movl $0x0, (%rax) movb $0x0, -0x99(%rbp) movq -0x98(%rbp), %rdi movsbl -0x9a(%rbp), %esi callq 0x3cc00 jmp 0x4069f jmp 0x406a1 movb -0x99(%rbp), %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al movb %al, -0xc1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x406d0 movb -0xc1(%rbp), %al movq %rbp, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_ma_cmp_dynamic_record: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_99], 1 mov [rbp+var_9A], 0 mov rax, [rbp+var_A8] mov [rbp+var_A8], rax mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_403AB mov rax, [rbp+var_70] mov ecx, [rax+624h] and ecx, 0FFFFF6FFh mov [rax+624h], ecx mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_403A9 jmp short $+2 loc_403A0: mov [rbp+var_61], 1 jmp loc_406AA loc_403A9: jmp short $+2 loc_403AB: mov rax, [rbp+var_70] mov dword ptr [rax+598h], 1 mov rax, [rbp+var_70] mov rax, [rax+3A0h] mov [rbp+var_98], rax mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 4 cmp eax, 0 jz loc_40678 mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+3F0h], 0 jz loc_40505 mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+3A0h] mov [rbp+var_C0], rax mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] call _ma_calc_total_blob_length mov rcx, rax mov rax, [rbp+var_C0] add rax, rcx mov [rbp+var_A8], rax mov rax, [rbp+var_A8] mov [rbp+var_B0], rax mov rax, [rbp+var_70] mov rax, [rax+78h] mov rax, [rax] lea rcx, [rbp+var_B0] sub rax, rcx mov [rbp+var_B8], rax mov rax, [rbp+var_B8] cmp rax, [rbp+var_B0] jbe short loc_404CB mov rcx, [rbp+var_B8] sub rcx, [rbp+var_B0] mov eax, 10000h cmp rax, rcx jb short loc_404A3 mov rcx, [rbp+var_B8] sub rcx, [rbp+var_B0] mov eax, 8000h cmp rax, rcx jnb short loc_404CB mov eax, 1000h cmp rax, [rbp+var_B0] ja short loc_404CB loc_404A3: mov [rbp+var_9A], 0 mov rcx, [rbp+var_A8] add rcx, 0Fh and rcx, 0FFFFFFFFFFFFFFF0h mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_98], rax jmp short loc_404EC loc_404CB: mov [rbp+var_9A], 1 mov rsi, [rbp+var_A8] xor edi, edi mov edx, offset stru_10010 call my_malloc mov [rbp+var_98], rax loc_404EC: jmp short $+2 loc_404EE: cmp [rbp+var_98], 0 jnz short loc_40503 jmp short $+2 loc_404FA: mov [rbp+var_61], 1 jmp loc_406AA loc_40503: jmp short $+2 loc_40505: mov rdi, [rbp+var_70] mov rsi, [rbp+var_98] mov rdx, [rbp+var_78] call _ma_rec_pack mov [rbp+var_80], eax cmp eax, 0 jnz short loc_40526 jmp loc_4068A loc_40526: mov rax, [rbp+var_98] mov [rbp+var_78], rax mov rax, [rbp+var_70] mov rax, [rax+98h] mov [rbp+var_90], rax mov [rbp+var_10], 0 mov [rbp+var_7C], 0 mov rax, [rbp+var_90] mov [rbp+var_20], rax loc_4055C: cmp [rbp+var_80], 0 jbe loc_40676 mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rcx, [rbp+var_20] lea rsi, [rbp+var_60] call _ma_get_block_info mov [rbp+var_84], eax and eax, 3Ch cmp eax, 0 jz short loc_405AD mov eax, [rbp+var_84] and eax, 14h cmp eax, 0 jz short loc_405A8 call _my_thread_var mov dword ptr [rax], 7Bh ; '{' loc_405A8: jmp loc_4068A loc_405AD: cmp [rbp+var_7C], 0 jnz short loc_405D5 mov [rbp+var_7C], 1 mov eax, [rbp+var_80] cmp rax, [rbp+var_48] jz short loc_405D3 call _my_thread_var mov dword ptr [rax], 7Bh ; '{' jmp loc_4068A loc_405D3: jmp short loc_405F3 loc_405D5: mov eax, [rbp+var_80] cmp rax, [rbp+var_40] jnb short loc_405F1 mov rdi, [rbp+var_70] mov esi, 7Fh call _ma_set_fatal_error jmp loc_4068A loc_405F1: jmp short $+2 loc_405F3: mov rcx, [rbp+var_40] mov eax, [rbp+var_80] sub rax, rcx mov [rbp+var_80], eax mov rax, [rbp+var_40] mov [rbp+var_88], eax cmp [rbp+var_80], 0 jnz short loc_40630 mov rax, [rbp+var_70] mov rax, [rax] cmp qword ptr [rax+6A8h], 0 jz short loc_40630 mov eax, [rbp+var_88] add eax, 0FFFFFFFFh mov [rbp+var_88], eax loc_40630: mov rax, [rbp+var_70] mov edi, [rax+480h] mov rsi, [rbp+var_78] mov rdx, [rbp+var_28] mov ecx, [rbp+var_88] call _ma_cmp_buffer cmp al, 0 jz short loc_4065E call _my_thread_var mov dword ptr [rax], 7Bh ; '{' jmp short loc_4068A loc_4065E: mov [rbp+var_7C], 1 mov rax, [rbp+var_40] add rax, [rbp+var_78] mov [rbp+var_78], rax jmp loc_4055C loc_40676: jmp short $+2 loc_40678: call _my_thread_var mov dword ptr [rax], 0 mov [rbp+var_99], 0 loc_4068A: mov rdi, [rbp+var_98] movsx esi, [rbp+var_9A] call stack_alloc_free jmp short $+2 loc_4069F: jmp short $+2 loc_406A1: mov al, [rbp+var_99] mov [rbp+var_61], al loc_406AA: mov al, [rbp+var_61] mov [rbp+var_C1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_406D0 mov al, [rbp+var_C1] mov rsp, rbp pop rbp retn loc_406D0: call ___stack_chk_fail
char ma_cmp_dynamic_record(long long a1, _BYTE *a2, long long a3) { long long v3; // r8 int v4; // r9d long long v5; // rdx long long v6; // rcx long long v7; // r8 int v8; // r9d long long v10; // [rsp+0h] [rbp-D0h] BYREF long long v11; // [rsp+10h] [rbp-C0h] unsigned long long v12; // [rsp+18h] [rbp-B8h] unsigned long long v13; // [rsp+20h] [rbp-B0h] BYREF unsigned long long v14; // [rsp+28h] [rbp-A8h] char v15; // [rsp+36h] [rbp-9Ah] char v16; // [rsp+37h] [rbp-99h] _BYTE *v17; // [rsp+38h] [rbp-98h] long long v18; // [rsp+40h] [rbp-90h] unsigned int v19; // [rsp+48h] [rbp-88h] int block_info; // [rsp+4Ch] [rbp-84h] unsigned int v21; // [rsp+50h] [rbp-80h] int v22; // [rsp+54h] [rbp-7Ch] _BYTE *v23; // [rsp+58h] [rbp-78h] _QWORD *v24; // [rsp+60h] [rbp-70h] unsigned __int8 v26[24]; // [rsp+70h] [rbp-60h] BYREF long long v27; // [rsp+88h] [rbp-48h] unsigned long long v28; // [rsp+90h] [rbp-40h] long long v29; // [rsp+A8h] [rbp-28h] long long v30; // [rsp+B0h] [rbp-20h] int v31; // [rsp+C0h] [rbp-10h] unsigned long long v32; // [rsp+C8h] [rbp-8h] v32 = __readfsqword(0x28u); v24 = (_QWORD *)a1; v23 = a2; v16 = 1; v15 = 0; if ( (*(_DWORD *)(a1 + 1564) & 0x10) == 0 || (*((_DWORD *)v24 + 393) &= 0xFFFFF6FF, !(unsigned int)my_b_flush_io_cache(v24 + 151, 1LL)) ) { *((_DWORD *)v24 + 358) = 1; v17 = (_BYTE *)v24[116]; if ( (*((_DWORD *)v24 + 391) & 4) != 0 ) { if ( *(_DWORD *)(*v24 + 1008LL) ) { v11 = *(_QWORD *)(*v24 + 928LL); v14 = ma_calc_total_blob_length(v24, (long long)v23, a3) + v11; v13 = v14; v12 = *(_QWORD *)v24[15] - (_QWORD)&v13; if ( v12 <= v14 || v12 - v13 <= 0x10000 && (v12 - v13 <= 0x8000 || v13 < 0x1000) ) { v15 = 1; v17 = (_BYTE *)my_malloc(0LL, v14, &stru_10010); } else { v15 = 0; v17 = (char *)&v10 - ((v14 + 15) & 0xFFFFFFFFFFFFFFF0LL); } if ( !v17 ) return 1; } v21 = ma_rec_pack(v24, v17, v23); if ( !v21 ) { LABEL_33: stack_alloc_free((long long)v17, v15); return v16; } v23 = v17; v18 = v24[19]; v31 = 0; v22 = 0; v30 = v18; while ( v21 ) { block_info = ma_get_block_info((long long)v24, v26, *((unsigned int *)v24 + 288), v30, v3, v4); if ( (block_info & 0x3C) != 0 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var() = 123; goto LABEL_33; } if ( v22 ) { if ( v21 < v28 ) { ma_set_fatal_error(v24, 127, v5, v6, v7, v8); goto LABEL_33; } } else { v22 = 1; if ( v21 != v27 ) goto LABEL_23; } v21 -= v28; v19 = v28; if ( !v21 && *(_QWORD *)(*v24 + 1704LL) ) --v19; if ( (unsigned __int8)ma_cmp_buffer(*((unsigned int *)v24 + 288), v23, v29, v19) ) { LABEL_23: *(_DWORD *)my_thread_var() = 123; goto LABEL_33; } v22 = 1; v23 += v28; } } *(_DWORD *)my_thread_var() = 0; v16 = 0; goto LABEL_33; } return 1; }
_ma_cmp_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 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 byte ptr [RBP + -0x99],0x1 MOV byte ptr [RBP + -0x9a],0x0 MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x001403ab MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] AND ECX,0xfffff6ff MOV dword ptr [RAX + 0x624],ECX MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e0be0 CMP EAX,0x0 JZ 0x001403a9 JMP 0x001403a0 LAB_001403a0: MOV byte ptr [RBP + -0x61],0x1 JMP 0x001406aa LAB_001403a9: JMP 0x001403ab LAB_001403ab: MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x598],0x1 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x3a0] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x4 CMP EAX,0x0 JZ 0x00140678 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x00140505 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3a0] MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] CALL 0x0013cb60 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xc0] ADD RAX,RCX MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX] LEA RCX,[RBP + -0xb0] SUB RAX,RCX MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] CMP RAX,qword ptr [RBP + -0xb0] JBE 0x001404cb MOV RCX,qword ptr [RBP + -0xb8] SUB RCX,qword ptr [RBP + -0xb0] MOV EAX,0x10000 CMP RAX,RCX JC 0x001404a3 MOV RCX,qword ptr [RBP + -0xb8] SUB RCX,qword ptr [RBP + -0xb0] MOV EAX,0x8000 CMP RAX,RCX JNC 0x001404cb MOV EAX,0x1000 CMP RAX,qword ptr [RBP + -0xb0] JA 0x001404cb LAB_001404a3: MOV byte ptr [RBP + -0x9a],0x0 MOV RCX,qword ptr [RBP + -0xa8] ADD RCX,0xf AND RCX,-0x10 MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001404ec LAB_001404cb: MOV byte ptr [RBP + -0x9a],0x1 MOV RSI,qword ptr [RBP + -0xa8] XOR EDI,EDI MOV EDX,0x10010 CALL 0x001f3860 MOV qword ptr [RBP + -0x98],RAX LAB_001404ec: JMP 0x001404ee LAB_001404ee: CMP qword ptr [RBP + -0x98],0x0 JNZ 0x00140503 JMP 0x001404fa LAB_001404fa: MOV byte ptr [RBP + -0x61],0x1 JMP 0x001406aa LAB_00140503: JMP 0x00140505 LAB_00140505: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0x78] CALL 0x0013baa0 MOV dword ptr [RBP + -0x80],EAX CMP EAX,0x0 JNZ 0x00140526 JMP 0x0014068a LAB_00140526: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x90],RAX MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0x7c],0x0 MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x20],RAX LAB_0014055c: CMP dword ptr [RBP + -0x80],0x0 JBE 0x00140676 MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x60] CALL 0x0013e0e0 MOV dword ptr [RBP + -0x84],EAX AND EAX,0x3c CMP EAX,0x0 JZ 0x001405ad MOV EAX,dword ptr [RBP + -0x84] AND EAX,0x14 CMP EAX,0x0 JZ 0x001405a8 CALL 0x001f60c0 MOV dword ptr [RAX],0x7b LAB_001405a8: JMP 0x0014068a LAB_001405ad: CMP dword ptr [RBP + -0x7c],0x0 JNZ 0x001405d5 MOV dword ptr [RBP + -0x7c],0x1 MOV EAX,dword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x48] JZ 0x001405d3 CALL 0x001f60c0 MOV dword ptr [RAX],0x7b JMP 0x0014068a LAB_001405d3: JMP 0x001405f3 LAB_001405d5: MOV EAX,dword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001405f1 MOV RDI,qword ptr [RBP + -0x70] MOV ESI,0x7f CALL 0x001338b0 JMP 0x0014068a LAB_001405f1: JMP 0x001405f3 LAB_001405f3: MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x80] SUB RAX,RCX MOV dword ptr [RBP + -0x80],EAX MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x88],EAX CMP dword ptr [RBP + -0x80],0x0 JNZ 0x00140630 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x6a8],0x0 JZ 0x00140630 MOV EAX,dword ptr [RBP + -0x88] ADD EAX,-0x1 MOV dword ptr [RBP + -0x88],EAX LAB_00140630: MOV RAX,qword ptr [RBP + -0x70] MOV EDI,dword ptr [RAX + 0x480] MOV RSI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x88] CALL 0x001406e0 CMP AL,0x0 JZ 0x0014065e CALL 0x001f60c0 MOV dword ptr [RAX],0x7b JMP 0x0014068a LAB_0014065e: MOV dword ptr [RBP + -0x7c],0x1 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x78],RAX JMP 0x0014055c LAB_00140676: JMP 0x00140678 LAB_00140678: CALL 0x001f60c0 MOV dword ptr [RAX],0x0 MOV byte ptr [RBP + -0x99],0x0 LAB_0014068a: MOV RDI,qword ptr [RBP + -0x98] MOVSX ESI,byte ptr [RBP + -0x9a] CALL 0x0013cc00 JMP 0x0014069f LAB_0014069f: JMP 0x001406a1 LAB_001406a1: MOV AL,byte ptr [RBP + -0x99] MOV byte ptr [RBP + -0x61],AL LAB_001406aa: MOV AL,byte ptr [RBP + -0x61] MOV byte ptr [RBP + -0xc1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001406d0 MOV AL,byte ptr [RBP + -0xc1] MOV RSP,RBP POP RBP RET LAB_001406d0: CALL 0x0012a270
int8 _ma_cmp_dynamic_record(long *param_1,int1 *param_2) { long lVar1; int1 *puVar2; long *plVar3; int8 uVar4; char cVar5; int iVar6; long lVar7; int4 *puVar8; int1 *puVar9; int1 *puVar10; long in_FS_OFFSET; int1 auStack_d8 [15]; int1 local_c9; long local_c8; ulong local_c0; ulong local_b8; ulong local_b0; char local_a2; int1 local_a1; int1 *local_a0; long local_98; int local_90; uint local_8c; uint local_88; int local_84; int1 *local_80; long *local_78; int1 local_69; int1 local_68 [24]; ulong local_50; ulong local_48; int8 local_30; long local_28; int4 local_18; long local_10; puVar10 = auStack_d8; puVar9 = auStack_d8; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_a1 = 1; local_a2 = '\0'; local_80 = param_2; local_78 = param_1; if ((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) { *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 0xfffff6ff; iVar6 = my_b_flush_io_cache(param_1 + 0x97,1); if (iVar6 != 0) { local_69 = 1; puVar10 = auStack_d8; goto LAB_001406aa; } } *(int4 *)(local_78 + 0xb3) = 1; local_a0 = (int1 *)local_78[0x74]; if ((*(uint *)((long)local_78 + 0x61c) & 4) == 0) { LAB_00140678: *(int8 *)(puVar10 + -8) = 0x14067d; puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0; local_a1 = 0; } else { puVar10 = auStack_d8; if (*(int *)(*local_78 + 0x3f0) != 0) { local_c8 = *(long *)(*local_78 + 0x3a0); lVar7 = _ma_calc_total_blob_length(local_78,local_80); local_b8 = local_c8 + lVar7; local_c0 = *(long *)local_78[0xf] - (long)&local_b8; local_b0 = local_b8; if ((local_b8 < local_c0) && ((0x10000 < local_c0 - local_b8 || ((0x8000 < local_c0 - local_b8 && (0xfff < local_b8))))) ) { local_a2 = '\0'; puVar9 = auStack_d8 + -(local_b8 + 0xf & 0xfffffffffffffff0); local_a0 = puVar9; } else { local_a2 = '\x01'; local_a0 = (int1 *)my_malloc(0,local_b8,0x10010); } puVar10 = puVar9; if (local_a0 == (int1 *)0x0) { local_69 = 1; goto LAB_001406aa; } } plVar3 = local_78; puVar2 = local_80; puVar9 = local_a0; *(int8 *)(puVar10 + -8) = 0x140519; local_88 = _ma_rec_pack(plVar3,puVar9,puVar2); if (local_88 != 0) { local_80 = local_a0; local_98 = local_78[0x13]; local_18 = 0; local_84 = 0; local_28 = local_98; while (lVar7 = local_28, plVar3 = local_78, local_88 != 0) { lVar1 = local_78[0x90]; *(int8 *)(puVar10 + -8) = 0x140581; local_8c = _ma_get_block_info(plVar3,local_68,(int)lVar1,lVar7); uVar4 = local_30; plVar3 = local_78; puVar9 = local_80; if ((local_8c & 0x3c) != 0) { if ((local_8c & 0x14) != 0) { *(int8 *)(puVar10 + -8) = 0x1405a2; puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x7b; } goto LAB_0014068a; } if (local_84 == 0) { local_84 = 1; if (local_88 != local_50) { *(int8 *)(puVar10 + -8) = 0x1405c8; puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x7b; goto LAB_0014068a; } } else if (local_88 < local_48) { *(int8 *)(puVar10 + -8) = 0x1405ec; _ma_set_fatal_error(plVar3,0x7f); goto LAB_0014068a; } local_90 = (int)local_48; local_88 = local_88 - local_90; if ((local_88 == 0) && (*(long *)(*local_78 + 0x6a8) != 0)) { local_90 = local_90 + -1; } iVar6 = local_90; lVar7 = local_78[0x90]; *(int8 *)(puVar10 + -8) = 0x14064d; cVar5 = _ma_cmp_buffer((int)lVar7,puVar9,uVar4,iVar6); if (cVar5 != '\0') { *(int8 *)(puVar10 + -8) = 0x140656; puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x7b; goto LAB_0014068a; } local_84 = 1; local_80 = local_80 + local_48; } goto LAB_00140678; } } LAB_0014068a: puVar9 = local_a0; iVar6 = (int)local_a2; *(int8 *)(puVar10 + -8) = 0x14069d; stack_alloc_free(puVar9,iVar6); local_69 = local_a1; LAB_001406aa: local_c9 = local_69; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ *(int8 *)(puVar10 + -8) = 0x1406d5; __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_69); }
48,720
check_and_set_lsn
eloqsql/storage/maria/ma_pagecache.c
static void check_and_set_lsn(PAGECACHE *pagecache, LSN lsn, PAGECACHE_BLOCK_LINK *block) { LSN old; DBUG_ENTER("check_and_set_lsn"); /* In recovery, we can _ma_unpin_all_pages() to put a LSN on page, though page would be PAGECACHE_PLAIN_PAGE (transactionality temporarily disabled to not log REDOs). */ DBUG_ASSERT((block->type == PAGECACHE_LSN_PAGE) || maria_in_recovery); old= lsn_korr(block->buffer); DBUG_PRINT("info", ("old lsn: " LSN_FMT " new lsn: " LSN_FMT, LSN_IN_PARTS(old), LSN_IN_PARTS(lsn))); if (cmp_translog_addr(lsn, old) > 0) { DBUG_ASSERT(block->type != PAGECACHE_READ_UNKNOWN_PAGE); lsn_store(block->buffer, lsn); /* we stored LSN in page so we dirtied it */ if (!(block->status & PCBLOCK_CHANGED)) link_to_changed_list(pagecache, block); } DBUG_VOID_RETURN; }
O0
c
check_and_set_lsn: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0xe5e596 movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq 0x30(%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movq 0x30(%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x18(%rbp), %rcx movq 0x30(%rcx), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0xe5e5dd movq -0x10(%rbp), %rax subq -0x20(%rbp), %rax cmpq $0x0, %rax jle 0xe5e684 jmp 0xe5e5f1 jmp 0xe5e5f3 jmp 0xe5e5f5 jmp 0xe5e5f7 movq -0x10(%rbp), %rax sarq $0x20, %rax movb %al, %cl movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movb %cl, 0x2(%rax) jmp 0xe5e63d movq -0x18(%rbp), %rax movq 0x30(%rax), %rax addq $0x3, %rax movq %rax, -0x28(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) jmp 0xe5e665 movq -0x18(%rbp), %rax movzwl 0x74(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax jne 0xe5e682 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xe5e690 jmp 0xe5e684 jmp 0xe5e686 jmp 0xe5e688 addq $0x30, %rsp popq %rbp retq nop
check_and_set_lsn: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_E5E596: mov rax, [rbp+var_18] mov rax, [rax+30h] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx+30h] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx+30h] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_18] mov rcx, [rcx+30h] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_20], rax jmp short $+2 loc_E5E5DD: mov rax, [rbp+var_10] sub rax, [rbp+var_20] cmp rax, 0 jle loc_E5E684 jmp short $+2 loc_E5E5F1: jmp short $+2 loc_E5E5F3: jmp short $+2 loc_E5E5F5: jmp short $+2 loc_E5E5F7: mov rax, [rbp+var_10] sar rax, 20h mov cl, al mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rax], cl mov rax, [rbp+var_10] sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rax+1], cl mov rax, [rbp+var_10] sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rax+2], cl jmp short $+2 loc_E5E63D: mov rax, [rbp+var_18] mov rax, [rax+30h] add rax, 3 mov [rbp+var_28], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov ecx, eax mov rax, [rbp+var_28] mov [rax], ecx jmp short $+2 loc_E5E665: mov rax, [rbp+var_18] movzx eax, word ptr [rax+74h] and eax, 20h cmp eax, 0 jnz short loc_E5E682 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call link_to_changed_list loc_E5E682: jmp short $+2 loc_E5E684: jmp short $+2 loc_E5E686: jmp short $+2 loc_E5E688: add rsp, 30h pop rbp retn
long long check_and_set_lsn(long long a1, long long a2, long long a3) { long long result; // rax result = a2 - (*(unsigned int *)(*(_QWORD *)(a3 + 48) + 3LL) | ((unsigned long long)((*(unsigned __int8 *)(*(_QWORD *)(a3 + 48) + 2LL) << 16) | (unsigned int)**(unsigned __int16 **)(a3 + 48)) << 32)); if ( result > 0 ) { **(_WORD **)(a3 + 48) = WORD2(a2); *(_BYTE *)(*(_QWORD *)(a3 + 48) + 2LL) = BYTE6(a2); *(_DWORD *)(*(_QWORD *)(a3 + 48) + 3LL) = a2; result = *(_WORD *)(a3 + 116) & 0x20; if ( !(_DWORD)result ) return link_to_changed_list(a1, a3); } return result; }
do_shall_skip: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00e6c320 ADD RSP,0x10 POP RBP RET
/* Intvar_log_event::do_shall_skip(rpl_group_info*) */ void __thiscall Intvar_log_event::do_shall_skip(Intvar_log_event *this,rpl_group_info *param_1) { Log_event::continue_group((Log_event *)this,param_1); return; }
48,721
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); }
O0
c
my_wildcmp_8bit_impl: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x20(%rbp), %eax movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF leaq 0x3491a1(%rip), %rax # 0x38d768 cmpq $0x0, (%rax) je 0x445ed leaq 0x349194(%rip), %rax # 0x38d768 movq (%rax), %rax movl 0x20(%rbp), %edi callq *%rax cmpl $0x0, %eax je 0x445ed movl $0x1, -0x4(%rbp) jmp 0x4491a jmp 0x445ef movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x44902 jmp 0x445ff movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl 0x18(%rbp), %ecx movb %al, -0x41(%rbp) je 0x44620 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x4462c jmp 0x446d6 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl -0x34(%rbp), %eax jne 0x44652 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x44652 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x4469c movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rcx movq -0x18(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x18(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x446a8 movl $0x1, -0x4(%rbp) jmp 0x4491a movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x446ca movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x4491a movl $0x1, -0x38(%rbp) jmp 0x445ff movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x44744 jmp 0x446e4 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x446f9 movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4491a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x4472c movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax sete %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x446e4 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x44742 jmp 0x44902 jmp 0x44744 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x448fd movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x447b8 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x44778 jmp 0x447aa movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x447a8 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x4479a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4491a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x447aa jmp 0x447b8 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x44760 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x447ce movl $0x0, -0x4(%rbp) jmp 0x4491a movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x447e4 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4491a movq -0x28(%rbp), %rax movb (%rax), %al movb %al, -0x39(%rbp) movzbl %al, %eax cmpl -0x34(%rbp), %eax jne 0x44818 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x44818 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb 0x1(%rax), %al movb %al, -0x39(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movzbl -0x39(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x39(%rbp) jmp 0x44838 movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x43(%rbp) je 0x44866 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movzbl -0x39(%rbp), %ecx cmpl %ecx, %eax setne %al movb %al, -0x43(%rbp) movb -0x43(%rbp), %al testb $0x1, %al jne 0x4486f jmp 0x4487d movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x44838 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) cmpq -0x20(%rbp), %rax jne 0x4489b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4491a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl 0x20(%rbp), %eax addl $0x1, %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x44590 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x448e4 movl -0x40(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4491a jmp 0x448e6 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x44836 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4491a jmp 0x445ef movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rsi xorl %eax, %eax movl $0x1, %ecx cmpq %rsi, %rdx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_wildcmp_8bit_impl: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_10] mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov [rbp+var_38], 0FFFFFFFFh lea rax, my_string_stack_guard cmp qword ptr [rax], 0 jz short loc_445ED lea rax, my_string_stack_guard mov rax, [rax] mov edi, [rbp+arg_10] call rax cmp eax, 0 jz short loc_445ED mov [rbp+var_4], 1 jmp loc_4491A loc_445ED: jmp short $+2 loc_445EF: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz loc_44902 jmp short $+2 loc_445FF: mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, [rbp+arg_8] mov [rbp+var_41], al jz short loc_44620 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setnz al mov [rbp+var_41], al loc_44620: mov al, [rbp+var_41] test al, 1 jnz short loc_4462C jmp loc_446D6 loc_4462C: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+var_34] jnz short loc_44652 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_44652 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_44652: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_4469C mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov rcx, [rcx+58h] mov rdx, [rbp+var_18] mov rsi, rdx add rsi, 1 mov [rbp+var_18], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_446A8 loc_4469C: mov [rbp+var_4], 1 jmp loc_4491A loc_446A8: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_446CA mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_4491A loc_446CA: mov [rbp+var_38], 1 jmp loc_445FF loc_446D6: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_44744 jmp short $+2 loc_446E4: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_446F9 mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp loc_4491A loc_446F9: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rcx, [rbp+var_28] add rcx, 1 mov [rbp+var_28], rcx xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_42], al jnb short loc_4472C mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setz al mov [rbp+var_42], al loc_4472C: mov al, [rbp+var_42] test al, 1 jnz short loc_446E4 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_44742 jmp loc_44902 loc_44742: jmp short $+2 loc_44744: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz loc_448FD mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_44760: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz short loc_447B8 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz short loc_44778 jmp short loc_447AA loc_44778: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_447A8 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_4479A mov [rbp+var_4], 0FFFFFFFFh jmp loc_4491A loc_4479A: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_447AA loc_447A8: jmp short loc_447B8 loc_447AA: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_44760 loc_447B8: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_447CE mov [rbp+var_4], 0 jmp loc_4491A loc_447CE: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_447E4 mov [rbp+var_4], 0FFFFFFFFh jmp loc_4491A loc_447E4: mov rax, [rbp+var_28] mov al, [rax] mov [rbp+var_39], al movzx eax, al cmp eax, [rbp+var_34] jnz short loc_44818 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_44818 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov al, [rax+1] mov [rbp+var_39], al loc_44818: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+58h] movzx ecx, [rbp+var_39] mov al, [rax+rcx] mov [rbp+var_39], al loc_44836: jmp short $+2 loc_44838: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_43], al jz short loc_44866 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_39] cmp eax, ecx setnz al mov [rbp+var_43], al loc_44866: mov al, [rbp+var_43] test al, 1 jnz short loc_4486F jmp short loc_4487D loc_4486F: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_44838 loc_4487D: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx cmp rax, [rbp+var_20] jnz short loc_4489B mov [rbp+var_4], 0FFFFFFFFh jmp short loc_4491A loc_4489B: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov eax, [rbp+arg_10] add eax, 1 mov [rsp+60h+var_60], r11d mov [rsp+60h+var_58], r10d mov [rsp+60h+var_50], eax call my_wildcmp_8bit_impl mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_448E4 mov eax, [rbp+var_40] mov [rbp+var_4], eax jmp short loc_4491A loc_448E4: jmp short $+2 loc_448E6: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz loc_44836 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_4491A loc_448FD: jmp loc_445EF loc_44902: mov rdx, [rbp+var_18] mov rsi, [rbp+var_20] xor eax, eax mov ecx, 1 cmp rdx, rsi cmovnz eax, ecx mov [rbp+var_4], eax loc_4491A: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
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) { char *v9; // rcx unsigned __int8 *v10; // rdx char *v11; // rax unsigned __int8 *v12; // rax bool v14; // [rsp+1Dh] [rbp-43h] bool v15; // [rsp+1Eh] [rbp-42h] bool v16; // [rsp+1Fh] [rbp-41h] int v17; // [rsp+20h] [rbp-40h] unsigned __int8 v18; // [rsp+27h] [rbp-39h] unsigned __int8 v19; // [rsp+27h] [rbp-39h] unsigned int v20; // [rsp+28h] [rbp-38h] char *i; // [rsp+38h] [rbp-28h] int v25; // [rsp+38h] [rbp-28h] v20 = -1; if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) ) { return 1; } else { do { if ( a4 != a5 ) { while ( 1 ) { v16 = 0; if ( *a4 != a8 ) v16 = *a4 != a7; if ( !v16 ) break; if ( *a4 == a6 && a4 + 1 != a5 ) ++a4; if ( a2 == a3 ) return 1; v9 = a4++; v10 = a2++; if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*v9) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v10) ) return 1; if ( a4 == a5 ) return a2 != a3; v20 = 1; } if ( *a4 != a7 ) continue; do { if ( a2 == a3 ) return v20; ++a2; ++a4; v15 = 0; if ( a4 < a5 ) v15 = *a4 == a7; } while ( v15 ); if ( a4 != a5 ) continue; } return a2 != a3; } while ( *a4 != a8 ); for ( i = a4 + 1; i != a5; ++i ) { if ( *i != a8 ) { if ( *i != a7 ) break; if ( a2 == a3 ) return (unsigned int)-1; ++a2; } } if ( i == a5 ) { return 0; } else if ( a2 == a3 ) { return (unsigned int)-1; } else { v18 = *i; if ( (unsigned __int8)*i == a6 && i + 1 != a5 ) { v11 = i; LODWORD(i) = (_DWORD)i + 1; v18 = v11[1]; } v25 = (_DWORD)i + 1; v19 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v18); do { while ( 1 ) { v14 = 0; if ( a2 != a3 ) v14 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a2) != v19; if ( !v14 ) break; ++a2; } v12 = a2++; if ( v12 == a3 ) return (unsigned int)-1; v17 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)a3, v25, (_DWORD)a5, a6, a7, a8, a9 + 1); if ( v17 <= 0 ) return (unsigned int)v17; } while ( a2 != a3 ); return (unsigned int)-1; } } }
my_wildcmp_8bit_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x38],0xffffffff LEA RAX,[0x48d768] CMP qword ptr [RAX],0x0 JZ 0x001445ed LEA RAX,[0x48d768] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + 0x20] CALL RAX CMP EAX,0x0 JZ 0x001445ed MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014491a LAB_001445ed: JMP 0x001445ef LAB_001445ef: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00144902 JMP 0x001445ff LAB_001445ff: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RBP + 0x18] MOV byte ptr [RBP + -0x41],AL JZ 0x00144620 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_00144620: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0014462c JMP 0x001446d6 LAB_0014462c: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00144652 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00144652 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00144652: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0014469c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x58] MOV RDX,qword ptr [RBP + -0x18] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x18],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x001446a8 LAB_0014469c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014491a LAB_001446a8: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001446ca MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0014491a LAB_001446ca: MOV dword ptr [RBP + -0x38],0x1 JMP 0x001445ff LAB_001446d6: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00144744 JMP 0x001446e4 LAB_001446e4: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001446f9 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014491a LAB_001446f9: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x42],AL JNC 0x0014472c MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETZ AL MOV byte ptr [RBP + -0x42],AL LAB_0014472c: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x001446e4 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00144742 JMP 0x00144902 LAB_00144742: JMP 0x00144744 LAB_00144744: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x001448fd MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00144760: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x001447b8 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x00144778 JMP 0x001447aa LAB_00144778: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x001447a8 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0014479a MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014491a LAB_0014479a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001447aa LAB_001447a8: JMP 0x001447b8 LAB_001447aa: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00144760 LAB_001447b8: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001447ce MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014491a LAB_001447ce: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001447e4 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014491a LAB_001447e4: MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x39],AL MOVZX EAX,AL CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00144818 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00144818 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0x39],AL LAB_00144818: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBP + -0x39] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x39],AL LAB_00144836: JMP 0x00144838 LAB_00144838: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x43],AL JZ 0x00144866 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x39] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x43],AL LAB_00144866: MOV AL,byte ptr [RBP + -0x43] TEST AL,0x1 JNZ 0x0014486f JMP 0x0014487d LAB_0014486f: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00144838 LAB_0014487d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0014489b MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014491a LAB_0014489b: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] MOV R11D,dword ptr [RBP + 0x10] MOV R10D,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV dword ptr [RSP + 0x10],EAX CALL 0x00144590 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x001448e4 MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014491a LAB_001448e4: JMP 0x001448e6 LAB_001448e6: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00144836 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014491a LAB_001448fd: JMP 0x001445ef LAB_00144902: MOV RDX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ECX,0x1 CMP RDX,RSI CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0014491a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
uint my_wildcmp_8bit_impl (long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,uint param_6, int param_7,int param_8,int param_9) { char cVar1; int iVar2; uint uVar3; byte *pbVar4; bool bVar5; byte local_41; uint local_40; byte *local_30; byte *local_20; uint local_c; local_40 = 0xffffffff; local_30 = param_4; local_20 = param_2; if ((my_string_stack_guard == (code *)0x0) || (iVar2 = (*my_string_stack_guard)(param_9), iVar2 == 0)) { do { if (local_30 == param_5) { LAB_00144902: return (uint)(local_20 != param_3); } while( true ) { bVar5 = false; if ((char)*local_30 != param_8) { bVar5 = (char)*local_30 != param_7; } if (!bVar5) break; if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) { local_30 = local_30 + 1; } if (local_20 == param_3) { return 1; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_30) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20)) { return 1; } if (local_30 + 1 == param_5) { return (uint)(local_20 + 1 != param_3); } local_40 = 1; local_30 = local_30 + 1; local_20 = local_20 + 1; } if ((char)*local_30 == param_7) { do { if (local_20 == param_3) { return local_40; } local_20 = local_20 + 1; local_30 = local_30 + 1; bVar5 = false; if (local_30 < param_5) { bVar5 = (char)*local_30 == param_7; } } while (bVar5); if (local_30 == param_5) goto LAB_00144902; } } while ((char)*local_30 != param_8); while (pbVar4 = local_30, local_30 = pbVar4 + 1, local_30 != param_5) { if ((char)*local_30 != param_8) { if ((char)*local_30 != param_7) break; if (local_20 == param_3) { return 0xffffffff; } local_20 = local_20 + 1; } } if (local_30 == param_5) { local_c = 0; } else if (local_20 == param_3) { local_c = 0xffffffff; } else { local_41 = *local_30; if ((local_41 == param_6) && (pbVar4 + 2 != param_5)) { local_30 = pbVar4 + 2; local_41 = pbVar4[2]; } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)local_41); do { while( true ) { bVar5 = false; if (local_20 != param_3) { bVar5 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20) != cVar1; } if (!bVar5) break; local_20 = local_20 + 1; } pbVar4 = local_20 + 1; if (local_20 == param_3) { return 0xffffffff; } uVar3 = my_wildcmp_8bit_impl (param_1,pbVar4,param_3,local_30 + 1,param_5,param_6,param_7,param_8, param_9 + 1); if ((int)uVar3 < 1) { return uVar3; } local_20 = pbVar4; } while (pbVar4 != param_3); local_c = 0xffffffff; } } else { local_c = 1; } return local_c; }
48,722
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 0x334fb5(%rip), %rax # 0x36da10 movq (%rax), %rax testq %rax, %rax je 0x38a8e 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 0x38bb4 movl 0x18(%rbp), %r11d movl 0x10(%rbp), %r8d movl $0xffffffff, %r15d # imm = 0xFFFFFFFF cmpq %r12, %r13 je 0x38baa movb (%r13), %al movsbl %al, %ecx cmpl %r11d, %ecx sete %sil cmpl %r8d, %ecx sete %dl orb %dl, %sil je 0x38b0b testb %dl, %dl je 0x38b01 incq %r13 movq %r13, %rax cmpq %rbx, %r14 je 0x38bb4 movq %r14, %rcx movq %rax, %r13 cmpq %r12, %rax jae 0x38aee leaq 0x1(%rcx), %r14 movsbl (%r13), %edx leaq 0x1(%r13), %rax cmpl %r8d, %edx je 0x38ac8 incq %rcx cmpq %r12, %r13 je 0x38ba7 movb (%r13), %al movq %rcx, %r14 movsbl %al, %eax cmpl %r11d, %eax jne 0x38a9c jmp 0x38b6c movl $0x1, %r15d cmpq %rbx, %r14 je 0x38bb4 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 0x38bb4 incq %r14 incq %r13 cmpq %r12, %r13 je 0x38baa movb (%r13), %al movsbl %al, %ecx cmpl %r8d, %ecx sete %dl cmpl %r11d, %ecx je 0x38abe cmpl %r8d, %ecx jne 0x38b0b jmp 0x38abe leaq 0x1(%r13), %rax xorl %r15d, %r15d cmpq %r12, %rax je 0x38bb4 addq $0x2, %r13 movb -0x1(%r13), %al movsbl %al, %ecx cmpl %r11d, %ecx je 0x38b99 cmpl %r8d, %ecx jne 0x38bc6 cmpq %rbx, %r14 je 0x38c71 incq %r14 leaq 0x1(%r13), %rax cmpq %r12, %r13 movq %rax, %r13 jne 0x38b7c jmp 0x38bb4 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 0x38bb4 movzbl %al, %ecx leaq -0x1(%r13), %rdx cmpl %r9d, %ecx jne 0x38be9 cmpq %r12, %r13 je 0x38be9 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 0x38bb4 movq 0x58(%rdi), %rax movzbl (%r14), %ecx cmpb %r13b, (%rax,%rcx) je 0x38c17 incq %r14 cmpq %rbx, %r14 jne 0x38c03 jmp 0x38bb4 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 0x38a33 addq $0x20, %rsp testl %eax, %eax jle 0x38c7c 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 0x38bfa jmp 0x38bb4 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF jmp 0x38bb4 movl %eax, %r15d jmp 0x38bb4
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_38A8E 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_38BB4 loc_38A8E: mov r11d, [rbp+arg_8] mov r8d, [rbp+arg_0] mov r15d, 0FFFFFFFFh loc_38A9C: cmp r13, r12 jz loc_38BAA mov al, [r13+0] movsx ecx, al cmp ecx, r11d setz sil cmp ecx, r8d setz dl or sil, dl jz short loc_38B0B loc_38ABE: test dl, dl jz short loc_38B01 inc r13 mov rax, r13 loc_38AC8: cmp r14, rbx jz loc_38BB4 mov rcx, r14 mov r13, rax cmp rax, r12 jnb short loc_38AEE lea r14, [rcx+1] movsx edx, byte ptr [r13+0] lea rax, [r13+1] cmp edx, r8d jz short loc_38AC8 loc_38AEE: inc rcx cmp r13, r12 jz loc_38BA7 mov al, [r13+0] mov r14, rcx loc_38B01: movsx eax, al cmp eax, r11d jnz short loc_38A9C jmp short loc_38B6C loc_38B0B: mov r15d, 1 cmp r14, rbx jz loc_38BB4 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_38BB4 inc r14 inc r13 cmp r13, r12 jz short loc_38BAA mov al, [r13+0] movsx ecx, al cmp ecx, r8d setz dl cmp ecx, r11d jz loc_38ABE cmp ecx, r8d jnz short loc_38B0B jmp loc_38ABE loc_38B6C: lea rax, [r13+1] xor r15d, r15d cmp rax, r12 jz short loc_38BB4 add r13, 2 loc_38B7C: mov al, [r13-1] movsx ecx, al cmp ecx, r11d jz short loc_38B99 cmp ecx, r8d jnz short loc_38BC6 cmp r14, rbx jz loc_38C71 inc r14 loc_38B99: lea rax, [r13+1] cmp r13, r12 mov r13, rax jnz short loc_38B7C jmp short loc_38BB4 loc_38BA7: mov r14, rcx loc_38BAA: xor r15d, r15d cmp r14, rbx setnz r15b loc_38BB4: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_38BC6: mov r15d, 0FFFFFFFFh cmp r14, rbx jz short loc_38BB4 movzx ecx, al lea rdx, [r13-1] cmp ecx, r9d jnz short loc_38BE9 cmp r13, r12 jz short loc_38BE9 mov al, [r13+0] mov rdx, r13 loc_38BE9: inc rdx mov rcx, [rdi+58h] movzx eax, al mov r13b, [rcx+rax] inc r10d loc_38BFA: cmp r14, rbx jz short loc_38BB4 mov rax, [rdi+58h] loc_38C03: movzx ecx, byte ptr [r14] cmp [rax+rcx], r13b jz short loc_38C17 inc r14 cmp r14, rbx jnz short loc_38C03 jmp short loc_38BB4 loc_38C17: 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_38C7C 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_38BFA jmp loc_38BB4 loc_38C71: mov r15d, 0FFFFFFFFh jmp loc_38BB4 loc_38C7C: mov r15d, eax jmp loc_38BB4
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,[0x46da10] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00138a8e 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 0x00138bb4 LAB_00138a8e: MOV R11D,dword ptr [RBP + 0x18] MOV R8D,dword ptr [RBP + 0x10] MOV R15D,0xffffffff LAB_00138a9c: CMP R13,R12 JZ 0x00138baa MOV AL,byte ptr [R13] MOVSX ECX,AL CMP ECX,R11D SETZ SIL CMP ECX,R8D SETZ DL OR SIL,DL JZ 0x00138b0b LAB_00138abe: TEST DL,DL JZ 0x00138b01 INC R13 MOV RAX,R13 LAB_00138ac8: CMP R14,RBX JZ 0x00138bb4 MOV RCX,R14 MOV R13,RAX CMP RAX,R12 JNC 0x00138aee LEA R14,[RCX + 0x1] MOVSX EDX,byte ptr [R13] LEA RAX,[R13 + 0x1] CMP EDX,R8D JZ 0x00138ac8 LAB_00138aee: INC RCX CMP R13,R12 JZ 0x00138ba7 MOV AL,byte ptr [R13] MOV R14,RCX LAB_00138b01: MOVSX EAX,AL CMP EAX,R11D JNZ 0x00138a9c JMP 0x00138b6c LAB_00138b0b: MOV R15D,0x1 CMP R14,RBX JZ 0x00138bb4 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 0x00138bb4 INC R14 INC R13 CMP R13,R12 JZ 0x00138baa MOV AL,byte ptr [R13] MOVSX ECX,AL CMP ECX,R8D SETZ DL CMP ECX,R11D JZ 0x00138abe CMP ECX,R8D JNZ 0x00138b0b JMP 0x00138abe LAB_00138b6c: LEA RAX,[R13 + 0x1] XOR R15D,R15D CMP RAX,R12 JZ 0x00138bb4 ADD R13,0x2 LAB_00138b7c: MOV AL,byte ptr [R13 + -0x1] MOVSX ECX,AL CMP ECX,R11D JZ 0x00138b99 CMP ECX,R8D JNZ 0x00138bc6 CMP R14,RBX JZ 0x00138c71 INC R14 LAB_00138b99: LEA RAX,[R13 + 0x1] CMP R13,R12 MOV R13,RAX JNZ 0x00138b7c JMP 0x00138bb4 LAB_00138ba7: MOV R14,RCX LAB_00138baa: XOR R15D,R15D CMP R14,RBX SETNZ R15B LAB_00138bb4: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00138bc6: MOV R15D,0xffffffff CMP R14,RBX JZ 0x00138bb4 MOVZX ECX,AL LEA RDX,[R13 + -0x1] CMP ECX,R9D JNZ 0x00138be9 CMP R13,R12 JZ 0x00138be9 MOV AL,byte ptr [R13] MOV RDX,R13 LAB_00138be9: INC RDX MOV RCX,qword ptr [RDI + 0x58] MOVZX EAX,AL MOV R13B,byte ptr [RCX + RAX*0x1] INC R10D LAB_00138bfa: CMP R14,RBX JZ 0x00138bb4 MOV RAX,qword ptr [RDI + 0x58] LAB_00138c03: MOVZX ECX,byte ptr [R14] CMP byte ptr [RAX + RCX*0x1],R13B JZ 0x00138c17 INC R14 CMP R14,RBX JNZ 0x00138c03 JMP 0x00138bb4 LAB_00138c17: 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 0x00138a33 ADD RSP,0x20 TEST EAX,EAX JLE 0x00138c7c 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 0x00138bfa JMP 0x00138bb4 LAB_00138c71: MOV R15D,0xffffffff JMP 0x00138bb4 LAB_00138c7c: MOV R15D,EAX JMP 0x00138bb4
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_00138baa; 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_00138baa: return (uint)(param_2 != param_3); }
48,723
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O1
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x38(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x60d22(%rip), %rsi # 0xbd5fd leaq 0x60d21(%rip), %rdx # 0xbd603 leaq 0x28(%rsp), %rdi callq 0x32ea4 leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x60d03(%rip), %rsi # 0xbd604 leaq 0x60d17(%rip), %rdx # 0xbd61f callq 0x32ea4 leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x59300(%rip), %rdx # 0xb5c3c movq %rdx, %rsi callq 0x32ea4 leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x60c28(%rip), %rsi # 0xbd587 leaq 0x60c25(%rip), %rdx # 0xbd58b movq %r14, %rdi callq 0x32ea4 leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x60c97(%rip), %rsi # 0xbd620 leaq 0x60c95(%rip), %rdx # 0xbd625 callq 0x32ea4 leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x59275(%rip), %rdx # 0xb5c3c movq %rdx, %rsi callq 0x32ea4 leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x60c2c(%rip), %rsi # 0xbd616 leaq 0x60c2e(%rip), %rdx # 0xbd61f movq %r14, %rdi callq 0x32ea4 leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x60c12(%rip), %rsi # 0xbd626 leaq 0x60c13(%rip), %rdx # 0xbd62e callq 0x32ea4 leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x591ea(%rip), %rdx # 0xb5c3c movq %rdx, %rsi callq 0x32ea4 leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x60b12(%rip), %rsi # 0xbd587 leaq 0x60b0f(%rip), %rdx # 0xbd58b movq %r14, %rdi callq 0x32ea4 leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x60b90(%rip), %rsi # 0xbd62f leaq 0x60b95(%rip), %rdx # 0xbd63b callq 0x32ea4 leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x5915f(%rip), %rdx # 0xb5c3c movq %rdx, %rsi callq 0x32ea4 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xf(%rsp), %rcx movl $0x4, %edx callq 0x64c5e movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x5cb20 movq (%rax), %rsi incq %rsi callq 0x196b0 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x64c2e movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x5cb4c movq (%rax), %rsi incq %rsi callq 0x196b0 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x5cb68 movq (%rax), %rsi incq %rsi callq 0x196b0 addq $-0x78, %r14 jne 0x5cb04 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x5beff leaq 0x10(%rsp), %rdi callq 0x64bfe movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x64bfe jmp 0x5cdac movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x64ca6 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x5cbc0 xorl %ebp, %ebp jmp 0x5cc0e movq %rax, %r15 movq %r13, %rdi callq 0x64c2e movq 0x1b0(%rsp), %rdi movb $0x1, %bpl cmpq %rbx, %rdi je 0x5cc0e movq 0x1c0(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cc0e movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x5cc40 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x5cc40 movq 0x1a0(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cc40 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x5cc7b movq %rax, %r15 movq %r13, %rdi callq 0x64c2e movq 0x138(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x5cc78 movq 0x148(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cc78 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x5ccad movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x5ccad movq 0x128(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5ccad movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x5cce8 movq %rax, %r15 movq %r13, %rdi callq 0x64c2e movq 0xc0(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x5cce5 movq 0xd0(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cce5 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x5cd1a movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x5cd1a movq 0xb0(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cd1a movq %rax, %r15 movb $0x1, %bpl xorl %ebx, %ebx testb %bl, %bl je 0x5cd82 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x5cd82 movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cd82 movq %rax, %r15 movq %r14, %rdi callq 0x64c2e leaq 0x28(%rsp), %r14 movq 0x20(%r14), %rdi movb $0x1, %bl cmpq %r13, %rdi je 0x5cd72 movq 0x58(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5cd72 movq %rax, %r15 movb $0x1, %bl leaq 0x28(%rsp), %r14 movb $0x1, %bpl jmp 0x5cd1c movq %rax, %r15 movb $0x1, %bpl leaq 0x28(%rsp), %r14 leaq 0x28(%rsp), %rax cmpq %r14, %rax sete %al xorb $0x1, %bpl orb %al, %bpl jne 0x5cdac leaq 0x28(%rsp), %rbx addq $-0x78, %r14 movq %r14, %rdi callq 0x64ca6 cmpq %rbx, %r14 jne 0x5cd9b movq %r15, %rdi callq 0x19be0
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r12, rsi mov r15, rdi lea rax, [rsp+238h+var_200] mov [rax-10h], rax lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rdi, [rsp+238h+var_210] 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) lea rdi, [rsp+238h+var_1F0] lea r13, [rsp+238h+var_1E0] mov [r13-10h], r13 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" 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) lea r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aNoteDebugGramm+0CAh; "" mov rsi, rdx 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) lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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) lea rdi, [rsp+238h+var_178] lea rbx, [rsp+238h+var_168] mov [rbx-10h], rbx lea rsi, aHello; "Hello" lea rdx, aHello+5; "" 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) lea r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aNoteDebugGramm+0CAh; "" mov rsi, rdx 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) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 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) lea rdi, [rsp+238h+var_100] lea rbx, [rsp+238h+var_F0] mov [rbx-10h], rbx lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" 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) lea r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aNoteDebugGramm+0CAh; "" mov rsi, rdx 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) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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) lea rdi, [rsp+238h+var_88] lea rbx, [rsp+238h+var_78] mov [rbx-10h], rbx lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" 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) lea r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aNoteDebugGramm+0CAh; "" mov rsi, rdx 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) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_229] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_5CB04: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_5CB20 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5CB20: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_5CB4C mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5CB4C: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_5CB68 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5CB68: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_5CB04 movzx r8d, bpl lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_5CDAC mov r15, rax mov ebx, 168h loc_5CBC0: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_5CBC0 xor ebp, ebp jmp short loc_5CC0E mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * mov bpl, 1 cmp rdi, rbx jz short loc_5CC0E mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CC0E mov r15, rax mov bpl, 1 loc_5CC0E: test bpl, bpl jz short loc_5CC40 mov rdi, [rsp+arg_188]; void * lea rax, [rsp+arg_198] cmp rdi, rax jz short loc_5CC40 mov rsi, [rsp+arg_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CC40 mov r15, rax mov bpl, 1 loc_5CC40: xor r12d, r12d jmp short loc_5CC7B mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * mov r12b, 1 cmp rdi, rbx jz short loc_5CC78 mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CC78 mov r15, rax mov r12b, 1 loc_5CC78: mov bpl, 1 loc_5CC7B: test r12b, r12b jz short loc_5CCAD mov rdi, [rsp+arg_110]; void * lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_5CCAD mov rsi, [rsp+arg_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CCAD mov r15, rax mov bpl, 1 loc_5CCAD: xor r12d, r12d jmp short loc_5CCE8 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * mov r12b, 1 cmp rdi, rbx jz short loc_5CCE5 mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CCE5 mov r15, rax mov r12b, 1 loc_5CCE5: mov bpl, 1 loc_5CCE8: test r12b, r12b jz short loc_5CD1A mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_5CD1A mov rsi, [rsp+arg_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CD1A mov r15, rax mov bpl, 1 loc_5CD1A: xor ebx, ebx loc_5CD1C: test bl, bl jz short loc_5CD82 mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_5CD82 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CD82 mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() lea r14, [rsp+arg_20] mov rdi, [r14+20h]; void * mov bl, 1 cmp rdi, r13 jz short loc_5CD72 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5CD72 mov r15, rax mov bl, 1 lea r14, [rsp+arg_20] loc_5CD72: mov bpl, 1 jmp short loc_5CD1C mov r15, rax mov bpl, 1 lea r14, [rsp+arg_20] loc_5CD82: lea rax, [rsp+arg_20] cmp rax, r14 setz al xor bpl, 1 or bpl, al jnz short loc_5CDAC lea rbx, [rsp+arg_20] loc_5CD9B: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_5CD9B loc_5CDAC: mov rdi, r15 call __Unwind_Resume
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[15]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Fh] [rbp-229h] BYREF long long v14[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-210h] BYREF char v16; // [rsp+38h] [rbp-200h] BYREF char *v17; // [rsp+48h] [rbp-1F0h] BYREF char v18; // [rsp+58h] [rbp-1E0h] BYREF __int128 v19; // [rsp+68h] [rbp-1D0h] long long v20; // [rsp+78h] [rbp-1C0h] char *v21; // [rsp+80h] [rbp-1B8h] BYREF char v22; // [rsp+90h] [rbp-1A8h] BYREF char *v23; // [rsp+A0h] [rbp-198h] BYREF char v24; // [rsp+B0h] [rbp-188h] BYREF char *v25; // [rsp+C0h] [rbp-178h] BYREF char v26; // [rsp+D0h] [rbp-168h] BYREF __int128 v27; // [rsp+E0h] [rbp-158h] long long v28; // [rsp+F0h] [rbp-148h] char *v29; // [rsp+F8h] [rbp-140h] BYREF char v30; // [rsp+108h] [rbp-130h] BYREF char *v31; // [rsp+118h] [rbp-120h] BYREF char v32; // [rsp+128h] [rbp-110h] BYREF char *v33; // [rsp+138h] [rbp-100h] BYREF char v34; // [rsp+148h] [rbp-F0h] BYREF __int128 v35; // [rsp+158h] [rbp-E0h] long long v36; // [rsp+168h] [rbp-D0h] char *v37; // [rsp+170h] [rbp-C8h] BYREF char v38; // [rsp+180h] [rbp-B8h] BYREF char *v39; // [rsp+190h] [rbp-A8h] BYREF char v40; // [rsp+1A0h] [rbp-98h] BYREF char *v41; // [rsp+1B0h] [rbp-88h] BYREF char v42; // [rsp+1C0h] [rbp-78h] BYREF __int128 v43; // [rsp+1D0h] [rbp-68h] long long v44; // [rsp+1E0h] [rbp-58h] char *v45; // [rsp+1E8h] [rbp-50h] BYREF char v46; // [rsp+1F8h] [rbp-40h] BYREF v15[0] = &v16; std::string::_M_construct<char const*>(v15, "system", (long long)""); v17 = &v18; std::string::_M_construct<char const*>(&v17, "You are a helpful assistant", (long long)""); v19 = 0LL; v20 = 0LL; v21 = &v22; std::string::_M_construct<char const*>(&v21, "", (long long)""); v23 = &v24; std::string::_M_construct<char const*>(&v23, "user", (long long)""); v25 = &v26; std::string::_M_construct<char const*>(&v25, "Hello", (long long)""); v27 = 0LL; v28 = 0LL; v29 = &v30; std::string::_M_construct<char const*>(&v29, "", (long long)""); v31 = &v32; std::string::_M_construct<char const*>(&v31, "assistant", (long long)""); v33 = &v34; std::string::_M_construct<char const*>(&v33, "Hi there", (long long)""); v35 = 0LL; v36 = 0LL; v37 = &v38; std::string::_M_construct<char const*>(&v37, "", (long long)""); v39 = &v40; std::string::_M_construct<char const*>(&v39, "user", (long long)""); v41 = &v42; std::string::_M_construct<char const*>(&v41, "How are you?", (long long)""); v43 = 0LL; v44 = 0LL; v45 = &v46; std::string::_M_construct<char const*>(&v45, "", (long long)""); std::vector<common_chat_msg>::vector(v14, v15, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v14[v5 / 8 + 1] != v6 ) operator delete(v6, v14[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v14, 1u, a3); std::vector<common_chat_msg>::~vector(v14); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R12,RSI MOV R15,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX + -0x10],RAX LAB_0015c8d4: LEA RSI,[0x1bd5fd] LEA RDX,[0x1bd603] LEA RDI,[RSP + 0x28] CALL 0x00132ea4 LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 LAB_0015c8fa: LEA RSI,[0x1bd604] LEA RDX,[0x1bd61f] CALL 0x00132ea4 LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0015c935: LEA RDX,[0x1b5c3c] MOV RSI,RDX CALL 0x00132ea4 LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_0015c958: LEA RSI,[0x1bd587] LEA RDX,[0x1bd58b] MOV RDI,R14 CALL 0x00132ea4 LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xd0] MOV qword ptr [RBX + -0x10],RBX LAB_0015c982: LEA RSI,[0x1bd620] LEA RDX,[0x1bd625] CALL 0x00132ea4 LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0015c9c0: LEA RDX,[0x1b5c3c] MOV RSI,RDX CALL 0x00132ea4 LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_0015c9e3: LEA RSI,[0x1bd616] LEA RDX,[0x1bd61f] MOV RDI,R14 CALL 0x00132ea4 LEA RDI,[RSP + 0x138] LEA RBX,[RSP + 0x148] MOV qword ptr [RBX + -0x10],RBX LAB_0015ca0d: LEA RSI,[0x1bd626] LEA RDX,[0x1bd62e] CALL 0x00132ea4 LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0015ca4b: LEA RDX,[0x1b5c3c] MOV RSI,RDX CALL 0x00132ea4 LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_0015ca6e: LEA RSI,[0x1bd587] LEA RDX,[0x1bd58b] MOV RDI,R14 CALL 0x00132ea4 LEA RDI,[RSP + 0x1b0] LEA RBX,[RSP + 0x1c0] MOV qword ptr [RBX + -0x10],RBX LAB_0015ca98: LEA RSI,[0x1bd62f] LEA RDX,[0x1bd63b] CALL 0x00132ea4 LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0015cad6: LEA RDX,[0x1b5c3c] MOV RSI,RDX CALL 0x00132ea4 LAB_0015cae5: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xf] MOV EDX,0x4 CALL 0x00164c5e MOV R14D,0x1e0 LAB_0015cb04: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0015cb20 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001196b0 LAB_0015cb20: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x00164c2e MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x0015cb4c MOV RSI,qword ptr [RAX] INC RSI CALL 0x001196b0 LAB_0015cb4c: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0015cb68 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001196b0 LAB_0015cb68: ADD R14,-0x78 JNZ 0x0015cb04 LAB_0015cb6e: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x0015beff LAB_0015cb87: LEA RDI,[RSP + 0x10] CALL 0x00164bfe MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 0015c8d4 to 0015c8eb has its CatchHandler @ 0015cd77 */ uStack_240 = 0x15c8ec; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 0015c8fa to 0015c90c has its CatchHandler @ 0015cd68 */ uStack_240 = 0x15c90d; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 0015c935 to 0015c943 has its CatchHandler @ 0015cd3e */ uStack_240 = 0x15c944; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 0015c958 to 0015c96d has its CatchHandler @ 0015cd14 */ uStack_240 = 0x15c96e; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001bd587,&DAT_001bd58b); local_178[0] = local_168; /* try { // try from 0015c982 to 0015c994 has its CatchHandler @ 0015ccdf */ uStack_240 = 0x15c995; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 0015c9c0 to 0015c9ce has its CatchHandler @ 0015ccb2 */ uStack_240 = 0x15c9cf; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 0015c9e3 to 0015c9f8 has its CatchHandler @ 0015cca7 */ uStack_240 = 0x15c9f9; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 0015ca0d to 0015ca1f has its CatchHandler @ 0015cc72 */ uStack_240 = 0x15ca20; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 0015ca4b to 0015ca59 has its CatchHandler @ 0015cc45 */ uStack_240 = 0x15ca5a; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 0015ca6e to 0015ca83 has its CatchHandler @ 0015cc3a */ uStack_240 = 0x15ca84; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001bd587,&DAT_001bd58b); local_88[0] = local_78; /* try { // try from 0015ca98 to 0015caaa has its CatchHandler @ 0015cc08 */ uStack_240 = 0x15caab; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 0015cad6 to 0015cae4 has its CatchHandler @ 0015cbdb */ uStack_240 = 0x15cae5; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 0015cae5 to 0015cafd has its CatchHandler @ 0015cbb8 */ uStack_240 = 0x15cafe; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 7); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x15cb20; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x15cb30; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x15cb4c; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x15cb68; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 0015cb6e to 0015cb86 has its CatchHandler @ 0015cba6 */ uStack_240 = 0x15cb87; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x15cb91; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
48,724
JS_ReadFunctionBytecode
bluesky950520[P]quickjs/quickjs.c
static int JS_ReadFunctionBytecode(BCReaderState *s, JSFunctionBytecode *b, int byte_code_offset, uint32_t bc_len) { uint8_t *bc_buf; int pos, len, op; JSAtom atom; uint32_t idx; bc_buf = (uint8_t*)b + byte_code_offset; if (bc_get_buf(s, bc_buf, bc_len)) return -1; b->byte_code_buf = bc_buf; if (is_be()) bc_byte_swap(bc_buf, bc_len); pos = 0; while (pos < bc_len) { op = bc_buf[pos]; len = short_opcode_info(op).size; switch(short_opcode_info(op).fmt) { case OP_FMT_atom: case OP_FMT_atom_u8: case OP_FMT_atom_u16: case OP_FMT_atom_label_u8: case OP_FMT_atom_label_u16: idx = get_u32(bc_buf + pos + 1); if (bc_idx_to_atom(s, &atom, idx)) { /* Note: the atoms will be freed up to this position */ b->byte_code_len = pos; return -1; } put_u32(bc_buf + pos + 1, atom); break; default: assert(!is_ic_op(op)); // should not end up in serialized bytecode break; } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { const uint8_t *save_ptr = s->ptr; s->ptr = s->ptr_last + len; s->level -= 4; bc_read_trace(s, "%s", ""); // hex dump + indent dump_single_byte_code(s->ctx, bc_buf + pos, b, s->ptr - s->buf_start - len); s->level += 4; s->ptr = save_ptr; } #endif pos += len; } return 0; }
O0
c
JS_ReadFunctionBytecode: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl %edx, 0x2c(%rsp) movl %ecx, 0x28(%rsp) movq 0x30(%rsp), %rax movslq 0x2c(%rsp), %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x38(%rsp), %rdi movq 0x20(%rsp), %rsi movl 0x28(%rsp), %edx callq 0x7d270 cmpl $0x0, %eax je 0x7d11d movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x7d25a movq 0x20(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x20(%rax) callq 0x2cc60 cmpb $0x0, %al je 0x7d142 movq 0x20(%rsp), %rdi movl 0x28(%rsp), %esi callq 0x79aa0 movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x28(%rsp), %eax jae 0x7d252 movq 0x20(%rsp), %rax movslq 0x1c(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, 0x14(%rsp) cmpl $0xb3, 0x14(%rsp) jl 0x7d181 movl 0x14(%rsp), %eax addl $0x12, %eax movl %eax, 0x8(%rsp) jmp 0x7d189 movl 0x14(%rsp), %eax movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax movslq %eax, %rcx leaq 0x900c9(%rip), %rax # 0x10d260 movzbl (%rax,%rcx,4), %eax movl %eax, 0x18(%rsp) cmpl $0xb3, 0x14(%rsp) jl 0x7d1b6 movl 0x14(%rsp), %eax addl $0x12, %eax movl %eax, 0x4(%rsp) jmp 0x7d1be movl 0x14(%rsp), %eax movl %eax, 0x4(%rsp) movl 0x4(%rsp), %eax movslq %eax, %rcx leaq 0x90094(%rip), %rax # 0x10d260 movzbl 0x3(%rax,%rcx,4), %eax addl $-0x18, %eax subl $0x4, %eax ja 0x7d23f jmp 0x7d1db movq 0x20(%rsp), %rdi movslq 0x1c(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi callq 0x5f1b0 movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rdi movl 0xc(%rsp), %edx leaq 0x10(%rsp), %rsi callq 0x7d330 cmpl $0x0, %eax je 0x7d223 movl 0x1c(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, 0x28(%rax) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x7d25a movq 0x20(%rsp), %rdi movslq 0x1c(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi movl 0x10(%rsp), %esi callq 0x68270 jmp 0x7d241 jmp 0x7d241 movl 0x18(%rsp), %eax addl 0x1c(%rsp), %eax movl %eax, 0x1c(%rsp) jmp 0x7d14a movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
JS_ReadFunctionBytecode: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_1C], edx mov [rsp+48h+var_20], ecx mov rax, [rsp+48h+var_18] movsxd rcx, [rsp+48h+var_1C] add rax, rcx mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_28] mov edx, [rsp+48h+var_20] call bc_get_buf cmp eax, 0 jz short loc_7D11D mov [rsp+48h+var_4], 0FFFFFFFFh jmp loc_7D25A loc_7D11D: mov rcx, [rsp+48h+var_28] mov rax, [rsp+48h+var_18] mov [rax+20h], rcx call is_be_0 cmp al, 0 jz short loc_7D142 mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_20] call bc_byte_swap loc_7D142: mov [rsp+48h+var_2C], 0 loc_7D14A: mov eax, [rsp+48h+var_2C] cmp eax, [rsp+48h+var_20] jnb loc_7D252 mov rax, [rsp+48h+var_28] movsxd rcx, [rsp+48h+var_2C] movzx eax, byte ptr [rax+rcx] mov [rsp+48h+var_34], eax cmp [rsp+48h+var_34], 0B3h jl short loc_7D181 mov eax, [rsp+48h+var_34] add eax, 12h mov [rsp+48h+var_40], eax jmp short loc_7D189 loc_7D181: mov eax, [rsp+48h+var_34] mov [rsp+48h+var_40], eax loc_7D189: mov eax, [rsp+48h+var_40] movsxd rcx, eax lea rax, opcode_info movzx eax, byte ptr [rax+rcx*4] mov [rsp+48h+var_30], eax cmp [rsp+48h+var_34], 0B3h jl short loc_7D1B6 mov eax, [rsp+48h+var_34] add eax, 12h mov [rsp+48h+var_44], eax jmp short loc_7D1BE loc_7D1B6: mov eax, [rsp+48h+var_34] mov [rsp+48h+var_44], eax loc_7D1BE: mov eax, [rsp+48h+var_44] movsxd rcx, eax lea rax, opcode_info movzx eax, byte ptr [rax+rcx*4+3] add eax, 0FFFFFFE8h sub eax, 4 ja short loc_7D23F jmp short $+2 loc_7D1DB: mov rdi, [rsp+48h+var_28] movsxd rax, [rsp+48h+var_2C] add rdi, rax add rdi, 1 call get_u32 mov [rsp+48h+var_3C], eax mov rdi, [rsp+48h+var_10] mov edx, [rsp+48h+var_3C] lea rsi, [rsp+48h+var_38] call bc_idx_to_atom cmp eax, 0 jz short loc_7D223 mov ecx, [rsp+48h+var_2C] mov rax, [rsp+48h+var_18] mov [rax+28h], ecx mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_7D25A loc_7D223: mov rdi, [rsp+48h+var_28] movsxd rax, [rsp+48h+var_2C] add rdi, rax add rdi, 1 mov esi, [rsp+48h+var_38] call put_u32 jmp short loc_7D241 loc_7D23F: jmp short $+2 loc_7D241: mov eax, [rsp+48h+var_30] add eax, [rsp+48h+var_2C] mov [rsp+48h+var_2C], eax jmp loc_7D14A loc_7D252: mov [rsp+48h+var_4], 0 loc_7D25A: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long JS_ReadFunctionBytecode(long long a1, long long a2, int a3, unsigned int a4) { int v5; // [rsp+4h] [rbp-44h] int v6; // [rsp+8h] [rbp-40h] unsigned int u32; // [rsp+Ch] [rbp-3Ch] int v8; // [rsp+10h] [rbp-38h] BYREF int v9; // [rsp+14h] [rbp-34h] int v10; // [rsp+18h] [rbp-30h] signed int i; // [rsp+1Ch] [rbp-2Ch] long long v12; // [rsp+20h] [rbp-28h] unsigned int v13; // [rsp+28h] [rbp-20h] int v14; // [rsp+2Ch] [rbp-1Ch] long long v15; // [rsp+30h] [rbp-18h] long long v16; // [rsp+38h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a3 + a2; if ( (unsigned int)bc_get_buf(a1, v12, a4) ) { return (unsigned int)-1; } else { *(_QWORD *)(v15 + 32) = v12; if ( is_be_0() ) bc_byte_swap(v12, v13); for ( i = 0; i < v13; i += v10 ) { v9 = *(unsigned __int8 *)(v12 + i); if ( v9 < 179 ) v6 = v9; else v6 = v9 + 18; v10 = opcode_info[4 * v6]; if ( v9 < 179 ) v5 = v9; else v5 = v9 + 18; if ( (unsigned int)opcode_info[4 * v5 + 3] - 24 <= 4 ) { u32 = get_u32((unsigned int *)(i + v12 + 1)); if ( (unsigned int)bc_idx_to_atom(v16, &v8, u32) ) { *(_DWORD *)(v15 + 40) = i; return (unsigned int)-1; } put_u32((_DWORD *)(i + v12 + 1), v8); } } return 0; } }
JS_ReadFunctionBytecode: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV dword ptr [RSP + 0x2c],EDX MOV dword ptr [RSP + 0x28],ECX MOV RAX,qword ptr [RSP + 0x30] MOVSXD RCX,dword ptr [RSP + 0x2c] ADD RAX,RCX MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RSP + 0x28] CALL 0x0017d270 CMP EAX,0x0 JZ 0x0017d11d MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0017d25a LAB_0017d11d: MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x20],RCX CALL 0x0012cc60 CMP AL,0x0 JZ 0x0017d142 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x28] CALL 0x00179aa0 LAB_0017d142: MOV dword ptr [RSP + 0x1c],0x0 LAB_0017d14a: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x28] JNC 0x0017d252 MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0x1c] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x14],0xb3 JL 0x0017d181 MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x12 MOV dword ptr [RSP + 0x8],EAX JMP 0x0017d189 LAB_0017d181: MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x8],EAX LAB_0017d189: MOV EAX,dword ptr [RSP + 0x8] MOVSXD RCX,EAX LEA RAX,[0x20d260] MOVZX EAX,byte ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x18],EAX CMP dword ptr [RSP + 0x14],0xb3 JL 0x0017d1b6 MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x12 MOV dword ptr [RSP + 0x4],EAX JMP 0x0017d1be LAB_0017d1b6: MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x4],EAX LAB_0017d1be: MOV EAX,dword ptr [RSP + 0x4] MOVSXD RCX,EAX LEA RAX,[0x20d260] MOVZX EAX,byte ptr [RAX + RCX*0x4 + 0x3] ADD EAX,-0x18 SUB EAX,0x4 JA 0x0017d23f JMP 0x0017d1db LAB_0017d1db: MOV RDI,qword ptr [RSP + 0x20] MOVSXD RAX,dword ptr [RSP + 0x1c] ADD RDI,RAX ADD RDI,0x1 CALL 0x0015f1b0 MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x38] MOV EDX,dword ptr [RSP + 0xc] LEA RSI,[RSP + 0x10] CALL 0x0017d330 CMP EAX,0x0 JZ 0x0017d223 MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x28],ECX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0017d25a LAB_0017d223: MOV RDI,qword ptr [RSP + 0x20] MOVSXD RAX,dword ptr [RSP + 0x1c] ADD RDI,RAX ADD RDI,0x1 MOV ESI,dword ptr [RSP + 0x10] CALL 0x00168270 JMP 0x0017d241 LAB_0017d23f: JMP 0x0017d241 LAB_0017d241: MOV EAX,dword ptr [RSP + 0x18] ADD EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x1c],EAX JMP 0x0017d14a LAB_0017d252: MOV dword ptr [RSP + 0x44],0x0 LAB_0017d25a: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 JS_ReadFunctionBytecode(int8 param_1,long param_2,int param_3,uint param_4) { char cVar1; int iVar2; int4 uVar3; uint local_44; uint local_40; int4 local_38; uint local_34; uint local_30; uint local_2c; long local_28; uint local_20; int local_1c; long local_18; int8 local_10; int4 local_4; local_28 = param_2 + param_3; local_20 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; iVar2 = bc_get_buf(param_1,local_28,param_4); if (iVar2 == 0) { *(long *)(local_18 + 0x20) = local_28; cVar1 = is_be(); if (cVar1 != '\0') { bc_byte_swap(local_28,local_20); } for (local_2c = 0; local_2c < local_20; local_2c = local_30 + local_2c) { local_34 = (uint)*(byte *)(local_28 + (int)local_2c); local_40 = local_34; if (0xb2 < local_34) { local_40 = local_34 + 0x12; } local_30 = (uint)(byte)opcode_info[(long)(int)local_40 * 4]; local_44 = local_34; if (0xb2 < local_34) { local_44 = local_34 + 0x12; } if ((byte)opcode_info[(long)(int)local_44 * 4 + 3] - 0x18 < 5) { uVar3 = get_u32(local_28 + (int)local_2c + 1); iVar2 = bc_idx_to_atom(local_10,&local_38,uVar3); if (iVar2 != 0) { *(uint *)(local_18 + 0x28) = local_2c; return 0xffffffff; } put_u32(local_28 + (int)local_2c + 1,local_38); } } local_4 = 0; } else { local_4 = 0xffffffff; } return local_4; }
48,725
JS_ReadFunctionBytecode
bluesky950520[P]quickjs/quickjs.c
static int JS_ReadFunctionBytecode(BCReaderState *s, JSFunctionBytecode *b, int byte_code_offset, uint32_t bc_len) { uint8_t *bc_buf; int pos, len, op; JSAtom atom; uint32_t idx; bc_buf = (uint8_t*)b + byte_code_offset; if (bc_get_buf(s, bc_buf, bc_len)) return -1; b->byte_code_buf = bc_buf; if (is_be()) bc_byte_swap(bc_buf, bc_len); pos = 0; while (pos < bc_len) { op = bc_buf[pos]; len = short_opcode_info(op).size; switch(short_opcode_info(op).fmt) { case OP_FMT_atom: case OP_FMT_atom_u8: case OP_FMT_atom_u16: case OP_FMT_atom_label_u8: case OP_FMT_atom_label_u16: idx = get_u32(bc_buf + pos + 1); if (bc_idx_to_atom(s, &atom, idx)) { /* Note: the atoms will be freed up to this position */ b->byte_code_len = pos; return -1; } put_u32(bc_buf + pos + 1, atom); break; default: assert(!is_ic_op(op)); // should not end up in serialized bytecode break; } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { const uint8_t *save_ptr = s->ptr; s->ptr = s->ptr_last + len; s->level -= 4; bc_read_trace(s, "%s", ""); // hex dump + indent dump_single_byte_code(s->ctx, bc_buf + pos, b, s->ptr - s->buf_start - len); s->level += 4; s->ptr = save_ptr; } #endif pos += len; } return 0; }
O1
c
JS_ReadFunctionBytecode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %ebx movq %rsi, %r14 movq %rdi, %r15 movslq %edx, %r12 addq %rsi, %r12 movq %r12, %rsi movl %ecx, %edx callq 0x46fbf movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %eax, %eax jne 0x46fae movq %r12, 0x20(%r14) testl %ebx, %ebx je 0x46f9c movq %r15, 0x10(%rsp) movq %r14, 0x8(%rsp) xorl %r13d, %r13d leaq 0x571f0(%rip), %rbp # 0x9e140 movl %r13d, %r14d movzbl (%r12,%r14), %eax leal 0x12(%rax), %ecx cmpl $0xb3, %eax cmovbl %eax, %ecx movzbl (%rbp,%rcx,4), %r15d movb 0x3(%rbp,%rcx,4), %al addb $-0x18, %al cmpb $0x4, %al ja 0x46f94 movl 0x1(%r12,%r14), %edx movq 0x10(%rsp), %rdi leaq 0x4(%rsp), %rsi callq 0x4700e testl %eax, %eax jne 0x46fa0 movl 0x4(%rsp), %eax movl %eax, 0x1(%r12,%r14) addl %r15d, %r13d cmpl %ebx, %r13d jb 0x46f50 xorl %ecx, %ecx jmp 0x46fae movq 0x8(%rsp), %rax movl %r13d, 0x28(%rax) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl %ecx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_ReadFunctionBytecode: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, ecx mov r14, rsi mov r15, rdi movsxd r12, edx add r12, rsi mov rsi, r12 mov edx, ecx call bc_get_buf mov ecx, 0FFFFFFFFh test eax, eax jnz short loc_46FAE mov [r14+20h], r12 test ebx, ebx jz short loc_46F9C mov [rsp+48h+var_38], r15 mov [rsp+48h+var_40], r14 xor r13d, r13d lea rbp, opcode_info loc_46F50: mov r14d, r13d movzx eax, byte ptr [r12+r14] lea ecx, [rax+12h] cmp eax, 0B3h cmovb ecx, eax movzx r15d, byte ptr [rbp+rcx*4+0] mov al, [rbp+rcx*4+3] add al, 0E8h cmp al, 4 ja short loc_46F94 mov edx, [r12+r14+1] mov rdi, [rsp+48h+var_38] lea rsi, [rsp+48h+var_44] call bc_idx_to_atom test eax, eax jnz short loc_46FA0 mov eax, [rsp+48h+var_44] mov [r12+r14+1], eax loc_46F94: add r13d, r15d cmp r13d, ebx jb short loc_46F50 loc_46F9C: xor ecx, ecx jmp short loc_46FAE loc_46FA0: mov rax, [rsp+48h+var_40] mov [rax+28h], r13d mov ecx, 0FFFFFFFFh loc_46FAE: mov eax, ecx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_ReadFunctionBytecode(long long a1, long long a2, int a3, unsigned int a4) { long long v5; // r12 int buf; // eax unsigned int v7; // ecx unsigned int i; // r13d unsigned int v9; // eax long long v10; // rcx int v11; // r15d int v13; // [rsp+4h] [rbp-44h] BYREF long long v14; // [rsp+8h] [rbp-40h] long long v15; // [rsp+10h] [rbp-38h] v5 = a2 + a3; buf = bc_get_buf(a1, v5, a4); v7 = -1; if ( !buf ) { *(_QWORD *)(a2 + 32) = v5; if ( a4 ) { v15 = a1; v14 = a2; for ( i = 0; i < a4; i += v11 ) { v9 = *(unsigned __int8 *)(v5 + i); v10 = v9 + 18; if ( v9 < 0xB3 ) v10 = *(unsigned __int8 *)(v5 + i); v11 = opcode_info[4 * v10]; if ( (unsigned __int8)(opcode_info[4 * v10 + 3] - 24) <= 4u ) { if ( (unsigned int)bc_idx_to_atom(v15, &v13, *(unsigned int *)(v5 + i + 1)) ) { *(_DWORD *)(v14 + 40) = i; return (unsigned int)-1; } *(_DWORD *)(v5 + i + 1) = v13; } } } return 0; } return v7; }
JS_ReadFunctionBytecode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,ECX MOV R14,RSI MOV R15,RDI MOVSXD R12,EDX ADD R12,RSI MOV RSI,R12 MOV EDX,ECX CALL 0x00146fbf MOV ECX,0xffffffff TEST EAX,EAX JNZ 0x00146fae MOV qword ptr [R14 + 0x20],R12 TEST EBX,EBX JZ 0x00146f9c MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x8],R14 XOR R13D,R13D LEA RBP,[0x19e140] LAB_00146f50: MOV R14D,R13D MOVZX EAX,byte ptr [R12 + R14*0x1] LEA ECX,[RAX + 0x12] CMP EAX,0xb3 CMOVC ECX,EAX MOVZX R15D,byte ptr [RBP + RCX*0x4] MOV AL,byte ptr [RBP + RCX*0x4 + 0x3] ADD AL,0xe8 CMP AL,0x4 JA 0x00146f94 MOV EDX,dword ptr [R12 + R14*0x1 + 0x1] MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x4] CALL 0x0014700e TEST EAX,EAX JNZ 0x00146fa0 MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [R12 + R14*0x1 + 0x1],EAX LAB_00146f94: ADD R13D,R15D CMP R13D,EBX JC 0x00146f50 LAB_00146f9c: XOR ECX,ECX JMP 0x00146fae LAB_00146fa0: MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x28],R13D MOV ECX,0xffffffff LAB_00146fae: MOV EAX,ECX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 JS_ReadFunctionBytecode(int8 param_1,long param_2,int param_3,uint param_4) { byte bVar1; uint uVar2; int iVar3; int8 uVar4; long lVar5; uint uVar6; ulong uVar7; int4 local_44; long local_40; int8 local_38; lVar5 = param_3 + param_2; iVar3 = bc_get_buf(param_1,lVar5,param_4); uVar4 = 0xffffffff; if (iVar3 == 0) { *(long *)(param_2 + 0x20) = lVar5; if (param_4 != 0) { uVar6 = 0; local_40 = param_2; local_38 = param_1; do { uVar7 = (ulong)uVar6; bVar1 = *(byte *)(lVar5 + uVar7); uVar2 = bVar1 + 0x12; if (bVar1 < 0xb3) { uVar2 = (uint)bVar1; } bVar1 = opcode_info[(ulong)uVar2 * 4]; if ((byte)(opcode_info[(ulong)uVar2 * 4 + 3] - 0x18) < 5) { iVar3 = bc_idx_to_atom(local_38,&local_44,*(int4 *)(lVar5 + 1 + uVar7)); if (iVar3 != 0) { *(uint *)(local_40 + 0x28) = uVar6; return 0xffffffff; } *(int4 *)(lVar5 + 1 + uVar7) = local_44; } uVar6 = uVar6 + bVar1; } while (uVar6 < param_4); } uVar4 = 0; } return uVar4; }
48,726
JS_ReadFunctionBytecode
bluesky950520[P]quickjs/quickjs.c
static int JS_ReadFunctionBytecode(BCReaderState *s, JSFunctionBytecode *b, int byte_code_offset, uint32_t bc_len) { uint8_t *bc_buf; int pos, len, op; JSAtom atom; uint32_t idx; bc_buf = (uint8_t*)b + byte_code_offset; if (bc_get_buf(s, bc_buf, bc_len)) return -1; b->byte_code_buf = bc_buf; if (is_be()) bc_byte_swap(bc_buf, bc_len); pos = 0; while (pos < bc_len) { op = bc_buf[pos]; len = short_opcode_info(op).size; switch(short_opcode_info(op).fmt) { case OP_FMT_atom: case OP_FMT_atom_u8: case OP_FMT_atom_u16: case OP_FMT_atom_label_u8: case OP_FMT_atom_label_u16: idx = get_u32(bc_buf + pos + 1); if (bc_idx_to_atom(s, &atom, idx)) { /* Note: the atoms will be freed up to this position */ b->byte_code_len = pos; return -1; } put_u32(bc_buf + pos + 1, atom); break; default: assert(!is_ic_op(op)); // should not end up in serialized bytecode break; } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { const uint8_t *save_ptr = s->ptr; s->ptr = s->ptr_last + len; s->level -= 4; bc_read_trace(s, "%s", ""); // hex dump + indent dump_single_byte_code(s->ctx, bc_buf + pos, b, s->ptr - s->buf_start - len); s->level += 4; s->ptr = save_ptr; } #endif pos += len; } return 0; }
O3
c
JS_ReadFunctionBytecode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %ebx movq %rsi, %r14 movq %rdi, %r15 movslq %edx, %r12 addq %rsi, %r12 movq %r12, %rsi movl %ecx, %edx callq 0x48bce movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %eax, %eax jne 0x48bbd movq %r12, 0x20(%r14) testl %ebx, %ebx je 0x48bab movq %r15, 0x10(%rsp) movq %r14, 0x8(%rsp) xorl %r13d, %r13d leaq 0x58561(%rip), %rbp # 0xa10c0 movl %r13d, %r14d movzbl (%r12,%r14), %eax leal 0x12(%rax), %ecx cmpl $0xb3, %eax cmovbl %eax, %ecx movzbl (%rbp,%rcx,4), %r15d movb 0x3(%rbp,%rcx,4), %al addb $-0x18, %al cmpb $0x4, %al ja 0x48ba3 movl 0x1(%r12,%r14), %edx movq 0x10(%rsp), %rdi leaq 0x4(%rsp), %rsi callq 0x48c1d testl %eax, %eax jne 0x48baf movl 0x4(%rsp), %eax movl %eax, 0x1(%r12,%r14) addl %r15d, %r13d cmpl %ebx, %r13d jb 0x48b5f xorl %ecx, %ecx jmp 0x48bbd movq 0x8(%rsp), %rax movl %r13d, 0x28(%rax) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl %ecx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_ReadFunctionBytecode: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, ecx mov r14, rsi mov r15, rdi movsxd r12, edx add r12, rsi mov rsi, r12 mov edx, ecx call bc_get_buf mov ecx, 0FFFFFFFFh test eax, eax jnz short loc_48BBD mov [r14+20h], r12 test ebx, ebx jz short loc_48BAB mov [rsp+48h+var_38], r15 mov [rsp+48h+var_40], r14 xor r13d, r13d lea rbp, opcode_info loc_48B5F: mov r14d, r13d movzx eax, byte ptr [r12+r14] lea ecx, [rax+12h] cmp eax, 0B3h cmovb ecx, eax movzx r15d, byte ptr [rbp+rcx*4+0] mov al, [rbp+rcx*4+3] add al, 0E8h cmp al, 4 ja short loc_48BA3 mov edx, [r12+r14+1] mov rdi, [rsp+48h+var_38] lea rsi, [rsp+48h+var_44] call bc_idx_to_atom test eax, eax jnz short loc_48BAF mov eax, [rsp+48h+var_44] mov [r12+r14+1], eax loc_48BA3: add r13d, r15d cmp r13d, ebx jb short loc_48B5F loc_48BAB: xor ecx, ecx jmp short loc_48BBD loc_48BAF: mov rax, [rsp+48h+var_40] mov [rax+28h], r13d mov ecx, 0FFFFFFFFh loc_48BBD: mov eax, ecx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_ReadFunctionBytecode(long long a1, long long a2, int a3, unsigned int a4) { long long v5; // r12 int buf; // eax unsigned int v7; // ecx unsigned int i; // r13d unsigned int v9; // eax long long v10; // rcx int v11; // r15d int v13; // [rsp+4h] [rbp-44h] BYREF long long v14; // [rsp+8h] [rbp-40h] long long v15; // [rsp+10h] [rbp-38h] v5 = a2 + a3; buf = bc_get_buf(a1, v5, a4); v7 = -1; if ( !buf ) { *(_QWORD *)(a2 + 32) = v5; if ( a4 ) { v15 = a1; v14 = a2; for ( i = 0; i < a4; i += v11 ) { v9 = *(unsigned __int8 *)(v5 + i); v10 = v9 + 18; if ( v9 < 0xB3 ) v10 = *(unsigned __int8 *)(v5 + i); v11 = opcode_info[4 * v10]; if ( (unsigned __int8)(opcode_info[4 * v10 + 3] - 24) <= 4u ) { if ( (unsigned int)bc_idx_to_atom(v15, &v13, *(unsigned int *)(v5 + i + 1)) ) { *(_DWORD *)(v14 + 40) = i; return (unsigned int)-1; } *(_DWORD *)(v5 + i + 1) = v13; } } } return 0; } return v7; }
JS_ReadFunctionBytecode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,ECX MOV R14,RSI MOV R15,RDI MOVSXD R12,EDX ADD R12,RSI MOV RSI,R12 MOV EDX,ECX CALL 0x00148bce MOV ECX,0xffffffff TEST EAX,EAX JNZ 0x00148bbd MOV qword ptr [R14 + 0x20],R12 TEST EBX,EBX JZ 0x00148bab MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x8],R14 XOR R13D,R13D LEA RBP,[0x1a10c0] LAB_00148b5f: MOV R14D,R13D MOVZX EAX,byte ptr [R12 + R14*0x1] LEA ECX,[RAX + 0x12] CMP EAX,0xb3 CMOVC ECX,EAX MOVZX R15D,byte ptr [RBP + RCX*0x4] MOV AL,byte ptr [RBP + RCX*0x4 + 0x3] ADD AL,0xe8 CMP AL,0x4 JA 0x00148ba3 MOV EDX,dword ptr [R12 + R14*0x1 + 0x1] MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x4] CALL 0x00148c1d TEST EAX,EAX JNZ 0x00148baf MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [R12 + R14*0x1 + 0x1],EAX LAB_00148ba3: ADD R13D,R15D CMP R13D,EBX JC 0x00148b5f LAB_00148bab: XOR ECX,ECX JMP 0x00148bbd LAB_00148baf: MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x28],R13D MOV ECX,0xffffffff LAB_00148bbd: MOV EAX,ECX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 JS_ReadFunctionBytecode(int8 param_1,long param_2,int param_3,uint param_4) { byte bVar1; uint uVar2; int iVar3; int8 uVar4; long lVar5; uint uVar6; ulong uVar7; int4 local_44; long local_40; int8 local_38; lVar5 = param_3 + param_2; iVar3 = bc_get_buf(param_1,lVar5,param_4); uVar4 = 0xffffffff; if (iVar3 == 0) { *(long *)(param_2 + 0x20) = lVar5; if (param_4 != 0) { uVar6 = 0; local_40 = param_2; local_38 = param_1; do { uVar7 = (ulong)uVar6; bVar1 = *(byte *)(lVar5 + uVar7); uVar2 = bVar1 + 0x12; if (bVar1 < 0xb3) { uVar2 = (uint)bVar1; } bVar1 = opcode_info[(ulong)uVar2 * 4]; if ((byte)(opcode_info[(ulong)uVar2 * 4 + 3] - 0x18) < 5) { iVar3 = bc_idx_to_atom(local_38,&local_44,*(int4 *)(lVar5 + 1 + uVar7)); if (iVar3 != 0) { *(uint *)(local_40 + 0x28) = uVar6; return 0xffffffff; } *(int4 *)(lVar5 + 1 + uVar7) = local_44; } uVar6 = uVar6 + bVar1; } while (uVar6 < param_4); } uVar4 = 0; } return uVar4; }
48,727
run_query
eloqsql/client/mysqlcheck.c
static int run_query(const char *query, my_bool log_query) { if (verbose >=3 && log_query) puts(query); if (mysql_query(sock, query)) { fprintf(stderr, "Failed to %s\n", query); fprintf(stderr, "Error: %s\n", mysql_error(sock)); return 1; } return 0; }
O0
c
run_query: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) cmpl $0x3, 0x3b2f67(%rip) # 0x3eb280 jb 0x3832d movsbl -0x11(%rbp), %eax cmpl $0x0, %eax je 0x3832d movq -0x10(%rbp), %rdi callq 0x369b0 movq 0x3b344c(%rip), %rdi # 0x3eb780 movq -0x10(%rbp), %rsi callq 0x42150 cmpl $0x0, %eax je 0x38396 movq 0x1f7c97(%rip), %rax # 0x22ffe0 movq (%rax), %rdi movq -0x10(%rbp), %rdx leaq 0x926e0(%rip), %rsi # 0xcaa37 movb $0x0, %al callq 0x361c0 movq 0x1f7c7b(%rip), %rax # 0x22ffe0 movq (%rax), %rax movq %rax, -0x20(%rbp) movq 0x3b340d(%rip), %rdi # 0x3eb780 callq 0x45ad0 movq -0x20(%rbp), %rdi movq %rax, %rdx leaq 0x926bf(%rip), %rsi # 0xcaa45 movb $0x0, %al callq 0x361c0 movl $0x1, -0x4(%rbp) jmp 0x3839d movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
run_query: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_10], rdi mov [rbp+var_11], al cmp cs:verbose, 3 jb short loc_3832D movsx eax, [rbp+var_11] cmp eax, 0 jz short loc_3832D mov rdi, [rbp+var_10] call _puts loc_3832D: mov rdi, cs:sock mov rsi, [rbp+var_10] call mysql_query cmp eax, 0 jz short loc_38396 mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_10] lea rsi, aFailedToS; "Failed to %s\n" mov al, 0 call _fprintf mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_20], rax mov rdi, cs:sock call mysql_error mov rdi, [rbp+var_20] mov rdx, rax lea rsi, aErrorS; "Error: %s\n" mov al, 0 call _fprintf mov [rbp+var_4], 1 jmp short loc_3839D loc_38396: mov [rbp+var_4], 0 loc_3839D: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long run_query(const char *a1, char a2) { const char *v2; // rax long long v4; // [rsp+0h] [rbp-20h] if ( (unsigned int)verbose >= 3 && a2 ) puts(a1); if ( (unsigned int)mysql_query(sock, a1) ) { fprintf(stderr, "Failed to %s\n", a1); v4 = stderr; v2 = (const char *)mysql_error(sock); fprintf(v4, "Error: %s\n", v2); return 1; } else { return 0; } }
run_query: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL CMP dword ptr [0x004eb280],0x3 JC 0x0013832d MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 JZ 0x0013832d MOV RDI,qword ptr [RBP + -0x10] CALL 0x001369b0 LAB_0013832d: MOV RDI,qword ptr [0x004eb780] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00142150 CMP EAX,0x0 JZ 0x00138396 MOV RAX,qword ptr [0x0032ffe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1caa37] MOV AL,0x0 CALL 0x001361c0 MOV RAX,qword ptr [0x0032ffe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [0x004eb780] CALL 0x00145ad0 MOV RDI,qword ptr [RBP + -0x20] MOV RDX,RAX LEA RSI,[0x1caa45] MOV AL,0x0 CALL 0x001361c0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013839d LAB_00138396: MOV dword ptr [RBP + -0x4],0x0 LAB_0013839d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool run_query(char *param_1,char param_2) { FILE *__stream; int iVar1; int8 uVar2; if ((2 < verbose) && (param_2 != '\0')) { puts(param_1); } iVar1 = mysql_query(sock,param_1); if (iVar1 != 0) { fprintf(*(FILE **)PTR_stderr_0032ffe0,"Failed to %s\n",param_1); __stream = *(FILE **)PTR_stderr_0032ffe0; uVar2 = mysql_error(sock); fprintf(__stream,"Error: %s\n",uVar2); } return iVar1 != 0; }
48,728
mysql_stmt_close_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_close_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_close, (parms->stmt), parms->stmt->mysql, my_bool, r_my_bool) }
O0
c
mysql_stmt_close_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x297d0 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_close_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_stmt_close mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_stmt_close_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); *(_BYTE *)(v2 + 8) = mysql_stmt_close(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_stmt_close_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001297d0 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_close_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_close(*param_1); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
48,729
mysql_stmt_close_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_close_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_close, (parms->stmt), parms->stmt->mysql, my_bool, r_my_bool) }
O3
c
mysql_stmt_close_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x38(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rbx callq 0x205cd movb %al, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_stmt_close_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+38h] mov rax, [rax+480h] mov rbx, [rax+28h] call mysql_stmt_close mov [rbx+8], al mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
char mysql_stmt_close_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx char result; // al v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL); result = mysql_stmt_close(v1); *(_BYTE *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_stmt_close_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x001205cd MOV byte ptr [RBX + 0x8],AL MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_stmt_close_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_close(); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
48,730
mz_zip_writer_write_zeros
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n) { char buf[4096]; memset(buf, 0, MZ_MIN(sizeof(buf), n)); while (n) { mz_uint32 s = MZ_MIN(sizeof(buf), n); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); cur_file_ofs += s; n -= s; } return MZ_TRUE; }
O0
c
mz_zip_writer_write_zeros: subq $0x1048, %rsp # imm = 0x1048 movq %rdi, 0x1030(%rsp) movq %rsi, 0x1028(%rsp) movl %edx, 0x1024(%rsp) leaq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movl 0x1024(%rsp), %eax movl %eax, %ecx movl $0x1000, %eax # imm = 0x1000 cmpq %rcx, %rax jae 0x108d77 movl $0x1000, %eax # imm = 0x1000 movq %rax, 0x8(%rsp) jmp 0x108d83 movl 0x1024(%rsp), %eax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rdx xorl %esi, %esi callq 0xb390 cmpl $0x0, 0x1024(%rsp) je 0x108e79 movl 0x1024(%rsp), %eax movl %eax, %ecx movl $0x1000, %eax # imm = 0x1000 cmpq %rcx, %rax jae 0x108dc0 movl $0x1000, %eax # imm = 0x1000 movq %rax, (%rsp) jmp 0x108dcb movl 0x1024(%rsp), %eax movq %rax, (%rsp) movq (%rsp), %rax movl %eax, 0x1c(%rsp) movq 0x1030(%rsp), %rax movq 0x50(%rax), %rax movq 0x1030(%rsp), %rcx movq 0x60(%rcx), %rdi movq 0x1028(%rsp), %rsi leaq 0x20(%rsp), %rdx movl 0x1c(%rsp), %ecx callq *%rax movl 0x1c(%rsp), %ecx cmpq %rcx, %rax je 0x108e4c movq 0x1030(%rsp), %rax movq %rax, 0x1040(%rsp) movl $0x13, 0x103c(%rsp) cmpq $0x0, 0x1040(%rsp) je 0x108e3f movl 0x103c(%rsp), %ecx movq 0x1040(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, 0x1038(%rsp) jmp 0x108e84 movl 0x1c(%rsp), %eax addq 0x1028(%rsp), %rax movq %rax, 0x1028(%rsp) movl 0x1c(%rsp), %ecx movl 0x1024(%rsp), %eax subl %ecx, %eax movl %eax, 0x1024(%rsp) jmp 0x108d94 movl $0x1, 0x1038(%rsp) movl 0x1038(%rsp), %eax addq $0x1048, %rsp # imm = 0x1048 retq nopw %cs:(%rax,%rax)
mz_zip_writer_write_zeros: sub rsp, 1048h mov [rsp+1048h+var_18], rdi mov [rsp+1048h+var_20], rsi mov [rsp+1048h+var_24], edx lea rax, [rsp+1048h+var_1028] mov [rsp+1048h+var_1038], rax mov eax, [rsp+1048h+var_24] mov ecx, eax mov eax, 1000h cmp rax, rcx jnb short loc_108D77 mov eax, 1000h mov [rsp+1048h+var_1040], rax jmp short loc_108D83 loc_108D77: mov eax, [rsp+1048h+var_24] mov [rsp+1048h+var_1040], rax loc_108D83: mov rdi, [rsp+1048h+var_1038] mov rdx, [rsp+1048h+var_1040] xor esi, esi call _memset loc_108D94: cmp [rsp+1048h+var_24], 0 jz loc_108E79 mov eax, [rsp+1048h+var_24] mov ecx, eax mov eax, 1000h cmp rax, rcx jnb short loc_108DC0 mov eax, 1000h mov [rsp+1048h+var_1048], rax jmp short loc_108DCB loc_108DC0: mov eax, [rsp+1048h+var_24] mov [rsp+1048h+var_1048], rax loc_108DCB: mov rax, [rsp+1048h+var_1048] mov [rsp+1048h+var_102C], eax mov rax, [rsp+1048h+var_18] mov rax, [rax+50h] mov rcx, [rsp+1048h+var_18] mov rdi, [rcx+60h] mov rsi, [rsp+1048h+var_20] lea rdx, [rsp+1048h+var_1028] mov ecx, [rsp+1048h+var_102C] call rax mov ecx, [rsp+1048h+var_102C] cmp rax, rcx jz short loc_108E4C mov rax, [rsp+1048h+var_18] mov [rsp+1048h+var_8], rax mov [rsp+1048h+var_C], 13h cmp [rsp+1048h+var_8], 0 jz short loc_108E3F mov ecx, [rsp+1048h+var_C] mov rax, [rsp+1048h+var_8] mov [rax+1Ch], ecx loc_108E3F: mov [rsp+1048h+var_10], 0 jmp short loc_108E84 loc_108E4C: mov eax, [rsp+1048h+var_102C] add rax, [rsp+1048h+var_20] mov [rsp+1048h+var_20], rax mov ecx, [rsp+1048h+var_102C] mov eax, [rsp+1048h+var_24] sub eax, ecx mov [rsp+1048h+var_24], eax jmp loc_108D94 loc_108E79: mov [rsp+1048h+var_10], 1 loc_108E84: mov eax, [rsp+1048h+var_10] add rsp, 1048h retn
long long mz_zip_writer_write_zeros(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+0h] [rbp-1048h] _BYTE v5[4100]; // [rsp+20h] [rbp-1028h] BYREF unsigned int v6; // [rsp+1024h] [rbp-24h] long long v7; // [rsp+1028h] [rbp-20h] long long v8; // [rsp+1030h] [rbp-18h] int v10; // [rsp+103Ch] [rbp-Ch] long long v11; // [rsp+1040h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; if ( a3 <= 0x1000uLL ) memset(v5, 0LL, v6); else memset(v5, 0LL, 4096LL); while ( 1 ) { if ( !v6 ) return 1; v4 = v6 <= 0x1000uLL ? v6 : 4096; if ( (*(long long ( **)(_QWORD, long long, _BYTE *, _QWORD))(v8 + 80))(*(_QWORD *)(v8 + 96), v7, v5, v4) != v4 ) break; v7 += v4; v6 -= v4; } v11 = v8; v10 = 19; if ( v8 ) *(_DWORD *)(v11 + 28) = v10; return 0; }
48,731
mz_zip_writer_write_zeros
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n) { char buf[4096]; memset(buf, 0, MZ_MIN(sizeof(buf), n)); while (n) { mz_uint32 s = MZ_MIN(sizeof(buf), n); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); cur_file_ofs += s; n -= s; } return MZ_TRUE; }
O1
c
mz_zip_writer_write_zeros: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 movl $0x1000, %ebp # imm = 0x1000 cmpl %ebp, %edx movl $0x1000, %edx # imm = 0x1000 cmovbl %ebx, %edx movq %rsp, %r12 movq %r12, %rdi xorl %esi, %esi callq 0xa300 testl %ebx, %ebx je 0x87b63 cmpl %ebp, %ebx movl $0x1000, %r13d # imm = 0x1000 cmovbl %ebx, %r13d movq 0x60(%r15), %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %rcx callq *0x50(%r15) cmpq %r13, %rax jne 0x87b4d addq %r13, %r14 subl %r13d, %ebx jmp 0x87b5a testq %r15, %r15 je 0x87b5a movl $0x13, 0x1c(%r15) cmpq %r13, %rax je 0x87b1f xorl %eax, %eax jmp 0x87b68 movl $0x1, %eax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mz_zip_writer_write_zeros: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1008h mov ebx, edx mov r14, rsi mov r15, rdi mov ebp, 1000h cmp edx, ebp mov edx, 1000h cmovb edx, ebx mov r12, rsp mov rdi, r12 xor esi, esi call _memset loc_87B1F: test ebx, ebx jz short loc_87B63 cmp ebx, ebp mov r13d, 1000h cmovb r13d, ebx mov rdi, [r15+60h] mov rsi, r14 mov rdx, r12 mov rcx, r13 call qword ptr [r15+50h] cmp rax, r13 jnz short loc_87B4D add r14, r13 sub ebx, r13d jmp short loc_87B5A loc_87B4D: test r15, r15 jz short loc_87B5A mov dword ptr [r15+1Ch], 13h loc_87B5A: cmp rax, r13 jz short loc_87B1F xor eax, eax jmp short loc_87B68 loc_87B63: mov eax, 1 loc_87B68: add rsp, 1008h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mz_zip_writer_write_zeros(long long a1, long long a2, unsigned int a3) { unsigned int v3; // ebx bool v5; // cf long long v6; // rdx long long v7; // r13 long long v8; // rax _BYTE v10[4152]; // [rsp+0h] [rbp-1038h] BYREF v3 = a3; v5 = a3 < 0x1000; v6 = 4096LL; if ( v5 ) v6 = v3; memset(v10, 0LL, v6); while ( v3 ) { v7 = 4096LL; if ( v3 < 0x1000 ) v7 = v3; v8 = (*(long long ( **)(_QWORD, long long, _BYTE *, long long))(a1 + 80))(*(_QWORD *)(a1 + 96), a2, v10, v7); if ( v8 == v7 ) { a2 += v7; v3 -= v7; } else if ( a1 ) { *(_DWORD *)(a1 + 28) = 19; } if ( v8 != v7 ) return 0LL; } return 1LL; }
48,732
mz_zip_writer_write_zeros
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n) { char buf[4096]; memset(buf, 0, MZ_MIN(sizeof(buf), n)); while (n) { mz_uint32 s = MZ_MIN(sizeof(buf), n); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); cur_file_ofs += s; n -= s; } return MZ_TRUE; }
O2
c
mz_zip_writer_write_zeros: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 movl $0x1000, %ebp # imm = 0x1000 cmpl %ebp, %edx movl $0x1000, %edx # imm = 0x1000 cmovbl %ebx, %edx movq %rsp, %r12 movq %r12, %rdi xorl %esi, %esi callq 0xa2f0 testl %ebx, %ebx je 0x62133 cmpl %ebp, %ebx movl $0x1000, %r13d # imm = 0x1000 cmovbl %ebx, %r13d movq 0x60(%r14), %rdi movq %r15, %rsi movq %r12, %rdx movq %r13, %rcx callq *0x50(%r14) cmpq %r13, %rax jne 0x62138 addq %r13, %r15 subl %r13d, %ebx jmp 0x62105 pushq $0x1 popq %rax jmp 0x62142 movl $0x13, 0x1c(%r14) xorl %eax, %eax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mz_zip_writer_write_zeros: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1008h mov ebx, edx mov r15, rsi mov r14, rdi mov ebp, 1000h cmp edx, ebp mov edx, 1000h cmovb edx, ebx mov r12, rsp mov rdi, r12 xor esi, esi call _memset loc_62105: test ebx, ebx jz short loc_62133 cmp ebx, ebp mov r13d, 1000h cmovb r13d, ebx mov rdi, [r14+60h] mov rsi, r15 mov rdx, r12 mov rcx, r13 call qword ptr [r14+50h] cmp rax, r13 jnz short loc_62138 add r15, r13 sub ebx, r13d jmp short loc_62105 loc_62133: push 1 pop rax jmp short loc_62142 loc_62138: mov dword ptr [r14+1Ch], 13h xor eax, eax loc_62142: add rsp, 1008h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mz_zip_writer_write_zeros(long long a1, long long a2, unsigned int a3) { unsigned int v3; // ebx bool v5; // cf long long v6; // rdx long long v7; // r13 _BYTE v9[4152]; // [rsp+0h] [rbp-1038h] BYREF v3 = a3; v5 = a3 < 0x1000; v6 = 4096LL; if ( v5 ) v6 = v3; memset(v9, 0LL, v6); while ( 1 ) { if ( !v3 ) return 1LL; v7 = 4096LL; if ( v3 < 0x1000 ) v7 = v3; if ( (*(long long ( **)(_QWORD, long long, _BYTE *, long long))(a1 + 80))(*(_QWORD *)(a1 + 96), a2, v9, v7) != v7 ) break; a2 += v7; v3 -= v7; } *(_DWORD *)(a1 + 28) = 19; return 0LL; }
mz_zip_writer_write_zeros: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1008 MOV EBX,EDX MOV R15,RSI MOV R14,RDI MOV EBP,0x1000 CMP EDX,EBP MOV EDX,0x1000 CMOVC EDX,EBX MOV R12,RSP MOV RDI,R12 XOR ESI,ESI CALL 0x0010a2f0 LAB_00162105: TEST EBX,EBX JZ 0x00162133 CMP EBX,EBP MOV R13D,0x1000 CMOVC R13D,EBX MOV RDI,qword ptr [R14 + 0x60] MOV RSI,R15 MOV RDX,R12 MOV RCX,R13 CALL qword ptr [R14 + 0x50] CMP RAX,R13 JNZ 0x00162138 ADD R15,R13 SUB EBX,R13D JMP 0x00162105 LAB_00162133: PUSH 0x1 POP RAX JMP 0x00162142 LAB_00162138: MOV dword ptr [R14 + 0x1c],0x13 XOR EAX,EAX LAB_00162142: ADD RSP,0x1008 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 mz_zip_writer_write_zeros(long param_1,long param_2,uint param_3) { ulong uVar1; size_t __n; uint uVar2; ulong uVar3; int1 auStack_1038 [4104]; uVar1 = (ulong)param_3; __n = 0x1000; if (param_3 < 0x1000) { __n = (size_t)param_3; } memset(auStack_1038,0,__n); while( true ) { uVar2 = (uint)uVar1; if (uVar2 == 0) { return 1; } uVar3 = 0x1000; if (uVar2 < 0x1000) { uVar3 = uVar1; } uVar1 = (**(code **)(param_1 + 0x50)) (*(int8 *)(param_1 + 0x60),param_2,auStack_1038,uVar3); if (uVar1 != uVar3) break; param_2 = param_2 + uVar3; uVar1 = (ulong)(uVar2 - (int)uVar3); } *(int4 *)(param_1 + 0x1c) = 0x13; return 0; }
48,733
mz_zip_writer_write_zeros
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n) { char buf[4096]; memset(buf, 0, MZ_MIN(sizeof(buf), n)); while (n) { mz_uint32 s = MZ_MIN(sizeof(buf), n); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); cur_file_ofs += s; n -= s; } return MZ_TRUE; }
O3
c
mz_zip_writer_write_zeros: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 movl $0x1000, %ebp # imm = 0x1000 cmpl %ebp, %edx movl $0x1000, %edx # imm = 0x1000 cmovbl %ebx, %edx movq %rsp, %rdi xorl %esi, %esi callq 0xa2f0 movl $0x1, %eax testl %ebx, %ebx je 0x86ae4 movq %rsp, %r12 cmpl %ebp, %ebx movl $0x1000, %r13d # imm = 0x1000 cmovbl %ebx, %r13d movq 0x60(%r14), %rdi movq %r15, %rsi movq %r12, %rdx movq %r13, %rcx callq *0x50(%r14) cmpq %r13, %rax jne 0x86ada addq %r13, %r15 subl %r13d, %ebx jne 0x86aa9 movl $0x1, %eax jmp 0x86ae4 movl $0x13, 0x1c(%r14) xorl %eax, %eax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mz_zip_writer_write_zeros: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1008h mov ebx, edx mov r15, rsi mov r14, rdi mov ebp, 1000h cmp edx, ebp mov edx, 1000h cmovb edx, ebx mov rdi, rsp xor esi, esi call _memset mov eax, 1 test ebx, ebx jz short loc_86AE4 mov r12, rsp loc_86AA9: cmp ebx, ebp mov r13d, 1000h cmovb r13d, ebx mov rdi, [r14+60h] mov rsi, r15 mov rdx, r12 mov rcx, r13 call qword ptr [r14+50h] cmp rax, r13 jnz short loc_86ADA add r15, r13 sub ebx, r13d jnz short loc_86AA9 mov eax, 1 jmp short loc_86AE4 loc_86ADA: mov dword ptr [r14+1Ch], 13h xor eax, eax loc_86AE4: add rsp, 1008h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mz_zip_writer_write_zeros(long long a1, long long a2, unsigned int a3) { unsigned int v3; // ebx bool v5; // cf long long v6; // rdx long long result; // rax long long v8; // r13 _BYTE v9[4152]; // [rsp+0h] [rbp-1038h] BYREF v3 = a3; v5 = a3 < 0x1000; v6 = 4096LL; if ( v5 ) v6 = v3; memset(v9, 0LL, v6); result = 1LL; if ( v3 ) { while ( 1 ) { v8 = 4096LL; if ( v3 < 0x1000 ) v8 = v3; if ( (*(long long ( **)(_QWORD, long long, _BYTE *, long long))(a1 + 80))(*(_QWORD *)(a1 + 96), a2, v9, v8) != v8 ) break; a2 += v8; v3 -= v8; if ( !v3 ) return 1LL; } *(_DWORD *)(a1 + 28) = 19; return 0LL; } return result; }
48,734
MYSQL_BIN_LOG::purge_first_log(Relay_log_info*, bool)
eloqsql/sql/log.cc
int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included) { int error, errcode; char *to_purge_if_included= NULL; inuse_relaylog *ir; ulonglong log_space_reclaimed= 0; DBUG_ENTER("purge_first_log"); DBUG_ASSERT(is_open()); DBUG_ASSERT(rli->slave_running == MYSQL_SLAVE_RUN_NOT_CONNECT); DBUG_ASSERT(!strcmp(rli->linfo.log_file_name,rli->event_relay_log_name)); mysql_mutex_assert_owner(&rli->data_lock); mysql_mutex_lock(&LOCK_index); ir= rli->inuse_relaylog_list; while (ir) { inuse_relaylog *next= ir->next; if (!ir->completed || ir->dequeued_count < ir->queued_count) { included= false; break; } if (!included && !strcmp(ir->name, rli->group_relay_log_name)) break; if (!next) { rli->last_inuse_relaylog= NULL; included= 1; to_purge_if_included= my_strdup(key_memory_Relay_log_info_group_relay_log_name, ir->name, MYF(0)); } rli->free_inuse_relaylog(ir); ir= next; } rli->inuse_relaylog_list= ir; if (ir) to_purge_if_included= my_strdup(key_memory_Relay_log_info_group_relay_log_name, ir->name, MYF(0)); /* Read the next log file name from the index file and pass it back to the caller. */ if (unlikely((error=find_log_pos(&rli->linfo, rli->event_relay_log_name, 0))) || unlikely((error=find_next_log(&rli->linfo, 0)))) { sql_print_error("next log error: %d offset: %llu log: %s included: %d", error, rli->linfo.index_file_offset, rli->event_relay_log_name, included); goto err; } /* Reset rli's coordinates to the current log. */ rli->event_relay_log_pos= BIN_LOG_HEADER_SIZE; strmake_buf(rli->event_relay_log_name,rli->linfo.log_file_name); /* If we removed the rli->group_relay_log_name file, we must update the rli->group* coordinates, otherwise do not touch it as the group's execution is not finished (e.g. COMMIT not executed) */ if (included) { rli->group_relay_log_pos = BIN_LOG_HEADER_SIZE; strmake_buf(rli->group_relay_log_name,rli->linfo.log_file_name); rli->notify_group_relay_log_name_update(); } /* Store where we are in the new file for the execution thread */ if (rli->flush()) error= LOG_INFO_IO; DBUG_EXECUTE_IF("crash_before_purge_logs", DBUG_SUICIDE();); rli->relay_log.purge_logs(to_purge_if_included, included, 0, 0, &log_space_reclaimed); mysql_mutex_lock(&rli->log_space_lock); rli->log_space_total-= log_space_reclaimed; mysql_cond_broadcast(&rli->log_space_cond); mysql_mutex_unlock(&rli->log_space_lock); /* * Need to update the log pos because purge logs has been called * after fetching initially the log pos at the beginning of the method. */ if ((errcode= find_log_pos(&rli->linfo, rli->event_relay_log_name, 0))) { sql_print_error("next log error: %d offset: %llu log: %s included: %d", errcode, rli->linfo.index_file_offset, rli->group_relay_log_name, included); goto err; } /* If included was passed, rli->linfo should be the first entry. */ DBUG_ASSERT(!included || rli->linfo.index_file_start_offset == 0); err: my_free(to_purge_if_included); mysql_mutex_unlock(&LOCK_index); DBUG_RETURN(error); }
O0
cpp
MYSQL_BIN_LOG::purge_first_log(Relay_log_info*, bool): pushq %rbp movq %rsp, %rbp subq $0x480, %rsp # imm = 0x480 movb %dl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x418(%rbp) movq %rsi, -0x420(%rbp) andb $0x1, %al movb %al, -0x421(%rbp) movq -0x418(%rbp), %rax movq %rax, -0x468(%rbp) movq $0x0, -0x438(%rbp) movq $0x0, -0x448(%rbp) jmp 0xd335c6 jmp 0xd335c8 jmp 0xd335ca jmp 0xd335cc jmp 0xd335ce jmp 0xd335d0 jmp 0xd335d2 movq -0x468(%rbp), %rdi addq $0x480, %rdi # imm = 0x480 leaq 0x6a431f(%rip), %rsi # 0x13d7906 movl $0x120e, %edx # imm = 0x120E callq 0xb44d40 movq -0x420(%rbp), %rax movq 0x1c60(%rax), %rax movq %rax, -0x440(%rbp) cmpq $0x0, -0x440(%rbp) je 0xd336f6 movq -0x440(%rbp), %rax movq (%rax), %rax movq %rax, -0x450(%rbp) movq -0x440(%rbp), %rax testb $0x1, 0x30(%rax) je 0xd3364f movq -0x440(%rbp), %rdi addq $0x28, %rdi callq 0x8264d0 movq -0x440(%rbp), %rcx cmpq 0x20(%rcx), %rax jge 0xd3365b movb $0x0, -0x421(%rbp) jmp 0xd336f6 testb $0x1, -0x421(%rbp) jne 0xd33689 movq -0x440(%rbp), %rdi addq $0x31, %rdi movq -0x420(%rbp), %rsi addq $0x1c75, %rsi # imm = 0x1C75 callq 0x759f50 cmpl $0x0, %eax jne 0xd33689 jmp 0xd336f6 cmpq $0x0, -0x450(%rbp) jne 0xd336d0 movq -0x420(%rbp), %rax movq $0x0, 0x1c68(%rax) movb $0x1, -0x421(%rbp) leaq 0xf9aa7d(%rip), %rax # 0x1cce130 movl (%rax), %edi movq -0x440(%rbp), %rsi addq $0x31, %rsi xorl %eax, %eax movl %eax, %edx callq 0x12c7620 movq %rax, -0x438(%rbp) movq -0x420(%rbp), %rdi movq -0x440(%rbp), %rsi callq 0xa4ab40 movq -0x450(%rbp), %rax movq %rax, -0x440(%rbp) jmp 0xd33606 movq -0x440(%rbp), %rcx movq -0x420(%rbp), %rax movq %rcx, 0x1c60(%rax) cmpq $0x0, -0x440(%rbp) je 0xd33739 leaq 0xf9aa14(%rip), %rax # 0x1cce130 movl (%rax), %edi movq -0x440(%rbp), %rsi addq $0x31, %rsi xorl %eax, %eax movl %eax, %edx callq 0x12c7620 movq %rax, -0x438(%rbp) movq -0x468(%rbp), %rdi movq -0x420(%rbp), %rsi addq $0x16d8, %rsi # imm = 0x16D8 movq -0x420(%rbp), %rdx addq $0x1e80, %rdx # imm = 0x1E80 xorl %ecx, %ecx callq 0xd324c0 movl %eax, -0x428(%rbp) cmpl $0x0, %eax jne 0xd33795 movq -0x468(%rbp), %rdi movq -0x420(%rbp), %rsi addq $0x16d8, %rsi # imm = 0x16D8 xorl %edx, %edx callq 0xd327d0 movl %eax, -0x428(%rbp) cmpl $0x0, %eax je 0xd337e4 movl -0x428(%rbp), %ecx movq -0x420(%rbp), %rax movq 0x18d8(%rax), %r8 movq -0x420(%rbp), %r9 addq $0x1e80, %r9 # imm = 0x1E80 movb -0x421(%rbp), %al andb $0x1, %al movzbl %al, %eax leaq 0x6a413d(%rip), %rdi # 0x13d7906 movl $0x1234, %esi # imm = 0x1234 leaq 0x6a4843(%rip), %rdx # 0x13d8018 movl %eax, (%rsp) movb $0x0, %al callq 0xd29700 jmp 0xd339e3 movq -0x420(%rbp), %rax movq $0x4, 0x2080(%rax) leaq -0x210(%rbp), %rdi xorl %esi, %esi movl $0x200, %edx # imm = 0x200 callq 0x7584b0 movb $0x2, -0x210(%rbp) movq -0x420(%rbp), %rdi addq $0x1e80, %rdi # imm = 0x1E80 movq -0x420(%rbp), %rsi addq $0x16d8, %rsi # imm = 0x16D8 movl $0x1ff, %edx # imm = 0x1FF callq 0x1338530 movq %rax, -0x458(%rbp) testb $0x1, -0x421(%rbp) je 0xd338ab movq -0x420(%rbp), %rax movq $0x4, 0x1e78(%rax) leaq -0x410(%rbp), %rdi xorl %esi, %esi movl $0x200, %edx # imm = 0x200 callq 0x7584b0 movb $0x2, -0x410(%rbp) movq -0x420(%rbp), %rdi addq $0x1c75, %rdi # imm = 0x1C75 movq -0x420(%rbp), %rsi addq $0x16d8, %rsi # imm = 0x16D8 movl $0x1ff, %edx # imm = 0x1FF callq 0x1338530 movq %rax, -0x460(%rbp) movq -0x420(%rbp), %rdi callq 0xa4cf10 movq -0x420(%rbp), %rdi callq 0xa48d40 testb $0x1, %al jne 0xd338bd jmp 0xd338c7 movl $0xfffffffe, -0x428(%rbp) # imm = 0xFFFFFFFE jmp 0xd338c9 jmp 0xd338cb movq -0x420(%rbp), %rdi addq $0x4c0, %rdi # imm = 0x4C0 movq -0x438(%rbp), %rsi movb -0x421(%rbp), %al xorl %r8d, %r8d leaq -0x448(%rbp), %r9 andb $0x1, %al movzbl %al, %edx movl %r8d, %ecx callq 0xd33a40 movq -0x420(%rbp), %rdi addq $0x24e0, %rdi # imm = 0x24E0 leaq 0x6a3ff4(%rip), %rsi # 0x13d7906 movl $0x1253, %edx # imm = 0x1253 callq 0xb44d40 movq -0x448(%rbp), %rsi movq -0x420(%rbp), %rdi addq $0x24a0, %rdi # imm = 0x24A0 callq 0xd42c30 movq -0x420(%rbp), %rdi addq $0x2528, %rdi # imm = 0x2528 callq 0xd32320 movq -0x420(%rbp), %rdi addq $0x24e0, %rdi # imm = 0x24E0 callq 0xb44fa0 movq -0x468(%rbp), %rdi movq -0x420(%rbp), %rsi addq $0x16d8, %rsi # imm = 0x16D8 movq -0x420(%rbp), %rdx addq $0x1e80, %rdx # imm = 0x1E80 xorl %ecx, %ecx callq 0xd324c0 movl %eax, -0x42c(%rbp) cmpl $0x0, %eax je 0xd339dd movl -0x42c(%rbp), %ecx movq -0x420(%rbp), %rax movq 0x18d8(%rax), %r8 movq -0x420(%rbp), %r9 addq $0x1c75, %r9 # imm = 0x1C75 movb -0x421(%rbp), %al andb $0x1, %al movzbl %al, %eax leaq 0x6a3f41(%rip), %rdi # 0x13d7906 movl $0x1260, %esi # imm = 0x1260 leaq 0x6a4647(%rip), %rdx # 0x13d8018 movl %eax, (%rsp) movb $0x0, %al callq 0xd29700 jmp 0xd339e3 jmp 0xd339df jmp 0xd339e1 jmp 0xd339e3 movq -0x438(%rbp), %rdi callq 0x12c7520 movq -0x468(%rbp), %rdi addq $0x480, %rdi # imm = 0x480 callq 0xb44fa0 movl -0x428(%rbp), %eax movl %eax, -0x46c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd33a2f movl -0x46c(%rbp), %eax addq $0x480, %rsp # imm = 0x480 popq %rbp retq callq 0x758480 nopw %cs:(%rax,%rax)
_ZN13MYSQL_BIN_LOG15purge_first_logEP14Relay_log_infob: push rbp mov rbp, rsp sub rsp, 480h mov al, dl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_418], rdi mov [rbp+var_420], rsi and al, 1 mov [rbp+var_421], al mov rax, [rbp+var_418] mov [rbp+var_468], rax mov [rbp+var_438], 0 mov [rbp+var_448], 0 jmp short $+2 loc_D335C6: jmp short $+2 loc_D335C8: jmp short $+2 loc_D335CA: jmp short $+2 loc_D335CC: jmp short $+2 loc_D335CE: jmp short $+2 loc_D335D0: jmp short $+2 loc_D335D2: mov rdi, [rbp+var_468] add rdi, 480h lea rsi, aWorkspaceLlm4b_100; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 120Eh call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint) mov rax, [rbp+var_420] mov rax, [rax+1C60h] mov [rbp+var_440], rax loc_D33606: cmp [rbp+var_440], 0 jz loc_D336F6 mov rax, [rbp+var_440] mov rax, [rax] mov [rbp+var_450], rax mov rax, [rbp+var_440] test byte ptr [rax+30h], 1 jz short loc_D3364F mov rdi, [rbp+var_440] add rdi, 28h ; '(' call _ZNK14Atomic_counterIxEcvxEv; Atomic_counter<long long>::operator long long(void) mov rcx, [rbp+var_440] cmp rax, [rcx+20h] jge short loc_D3365B loc_D3364F: mov [rbp+var_421], 0 jmp loc_D336F6 loc_D3365B: test [rbp+var_421], 1 jnz short loc_D33689 mov rdi, [rbp+var_440] add rdi, 31h ; '1' mov rsi, [rbp+var_420] add rsi, 1C75h call _strcmp cmp eax, 0 jnz short loc_D33689 jmp short loc_D336F6 loc_D33689: cmp [rbp+var_450], 0 jnz short loc_D336D0 mov rax, [rbp+var_420] mov qword ptr [rax+1C68h], 0 mov [rbp+var_421], 1 lea rax, key_memory_Relay_log_info_group_relay_log_name mov edi, [rax] mov rsi, [rbp+var_440] add rsi, 31h ; '1' xor eax, eax mov edx, eax call my_strdup mov [rbp+var_438], rax loc_D336D0: mov rdi, [rbp+var_420] mov rsi, [rbp+var_440] call _ZN14Relay_log_info19free_inuse_relaylogEP14inuse_relaylog; Relay_log_info::free_inuse_relaylog(inuse_relaylog *) mov rax, [rbp+var_450] mov [rbp+var_440], rax jmp loc_D33606 loc_D336F6: mov rcx, [rbp+var_440] mov rax, [rbp+var_420] mov [rax+1C60h], rcx cmp [rbp+var_440], 0 jz short loc_D33739 lea rax, key_memory_Relay_log_info_group_relay_log_name mov edi, [rax] mov rsi, [rbp+var_440] add rsi, 31h ; '1' xor eax, eax mov edx, eax call my_strdup mov [rbp+var_438], rax loc_D33739: mov rdi, [rbp+var_468]; this mov rsi, [rbp+var_420] add rsi, 16D8h; st_log_info * mov rdx, [rbp+var_420] add rdx, 1E80h; char * xor ecx, ecx; bool call _ZN13MYSQL_BIN_LOG12find_log_posEP11st_log_infoPKcb; MYSQL_BIN_LOG::find_log_pos(st_log_info *,char const*,bool) mov [rbp+var_428], eax cmp eax, 0 jnz short loc_D33795 mov rdi, [rbp+var_468]; this mov rsi, [rbp+var_420] add rsi, 16D8h; st_log_info * xor edx, edx; bool call _ZN13MYSQL_BIN_LOG13find_next_logEP11st_log_infob; MYSQL_BIN_LOG::find_next_log(st_log_info *,bool) mov [rbp+var_428], eax cmp eax, 0 jz short loc_D337E4 loc_D33795: mov ecx, [rbp+var_428] mov rax, [rbp+var_420] mov r8, [rax+18D8h] mov r9, [rbp+var_420] add r9, 1E80h mov al, [rbp+var_421] and al, 1 movzx eax, al lea rdi, aWorkspaceLlm4b_100; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 1234h; int lea rdx, aNextLogErrorDO_0; "next log error: %d offset: %llu log: "... mov [rsp+480h+var_480], eax mov al, 0 call _Z16glog_print_errorPKciS0_z; glog_print_error(char const*,int,char const*,...) jmp loc_D339E3 loc_D337E4: mov rax, [rbp+var_420] mov qword ptr [rax+2080h], 4 lea rdi, [rbp+var_210] xor esi, esi mov edx, 200h call _memset mov [rbp+var_210], 2 mov rdi, [rbp+var_420] add rdi, 1E80h mov rsi, [rbp+var_420] add rsi, 16D8h mov edx, 1FFh call strmake mov [rbp+var_458], rax test [rbp+var_421], 1 jz short loc_D338AB mov rax, [rbp+var_420] mov qword ptr [rax+1E78h], 4 lea rdi, [rbp+var_410] xor esi, esi mov edx, 200h call _memset mov [rbp+var_410], 2 mov rdi, [rbp+var_420] add rdi, 1C75h mov rsi, [rbp+var_420] add rsi, 16D8h mov edx, 1FFh call strmake mov [rbp+var_460], rax mov rdi, [rbp+var_420]; this call _ZN14Relay_log_info34notify_group_relay_log_name_updateEv; Relay_log_info::notify_group_relay_log_name_update(void) loc_D338AB: mov rdi, [rbp+var_420]; this call _ZN14Relay_log_info5flushEv; Relay_log_info::flush(void) test al, 1 jnz short loc_D338BD jmp short loc_D338C7 loc_D338BD: mov [rbp+var_428], 0FFFFFFFEh loc_D338C7: jmp short $+2 loc_D338C9: jmp short $+2 loc_D338CB: mov rdi, [rbp+var_420] add rdi, 4C0h; this mov rsi, [rbp+var_438]; char * mov al, [rbp+var_421] xor r8d, r8d; bool lea r9, [rbp+var_448]; unsigned __int64 * and al, 1 movzx edx, al; bool mov ecx, r8d; bool call _ZN13MYSQL_BIN_LOG10purge_logsEPKcbbbPy; MYSQL_BIN_LOG::purge_logs(char const*,bool,bool,bool,ulong long *) mov rdi, [rbp+var_420] add rdi, 24E0h lea rsi, aWorkspaceLlm4b_100; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1253h call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint) mov rsi, [rbp+var_448] mov rdi, [rbp+var_420] add rdi, 24A0h call _ZN14Atomic_counterIyEmIEy; Atomic_counter<ulong long>::operator-=(ulong long) mov rdi, [rbp+var_420] add rdi, 2528h call _ZL27inline_mysql_cond_broadcastP13st_mysql_cond_13; inline_mysql_cond_broadcast(st_mysql_cond *) mov rdi, [rbp+var_420] add rdi, 24E0h call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *) mov rdi, [rbp+var_468]; this mov rsi, [rbp+var_420] add rsi, 16D8h; st_log_info * mov rdx, [rbp+var_420] add rdx, 1E80h; char * xor ecx, ecx; bool call _ZN13MYSQL_BIN_LOG12find_log_posEP11st_log_infoPKcb; MYSQL_BIN_LOG::find_log_pos(st_log_info *,char const*,bool) mov [rbp+var_42C], eax cmp eax, 0 jz short loc_D339DD mov ecx, [rbp+var_42C] mov rax, [rbp+var_420] mov r8, [rax+18D8h] mov r9, [rbp+var_420] add r9, 1C75h mov al, [rbp+var_421] and al, 1 movzx eax, al lea rdi, aWorkspaceLlm4b_100; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 1260h; int lea rdx, aNextLogErrorDO_0; "next log error: %d offset: %llu log: "... mov [rsp+480h+var_480], eax mov al, 0 call _Z16glog_print_errorPKciS0_z; glog_print_error(char const*,int,char const*,...) jmp short loc_D339E3 loc_D339DD: jmp short $+2 loc_D339DF: jmp short $+2 loc_D339E1: jmp short $+2 loc_D339E3: mov rdi, [rbp+var_438] call my_free mov rdi, [rbp+var_468] add rdi, 480h call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *) mov eax, [rbp+var_428] mov [rbp+var_46C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D33A2F mov eax, [rbp+var_46C] add rsp, 480h pop rbp retn loc_D33A2F: call ___stack_chk_fail
long long MYSQL_BIN_LOG::purge_first_log(MYSQL_BIN_LOG *this, Relay_log_info *a2, char a3) { _QWORD *v4; // [rsp+30h] [rbp-450h] unsigned long long v5; // [rsp+38h] [rbp-448h] BYREF _QWORD *i; // [rsp+40h] [rbp-440h] char *v7; // [rsp+48h] [rbp-438h] int v8; // [rsp+54h] [rbp-42Ch] unsigned int log_pos; // [rsp+58h] [rbp-428h] char v10; // [rsp+5Fh] [rbp-421h] Relay_log_info *v11; // [rsp+60h] [rbp-420h] MYSQL_BIN_LOG *v12; // [rsp+68h] [rbp-418h] char v13[512]; // [rsp+70h] [rbp-410h] BYREF char v14[520]; // [rsp+270h] [rbp-210h] BYREF unsigned long long v15; // [rsp+478h] [rbp-8h] v15 = __readfsqword(0x28u); v12 = this; v11 = a2; v10 = a3 & 1; v7 = 0LL; v5 = 0LL; coro_mutex_lock((long long)this + 1152, (long long)"/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0x120Eu); for ( i = (_QWORD *)*((_QWORD *)a2 + 908); i; i = v4 ) { v4 = (_QWORD *)*i; if ( (i[6] & 1) == 0 || Atomic_counter<long long>::operator long long((long long)(i + 5)) < i[4] ) { v10 = 0; break; } if ( (v10 & 1) == 0 && !(unsigned int)strcmp((char *)i + 49, (char *)v11 + 7285) ) break; if ( !v4 ) { *((_QWORD *)v11 + 909) = 0LL; v10 = 1; v7 = (char *)my_strdup(key_memory_Relay_log_info_group_relay_log_name, (char *)i + 49, 0LL); } Relay_log_info::free_inuse_relaylog((long long)v11, i); } *((_QWORD *)v11 + 908) = i; if ( i ) v7 = (char *)my_strdup(key_memory_Relay_log_info_group_relay_log_name, (char *)i + 49, 0LL); log_pos = MYSQL_BIN_LOG::find_log_pos(this, (Relay_log_info *)((char *)v11 + 5848), (const char *)v11 + 7808, 0); if ( log_pos || (log_pos = MYSQL_BIN_LOG::find_next_log(this, (Relay_log_info *)((char *)v11 + 5848), 0)) != 0 ) { glog_print_error( "/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0x1234u, "next log error: %d offset: %llu log: %s included: %d", log_pos, *((_QWORD *)v11 + 795), (const char *)v11 + 7808, v10 & 1); } else { *((_QWORD *)v11 + 1040) = 4LL; memset(v14, 0LL); v14[0] = 2; strmake((char *)v11 + 7808, (char *)v11 + 5848, 511LL); if ( (v10 & 1) != 0 ) { *((_QWORD *)v11 + 975) = 4LL; memset(v13, 0LL); v13[0] = 2; strmake((char *)v11 + 7285, (char *)v11 + 5848, 511LL); Relay_log_info::notify_group_relay_log_name_update(v11); } if ( Relay_log_info::flush(v11) ) log_pos = -2; MYSQL_BIN_LOG::purge_logs((Relay_log_info *)((char *)v11 + 1216), v7, v10 & 1, 0, 0, &v5); coro_mutex_lock((long long)v11 + 9440, (long long)"/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0x1253u); Atomic_counter<unsigned long long>::operator-=((char *)v11 + 9376, v5); inline_mysql_cond_broadcast((long long)v11 + 9512); coro_mutex_unlock((long long)v11 + 9440); v8 = MYSQL_BIN_LOG::find_log_pos(this, (Relay_log_info *)((char *)v11 + 5848), (const char *)v11 + 7808, 0); if ( v8 ) glog_print_error( "/workspace/llm4binary/github2025/eloqsql/sql/log.cc", 0x1260u, "next log error: %d offset: %llu log: %s included: %d", v8, *((_QWORD *)v11 + 795), (const char *)v11 + 7285, v10 & 1); } my_free(v7); coro_mutex_unlock((long long)this + 1152); return log_pos; }
get_date_from_int: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RBP + -0x38],RDX MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0xf0] MOV RSI,RAX MOV RAX,qword ptr [RBP + -0x48] MOV AL,byte ptr [RAX + 0xe] LEA RDI,[RBP + -0x18] AND AL,0x1 MOVZX EDX,AL CALL 0x00aa8000 MOV RCX,qword ptr [RBP + -0x48] MOV AL,0x1 TEST byte ptr [RCX + 0x64],0x1 MOV byte ptr [RBP + -0x3d],AL JNZ 0x00d33616 MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x3c],EAX CALL 0x00d307d0 MOV RDI,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x50],RAX CALL 0x00c077a0 MOV RDI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x58] MOV R8,qword ptr [RBP + -0x50] MOV R9,RAX MOV ECX,dword ptr [RBP + -0x3c] LEA RSI,[RBP + -0x18] CALL 0x00b238e0 MOV byte ptr [RBP + -0x3d],AL LAB_00d33616: MOV AL,byte ptr [RBP + -0x3d] MOV byte ptr [RBP + -0x61],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00d33639 MOV AL,byte ptr [RBP + -0x61] AND AL,0x1 ADD RSP,0x70 POP RBP RET LAB_00d33639: CALL 0x00858480
/* Item::get_date_from_int(THD*, st_mysql_time*, date_mode_t) */ ulong __thiscall Item::get_date_from_int(Item *this,int8 param_1,int8 param_2,int4 param_4) { longlong lVar1; int8 uVar2; int8 uVar3; long in_FS_OFFSET; int1 local_45; Longlong_hybrid local_20 [16]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = (**(code **)(*(long *)this + 0xf0))(); Longlong_hybrid::Longlong_hybrid(local_20,lVar1,(bool)((byte)this[0xe] & 1)); local_45 = 1; if (((byte)this[100] & 1) == 0) { uVar2 = field_table_or_null(this); uVar3 = field_name_or_null(this); local_45 = int_to_datetime_with_warn(param_1,local_20,param_2,param_4,uVar2,uVar3); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_45) & 0xffffffffffffff01; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
48,735
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { // https://jinja.palletsprojects.com/en/3.0.x/templates/#for if (!iterable) throw std::runtime_error("ForNode.iterable is null"); if (!body) throw std::runtime_error("ForNode.body is null"); auto iterable_value = iterable->evaluate(context); Value::CallableType loop_function; std::function<void(Value&)> visit = [&](Value& iter) { auto filtered_items = Value::array(); if (!iter.is_null()) { if (!iterable_value.is_iterable()) { throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump()); } iterable_value.for_each([&](Value & item) { destructuring_assign(var_names, context, item); if (!condition || condition->evaluate(context).to_bool()) { filtered_items.push_back(item); } }); } if (filtered_items.empty()) { if (else_body) { else_body->render(out, context); } } else { auto loop = recursive ? Value::callable(loop_function) : Value::object(); loop.set("length", (int64_t) filtered_items.size()); size_t cycle_index = 0; loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.empty() || !args.kwargs.empty()) { throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg"); } auto item = args.args[cycle_index]; cycle_index = (cycle_index + 1) % args.args.size(); return item; })); auto loop_context = Context::make(Value::object(), context); loop_context->set("loop", loop); for (size_t i = 0, n = filtered_items.size(); i < n; ++i) { auto & item = filtered_items.at(i); destructuring_assign(var_names, loop_context, item); loop.set("index", (int64_t) i + 1); loop.set("index0", (int64_t) i); loop.set("revindex", (int64_t) (n - i)); loop.set("revindex0", (int64_t) (n - i - 1)); loop.set("length", (int64_t) n); loop.set("first", i == 0); loop.set("last", i == (n - 1)); loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value()); loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value()); try { body->render(out, loop_context); } catch (const LoopControlException & e) { if (e.control_type == LoopControlType::Break) break; if (e.control_type == LoopControlType::Continue) continue; } } } }; if (recursive) { loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) { throw std::runtime_error("loop() expects exactly 1 positional iterable argument"); } auto & items = args.args[0]; visit(items); return Value(); }; } visit(iterable_value); }
O2
cpp
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, %r14 movq 0x38(%rdi), %rsi testq %rsi, %rsi je 0x57ec8 movq %rdi, %rbx cmpq $0x0, 0x58(%rdi) je 0x57ee4 movq %rdx, %r15 leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x3ca02 xorps %xmm0, %xmm0 movq %rsp, %rax movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) leaq 0x40(%rsp), %rsi movq %r12, (%rsi) movq %rbx, 0x8(%rsi) movq %r15, 0x10(%rsi) movq %r14, 0x18(%rsi) movq %rax, 0x20(%rsi) leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x57fb0 cmpb $0x1, 0x68(%rbx) jne 0x57e8e leaq 0x40(%rsp), %rsi movq %r14, (%rsi) movq %rsp, %rdi callq 0x57ff8 leaq 0x20(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x4ff8e leaq 0x20(%rsp), %rdi callq 0x63a40 movq %rsp, %rdi callq 0x63a40 leaq 0x68(%rsp), %rdi callq 0x3cc92 addq $0xb8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r14 leaq 0x3a0bd(%rip), %rsi # 0x91f97 movq %rax, %rdi callq 0x20280 jmp 0x57efe pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r14 leaq 0x3a0ba(%rip), %rsi # 0x91fb0 movq %rax, %rdi callq 0x20280 movq 0x790e3(%rip), %rsi # 0xd0fe8 movq 0x79054(%rip), %rdx # 0xd0f60 movq %r14, %rdi callq 0x20b30 jmp 0x57f16 movq %rax, %rbx movq %r14, %rdi callq 0x20510 jmp 0x57f47 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x63a40 jmp 0x57f35 movq %rax, %rbx movq %rsp, %rdi callq 0x63a40 leaq 0x68(%rsp), %rdi callq 0x3cc92 movq %rbx, %rdi callq 0x20b90 nop
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0B8h mov r14, rsi mov rsi, [rdi+38h] test rsi, rsi jz loc_57EC8 mov rbx, rdi cmp qword ptr [rdi+58h], 0 jz loc_57EE4 mov r15, rdx lea r12, [rsp+0D8h+var_70] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) xorps xmm0, xmm0 mov rax, rsp movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax], xmm0 lea rsi, [rsp+0D8h+var_98] mov [rsi], r12 mov [rsi+8], rbx mov [rsi+10h], r15 mov [rsi+18h], r14 mov [rsi+20h], rax lea r14, [rsp+0D8h+var_B8] mov rdi, r14 call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1} &&) cmp byte ptr [rbx+68h], 1 jnz short loc_57E8E lea rsi, [rsp+0D8h+var_98] mov [rsi], r14 mov rdi, rsp call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_ loc_57E8E: lea rdi, [rsp+0D8h+var_B8] lea rsi, [rsp+0D8h+var_70] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) lea rdi, [rsp+0D8h+var_B8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0D8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 0B8h pop rbx pop r12 pop r14 pop r15 retn loc_57EC8: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeIterabl; "ForNode.iterable is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_57EFE loc_57EE4: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeBodyIsN; "ForNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_57EFE: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_57F16: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_57F47 mov rbx, rax lea rdi, [rsp+0D8h+var_B8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_57F35 mov rbx, rax loc_57F35: mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0D8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_57F47: mov rdi, rbx call __Unwind_Resume
void minja::ForNode::do_render(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 std::runtime_error *exception; // r14 _BYTE v11[32]; // [rsp+0h] [rbp-D8h] BYREF _BYTE v12[32]; // [rsp+20h] [rbp-B8h] BYREF _QWORD v13[5]; // [rsp+40h] [rbp-98h] BYREF _BYTE v14[112]; // [rsp+68h] [rbp-70h] BYREF v4 = *(void (****)(void))(a1 + 56); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.iterable is null"); goto LABEL_8; } if ( !*(_QWORD *)(a1 + 88) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.body is null"); LABEL_8: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v14, v4); v13[0] = v14; v13[1] = a1; v13[2] = a3; v13[3] = a2; v13[4] = v11; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>( v12, v13, v6, v7, v8, v9, 0LL, 0LL, 0LL, 0LL); if ( *(_BYTE *)(a1 + 104) == 1 ) { v13[0] = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(v11); } std::function<void ()(minja::Value &)>::operator()((long long)v12); std::_Function_base::~_Function_base((std::_Function_base *)v12); std::_Function_base::~_Function_base((std::_Function_base *)v11); minja::Value::~Value((minja::Value *)v14); }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RSI MOV RSI,qword ptr [RDI + 0x38] TEST RSI,RSI JZ 0x00157ec8 MOV RBX,RDI CMP qword ptr [RDI + 0x58],0x0 JZ 0x00157ee4 MOV R15,RDX LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x0013ca02 XORPS XMM0,XMM0 MOV RAX,RSP MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],R12 MOV qword ptr [RSI + 0x8],RBX MOV qword ptr [RSI + 0x10],R15 MOV qword ptr [RSI + 0x18],R14 MOV qword ptr [RSI + 0x20],RAX LAB_00157e6b: LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x00157fb0 CMP byte ptr [RBX + 0x68],0x1 JNZ 0x00157e8e LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],R14 MOV RDI,RSP CALL 0x00157ff8 LAB_00157e8e: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x68] CALL 0x0014ff8e LAB_00157e9d: LEA RDI,[RSP + 0x20] CALL 0x00163a40 MOV RDI,RSP CALL 0x00163a40 LEA RDI,[RSP + 0x68] CALL 0x0013cc92 ADD RSP,0xb8 POP RBX POP R12 POP R14 POP R15 RET LAB_00157ec8: PUSH 0x10 POP RDI CALL 0x00120390 MOV R14,RAX LAB_00157ed3: LEA RSI,[0x191f97] MOV RDI,RAX CALL 0x00120280 LAB_00157ee2: JMP 0x00157efe LAB_00157ee4: PUSH 0x10 POP RDI CALL 0x00120390 MOV R14,RAX LAB_00157eef: LEA RSI,[0x191fb0] MOV RDI,RAX CALL 0x00120280 LAB_00157efe: MOV RSI,qword ptr [0x001d0fe8] MOV RDX,qword ptr [0x001d0f60] MOV RDI,R14 CALL 0x00120b30
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2) { runtime_error *this_00; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; _lambda_minja__Value___1_ local_b8 [32]; Expression *local_98; ForNode *local_90; shared_ptr *local_88; ostringstream *local_80; int1 *local_78; Expression local_70 [80]; if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00157ed3 to 00157ee1 has its CatchHandler @ 00157f16 */ std::runtime_error::runtime_error(this_00,"ForNode.iterable is null"); } else { if (*(long *)(this + 0x58) != 0) { Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38)); local_c8 = 0; uStack_c0 = 0; local_d8 = 0; uStack_d0 = 0; /* try { // try from 00157e6b to 00157e77 has its CatchHandler @ 00157f32 */ local_98 = local_70; local_90 = this; local_88 = param_2; local_80 = param_1; local_78 = (int1 *)&local_d8; std::function<void(minja::Value&)>:: function<minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value&)_1_,void> (local_b8); if (this[0x68] == (ForNode)0x1) { local_98 = (Expression *)local_b8; std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> *)&local_d8, (_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *) &local_98); } /* try { // try from 00157e8e to 00157e9c has its CatchHandler @ 00157f23 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)local_b8,(Value *)local_70); std::_Function_base::~_Function_base((_Function_base *)local_b8); std::_Function_base::~_Function_base((_Function_base *)&local_d8); Value::~Value((Value *)local_70); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00157eef to 00157efd has its CatchHandler @ 00157f14 */ std::runtime_error::runtime_error(this_00,"ForNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001d0fe8,PTR__runtime_error_001d0f60); }
48,736
get_present_hash_link
eloqsql/storage/maria/ma_pagecache.c
static PAGECACHE_HASH_LINK *get_present_hash_link(PAGECACHE *pagecache, PAGECACHE_FILE *file, pgcache_page_no_t pageno, PAGECACHE_HASH_LINK ***start) { reg1 PAGECACHE_HASH_LINK *hash_link; #if defined(PAGECACHE_DEBUG) int cnt; #endif DBUG_ENTER("get_present_hash_link"); DBUG_PRINT("enter", ("fd: %u pos: %lu", (uint) file->file, (ulong) pageno)); /* Find the bucket in the hash table for the pair (file, pageno); start contains the head of the bucket list, hash_link points to the first member of the list */ hash_link= *(*start= &pagecache->hash_root[PAGECACHE_HASH(pagecache, *file, pageno)]); #if defined(PAGECACHE_DEBUG) cnt= 0; #endif /* Look for an element for the pair (file, pageno) in the bucket chain */ while (hash_link && (hash_link->pageno != pageno || hash_link->file.file != file->file)) { hash_link= hash_link->next; #if defined(PAGECACHE_DEBUG) cnt++; if (! (cnt <= pagecache->hash_links_used)) { int i; for (i=0, hash_link= **start ; i < cnt ; i++, hash_link= hash_link->next) { KEYCACHE_DBUG_PRINT("get_present_hash_link", ("fd: %u pos: %lu", (uint) hash_link->file.file, (ulong) hash_link->pageno)); } } KEYCACHE_DBUG_ASSERT(cnt <= pagecache->hash_links_used); #endif } if (hash_link) { DBUG_PRINT("exit", ("hash_link: %p", hash_link)); /* Register the request for the page */ hash_link->requests++; } /* As soon as the caller will release the page cache's lock, "hash_link" will be potentially obsolete (unusable) information. */ DBUG_RETURN(hash_link); }
O0
c
get_present_hash_link: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) jmp 0x9db16 movq -0x8(%rbp), %rax movq 0x88(%rax), %rax movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rdx movslq 0x10(%rdx), %rdx addq %rdx, %rcx movq -0x8(%rbp), %rdx movq 0x20(%rdx), %rdx subq $0x1, %rdx andq %rdx, %rcx movq %rcx, %rdx shlq $0x3, %rdx movq %rax, %rsi addq %rdx, %rsi movq -0x20(%rbp), %rdx movq %rsi, (%rdx) movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) xorl %eax, %eax cmpq $0x0, -0x28(%rbp) movb %al, -0x29(%rbp) je 0x9db94 movq -0x28(%rbp), %rax movq 0x60(%rax), %rcx movb $0x1, %al cmpq -0x18(%rbp), %rcx movb %al, -0x2a(%rbp) jne 0x9db8e movq -0x28(%rbp), %rax movl 0x28(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x10(%rcx), %eax setne %al movb %al, -0x2a(%rbp) movb -0x2a(%rbp), %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0x9db9d jmp 0x9dbaa movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0x9db5b cmpq $0x0, -0x28(%rbp) je 0x9dbc2 jmp 0x9dbb3 jmp 0x9dbb5 movq -0x28(%rbp), %rax movl 0x68(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x68(%rax) jmp 0x9dbc4 movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
get_present_hash_link: 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 jmp short $+2 loc_9DB16: mov rax, [rbp+var_8] mov rax, [rax+88h] mov rcx, [rbp+var_18] mov rdx, [rbp+var_10] movsxd rdx, dword ptr [rdx+10h] add rcx, rdx mov rdx, [rbp+var_8] mov rdx, [rdx+20h] sub rdx, 1 and rcx, rdx mov rdx, rcx shl rdx, 3 mov rsi, rax add rsi, rdx mov rdx, [rbp+var_20] mov [rdx], rsi mov rax, [rax+rcx*8] mov [rbp+var_28], rax loc_9DB5B: xor eax, eax cmp [rbp+var_28], 0 mov [rbp+var_29], al jz short loc_9DB94 mov rax, [rbp+var_28] mov rcx, [rax+60h] mov al, 1 cmp rcx, [rbp+var_18] mov [rbp+var_2A], al jnz short loc_9DB8E mov rax, [rbp+var_28] mov eax, [rax+28h] mov rcx, [rbp+var_10] cmp eax, [rcx+10h] setnz al mov [rbp+var_2A], al loc_9DB8E: mov al, [rbp+var_2A] mov [rbp+var_29], al loc_9DB94: mov al, [rbp+var_29] test al, 1 jnz short loc_9DB9D jmp short loc_9DBAA loc_9DB9D: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_28], rax jmp short loc_9DB5B loc_9DBAA: cmp [rbp+var_28], 0 jz short loc_9DBC2 jmp short $+2 loc_9DBB3: jmp short $+2 loc_9DBB5: mov rax, [rbp+var_28] mov ecx, [rax+68h] add ecx, 1 mov [rax+68h], ecx loc_9DBC2: jmp short $+2 loc_9DBC4: mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_38] pop rbp retn
long long * get_present_hash_link(long long a1, long long a2, long long a3, _QWORD *a4) { long long v4; // rax long long v5; // rcx bool v7; // [rsp+Eh] [rbp-2Ah] bool v8; // [rsp+Fh] [rbp-29h] long long *i; // [rsp+10h] [rbp-28h] v4 = *(_QWORD *)(a1 + 136); v5 = (*(_QWORD *)(a1 + 32) - 1LL) & (*(int *)(a2 + 16) + a3); *a4 = 8 * v5 + v4; for ( i = *(long long **)(v4 + 8 * v5); ; i = (long long *)*i ) { v8 = 0; if ( i ) { v7 = 1; if ( i[12] == a3 ) v7 = *((_DWORD *)i + 10) != *(_DWORD *)(a2 + 16); v8 = v7; } if ( !v8 ) break; } if ( i ) ++*((_DWORD *)i + 26); return i; }
get_present_hash_link: 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 JMP 0x0019db16 LAB_0019db16: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x88] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] MOVSXD RDX,dword ptr [RDX + 0x10] ADD RCX,RDX MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x20] SUB RDX,0x1 AND RCX,RDX MOV RDX,RCX SHL RDX,0x3 MOV RSI,RAX ADD RSI,RDX MOV RDX,qword ptr [RBP + -0x20] MOV qword ptr [RDX],RSI MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX LAB_0019db5b: XOR EAX,EAX CMP qword ptr [RBP + -0x28],0x0 MOV byte ptr [RBP + -0x29],AL JZ 0x0019db94 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x60] MOV AL,0x1 CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x2a],AL JNZ 0x0019db8e MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x10] SETNZ AL MOV byte ptr [RBP + -0x2a],AL LAB_0019db8e: MOV AL,byte ptr [RBP + -0x2a] MOV byte ptr [RBP + -0x29],AL LAB_0019db94: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x0019db9d JMP 0x0019dbaa LAB_0019db9d: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x0019db5b LAB_0019dbaa: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0019dbc2 JMP 0x0019dbb3 LAB_0019dbb3: JMP 0x0019dbb5 LAB_0019dbb5: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,0x1 MOV dword ptr [RAX + 0x68],ECX LAB_0019dbc2: JMP 0x0019dbc4 LAB_0019dbc4: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] POP RBP RET
int8 * get_present_hash_link(long param_1,long param_2,long param_3,long *param_4) { long lVar1; ulong uVar2; bool bVar3; int8 *local_30; lVar1 = *(long *)(param_1 + 0x88); uVar2 = param_3 + *(int *)(param_2 + 0x10) & *(long *)(param_1 + 0x20) - 1U; *param_4 = lVar1 + uVar2 * 8; local_30 = *(int8 **)(lVar1 + uVar2 * 8); while( true ) { bVar3 = false; if ((local_30 != (int8 *)0x0) && (bVar3 = true, local_30[0xc] == param_3)) { bVar3 = *(int *)(local_30 + 5) != *(int *)(param_2 + 0x10); } if (!bVar3) break; local_30 = (int8 *)*local_30; } if (local_30 != (int8 *)0x0) { *(int *)(local_30 + 0xd) = *(int *)(local_30 + 0xd) + 1; } return local_30; }
48,737
void chess::movegen::whileBitboardAdd<void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square)>(chess::Movelist&, chess::Bitboard, void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square))
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
explicit operator bool() const noexcept { return bits != 0; }
O1
cpp
void chess::movegen::whileBitboardAdd<void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square)>(chess::Movelist&, chess::Bitboard, void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testq %rsi, %rsi je 0xa282 movq %rsi, %rbx movq %rdi, %r14 leaq 0x50(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x10(%rsp) movq 0x8(%rax), %rcx movq %rcx, (%rsp) movq 0x10(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x18(%rax), %r13 leaq 0x1e47e(%rip), %r12 # 0x28610 bsfq %rbx, %r15 movq 0x10(%rsp), %rax movq (%rax), %rbp movq 0x8(%rsp), %rax movq (%rax), %rax movl $0x1, %edx movl %r15d, %ecx shlq %cl, %rdx btq %r15, %rbp jae 0xa1da movl %r15d, %edx shll $0x5, %edx andq (%rdx,%r12), %rax imulq 0x8(%rdx,%r12), %rax movb 0x18(%rdx,%r12), %cl shrq %cl, %rax movq 0x10(%rdx,%r12), %rcx andq (%rcx,%rax,8), %rbp jmp 0xa237 movl %r15d, %esi shll $0x5, %esi leaq 0xe6c29(%rip), %r8 # 0xf0e10 movq (%rsi,%r8), %rdi andq %rax, %rdi imulq 0x8(%rsi,%r8), %rdi movb 0x18(%rsi,%r8), %cl shrq %cl, %rdi movq (%rsp), %rcx movq (%rcx), %rcx movq 0x10(%rsi,%r8), %rsi movq (%rsi,%rdi,8), %rbp testq %rdx, %rcx je 0xa216 andq %rcx, %rbp jmp 0xa237 movl %r15d, %edx shll $0x5, %edx andq (%rdx,%r12), %rax imulq 0x8(%rdx,%r12), %rax movb 0x18(%rdx,%r12), %cl shrq %cl, %rax movq 0x10(%rdx,%r12), %rcx orq (%rcx,%rax,8), %rbp andq (%r13), %rbp je 0xa275 bsfq %rbp, %rsi movl %r15d, %edi movl $0x1, %edx callq 0x80ea movslq 0x400(%r14), %rcx cmpq $0x100, %rcx # imm = 0x100 jge 0xa291 leaq -0x1(%rbp), %rdx leal 0x1(%rcx), %esi movl %esi, 0x400(%r14) movl %eax, (%r14,%rcx,4) andq %rdx, %rbp jne 0xa23d leaq -0x1(%rbx), %rax andq %rax, %rbx jne 0xa192 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x6cce(%rip), %rdi # 0x10f66 leaq 0x693d(%rip), %rsi # 0x10bdc leaq 0x6cdd(%rip), %rcx # 0x10f83 movl $0x578, %edx # imm = 0x578 callq 0x3130
_ZN5chess7movegen16whileBitboardAddIZNS0_10legalmovesILNS_5Color10underlyingE1ELNS0_11MoveGenTypeE0EEEvRNS_8MovelistERKNS_5BoardEiEUlNS_6SquareEE3_EEvS7_NS_8BitboardET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test rsi, rsi jz loc_A282 mov rbx, rsi mov r14, rdi lea rax, [rsp+48h+arg_0] mov rcx, [rax] mov [rsp+48h+var_38], rcx mov rcx, [rax+8] mov [rsp+48h+var_48], rcx mov rcx, [rax+10h] mov [rsp+48h+var_40], rcx mov r13, [rax+18h] lea r12, _ZN5chess7attacks11BishopTableE; chess::attacks::BishopTable loc_A192: bsf r15, rbx mov rax, [rsp+48h+var_38] mov rbp, [rax] mov rax, [rsp+48h+var_40] mov rax, [rax] mov edx, 1 mov ecx, r15d shl rdx, cl bt rbp, r15 jnb short loc_A1DA mov edx, r15d shl edx, 5 and rax, [rdx+r12] imul rax, [rdx+r12+8] mov cl, [rdx+r12+18h] shr rax, cl mov rcx, [rdx+r12+10h] and rbp, [rcx+rax*8] jmp short loc_A237 loc_A1DA: mov esi, r15d shl esi, 5 lea r8, _ZN5chess7attacks9RookTableE; chess::attacks::RookTable mov rdi, [rsi+r8] and rdi, rax imul rdi, [rsi+r8+8] mov cl, [rsi+r8+18h] shr rdi, cl mov rcx, [rsp+48h+var_48] mov rcx, [rcx] mov rsi, [rsi+r8+10h] mov rbp, [rsi+rdi*8] test rcx, rdx jz short loc_A216 and rbp, rcx jmp short loc_A237 loc_A216: mov edx, r15d shl edx, 5 and rax, [rdx+r12] imul rax, [rdx+r12+8] mov cl, [rdx+r12+18h] shr rax, cl mov rcx, [rdx+r12+10h] or rbp, [rcx+rax*8] loc_A237: and rbp, [r13+0] jz short loc_A275 loc_A23D: bsf rsi, rbp mov edi, r15d mov edx, 1 call _ZN5chess4Move4makeILt0EEES0_NS_6SquareES2_NS_9PieceTypeE; chess::Move::make<(ushort)0>(chess::Square,chess::Square,chess::PieceType) movsxd rcx, dword ptr [r14+400h] cmp rcx, 100h jge short loc_A291 lea rdx, [rbp-1] lea esi, [rcx+1] mov [r14+400h], esi mov [r14+rcx*4], eax and rbp, rdx jnz short loc_A23D loc_A275: lea rax, [rbx-1] and rbx, rax jnz loc_A192 loc_A282: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A291: lea rdi, aSizeConstantsM; "size_ < constants::MAX_MOVES" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidChessMovel; "void chess::Movelist::add(value_type &&"... mov edx, 578h call ___assert_fail
void chess::movegen::whileBitboardAdd<void chess::movegen::legalmoves<(chess::Color::underlying)1,(chess::movegen::MoveGenType)0>(chess::Movelist &,chess::Board const&,int)::{lambda(chess::Square)#5}>( long long a1, unsigned long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long *a7, _QWORD *a8, unsigned long long *a9, _QWORD *a10) { unsigned long long v10; // rbx unsigned long long v11; // r15 long long v12; // rbp unsigned long long v13; // rax long long v14; // rbp long long v15; // rbp unsigned long long i; // rbp unsigned long long v17; // rsi int v18; // eax long long v19; // rcx if ( a2 ) { v10 = a2; do { _BitScanForward64(&v11, v10); v12 = *a7; v13 = *a9; if ( _bittest64(&v12, v11) ) { v14 = *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 16) + 8 * ((*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 8) * (*(_QWORD *)((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11)) & v13)) >> *((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 24))) & v12; } else { v15 = *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::RookTable + (unsigned int)(32 * v11) + 16) + 8 * ((*(_QWORD *)((char *)&chess::attacks::RookTable + (unsigned int)(32 * v11) + 8) * (v13 & *(_QWORD *)((_BYTE *)&chess::attacks::RookTable + (unsigned int)(32 * v11)))) >> *((_BYTE *)&chess::attacks::RookTable + (unsigned int)(32 * v11) + 24))); if ( ((1LL << v11) & *a8) != 0 ) v14 = *a8 & v15; else v14 = *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 16) + 8 * ((*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 8) * (*(_QWORD *)((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11)) & v13)) >> *((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 24))) | v15; } for ( i = *a10 & v14; i; i &= i - 1 ) { _BitScanForward64(&v17, i); v18 = chess::Move::make<(unsigned short)0>(v11, v17, 1u); v19 = *(int *)(a1 + 1024); if ( v19 >= 256 ) __assert_fail( "size_ < constants::MAX_MOVES", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 1400LL, "void chess::Movelist::add(value_type &&)"); *(_DWORD *)(a1 + 1024) = v19 + 1; *(_DWORD *)(a1 + 4 * v19) = v18; } v10 &= v10 - 1; } while ( v10 ); } }
whileBitboardAdd<chess::movegen::legalmoves<(chess::Color::underlying)1,(chess::movegen::MoveGenType)0>(chess::Movelist&,chess::Board_const&,int)::{lambda(chess::Square)#5}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST RSI,RSI JZ 0x0010a282 MOV RBX,RSI MOV R14,RDI LEA RAX,[RSP + 0x50] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RCX MOV R13,qword ptr [RAX + 0x18] LEA R12,[0x128610] LAB_0010a192: BSF R15,RBX MOV RAX,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV EDX,0x1 MOV ECX,R15D SHL RDX,CL BT RBP,R15 JNC 0x0010a1da MOV EDX,R15D SHL EDX,0x5 AND RAX,qword ptr [RDX + R12*0x1] IMUL RAX,qword ptr [RDX + R12*0x1 + 0x8] MOV CL,byte ptr [RDX + R12*0x1 + 0x18] SHR RAX,CL MOV RCX,qword ptr [RDX + R12*0x1 + 0x10] AND RBP,qword ptr [RCX + RAX*0x8] JMP 0x0010a237 LAB_0010a1da: MOV ESI,R15D SHL ESI,0x5 LEA R8,[0x1f0e10] MOV RDI,qword ptr [RSI + R8*0x1] AND RDI,RAX IMUL RDI,qword ptr [RSI + R8*0x1 + 0x8] MOV CL,byte ptr [RSI + R8*0x1 + 0x18] SHR RDI,CL MOV RCX,qword ptr [RSP] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RSI + R8*0x1 + 0x10] MOV RBP,qword ptr [RSI + RDI*0x8] TEST RCX,RDX JZ 0x0010a216 AND RBP,RCX JMP 0x0010a237 LAB_0010a216: MOV EDX,R15D SHL EDX,0x5 AND RAX,qword ptr [RDX + R12*0x1] IMUL RAX,qword ptr [RDX + R12*0x1 + 0x8] MOV CL,byte ptr [RDX + R12*0x1 + 0x18] SHR RAX,CL MOV RCX,qword ptr [RDX + R12*0x1 + 0x10] OR RBP,qword ptr [RCX + RAX*0x8] LAB_0010a237: AND RBP,qword ptr [R13] JZ 0x0010a275 LAB_0010a23d: BSF RSI,RBP MOV EDI,R15D MOV EDX,0x1 CALL 0x001080ea MOVSXD RCX,dword ptr [R14 + 0x400] CMP RCX,0x100 JGE 0x0010a291 LEA RDX,[RBP + -0x1] LEA ESI,[RCX + 0x1] MOV dword ptr [R14 + 0x400],ESI MOV dword ptr [R14 + RCX*0x4],EAX AND RBP,RDX JNZ 0x0010a23d LAB_0010a275: LEA RAX,[RBX + -0x1] AND RBX,RAX JNZ 0x0010a192 LAB_0010a282: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010a291: LEA RDI,[0x110f66] LEA RSI,[0x110bdc] LEA RCX,[0x110f83] MOV EDX,0x578 CALL 0x00103130
/* void chess::movegen::whileBitboardAdd<chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::{lambda(chess::Square)#5}>(chess::Movelist&, chess::Bitboard, chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::{lambda(chess::Square)#5}) */ void chess::movegen:: whileBitboardAdd<chess::movegen::legalmoves<(chess::Color::underlying)1,(chess::movegen::MoveGenType)0>(chess::Movelist&,chess::Board_const&,int)::_lambda(chess::Square)_5_> (long param_1,ulong param_2) { ulong uVar1; ulong uVar2; long lVar3; int4 uVar4; ulong uVar5; ulong uVar6; int iVar7; ulong *in_stack_00000008; ulong *in_stack_00000010; ulong *in_stack_00000018; ulong *in_stack_00000020; if (param_2 != 0) { do { uVar2 = 0; if (param_2 != 0) { for (; (param_2 >> uVar2 & 1) == 0; uVar2 = uVar2 + 1) { } } uVar1 = *in_stack_00000018; iVar7 = (int)uVar2; if ((*in_stack_00000008 >> (uVar2 & 0x3f) & 1) == 0) { uVar6 = (ulong)(uint)(iVar7 << 5); uVar6 = *(ulong *)(*(long *)((long)&DAT_001f0e20 + uVar6) + ((*(ulong *)((long)&attacks::RookTable + uVar6) & uVar1) * *(long *)((long)&DAT_001f0e18 + uVar6) >> ((&DAT_001f0e28)[uVar6] & 0x3f) ) * 8); if ((*in_stack_00000010 & 1L << ((byte)uVar2 & 0x3f)) == 0) { uVar5 = (ulong)(uint)(iVar7 << 5); uVar6 = uVar6 | *(ulong *)(*(long *)((long)&DAT_00128620 + uVar5) + ((uVar1 & *(ulong *)((long)&attacks::BishopTable + uVar5)) * *(long *)((long)&DAT_00128618 + uVar5) >> ((&DAT_00128628)[uVar5] & 0x3f)) * 8); } else { uVar6 = uVar6 & *in_stack_00000010; } } else { uVar6 = (ulong)(uint)(iVar7 << 5); uVar6 = *in_stack_00000008 & *(ulong *)(*(long *)((long)&DAT_00128620 + uVar6) + ((uVar1 & *(ulong *)((long)&attacks::BishopTable + uVar6)) * *(long *)((long)&DAT_00128618 + uVar6) >> ((&DAT_00128628)[uVar6] & 0x3f) ) * 8); } for (uVar6 = uVar6 & *in_stack_00000020; uVar6 != 0; uVar6 = uVar6 & uVar6 - 1) { lVar3 = 0; if (uVar6 != 0) { for (; (uVar6 >> lVar3 & 1) == 0; lVar3 = lVar3 + 1) { } } uVar4 = Move::make<(unsigned_short)0>(uVar2 & 0xffffffff,lVar3,1); iVar7 = *(int *)(param_1 + 0x400); if (0xff < (long)iVar7) { /* WARNING: Subroutine does not return */ __assert_fail("size_ < constants::MAX_MOVES", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x578,"void chess::Movelist::add(value_type &&)"); } *(int *)(param_1 + 0x400) = iVar7 + 1; *(int4 *)(param_1 + (long)iVar7 * 4) = uVar4; } param_2 = param_2 & param_2 - 1; } while (param_2 != 0); } return; }
48,738
void chess::movegen::whileBitboardAdd<void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square)>(chess::Movelist&, chess::Bitboard, void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square))
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
explicit operator bool() const noexcept { return bits != 0; }
O3
cpp
void chess::movegen::whileBitboardAdd<void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square)>(chess::Movelist&, chess::Bitboard, void chess::movegen::legalmoves<(chess::Color::underlying)1, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::'lambda3'(chess::Square)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testq %rsi, %rsi je 0x8978 movq %rsi, %rbx movq %rdi, %r14 leaq 0x50(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x10(%rsp) movq 0x8(%rax), %rcx movq %rcx, (%rsp) movq 0x10(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x18(%rax), %r13 leaq 0x1dd78(%rip), %r12 # 0x26600 bsfq %rbx, %r15 movq 0x10(%rsp), %rax movq (%rax), %rbp movq 0x8(%rsp), %rax movq (%rax), %rax movl $0x1, %edx movl %r15d, %ecx shlq %cl, %rdx btq %r15, %rbp jae 0x88d0 movl %r15d, %edx shll $0x5, %edx andq (%rdx,%r12), %rax imulq 0x8(%rdx,%r12), %rax movb 0x18(%rdx,%r12), %cl shrq %cl, %rax movq 0x10(%rdx,%r12), %rcx andq (%rcx,%rax,8), %rbp jmp 0x892d movl %r15d, %esi shll $0x5, %esi leaq 0xe6523(%rip), %r8 # 0xeee00 movq (%rsi,%r8), %rdi andq %rax, %rdi imulq 0x8(%rsi,%r8), %rdi movb 0x18(%rsi,%r8), %cl shrq %cl, %rdi movq (%rsp), %rcx movq (%rcx), %rcx movq 0x10(%rsi,%r8), %rsi movq (%rsi,%rdi,8), %rbp testq %rdx, %rcx je 0x890c andq %rcx, %rbp jmp 0x892d movl %r15d, %edx shll $0x5, %edx andq (%rdx,%r12), %rax imulq 0x8(%rdx,%r12), %rax movb 0x18(%rdx,%r12), %cl shrq %cl, %rax movq 0x10(%rdx,%r12), %rcx orq (%rcx,%rax,8), %rbp andq (%r13), %rbp je 0x896b bsfq %rbp, %rsi movl %r15d, %edi movl $0x1, %edx callq 0x6fa2 movslq 0x400(%r14), %rcx cmpq $0x100, %rcx # imm = 0x100 jge 0x8987 leaq -0x1(%rbp), %rdx leal 0x1(%rcx), %esi movl %esi, 0x400(%r14) movl %eax, (%r14,%rcx,4) andq %rdx, %rbp jne 0x8933 leaq -0x1(%rbx), %rax andq %rax, %rbx jne 0x8888 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x65a8(%rip), %rdi # 0xef36 leaq 0x6217(%rip), %rsi # 0xebac leaq 0x65b7(%rip), %rcx # 0xef53 movl $0x578, %edx # imm = 0x578 callq 0x2130
_ZN5chess7movegen16whileBitboardAddIZNS0_10legalmovesILNS_5Color10underlyingE0ELNS0_11MoveGenTypeE0EEEvRNS_8MovelistERKNS_5BoardEiEUlNS_6SquareEE3_EEvS7_NS_8BitboardET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test rsi, rsi jz loc_8978 mov rbx, rsi mov r14, rdi lea rax, [rsp+48h+arg_0] mov rcx, [rax] mov [rsp+48h+var_38], rcx mov rcx, [rax+8] mov [rsp+48h+var_48], rcx mov rcx, [rax+10h] mov [rsp+48h+var_40], rcx mov r13, [rax+18h] lea r12, _ZN5chess7attacks11BishopTableE; chess::attacks::BishopTable loc_8888: bsf r15, rbx mov rax, [rsp+48h+var_38] mov rbp, [rax] mov rax, [rsp+48h+var_40] mov rax, [rax] mov edx, 1 mov ecx, r15d shl rdx, cl bt rbp, r15 jnb short loc_88D0 mov edx, r15d shl edx, 5 and rax, [rdx+r12] imul rax, [rdx+r12+8] mov cl, [rdx+r12+18h] shr rax, cl mov rcx, [rdx+r12+10h] and rbp, [rcx+rax*8] jmp short loc_892D loc_88D0: mov esi, r15d shl esi, 5 lea r8, _ZN5chess7attacks9RookTableE; chess::attacks::RookTable mov rdi, [rsi+r8] and rdi, rax imul rdi, [rsi+r8+8] mov cl, [rsi+r8+18h] shr rdi, cl mov rcx, [rsp+48h+var_48] mov rcx, [rcx] mov rsi, [rsi+r8+10h] mov rbp, [rsi+rdi*8] test rcx, rdx jz short loc_890C and rbp, rcx jmp short loc_892D loc_890C: mov edx, r15d shl edx, 5 and rax, [rdx+r12] imul rax, [rdx+r12+8] mov cl, [rdx+r12+18h] shr rax, cl mov rcx, [rdx+r12+10h] or rbp, [rcx+rax*8] loc_892D: and rbp, [r13+0] jz short loc_896B loc_8933: bsf rsi, rbp mov edi, r15d mov edx, 1 call _ZN5chess4Move4makeILt0EEES0_NS_6SquareES2_NS_9PieceTypeE; chess::Move::make<(ushort)0>(chess::Square,chess::Square,chess::PieceType) movsxd rcx, dword ptr [r14+400h] cmp rcx, 100h jge short loc_8987 lea rdx, [rbp-1] lea esi, [rcx+1] mov [r14+400h], esi mov [r14+rcx*4], eax and rbp, rdx jnz short loc_8933 loc_896B: lea rax, [rbx-1] and rbx, rax jnz loc_8888 loc_8978: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8987: lea rdi, aSizeConstantsM; "size_ < constants::MAX_MOVES" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidChessMovel; "void chess::Movelist::add(value_type &&"... mov edx, 578h call ___assert_fail
void chess::movegen::whileBitboardAdd<void chess::movegen::legalmoves<(chess::Color::underlying)0,(chess::movegen::MoveGenType)0>(chess::Movelist &,chess::Board const&,int)::{lambda(chess::Square)#5}>( long long a1, unsigned long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long *a7, _QWORD *a8, unsigned long long *a9, _QWORD *a10) { unsigned long long v10; // rbx unsigned long long v11; // r15 long long v12; // rbp unsigned long long v13; // rax long long v14; // rbp long long v15; // rbp unsigned long long i; // rbp unsigned long long v17; // rsi int v18; // eax long long v19; // rcx if ( a2 ) { v10 = a2; do { _BitScanForward64(&v11, v10); v12 = *a7; v13 = *a9; if ( _bittest64(&v12, v11) ) { v14 = *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 16) + 8 * ((*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 8) * (*(_QWORD *)((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11)) & v13)) >> *((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 24))) & v12; } else { v15 = *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::RookTable + (unsigned int)(32 * v11) + 16) + 8 * ((*(_QWORD *)((char *)&chess::attacks::RookTable + (unsigned int)(32 * v11) + 8) * (v13 & *(_QWORD *)((_BYTE *)&chess::attacks::RookTable + (unsigned int)(32 * v11)))) >> *((_BYTE *)&chess::attacks::RookTable + (unsigned int)(32 * v11) + 24))); if ( ((1LL << v11) & *a8) != 0 ) v14 = *a8 & v15; else v14 = *(_QWORD *)(*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 16) + 8 * ((*(_QWORD *)((char *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 8) * (*(_QWORD *)((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11)) & v13)) >> *((_BYTE *)&chess::attacks::BishopTable + (unsigned int)(32 * v11) + 24))) | v15; } for ( i = *a10 & v14; i; i &= i - 1 ) { _BitScanForward64(&v17, i); v18 = chess::Move::make<(unsigned short)0>(v11, v17, 1u); v19 = *(int *)(a1 + 1024); if ( v19 >= 256 ) __assert_fail( "size_ < constants::MAX_MOVES", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 1400LL, "void chess::Movelist::add(value_type &&)"); *(_DWORD *)(a1 + 1024) = v19 + 1; *(_DWORD *)(a1 + 4 * v19) = v18; } v10 &= v10 - 1; } while ( v10 ); } }
whileBitboardAdd<chess::movegen::legalmoves<(chess::Color::underlying)0,(chess::movegen::MoveGenType)0>(chess::Movelist&,chess::Board_const&,int)::{lambda(chess::Square)#5}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST RSI,RSI JZ 0x00108978 MOV RBX,RSI MOV R14,RDI LEA RAX,[RSP + 0x50] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RCX MOV R13,qword ptr [RAX + 0x18] LEA R12,[0x126600] LAB_00108888: BSF R15,RBX MOV RAX,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV EDX,0x1 MOV ECX,R15D SHL RDX,CL BT RBP,R15 JNC 0x001088d0 MOV EDX,R15D SHL EDX,0x5 AND RAX,qword ptr [RDX + R12*0x1] IMUL RAX,qword ptr [RDX + R12*0x1 + 0x8] MOV CL,byte ptr [RDX + R12*0x1 + 0x18] SHR RAX,CL MOV RCX,qword ptr [RDX + R12*0x1 + 0x10] AND RBP,qword ptr [RCX + RAX*0x8] JMP 0x0010892d LAB_001088d0: MOV ESI,R15D SHL ESI,0x5 LEA R8,[0x1eee00] MOV RDI,qword ptr [RSI + R8*0x1] AND RDI,RAX IMUL RDI,qword ptr [RSI + R8*0x1 + 0x8] MOV CL,byte ptr [RSI + R8*0x1 + 0x18] SHR RDI,CL MOV RCX,qword ptr [RSP] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RSI + R8*0x1 + 0x10] MOV RBP,qword ptr [RSI + RDI*0x8] TEST RCX,RDX JZ 0x0010890c AND RBP,RCX JMP 0x0010892d LAB_0010890c: MOV EDX,R15D SHL EDX,0x5 AND RAX,qword ptr [RDX + R12*0x1] IMUL RAX,qword ptr [RDX + R12*0x1 + 0x8] MOV CL,byte ptr [RDX + R12*0x1 + 0x18] SHR RAX,CL MOV RCX,qword ptr [RDX + R12*0x1 + 0x10] OR RBP,qword ptr [RCX + RAX*0x8] LAB_0010892d: AND RBP,qword ptr [R13] JZ 0x0010896b LAB_00108933: BSF RSI,RBP MOV EDI,R15D MOV EDX,0x1 CALL 0x00106fa2 MOVSXD RCX,dword ptr [R14 + 0x400] CMP RCX,0x100 JGE 0x00108987 LEA RDX,[RBP + -0x1] LEA ESI,[RCX + 0x1] MOV dword ptr [R14 + 0x400],ESI MOV dword ptr [R14 + RCX*0x4],EAX AND RBP,RDX JNZ 0x00108933 LAB_0010896b: LEA RAX,[RBX + -0x1] AND RBX,RAX JNZ 0x00108888 LAB_00108978: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00108987: LEA RDI,[0x10ef36] LEA RSI,[0x10ebac] LEA RCX,[0x10ef53] MOV EDX,0x578 CALL 0x00102130
/* void chess::movegen::whileBitboardAdd<chess::movegen::legalmoves<(chess::Color::underlying)0, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::{lambda(chess::Square)#5}>(chess::Movelist&, chess::Bitboard, chess::movegen::legalmoves<(chess::Color::underlying)0, (chess::movegen::MoveGenType)0>(chess::Movelist&, chess::Board const&, int)::{lambda(chess::Square)#5}) */ void chess::movegen:: whileBitboardAdd<chess::movegen::legalmoves<(chess::Color::underlying)0,(chess::movegen::MoveGenType)0>(chess::Movelist&,chess::Board_const&,int)::_lambda(chess::Square)_5_> (long param_1,ulong param_2) { ulong uVar1; ulong uVar2; long lVar3; int4 uVar4; ulong uVar5; ulong uVar6; int iVar7; ulong *in_stack_00000008; ulong *in_stack_00000010; ulong *in_stack_00000018; ulong *in_stack_00000020; if (param_2 != 0) { do { uVar2 = 0; if (param_2 != 0) { for (; (param_2 >> uVar2 & 1) == 0; uVar2 = uVar2 + 1) { } } uVar1 = *in_stack_00000018; iVar7 = (int)uVar2; if ((*in_stack_00000008 >> (uVar2 & 0x3f) & 1) == 0) { uVar6 = (ulong)(uint)(iVar7 << 5); uVar6 = *(ulong *)(*(long *)((long)&DAT_001eee10 + uVar6) + ((*(ulong *)((long)&attacks::RookTable + uVar6) & uVar1) * *(long *)((long)&DAT_001eee08 + uVar6) >> ((&DAT_001eee18)[uVar6] & 0x3f) ) * 8); if ((*in_stack_00000010 & 1L << ((byte)uVar2 & 0x3f)) == 0) { uVar5 = (ulong)(uint)(iVar7 << 5); uVar6 = uVar6 | *(ulong *)(*(long *)((long)&DAT_00126610 + uVar5) + ((uVar1 & *(ulong *)((long)&attacks::BishopTable + uVar5)) * *(long *)((long)&DAT_00126608 + uVar5) >> ((&DAT_00126618)[uVar5] & 0x3f)) * 8); } else { uVar6 = uVar6 & *in_stack_00000010; } } else { uVar6 = (ulong)(uint)(iVar7 << 5); uVar6 = *in_stack_00000008 & *(ulong *)(*(long *)((long)&DAT_00126610 + uVar6) + ((uVar1 & *(ulong *)((long)&attacks::BishopTable + uVar6)) * *(long *)((long)&DAT_00126608 + uVar6) >> ((&DAT_00126618)[uVar6] & 0x3f) ) * 8); } for (uVar6 = uVar6 & *in_stack_00000020; uVar6 != 0; uVar6 = uVar6 & uVar6 - 1) { lVar3 = 0; if (uVar6 != 0) { for (; (uVar6 >> lVar3 & 1) == 0; lVar3 = lVar3 + 1) { } } uVar4 = Move::make<(unsigned_short)0>(uVar2 & 0xffffffff,lVar3,1); iVar7 = *(int *)(param_1 + 0x400); if (0xff < (long)iVar7) { /* WARNING: Subroutine does not return */ __assert_fail("size_ < constants::MAX_MOVES", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x578,"void chess::Movelist::add(value_type &&)"); } *(int *)(param_1 + 0x400) = iVar7 + 1; *(int4 *)(param_1 + (long)iVar7 * 4) = uVar4; } param_2 = param_2 & param_2 - 1; } while (param_2 != 0); } return; }
48,739
MNN::CreateGridSample(flatbuffers::FlatBufferBuilder&, MNN::SampleMode, MNN::BorderMode, bool, bool)
mnn-tts/MNN/schema/current/UserDefine_generated.h
inline flatbuffers::Offset<GridSample> CreateGridSample( flatbuffers::FlatBufferBuilder &_fbb, SampleMode mode = SampleMode_BILINEAR, BorderMode paddingMode = BorderMode_ZEROS, bool alignCorners = false, bool backward = false) { GridSampleBuilder builder_(_fbb); builder_.add_backward(backward); builder_.add_alignCorners(alignCorners); builder_.add_paddingMode(paddingMode); builder_.add_mode(mode); return builder_.Finish(); }
O0
c
MNN::CreateGridSample(flatbuffers::FlatBufferBuilder&, MNN::SampleMode, MNN::BorderMode, bool, bool): subq $0x38, %rsp movb %r8b, %al movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movl %edx, 0x20(%rsp) andb $0x1, %cl movb %cl, 0x1f(%rsp) andb $0x1, %al movb %al, 0x1e(%rsp) movq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x25300 movb 0x1e(%rsp), %al leaq 0x8(%rsp), %rdi andb $0x1, %al movzbl %al, %esi callq 0x25340 movb 0x1f(%rsp), %al leaq 0x8(%rsp), %rdi andb $0x1, %al movzbl %al, %esi callq 0x25380 movl 0x20(%rsp), %esi leaq 0x8(%rsp), %rdi callq 0x253c0 movl 0x24(%rsp), %esi leaq 0x8(%rsp), %rdi callq 0x253f0 leaq 0x8(%rsp), %rdi callq 0x25420 movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
_ZN3MNN16CreateGridSampleERN11flatbuffers17FlatBufferBuilderENS_10SampleModeENS_10BorderModeEbb: sub rsp, 38h mov al, r8b mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov [rsp+38h+var_18], edx and cl, 1 mov [rsp+38h+var_19], cl and al, 1 mov [rsp+38h+var_1A], al mov rsi, [rsp+38h+var_10]; flatbuffers::FlatBufferBuilder * lea rdi, [rsp+38h+var_30]; this call _ZN3MNN17GridSampleBuilderC2ERN11flatbuffers17FlatBufferBuilderE; MNN::GridSampleBuilder::GridSampleBuilder(flatbuffers::FlatBufferBuilder &) mov al, [rsp+38h+var_1A] lea rdi, [rsp+38h+var_30]; this and al, 1 movzx esi, al; bool call _ZN3MNN17GridSampleBuilder12add_backwardEb; MNN::GridSampleBuilder::add_backward(bool) mov al, [rsp+38h+var_19] lea rdi, [rsp+38h+var_30]; this and al, 1 movzx esi, al; bool call _ZN3MNN17GridSampleBuilder16add_alignCornersEb; MNN::GridSampleBuilder::add_alignCorners(bool) mov esi, [rsp+38h+var_18] lea rdi, [rsp+38h+var_30] call _ZN3MNN17GridSampleBuilder15add_paddingModeENS_10BorderModeE; MNN::GridSampleBuilder::add_paddingMode(MNN::BorderMode) mov esi, [rsp+38h+var_14] lea rdi, [rsp+38h+var_30] call _ZN3MNN17GridSampleBuilder8add_modeENS_10SampleModeE; MNN::GridSampleBuilder::add_mode(MNN::SampleMode) lea rdi, [rsp+38h+var_30]; this call _ZN3MNN17GridSampleBuilder6FinishEv; MNN::GridSampleBuilder::Finish(void) mov [rsp+38h+var_4], eax mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long MNN::CreateGridSample( flatbuffers::FlatBufferBuilder *a1, unsigned int a2, unsigned int a3, char a4, char a5) { _BYTE v6[22]; // [rsp+8h] [rbp-30h] BYREF char v7; // [rsp+1Eh] [rbp-1Ah] char v8; // [rsp+1Fh] [rbp-19h] unsigned int v9; // [rsp+20h] [rbp-18h] unsigned int v10; // [rsp+24h] [rbp-14h] flatbuffers::FlatBufferBuilder *v11; // [rsp+28h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4 & 1; v7 = a5 & 1; MNN::GridSampleBuilder::GridSampleBuilder((MNN::GridSampleBuilder *)v6, a1); MNN::GridSampleBuilder::add_backward((MNN::GridSampleBuilder *)v6, v7 & 1); MNN::GridSampleBuilder::add_alignCorners((MNN::GridSampleBuilder *)v6, v8 & 1); MNN::GridSampleBuilder::add_paddingMode(v6, v9); MNN::GridSampleBuilder::add_mode(v6, v10); return (unsigned int)MNN::GridSampleBuilder::Finish((MNN::GridSampleBuilder *)v6); }
CreateGridSample: SUB RSP,0x38 MOV AL,R8B MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],ESI MOV dword ptr [RSP + 0x20],EDX AND CL,0x1 MOV byte ptr [RSP + 0x1f],CL AND AL,0x1 MOV byte ptr [RSP + 0x1e],AL MOV RSI,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0x8] CALL 0x00125300 MOV AL,byte ptr [RSP + 0x1e] LEA RDI,[RSP + 0x8] AND AL,0x1 MOVZX ESI,AL CALL 0x00125340 MOV AL,byte ptr [RSP + 0x1f] LEA RDI,[RSP + 0x8] AND AL,0x1 MOVZX ESI,AL CALL 0x00125380 MOV ESI,dword ptr [RSP + 0x20] LEA RDI,[RSP + 0x8] CALL 0x001253c0 MOV ESI,dword ptr [RSP + 0x24] LEA RDI,[RSP + 0x8] CALL 0x001253f0 LEA RDI,[RSP + 0x8] CALL 0x00125420 MOV dword ptr [RSP + 0x34],EAX MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
/* MNN::CreateGridSample(flatbuffers::FlatBufferBuilder&, MNN::SampleMode, MNN::BorderMode, bool, bool) */ int4 MNN::CreateGridSample (FlatBufferBuilder *param_1,int4 param_2,int4 param_3,byte param_4, byte param_5) { int4 uVar1; GridSampleBuilder local_30 [22]; byte local_1a; byte local_19; int4 local_18; int4 local_14; FlatBufferBuilder *local_10; local_19 = param_4 & 1; local_1a = param_5 & 1; local_18 = param_3; local_14 = param_2; local_10 = param_1; GridSampleBuilder::GridSampleBuilder(local_30,param_1); GridSampleBuilder::add_backward(local_30,(bool)(local_1a & 1)); GridSampleBuilder::add_alignCorners(local_30,(bool)(local_19 & 1)); GridSampleBuilder::add_paddingMode(local_30,local_18); GridSampleBuilder::add_mode(local_30,local_14); uVar1 = GridSampleBuilder::Finish(local_30); return uVar1; }
48,740
mi_ft_store
eloqsql/storage/myisam/ft_update.c
static int _mi_ft_store(MI_INFO *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { uint key_length; DBUG_ENTER("_mi_ft_store"); for (; wlist->pos; wlist++) { key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos); if (_mi_ck_write(info,keynr,(uchar*) keybuf,key_length)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O3
c
mi_ft_store: xorl %eax, %eax cmpq $0x0, (%rcx) je 0x75628 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r12 movq %rdx, %r15 movl %esi, %r13d movq %rdi, %rbx movq %rbx, %rdi movl %r13d, %esi movq %r15, %rdx movq %r12, %rcx movq %r14, %r8 callq 0x75495 movq %rbx, %rdi movl %r13d, %esi movq %r15, %rdx movl %eax, %ecx callq 0x890fb testl %eax, %eax jne 0x75615 cmpq $0x0, 0x18(%r12) leaq 0x18(%r12), %r12 jne 0x755dc xorl %eax, %eax jmp 0x7561a movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_ft_store: xor eax, eax cmp qword ptr [rcx], 0 jz short locret_75628 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r12, rcx mov r15, rdx mov r13d, esi mov rbx, rdi loc_755DC: mov rdi, rbx mov esi, r13d mov rdx, r15 mov rcx, r12 mov r8, r14 call _ft_make_key mov rdi, rbx mov esi, r13d mov rdx, r15 mov ecx, eax call _mi_ck_write test eax, eax jnz short loc_75615 cmp qword ptr [r12+18h], 0 lea r12, [r12+18h] jnz short loc_755DC xor eax, eax jmp short loc_7561A loc_75615: mov eax, 1 loc_7561A: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_75628: retn
long long mi_ft_store(long long a1, unsigned int a2, long long a3, _QWORD *a4, long long a5, __m128i a6) { long long result; // rax long long i; // r12 unsigned int key; // eax result = 0LL; if ( *a4 ) { for ( i = (long long)a4; ; i += 24LL ) { key = ft_make_key(a1, a2, a3, i, a5, a6); if ( (unsigned int)mi_ck_write(a1, a2, a3, key) ) break; if ( *(_QWORD *)(i + 24) == 0LL ) return 0LL; } return 1LL; } return result; }
_mi_ft_store: XOR EAX,EAX CMP qword ptr [RCX],0x0 JZ 0x00175628 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R12,RCX MOV R15,RDX MOV R13D,ESI MOV RBX,RDI LAB_001755dc: MOV RDI,RBX MOV ESI,R13D MOV RDX,R15 MOV RCX,R12 MOV R8,R14 CALL 0x00175495 MOV RDI,RBX MOV ESI,R13D MOV RDX,R15 MOV ECX,EAX CALL 0x001890fb TEST EAX,EAX JNZ 0x00175615 CMP qword ptr [R12 + 0x18],0x0 LEA R12,[R12 + 0x18] JNZ 0x001755dc XOR EAX,EAX JMP 0x0017561a LAB_00175615: MOV EAX,0x1 LAB_0017561a: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00175628: RET
int8 _mi_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5,int8 param_6) { long *plVar1; int4 uVar2; int iVar3; int8 uVar4; if (*param_4 != 0) { uVar4 = 0; do { uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5,param_6,uVar4); iVar3 = _mi_ck_write(param_1,param_2,param_3,uVar2); if (iVar3 != 0) { return 1; } plVar1 = param_4 + 3; param_4 = param_4 + 3; } while (*plVar1 != 0); } return 0; }
48,741
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex(int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
inline int FVarRefinement::populateChildValuesForVertexVertex(Index cVert, Index pVert) { // // We should not be getting incomplete vertex-vertices from feature-adaptive // refinement (as neighboring vertices will be face-vertices or edge-vertices). // This will get messy when we do (i.e. sparse refinement of Bilinear or more // flexible and specific sparse refinement of Catmark) but for now assume 1-to-1. // assert(_refinement.isChildVertexComplete(cVert)); // Number of child values is same as number of parent values since complete: int cValueCount = _parentFVar.getNumVertexValues(pVert); if (cValueCount > 1) { Index cValueIndex = _childFVar.getVertexValueOffset(cVert); // Update the parent source for all child values: for (int j = 1; j < cValueCount; ++j) { _childValueParentSource[cValueIndex + j] = (LocalIndex) j; } // Update the vertex-face siblings: FVarLevel::ConstSiblingArray pVertFaceSiblings = _parentFVar.getVertexFaceSiblings(pVert); FVarLevel::SiblingArray cVertFaceSiblings = _childFVar.getVertexFaceSiblings(cVert); for (int j = 0; j < cVertFaceSiblings.size(); ++j) { cVertFaceSiblings[j] = pVertFaceSiblings[j]; } } return cValueCount; }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex(int, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq (%rdi), %rcx movslq %esi, %rax movq 0x180(%rcx), %rcx testb $0x1, (%rcx,%rax) jne 0x5a236 movl %esi, %ebp movq %rdi, %r14 movq 0x10(%rdi), %rdi movslq %edx, %rcx movq 0x48(%rdi), %rsi movzwl (%rsi,%rcx,2), %ebx cmpq $0x2, %rbx jb 0x5a229 movq 0x20(%r14), %rcx movq 0x60(%rcx), %rcx movslq (%rcx,%rax,4), %rax addq %rax, %rax addq 0x28(%r14), %rax pushq $0x1 popq %rcx cmpq %rcx, %rbx je 0x5a1fa movw %cx, (%rax,%rcx,2) incq %rcx jmp 0x5a1ec movl %edx, %esi callq 0x51830 movq %rax, %r15 movq 0x20(%r14), %rdi movl %ebp, %esi callq 0x54000 xorl %ecx, %ecx testl %edx, %edx cmovlel %ecx, %edx cmpq %rcx, %rdx je 0x5a229 movzwl (%r15,%rcx,2), %esi movw %si, (%rax,%rcx,2) incq %rcx jmp 0x5a216 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x6237f(%rip), %rdi # 0xbc5bc leaq 0x623a1(%rip), %rsi # 0xbc5e5 leaq 0x625c6(%rip), %rcx # 0xbc811 movl $0xfb, %edx callq 0x512a0 nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement34populateChildValuesForVertexVertexEii: push rbp push r15 push r14 push rbx push rax mov rcx, [rdi] movsxd rax, esi mov rcx, [rcx+180h] test byte ptr [rcx+rax], 1 jnz short loc_5A236 mov ebp, esi mov r14, rdi mov rdi, [rdi+10h]; this movsxd rcx, edx mov rsi, [rdi+48h] movzx ebx, word ptr [rsi+rcx*2] cmp rbx, 2 jb short loc_5A229 mov rcx, [r14+20h] mov rcx, [rcx+60h] movsxd rax, dword ptr [rcx+rax*4] add rax, rax add rax, [r14+28h] push 1 pop rcx loc_5A1EC: cmp rbx, rcx jz short loc_5A1FA mov [rax+rcx*2], cx inc rcx jmp short loc_5A1EC loc_5A1FA: mov esi, edx; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel21getVertexFaceSiblingsEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getVertexFaceSiblings(int) mov r15, rax mov rdi, [r14+20h]; this mov esi, ebp; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel21getVertexFaceSiblingsEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getVertexFaceSiblings(int) xor ecx, ecx test edx, edx cmovle edx, ecx loc_5A216: cmp rdx, rcx jz short loc_5A229 movzx esi, word ptr [r15+rcx*2] mov [rax+rcx*2], si inc rcx jmp short loc_5A216 loc_5A229: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_5A236: lea rdi, aRefinementIsch; "_refinement.isChildVertexComplete(cVert"... lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_0; "int OpenSubdiv::v3_6_0::Vtr::internal::"... mov edx, 0FBh call ___assert_fail
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex( OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel **this, int a2, int a3) { OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v4; // rdi unsigned long long v5; // rbx long long v6; // rax long long i; // rcx long long VertexFaceSiblings; // r15 long long v9; // rax long long v10; // rdx long long v11; // rcx if ( (*(_BYTE *)(*((_QWORD *)*this + 48) + a2) & 1) != 0 ) __assert_fail( "_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp", 251LL, "int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex(Index, Index)"); v4 = this[2]; v5 = *(unsigned __int16 *)(*((_QWORD *)v4 + 9) + 2LL * a3); if ( v5 >= 2 ) { v6 = (long long)this[5] + 2 * *(int *)(*((_QWORD *)this[4] + 12) + 4LL * a2); for ( i = 1LL; v5 != i; ++i ) *(_WORD *)(v6 + 2 * i) = i; VertexFaceSiblings = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getVertexFaceSiblings(v4, a3); v9 = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getVertexFaceSiblings(this[4], a2); v11 = 0LL; if ( (int)v10 <= 0 ) v10 = 0LL; while ( v10 != v11 ) { *(_WORD *)(v9 + 2 * v11) = *(_WORD *)(VertexFaceSiblings + 2 * v11); ++v11; } } return (unsigned int)v5; }
populateChildValuesForVertexVertex: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RCX,qword ptr [RDI] MOVSXD RAX,ESI MOV RCX,qword ptr [RCX + 0x180] TEST byte ptr [RCX + RAX*0x1],0x1 JNZ 0x0015a236 MOV EBP,ESI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x10] MOVSXD RCX,EDX MOV RSI,qword ptr [RDI + 0x48] MOVZX EBX,word ptr [RSI + RCX*0x2] CMP RBX,0x2 JC 0x0015a229 MOV RCX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [RCX + 0x60] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RAX ADD RAX,qword ptr [R14 + 0x28] PUSH 0x1 POP RCX LAB_0015a1ec: CMP RBX,RCX JZ 0x0015a1fa MOV word ptr [RAX + RCX*0x2],CX INC RCX JMP 0x0015a1ec LAB_0015a1fa: MOV ESI,EDX CALL 0x00151830 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x20] MOV ESI,EBP CALL 0x00154000 XOR ECX,ECX TEST EDX,EDX CMOVLE EDX,ECX LAB_0015a216: CMP RDX,RCX JZ 0x0015a229 MOVZX ESI,word ptr [R15 + RCX*0x2] MOV word ptr [RAX + RCX*0x2],SI INC RCX JMP 0x0015a216 LAB_0015a229: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0015a236: LEA RDI,[0x1bc5bc] LEA RSI,[0x1bc5e5] LEA RCX,[0x1bc811] MOV EDX,0xfb CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex(int, int) */ ulong __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex (FVarRefinement *this,int param_1,int param_2) { int iVar1; FVarLevel *this_00; long lVar2; ulong uVar3; ulong uVar4; ulong uVar5; int1 auVar6 [12]; if ((*(byte *)(*(long *)(*(long *)this + 0x180) + (long)param_1) & 1) == 0) { this_00 = *(FVarLevel **)(this + 0x10); uVar5 = (ulong)*(ushort *)(*(long *)(this_00 + 0x48) + (long)param_2 * 2); if (1 < uVar5) { iVar1 = *(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + (long)param_1 * 4); lVar2 = *(long *)(this + 0x28); for (uVar3 = 1; uVar5 != uVar3; uVar3 = uVar3 + 1) { *(short *)((long)iVar1 * 2 + lVar2 + uVar3 * 2) = (short)uVar3; } lVar2 = FVarLevel::getVertexFaceSiblings(this_00,param_2); auVar6 = FVarLevel::getVertexFaceSiblings(*(FVarLevel **)(this + 0x20),param_1); uVar4 = 0; uVar3 = (ulong)auVar6._8_4_; if ((int)auVar6._8_4_ < 1) { uVar3 = uVar4; } for (; uVar3 != uVar4; uVar4 = uVar4 + 1) { *(int2 *)(auVar6._0_8_ + uVar4 * 2) = *(int2 *)(lVar2 + uVar4 * 2); } } return uVar5; } /* WARNING: Subroutine does not return */ __assert_fail("_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp" ,0xfb, "int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForVertexVertex(Index, Index)" ); }
48,742
ma_compact_keypage
eloqsql/storage/maria/ma_page.c
my_bool _ma_compact_keypage(MARIA_PAGE *ma_page, TrID min_read_from) { MARIA_HA *info= ma_page->info; MARIA_SHARE *share= info->s; MARIA_KEY key; uchar *page, *endpos, *start_of_empty_space; uint page_flag, nod_flag, saved_space; my_bool page_has_transid; DBUG_ENTER("_ma_compact_keypage"); page_flag= ma_page->flag; if (!(page_flag & KEYPAGE_FLAG_HAS_TRANSID)) DBUG_RETURN(0); /* No transaction id on page */ nod_flag= ma_page->node; page= ma_page->buff; endpos= page + ma_page->size; key.data= info->lastkey_buff; key.keyinfo= (MARIA_KEYDEF*) ma_page->keyinfo; page_has_transid= 0; page+= share->keypage_header + nod_flag; key.data[0]= 0; /* safety */ start_of_empty_space= 0; saved_space= 0; do { if (!(page= (*ma_page->keyinfo->skip_key)(&key, 0, 0, page))) { DBUG_PRINT("error",("Couldn't find last key: page_pos: %p", page)); _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(1); } if (key_has_transid(page-1)) { uint transid_length; transid_length= transid_packed_length(page); if (min_read_from == ~(TrID) 0 || min_read_from < transid_get_packed(share, page)) { page[-1]&= 254; /* Remove transid marker */ transid_length= transid_packed_length(page); if (start_of_empty_space) { /* Move block before the transid up in page */ uint copy_length= (uint) (page - start_of_empty_space) - saved_space; memmove(start_of_empty_space, start_of_empty_space + saved_space, copy_length); start_of_empty_space+= copy_length; } else start_of_empty_space= page; saved_space+= transid_length; } else page_has_transid= 1; /* At least one id left */ page+= transid_length; } page+= nod_flag; } while (page < endpos); DBUG_ASSERT(page == endpos); if (start_of_empty_space) { /* Move last block down This is always true if any transid was removed */ uint copy_length= (uint) (endpos - start_of_empty_space) - saved_space; if (copy_length) memmove(start_of_empty_space, start_of_empty_space + saved_space, copy_length); ma_page->size= (uint) (start_of_empty_space + copy_length - ma_page->buff); page_store_size(share, ma_page); } if (!page_has_transid) { ma_page->flag&= ~KEYPAGE_FLAG_HAS_TRANSID; _ma_store_keypage_flag(share, ma_page->buff, ma_page->flag); /* Clear packed transid (in case of zerofill) */ bzero(ma_page->buff + LSN_STORE_SIZE, TRANSID_SIZE); } if (share->now_transactional) { if (_ma_log_compact_keypage(ma_page, min_read_from)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O0
c
ma_compact_keypage: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x70dd9 jmp 0x70dd0 movb $0x0, -0x1(%rbp) jmp 0x710fa movq -0x10(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x20(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rax movq 0x388(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movb $0x0, -0x6d(%rbp) movq -0x28(%rbp), %rax movl 0x744(%rax), %ecx addl -0x68(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movb $0x0, (%rax) movq $0x0, -0x60(%rbp) movl $0x0, -0x6c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0xe8(%rax), %rax movq -0x50(%rbp), %rcx leaq -0x48(%rbp), %rdi xorl %edx, %edx movl %edx, %esi callq *%rax movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0x70e92 jmp 0x70e79 jmp 0x70e7b movq -0x20(%rbp), %rdi movl $0x7e, %esi callq 0x34c30 movb $0x1, -0x1(%rbp) jmp 0x710fa movq -0x50(%rbp), %rax movzbl -0x1(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x70fbe movq -0x50(%rbp), %rax movzbl (%rax), %eax cmpl $0xf3, %eax jge 0x70ec1 movl $0x1, %eax movl %eax, -0x84(%rbp) jmp 0x70ed3 movq -0x50(%rbp), %rax movzbl (%rax), %eax subl $0xf8, %eax movl %eax, -0x84(%rbp) movl -0x84(%rbp), %eax movl %eax, -0x74(%rbp) cmpq $-0x1, -0x18(%rbp) je 0x70f0e movq -0x18(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x28(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x34ea0 movq %rax, %rcx movq -0x90(%rbp), %rax cmpq %rcx, %rax jae 0x70faa movq -0x50(%rbp), %rax movzbl -0x1(%rax), %ecx andl $0xfe, %ecx movb %cl, -0x1(%rax) movq -0x50(%rbp), %rax movzbl (%rax), %eax cmpl $0xf3, %eax jge 0x70f3a movl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0x70f4c movq -0x50(%rbp), %rax movzbl (%rax), %eax subl $0xf8, %eax movl %eax, -0x94(%rbp) movl -0x94(%rbp), %eax movl %eax, -0x74(%rbp) cmpq $0x0, -0x60(%rbp) je 0x70f97 movq -0x50(%rbp), %rax movq -0x60(%rbp), %rcx subq %rcx, %rax subl -0x6c(%rbp), %eax movl %eax, -0x78(%rbp) movq -0x60(%rbp), %rdi movq -0x60(%rbp), %rsi movl -0x6c(%rbp), %eax addq %rax, %rsi movl -0x78(%rbp), %eax movl %eax, %edx callq 0x2a130 movl -0x78(%rbp), %ecx movq -0x60(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0x70f9f movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movl -0x74(%rbp), %eax addl -0x6c(%rbp), %eax movl %eax, -0x6c(%rbp) jmp 0x70fae movb $0x1, -0x6d(%rbp) movl -0x74(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x68(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jb 0x70e50 jmp 0x70fde jmp 0x70fe0 cmpq $0x0, -0x60(%rbp) je 0x7107b movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx subq %rcx, %rax subl -0x6c(%rbp), %eax movl %eax, -0x7c(%rbp) cmpl $0x0, -0x7c(%rbp) je 0x7101a movq -0x60(%rbp), %rdi movq -0x60(%rbp), %rsi movl -0x6c(%rbp), %eax addq %rax, %rsi movl -0x7c(%rbp), %eax movl %eax, %edx callq 0x2a130 movq -0x60(%rbp), %rax movl -0x7c(%rbp), %ecx addq %rcx, %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax movl %eax, -0x80(%rbp) movl -0x80(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x1(%rax,%rcx) movl -0x80(%rbp), %eax shrl $0x8, %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x2(%rax,%rcx) cmpb $0x0, -0x6d(%rbp) jne 0x710cc movq -0x10(%rbp), %rax movl 0x2c(%rax), %ecx andl $-0x3, %ecx movl %ecx, 0x2c(%rax) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi addq $0x7, %rdi xorl %esi, %esi movl $0x6, %edx callq 0x2a2c0 movq -0x28(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x710f4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x71110 cmpb $0x0, %al je 0x710f2 jmp 0x710ec movb $0x1, -0x1(%rbp) jmp 0x710fa jmp 0x710f4 jmp 0x710f6 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_compact_keypage: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov [rbp+var_64], eax mov eax, [rbp+var_64] and eax, 2 cmp eax, 0 jnz short loc_70DD9 jmp short $+2 loc_70DD0: mov [rbp+var_1], 0 jmp loc_710FA loc_70DD9: mov rax, [rbp+var_10] mov eax, [rax+28h] mov [rbp+var_68], eax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_10] mov ecx, [rcx+20h] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_20] mov rax, [rax+388h] mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_40], rax mov [rbp+var_6D], 0 mov rax, [rbp+var_28] mov ecx, [rax+744h] add ecx, [rbp+var_68] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_48] mov byte ptr [rax], 0 mov [rbp+var_60], 0 mov [rbp+var_6C], 0 loc_70E50: mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+0E8h] mov rcx, [rbp+var_50] lea rdi, [rbp+var_48] xor edx, edx mov esi, edx call rax mov [rbp+var_50], rax cmp rax, 0 jnz short loc_70E92 jmp short $+2 loc_70E79: jmp short $+2 loc_70E7B: mov rdi, [rbp+var_20] mov esi, 7Eh ; '~' call _ma_set_fatal_error mov [rbp+var_1], 1 jmp loc_710FA loc_70E92: mov rax, [rbp+var_50] movzx eax, byte ptr [rax-1] and eax, 1 cmp eax, 0 jz loc_70FBE mov rax, [rbp+var_50] movzx eax, byte ptr [rax] cmp eax, 0F3h jge short loc_70EC1 mov eax, 1 mov [rbp+var_84], eax jmp short loc_70ED3 loc_70EC1: mov rax, [rbp+var_50] movzx eax, byte ptr [rax] sub eax, 0F8h mov [rbp+var_84], eax loc_70ED3: mov eax, [rbp+var_84] mov [rbp+var_74], eax cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jz short loc_70F0E mov rax, [rbp+var_18] mov [rbp+var_90], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_50] call transid_get_packed mov rcx, rax mov rax, [rbp+var_90] cmp rax, rcx jnb loc_70FAA loc_70F0E: mov rax, [rbp+var_50] movzx ecx, byte ptr [rax-1] and ecx, 0FEh mov [rax-1], cl mov rax, [rbp+var_50] movzx eax, byte ptr [rax] cmp eax, 0F3h jge short loc_70F3A mov eax, 1 mov [rbp+var_94], eax jmp short loc_70F4C loc_70F3A: mov rax, [rbp+var_50] movzx eax, byte ptr [rax] sub eax, 0F8h mov [rbp+var_94], eax loc_70F4C: mov eax, [rbp+var_94] mov [rbp+var_74], eax cmp [rbp+var_60], 0 jz short loc_70F97 mov rax, [rbp+var_50] mov rcx, [rbp+var_60] sub rax, rcx sub eax, [rbp+var_6C] mov [rbp+var_78], eax mov rdi, [rbp+var_60] mov rsi, [rbp+var_60] mov eax, [rbp+var_6C] add rsi, rax mov eax, [rbp+var_78] mov edx, eax call _memmove mov ecx, [rbp+var_78] mov rax, [rbp+var_60] mov ecx, ecx add rax, rcx mov [rbp+var_60], rax jmp short loc_70F9F loc_70F97: mov rax, [rbp+var_50] mov [rbp+var_60], rax loc_70F9F: mov eax, [rbp+var_74] add eax, [rbp+var_6C] mov [rbp+var_6C], eax jmp short loc_70FAE loc_70FAA: mov [rbp+var_6D], 1 loc_70FAE: mov ecx, [rbp+var_74] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax loc_70FBE: mov ecx, [rbp+var_68] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jb loc_70E50 jmp short $+2 loc_70FDE: jmp short $+2 loc_70FE0: cmp [rbp+var_60], 0 jz loc_7107B mov rax, [rbp+var_58] mov rcx, [rbp+var_60] sub rax, rcx sub eax, [rbp+var_6C] mov [rbp+var_7C], eax cmp [rbp+var_7C], 0 jz short loc_7101A mov rdi, [rbp+var_60] mov rsi, [rbp+var_60] mov eax, [rbp+var_6C] add rsi, rax mov eax, [rbp+var_7C] mov edx, eax call _memmove loc_7101A: mov rax, [rbp+var_60] mov ecx, [rbp+var_7C] add rax, rcx mov rcx, [rbp+var_10] mov rcx, [rcx+10h] sub rax, rcx mov ecx, eax mov rax, [rbp+var_10] mov [rax+20h], ecx mov rax, [rbp+var_10] mov eax, [rax+20h] mov [rbp+var_80], eax mov eax, [rbp+var_80] mov dl, al mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] mov [rax+rcx-1], dl mov eax, [rbp+var_80] shr eax, 8 mov dl, al mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] mov [rax+rcx-2], dl loc_7107B: cmp [rbp+var_6D], 0 jnz short loc_710CC mov rax, [rbp+var_10] mov ecx, [rax+2Ch] and ecx, 0FFFFFFFDh mov [rax+2Ch], ecx mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov dl, al mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx mov [rax+rcx], dl mov rax, [rbp+var_10] mov rdi, [rax+10h] add rdi, 7 xor esi, esi mov edx, 6 call _memset loc_710CC: mov rax, [rbp+var_28] cmp byte ptr [rax+7E7h], 0 jz short loc_710F4 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _ma_log_compact_keypage cmp al, 0 jz short loc_710F2 jmp short $+2 loc_710EC: mov [rbp+var_1], 1 jmp short loc_710FA loc_710F2: jmp short $+2 loc_710F4: jmp short $+2 loc_710F6: mov [rbp+var_1], 0 loc_710FA: mov al, [rbp+var_1] add rsp, 0A0h pop rbp retn
bool ma_compact_keypage(long long a1, unsigned long long a2) { long long v2; // rdx long long v3; // rcx long long v4; // r8 int v5; // r9d int v7; // [rsp+Ch] [rbp-94h] unsigned long long v8; // [rsp+10h] [rbp-90h] int v9; // [rsp+1Ch] [rbp-84h] int v10; // [rsp+20h] [rbp-80h] unsigned int v11; // [rsp+2Ch] [rbp-74h] char v12; // [rsp+33h] [rbp-6Dh] int v13; // [rsp+34h] [rbp-6Ch] int v14; // [rsp+38h] [rbp-68h] unsigned __int8 *v15; // [rsp+40h] [rbp-60h] unsigned long long v16; // [rsp+48h] [rbp-58h] long long v17; // [rsp+50h] [rbp-50h] unsigned __int8 *v18; // [rsp+50h] [rbp-50h] unsigned __int8 *v19; // [rsp+50h] [rbp-50h] _QWORD v20[4]; // [rsp+58h] [rbp-48h] BYREF long long v21; // [rsp+78h] [rbp-28h] _DWORD *v22; // [rsp+80h] [rbp-20h] unsigned long long v23; // [rsp+88h] [rbp-18h] long long v24; // [rsp+90h] [rbp-10h] v24 = a1; v23 = a2; v22 = *(_DWORD **)a1; v21 = *(_QWORD *)v22; if ( (*(_DWORD *)(a1 + 44) & 2) == 0 ) return 0; v14 = *(_DWORD *)(v24 + 40); v17 = *(_QWORD *)(v24 + 16); v16 = *(unsigned int *)(v24 + 32) + v17; v20[0] = *((_QWORD *)v22 + 113); v20[1] = *(_QWORD *)(v24 + 8); v12 = 0; v18 = (unsigned __int8 *)((unsigned int)(v14 + *(_DWORD *)(v21 + 1860)) + v17); *(_BYTE *)v20[0] = 0; v15 = 0LL; v13 = 0; do { v19 = (unsigned __int8 *)(*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned __int8 *))(*(_QWORD *)(v24 + 8) + 232LL))( v20, 0LL, 0LL, v18); if ( !v19 ) { ma_set_fatal_error(v22, 126, v2, v3, v4, v5); return 1; } if ( (*(v19 - 1) & 1) != 0 ) { if ( *v19 >= 0xF3u ) v9 = *v19 - 248; else v9 = 1; v11 = v9; if ( v23 == -1LL || (v8 = v23, v8 < transid_get_packed(v21, v19)) ) { *(v19 - 1) &= ~1u; if ( *v19 >= 0xF3u ) v7 = *v19 - 248; else v7 = 1; v11 = v7; if ( v15 ) { memmove(v15, &v15[v13], (unsigned int)((_DWORD)v19 - (_DWORD)v15 - v13)); v15 += (unsigned int)((_DWORD)v19 - (_DWORD)v15 - v13); } else { v15 = v19; } v13 += v7; } else { v12 = 1; } v19 += v11; } v18 = &v19[v14]; } while ( (unsigned long long)v18 < v16 ); if ( v15 ) { if ( (_DWORD)v16 - (_DWORD)v15 != v13 ) memmove(v15, &v15[v13], (unsigned int)(v16 - (_DWORD)v15 - v13)); *(_DWORD *)(v24 + 32) = v16 - v13 - *(_QWORD *)(v24 + 16); v10 = *(_DWORD *)(v24 + 32); *(_BYTE *)(*(_QWORD *)(v24 + 16) + *(unsigned int *)(v21 + 1860) - 1LL) = v10; *(_BYTE *)(*(_QWORD *)(v24 + 16) + *(unsigned int *)(v21 + 1860) - 2LL) = BYTE1(v10); } if ( !v12 ) { *(_DWORD *)(v24 + 44) &= ~2u; *(_BYTE *)(*(_QWORD *)(v24 + 16) + (unsigned int)(*(_DWORD *)(v21 + 1860) - 3)) = *(_DWORD *)(v24 + 44); memset(*(_QWORD *)(v24 + 16) + 7LL, 0LL, 6LL); } return *(_BYTE *)(v21 + 2023) && (unsigned __int8)ma_log_compact_keypage(v24, v23); }
_ma_compact_keypage: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] AND EAX,0x2 CMP EAX,0x0 JNZ 0x00170dd9 JMP 0x00170dd0 LAB_00170dd0: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001710fa LAB_00170dd9: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x68],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x388] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV byte ptr [RBP + -0x6d],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x744] ADD ECX,dword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] MOV byte ptr [RAX],0x0 MOV qword ptr [RBP + -0x60],0x0 MOV dword ptr [RBP + -0x6c],0x0 LAB_00170e50: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xe8] MOV RCX,qword ptr [RBP + -0x50] LEA RDI,[RBP + -0x48] XOR EDX,EDX MOV ESI,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x00170e92 JMP 0x00170e79 LAB_00170e79: JMP 0x00170e7b LAB_00170e7b: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x7e CALL 0x00134c30 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001710fa LAB_00170e92: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX + -0x1] AND EAX,0x1 CMP EAX,0x0 JZ 0x00170fbe MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] CMP EAX,0xf3 JGE 0x00170ec1 MOV EAX,0x1 MOV dword ptr [RBP + -0x84],EAX JMP 0x00170ed3 LAB_00170ec1: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] SUB EAX,0xf8 MOV dword ptr [RBP + -0x84],EAX LAB_00170ed3: MOV EAX,dword ptr [RBP + -0x84] MOV dword ptr [RBP + -0x74],EAX CMP qword ptr [RBP + -0x18],-0x1 JZ 0x00170f0e MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x50] CALL 0x00134ea0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x90] CMP RAX,RCX JNC 0x00170faa LAB_00170f0e: MOV RAX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RAX + -0x1] AND ECX,0xfe MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] CMP EAX,0xf3 JGE 0x00170f3a MOV EAX,0x1 MOV dword ptr [RBP + -0x94],EAX JMP 0x00170f4c LAB_00170f3a: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] SUB EAX,0xf8 MOV dword ptr [RBP + -0x94],EAX LAB_00170f4c: MOV EAX,dword ptr [RBP + -0x94] MOV dword ptr [RBP + -0x74],EAX CMP qword ptr [RBP + -0x60],0x0 JZ 0x00170f97 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x60] SUB RAX,RCX SUB EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x78],EAX MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x6c] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x78] MOV EDX,EAX CALL 0x0012a130 MOV ECX,dword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x60] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x00170f9f LAB_00170f97: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX LAB_00170f9f: MOV EAX,dword ptr [RBP + -0x74] ADD EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x6c],EAX JMP 0x00170fae LAB_00170faa: MOV byte ptr [RBP + -0x6d],0x1 LAB_00170fae: MOV ECX,dword ptr [RBP + -0x74] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_00170fbe: MOV ECX,dword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JC 0x00170e50 JMP 0x00170fde LAB_00170fde: JMP 0x00170fe0 LAB_00170fe0: CMP qword ptr [RBP + -0x60],0x0 JZ 0x0017107b MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] SUB RAX,RCX SUB EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x7c],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x0017101a MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x6c] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x7c] MOV EDX,EAX CALL 0x0012a130 LAB_0017101a: MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x7c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x80],EAX MOV EAX,dword ptr [RBP + -0x80] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x1],DL MOV EAX,dword ptr [RBP + -0x80] SHR EAX,0x8 MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x2],DL LAB_0017107b: CMP byte ptr [RBP + -0x6d],0x0 JNZ 0x001710cc MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2c] AND ECX,0xfffffffd MOV dword ptr [RAX + 0x2c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] ADD RDI,0x7 XOR ESI,ESI MOV EDX,0x6 CALL 0x0012a2c0 LAB_001710cc: MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001710f4 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00171110 CMP AL,0x0 JZ 0x001710f2 JMP 0x001710ec LAB_001710ec: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001710fa LAB_001710f2: JMP 0x001710f4 LAB_001710f4: JMP 0x001710f6 LAB_001710f6: MOV byte ptr [RBP + -0x1],0x0 LAB_001710fa: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xa0 POP RBP RET
int1 _ma_compact_keypage(long *param_1,ulong param_2) { bool bVar1; long lVar2; ulong uVar3; byte *pbVar4; char cVar5; uint uVar6; uint uVar7; byte *pbVar8; ulong uVar9; uint local_9c; uint local_8c; uint local_7c; uint local_74; byte *local_68; byte *local_58; int1 *local_50; long local_48; long local_30; long *local_28; ulong local_20; long *local_18; int1 local_9; local_28 = (long *)*param_1; local_30 = *local_28; if ((*(uint *)((long)param_1 + 0x2c) & 2) == 0) { local_9 = 0; } else { uVar7 = *(uint *)(param_1 + 5); pbVar8 = (byte *)(param_1[2] + (ulong)*(uint *)(param_1 + 4)); local_50 = (int1 *)local_28[0x71]; local_48 = param_1[1]; bVar1 = false; local_58 = (byte *)(param_1[2] + (ulong)(*(int *)(local_30 + 0x744) + uVar7)); *local_50 = 0; local_68 = (byte *)0x0; local_74 = 0; local_20 = param_2; local_18 = param_1; do { local_58 = (byte *)(**(code **)(local_18[1] + 0xe8))(&local_50,0,0,local_58); uVar3 = local_20; if (local_58 == (byte *)0x0) { _ma_set_fatal_error(local_28,0x7e); return 1; } if ((local_58[-1] & 1) != 0) { if (*local_58 < 0xf3) { local_8c = 1; } else { local_8c = *local_58 - 0xf8; } local_7c = local_8c; if ((local_20 == 0xffffffffffffffff) || (uVar9 = transid_get_packed(local_30), uVar3 < uVar9)) { local_58[-1] = local_58[-1] & 0xfe; if (*local_58 < 0xf3) { local_9c = 1; } else { local_9c = *local_58 - 0xf8; } local_7c = local_9c; pbVar4 = local_58; if (local_68 != (byte *)0x0) { uVar6 = ((int)local_58 - (int)local_68) - local_74; memmove(local_68,local_68 + local_74,(ulong)uVar6); pbVar4 = local_68 + uVar6; } local_68 = pbVar4; local_74 = local_9c + local_74; } else { bVar1 = true; } local_58 = local_58 + local_7c; } local_58 = local_58 + uVar7; } while (local_58 < pbVar8); if (local_68 != (byte *)0x0) { uVar7 = ((int)pbVar8 - (int)local_68) - local_74; if (uVar7 != 0) { memmove(local_68,local_68 + local_74,(ulong)uVar7); } *(uint *)(local_18 + 4) = ((int)local_68 + uVar7) - (int)local_18[2]; lVar2 = local_18[4]; *(char *)(local_18[2] + -1 + (ulong)*(uint *)(local_30 + 0x744)) = (char)(int)lVar2; *(char *)(local_18[2] + -2 + (ulong)*(uint *)(local_30 + 0x744)) = (char)((uint)(int)lVar2 >> 8); } if (!bVar1) { *(uint *)((long)local_18 + 0x2c) = *(uint *)((long)local_18 + 0x2c) & 0xfffffffd; *(char *)(local_18[2] + (ulong)(*(int *)(local_30 + 0x744) - 3)) = (char)*(int4 *)((long)local_18 + 0x2c); memset((void *)(local_18[2] + 7),0,6); } if ((*(char *)(local_30 + 0x7e7) == '\0') || (cVar5 = _ma_log_compact_keypage(local_18,local_20), cVar5 == '\0')) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
48,743
ma_read_pack_record
eloqsql/storage/maria/ma_packrec.c
int _ma_read_pack_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; File file; DBUG_ENTER("maria_read_pack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(my_errno); /* _search() didn't find record */ file= info->dfile.file; if (_ma_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, file, filepos)) goto err; if (mysql_file_read(file, info->rec_buff + block_info.offset , block_info.rec_len - block_info.offset, MYF(MY_NABP))) goto panic; info->update|= HA_STATE_AKTIV; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_ma_pack_rec_unpack(info,&info->bit_buff, buf, info->rec_buff, block_info.rec_len)); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); err: DBUG_RETURN(my_errno); }
O3
c
ma_read_pack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %rdx je 0x47676 movq %rsi, %r13 movq %rdi, %r14 movl 0x480(%rdi), %r12d leaq 0x290(%rdi), %r15 leaq 0x3a0(%rdi), %rbx leaq 0x460(%rdi), %r8 movq %rdx, (%rsp) leaq -0x88(%rbp), %rdx movq %r15, %rsi movq %rbx, %rcx movl %r12d, %r9d callq 0x4773d testl %eax, %eax jne 0x47676 movq %r13, -0x98(%rbp) movl -0x34(%rbp), %eax movq (%rbx), %rbx addq %rax, %rbx movq -0x70(%rbp), %r13 subq %rax, %r13 leaq 0x347c32(%rip), %rax # 0x38f258 movq (%rax), %rax leaq -0xe0(%rbp), %rdi movl %r12d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x476d1 movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xa6fd4 movq %rax, %rbx testq %rbx, %rbx movq -0x98(%rbp), %rdx je 0x476a2 movq %r14, %rdi movl $0x7f, %esi callq 0x42bb4 callq 0xa8156 movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x47738 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq orb $0x2, 0x624(%r14) movq 0x3a0(%r14), %rax movq -0x70(%rbp), %rcx movb $0x0, (%rax,%rcx) movq 0x3a0(%r14), %rcx movq -0x70(%rbp), %r8 movq %r14, %rdi movq %r15, %rsi callq 0x479fd jmp 0x4767d movq %rax, %rcx leaq 0x347b7d(%rip), %rax # 0x38f258 movq (%rax), %rax leaq 0x9a661(%rip), %rdx # 0xe1d46 movq %rcx, -0x90(%rbp) movq %rcx, %rdi movq %r13, %rsi movl $0x2f5, %ecx # imm = 0x2F5 callq *0x210(%rax) movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xa6fd4 movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmoveq %r13, %rsi leaq 0x347b35(%rip), %rax # 0x38f258 movq (%rax), %rax movq -0x90(%rbp), %rdi callq *0x218(%rax) jmp 0x4765d callq 0x2a270
_ma_read_pack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rax, fs:28h mov [rbp+var_30], rax cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_47676 mov r13, rsi mov r14, rdi mov r12d, [rdi+480h] lea r15, [rdi+290h] lea rbx, [rdi+3A0h] lea r8, [rdi+460h] mov [rsp+0F0h+var_F0], rdx lea rdx, [rbp+var_88] mov rsi, r15 mov rcx, rbx mov r9d, r12d call _ma_pack_get_block_info test eax, eax jnz short loc_47676 mov [rbp+var_98], r13 mov eax, [rbp+var_34] mov rbx, [rbx] add rbx, rax mov r13, [rbp+var_70] sub r13, rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_E0] mov esi, r12d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_476D1 mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov rbx, rax loc_4765D: test rbx, rbx mov rdx, [rbp+var_98] jz short loc_476A2 mov rdi, r14 mov esi, 7Fh call _ma_set_fatal_error loc_47676: call _my_thread_var mov eax, [rax] loc_4767D: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_47738 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_476A2: or byte ptr [r14+624h], 2 mov rax, [r14+3A0h] mov rcx, [rbp+var_70] mov byte ptr [rax+rcx], 0 mov rcx, [r14+3A0h] mov r8, [rbp+var_70] mov rdi, r14 mov rsi, r15 call _ma_pack_rec_unpack jmp short loc_4767D loc_476D1: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_90], rcx mov rdi, rcx mov rsi, r13 mov ecx, 2F5h call qword ptr [rax+210h] mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov rbx, rax xor esi, esi test rax, rax cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_90] call qword ptr [rax+218h] jmp loc_4765D loc_47738: call ___stack_chk_fail
long long ma_read_pack_record(long long a1, long long a2, long long a3) { unsigned int v3; // r12d long long v4; // rbx long long v5; // r13 long long v6; // rax long long v7; // rcx long long v8; // rbx long long v9; // r8 int v10; // r9d long long v11; // rdx long long v13; // rsi _BYTE v14[72]; // [rsp+10h] [rbp-E0h] BYREF long long v15; // [rsp+58h] [rbp-98h] long long v16; // [rsp+60h] [rbp-90h] char v17; // [rsp+68h] [rbp-88h] BYREF long long v18; // [rsp+80h] [rbp-70h] unsigned int v19; // [rsp+BCh] [rbp-34h] unsigned long long v20; // [rsp+C0h] [rbp-30h] v20 = __readfsqword(0x28u); if ( a3 != -1 ) { v3 = *(_DWORD *)(a1 + 1152); if ( !(unsigned int)ma_pack_get_block_info( a1, (int)a1 + 656, (unsigned int)&v17, (int)a1 + 928, (int)a1 + 1120, v3, a3) ) { v15 = a2; v4 = v19 + *(_QWORD *)(a1 + 928); v5 = v18 - v19; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v14, v3, 6LL); if ( v6 ) { v16 = v6; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v6, v5, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 757LL); v8 = my_read(v3, v4, v5, 4LL); v13 = 0LL; if ( !v8 ) v13 = v5; ((void ( *)(long long, long long))PSI_server[67])(v16, v13); } else { v8 = my_read(v3, v4, v5, 4LL); } v11 = v15; if ( !v8 ) { *(_BYTE *)(a1 + 1572) |= 2u; *(_BYTE *)(*(_QWORD *)(a1 + 928) + v18) = 0; return ma_pack_rec_unpack(a1, a1 + 656, v11, *(_QWORD *)(a1 + 928), v18); } ma_set_fatal_error((_DWORD *)a1, 127, v15, v7, v9, v10); } } return *(unsigned int *)my_thread_var(a1); }
_ma_read_pack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP RDX,-0x1 JZ 0x00147676 MOV R13,RSI MOV R14,RDI MOV R12D,dword ptr [RDI + 0x480] LEA R15,[RDI + 0x290] LEA RBX,[RDI + 0x3a0] LEA R8,[RDI + 0x460] MOV qword ptr [RSP],RDX LEA RDX,[RBP + -0x88] MOV RSI,R15 MOV RCX,RBX MOV R9D,R12D CALL 0x0014773d TEST EAX,EAX JNZ 0x00147676 MOV qword ptr [RBP + -0x98],R13 MOV EAX,dword ptr [RBP + -0x34] MOV RBX,qword ptr [RBX] ADD RBX,RAX MOV R13,qword ptr [RBP + -0x70] SUB R13,RAX LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xe0] MOV ESI,R12D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001476d1 MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001a6fd4 MOV RBX,RAX LAB_0014765d: TEST RBX,RBX MOV RDX,qword ptr [RBP + -0x98] JZ 0x001476a2 MOV RDI,R14 MOV ESI,0x7f CALL 0x00142bb4 LAB_00147676: CALL 0x001a8156 MOV EAX,dword ptr [RAX] LAB_0014767d: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00147738 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001476a2: OR byte ptr [R14 + 0x624],0x2 MOV RAX,qword ptr [R14 + 0x3a0] MOV RCX,qword ptr [RBP + -0x70] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RCX,qword ptr [R14 + 0x3a0] MOV R8,qword ptr [RBP + -0x70] MOV RDI,R14 MOV RSI,R15 CALL 0x001479fd JMP 0x0014767d LAB_001476d1: MOV RCX,RAX LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] LEA RDX,[0x1e1d46] MOV qword ptr [RBP + -0x90],RCX MOV RDI,RCX MOV RSI,R13 MOV ECX,0x2f5 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001a6fd4 MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R13 LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x90] CALL qword ptr [RAX + 0x218] JMP 0x0014765d LAB_00147738: CALL 0x0012a270
ulong _ma_read_pack_record(long param_1,int8 param_2,long param_3) { int4 uVar1; int iVar2; long lVar3; uint *puVar4; ulong uVar5; long lVar6; long lVar7; long in_FS_OFFSET; int1 local_e8 [72]; int8 local_a0; long local_98; int1 local_90 [24]; long local_78; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 != -1) { uVar1 = *(int4 *)(param_1 + 0x480); iVar2 = _ma_pack_get_block_info (param_1,param_1 + 0x290,local_90,(long *)(param_1 + 0x3a0),param_1 + 0x460, uVar1,param_3); if (iVar2 == 0) { lVar6 = *(long *)(param_1 + 0x3a0) + (ulong)local_3c; lVar7 = local_78 - (ulong)local_3c; local_a0 = param_2; lVar3 = (**(code **)(PSI_server + 0x158))(local_e8,uVar1,6); if (lVar3 == 0) { lVar6 = my_read(uVar1,lVar6,lVar7,4); } else { local_98 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,lVar7,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c" ,0x2f5); lVar6 = my_read(uVar1,lVar6,lVar7,4); lVar3 = 0; if (lVar6 == 0) { lVar3 = lVar7; } (**(code **)(PSI_server + 0x218))(local_98,lVar3); } if (lVar6 == 0) { *(byte *)(param_1 + 0x624) = *(byte *)(param_1 + 0x624) | 2; *(int1 *)(*(long *)(param_1 + 0x3a0) + local_78) = 0; uVar5 = _ma_pack_rec_unpack(param_1,param_1 + 0x290,local_a0, *(int8 *)(param_1 + 0x3a0),local_78); goto LAB_0014767d; } _ma_set_fatal_error(param_1,0x7f); } } puVar4 = (uint *)_my_thread_var(); uVar5 = (ulong)*puVar4; LAB_0014767d: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
48,744
mysql_commit_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_commit_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_commit, (parms->mysql), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_commit_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x45a20 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_commit_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_commit mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_commit_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_BYTE *)(v2 + 8) = mysql_commit(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_commit_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00145a20 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_commit_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_commit(*param_1); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
48,745
mysql_stmt_close
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) { my_bool rc= 1; if (stmt) { if (stmt->mysql && stmt->mysql->net.pvio) mysql_stmt_internal_reset(stmt, 1); rc= net_stmt_close(stmt, 1); free(stmt->extension); free(stmt); } return(rc); }
O0
c
mysql_stmt_close: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movb $0x1, -0x9(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2aab8 movq -0x8(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x2aa8e movq -0x8(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, (%rax) je 0x2aa8e movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x29980 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x29b90 movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq 0x340(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rdi callq 0x13520 movb -0x9(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_close: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_9], 1 cmp [rbp+var_8], 0 jz short loc_2AAB8 mov rax, [rbp+var_8] cmp qword ptr [rax+38h], 0 jz short loc_2AA8E mov rax, [rbp+var_8] mov rax, [rax+38h] cmp qword ptr [rax], 0 jz short loc_2AA8E mov rdi, [rbp+var_8] mov esi, 1 call mysql_stmt_internal_reset loc_2AA8E: mov rdi, [rbp+var_8] mov esi, 1 call net_stmt_close mov [rbp+var_9], al mov rax, [rbp+var_8] mov rdi, [rax+340h] call _free mov rdi, [rbp+var_8] call _free loc_2AAB8: mov al, [rbp+var_9] add rsp, 10h pop rbp retn
char mysql_stmt_close(long long a1) { char v2; // [rsp+7h] [rbp-9h] v2 = 1; if ( a1 ) { if ( *(_QWORD *)(a1 + 56) && **(_QWORD **)(a1 + 56) ) mysql_stmt_internal_reset(a1, 1); v2 = net_stmt_close(a1, 1); free(*(_QWORD *)(a1 + 832)); free(a1); } return v2; }
mysql_stmt_close: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],0x1 CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012aab8 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0012aa8e MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX],0x0 JZ 0x0012aa8e MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00129980 LAB_0012aa8e: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00129b90 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x340] CALL 0x00113520 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00113520 LAB_0012aab8: MOV AL,byte ptr [RBP + -0x9] ADD RSP,0x10 POP RBP RET
int1 mysql_stmt_close(void *param_1) { int1 local_11; local_11 = 1; if (param_1 != (void *)0x0) { if ((*(long *)((long)param_1 + 0x38) != 0) && (**(long **)((long)param_1 + 0x38) != 0)) { mysql_stmt_internal_reset(param_1,1); } local_11 = net_stmt_close(param_1,1); free(*(void **)((long)param_1 + 0x340)); free(param_1); } return local_11; }
48,746
ast_create_begin
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_begin(Arena* arena, AstNode** exprs, size_t expr_count, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_BEGIN, line, column); if (!node) { return NULL; } node->as.begin.exprs = exprs; node->as.begin.expr_count = expr_count; return node; }
O0
c
ast_create_begin: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movl $0xa, %esi callq 0xc3c0 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0xcbe7 movq $0x0, -0x8(%rbp) jmp 0xcc07 movq -0x18(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x50(%rax) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ast_create_begin: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rdi, [rbp+var_10] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov esi, 0Ah call ast_create_node mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_CBE7 mov [rbp+var_8], 0 jmp short loc_CC07 loc_CBE7: mov rcx, [rbp+var_18] mov rax, [rbp+var_38] mov [rax+48h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+50h], rcx mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_CC07: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ast_create_begin(long long a1, long long a2, long long a3, long long a4, long long a5) { long long node; // [rsp+8h] [rbp-38h] node = ast_create_node(a1, 10, a4, a5); if ( !node ) return 0LL; *(_QWORD *)(node + 72) = a2; *(_QWORD *)(node + 80) = a3; return node; }
ast_create_begin: 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 qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV ESI,0xa CALL 0x0010c3c0 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0010cbe7 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010cc07 LAB_0010cbe7: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x48],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x50],RCX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0010cc07: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long ast_create_begin(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int8 local_10; local_10 = ast_create_node(param_1,10,param_4,param_5); if (local_10 == 0) { local_10 = 0; } else { *(int8 *)(local_10 + 0x48) = param_2; *(int8 *)(local_10 + 0x50) = param_3; } return local_10; }
48,747
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>&)
monkey531[P]llama/common/json.hpp
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) -> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), j.template get<typename ConstructibleArrayType::value_type>(), void()) { if (JSON_HEDLEY_UNLIKELY(!j.is_array())) { JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); } from_json_array_impl(j, arr, priority_tag<3> {}); }
O0
cpp
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi callq 0xadf50 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1b07d7 jmp 0x1b0889 movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0x5a680 movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi callq 0xb4d40 movq %rax, 0x20(%rsp) leaq 0x64c62(%rip), %rsi # 0x215463 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x1b08b0 jmp 0x1b0812 movq 0x8(%rsp), %rdi movq 0x50(%rsp), %rcx movl $0x12e, %esi # imm = 0x12E leaq 0x28(%rsp), %rdx callq 0x112aa0 jmp 0x1b082d movq 0x8(%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0xef54a(%rip), %rsi # 0x29fd88 leaq -0xfba55(%rip), %rdx # 0xb4df0 callq 0x5aae0 jmp 0x1b08a7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x1b0874 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0x5b528 testb $0x1, 0x13(%rsp) jne 0x1b087d jmp 0x1b0887 movq 0x8(%rsp), %rdi callq 0x5af50 jmp 0x1b089d movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x1b0960 addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0x5aba0 nopw (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: sub rsp, 58h mov qword ptr [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; 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>::is_array(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1B07D7 jmp loc_1B0889 loc_1B07D7: mov [rsp+58h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+58h+var_50], rax; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aTypeMustBeArra; "type must be array, but is " lea rdi, [rsp+58h+var_30]; int lea rdx, [rsp+58h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>(char const(&)[28],char const* &&) jmp short $+2 loc_1B0812: mov rdi, [rsp+58h+var_50]; int mov rcx, qword ptr [rsp+58h+var_8] mov esi, 12Eh lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_1B082D: mov rdi, [rsp+58h+var_50]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_1B08A7 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax jmp short loc_1B0874 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1B0874: test [rsp+arg_B], 1 jnz short loc_1B087D jmp short loc_1B0887 loc_1B087D: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_1B0887: jmp short loc_1B089D loc_1B0889: mov rdi, qword ptr [rsp+58h+var_8] mov rsi, qword ptr [rsp+58h+var_10] call _ZN8nlohmann16json_abi_v3_11_36detail20from_json_array_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_7array_tENS1_12priority_tagILj3EEE; nlohmann::json_abi_v3_11_3::detail::from_json_array_impl<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> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::array_t &,nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>) add rsp, 58h retn loc_1B089D: mov rdi, [rsp+arg_10] call __Unwind_Resume loc_1B08A7: nop word ptr [rax+rax+00000000h]
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_( _BYTE *a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v6; // [rsp+0h] [rbp-58h] void *exception; // [rsp+8h] [rbp-50h] nlohmann::json_abi_v3_11_3::detail::type_error *v8; // [rsp+8h] [rbp-50h] int v9; // [rsp+10h] [rbp-48h] long long v10; // [rsp+18h] [rbp-40h] int v11[2]; // [rsp+20h] [rbp-38h] BYREF int v12[8]; // [rsp+28h] [rbp-30h] BYREF int v13[2]; // [rsp+48h] [rbp-10h] char v14[8]; // [rsp+50h] [rbp-8h] *(_QWORD *)v14 = a1; *(_QWORD *)v13 = a2; if ( !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>::is_array(a1) ) { HIBYTE(v9) = 1; exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v14); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( (int)v12, (int)"type must be array, but is ", (int)v11, v2, v3, v4, v6, exception, v9, v10); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v8, 302, (long long)v12, *(long long *)v14); __cxa_throw( v8, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } return nlohmann::json_abi_v3_11_3::detail::from_json_array_impl<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>>( *(_QWORD *)v14, *(_QWORD *)v13); }
48,748
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>&)
monkey531[P]llama/common/json.hpp
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) -> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), j.template get<typename ConstructibleArrayType::value_type>(), void()) { if (JSON_HEDLEY_UNLIKELY(!j.is_array())) { JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); } from_json_array_impl(j, arr, priority_tag<3> {}); }
O2
cpp
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>::value_type>(), (void)()) nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x91ccd movq %r14, %rdi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x91dae pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x42f88 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x25cc8(%rip), %rsi # 0xb79b7 leaq 0x10(%rsp), %rdi callq 0x91d50 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x62f5e xorl %ebp, %ebp leaq 0x6822e(%rip), %rsi # 0xf9f48 leaq -0x52209(%rip), %rdx # 0x3fb18 movq %rbx, %rdi callq 0x23ef0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241b8 testb %bpl, %bpl jne 0x91d40 jmp 0x91d48 movq %rax, %r14 movq %rbx, %rdi callq 0x23680 movq %r14, %rdi callq 0x23f80
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_91CCD mov rdi, r14 add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_36detail20from_json_array_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_7array_tENS1_12priority_tagILj3EEE; nlohmann::json_abi_v3_11_3::detail::from_json_array_impl<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> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::array_t &,nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>) loc_91CCD: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeArra; "type must be array, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>(char const(&)[28],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_91D40 jmp short loc_91D48 mov r14, rax loc_91D40: mov rdi, rbx; void * call ___cxa_free_exception loc_91D48: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_( unsigned __int8 *a1) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v3[56]; // [rsp+10h] [rbp-38h] BYREF if ( *a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( v3, "type must be array, but is "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return nlohmann::json_abi_v3_11_3::detail::from_json_array_impl<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>>(a1); }
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x00191ccd MOV RDI,R14 ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x00191dae LAB_00191ccd: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x00142f88 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00191ce8: LEA RSI,[0x1b79b7] LEA RDI,[RSP + 0x10] CALL 0x00191d50 MOV BPL,0x1 LAB_00191cfc: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00162f5e XOR EBP,EBP LEA RSI,[0x1f9f48] LEA RDX,[0x13fb18] MOV RDI,RBX CALL 0x00123ef0
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_ (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> *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { nlohmann::json_abi_v3_11_3::detail:: from_json_array_impl<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>> (param_1); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)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> ::type_name(param_1); /* try { // try from 00191ce8 to 00191cf8 has its CatchHandler @ 00191d3d */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (local_38,"type must be array, but is ",&local_40); /* try { // try from 00191cfc to 00191d28 has its CatchHandler @ 00191d29 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
48,749
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) andq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x31ea2(%rip), %rsi # 0xd3c6a leaq 0xf(%rsp), %rdx callq 0x2b18e leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) andq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) addq $0x10, %rsp popq %rbx retq movq %rax, %rdi callq 0x2ba2b nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: push rbx sub rsp, 10h mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx and qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rsi, aMinExp0+0Ah; "0" lea rdx, [rsp+18h+var_9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rax, [rbx+60h] mov [rbx+50h], rax and qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 add rsp, 10h pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 48), (long long)"0"); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX AND qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LAB_001a1dc1: LEA RSI,[0x1d3c6a] LEA RDX,[RSP + 0xf] CALL 0x0012b18e LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX AND qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 ADD RSP,0x10 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this,int8 *param_2,int8 param_3) { int8 uVar1; int8 uVar2; int8 uVar3; allocator local_9; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[3]; *(int8 *)(this + 0x10) = param_2[2]; *(int8 *)(this + 0x18) = uVar3; *(int8 *)this = uVar1; *(int8 *)(this + 8) = uVar2; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; /* try { // try from 001a1dc1 to 001a1dd1 has its CatchHandler @ 001a1de9 */ std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x30),"0",&local_9); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> )0x0; return; }
48,750
postprocess_cpu_params(cpu_params&, cpu_params const*)
monkey531[P]llama/common/common.cpp
void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) { int32_t n_set = 0; if (cpuparams.n_threads < 0) { // Assuming everything about cpuparams is invalid if (role_model != nullptr) { cpuparams = *role_model; } else { cpuparams.n_threads = cpu_get_num_math(); } } for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (cpuparams.cpumask[i]) { n_set++; } } if (n_set && n_set < cpuparams.n_threads) { // Not enough set bits, may experience performance issues. LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads); } }
O0
cpp
postprocess_cpu_params(cpu_params&, cpu_params const*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movl $0x0, 0x4(%rsp) movq 0x10(%rsp), %rax cmpl $0x0, (%rax) jge 0xeee5e cmpq $0x0, 0x8(%rsp) je 0xeee4e movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdi movl $0x214, %edx # imm = 0x214 callq 0x5d110 jmp 0xeee5c callq 0xeeb90 movl %eax, %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) jmp 0xeee5e movl $0x0, (%rsp) cmpl $0x200, (%rsp) # imm = 0x200 jge 0xeee96 movq 0x10(%rsp), %rax movslq (%rsp), %rcx testb $0x1, 0x4(%rax,%rcx) je 0xeee89 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0xeee8b movl (%rsp), %eax addl $0x1, %eax movl %eax, (%rsp) jmp 0xeee65 cmpl $0x0, 0x4(%rsp) je 0xeeee4 movl 0x4(%rsp), %eax movq 0x10(%rsp), %rcx cmpl (%rcx), %eax jge 0xeeee4 jmp 0xeeeac xorl %eax, %eax leaq 0x1c1753(%rip), %rcx # 0x2b0608 cmpl (%rcx), %eax jg 0xeeee0 callq 0x1c1890 movq %rax, %rdi movl 0x4(%rsp), %ecx movq 0x10(%rsp), %rax movl (%rax), %r8d movl $0x3, %esi leaq 0x12a46e(%rip), %rdx # 0x219347 movb $0x0, %al callq 0x1c1980 jmp 0xeeee2 jmp 0xeeee4 addq $0x18, %rsp retq nopl (%rax)
_Z22postprocess_cpu_paramsR10cpu_paramsPKS_: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov [rsp+18h+var_14], 0 mov rax, [rsp+18h+var_8] cmp dword ptr [rax], 0 jge short loc_EEE5E cmp [rsp+18h+var_10], 0 jz short loc_EEE4E mov rsi, [rsp+18h+var_10] mov rdi, [rsp+18h+var_8] mov edx, 214h call _memcpy jmp short loc_EEE5C loc_EEE4E: call _Z16cpu_get_num_mathv; cpu_get_num_math(void) mov ecx, eax mov rax, [rsp+18h+var_8] mov [rax], ecx loc_EEE5C: jmp short $+2 loc_EEE5E: mov [rsp+18h+var_18], 0 loc_EEE65: cmp [rsp+18h+var_18], 200h jge short loc_EEE96 mov rax, [rsp+18h+var_8] movsxd rcx, [rsp+18h+var_18] test byte ptr [rax+rcx+4], 1 jz short loc_EEE89 mov eax, [rsp+18h+var_14] add eax, 1 mov [rsp+18h+var_14], eax loc_EEE89: jmp short $+2 loc_EEE8B: mov eax, [rsp+18h+var_18] add eax, 1 mov [rsp+18h+var_18], eax jmp short loc_EEE65 loc_EEE96: cmp [rsp+18h+var_14], 0 jz short loc_EEEE4 mov eax, [rsp+18h+var_14] mov rcx, [rsp+18h+var_8] cmp eax, [rcx] jge short loc_EEEE4 jmp short $+2 loc_EEEAC: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EEEE0 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax mov ecx, [rsp+18h+var_14] mov rax, [rsp+18h+var_8] mov r8d, [rax] mov esi, 3 lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"... mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EEEE0: jmp short $+2 loc_EEEE2: jmp short $+2 loc_EEEE4: add rsp, 18h retn
long long postprocess_cpu_params(cpu_params *a1, const cpu_params *a2) { long long result; // rax int num_math; // ecx int v4; // eax int v5; // r9d int i; // [rsp+0h] [rbp-18h] unsigned int v7; // [rsp+4h] [rbp-14h] v7 = 0; result = (long long)a1; if ( *(int *)a1 < 0 ) { if ( a2 ) { result = memcpy(a1, a2, 532LL); } else { num_math = cpu_get_num_math(); result = (long long)a1; *(_DWORD *)a1 = num_math; } } for ( i = 0; i < 512; ++i ) { if ( (*((_BYTE *)a1 + i + 4) & 1) != 0 ) ++v7; result = (unsigned int)(i + 1); } if ( v7 ) { result = v7; if ( (signed int)v7 < *(_DWORD *)a1 ) { result = 0LL; if ( common_log_verbosity_thold >= 0 ) { v4 = common_log_main(); return common_log_add( v4, 3, (unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", v7, *(_DWORD *)a1, v5); } } } return result; }
postprocess_cpu_params: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV dword ptr [RSP + 0x4],0x0 MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX],0x0 JGE 0x001eee5e CMP qword ptr [RSP + 0x8],0x0 JZ 0x001eee4e MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] MOV EDX,0x214 CALL 0x0015d110 JMP 0x001eee5c LAB_001eee4e: CALL 0x001eeb90 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX LAB_001eee5c: JMP 0x001eee5e LAB_001eee5e: MOV dword ptr [RSP],0x0 LAB_001eee65: CMP dword ptr [RSP],0x200 JGE 0x001eee96 MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP] TEST byte ptr [RAX + RCX*0x1 + 0x4],0x1 JZ 0x001eee89 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX LAB_001eee89: JMP 0x001eee8b LAB_001eee8b: MOV EAX,dword ptr [RSP] ADD EAX,0x1 MOV dword ptr [RSP],EAX JMP 0x001eee65 LAB_001eee96: CMP dword ptr [RSP + 0x4],0x0 JZ 0x001eeee4 MOV EAX,dword ptr [RSP + 0x4] MOV RCX,qword ptr [RSP + 0x10] CMP EAX,dword ptr [RCX] JGE 0x001eeee4 JMP 0x001eeeac LAB_001eeeac: XOR EAX,EAX LEA RCX,[0x3b0608] CMP EAX,dword ptr [RCX] JG 0x001eeee0 CALL 0x002c1890 MOV RDI,RAX MOV ECX,dword ptr [RSP + 0x4] MOV RAX,qword ptr [RSP + 0x10] MOV R8D,dword ptr [RAX] MOV ESI,0x3 LEA RDX,[0x319347] MOV AL,0x0 CALL 0x002c1980 LAB_001eeee0: JMP 0x001eeee2 LAB_001eeee2: JMP 0x001eeee4 LAB_001eeee4: ADD RSP,0x18 RET
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */ void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2) { int4 uVar1; int8 uVar2; int local_18; int local_14; local_14 = 0; if (*(int *)param_1 < 0) { if (param_2 == (cpu_params *)0x0) { uVar1 = cpu_get_num_math(); *(int4 *)param_1 = uVar1; } else { memcpy(param_1,param_2,0x214); } } for (local_18 = 0; local_18 < 0x200; local_18 = local_18 + 1) { if (((byte)param_1[(long)local_18 + 4] & 1) != 0) { local_14 = local_14 + 1; } } if (((local_14 != 0) && (local_14 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); common_log_add(uVar2,3, "Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", local_14,*(int4 *)param_1); } return; }
48,751
postprocess_cpu_params(cpu_params&, cpu_params const*)
monkey531[P]llama/common/common.cpp
void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) { int32_t n_set = 0; if (cpuparams.n_threads < 0) { // Assuming everything about cpuparams is invalid if (role_model != nullptr) { cpuparams = *role_model; } else { cpuparams.n_threads = cpu_get_num_math(); } } for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (cpuparams.cpumask[i]) { n_set++; } } if (n_set && n_set < cpuparams.n_threads) { // Not enough set bits, may experience performance issues. LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads); } }
O2
cpp
postprocess_cpu_params(cpu_params&, cpu_params const*): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, (%rdi) jns 0x53fd5 testq %rsi, %rsi je 0x53fce movl $0x214, %edx # imm = 0x214 movq %rbx, %rdi callq 0x24740 jmp 0x53fd5 callq 0x53ddb movl %eax, (%rbx) xorl %ebp, %ebp pushq $0x4 popq %rax cmpq $0x204, %rax # imm = 0x204 je 0x53fed movzbl (%rbx,%rax), %ecx addl %ecx, %ebp incq %rax jmp 0x53fda testl %ebp, %ebp je 0x54025 cmpl (%rbx), %ebp jge 0x54025 leaq 0xae44c(%rip), %rax # 0x102448 cmpl $0x0, (%rax) js 0x54025 callq 0x970d6 movl (%rbx), %r8d leaq 0x60953(%rip), %rdx # 0xb4963 pushq $0x3 popq %rsi movq %rax, %rdi movl %ebp, %ecx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0x9716e addq $0x8, %rsp popq %rbx popq %rbp retq
_Z22postprocess_cpu_paramsR10cpu_paramsPKS_: push rbp push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 0 jns short loc_53FD5 test rsi, rsi jz short loc_53FCE mov edx, 214h mov rdi, rbx call _memcpy jmp short loc_53FD5 loc_53FCE: call _Z16cpu_get_num_mathv; cpu_get_num_math(void) mov [rbx], eax loc_53FD5: xor ebp, ebp push 4 pop rax loc_53FDA: cmp rax, 204h jz short loc_53FED movzx ecx, byte ptr [rbx+rax] add ebp, ecx inc rax jmp short loc_53FDA loc_53FED: test ebp, ebp jz short loc_54025 cmp ebp, [rbx] jge short loc_54025 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_54025 call _Z15common_log_mainv; common_log_main(void) mov r8d, [rbx] lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"... push 3 pop rsi mov rdi, rax mov ecx, ebp xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_54025: add rsp, 8 pop rbx pop rbp retn
int * postprocess_cpu_params(_DWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7) { int v7; // ebp int *result; // rax int v9; // eax int v10; // r9d if ( (int)*a1 < 0 ) { if ( a2 ) memcpy(a1, a2, 532LL); else *a1 = cpu_get_num_math(); } v7 = 0; for ( result = (_DWORD *)&byte_4; result != &dword_204; result = (int *)((char *)result + 1) ) v7 += *((unsigned __int8 *)result + (_QWORD)a1); if ( v7 && v7 < *a1 ) { result = (int *)&common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v9 = common_log_main(); return (int *)common_log_add( v9, 3, (unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", v7, *a1, v10, a7); } } return result; }
postprocess_cpu_params: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x0 JNS 0x00153fd5 TEST RSI,RSI JZ 0x00153fce MOV EDX,0x214 MOV RDI,RBX CALL 0x00124740 JMP 0x00153fd5 LAB_00153fce: CALL 0x00153ddb MOV dword ptr [RBX],EAX LAB_00153fd5: XOR EBP,EBP PUSH 0x4 POP RAX LAB_00153fda: CMP RAX,0x204 JZ 0x00153fed MOVZX ECX,byte ptr [RBX + RAX*0x1] ADD EBP,ECX INC RAX JMP 0x00153fda LAB_00153fed: TEST EBP,EBP JZ 0x00154025 CMP EBP,dword ptr [RBX] JGE 0x00154025 LEA RAX,[0x202448] CMP dword ptr [RAX],0x0 JS 0x00154025 CALL 0x001970d6 MOV R8D,dword ptr [RBX] LEA RDX,[0x1b4963] PUSH 0x3 POP RSI MOV RDI,RAX MOV ECX,EBP XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x0019716e LAB_00154025: ADD RSP,0x8 POP RBX POP RBP RET
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */ void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2) { int4 uVar1; long lVar2; int8 uVar3; int iVar4; if (*(int *)param_1 < 0) { if (param_2 == (cpu_params *)0x0) { uVar1 = cpu_get_num_math(); *(int4 *)param_1 = uVar1; } else { memcpy(param_1,param_2,0x214); } } iVar4 = 0; for (lVar2 = 4; lVar2 != 0x204; lVar2 = lVar2 + 1) { iVar4 = iVar4 + (uint)(byte)param_1[lVar2]; } if (((iVar4 != 0) && (iVar4 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) { uVar3 = common_log_main(); common_log_add(uVar3,3, "Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", iVar4,*(int4 *)param_1); return; } return; }
48,752
minja::FilterTemplateToken::~FilterTemplateToken()
monkey531[P]llama/common/minja.hpp
FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter) : TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {}
O1
cpp
minja::FilterTemplateToken::~FilterTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x934cf(%rip), %rax # 0x12de58 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x9a99e callq 0x6e5ca leaq 0x92953(%rip), %rax # 0x12d2f8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x9a9ba callq 0x6e5ca movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1b8e0
_ZN5minja19FilterTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_9A99E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9A99E: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_9A9BA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9A9BA: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::FilterTemplateToken::~FilterTemplateToken(minja::FilterTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::FilterTemplateToken + 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); }
~FilterTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22de58] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0019a99e CALL 0x0016e5ca LAB_0019a99e: LEA RAX,[0x22d2f8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0019a9ba CALL 0x0016e5ca LAB_0019a9ba: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011b8e0
/* minja::FilterTemplateToken::~FilterTemplateToken() */ void __thiscall minja::FilterTemplateToken::~FilterTemplateToken(FilterTemplateToken *this) { *(int ***)this = &PTR__FilterTemplateToken_0022de68; 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_0022d308; 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; }
48,753
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 0xb52fa1(%rip), %rax # 0xc08998 movq (%rax), %rax testq %rax, %rax je 0xb5a2a 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 0xb5b50 movl 0x18(%rbp), %r11d movl 0x10(%rbp), %r8d movl $0xffffffff, %r15d # imm = 0xFFFFFFFF cmpq %r12, %r13 je 0xb5b46 movb (%r13), %al movsbl %al, %ecx cmpl %r11d, %ecx sete %sil cmpl %r8d, %ecx sete %dl orb %dl, %sil je 0xb5aa7 testb %dl, %dl je 0xb5a9d incq %r13 movq %r13, %rax cmpq %rbx, %r14 je 0xb5b50 movq %r14, %rcx movq %rax, %r13 cmpq %r12, %rax jae 0xb5a8a leaq 0x1(%rcx), %r14 movsbl (%r13), %edx leaq 0x1(%r13), %rax cmpl %r8d, %edx je 0xb5a64 incq %rcx cmpq %r12, %r13 je 0xb5b43 movb (%r13), %al movq %rcx, %r14 movsbl %al, %eax cmpl %r11d, %eax jne 0xb5a38 jmp 0xb5b08 movl $0x1, %r15d cmpq %rbx, %r14 je 0xb5b50 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 0xb5b50 incq %r14 incq %r13 cmpq %r12, %r13 je 0xb5b46 movb (%r13), %al movsbl %al, %ecx cmpl %r8d, %ecx sete %dl cmpl %r11d, %ecx je 0xb5a5a cmpl %r8d, %ecx jne 0xb5aa7 jmp 0xb5a5a leaq 0x1(%r13), %rax xorl %r15d, %r15d cmpq %r12, %rax je 0xb5b50 addq $0x2, %r13 movb -0x1(%r13), %al movsbl %al, %ecx cmpl %r11d, %ecx je 0xb5b35 cmpl %r8d, %ecx jne 0xb5b62 cmpq %rbx, %r14 je 0xb5c0d incq %r14 leaq 0x1(%r13), %rax cmpq %r12, %r13 movq %rax, %r13 jne 0xb5b18 jmp 0xb5b50 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 0xb5b50 movzbl %al, %ecx leaq -0x1(%r13), %rdx cmpl %r9d, %ecx jne 0xb5b85 cmpq %r12, %r13 je 0xb5b85 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 0xb5b50 movq 0x58(%rdi), %rax movzbl (%r14), %ecx cmpb %r13b, (%rax,%rcx) je 0xb5bb3 incq %r14 cmpq %rbx, %r14 jne 0xb5b9f jmp 0xb5b50 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 0xb59cf addq $0x20, %rsp testl %eax, %eax jle 0xb5c18 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 0xb5b96 jmp 0xb5b50 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF jmp 0xb5b50 movl %eax, %r15d jmp 0xb5b50
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_B5A2A 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_B5B50 loc_B5A2A: mov r11d, [rbp+arg_8] mov r8d, [rbp+arg_0] mov r15d, 0FFFFFFFFh loc_B5A38: cmp r13, r12 jz loc_B5B46 mov al, [r13+0] movsx ecx, al cmp ecx, r11d setz sil cmp ecx, r8d setz dl or sil, dl jz short loc_B5AA7 loc_B5A5A: test dl, dl jz short loc_B5A9D inc r13 mov rax, r13 loc_B5A64: cmp r14, rbx jz loc_B5B50 mov rcx, r14 mov r13, rax cmp rax, r12 jnb short loc_B5A8A lea r14, [rcx+1] movsx edx, byte ptr [r13+0] lea rax, [r13+1] cmp edx, r8d jz short loc_B5A64 loc_B5A8A: inc rcx cmp r13, r12 jz loc_B5B43 mov al, [r13+0] mov r14, rcx loc_B5A9D: movsx eax, al cmp eax, r11d jnz short loc_B5A38 jmp short loc_B5B08 loc_B5AA7: mov r15d, 1 cmp r14, rbx jz loc_B5B50 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_B5B50 inc r14 inc r13 cmp r13, r12 jz short loc_B5B46 mov al, [r13+0] movsx ecx, al cmp ecx, r8d setz dl cmp ecx, r11d jz loc_B5A5A cmp ecx, r8d jnz short loc_B5AA7 jmp loc_B5A5A loc_B5B08: lea rax, [r13+1] xor r15d, r15d cmp rax, r12 jz short loc_B5B50 add r13, 2 loc_B5B18: mov al, [r13-1] movsx ecx, al cmp ecx, r11d jz short loc_B5B35 cmp ecx, r8d jnz short loc_B5B62 cmp r14, rbx jz loc_B5C0D inc r14 loc_B5B35: lea rax, [r13+1] cmp r13, r12 mov r13, rax jnz short loc_B5B18 jmp short loc_B5B50 loc_B5B43: mov r14, rcx loc_B5B46: xor r15d, r15d cmp r14, rbx setnz r15b loc_B5B50: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B5B62: mov r15d, 0FFFFFFFFh cmp r14, rbx jz short loc_B5B50 movzx ecx, al lea rdx, [r13-1] cmp ecx, r9d jnz short loc_B5B85 cmp r13, r12 jz short loc_B5B85 mov al, [r13+0] mov rdx, r13 loc_B5B85: inc rdx mov rcx, [rdi+58h] movzx eax, al mov r13b, [rcx+rax] inc r10d loc_B5B96: cmp r14, rbx jz short loc_B5B50 mov rax, [rdi+58h] loc_B5B9F: movzx ecx, byte ptr [r14] cmp [rax+rcx], r13b jz short loc_B5BB3 inc r14 cmp r14, rbx jnz short loc_B5B9F jmp short loc_B5B50 loc_B5BB3: 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_B5C18 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_B5B96 jmp loc_B5B50 loc_B5C0D: mov r15d, 0FFFFFFFFh jmp loc_B5B50 loc_B5C18: mov r15d, eax jmp loc_B5B50
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,[0xd08998] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001b5a2a 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 0x001b5b50 LAB_001b5a2a: MOV R11D,dword ptr [RBP + 0x18] MOV R8D,dword ptr [RBP + 0x10] MOV R15D,0xffffffff LAB_001b5a38: CMP R13,R12 JZ 0x001b5b46 MOV AL,byte ptr [R13] MOVSX ECX,AL CMP ECX,R11D SETZ SIL CMP ECX,R8D SETZ DL OR SIL,DL JZ 0x001b5aa7 LAB_001b5a5a: TEST DL,DL JZ 0x001b5a9d INC R13 MOV RAX,R13 LAB_001b5a64: CMP R14,RBX JZ 0x001b5b50 MOV RCX,R14 MOV R13,RAX CMP RAX,R12 JNC 0x001b5a8a LEA R14,[RCX + 0x1] MOVSX EDX,byte ptr [R13] LEA RAX,[R13 + 0x1] CMP EDX,R8D JZ 0x001b5a64 LAB_001b5a8a: INC RCX CMP R13,R12 JZ 0x001b5b43 MOV AL,byte ptr [R13] MOV R14,RCX LAB_001b5a9d: MOVSX EAX,AL CMP EAX,R11D JNZ 0x001b5a38 JMP 0x001b5b08 LAB_001b5aa7: MOV R15D,0x1 CMP R14,RBX JZ 0x001b5b50 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 0x001b5b50 INC R14 INC R13 CMP R13,R12 JZ 0x001b5b46 MOV AL,byte ptr [R13] MOVSX ECX,AL CMP ECX,R8D SETZ DL CMP ECX,R11D JZ 0x001b5a5a CMP ECX,R8D JNZ 0x001b5aa7 JMP 0x001b5a5a LAB_001b5b08: LEA RAX,[R13 + 0x1] XOR R15D,R15D CMP RAX,R12 JZ 0x001b5b50 ADD R13,0x2 LAB_001b5b18: MOV AL,byte ptr [R13 + -0x1] MOVSX ECX,AL CMP ECX,R11D JZ 0x001b5b35 CMP ECX,R8D JNZ 0x001b5b62 CMP R14,RBX JZ 0x001b5c0d INC R14 LAB_001b5b35: LEA RAX,[R13 + 0x1] CMP R13,R12 MOV R13,RAX JNZ 0x001b5b18 JMP 0x001b5b50 LAB_001b5b43: MOV R14,RCX LAB_001b5b46: XOR R15D,R15D CMP R14,RBX SETNZ R15B LAB_001b5b50: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b5b62: MOV R15D,0xffffffff CMP R14,RBX JZ 0x001b5b50 MOVZX ECX,AL LEA RDX,[R13 + -0x1] CMP ECX,R9D JNZ 0x001b5b85 CMP R13,R12 JZ 0x001b5b85 MOV AL,byte ptr [R13] MOV RDX,R13 LAB_001b5b85: INC RDX MOV RCX,qword ptr [RDI + 0x58] MOVZX EAX,AL MOV R13B,byte ptr [RCX + RAX*0x1] INC R10D LAB_001b5b96: CMP R14,RBX JZ 0x001b5b50 MOV RAX,qword ptr [RDI + 0x58] LAB_001b5b9f: MOVZX ECX,byte ptr [R14] CMP byte ptr [RAX + RCX*0x1],R13B JZ 0x001b5bb3 INC R14 CMP R14,RBX JNZ 0x001b5b9f JMP 0x001b5b50 LAB_001b5bb3: 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 0x001b59cf ADD RSP,0x20 TEST EAX,EAX JLE 0x001b5c18 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 0x001b5b96 JMP 0x001b5b50 LAB_001b5c0d: MOV R15D,0xffffffff JMP 0x001b5b50 LAB_001b5c18: MOV R15D,EAX JMP 0x001b5b50
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_001b5b46; 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_001b5b46: return (uint)(param_2 != param_3); }
48,754
mi_search_last
eloqsql/storage/myisam/mi_search.c
int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *buff,*page; DBUG_ENTER("_mi_search_last"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } buff=info->buff; do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } page= buff+mi_getint(buff); nod_flag=mi_test_if_nod(buff); } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page, &info->lastkey_length)) DBUG_RETURN(-1); info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); info->int_keypos=info->int_maxpos=page; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); }
O0
c
mi_search_last: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0xc3901 callq 0xf7440 movl $0x78, (%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc3aa7 movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x30(%rbp), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbf3d0 cmpq $0x0, %rax jne 0xc394e movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc3aa7 movq -0x30(%rbp), %rax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx movq -0x30(%rbp), %rdx movzbl (%rdx), %edx movzwl %dx, %edx shll $0x8, %edx orl %edx, %ecx movzwl %cx, %ecx andl $0x7fff, %ecx # imm = 0x7FFF movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc39a1 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x3c(%rbp) jmp 0xc39a8 xorl %eax, %eax movl %eax, -0x3c(%rbp) jmp 0xc39a8 movl -0x3c(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %edi movq -0x38(%rbp), %rsi callq 0xc0340 movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0xc3910 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x108(%rax), %rcx movq -0x38(%rbp), %r8 movq -0x10(%rbp), %r9 addq $0x1d8, %r9 # imm = 0x1D8 callq 0xc2d60 cmpq $0x0, %rax jne 0xc3a07 jmp 0xc39fb movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc3aa7 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x108(%rax), %rdx movq -0x10(%rbp), %rax movl 0x1d8(%rax), %eax addq %rax, %rdx xorl %esi, %esi callq 0xc05c0 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x130(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x128(%rax) movl -0x24(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x138(%rax) movq -0x18(%rbp), %rax movl 0x1c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x13c(%rax) movq -0x10(%rbp), %rax movq 0x190(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x198(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33d(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33c(%rax) jmp 0xc3a9e jmp 0xc3aa0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
_mi_search_last: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_C3901 call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C3AA7 loc_C3901: mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rbp+var_30], rax loc_C3910: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov r8, [rbp+var_30] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_C394E mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C3AA7 loc_C394E: mov rax, [rbp+var_30] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] movzx ecx, cx mov rdx, [rbp+var_30] movzx edx, byte ptr [rdx] movzx edx, dx shl edx, 8 or ecx, edx movzx ecx, cx and ecx, 7FFFh mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C39A1 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_3C], eax jmp short loc_C39A8 loc_C39A1: xor eax, eax mov [rbp+var_3C], eax jmp short $+2 loc_C39A8: mov eax, [rbp+var_3C] mov [rbp+var_24], eax mov edi, [rbp+var_24] mov rsi, [rbp+var_38] call _mi_kpos mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_C3910 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rax, [rbp+var_10] mov rcx, [rax+108h] mov r8, [rbp+var_38] mov r9, [rbp+var_10] add r9, 1D8h call _mi_get_last_key cmp rax, 0 jnz short loc_C3A07 jmp short $+2 loc_C39FB: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C3AA7 loc_C3A07: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+108h] mov rax, [rbp+var_10] mov eax, [rax+1D8h] add rdx, rax xor esi, esi call _mi_dpos mov rcx, rax mov rax, [rbp+var_10] mov [rax+170h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+130h], rcx mov rax, [rbp+var_10] mov [rax+128h], rcx mov ecx, [rbp+var_24] mov rax, [rbp+var_10] mov [rax+138h], ecx mov rax, [rbp+var_18] mov ecx, [rax+1Ch] mov rax, [rbp+var_10] mov [rax+13Ch], ecx mov rax, [rbp+var_10] mov rcx, [rax+190h] mov rax, [rbp+var_10] mov [rax+198h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 0 mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 0 jmp short $+2 loc_C3A9E: jmp short $+2 loc_C3AA0: mov [rbp+var_4], 0 loc_C3AA7: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long mi_search_last(long long a1, long long a2, long long a3) { unsigned int v4; // [rsp+4h] [rbp-3Ch] unsigned long long v5; // [rsp+8h] [rbp-38h] unsigned __int16 *v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+20h] [rbp-20h] v7 = a3; if ( a3 == -1 ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 120; *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; } else { v6 = *(unsigned __int16 **)(a1 + 256); do { if ( !mi_fetch_keypage((_QWORD *)a1, a2, v7, 3, (int)v6, 0) ) { *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; } v5 = (unsigned long long)v6 + (_byteswap_ushort(*v6) & 0x7FFF); if ( (*(_BYTE *)v6 & 0x80) != 0 ) v4 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); else v4 = 0; v7 = mi_kpos(v4, v5); } while ( v7 != -1 ); if ( mi_get_last_key(a1, a2, v6, *(_BYTE **)(a1 + 264), v5, (_DWORD *)(a1 + 472)) ) { *(_QWORD *)(a1 + 368) = mi_dpos(a1, 0, *(unsigned int *)(a1 + 472) + *(_QWORD *)(a1 + 264)); *(_QWORD *)(a1 + 304) = v5; *(_QWORD *)(a1 + 296) = v5; *(_DWORD *)(a1 + 312) = v4; *(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28); *(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400); *(_BYTE *)(a1 + 829) = 0; *(_BYTE *)(a1 + 828) = 0; return 0; } else { return (unsigned int)-1; } } }
_mi_search_last: 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 CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x001c3901 CALL 0x001f7440 MOV dword ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c3aa7 LAB_001c3901: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV qword ptr [RBP + -0x30],RAX LAB_001c3910: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x30] MOV ECX,0x3 XOR R9D,R9D CALL 0x001bf3d0 CMP RAX,0x0 JNZ 0x001c394e MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c3aa7 LAB_001c394e: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX MOV RDX,qword ptr [RBP + -0x30] MOVZX EDX,byte ptr [RDX] MOVZX EDX,DX SHL EDX,0x8 OR ECX,EDX MOVZX ECX,CX AND ECX,0x7fff MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c39a1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c39a8 LAB_001c39a1: XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c39a8 LAB_001c39a8: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x24],EAX MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001c0340 MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x001c3910 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x108] MOV R8,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x10] ADD R9,0x1d8 CALL 0x001c2d60 CMP RAX,0x0 JNZ 0x001c3a07 JMP 0x001c39fb LAB_001c39fb: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c3aa7 LAB_001c3a07: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1d8] ADD RDX,RAX XOR ESI,ESI CALL 0x001c05c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x128],RCX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x138],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x13c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x190] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x198],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x0 JMP 0x001c3a9e LAB_001c3a9e: JMP 0x001c3aa0 LAB_001c3aa0: MOV dword ptr [RBP + -0x4],0x0 LAB_001c3aa7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 _mi_search_last(long *param_1,long param_2,long param_3) { byte *pbVar1; int4 *puVar2; long lVar3; byte *pbVar4; int4 local_44; long local_28; int4 local_c; if (param_3 == -1) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x78; param_1[0x2e] = -1; local_c = 0xffffffff; } else { pbVar1 = (byte *)param_1[0x20]; local_28 = param_3; do { lVar3 = _mi_fetch_keypage(param_1,param_2,local_28,3,pbVar1,0); if (lVar3 == 0) { param_1[0x2e] = -1; return 0xffffffff; } pbVar4 = pbVar1 + ((uint)pbVar1[1] | (*pbVar1 & 0x7f) << 8); if ((*pbVar1 & 0x80) == 0) { local_44 = 0; } else { local_44 = *(int4 *)(*param_1 + 0x17c); } local_28 = _mi_kpos(local_44,pbVar4); } while (local_28 != -1); lVar3 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar4,param_1 + 0x3b); if (lVar3 == 0) { local_c = 0xffffffff; } else { lVar3 = _mi_dpos(param_1,0,param_1[0x21] + (ulong)*(uint *)(param_1 + 0x3b)); param_1[0x2e] = lVar3; param_1[0x26] = (long)pbVar4; param_1[0x25] = (long)pbVar4; *(int4 *)(param_1 + 0x27) = local_44; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c); param_1[0x33] = param_1[0x32]; *(int1 *)((long)param_1 + 0x33d) = 0; *(int1 *)((long)param_1 + 0x33c) = 0; local_c = 0; } } return local_c; }
48,755
mi_search_last
eloqsql/storage/myisam/mi_search.c
int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *buff,*page; DBUG_ENTER("_mi_search_last"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } buff=info->buff; do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } page= buff+mi_getint(buff); nod_flag=mi_test_if_nod(buff); } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page, &info->lastkey_length)) DBUG_RETURN(-1); info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); info->int_keypos=info->int_maxpos=page; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); }
O3
c
mi_search_last: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $-0x1, %rdx je 0x8719d movq %rdx, %rax movq %rsi, %r14 movq 0x100(%rbx), %r12 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx movl $0x3, %ecx movq %r12, %r8 xorl %r9d, %r9d callq 0x84c04 testq %rax, %rax je 0x871a8 movzbl (%r12), %r15d xorl %r13d, %r13d testb %r15b, %r15b jns 0x870fb movq (%rbx), %rax movl 0x17c(%rax), %r13d movzbl 0x1(%r12), %eax andl $0x7f, %r15d shll $0x8, %r15d orq %rax, %r15 addq %r12, %r15 movl %r13d, %edi movq %r15, %rsi callq 0x8557e cmpq $-0x1, %rax jne 0x870c2 movq 0x108(%rbx), %rcx leaq 0x1d8(%rbx), %r9 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %r8 callq 0x86a6e testq %rax, %rax je 0x871b3 movl 0x1d8(%rbx), %edx addq 0x108(%rbx), %rdx xorl %r12d, %r12d movq %rbx, %rdi xorl %esi, %esi callq 0x8565d movq %rax, 0x170(%rbx) movq %r15, 0x130(%rbx) movq %r15, 0x128(%rbx) movl %r13d, 0x138(%rbx) movl 0x1c(%r14), %eax movl %eax, 0x13c(%rbx) movq 0x190(%rbx), %rax movq %rax, 0x198(%rbx) movw $0x0, 0x33c(%rbx) jmp 0x871b9 callq 0xa2a4e movl $0x78, (%rax) movq $-0x1, 0x170(%rbx) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_search_last: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_8719D mov rax, rdx mov r14, rsi mov r12, [rbx+100h] loc_870C2: mov rdi, rbx mov rsi, r14 mov rdx, rax mov ecx, 3 mov r8, r12 xor r9d, r9d call _mi_fetch_keypage test rax, rax jz loc_871A8 movzx r15d, byte ptr [r12] xor r13d, r13d test r15b, r15b jns short loc_870FB mov rax, [rbx] mov r13d, [rax+17Ch] loc_870FB: movzx eax, byte ptr [r12+1] and r15d, 7Fh shl r15d, 8 or r15, rax add r15, r12 mov edi, r13d mov rsi, r15 call _mi_kpos cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_870C2 mov rcx, [rbx+108h] lea r9, [rbx+1D8h] mov rdi, rbx mov rsi, r14 mov rdx, r12 mov r8, r15 call _mi_get_last_key test rax, rax jz short loc_871B3 mov edx, [rbx+1D8h] add rdx, [rbx+108h] xor r12d, r12d mov rdi, rbx xor esi, esi call _mi_dpos mov [rbx+170h], rax mov [rbx+130h], r15 mov [rbx+128h], r15 mov [rbx+138h], r13d mov eax, [r14+1Ch] mov [rbx+13Ch], eax mov rax, [rbx+190h] mov [rbx+198h], rax mov word ptr [rbx+33Ch], 0 jmp short loc_871B9 loc_8719D: call _my_thread_var mov dword ptr [rax], 78h ; 'x' loc_871A8: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh loc_871B3: mov r12d, 0FFFFFFFFh loc_871B9: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_search_last(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rax long long v4; // r12 unsigned int v5; // r13d unsigned long long v6; // r15 unsigned int v7; // r12d if ( a3 == -1LL ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 120; } else { v3 = a3; v4 = *(_QWORD *)(a1 + 256); while ( mi_fetch_keypage((_QWORD *)a1, a2, v3) ) { v5 = 0; if ( *(char *)v4 < 0 ) v5 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); v6 = v4 + (*(unsigned __int8 *)(v4 + 1) | (unsigned long long)((unsigned __int8)(*(_BYTE *)v4 & 0x7F) << 8)); v3 = mi_kpos(v5, v6); if ( v3 == -1LL ) { if ( !mi_get_last_key(a1, a2, (char *)v4, *(_BYTE **)(a1 + 264), v6, (_DWORD *)(a1 + 472)) ) return (unsigned int)-1; v7 = 0; *(_QWORD *)(a1 + 368) = mi_dpos((long long *)a1, 0, *(_QWORD *)(a1 + 264) + *(unsigned int *)(a1 + 472)); *(_QWORD *)(a1 + 304) = v6; *(_QWORD *)(a1 + 296) = v6; *(_DWORD *)(a1 + 312) = v5; *(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28); *(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400); *(_WORD *)(a1 + 828) = 0; return v7; } } } *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; }
_mi_search_last: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP RDX,-0x1 JZ 0x0018719d MOV RAX,RDX MOV R14,RSI MOV R12,qword ptr [RBX + 0x100] LAB_001870c2: MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX MOV ECX,0x3 MOV R8,R12 XOR R9D,R9D CALL 0x00184c04 TEST RAX,RAX JZ 0x001871a8 MOVZX R15D,byte ptr [R12] XOR R13D,R13D TEST R15B,R15B JNS 0x001870fb MOV RAX,qword ptr [RBX] MOV R13D,dword ptr [RAX + 0x17c] LAB_001870fb: MOVZX EAX,byte ptr [R12 + 0x1] AND R15D,0x7f SHL R15D,0x8 OR R15,RAX ADD R15,R12 MOV EDI,R13D MOV RSI,R15 CALL 0x0018557e CMP RAX,-0x1 JNZ 0x001870c2 MOV RCX,qword ptr [RBX + 0x108] LEA R9,[RBX + 0x1d8] MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 MOV R8,R15 CALL 0x00186a6e TEST RAX,RAX JZ 0x001871b3 MOV EDX,dword ptr [RBX + 0x1d8] ADD RDX,qword ptr [RBX + 0x108] XOR R12D,R12D MOV RDI,RBX XOR ESI,ESI CALL 0x0018565d MOV qword ptr [RBX + 0x170],RAX MOV qword ptr [RBX + 0x130],R15 MOV qword ptr [RBX + 0x128],R15 MOV dword ptr [RBX + 0x138],R13D MOV EAX,dword ptr [R14 + 0x1c] MOV dword ptr [RBX + 0x13c],EAX MOV RAX,qword ptr [RBX + 0x190] MOV qword ptr [RBX + 0x198],RAX MOV word ptr [RBX + 0x33c],0x0 JMP 0x001871b9 LAB_0018719d: CALL 0x001a2a4e MOV dword ptr [RAX],0x78 LAB_001871a8: MOV qword ptr [RBX + 0x170],-0x1 LAB_001871b3: MOV R12D,0xffffffff LAB_001871b9: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _mi_search_last(long *param_1,long param_2,long param_3) { byte *pbVar1; long lVar2; int4 *puVar3; int4 uVar4; byte *pbVar5; if (param_3 == -1) { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x78; LAB_001871a8: param_1[0x2e] = -1; } else { pbVar1 = (byte *)param_1[0x20]; do { lVar2 = _mi_fetch_keypage(param_1,param_2,param_3,3,pbVar1,0); if (lVar2 == 0) goto LAB_001871a8; uVar4 = 0; if ((char)*pbVar1 < '\0') { uVar4 = *(int4 *)(*param_1 + 0x17c); } pbVar5 = pbVar1 + ((ulong)((*pbVar1 & 0x7f) << 8) | (ulong)pbVar1[1]); param_3 = _mi_kpos(uVar4,pbVar5); } while (param_3 != -1); lVar2 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar5,param_1 + 0x3b); if (lVar2 != 0) { lVar2 = _mi_dpos(param_1,0,(ulong)*(uint *)(param_1 + 0x3b) + param_1[0x21]); param_1[0x2e] = lVar2; param_1[0x26] = (long)pbVar5; param_1[0x25] = (long)pbVar5; *(int4 *)(param_1 + 0x27) = uVar4; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c); param_1[0x33] = param_1[0x32]; *(int2 *)((long)param_1 + 0x33c) = 0; return 0; } } return 0xffffffff; }
48,756
Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&)
untodesu[P]voxelius/game/server/overworld.cc
void Overworld::generate_terrain(const chunk_pos &cpos, VoxelStorage &voxels) { auto &metadata = get_or_create_metadata(chunk_pos_xz(cpos.x, cpos.z)); auto variation = m_terrain_variation.get_value(); for(unsigned long i = 0; i < CHUNK_VOLUME; ++i) { auto lpos = coord::to_local(i); auto vpos = coord::to_voxel(cpos, lpos); if(vpos.y > variation) { voxels[i] = NULL_VOXEL_ID; continue; } if(vpos.y < -variation) { voxels[i] = game_voxels::stone; continue; } if(is_inside_terrain(vpos)) { voxels[i] = game_voxels::stone; continue; } } }
O0
cpp
Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movl (%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx leaq -0x28(%rbp), %rdi callq 0x2ccb0 movq -0x60(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x2bb10 movq -0x60(%rbp), %rdi movq %rax, -0x20(%rbp) addq $0x300, %rdi # imm = 0x300 callq 0x2c5f0 movl %eax, -0x2c(%rbp) movq $0x0, -0x38(%rbp) cmpq $0x1000, -0x38(%rbp) # imm = 0x1000 jae 0x2b2a3 movq -0x38(%rbp), %rdi callq 0x2ccd0 movl %eax, %ecx movl %ecx, -0x3e(%rbp) shrq $0x20, %rax movw %ax, -0x3a(%rbp) movq -0x10(%rbp), %rsi leaq -0x58(%rbp), %rdi leaq -0x3e(%rbp), %rdx callq 0x2ca20 movq -0x50(%rbp), %rax movslq -0x2c(%rbp), %rcx cmpq %rcx, %rax jle 0x2b224 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x2cd30 movw $0x0, (%rax) jmp 0x2b292 movq -0x50(%rbp), %rax xorl %ecx, %ecx subl -0x2c(%rbp), %ecx movslq %ecx, %rcx cmpq %rcx, %rax jge 0x2b259 leaq 0x2a65ec(%rip), %rax # 0x2d1828 movw (%rax), %ax movw %ax, -0x62(%rbp) movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x2cd30 movw -0x62(%rbp), %cx movw %cx, (%rax) jmp 0x2b292 movq -0x60(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x2ba00 testb $0x1, %al jne 0x2b26c jmp 0x2b290 leaq 0x2a65b5(%rip), %rax # 0x2d1828 movw (%rax), %ax movw %ax, -0x64(%rbp) movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x2cd30 movw -0x64(%rbp), %cx movw %cx, (%rax) jmp 0x2b292 jmp 0x2b292 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x2b1ce addq $0x70, %rsp popq %rbp retq nopl (%rax)
_ZN9Overworld16generate_terrainERKN3glm3vecILi3EiLNS0_9qualifierE0EEER12VoxelStorage: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_60], rax mov rax, [rbp+var_10] mov esi, [rax] mov rax, [rbp+var_10] mov edx, [rax+8] lea rdi, [rbp+var_28] call _ZN3glm3vecILi2EiLNS_9qualifierE0EEC2Eii; glm::vec<2,int,(glm::qualifier)0>::vec(int,int) mov rdi, [rbp+var_60] lea rsi, [rbp+var_28]; unsigned __int64 call _ZN9Overworld22get_or_create_metadataERKN3glm3vecILi2EiLNS0_9qualifierE0EEE; Overworld::get_or_create_metadata(glm::vec<2,int,(glm::qualifier)0> const&) mov rdi, [rbp+var_60] mov [rbp+var_20], rax add rdi, 300h call _ZNK12ConfigNumberIiE9get_valueEv; ConfigNumber<int>::get_value(void) mov [rbp+var_2C], eax mov [rbp+var_38], 0 loc_2B1CE: cmp [rbp+var_38], 1000h jnb loc_2B2A3 mov rdi, [rbp+var_38]; this call _ZN5coord8to_localEm; coord::to_local(ulong) mov ecx, eax mov [rbp+var_3E], ecx shr rax, 20h mov [rbp+var_3A], ax mov rsi, [rbp+var_10] lea rdi, [rbp+var_58] lea rdx, [rbp+var_3E] call _ZN5coord8to_voxelERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EsLS2_0EEE; coord::to_voxel(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,short,(glm::qualifier)0> const&) mov rax, [rbp+var_50] movsxd rcx, [rbp+var_2C] cmp rax, rcx jle short loc_2B224 mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] call _ZNSt5arrayItLm4096EEixEm; std::array<ushort,4096ul>::operator[](ulong) mov word ptr [rax], 0 jmp short loc_2B292 loc_2B224: mov rax, [rbp+var_50] xor ecx, ecx sub ecx, [rbp+var_2C] movsxd rcx, ecx cmp rax, rcx jge short loc_2B259 lea rax, _ZN11game_voxels5stoneE; game_voxels::stone mov ax, [rax] mov [rbp+var_62], ax mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] call _ZNSt5arrayItLm4096EEixEm; std::array<ushort,4096ul>::operator[](ulong) mov cx, [rbp+var_62] mov [rax], cx jmp short loc_2B292 loc_2B259: mov rdi, [rbp+var_60] lea rsi, [rbp+var_58] call _ZN9Overworld17is_inside_terrainERKN3glm3vecILi3ElLNS0_9qualifierE0EEE; Overworld::is_inside_terrain(glm::vec<3,long,(glm::qualifier)0> const&) test al, 1 jnz short loc_2B26C jmp short loc_2B290 loc_2B26C: lea rax, _ZN11game_voxels5stoneE; game_voxels::stone mov ax, [rax] mov [rbp+var_64], ax mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] call _ZNSt5arrayItLm4096EEixEm; std::array<ushort,4096ul>::operator[](ulong) mov cx, [rbp+var_64] mov [rax], cx jmp short loc_2B292 loc_2B290: jmp short $+2 loc_2B292: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp loc_2B1CE loc_2B2A3: add rsp, 70h pop rbp retn
char * Overworld::generate_terrain(long long a1, unsigned int *a2, long long a3) { _BYTE *v3; // rsi char *result; // rax long long v5; // rax __int16 v6; // [rsp+Ch] [rbp-64h] __int16 v7; // [rsp+Eh] [rbp-62h] _BYTE v8[8]; // [rsp+18h] [rbp-58h] BYREF long long v9; // [rsp+20h] [rbp-50h] int v10; // [rsp+32h] [rbp-3Eh] BYREF __int16 v11; // [rsp+36h] [rbp-3Ah] coord *i; // [rsp+38h] [rbp-38h] int v13; // [rsp+44h] [rbp-2Ch] unsigned long long v14[2]; // [rsp+48h] [rbp-28h] BYREF long long v15; // [rsp+58h] [rbp-18h] unsigned int *v16; // [rsp+60h] [rbp-10h] long long v17; // [rsp+68h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; glm::vec<2,int,(glm::qualifier)0>::vec(v14, *a2, a2[2]); v3 = v14; v14[1] = Overworld::get_or_create_metadata(a1, v14); result = (char *)ConfigNumber<int>::get_value(a1 + 768); v13 = (int)result; for ( i = 0LL; (unsigned long long)i < 0x1000; i = (coord *)((char *)i + 1) ) { v5 = coord::to_local(i, (unsigned long long)v3); v10 = v5; v11 = WORD2(v5); coord::to_voxel(v8, v16, &v10); if ( v9 <= v13 ) { if ( v9 >= -v13 ) { v3 = v8; if ( (Overworld::is_inside_terrain(a1, v8) & 1) != 0 ) { v6 = game_voxels::stone; v3 = i; *(_WORD *)std::array<unsigned short,4096ul>::operator[](v15, i) = v6; } } else { v7 = game_voxels::stone; v3 = i; *(_WORD *)std::array<unsigned short,4096ul>::operator[](v15, i) = v7; } } else { v3 = i; *(_WORD *)std::array<unsigned short,4096ul>::operator[](v15, i) = 0; } result = (char *)i + 1; } return result; }
generate_terrain: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] LEA RDI,[RBP + -0x28] CALL 0x0012ccb0 MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x28] CALL 0x0012bb10 MOV RDI,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x20],RAX ADD RDI,0x300 CALL 0x0012c5f0 MOV dword ptr [RBP + -0x2c],EAX MOV qword ptr [RBP + -0x38],0x0 LAB_0012b1ce: CMP qword ptr [RBP + -0x38],0x1000 JNC 0x0012b2a3 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0012ccd0 MOV ECX,EAX MOV dword ptr [RBP + -0x3e],ECX SHR RAX,0x20 MOV word ptr [RBP + -0x3a],AX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x58] LEA RDX,[RBP + -0x3e] CALL 0x0012ca20 MOV RAX,qword ptr [RBP + -0x50] MOVSXD RCX,dword ptr [RBP + -0x2c] CMP RAX,RCX JLE 0x0012b224 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0012cd30 MOV word ptr [RAX],0x0 JMP 0x0012b292 LAB_0012b224: MOV RAX,qword ptr [RBP + -0x50] XOR ECX,ECX SUB ECX,dword ptr [RBP + -0x2c] MOVSXD RCX,ECX CMP RAX,RCX JGE 0x0012b259 LEA RAX,[0x3d1828] MOV AX,word ptr [RAX] MOV word ptr [RBP + -0x62],AX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0012cd30 MOV CX,word ptr [RBP + -0x62] MOV word ptr [RAX],CX JMP 0x0012b292 LAB_0012b259: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x58] CALL 0x0012ba00 TEST AL,0x1 JNZ 0x0012b26c JMP 0x0012b290 LAB_0012b26c: LEA RAX,[0x3d1828] MOV AX,word ptr [RAX] MOV word ptr [RBP + -0x64],AX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0012cd30 MOV CX,word ptr [RBP + -0x64] MOV word ptr [RAX],CX JMP 0x0012b292 LAB_0012b290: JMP 0x0012b292 LAB_0012b292: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0012b1ce LAB_0012b2a3: ADD RSP,0x70 POP RBP RET
/* Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&) */ void __thiscall Overworld::generate_terrain(Overworld *this,vec *param_1,VoxelStorage *param_2) { int2 uVar1; int8 uVar2; int2 *puVar3; ulong uVar4; coord local_60 [8]; long local_58; int4 local_46; int2 local_42; ulong local_40; int local_34; vec<2,int,(glm::qualifier)0> local_30 [8]; int8 local_28; VoxelStorage *local_20; vec *local_18; Overworld *local_10; local_20 = param_2; local_18 = param_1; local_10 = this; glm::vec<2,int,(glm::qualifier)0>::vec(local_30,*(int *)param_1,*(int *)(param_1 + 8)); local_28 = get_or_create_metadata(this,(vec *)local_30); local_34 = ConfigNumber<int>::get_value((ConfigNumber<int> *)(this + 0x300)); for (local_40 = 0; local_40 < 0x1000; local_40 = local_40 + 1) { uVar2 = coord::to_local(local_40); local_46 = (int4)uVar2; local_42 = (int2)((ulong)uVar2 >> 0x20); coord::to_voxel(local_60,local_18,(vec *)&local_46); uVar1 = game_voxels::stone; if (local_34 < local_58) { puVar3 = (int2 *) std::array<unsigned_short,4096ul>::operator[] ((array<unsigned_short,4096ul> *)local_20,local_40); *puVar3 = 0; } else if (local_58 < -local_34) { puVar3 = (int2 *) std::array<unsigned_short,4096ul>::operator[] ((array<unsigned_short,4096ul> *)local_20,local_40); *puVar3 = uVar1; } else { uVar4 = is_inside_terrain(this,(vec *)local_60); uVar1 = game_voxels::stone; if ((uVar4 & 1) != 0) { puVar3 = (int2 *) std::array<unsigned_short,4096ul>::operator[] ((array<unsigned_short,4096ul> *)local_20,local_40); *puVar3 = uVar1; } } } return; }
48,757
Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&)
untodesu[P]voxelius/game/server/overworld.cc
void Overworld::generate_terrain(const chunk_pos &cpos, VoxelStorage &voxels) { auto &metadata = get_or_create_metadata(chunk_pos_xz(cpos.x, cpos.z)); auto variation = m_terrain_variation.get_value(); for(unsigned long i = 0; i < CHUNK_VOLUME; ++i) { auto lpos = coord::to_local(i); auto vpos = coord::to_voxel(cpos, lpos); if(vpos.y > variation) { voxels[i] = NULL_VOXEL_ID; continue; } if(vpos.y < -variation) { voxels[i] = game_voxels::stone; continue; } if(is_inside_terrain(vpos)) { voxels[i] = game_voxels::stone; continue; } } }
O2
cpp
Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movl (%rsi), %eax movl 0x8(%rsi), %ecx movq %rsp, %rsi movl %eax, (%rsi) movl %ecx, 0x4(%rsi) callq 0x1d06e movslq 0x308(%r15), %rbp movq %rbp, %r12 negq %r12 xorl %r13d, %r13d cmpq $0x1000, %r13 # imm = 0x1000 je 0x1cb58 movq %r13, %rdi callq 0x1d5dd movq %rax, %rcx movswq %ax, %rdx shrl $0x10, %eax shrq $0x20, %rcx movslq (%r14), %rsi shlq $0x4, %rsi addq %rdx, %rsi movswq %ax, %rdx movslq 0x4(%r14), %rax shlq $0x4, %rax addq %rdx, %rax movswq %cx, %rcx movslq 0x8(%r14), %rdx shlq $0x4, %rdx addq %rcx, %rdx movq %rsi, (%rsp) movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) cmpq %rbp, %rax jle 0x1cb2d xorl %eax, %eax jmp 0x1cb4b cmpq %r12, %rax jl 0x1cb41 movq %r15, %rdi movq %rsp, %rsi callq 0x1cfdc testb %al, %al je 0x1cb50 leaq 0xf1460(%rip), %rax # 0x10dfa8 movzwl (%rax), %eax movw %ax, (%rbx,%r13,2) incq %r13 jmp 0x1cacb addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN9Overworld16generate_terrainERKN3glm3vecILi3EiLNS0_9qualifierE0EEER12VoxelStorage: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov r15, rdi mov eax, [rsi] mov ecx, [rsi+8] mov rsi, rsp; unsigned __int64 mov [rsi], eax mov [rsi+4], ecx call _ZN9Overworld22get_or_create_metadataERKN3glm3vecILi2EiLNS0_9qualifierE0EEE; Overworld::get_or_create_metadata(glm::vec<2,int,(glm::qualifier)0> const&) movsxd rbp, dword ptr [r15+308h] mov r12, rbp neg r12 xor r13d, r13d loc_1CACB: cmp r13, 1000h jz loc_1CB58 mov rdi, r13; this call _ZN5coord8to_localEm; coord::to_local(ulong) mov rcx, rax movsx rdx, ax shr eax, 10h shr rcx, 20h movsxd rsi, dword ptr [r14] shl rsi, 4 add rsi, rdx movsx rdx, ax movsxd rax, dword ptr [r14+4] shl rax, 4 add rax, rdx movsx rcx, cx movsxd rdx, dword ptr [r14+8] shl rdx, 4 add rdx, rcx mov [rsp+48h+var_48], rsi mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx cmp rax, rbp jle short loc_1CB2D xor eax, eax jmp short loc_1CB4B loc_1CB2D: cmp rax, r12 jl short loc_1CB41 mov rdi, r15 mov rsi, rsp call _ZN9Overworld17is_inside_terrainERKN3glm3vecILi3ElLNS0_9qualifierE0EEE; Overworld::is_inside_terrain(glm::vec<3,long,(glm::qualifier)0> const&) test al, al jz short loc_1CB50 loc_1CB41: lea rax, _ZN11game_voxels5stoneE; game_voxels::stone movzx eax, word ptr [rax] loc_1CB4B: mov [rbx+r13*2], ax loc_1CB50: inc r13 jmp loc_1CACB loc_1CB58: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long Overworld::generate_terrain(long long a1, unsigned int *a2, long long a3) { unsigned int v5; // eax int v6; // ecx _QWORD *v7; // rsi long long result; // rax long long v9; // rbp coord *i; // r13 long long v11; // rax __int16 v12; // rcx^4 long long v13; // rax long long v14; // rdx _QWORD v15[9]; // [rsp+0h] [rbp-48h] BYREF v5 = *a2; v6 = a2[2]; v7 = v15; v15[0] = __PAIR64__(v6, v5); result = Overworld::get_or_create_metadata(a1); v9 = *(int *)(a1 + 776); for ( i = 0LL; i != (coord *)&stru_1000; i = (coord *)((char *)i + 1) ) { v11 = coord::to_local(i, (unsigned long long)v7); v12 = WORD2(v11); v7 = (_QWORD *)((__int16)v11 + 16LL * (int)*a2); v13 = SWORD1(v11) + 16LL * (int)a2[1]; v14 = v12 + 16LL * (int)a2[2]; v15[0] = v7; v15[1] = v13; v15[2] = v14; if ( v13 > v9 ) { result = 0LL; LABEL_8: *(_WORD *)(a3 + 2LL * (_QWORD)i) = result; continue; } if ( v13 >= -v9 ) { v7 = v15; result = ((long long ( *)(long long, _QWORD *))Overworld::is_inside_terrain)(a1, v15); if ( !(_BYTE)result ) continue; } result = (unsigned __int16)game_voxels::stone; goto LABEL_8; } return result; }
generate_terrain: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV EAX,dword ptr [RSI] MOV ECX,dword ptr [RSI + 0x8] MOV RSI,RSP MOV dword ptr [RSI],EAX MOV dword ptr [RSI + 0x4],ECX CALL 0x0011d06e MOVSXD RBP,dword ptr [R15 + 0x308] MOV R12,RBP NEG R12 XOR R13D,R13D LAB_0011cacb: CMP R13,0x1000 JZ 0x0011cb58 MOV RDI,R13 CALL 0x0011d5dd MOV RCX,RAX MOVSX RDX,AX SHR EAX,0x10 SHR RCX,0x20 MOVSXD RSI,dword ptr [R14] SHL RSI,0x4 ADD RSI,RDX MOVSX RDX,AX MOVSXD RAX,dword ptr [R14 + 0x4] SHL RAX,0x4 ADD RAX,RDX MOVSX RCX,CX MOVSXD RDX,dword ptr [R14 + 0x8] SHL RDX,0x4 ADD RDX,RCX MOV qword ptr [RSP],RSI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX CMP RAX,RBP JLE 0x0011cb2d XOR EAX,EAX JMP 0x0011cb4b LAB_0011cb2d: CMP RAX,R12 JL 0x0011cb41 MOV RDI,R15 MOV RSI,RSP CALL 0x0011cfdc TEST AL,AL JZ 0x0011cb50 LAB_0011cb41: LEA RAX,[0x20dfa8] MOVZX EAX,word ptr [RAX] LAB_0011cb4b: MOV word ptr [RBX + R13*0x2],AX LAB_0011cb50: INC R13 JMP 0x0011cacb LAB_0011cb58: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&) */ void __thiscall Overworld::generate_terrain(Overworld *this,vec *param_1,VoxelStorage *param_2) { char cVar1; int2 uVar2; int8 uVar3; long lVar4; ulong uVar5; int8 local_48; long local_40; long local_38; local_48 = CONCAT44(*(int4 *)(param_1 + 8),*(int4 *)param_1); get_or_create_metadata(this,(vec *)&local_48); lVar4 = (long)*(int *)(this + 0x308); uVar5 = 0; do { if (uVar5 == 0x1000) { return; } uVar3 = coord::to_local(uVar5); local_48 = (long)*(int *)param_1 * 0x10 + (long)(short)uVar3; local_40 = (long)*(int *)(param_1 + 4) * 0x10 + (long)(short)((ulong)uVar3 >> 0x10); local_38 = (long)*(int *)(param_1 + 8) * 0x10 + (long)(short)((ulong)uVar3 >> 0x20); if (lVar4 < local_40) { uVar2 = 0; LAB_0011cb4b: *(int2 *)(param_2 + uVar5 * 2) = uVar2; } else { uVar2 = game_voxels::stone; if ((SBORROW8(local_40,-lVar4) != local_40 + lVar4 < 0) || (cVar1 = is_inside_terrain(this,(vec *)&local_48), uVar2 = game_voxels::stone, cVar1 != '\0')) goto LAB_0011cb4b; } uVar5 = uVar5 + 1; } while( true ); }
48,758
Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&)
untodesu[P]voxelius/game/server/overworld.cc
void Overworld::generate_terrain(const chunk_pos &cpos, VoxelStorage &voxels) { auto &metadata = get_or_create_metadata(chunk_pos_xz(cpos.x, cpos.z)); auto variation = m_terrain_variation.get_value(); for(unsigned long i = 0; i < CHUNK_VOLUME; ++i) { auto lpos = coord::to_local(i); auto vpos = coord::to_voxel(cpos, lpos); if(vpos.y > variation) { voxels[i] = NULL_VOXEL_ID; continue; } if(vpos.y < -variation) { voxels[i] = game_voxels::stone; continue; } if(is_inside_terrain(vpos)) { voxels[i] = game_voxels::stone; continue; } } }
O3
cpp
Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movl (%rsi), %eax movl 0x8(%rsi), %ecx movq %rsp, %rsi movl %eax, (%rsi) movl %ecx, 0x4(%rsi) callq 0x1fcf0 movslq 0x308(%r15), %r13 movq %r13, %rbp negq %rbp xorl %r12d, %r12d movl %r12d, %eax andl $0xf, %eax movl %r12d, %ecx shrl $0x4, %ecx andl $0xf, %ecx movq %r12, %rdx shrq $0x8, %rdx movslq (%r14), %rsi shlq $0x4, %rsi orq %rax, %rsi movslq 0x4(%r14), %rax shlq $0x4, %rax addq %rdx, %rax movslq 0x8(%r14), %rdx shlq $0x4, %rdx orq %rcx, %rdx movq %rsi, (%rsp) movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) cmpq %r13, %rax jle 0x1f7aa xorl %eax, %eax jmp 0x1f7c8 cmpq %rbp, %rax jl 0x1f7be movq %r15, %rdi movq %rsp, %rsi callq 0x1fc52 testb %al, %al je 0x1f7cd leaq 0xe97a3(%rip), %rax # 0x108f68 movzwl (%rax), %eax movw %ax, (%rbx,%r12,2) incq %r12 cmpq $0x1000, %r12 # imm = 0x1000 jne 0x1f75d addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN9Overworld16generate_terrainERKN3glm3vecILi3EiLNS0_9qualifierE0EEER12VoxelStorage: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov r15, rdi mov eax, [rsi] mov ecx, [rsi+8] mov rsi, rsp mov [rsi], eax mov [rsi+4], ecx call _ZN9Overworld22get_or_create_metadataERKN3glm3vecILi2EiLNS0_9qualifierE0EEE; Overworld::get_or_create_metadata(glm::vec<2,int,(glm::qualifier)0> const&) movsxd r13, dword ptr [r15+308h] mov rbp, r13 neg rbp xor r12d, r12d loc_1F75D: mov eax, r12d and eax, 0Fh mov ecx, r12d shr ecx, 4 and ecx, 0Fh mov rdx, r12 shr rdx, 8 movsxd rsi, dword ptr [r14] shl rsi, 4 or rsi, rax movsxd rax, dword ptr [r14+4] shl rax, 4 add rax, rdx movsxd rdx, dword ptr [r14+8] shl rdx, 4 or rdx, rcx mov [rsp+48h+var_48], rsi mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx cmp rax, r13 jle short loc_1F7AA xor eax, eax jmp short loc_1F7C8 loc_1F7AA: cmp rax, rbp jl short loc_1F7BE mov rdi, r15 mov rsi, rsp call _ZN9Overworld17is_inside_terrainERKN3glm3vecILi3ElLNS0_9qualifierE0EEE; Overworld::is_inside_terrain(glm::vec<3,long,(glm::qualifier)0> const&) test al, al jz short loc_1F7CD loc_1F7BE: lea rax, _ZN11game_voxels5stoneE; game_voxels::stone movzx eax, word ptr [rax] loc_1F7C8: mov [rbx+r12*2], ax loc_1F7CD: inc r12 cmp r12, 1000h jnz short loc_1F75D add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long Overworld::generate_terrain(long long a1, int *a2, long long a3) { int v4; // ecx long long v5; // r13 unsigned long long i; // r12 long long v7; // rax unsigned long long v8; // rdx long long result; // rax _QWORD v10[9]; // [rsp+0h] [rbp-48h] BYREF v4 = a2[2]; LODWORD(v10[0]) = *a2; HIDWORD(v10[0]) = v4; Overworld::get_or_create_metadata(a1); v5 = *(int *)(a1 + 776); for ( i = 0LL; i != 4096; ++i ) { v7 = (i >> 8) + 16LL * a2[1]; v8 = ((unsigned __int8)i >> 4) | (unsigned long long)(16LL * a2[2]); v10[0] = i & 0xF | (16LL * *a2); v10[1] = v7; v10[2] = v8; if ( v7 > v5 ) { result = 0LL; LABEL_7: *(_WORD *)(a3 + 2 * i) = result; continue; } if ( v7 >= -v5 ) { result = ((long long ( *)(long long, _QWORD *))Overworld::is_inside_terrain)(a1, v10); if ( !(_BYTE)result ) continue; } result = (unsigned __int16)game_voxels::stone; goto LABEL_7; } return result; }
generate_terrain: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV EAX,dword ptr [RSI] MOV ECX,dword ptr [RSI + 0x8] MOV RSI,RSP MOV dword ptr [RSI],EAX MOV dword ptr [RSI + 0x4],ECX CALL 0x0011fcf0 MOVSXD R13,dword ptr [R15 + 0x308] MOV RBP,R13 NEG RBP XOR R12D,R12D LAB_0011f75d: MOV EAX,R12D AND EAX,0xf MOV ECX,R12D SHR ECX,0x4 AND ECX,0xf MOV RDX,R12 SHR RDX,0x8 MOVSXD RSI,dword ptr [R14] SHL RSI,0x4 OR RSI,RAX MOVSXD RAX,dword ptr [R14 + 0x4] SHL RAX,0x4 ADD RAX,RDX MOVSXD RDX,dword ptr [R14 + 0x8] SHL RDX,0x4 OR RDX,RCX MOV qword ptr [RSP],RSI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX CMP RAX,R13 JLE 0x0011f7aa XOR EAX,EAX JMP 0x0011f7c8 LAB_0011f7aa: CMP RAX,RBP JL 0x0011f7be MOV RDI,R15 MOV RSI,RSP CALL 0x0011fc52 TEST AL,AL JZ 0x0011f7cd LAB_0011f7be: LEA RAX,[0x208f68] MOVZX EAX,word ptr [RAX] LAB_0011f7c8: MOV word ptr [RBX + R12*0x2],AX LAB_0011f7cd: INC R12 CMP R12,0x1000 JNZ 0x0011f75d ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Overworld::generate_terrain(glm::vec<3, int, (glm::qualifier)0> const&, VoxelStorage&) */ void __thiscall Overworld::generate_terrain(Overworld *this,vec *param_1,VoxelStorage *param_2) { char cVar1; int2 uVar2; ulong uVar3; long lVar4; int8 local_48; long local_40; ulong local_38; local_48 = CONCAT44(*(int4 *)(param_1 + 8),*(int4 *)param_1); get_or_create_metadata(this,(vec *)&local_48); lVar4 = (long)*(int *)(this + 0x308); uVar3 = 0; do { local_48 = (long)*(int *)param_1 << 4 | (ulong)((uint)uVar3 & 0xf); local_40 = (long)*(int *)(param_1 + 4) * 0x10 + (uVar3 >> 8); local_38 = (long)*(int *)(param_1 + 8) << 4 | (ulong)((uint)(uVar3 >> 4) & 0xf); if (lVar4 < local_40) { uVar2 = 0; LAB_0011f7c8: *(int2 *)(param_2 + uVar3 * 2) = uVar2; } else { uVar2 = game_voxels::stone; if ((SBORROW8(local_40,-lVar4) != local_40 + lVar4 < 0) || (cVar1 = is_inside_terrain(this,(vec *)&local_48), uVar2 = game_voxels::stone, cVar1 != '\0')) goto LAB_0011f7c8; } uVar3 = uVar3 + 1; if (uVar3 == 0x1000) { return; } } while( true ); }
48,759
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>::push_back(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>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(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>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x93196 movb $0x1, (%r14) movl $0x20, %edi callq 0x196c0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x31156 jmp 0x9319b cmpl $0x1, %eax jne 0x931af movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x933b0 movl $0x20, %edi callq 0x19370 movq %rax, %rbx movq %r14, %rdi callq 0x374f2 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x28505(%rip), %rsi # 0xbb6d8 leaq 0x10(%rsp), %rdi callq 0x46958 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x3729e xorl %ebp, %ebp leaq 0x55f8a(%rip), %rsi # 0xe9188 leaq -0x5fa83(%rip), %rdx # 0x33782 movq %rbx, %rdi callq 0x19ba0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9322b movq 0x20(%rsp), %rsi incq %rsi callq 0x196d0 testb %bpl, %bpl jne 0x93235 jmp 0x9323d movq %rax, %r14 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19c00 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_93196 mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_9319B loc_93196: cmp eax, 1 jnz short loc_931AF loc_9319B: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_931AF: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9322B mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9322B: test bpl, bpl jnz short loc_93235 jmp short loc_9323D mov r14, rax loc_93235: mov rdi, rbx; void * call ___cxa_free_exception loc_9323D: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return 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>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x00193196 MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x001196c0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x00131156 JMP 0x0019319b LAB_00193196: CMP EAX,0x1 JNZ 0x001931af LAB_0019319b: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001933b0 LAB_001931af: MOV EDI,0x20 CALL 0x00119370 MOV RBX,RAX MOV RDI,R14 CALL 0x001374f2 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001931cc: LEA RSI,[0x1bb6d8] LEA RDI,[RSP + 0x10] CALL 0x00146958 MOV BPL,0x1 LAB_001931e0: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x0013729e XOR EBP,EBP LEA RSI,[0x1e9188] LEA RDX,[0x133782] MOV RDI,RBX CALL 0x00119ba0
/* 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>::push_back(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> > const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(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,pair *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001931cc to 001931dc has its CatchHandler @ 00193232 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 001931e0 to 0019320c has its CatchHandler @ 0019320d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>>> ::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); return; }
48,760
cs_leave
eloqsql/strings/ctype.c
static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; int rc; switch(state){ case _CS_COLLATION: if (i->tailoring_length) i->cs.tailoring= i->tailoring; rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK; break; /* Rules: Logical Reset Positions */ case _CS_RESET_FIRST_NON_IGNORABLE: rc= tailoring_append(st, "[first non-ignorable]", 0, NULL); break; case _CS_RESET_LAST_NON_IGNORABLE: rc= tailoring_append(st, "[last non-ignorable]", 0, NULL); break; case _CS_RESET_FIRST_PRIMARY_IGNORABLE: rc= tailoring_append(st, "[first primary ignorable]", 0, NULL); break; case _CS_RESET_LAST_PRIMARY_IGNORABLE: rc= tailoring_append(st, "[last primary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_SECONDARY_IGNORABLE: rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL); break; case _CS_RESET_LAST_SECONDARY_IGNORABLE: rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_TERTIARY_IGNORABLE: rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL); break; case _CS_RESET_LAST_TERTIARY_IGNORABLE: rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_TRAILING: rc= tailoring_append(st, "[first trailing]", 0, NULL); break; case _CS_RESET_LAST_TRAILING: rc= tailoring_append(st, "[last trailing]", 0, NULL); break; case _CS_RESET_FIRST_VARIABLE: rc= tailoring_append(st, "[first variable]", 0, NULL); break; case _CS_RESET_LAST_VARIABLE: rc= tailoring_append(st, "[last variable]", 0, NULL); break; default: rc=MY_XML_OK; } return rc; }
O0
c
cs_leave: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xc1180 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0xbff76 movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0xbff7d xorl %eax, %eax movl %eax, -0x34(%rbp) jmp 0xbff7d movl -0x34(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x38(%rbp) subl $0x9, %eax je 0xc0057 jmp 0xbff94 movl -0x38(%rbp), %eax subl $0x191, %eax # imm = 0x191 je 0xc0104 jmp 0xbffa4 movl -0x38(%rbp), %eax subl $0x192, %eax # imm = 0x192 je 0xc0123 jmp 0xbffb4 movl -0x38(%rbp), %eax subl $0x193, %eax # imm = 0x193 je 0xc0142 jmp 0xbffc4 movl -0x38(%rbp), %eax subl $0x194, %eax # imm = 0x194 je 0xc0161 jmp 0xbffd4 movl -0x38(%rbp), %eax subl $0x195, %eax # imm = 0x195 je 0xc0180 jmp 0xbffe4 movl -0x38(%rbp), %eax subl $0x196, %eax # imm = 0x196 je 0xc019f jmp 0xbfff4 movl -0x38(%rbp), %eax subl $0x197, %eax # imm = 0x197 je 0xc01bb jmp 0xc0004 movl -0x38(%rbp), %eax subl $0x198, %eax # imm = 0x198 je 0xc01d7 jmp 0xc0014 movl -0x38(%rbp), %eax subl $0x199, %eax # imm = 0x199 je 0xc01f3 jmp 0xc0024 movl -0x38(%rbp), %eax subl $0x19a, %eax # imm = 0x19A je 0xc020f jmp 0xc0034 movl -0x38(%rbp), %eax subl $0x19b, %eax # imm = 0x19B je 0xc00c6 jmp 0xc0044 movl -0x38(%rbp), %eax subl $0x19c, %eax # imm = 0x19C je 0xc00e5 jmp 0xc022b movq -0x20(%rbp), %rax cmpq $0x0, 0x690(%rax) je 0xc007b movq -0x20(%rbp), %rax movq 0x688(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x718(%rax) movq -0x20(%rbp), %rax movq 0x7a8(%rax), %rax cmpq $0x0, 0xa8(%rax) je 0xc00b4 movq -0x20(%rbp), %rax movq 0x7a8(%rax), %rax movq 0xa8(%rax), %rax movq -0x20(%rbp), %rdi addq $0x6e0, %rdi # imm = 0x6E0 callq *%rax movl %eax, -0x3c(%rbp) jmp 0xc00bb xorl %eax, %eax movl %eax, -0x3c(%rbp) jmp 0xc00bb movl -0x3c(%rbp), %eax movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c31(%rip), %rsi # 0xd3d02 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c28(%rip), %rsi # 0xd3d18 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c1e(%rip), %rsi # 0xd3d2d xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c19(%rip), %rsi # 0xd3d47 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c13(%rip), %rsi # 0xd3d60 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c10(%rip), %rsi # 0xd3d7c xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c0c(%rip), %rsi # 0xd3d97 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c08(%rip), %rsi # 0xd3db2 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13c06(%rip), %rsi # 0xd3dcc xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13bfb(%rip), %rsi # 0xd3ddd xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13bef(%rip), %rsi # 0xd3ded xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movq -0x8(%rbp), %rdi leaq 0x13be4(%rip), %rsi # 0xd3dfe xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xc1210 movl %eax, -0x30(%rbp) jmp 0xc0232 movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
cs_leave: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax+140h] mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call cs_file_sec mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_BFF76 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_BFF7D loc_BFF76: xor eax, eax mov [rbp+var_34], eax jmp short $+2 loc_BFF7D: mov eax, [rbp+var_34] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_38], eax sub eax, 9 jz loc_C0057 jmp short $+2 loc_BFF94: mov eax, [rbp+var_38] sub eax, 191h jz loc_C0104 jmp short $+2 loc_BFFA4: mov eax, [rbp+var_38] sub eax, 192h jz loc_C0123 jmp short $+2 loc_BFFB4: mov eax, [rbp+var_38] sub eax, 193h jz loc_C0142 jmp short $+2 loc_BFFC4: mov eax, [rbp+var_38] sub eax, 194h jz loc_C0161 jmp short $+2 loc_BFFD4: mov eax, [rbp+var_38] sub eax, 195h jz loc_C0180 jmp short $+2 loc_BFFE4: mov eax, [rbp+var_38] sub eax, 196h jz loc_C019F jmp short $+2 loc_BFFF4: mov eax, [rbp+var_38] sub eax, 197h jz loc_C01BB jmp short $+2 loc_C0004: mov eax, [rbp+var_38] sub eax, 198h jz loc_C01D7 jmp short $+2 loc_C0014: mov eax, [rbp+var_38] sub eax, 199h jz loc_C01F3 jmp short $+2 loc_C0024: mov eax, [rbp+var_38] sub eax, 19Ah jz loc_C020F jmp short $+2 loc_C0034: mov eax, [rbp+var_38] sub eax, 19Bh jz loc_C00C6 jmp short $+2 loc_C0044: mov eax, [rbp+var_38] sub eax, 19Ch jz loc_C00E5 jmp loc_C022B loc_C0057: mov rax, [rbp+var_20] cmp qword ptr [rax+690h], 0 jz short loc_C007B mov rax, [rbp+var_20] mov rcx, [rax+688h] mov rax, [rbp+var_20] mov [rax+718h], rcx loc_C007B: mov rax, [rbp+var_20] mov rax, [rax+7A8h] cmp qword ptr [rax+0A8h], 0 jz short loc_C00B4 mov rax, [rbp+var_20] mov rax, [rax+7A8h] mov rax, [rax+0A8h] mov rdi, [rbp+var_20] add rdi, 6E0h call rax mov [rbp+var_3C], eax jmp short loc_C00BB loc_C00B4: xor eax, eax mov [rbp+var_3C], eax jmp short $+2 loc_C00BB: mov eax, [rbp+var_3C] mov [rbp+var_30], eax jmp loc_C0232 loc_C00C6: mov rdi, [rbp+var_8] lea rsi, aFirstNonIgnora; "[first non-ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C00E5: mov rdi, [rbp+var_8] lea rsi, aLastNonIgnorab; "[last non-ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C0104: mov rdi, [rbp+var_8] lea rsi, aFirstPrimaryIg; "[first primary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C0123: mov rdi, [rbp+var_8] lea rsi, aLastPrimaryIgn; "[last primary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C0142: mov rdi, [rbp+var_8] lea rsi, aFirstSecondary; "[first secondary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C0161: mov rdi, [rbp+var_8] lea rsi, aLastSecondaryI; "[last secondary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C0180: mov rdi, [rbp+var_8] lea rsi, aFirstTertiaryI; "[first tertiary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_C0232 loc_C019F: mov rdi, [rbp+var_8] lea rsi, aLastTertiaryIg; "[last tertiary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_C0232 loc_C01BB: mov rdi, [rbp+var_8] lea rsi, aFirstTrailing; "[first trailing]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_C0232 loc_C01D7: mov rdi, [rbp+var_8] lea rsi, aLastTrailing; "[last trailing]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_C0232 loc_C01F3: mov rdi, [rbp+var_8] lea rsi, aFirstVariable; "[first variable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_C0232 loc_C020F: mov rdi, [rbp+var_8] lea rsi, aLastVariable; "[last variable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_C0232 loc_C022B: mov [rbp+var_30], 0 loc_C0232: mov eax, [rbp+var_30] add rsp, 40h pop rbp retn
long long cs_leave(long long a1, long long a2, long long a3) { int v5; // [rsp+Ch] [rbp-34h] int *v7; // [rsp+18h] [rbp-28h] _QWORD *v8; // [rsp+20h] [rbp-20h] v8 = *(_QWORD **)(a1 + 320); v7 = (int *)cs_file_sec(a2, a3); if ( v7 ) v5 = *v7; else v5 = 0; switch ( v5 ) { case 9: if ( v8[210] ) v8[227] = v8[209]; if ( *(_QWORD *)(v8[245] + 168LL) ) return (unsigned int)(*(long long ( **)(_QWORD *))(v8[245] + 168LL))(v8 + 220); else return 0; case 401: return (unsigned int)tailoring_append(a1, "[first primary ignorable]", 0LL); case 402: return (unsigned int)tailoring_append(a1, "[last primary ignorable]", 0LL); case 403: return (unsigned int)tailoring_append(a1, "[first secondary ignorable]", 0LL); case 404: return (unsigned int)tailoring_append(a1, "[last secondary ignorable]", 0LL); case 405: return (unsigned int)tailoring_append(a1, "[first tertiary ignorable]", 0LL); case 406: return (unsigned int)tailoring_append(a1, "[last tertiary ignorable]", 0LL); case 407: return (unsigned int)tailoring_append(a1, "[first trailing]", 0LL); case 408: return (unsigned int)tailoring_append(a1, "[last trailing]", 0LL); case 409: return (unsigned int)tailoring_append(a1, "[first variable]", 0LL); case 410: return (unsigned int)tailoring_append(a1, "[last variable]", 0LL); case 411: return (unsigned int)tailoring_append(a1, "[first non-ignorable]", 0LL); case 412: return (unsigned int)tailoring_append(a1, "[last non-ignorable]", 0LL); default: return 0; } }
cs_leave: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001c1180 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x001bff76 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x001bff7d LAB_001bff76: XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x001bff7d LAB_001bff7d: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x38],EAX SUB EAX,0x9 JZ 0x001c0057 JMP 0x001bff94 LAB_001bff94: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x191 JZ 0x001c0104 JMP 0x001bffa4 LAB_001bffa4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x192 JZ 0x001c0123 JMP 0x001bffb4 LAB_001bffb4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x193 JZ 0x001c0142 JMP 0x001bffc4 LAB_001bffc4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x194 JZ 0x001c0161 JMP 0x001bffd4 LAB_001bffd4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x195 JZ 0x001c0180 JMP 0x001bffe4 LAB_001bffe4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x196 JZ 0x001c019f JMP 0x001bfff4 LAB_001bfff4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x197 JZ 0x001c01bb JMP 0x001c0004 LAB_001c0004: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x198 JZ 0x001c01d7 JMP 0x001c0014 LAB_001c0014: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x199 JZ 0x001c01f3 JMP 0x001c0024 LAB_001c0024: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19a JZ 0x001c020f JMP 0x001c0034 LAB_001c0034: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19b JZ 0x001c00c6 JMP 0x001c0044 LAB_001c0044: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19c JZ 0x001c00e5 JMP 0x001c022b LAB_001c0057: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x690],0x0 JZ 0x001c007b MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x688] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x718],RCX LAB_001c007b: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x7a8] CMP qword ptr [RAX + 0xa8],0x0 JZ 0x001c00b4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x7a8] MOV RAX,qword ptr [RAX + 0xa8] MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x6e0 CALL RAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c00bb LAB_001c00b4: XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c00bb LAB_001c00bb: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c00c6: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d02] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c00e5: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d18] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c0104: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d2d] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c0123: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d47] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c0142: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d60] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c0161: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d7c] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c0180: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3d97] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c019f: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3db2] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c01bb: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3dcc] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c01d7: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3ddd] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c01f3: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3ded] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c020f: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d3dfe] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001c1210 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c0232 LAB_001c022b: MOV dword ptr [RBP + -0x30],0x0 LAB_001c0232: MOV EAX,dword ptr [RBP + -0x30] ADD RSP,0x40 POP RBP RET
int4 cs_leave(long param_1,int8 param_2,int8 param_3) { long lVar1; int *piVar2; int4 local_44; int local_3c; int4 local_38; lVar1 = *(long *)(param_1 + 0x140); piVar2 = (int *)cs_file_sec(param_2,param_3); if (piVar2 == (int *)0x0) { local_3c = 0; } else { local_3c = *piVar2; } if (local_3c == 9) { if (*(long *)(lVar1 + 0x690) != 0) { *(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688); } if (*(long *)(*(long *)(lVar1 + 0x7a8) + 0xa8) == 0) { local_44 = 0; } else { local_44 = (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8))(lVar1 + 0x6e0); } local_38 = local_44; } else if (local_3c == 0x191) { local_38 = tailoring_append(param_1,"[first primary ignorable]",0); } else if (local_3c == 0x192) { local_38 = tailoring_append(param_1,"[last primary ignorable]",0); } else if (local_3c == 0x193) { local_38 = tailoring_append(param_1,"[first secondary ignorable]",0); } else if (local_3c == 0x194) { local_38 = tailoring_append(param_1,"[last secondary ignorable]",0); } else if (local_3c == 0x195) { local_38 = tailoring_append(param_1,"[first tertiary ignorable]",0); } else if (local_3c == 0x196) { local_38 = tailoring_append(param_1,"[last tertiary ignorable]",0); } else if (local_3c == 0x197) { local_38 = tailoring_append(param_1,"[first trailing]",0); } else if (local_3c == 0x198) { local_38 = tailoring_append(param_1,"[last trailing]",0); } else if (local_3c == 0x199) { local_38 = tailoring_append(param_1,"[first variable]",0); } else if (local_3c == 0x19a) { local_38 = tailoring_append(param_1,"[last variable]",0); } else if (local_3c == 0x19b) { local_38 = tailoring_append(param_1,"[first non-ignorable]",0); } else if (local_3c == 0x19c) { local_38 = tailoring_append(param_1,"[last non-ignorable]",0); } else { local_38 = 0; } return local_38; }
48,761
plutovg_canvas_stroke_extents
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
void plutovg_canvas_stroke_extents(const plutovg_canvas_t* canvas, plutovg_rect_t* extents) { plutovg_stroke_data_t* stroke = &canvas->state->stroke; float cap_limit = stroke->style.width / 2.f; if(stroke->style.cap == PLUTOVG_LINE_CAP_SQUARE) cap_limit *= PLUTOVG_SQRT2; float join_limit = stroke->style.width / 2.f; if(stroke->style.join == PLUTOVG_LINE_JOIN_MITER) { join_limit *= stroke->style.miter_limit; } float delta = plutovg_max(cap_limit, join_limit); plutovg_path_extents(canvas->path, extents, true); extents->x -= delta; extents->y -= delta; extents->w += delta * 2.f; extents->h += delta * 2.f; plutovg_canvas_map_rect(canvas, extents, extents); }
O1
c
plutovg_canvas_stroke_extents: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x18(%rdi), %rcx movss 0x38(%rcx), %xmm1 mulss 0x1fad2(%rip), %xmm1 # 0x4384c movl 0x3c(%rcx), %eax cmpl $0x0, 0x40(%rcx) movaps %xmm1, %xmm0 jne 0x23d8f movss 0x44(%rcx), %xmm0 mulss %xmm1, %xmm0 cmpl $0x2, %eax jne 0x23d9c mulss 0x1fab4(%rip), %xmm1 # 0x43850 maxss %xmm0, %xmm1 movss %xmm1, 0x4(%rsp) movq 0x10(%r14), %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x2bf4d movss (%rbx), %xmm0 movss 0x4(%rbx), %xmm1 movss 0x4(%rsp), %xmm2 subss %xmm2, %xmm0 movss %xmm0, (%rbx) subss %xmm2, %xmm1 movss %xmm1, 0x4(%rbx) addss %xmm2, %xmm2 movss 0x8(%rbx), %xmm0 addss %xmm2, %xmm0 movss %xmm0, 0x8(%rbx) addss 0xc(%rbx), %xmm2 movss %xmm2, 0xc(%rbx) movq 0x18(%r14), %rdi addq $0x20, %rdi movq %rbx, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x28087
plutovg_canvas_stroke_extents: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rcx, [rdi+18h] movss xmm1, dword ptr [rcx+38h] mulss xmm1, cs:dword_4384C mov eax, [rcx+3Ch] cmp dword ptr [rcx+40h], 0 movaps xmm0, xmm1 jnz short loc_23D8F movss xmm0, dword ptr [rcx+44h] mulss xmm0, xmm1 loc_23D8F: cmp eax, 2 jnz short loc_23D9C mulss xmm1, cs:dword_43850 loc_23D9C: maxss xmm1, xmm0 movss [rsp+18h+var_14], xmm1 mov rdi, [r14+10h] mov rsi, rbx mov edx, 1 call plutovg_path_extents movss xmm0, dword ptr [rbx] movss xmm1, dword ptr [rbx+4] movss xmm2, [rsp+18h+var_14] subss xmm0, xmm2 movss dword ptr [rbx], xmm0 subss xmm1, xmm2 movss dword ptr [rbx+4], xmm1 addss xmm2, xmm2 movss xmm0, dword ptr [rbx+8] addss xmm0, xmm2 movss dword ptr [rbx+8], xmm0 addss xmm2, dword ptr [rbx+0Ch] movss dword ptr [rbx+0Ch], xmm2 mov rdi, [r14+18h] add rdi, 20h ; ' ' mov rsi, rbx mov rdx, rbx add rsp, 8 pop rbx pop r14 jmp plutovg_matrix_map_rect
long long plutovg_canvas_stroke_extents(long long a1, long long a2) { long long v2; // rcx float v3; // xmm1_4 float v4; // xmm0_4 double v5; // xmm1_8 float v6; // xmm0_4 float v8; // [rsp+0h] [rbp-14h] v2 = *(_QWORD *)(a1 + 24); v3 = *(float *)(v2 + 56) * 0.5; v4 = v3; if ( !*(_DWORD *)(v2 + 64) ) v4 = *(float *)(v2 + 68) * v3; if ( *(_DWORD *)(v2 + 60) == 2 ) v3 = v3 * 1.4142135; v8 = fmaxf(v3, v4); plutovg_path_extents(*(_QWORD *)(a1 + 16), a2, 1LL); *(_QWORD *)&v5 = *(unsigned int *)(a2 + 4); *(float *)a2 = *(float *)a2 - v8; *(float *)&v5 = *(float *)&v5 - v8; *(_DWORD *)(a2 + 4) = LODWORD(v5); v6 = *(float *)(a2 + 8) + (float)(v8 + v8); *(float *)(a2 + 8) = v6; *(float *)(a2 + 12) = (float)(v8 + v8) + *(float *)(a2 + 12); return plutovg_matrix_map_rect(*(_QWORD *)(a1 + 24) + 32LL, a2, a2, v6, v5); }
plutovg_canvas_stroke_extents: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RCX,qword ptr [RDI + 0x18] MOVSS XMM1,dword ptr [RCX + 0x38] MULSS XMM1,dword ptr [0x0014384c] MOV EAX,dword ptr [RCX + 0x3c] CMP dword ptr [RCX + 0x40],0x0 MOVAPS XMM0,XMM1 JNZ 0x00123d8f MOVSS XMM0,dword ptr [RCX + 0x44] MULSS XMM0,XMM1 LAB_00123d8f: CMP EAX,0x2 JNZ 0x00123d9c MULSS XMM1,dword ptr [0x00143850] LAB_00123d9c: MAXSS XMM1,XMM0 MOVSS dword ptr [RSP + 0x4],XMM1 MOV RDI,qword ptr [R14 + 0x10] MOV RSI,RBX MOV EDX,0x1 CALL 0x0012bf4d MOVSS XMM0,dword ptr [RBX] MOVSS XMM1,dword ptr [RBX + 0x4] MOVSS XMM2,dword ptr [RSP + 0x4] SUBSS XMM0,XMM2 MOVSS dword ptr [RBX],XMM0 SUBSS XMM1,XMM2 MOVSS dword ptr [RBX + 0x4],XMM1 ADDSS XMM2,XMM2 MOVSS XMM0,dword ptr [RBX + 0x8] ADDSS XMM0,XMM2 MOVSS dword ptr [RBX + 0x8],XMM0 ADDSS XMM2,dword ptr [RBX + 0xc] MOVSS dword ptr [RBX + 0xc],XMM2 MOV RDI,qword ptr [R14 + 0x18] ADD RDI,0x20 MOV RSI,RBX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00128087
void plutovg_canvas_stroke_extents(long param_1,float *param_2) { long lVar1; float fVar2; float fVar3; lVar1 = *(long *)(param_1 + 0x18); fVar3 = *(float *)(lVar1 + 0x38) * DAT_0014384c; fVar2 = fVar3; if (*(int *)(lVar1 + 0x40) == 0) { fVar2 = *(float *)(lVar1 + 0x44) * fVar3; } if (*(int *)(lVar1 + 0x3c) == 2) { fVar3 = fVar3 * DAT_00143850; } if (fVar3 <= fVar2) { fVar3 = fVar2; } plutovg_path_extents(*(int8 *)(param_1 + 0x10),param_2,1); *param_2 = *param_2 - fVar3; param_2[1] = param_2[1] - fVar3; param_2[2] = param_2[2] + fVar3 + fVar3; param_2[3] = fVar3 + fVar3 + param_2[3]; plutovg_matrix_map_rect(*(long *)(param_1 + 0x18) + 0x20,param_2,param_2); return; }
48,762
my_strntol_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static long my_strntol_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register unsigned int cutlim; register uint32 cutoff; register uint32 res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr != NULL ) *endptr= (char*) s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+= cnv; } while (1); bs: overflow= 0; res= 0; save= s; cutoff= ((uint32)~0L) / (uint32) base; cutlim= (uint) (((uint32)~0L) % (uint32) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+= cnv; if (wc >= '0' && wc <= '9') wc-= '0'; else if (wc >= 'A' && wc <= 'Z') wc= wc - 'A' + 10; else if (wc >= 'a' && wc <= 'z') wc= wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow= 1; else { res*= (uint32) base; res+= wc; } } else if (cnv == MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*) s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (negative) { if (res > (uint32) INT_MIN32) overflow= 1; } else if (res > INT_MAX32) overflow= 1; if (overflow) { err[0]= ERANGE; return negative ? INT_MIN32 : INT_MAX32; } return (negative ? -((long) res) : (long) res); }
O3
c
my_strntol_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x34(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x45e92 movl $0x0, -0x38(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0x45e62 cmpq $0x9, %rcx je 0x45e7a cmpq $0x20, %rcx je 0x45e7a jmp 0x45ec4 cmpq $0x2b, %rcx je 0x45e7a cmpq $0x2d, %rcx jne 0x45ec4 xorl %ecx, %ecx cmpl $0x0, -0x38(%rbp) sete %cl movl %ecx, -0x38(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0x45e4a movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0x45e9e movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x34(%rbp) movl %edx, %ebx movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x45f8a movl %ebx, %ecx movq %rcx, -0x60(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %r8d, %r8d movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0x45f15 movq %rax, -0x30(%rbp) jmp 0x45f3a leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0x45f25 addq $-0x37, %rsi jmp 0x45f33 leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0x45f9a addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x34(%rbp), %eax jge 0x45f9a movl $0x1, %esi cmpl -0x44(%rbp), %ecx ja 0x45f5d jne 0x45f54 movl -0x44(%rbp), %edi cmpq -0x60(%rbp), %rax ja 0x45f5f imull -0x34(%rbp), %ecx addl %eax, %ecx movl %r8d, %esi movl %ecx, %edi movl %edi, -0x54(%rbp) movl %esi, -0x58(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *%r12 movl -0x54(%rbp), %edi movl -0x58(%rbp), %esi movl %edi, %ecx movl %esi, %r8d testl %eax, %eax jg 0x45ef9 jmp 0x45f91 xorl %edi, %edi movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0x45ff9 movl %esi, %r8d movl %edi, %ecx movq -0x40(%rbp), %rax testq %rax, %rax je 0x45fa6 movq %rbx, (%rax) cmpq %r15, %rbx je 0x45fea cmpl $0x80000001, %ecx # imm = 0x80000001 movl $0x1, %eax movl %r8d, %esi cmovael %eax, %esi testl %ecx, %ecx cmovsl %eax, %r8d movl -0x38(%rbp), %edi testl %edi, %edi cmovnel %esi, %r8d testl %r8d, %r8d je 0x46014 testl %edi, %edi movq -0x50(%rbp), %rax movl $0x22, (%rax) movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movq $-0x80000000, %rax # imm = 0x80000000 jmp 0x4601e movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0x45eb3 movq -0x40(%rbp), %rax testq %rax, %rax je 0x46005 movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0x45eb3 movl %ecx, %ecx movq %rcx, %rax negq %rax testl %edi, %edi cmoveq %rcx, %rax jmp 0x45eb5
my_strntol_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_40], r8 mov [rbp+var_34], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_45E92 mov [rbp+var_38], 0 lea rbx, [rbp+var_30] loc_45E4A: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_45E62 cmp rcx, 9 jz short loc_45E7A cmp rcx, 20h ; ' ' jz short loc_45E7A jmp short loc_45EC4 loc_45E62: cmp rcx, 2Bh ; '+' jz short loc_45E7A cmp rcx, 2Dh ; '-' jnz short loc_45EC4 xor ecx, ecx cmp [rbp+var_38], 0 setz cl mov [rbp+var_38], ecx loc_45E7A: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_45E4A loc_45E92: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_45E9E mov [rcx], r15 loc_45E9E: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_45EB3: xor eax, eax loc_45EB5: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45EC4: mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_34] mov ebx, edx mov [rbp+var_44], eax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_45F8A mov ecx, ebx mov [rbp+var_60], rcx xor ecx, ecx mov rbx, r15 xor r8d, r8d loc_45EF9: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_45F15 mov [rbp+var_30], rax jmp short loc_45F3A loc_45F15: lea rax, [rsi-41h] cmp rax, 19h ja short loc_45F25 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_45F33 loc_45F25: lea rax, [rsi-61h] cmp rax, 19h ja short loc_45F9A add rsi, 0FFFFFFFFFFFFFFA9h loc_45F33: mov [rbp+var_30], rsi mov rax, rsi loc_45F3A: cmp eax, [rbp+var_34] jge short loc_45F9A mov esi, 1 cmp ecx, [rbp+var_44] ja short loc_45F5D jnz short loc_45F54 mov edi, [rbp+var_44] cmp rax, [rbp+var_60] ja short loc_45F5F loc_45F54: imul ecx, [rbp+var_34] add ecx, eax mov esi, r8d loc_45F5D: mov edi, ecx loc_45F5F: mov [rbp+var_54], edi mov [rbp+var_58], esi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call r12 mov edi, [rbp+var_54] mov esi, [rbp+var_58] mov ecx, edi mov r8d, esi test eax, eax jg loc_45EF9 jmp short loc_45F91 loc_45F8A: xor edi, edi mov rbx, r15 xor esi, esi loc_45F91: test eax, eax jz short loc_45FF9 mov r8d, esi mov ecx, edi loc_45F9A: mov rax, [rbp+var_40] test rax, rax jz short loc_45FA6 mov [rax], rbx loc_45FA6: cmp rbx, r15 jz short loc_45FEA cmp ecx, 80000001h mov eax, 1 mov esi, r8d cmovnb esi, eax test ecx, ecx cmovs r8d, eax mov edi, [rbp+var_38] test edi, edi cmovnz r8d, esi test r8d, r8d jz short loc_46014 test edi, edi mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov ecx, 7FFFFFFFh mov rax, 0FFFFFFFF80000000h jmp short loc_4601E loc_45FEA: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_45EB3 loc_45FF9: mov rax, [rbp+var_40] test rax, rax jz short loc_46005 mov [rax], rbx loc_46005: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_45EB3 loc_46014: mov ecx, ecx mov rax, rcx neg rax test edi, edi loc_4601E: cmovz rax, rcx jmp loc_45EB5
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx long long result; // rax int v13; // eax long long v14; // rcx long long v15; // rbx long long v16; // r8 unsigned long long v17; // rax long long v18; // rsi unsigned int v19; // esi unsigned int v20; // edi int v21; // esi bool v22; // zf unsigned int v24; // [rsp+1Ch] [rbp-44h] BOOL v26; // [rsp+28h] [rbp-38h] _QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v28, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v26 = 0; while ( 1 ) { if ( v28[0] > 42LL ) { if ( v28[0] != 43LL ) { if ( v28[0] != 45LL ) break; v26 = !v26; } goto LABEL_10; } if ( v28[0] != 9LL && v28[0] != 32LL ) break; LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v28, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } v24 = 0xFFFFFFFF / a4; v13 = v8(a1, v28, v6, v9); if ( v13 > 0 ) { LODWORD(v14) = 0; v15 = v6; v16 = 0LL; while ( 1 ) { v15 += (unsigned int)v13; v17 = v28[0] - 48LL; if ( (unsigned long long)(v28[0] - 48LL) > 9 ) { if ( (unsigned long long)(v28[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v28[0] - 97LL) > 0x19 ) goto LABEL_37; v18 = v28[0] - 87LL; } else { v18 = v28[0] - 55LL; } v28[0] = v18; v17 = v18; } else { v28[0] -= 48LL; } if ( (int)v17 >= (int)a4 ) goto LABEL_37; v19 = 1; if ( (unsigned int)v14 <= v24 ) { if ( (_DWORD)v14 == v24 ) { v20 = 0xFFFFFFFF / a4; if ( v17 > 0xFFFFFFFF % a4 ) goto LABEL_32; } LODWORD(v14) = v17 + a4 * v14; v19 = v16; } v20 = v14; LABEL_32: v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16); LODWORD(v14) = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } } v20 = 0; v15 = v6; v19 = 0; LABEL_35: if ( !v13 ) { if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } LODWORD(v16) = v19; LODWORD(v14) = v20; LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } v21 = v16; if ( (unsigned int)v14 >= 0x80000001 ) v21 = 1; if ( (int)v14 < 0 ) LODWORD(v16) = 1; if ( v26 ) LODWORD(v16) = v21; if ( (_DWORD)v16 ) { v22 = !v26; *a6 = 34; v14 = 0x7FFFFFFFLL; result = 0xFFFFFFFF80000000LL; } else { v14 = (unsigned int)v14; result = -(long long)(unsigned int)v14; v22 = !v26; } if ( v22 ) return v14; return result; }
my_strntol_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x34],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00145e92 MOV dword ptr [RBP + -0x38],0x0 LEA RBX,[RBP + -0x30] LAB_00145e4a: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x00145e62 CMP RCX,0x9 JZ 0x00145e7a CMP RCX,0x20 JZ 0x00145e7a JMP 0x00145ec4 LAB_00145e62: CMP RCX,0x2b JZ 0x00145e7a CMP RCX,0x2d JNZ 0x00145ec4 XOR ECX,ECX CMP dword ptr [RBP + -0x38],0x0 SETZ CL MOV dword ptr [RBP + -0x38],ECX LAB_00145e7a: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x00145e4a LAB_00145e92: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x00145e9e MOV qword ptr [RCX],R15 LAB_00145e9e: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00145eb3: XOR EAX,EAX LAB_00145eb5: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00145ec4: MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x34] MOV EBX,EDX MOV dword ptr [RBP + -0x44],EAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00145f8a MOV ECX,EBX MOV qword ptr [RBP + -0x60],RCX XOR ECX,ECX MOV RBX,R15 XOR R8D,R8D LAB_00145ef9: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x00145f15 MOV qword ptr [RBP + -0x30],RAX JMP 0x00145f3a LAB_00145f15: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x00145f25 ADD RSI,-0x37 JMP 0x00145f33 LAB_00145f25: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x00145f9a ADD RSI,-0x57 LAB_00145f33: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_00145f3a: CMP EAX,dword ptr [RBP + -0x34] JGE 0x00145f9a MOV ESI,0x1 CMP ECX,dword ptr [RBP + -0x44] JA 0x00145f5d JNZ 0x00145f54 MOV EDI,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x60] JA 0x00145f5f LAB_00145f54: IMUL ECX,dword ptr [RBP + -0x34] ADD ECX,EAX MOV ESI,R8D LAB_00145f5d: MOV EDI,ECX LAB_00145f5f: MOV dword ptr [RBP + -0x54],EDI MOV dword ptr [RBP + -0x58],ESI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL R12 MOV EDI,dword ptr [RBP + -0x54] MOV ESI,dword ptr [RBP + -0x58] MOV ECX,EDI MOV R8D,ESI TEST EAX,EAX JG 0x00145ef9 JMP 0x00145f91 LAB_00145f8a: XOR EDI,EDI MOV RBX,R15 XOR ESI,ESI LAB_00145f91: TEST EAX,EAX JZ 0x00145ff9 MOV R8D,ESI MOV ECX,EDI LAB_00145f9a: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00145fa6 MOV qword ptr [RAX],RBX LAB_00145fa6: CMP RBX,R15 JZ 0x00145fea CMP ECX,0x80000001 MOV EAX,0x1 MOV ESI,R8D CMOVNC ESI,EAX TEST ECX,ECX CMOVS R8D,EAX MOV EDI,dword ptr [RBP + -0x38] TEST EDI,EDI CMOVNZ R8D,ESI TEST R8D,R8D JZ 0x00146014 TEST EDI,EDI MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV ECX,0x7fffffff MOV RAX,-0x80000000 JMP 0x0014601e LAB_00145fea: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x00145eb3 LAB_00145ff9: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00146005 MOV qword ptr [RAX],RBX LAB_00146005: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x00145eb3 LAB_00146014: MOV ECX,ECX MOV RAX,RCX NEG RAX TEST EDI,EDI LAB_0014601e: CMOVZ RAX,RCX JMP 0x00145eb5
ulong my_strntol_mb2_or_mb4 (long param_1,long param_2,long param_3,uint param_4,long *param_5, int4 *param_6) { code *pcVar1; bool bVar2; bool bVar3; bool bVar4; uint uVar5; uint uVar6; ulong uVar7; int4 uVar8; uint uVar9; ulong uVar10; long lVar11; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar5) { bVar2 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_00145ec4: uVar5 = (uint)(0xffffffff / (ulong)param_4); uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar11 = param_2; if ((int)uVar6 < 1) { uVar9 = 0; bVar3 = false; goto LAB_00145f91; } uVar9 = 0; bVar3 = false; goto LAB_00145ef9; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_00145ec4; bVar2 = !bVar2; } param_2 = param_2 + (ulong)uVar5; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar5); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar8 = 0x21; if (uVar5 == 0) { uVar8 = 0x54; } *param_6 = uVar8; return 0; while( true ) { if ((int)param_4 <= (int)uVar7) goto LAB_00145f9a; uVar6 = uVar9; bVar4 = true; if ((uVar9 <= uVar5) && ((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) { uVar6 = uVar9 * param_4 + (int)uVar7; bVar4 = bVar3; } bVar3 = bVar4; uVar9 = uVar6; local_38 = uVar7; uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3); if ((int)uVar6 < 1) break; LAB_00145ef9: lVar11 = (ulong)uVar6 + lVar11; uVar7 = local_38 - 0x30; if (9 < uVar7) { if (local_38 - 0x41 < 0x1a) { uVar7 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_00145f9a; uVar7 = local_38 - 0x57; } } } LAB_00145f91: if (uVar6 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar11; } *param_6 = 0x54; } else { LAB_00145f9a: if (param_5 != (long *)0x0) { *param_5 = lVar11; } if (lVar11 != param_2) { bVar4 = bVar3; if (0x80000000 < uVar9) { bVar4 = true; } if ((int)uVar9 < 0) { bVar3 = true; } if (bVar2) { bVar3 = bVar4; } if (bVar3) { *param_6 = 0x22; uVar10 = 0x7fffffff; uVar7 = 0xffffffff80000000; } else { uVar10 = (ulong)uVar9; uVar7 = -uVar10; } if (!bVar2) { return uVar10; } return uVar7; } *param_6 = 0x21; } return 0; }
48,763
pfs_set_transaction_xa_state_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_set_transaction_xa_state_v1(PSI_transaction_locker *locker, int xa_state) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); assert(state != NULL); if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); assert(pfs != NULL); pfs->m_xa_state= (enum_xa_transaction_state)xa_state; pfs->m_xa= true; } return; }
O3
cpp
pfs_set_transaction_xa_state_v1: testb $0x4, (%rdi) je 0x3dbfb pushq %rbp movq %rsp, %rbp movq 0x28(%rdi), %rax movl %esi, 0x118(%rax) movb $0x1, 0x78(%rax) popq %rbp retq
pfs_set_transaction_xa_state_v1: test byte ptr [rdi], 4 jz short locret_3DBFB push rbp mov rbp, rsp mov rax, [rdi+28h] mov [rax+118h], esi mov byte ptr [rax+78h], 1 pop rbp locret_3DBFB: retn
long long pfs_set_transaction_xa_state_v1(long long a1, int a2) { long long result; // rax if ( (*(_BYTE *)a1 & 4) != 0 ) { result = *(_QWORD *)(a1 + 40); *(_DWORD *)(result + 280) = a2; *(_BYTE *)(result + 120) = 1; } return result; }
pfs_set_transaction_xa_state_v1: TEST byte ptr [RDI],0x4 JZ 0x0013dbfb PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x28] MOV dword ptr [RAX + 0x118],ESI MOV byte ptr [RAX + 0x78],0x1 POP RBP LAB_0013dbfb: RET
void pfs_set_transaction_xa_state_v1(byte *param_1,int4 param_2) { long lVar1; if ((*param_1 & 4) != 0) { lVar1 = *(long *)(param_1 + 0x28); *(int4 *)(lVar1 + 0x118) = param_2; *(int1 *)(lVar1 + 0x78) = 1; } return; }
48,764
ma_trnman_end_trans_hook
eloqsql/storage/maria/ma_state.c
my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit, my_bool active_transactions) { my_bool error= 0; MARIA_USED_TABLES *tables, *next; DBUG_ENTER("_ma_trnman_end_trans_hook"); DBUG_PRINT("enter", ("trn: %p used_tables: %p", trn, trn->used_tables)); for (tables= (MARIA_USED_TABLES*) trn->used_tables; tables; tables= next) { MARIA_SHARE *share= tables->share; next= tables->next; if (commit) { MARIA_STATE_HISTORY *history; mysql_mutex_lock(&share->intern_lock); /* We only have to update history state if something changed */ if (tables->state_current.changed) { if (tables->state_current.no_transid) { /* The change was done without using transid on rows (like in bulk insert). In this case this thread is the only one that is using the table and all rows will be visible for all transactions. */ _ma_reset_history(share); } else { if (active_transactions && share->now_transactional && trnman_exists_active_transactions(share->state_history->trid, trn->commit_trid, 1)) { /* There exist transactions that are still using the current share->state_history. Create a new history item for this commit and add it first in the state_history list. This ensures that all history items are stored in the list in decresing trid order. */ if (!(history= my_malloc(PSI_INSTRUMENT_ME, sizeof(*history), MYF(MY_WME)))) { /* purecov: begin inspected */ error= 1; mysql_mutex_unlock(&share->intern_lock); my_free(tables); continue; /* purecov: end */ } history->state= share->state_history->state; history->next= share->state_history; share->state_history= history; } else { /* Previous history can't be seen by anyone, reuse old memory */ history= share->state_history; DBUG_PRINT("info", ("removing history->trid: %lu new: %lu", (ulong) history->trid, (ulong) trn->commit_trid)); } history->state.records+= (tables->state_current.records - tables->state_start.records); history->state.checksum+= (tables->state_current.checksum - tables->state_start.checksum); history->trid= trn->commit_trid; share->state.last_change_trn= trn->commit_trid; if (history->next) { /* Remove not visible states */ share->state_history= _ma_remove_not_visible_states(history, 0, 1); } DBUG_PRINT("info", ("share: %p in_trans: %d", share, share->in_trans)); } } /* The following calls frees &share->intern_lock */ decrement_share_in_trans(share); } else { /* We need to keep share->in_trans correct because of the check in free_maria_share() */ mysql_mutex_lock(&share->intern_lock); decrement_share_in_trans(share); } my_free(tables); } trn->used_tables= 0; trn->used_instances= 0; DBUG_RETURN(error); }
O3
c
ma_trnman_end_trans_hook: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, -0x30(%rbp) leaq 0x58(%rdi), %rax movq %rax, -0x40(%rbp) movq %rdi, -0x38(%rbp) movq 0x58(%rdi), %r15 testq %r15, %r15 je 0x3a6d4 movl %esi, %r14d movl $0x0, -0x2c(%rbp) movq %r15, %r12 movq (%r15), %r15 movq 0x8(%r12), %rbx leaq 0x8f0(%rbx), %r13 movq 0x930(%rbx), %rax movq %r13, %rdi testb %r14b, %r14b je 0x3a5c5 testq %rax, %rax jne 0x3a684 callq 0x27270 movb 0x44(%r12), %al testb $0x1, %al je 0x3a630 testb $0x2, %al jne 0x3a5d5 cmpb $0x0, -0x30(%rbp) je 0x3a5df cmpb $0x0, 0x7e7(%rbx) je 0x3a5df movq 0x450(%rbx), %rax movq 0x8(%rax), %rdi movq -0x38(%rbp), %rax movq 0x88(%rax), %rsi movl $0x1, %edx callq 0x4928d testb %al, %al je 0x3a5df movl $0x48, %esi movl $0x10, %edx xorl %edi, %edi callq 0x83e2d testq %rax, %rax je 0x3a669 movq %rax, %rdi movq 0x450(%rbx), %rax movq 0x40(%rax), %rcx movq %rcx, 0x40(%rdi) movups 0x10(%rax), %xmm0 movups 0x20(%rax), %xmm1 movups 0x30(%rax), %xmm2 movups %xmm2, 0x30(%rdi) movups %xmm1, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movq 0x450(%rbx), %rax movq %rax, (%rdi) movq %rdi, 0x450(%rbx) jmp 0x3a5e6 testq %rax, %rax jne 0x3a6ac callq 0x27270 jmp 0x3a630 movq %rbx, %rdi callq 0x3a6f7 jmp 0x3a630 movq 0x450(%rbx), %rdi movq 0x10(%r12), %rax subq 0x48(%r12), %rax addq %rax, 0x10(%rdi) movl 0x40(%r12), %eax subl 0x78(%r12), %eax addl %eax, 0x40(%rdi) movq -0x38(%rbp), %rax movq 0x88(%rax), %rax movq %rax, 0x8(%rdi) movq %rax, 0xe8(%rbx) cmpq $0x0, (%rdi) je 0x3a630 xorl %esi, %esi movl $0x1, %edx callq 0x3a072 movq %rax, 0x450(%rbx) decl 0x7ac(%rbx) je 0x3a64e movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x3a69a movq %r13, %rdi callq 0x27240 jmp 0x3a656 movq %rbx, %rdi callq 0x44e44 movq %r12, %rdi callq 0x8405a testq %r15, %r15 jne 0x3a4eb jmp 0x3a6db movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x3a6c2 movq %r13, %rdi callq 0x27240 movb $0x1, %al movl %eax, -0x2c(%rbp) jmp 0x3a656 leaq 0x84415(%rip), %rsi # 0xbeaa0 movl $0x1d7, %edx # imm = 0x1D7 callq 0x2c6aa jmp 0x3a51e leaq 0x32cd97(%rip), %rax # 0x367438 movq (%rax), %rax callq *0x160(%rax) jmp 0x3a644 leaq 0x843ed(%rip), %rsi # 0xbeaa0 movl $0x224, %edx # imm = 0x224 callq 0x2c6aa jmp 0x3a630 leaq 0x32cd6f(%rip), %rax # 0x367438 movq (%rax), %rax callq *0x160(%rax) jmp 0x3a675 movl $0x0, -0x2c(%rbp) xorps %xmm0, %xmm0 movq -0x40(%rbp), %rax movups %xmm0, (%rax) movl -0x2c(%rbp), %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_trnman_end_trans_hook: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], edx lea rax, [rdi+58h] mov [rbp+var_40], rax mov [rbp+var_38], rdi mov r15, [rdi+58h] test r15, r15 jz loc_3A6D4 mov r14d, esi mov [rbp+var_2C], 0 loc_3A4EB: mov r12, r15 mov r15, [r15] mov rbx, [r12+8] lea r13, [rbx+8F0h] mov rax, [rbx+930h] mov rdi, r13 test r14b, r14b jz loc_3A5C5 test rax, rax jnz loc_3A684 call _pthread_mutex_lock loc_3A51E: mov al, [r12+44h] test al, 1 jz loc_3A630 test al, 2 jnz loc_3A5D5 cmp byte ptr [rbp+var_30], 0 jz loc_3A5DF cmp byte ptr [rbx+7E7h], 0 jz loc_3A5DF mov rax, [rbx+450h] mov rdi, [rax+8] mov rax, [rbp+var_38] mov rsi, [rax+88h] mov edx, 1 call trnman_exists_active_transactions test al, al jz short loc_3A5DF mov esi, 48h ; 'H' mov edx, 10h xor edi, edi call my_malloc test rax, rax jz loc_3A669 mov rdi, rax mov rax, [rbx+450h] mov rcx, [rax+40h] mov [rdi+40h], rcx movups xmm0, xmmword ptr [rax+10h] movups xmm1, xmmword ptr [rax+20h] movups xmm2, xmmword ptr [rax+30h] movups xmmword ptr [rdi+30h], xmm2 movups xmmword ptr [rdi+20h], xmm1 movups xmmword ptr [rdi+10h], xmm0 mov rax, [rbx+450h] mov [rdi], rax mov [rbx+450h], rdi jmp short loc_3A5E6 loc_3A5C5: test rax, rax jnz loc_3A6AC call _pthread_mutex_lock jmp short loc_3A630 loc_3A5D5: mov rdi, rbx call _ma_reset_history jmp short loc_3A630 loc_3A5DF: mov rdi, [rbx+450h] loc_3A5E6: mov rax, [r12+10h] sub rax, [r12+48h] add [rdi+10h], rax mov eax, [r12+40h] sub eax, [r12+78h] add [rdi+40h], eax mov rax, [rbp+var_38] mov rax, [rax+88h] mov [rdi+8], rax mov [rbx+0E8h], rax cmp qword ptr [rdi], 0 jz short loc_3A630 xor esi, esi mov edx, 1 call _ma_remove_not_visible_states mov [rbx+450h], rax loc_3A630: dec dword ptr [rbx+7ACh] jz short loc_3A64E mov rdi, [rbx+930h] test rdi, rdi jnz short loc_3A69A loc_3A644: mov rdi, r13 call _pthread_mutex_unlock jmp short loc_3A656 loc_3A64E: mov rdi, rbx call free_maria_share loc_3A656: mov rdi, r12 call my_free test r15, r15 jnz loc_3A4EB jmp short loc_3A6DB loc_3A669: mov rdi, [rbx+930h] test rdi, rdi jnz short loc_3A6C2 loc_3A675: mov rdi, r13 call _pthread_mutex_unlock mov al, 1 mov [rbp+var_2C], eax jmp short loc_3A656 loc_3A684: lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1D7h call psi_mutex_lock jmp loc_3A51E loc_3A69A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3A644 loc_3A6AC: lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 224h call psi_mutex_lock jmp loc_3A630 loc_3A6C2: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3A675 loc_3A6D4: mov [rbp+var_2C], 0 loc_3A6DB: xorps xmm0, xmm0 mov rax, [rbp+var_40] movups xmmword ptr [rax], xmm0 mov eax, [rbp+var_2C] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_trnman_end_trans_hook(long long a1, char a2, char a3) { _QWORD *v3; // r15 _QWORD *v4; // r12 long long v5; // rbx long long v6; // rax long long v7; // rdi char v8; // al long long v9; // rax long long v10; // rdi long long v11; // rax __int128 v12; // xmm0 __int128 v13; // xmm1 long long v14; // rax long long v16; // rax _OWORD *v18; // [rsp+0h] [rbp-40h] unsigned int v21; // [rsp+14h] [rbp-2Ch] v18 = (_OWORD *)(a1 + 88); v3 = *(_QWORD **)(a1 + 88); if ( v3 ) { v21 = 0; while ( 1 ) { v4 = v3; v3 = (_QWORD *)*v3; v5 = v4[1]; v6 = *(_QWORD *)(v5 + 2352); v7 = v5 + 2288; if ( a2 ) { if ( v6 ) psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x1D7u); else pthread_mutex_lock(v7); v8 = *((_BYTE *)v4 + 68); if ( (v8 & 1) != 0 ) { if ( (v8 & 2) != 0 ) { ma_reset_history(v5); } else { if ( a3 && *(_BYTE *)(v5 + 2023) && (unsigned __int8)trnman_exists_active_transactions( *(_QWORD *)(*(_QWORD *)(v5 + 1104) + 8LL), *(_QWORD *)(a1 + 136), 1LL) ) { v9 = my_malloc(0LL, 72LL, 16LL); if ( !v9 ) { if ( *(_QWORD *)(v5 + 2352) ) PSI_server[44](); v16 = pthread_mutex_unlock(v5 + 2288); LOBYTE(v16) = 1; v21 = v16; goto LABEL_24; } v10 = v9; v11 = *(_QWORD *)(v5 + 1104); *(_QWORD *)(v10 + 64) = *(_QWORD *)(v11 + 64); v12 = *(_OWORD *)(v11 + 16); v13 = *(_OWORD *)(v11 + 32); *(_OWORD *)(v10 + 48) = *(_OWORD *)(v11 + 48); *(_OWORD *)(v10 + 32) = v13; *(_OWORD *)(v10 + 16) = v12; *(_QWORD *)v10 = *(_QWORD *)(v5 + 1104); *(_QWORD *)(v5 + 1104) = v10; } else { v10 = *(_QWORD *)(v5 + 1104); } *(_QWORD *)(v10 + 16) += v4[2] - v4[9]; *(_DWORD *)(v10 + 64) += *((_DWORD *)v4 + 16) - *((_DWORD *)v4 + 30); v14 = *(_QWORD *)(a1 + 136); *(_QWORD *)(v10 + 8) = v14; *(_QWORD *)(v5 + 232) = v14; if ( *(_QWORD *)v10 ) *(_QWORD *)(v5 + 1104) = ma_remove_not_visible_states((_QWORD *)v10, 0, 1); } } } else if ( v6 ) { psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x224u); } else { pthread_mutex_lock(v7); } if ( (*(_DWORD *)(v5 + 1964))-- == 1 ) { free_maria_share(v5); } else { if ( *(_QWORD *)(v5 + 2352) ) PSI_server[44](); pthread_mutex_unlock(v5 + 2288); } LABEL_24: my_free(v4); if ( !v3 ) goto LABEL_32; } } v21 = 0; LABEL_32: *v18 = 0LL; return v21; }
_ma_trnman_end_trans_hook: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x30],EDX LEA RAX,[RDI + 0x58] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x38],RDI MOV R15,qword ptr [RDI + 0x58] TEST R15,R15 JZ 0x0013a6d4 MOV R14D,ESI MOV dword ptr [RBP + -0x2c],0x0 LAB_0013a4eb: MOV R12,R15 MOV R15,qword ptr [R15] MOV RBX,qword ptr [R12 + 0x8] LEA R13,[RBX + 0x8f0] MOV RAX,qword ptr [RBX + 0x930] MOV RDI,R13 TEST R14B,R14B JZ 0x0013a5c5 TEST RAX,RAX JNZ 0x0013a684 CALL 0x00127270 LAB_0013a51e: MOV AL,byte ptr [R12 + 0x44] TEST AL,0x1 JZ 0x0013a630 TEST AL,0x2 JNZ 0x0013a5d5 CMP byte ptr [RBP + -0x30],0x0 JZ 0x0013a5df CMP byte ptr [RBX + 0x7e7],0x0 JZ 0x0013a5df MOV RAX,qword ptr [RBX + 0x450] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x88] MOV EDX,0x1 CALL 0x0014928d TEST AL,AL JZ 0x0013a5df MOV ESI,0x48 MOV EDX,0x10 XOR EDI,EDI CALL 0x00183e2d TEST RAX,RAX JZ 0x0013a669 MOV RDI,RAX MOV RAX,qword ptr [RBX + 0x450] MOV RCX,qword ptr [RAX + 0x40] MOV qword ptr [RDI + 0x40],RCX MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS XMM1,xmmword ptr [RAX + 0x20] MOVUPS XMM2,xmmword ptr [RAX + 0x30] MOVUPS xmmword ptr [RDI + 0x30],XMM2 MOVUPS xmmword ptr [RDI + 0x20],XMM1 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV RAX,qword ptr [RBX + 0x450] MOV qword ptr [RDI],RAX MOV qword ptr [RBX + 0x450],RDI JMP 0x0013a5e6 LAB_0013a5c5: TEST RAX,RAX JNZ 0x0013a6ac CALL 0x00127270 JMP 0x0013a630 LAB_0013a5d5: MOV RDI,RBX CALL 0x0013a6f7 JMP 0x0013a630 LAB_0013a5df: MOV RDI,qword ptr [RBX + 0x450] LAB_0013a5e6: MOV RAX,qword ptr [R12 + 0x10] SUB RAX,qword ptr [R12 + 0x48] ADD qword ptr [RDI + 0x10],RAX MOV EAX,dword ptr [R12 + 0x40] SUB EAX,dword ptr [R12 + 0x78] ADD dword ptr [RDI + 0x40],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RDI + 0x8],RAX MOV qword ptr [RBX + 0xe8],RAX CMP qword ptr [RDI],0x0 JZ 0x0013a630 XOR ESI,ESI MOV EDX,0x1 CALL 0x0013a072 MOV qword ptr [RBX + 0x450],RAX LAB_0013a630: DEC dword ptr [RBX + 0x7ac] JZ 0x0013a64e MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x0013a69a LAB_0013a644: MOV RDI,R13 CALL 0x00127240 JMP 0x0013a656 LAB_0013a64e: MOV RDI,RBX CALL 0x00144e44 LAB_0013a656: MOV RDI,R12 CALL 0x0018405a TEST R15,R15 JNZ 0x0013a4eb JMP 0x0013a6db LAB_0013a669: MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x0013a6c2 LAB_0013a675: MOV RDI,R13 CALL 0x00127240 MOV AL,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0013a656 LAB_0013a684: LEA RSI,[0x1beaa0] MOV EDX,0x1d7 CALL 0x0012c6aa JMP 0x0013a51e LAB_0013a69a: LEA RAX,[0x467438] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013a644 LAB_0013a6ac: LEA RSI,[0x1beaa0] MOV EDX,0x224 CALL 0x0012c6aa JMP 0x0013a630 LAB_0013a6c2: LEA RAX,[0x467438] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013a675 LAB_0013a6d4: MOV dword ptr [RBP + -0x2c],0x0 LAB_0013a6db: XORPS XMM0,XMM0 MOV RAX,qword ptr [RBP + -0x40] MOVUPS xmmword ptr [RAX],XMM0 MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _ma_trnman_end_trans_hook(long param_1,char param_2,char param_3) { pthread_mutex_t *__mutex; int *piVar1; long *plVar2; long lVar3; long lVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; long lVar9; long lVar10; long lVar11; char cVar12; int iVar13; long *plVar14; int8 uVar15; long *plVar16; int4 local_34; if (*(long **)(param_1 + 0x58) == (long *)0x0) { local_34 = 0; } else { local_34 = 0; plVar16 = *(long **)(param_1 + 0x58); do { plVar2 = (long *)*plVar16; lVar3 = plVar16[1]; __mutex = (pthread_mutex_t *)(lVar3 + 0x8f0); if (param_2 == '\0') { if (*(long *)(lVar3 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c" ,0x224); } LAB_0013a630: piVar1 = (int *)(lVar3 + 0x7ac); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { free_maria_share(lVar3); } else { if (*(long *)(lVar3 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } } else { if (*(long *)(lVar3 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c" ,0x1d7); } if ((*(byte *)((long)plVar16 + 0x44) & 1) == 0) goto LAB_0013a630; if ((*(byte *)((long)plVar16 + 0x44) & 2) != 0) { _ma_reset_history(lVar3); goto LAB_0013a630; } if (((param_3 == '\0') || (*(char *)(lVar3 + 0x7e7) == '\0')) || (cVar12 = trnman_exists_active_transactions (*(int8 *)(*(long *)(lVar3 + 0x450) + 8), *(int8 *)(param_1 + 0x88),1), cVar12 == '\0')) { plVar14 = *(long **)(lVar3 + 0x450); LAB_0013a5e6: plVar14[2] = plVar14[2] + (plVar16[2] - plVar16[9]); *(int *)(plVar14 + 8) = (int)plVar14[8] + ((int)plVar16[8] - (int)plVar16[0xf]); lVar4 = *(long *)(param_1 + 0x88); plVar14[1] = lVar4; *(long *)(lVar3 + 0xe8) = lVar4; if (*plVar14 != 0) { uVar15 = _ma_remove_not_visible_states(plVar14,0,1); *(int8 *)(lVar3 + 0x450) = uVar15; } goto LAB_0013a630; } plVar14 = (long *)my_malloc(0,0x48,0x10); if (plVar14 != (long *)0x0) { lVar4 = *(long *)(lVar3 + 0x450); plVar14[8] = *(long *)(lVar4 + 0x40); uVar5 = *(int4 *)(lVar4 + 0x10); uVar6 = *(int4 *)(lVar4 + 0x14); uVar7 = *(int4 *)(lVar4 + 0x18); uVar8 = *(int4 *)(lVar4 + 0x1c); lVar9 = *(long *)(lVar4 + 0x20); lVar10 = *(long *)(lVar4 + 0x28); lVar11 = *(long *)(lVar4 + 0x38); plVar14[6] = *(long *)(lVar4 + 0x30); plVar14[7] = lVar11; plVar14[4] = lVar9; plVar14[5] = lVar10; *(int4 *)(plVar14 + 2) = uVar5; *(int4 *)((long)plVar14 + 0x14) = uVar6; *(int4 *)(plVar14 + 3) = uVar7; *(int4 *)((long)plVar14 + 0x1c) = uVar8; *plVar14 = *(long *)(lVar3 + 0x450); *(long **)(lVar3 + 0x450) = plVar14; goto LAB_0013a5e6; } if (*(long *)(lVar3 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } iVar13 = pthread_mutex_unlock(__mutex); local_34 = (int4)CONCAT71((uint7)(uint3)((uint)iVar13 >> 8),1); } my_free(plVar16); plVar16 = plVar2; } while (plVar2 != (long *)0x0); } *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; return local_34; }
48,765
ExampleGuardedVector<unsigned long>::clear()
BadAccessGuards/benchmarks/../examples/GuardedVectorExample.h
void clear() noexcept { BA_GUARD_WRITE(BAShadow); super::clear(); }
O0
c
ExampleGuardedVector<unsigned long>::clear(): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x80(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x90(%rbp) addq $0x18, %rax leaq -0x88(%rbp), %rcx movq %rcx, -0x60(%rbp) movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movq -0x68(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rax movq (%rax), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax andq $0x3, %rax cmpq $0x0, %rax je 0x10663 movq -0x70(%rbp), %rdi movl $0x1, %esi callq 0x10370 jmp 0x10661 jmp 0x10663 movq -0x68(%rbp), %rax movq %rax, -0x8(%rbp) movq $0x1, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rbp, %rcx andq $-0x4, %rcx movq -0x10(%rbp), %rdx orq %rdx, %rcx movq %rcx, -0x18(%rbp) movq -0x18(%rbp), %rcx movq %rcx, (%rax) movq -0x90(%rbp), %rdi callq 0xfd60 leaq -0x88(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x98(%rbp) movq (%rax), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax andq $0x3, %rax cmpq $0x1, %rax je 0x106f4 movq -0x50(%rbp), %rdi movl $0x1, %esi callq 0x10370 jmp 0x106ea jmp 0x106f4 movq %rax, %rdi callq 0xf7b0 movq -0x98(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x20(%rbp), %rax movq %rbp, %rcx andq $-0x4, %rcx movq -0x28(%rbp), %rdx orq %rdx, %rcx movq %rcx, -0x30(%rbp) movq -0x30(%rbp), %rcx movq %rcx, (%rax) addq $0xa0, %rsp popq %rbp retq movq %rax, %rdi callq 0xf7b0 nopl (%rax,%rax)
_ZN20ExampleGuardedVectorImE5clearEv: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_80], rdi mov rax, [rbp+var_80] mov [rbp+var_90], rax add rax, 18h lea rcx, [rbp+var_88] mov [rbp+var_60], rcx mov [rbp+var_68], rax mov rax, [rbp+var_60] mov rcx, [rbp+var_68] mov [rax], rcx mov rax, [rbp+var_68] mov rax, [rax] mov [rbp+var_78], rax mov rax, [rbp+var_78] mov [rbp+var_70], rax mov rax, [rbp+var_70] mov [rbp+var_38], rax mov rax, [rbp+var_38] and rax, 3 cmp rax, 0 jz short loc_10663 mov rdi, [rbp+var_70] mov esi, 1 call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState) jmp short $+2 loc_10661: jmp short $+2 loc_10663: mov rax, [rbp+var_68] mov [rbp+var_8], rax mov [rbp+var_10], 1 mov rax, [rbp+var_8] mov rcx, rbp and rcx, 0FFFFFFFFFFFFFFFCh mov rdx, [rbp+var_10] or rcx, rdx mov [rbp+var_18], rcx mov rcx, [rbp+var_18] mov [rax], rcx mov rdi, [rbp+var_90] call _ZNSt6vectorImSaImEE5clearEv; std::vector<ulong>::clear(void) lea rax, [rbp+var_88] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_98], rax mov rax, [rax] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rax, [rbp+var_40] and rax, 3 cmp rax, 1 jz short loc_106F4 mov rdi, [rbp+var_50] mov esi, 1 call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState) jmp short $+2 loc_106EA: jmp short loc_106F4 mov rdi, rax call __clang_call_terminate loc_106F4: mov rax, [rbp+var_98] mov rax, [rax] mov [rbp+var_20], rax mov [rbp+var_28], 0 mov rax, [rbp+var_20] mov rcx, rbp and rcx, 0FFFFFFFFFFFFFFFCh mov rdx, [rbp+var_28] or rcx, rdx mov [rbp+var_30], rcx mov rcx, [rbp+var_30] mov [rax], rcx add rsp, 0A0h pop rbp retn mov rdi, rax call __clang_call_terminate
long long ExampleGuardedVector<unsigned long>::clear(_QWORD *a1) { long long result; // rax _QWORD v2[2]; // [rsp+18h] [rbp-88h] BYREF long long v3; // [rsp+28h] [rbp-78h] long long v4; // [rsp+30h] [rbp-70h] _QWORD *v5; // [rsp+38h] [rbp-68h] _QWORD *v6; // [rsp+40h] [rbp-60h] long long v7; // [rsp+48h] [rbp-58h] long long v8; // [rsp+50h] [rbp-50h] _QWORD *v9; // [rsp+58h] [rbp-48h] long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] char *v12; // [rsp+88h] [rbp-18h] long long v13; // [rsp+90h] [rbp-10h] _QWORD *v14; // [rsp+98h] [rbp-8h] long long savedregs; // [rsp+A0h] [rbp+0h] BYREF v2[1] = a1; v6 = v2; v5 = a1 + 3; v2[0] = a1 + 3; v3 = a1[3]; v4 = v3; v11 = v3; if ( (v3 & 3) != 0 ) BAGuardHandleBadAccess(v4, 1LL); v14 = v5; v13 = 1LL; v12 = (char *)&savedregs + 1; *v5 = (char *)&savedregs + 1; std::vector<unsigned long>::clear(a1); v9 = v2; v7 = *(_QWORD *)v2[0]; v8 = v7; v10 = v7; if ( (v7 & 3) != 1 ) BAGuardHandleBadAccess(v8, 1LL); result = v2[0]; *(_QWORD *)v2[0] = &savedregs; return result; }
clear: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x80],RDI MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x90],RAX ADD RAX,0x18 LEA RCX,[RBP + -0x88] MOV qword ptr [RBP + -0x60],RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] AND RAX,0x3 CMP RAX,0x0 JZ 0x00110663 MOV RDI,qword ptr [RBP + -0x70] LAB_00110655: MOV ESI,0x1 CALL 0x00110370 JMP 0x00110661 LAB_00110661: JMP 0x00110663 LAB_00110663: MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x10],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RBP AND RCX,-0x4 MOV RDX,qword ptr [RBP + -0x10] OR RCX,RDX MOV qword ptr [RBP + -0x18],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x90] CALL 0x0010fd60 LEA RAX,[RBP + -0x88] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] AND RAX,0x3 CMP RAX,0x1 JZ 0x001106f4 MOV RDI,qword ptr [RBP + -0x50] LAB_001106de: MOV ESI,0x1 CALL 0x00110370 JMP 0x001106ea LAB_001106ea: JMP 0x001106f4 LAB_001106f4: MOV RAX,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RBP AND RCX,-0x4 MOV RDX,qword ptr [RBP + -0x28] OR RCX,RDX MOV qword ptr [RBP + -0x30],RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX ADD RSP,0xa0 POP RBP RET
/* ExampleGuardedVector<unsigned long>::clear() */ void __thiscall ExampleGuardedVector<unsigned_long>::clear(ExampleGuardedVector<unsigned_long> *this) { ExampleGuardedVector<unsigned_long> *local_90; ExampleGuardedVector<unsigned_long> *local_88; ulong local_80; ulong local_78; ExampleGuardedVector<unsigned_long> *local_70; ExampleGuardedVector<unsigned_long> **local_68; ulong local_60; ulong local_58; ExampleGuardedVector<unsigned_long> **local_50; ulong local_48; ulong local_40; ulong local_20; int8 local_18; ExampleGuardedVector<unsigned_long> *local_10; local_70 = this + 0x18; local_68 = &local_90; local_80 = *(ulong *)local_70; local_88 = this; local_78 = local_80; local_40 = local_80; local_90 = local_70; if ((local_80 & 3) != 0) { /* try { // try from 00110655 to 0011065e has its CatchHandler @ 00110730 */ BAGuardHandleBadAccess(local_80,1); } local_10 = local_70; local_18 = 1; local_20 = (ulong)&stack0xfffffffffffffff8 | 1; *(ulong *)local_70 = local_20; std::vector<unsigned_long,std::allocator<unsigned_long>>::clear ((vector<unsigned_long,std::allocator<unsigned_long>> *)this); local_50 = &local_90; local_60 = *(ulong *)local_90; if ((local_60 & 3) != 1) { local_58 = local_60; local_48 = local_60; /* try { // try from 001106de to 001106e7 has its CatchHandler @ 001106ec */ BAGuardHandleBadAccess(local_60,1); } *(int1 **)local_90 = &stack0xfffffffffffffff8; return; }
48,766
my_uni_utf8mb3_no_range
eloqsql/strings/ctype-utf8.c
static int my_uni_utf8mb3_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *r) { int count; if (wc < 0x80) count= 1; else if (wc < 0x800) count= 2; else if (wc < 0x10000) count= 3; else return MY_CS_ILUNI; switch (count) { case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800; /* fall through */ case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0; /* fall through */ case 1: r[0]= (uchar) wc; } return count; }
O0
c
my_uni_utf8mb3_no_range: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x80, -0x18(%rbp) jae 0xb7493 movl $0x1, -0x24(%rbp) jmp 0xb74c9 cmpq $0x800, -0x18(%rbp) # imm = 0x800 jae 0xb74a6 movl $0x2, -0x24(%rbp) jmp 0xb74c7 cmpq $0x10000, -0x18(%rbp) # imm = 0x10000 jae 0xb74b9 movl $0x3, -0x24(%rbp) jmp 0xb74c5 movl $0x0, -0x4(%rbp) jmp 0xb755e jmp 0xb74c7 jmp 0xb74c9 movl -0x24(%rbp), %eax movl %eax, -0x28(%rbp) subl $0x1, %eax je 0xb754c jmp 0xb74d6 movl -0x28(%rbp), %eax subl $0x2, %eax je 0xb751b jmp 0xb74e0 movl -0x28(%rbp), %eax subl $0x3, %eax jne 0xb7558 jmp 0xb74ea movq -0x18(%rbp), %rax andq $0x3f, %rax orq $0x80, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax orq $0x800, %rax # imm = 0x800 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax andq $0x3f, %rax orq $0x80, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrq $0x6, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax orq $0xc0, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_uni_utf8mb3_no_range: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_18], 80h jnb short loc_B7493 mov [rbp+var_24], 1 jmp short loc_B74C9 loc_B7493: cmp [rbp+var_18], 800h jnb short loc_B74A6 mov [rbp+var_24], 2 jmp short loc_B74C7 loc_B74A6: cmp [rbp+var_18], offset stru_10000 jnb short loc_B74B9 mov [rbp+var_24], 3 jmp short loc_B74C5 loc_B74B9: mov [rbp+var_4], 0 jmp loc_B755E loc_B74C5: jmp short $+2 loc_B74C7: jmp short $+2 loc_B74C9: mov eax, [rbp+var_24] mov [rbp+var_28], eax sub eax, 1 jz short loc_B754C jmp short $+2 loc_B74D6: mov eax, [rbp+var_28] sub eax, 2 jz short loc_B751B jmp short $+2 loc_B74E0: mov eax, [rbp+var_28] sub eax, 3 jnz short loc_B7558 jmp short $+2 loc_B74EA: mov rax, [rbp+var_18] and rax, 3Fh or rax, 80h mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl mov rax, [rbp+var_18] shr rax, 6 mov [rbp+var_18], rax mov rax, [rbp+var_18] or rax, 800h mov [rbp+var_18], rax loc_B751B: mov rax, [rbp+var_18] and rax, 3Fh or rax, 80h mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov rax, [rbp+var_18] shr rax, 6 mov [rbp+var_18], rax mov rax, [rbp+var_18] or rax, 0C0h mov [rbp+var_18], rax loc_B754C: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl loc_B7558: mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_B755E: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf8mb3_no_range(long long a1, unsigned long long a2, _BYTE *a3) { unsigned int v4; // [rsp+4h] [rbp-24h] unsigned long long v5; // [rsp+10h] [rbp-18h] v5 = a2; if ( a2 >= 0x80 ) { if ( a2 >= 0x800 ) { if ( a2 >= (unsigned long long)&stru_10000 ) return 0; v4 = 3; } else { v4 = 2; } } else { v4 = 1; } if ( v4 != 1 ) { if ( v4 != 2 ) { a3[2] = a2 & 0x3F | 0x80; v5 = (a2 >> 6) | 0x800; } a3[1] = v5 & 0x3F | 0x80; v5 = (v5 >> 6) | 0xC0; } *a3 = v5; return v4; }
my_uni_utf8mb3_no_range: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x18],0x80 JNC 0x001b7493 MOV dword ptr [RBP + -0x24],0x1 JMP 0x001b74c9 LAB_001b7493: CMP qword ptr [RBP + -0x18],0x800 JNC 0x001b74a6 MOV dword ptr [RBP + -0x24],0x2 JMP 0x001b74c7 LAB_001b74a6: CMP qword ptr [RBP + -0x18],0x10000 JNC 0x001b74b9 MOV dword ptr [RBP + -0x24],0x3 JMP 0x001b74c5 LAB_001b74b9: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001b755e LAB_001b74c5: JMP 0x001b74c7 LAB_001b74c7: JMP 0x001b74c9 LAB_001b74c9: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x28],EAX SUB EAX,0x1 JZ 0x001b754c JMP 0x001b74d6 LAB_001b74d6: MOV EAX,dword ptr [RBP + -0x28] SUB EAX,0x2 JZ 0x001b751b JMP 0x001b74e0 LAB_001b74e0: MOV EAX,dword ptr [RBP + -0x28] SUB EAX,0x3 JNZ 0x001b7558 JMP 0x001b74ea LAB_001b74ea: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3f OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x6 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] OR RAX,0x800 MOV qword ptr [RBP + -0x18],RAX LAB_001b751b: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3f OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x6 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] OR RAX,0xc0 MOV qword ptr [RBP + -0x18],RAX LAB_001b754c: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL LAB_001b7558: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_001b755e: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int my_uni_utf8mb3_no_range(int8 param_1,ulong param_2,int1 *param_3) { int local_2c; ulong local_20; if (param_2 < 0x80) { local_2c = 1; } else if (param_2 < 0x800) { local_2c = 2; } else { if (0xffff < param_2) { return 0; } local_2c = 3; } local_20 = param_2; if (local_2c != 1) { if (local_2c != 2) { if (local_2c != 3) { return local_2c; } param_3[2] = (byte)param_2 & 0x3f | 0x80; local_20 = param_2 >> 6 | 0x800; } param_3[1] = (byte)local_20 & 0x3f | 0x80; local_20 = local_20 >> 6 | 0xc0; } *param_3 = (char)local_20; return local_2c; }
48,767
lunasvg::SVGElement::nextElement() const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
SVGElement* SVGElement::nextElement() const { auto parent = parentElement(); if(parent == nullptr) return nullptr; const auto& children = parent->children(); auto it = children.rbegin(); auto end = children.rend(); SVGElement* element = nullptr; for(; it != end; ++it) { SVGNode* node = &**it; if(node->isTextNode()) continue; if(node == this) return element; element = static_cast<SVGElement*>(node); } return nullptr; }
O0
cpp
lunasvg::SVGElement::nextElement() const: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x48(%rbp) callq 0xe710 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x190c1 movq $0x0, -0x8(%rbp) jmp 0x19159 movq -0x18(%rbp), %rdi callq 0xe950 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq -0x28(%rbp), %rdi callq 0x1fb20 movq -0x20(%rbp), %rsi leaq -0x30(%rbp), %rdi callq 0x1fb70 movq $0x0, -0x38(%rbp) leaq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x1fbc0 testb $0x1, %al jne 0x19103 jmp 0x19151 leaq -0x28(%rbp), %rdi callq 0x1fbf0 movq %rax, %rdi callq 0x1faf0 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi movq (%rdi), %rax callq *0x10(%rax) testb $0x1, %al jne 0x19128 jmp 0x1912a jmp 0x19146 movq -0x48(%rbp), %rax cmpq %rax, -0x40(%rbp) jne 0x1913e movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x19159 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x28(%rbp), %rdi callq 0x1fc20 jmp 0x190f0 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZNK7lunasvg10SVGElement11nextElementEv: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov rdi, [rbp+var_10]; this mov [rbp+var_48], rdi call _ZNK7lunasvg7SVGNode13parentElementEv; lunasvg::SVGNode::parentElement(void) mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_190C1 mov [rbp+var_8], 0 jmp loc_19159 loc_190C1: mov rdi, [rbp+var_18] call _ZNK7lunasvg10SVGElement8childrenB5cxx11Ev; lunasvg::SVGElement::children(void) mov [rbp+var_20], rax mov rsi, [rbp+var_20] lea rdi, [rbp+var_28] call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE6rbeginEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::rbegin(void) mov rsi, [rbp+var_20] lea rdi, [rbp+var_30] call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE4rendEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::rend(void) mov [rbp+var_38], 0 loc_190F0: lea rdi, [rbp+var_28] lea rsi, [rbp+var_30] call _ZStneISt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EEEEbRKSt16reverse_iteratorIT_ESC_; std::operator!=<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>>(std::reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>> const&,std::reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>> const&) test al, 1 jnz short loc_19103 jmp short loc_19151 loc_19103: lea rdi, [rbp+var_28] call _ZNKSt16reverse_iteratorISt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EEEEdeEv; std::reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>>::operator*(void) mov rdi, rax call _ZNKSt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS1_EEdeEv; std::unique_ptr<lunasvg::SVGNode>::operator*(void) mov [rbp+var_40], rax mov rdi, [rbp+var_40] mov rax, [rdi] call qword ptr [rax+10h] test al, 1 jnz short loc_19128 jmp short loc_1912A loc_19128: jmp short loc_19146 loc_1912A: mov rax, [rbp+var_48] cmp [rbp+var_40], rax jnz short loc_1913E mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_19159 loc_1913E: mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_19146: lea rdi, [rbp+var_28] call _ZNSt16reverse_iteratorISt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EEEEppEv; std::reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>>::operator++(void) jmp short loc_190F0 loc_19151: mov [rbp+var_8], 0 loc_19159: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
lunasvg::SVGElement * lunasvg::SVGElement::nextElement(lunasvg::SVGElement *this) { long long v1; // rax lunasvg::SVGElement *v3; // [rsp+10h] [rbp-40h] lunasvg::SVGElement *v4; // [rsp+18h] [rbp-38h] char v5[8]; // [rsp+20h] [rbp-30h] BYREF char v6[8]; // [rsp+28h] [rbp-28h] BYREF long long v7; // [rsp+30h] [rbp-20h] long long v8; // [rsp+38h] [rbp-18h] lunasvg::SVGNode *v9; // [rsp+40h] [rbp-10h] v9 = this; v8 = lunasvg::SVGNode::parentElement(this); if ( !v8 ) return 0LL; v7 = lunasvg::SVGElement::children[abi:cxx11](v8); std::list<std::unique_ptr<lunasvg::SVGNode>>::rbegin(v6, v7); std::list<std::unique_ptr<lunasvg::SVGNode>>::rend(v5, v7); v4 = 0LL; while ( (std::operator!=<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>>(v6, v5) & 1) != 0 ) { v1 = std::reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>>::operator*(v6); v3 = (lunasvg::SVGElement *)std::unique_ptr<lunasvg::SVGNode>::operator*(v1); if ( ((*(long long ( **)(lunasvg::SVGElement *))(*(_QWORD *)v3 + 16LL))(v3) & 1) == 0 ) { if ( v3 == this ) return v4; v4 = v3; } std::reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>>::operator++(v6); } return 0LL; }
nextElement: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RDI CALL 0x0010e710 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001190c1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00119159 LAB_001190c1: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010e950 MOV qword ptr [RBP + -0x20],RAX MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x28] CALL 0x0011fb20 MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x30] CALL 0x0011fb70 MOV qword ptr [RBP + -0x38],0x0 LAB_001190f0: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x0011fbc0 TEST AL,0x1 JNZ 0x00119103 JMP 0x00119151 LAB_00119103: LEA RDI,[RBP + -0x28] CALL 0x0011fbf0 MOV RDI,RAX CALL 0x0011faf0 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] TEST AL,0x1 JNZ 0x00119128 JMP 0x0011912a LAB_00119128: JMP 0x00119146 LAB_0011912a: MOV RAX,qword ptr [RBP + -0x48] CMP qword ptr [RBP + -0x40],RAX JNZ 0x0011913e MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x00119159 LAB_0011913e: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_00119146: LEA RDI,[RBP + -0x28] CALL 0x0011fc20 JMP 0x001190f0 LAB_00119151: MOV qword ptr [RBP + -0x8],0x0 LAB_00119159: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* lunasvg::SVGElement::nextElement() const */ SVGElement * __thiscall lunasvg::SVGElement::nextElement(SVGElement *this) { SVGElement *pSVar1; bool bVar2; unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> *this_00; SVGElement *pSVar3; ulong uVar4; SVGElement *local_40; reverse_iterator local_38 [8]; reverse_iterator local_30 [8]; int8 local_28; SVGElement *local_20; SVGElement *local_18; local_18 = this; local_20 = (SVGElement *)SVGNode::parentElement((SVGNode *)this); if (local_20 != (SVGElement *)0x0) { local_28 = children_abi_cxx11_(local_20); std::__cxx11:: list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::rbegin(); std::__cxx11:: list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::rend(); local_40 = (SVGElement *)0x0; while (bVar2 = std::operator!=(local_30,local_38), bVar2) { this_00 = (unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> *) std:: reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::operator*((reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> *)local_30); pSVar3 = (SVGElement *) std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>::operator* (this_00); uVar4 = (**(code **)(*(long *)pSVar3 + 0x10))(); pSVar1 = local_40; if (((uVar4 & 1) == 0) && (pSVar1 = pSVar3, pSVar3 == this)) { return local_40; } local_40 = pSVar1; std:: reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::operator++((reverse_iterator<std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> *)local_30); } } return (SVGElement *)0x0; }
48,768
fmt::v10::basic_format_parse_context<char>::next_arg_id()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto next_arg_id() -> int { if (next_arg_id_ < 0) { detail::throw_format_error( "cannot switch from manual to automatic argument indexing"); return 0; } int id = next_arg_id_++; do_check_arg_id(id); return id; }
O0
c
fmt::v10::basic_format_parse_context<char>::next_arg_id(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) cmpl $0x0, 0x10(%rax) jge 0xa2534 leaq 0x6dc12(%rip), %rdi # 0x110141 callq 0x86600 movq (%rsp), %rdi movl 0x10(%rdi), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, 0x10(%rdi) movl %eax, 0xc(%rsp) movl 0xc(%rsp), %esi callq 0xa2560 movl 0xc(%rsp), %eax addq $0x18, %rsp retq nopl (%rax)
_ZN3fmt3v1026basic_format_parse_contextIcE11next_arg_idEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax cmp dword ptr [rax+10h], 0 jge short loc_A2534 lea rdi, aCannotSwitchFr; "cannot switch from manual to automatic "... call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) loc_A2534: mov rdi, [rsp+18h+var_18] mov eax, [rdi+10h] mov ecx, eax add ecx, 1 mov [rdi+10h], ecx mov [rsp+18h+var_C], eax mov esi, [rsp+18h+var_C] call _ZN3fmt3v1026basic_format_parse_contextIcE15do_check_arg_idEi; fmt::v10::basic_format_parse_context<char>::do_check_arg_id(int) mov eax, [rsp+18h+var_C] add rsp, 18h retn
long long fmt::v10::basic_format_parse_context<char>::next_arg_id(long long a1, const char *a2) { unsigned int v2; // eax unsigned int v4; // [rsp+Ch] [rbp-Ch] if ( *(int *)(a1 + 16) < 0 ) fmt::v10::detail::throw_format_error( (fmt::v10::detail *)"cannot switch from manual to automatic argument indexing", a2); v2 = *(_DWORD *)(a1 + 16); *(_DWORD *)(a1 + 16) = v2 + 1; v4 = v2; fmt::v10::basic_format_parse_context<char>::do_check_arg_id(a1, v2); return v4; }
next_arg_id: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX CMP dword ptr [RAX + 0x10],0x0 JGE 0x001a2534 LEA RDI,[0x210141] CALL 0x00186600 LAB_001a2534: MOV RDI,qword ptr [RSP] MOV EAX,dword ptr [RDI + 0x10] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RDI + 0x10],ECX MOV dword ptr [RSP + 0xc],EAX MOV ESI,dword ptr [RSP + 0xc] CALL 0x001a2560 MOV EAX,dword ptr [RSP + 0xc] ADD RSP,0x18 RET
/* fmt::v10::basic_format_parse_context<char>::next_arg_id() */ int __thiscall fmt::v10::basic_format_parse_context<char>::next_arg_id(basic_format_parse_context<char> *this) { int iVar1; if (*(int *)(this + 0x10) < 0) { /* WARNING: Subroutine does not return */ v10::detail::throw_format_error("cannot switch from manual to automatic argument indexing"); } iVar1 = *(int *)(this + 0x10); *(int *)(this + 0x10) = iVar1 + 1; do_check_arg_id((int)this); return iVar1; }
48,769
ma_insert_dynamic
eloqsql/libmariadb/libmariadb/ma_array.c
my_bool ma_insert_dynamic(DYNAMIC_ARRAY *array, void *element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=ma_alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O3
c
ma_insert_dynamic: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x8(%rdi), %ecx cmpl 0xc(%rdi), %ecx jne 0x3665b movq %r14, %rdi callq 0x36682 testq %rax, %rax je 0x3667e movq %rax, %rdi movl 0x14(%r14), %eax jmp 0x3666d movl 0x14(%r14), %eax movl %eax, %edi imull %ecx, %edi addq (%r14), %rdi incl %ecx movl %ecx, 0x8(%r14) movl %eax, %edx movq %rbx, %rsi callq 0x133a0 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq movb $0x1, %al jmp 0x36679
ma_insert_dynamic: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi mov ecx, [rdi+8] cmp ecx, [rdi+0Ch] jnz short loc_3665B mov rdi, r14 call ma_alloc_dynamic test rax, rax jz short loc_3667E mov rdi, rax mov eax, [r14+14h] jmp short loc_3666D loc_3665B: mov eax, [r14+14h] mov edi, eax imul edi, ecx add rdi, [r14] inc ecx mov [r14+8], ecx loc_3666D: mov edx, eax mov rsi, rbx call _memcpy xor eax, eax loc_36679: pop rbx pop r14 pop rbp retn loc_3667E: mov al, 1 jmp short loc_36679
long long ma_insert_dynamic(long long a1, long long a2) { int v3; // ecx long long v4; // rax long long v5; // rdi unsigned int v6; // eax v3 = *(_DWORD *)(a1 + 8); if ( v3 != *(_DWORD *)(a1 + 12) ) { v6 = *(_DWORD *)(a1 + 20); v5 = *(_QWORD *)a1 + v3 * v6; *(_DWORD *)(a1 + 8) = v3 + 1; goto LABEL_5; } v4 = ma_alloc_dynamic(a1); if ( v4 ) { v5 = v4; v6 = *(_DWORD *)(a1 + 20); LABEL_5: memcpy(v5, a2, v6); return 0LL; } return 1LL; }
ma_insert_dynamic: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x8] CMP ECX,dword ptr [RDI + 0xc] JNZ 0x0013665b MOV RDI,R14 CALL 0x00136682 TEST RAX,RAX JZ 0x0013667e MOV RDI,RAX MOV EAX,dword ptr [R14 + 0x14] JMP 0x0013666d LAB_0013665b: MOV EAX,dword ptr [R14 + 0x14] MOV EDI,EAX IMUL EDI,ECX ADD RDI,qword ptr [R14] INC ECX MOV dword ptr [R14 + 0x8],ECX LAB_0013666d: MOV EDX,EAX MOV RSI,RBX CALL 0x001133a0 XOR EAX,EAX LAB_00136679: POP RBX POP R14 POP RBP RET LAB_0013667e: MOV AL,0x1 JMP 0x00136679
int8 ma_insert_dynamic(long *param_1,void *param_2) { int iVar1; uint uVar2; void *__dest; iVar1 = (int)param_1[1]; if (iVar1 == *(int *)((long)param_1 + 0xc)) { __dest = (void *)ma_alloc_dynamic(param_1); if (__dest == (void *)0x0) { return 1; } uVar2 = *(uint *)((long)param_1 + 0x14); } else { uVar2 = *(uint *)((long)param_1 + 0x14); __dest = (void *)((ulong)(uVar2 * iVar1) + *param_1); *(int *)(param_1 + 1) = iVar1 + 1; } memcpy(__dest,param_2,(ulong)uVar2); return 0; }
48,770
js_default_module_normalize_name
bluesky950520[P]quickjs/quickjs.c
static char *js_default_module_normalize_name(JSContext *ctx, const char *base_name, const char *name) { char *filename, *p; const char *r; int cap; int len; if (name[0] != '.') { /* if no initial dot, the module name is not modified */ return js_strdup(ctx, name); } p = strrchr(base_name, '/'); if (p) len = p - base_name; else len = 0; cap = len + strlen(name) + 1 + 1; filename = js_malloc(ctx, cap); if (!filename) return NULL; memcpy(filename, base_name, len); filename[len] = '\0'; /* we only normalize the leading '..' or '.' */ r = name; for(;;) { if (r[0] == '.' && r[1] == '/') { r += 2; } else if (r[0] == '.' && r[1] == '.' && r[2] == '/') { /* remove the last path element of filename, except if "." or ".." */ if (filename[0] == '\0') break; p = strrchr(filename, '/'); if (!p) p = filename; else p++; if (!strcmp(p, ".") || !strcmp(p, "..")) break; if (p > filename) p--; *p = '\0'; r += 3; } else { break; } } if (filename[0] != '\0') js__pstrcat(filename, cap, "/"); js__pstrcat(filename, cap, r); // printf("normalize: %s %s -> %s\n", base_name, name, filename); return filename; }
O0
c
js_default_module_normalize_name: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x28(%rsp), %rax movzbl (%rax), %eax cmpl $0x2e, %eax je 0x7a8e9 movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x282f0 movq %rax, 0x40(%rsp) jmp 0x7aaf2 movq 0x30(%rsp), %rdi movl $0x2f, %esi callq 0xe320 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0x7a918 movq 0x18(%rsp), %rax movq 0x30(%rsp), %rcx subq %rcx, %rax movl %eax, 0x8(%rsp) jmp 0x7a920 movl $0x0, 0x8(%rsp) movslq 0x8(%rsp), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rdi callq 0xe260 movq %rax, %rcx movq (%rsp), %rax addq %rcx, %rax addq $0x1, %rax addq $0x1, %rax movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rdi movslq 0xc(%rsp), %rsi callq 0x27fa0 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x7a973 movq $0x0, 0x40(%rsp) jmp 0x7aaf2 movq 0x20(%rsp), %rdi movq 0x30(%rsp), %rsi movslq 0x8(%rsp), %rdx callq 0xe610 movq 0x20(%rsp), %rax movslq 0x8(%rsp), %rcx movb $0x0, (%rax,%rcx) movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movzbl (%rax), %eax cmpl $0x2e, %eax jne 0x7a9cd movq 0x10(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0x7a9cd movq 0x10(%rsp), %rax addq $0x2, %rax movq %rax, 0x10(%rsp) jmp 0x7aaae movq 0x10(%rsp), %rax movzbl (%rax), %eax cmpl $0x2e, %eax jne 0x7aaaa movq 0x10(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0x2e, %eax jne 0x7aaaa movq 0x10(%rsp), %rax movzbl 0x2(%rax), %eax cmpl $0x2f, %eax jne 0x7aaaa movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x0, %eax jne 0x7aa14 jmp 0x7aab3 movq 0x20(%rsp), %rdi movl $0x2f, %esi callq 0xe320 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x7aa3c movq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) jmp 0x7aa4a movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi leaq 0x9b3ea(%rip), %rsi # 0x115e40 callq 0xe560 cmpl $0x0, %eax je 0x7aa76 movq 0x18(%rsp), %rdi leaq 0x9b3d3(%rip), %rsi # 0x115e3f callq 0xe560 cmpl $0x0, %eax jne 0x7aa78 jmp 0x7aab3 movq 0x18(%rsp), %rax cmpq 0x20(%rsp), %rax jbe 0x7aa92 movq 0x18(%rsp), %rax addq $-0x1, %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movb $0x0, (%rax) movq 0x10(%rsp), %rax addq $0x3, %rax movq %rax, 0x10(%rsp) jmp 0x7aaac jmp 0x7aab3 jmp 0x7aaae jmp 0x7a99f movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x0, %eax je 0x7aad5 movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi leaq 0x95284(%rip), %rdx # 0x10fd54 callq 0x244c0 movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi movq 0x10(%rsp), %rdx callq 0x244c0 movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopl (%rax)
js_default_module_normalize_name: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_20] movzx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jz short loc_7A8E9 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] call js_strdup mov [rsp+48h+var_8], rax jmp loc_7AAF2 loc_7A8E9: mov rdi, [rsp+48h+var_18] mov esi, 2Fh ; '/' call _strrchr mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jz short loc_7A918 mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_18] sub rax, rcx mov [rsp+48h+var_40], eax jmp short loc_7A920 loc_7A918: mov [rsp+48h+var_40], 0 loc_7A920: movsxd rax, [rsp+48h+var_40] mov [rsp+48h+var_48], rax mov rdi, [rsp+48h+var_20] call _strlen mov rcx, rax mov rax, [rsp+48h+var_48] add rax, rcx add rax, 1 add rax, 1 mov [rsp+48h+var_3C], eax mov rdi, [rsp+48h+var_10] movsxd rsi, [rsp+48h+var_3C] call js_malloc mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jnz short loc_7A973 mov [rsp+48h+var_8], 0 jmp loc_7AAF2 loc_7A973: mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_18] movsxd rdx, [rsp+48h+var_40] call _memcpy mov rax, [rsp+48h+var_28] movsxd rcx, [rsp+48h+var_40] mov byte ptr [rax+rcx], 0 mov rax, [rsp+48h+var_20] mov [rsp+48h+var_38], rax loc_7A99F: mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz short loc_7A9CD mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_7A9CD mov rax, [rsp+48h+var_38] add rax, 2 mov [rsp+48h+var_38], rax jmp loc_7AAAE loc_7A9CD: mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_7AAAA mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+1] cmp eax, 2Eh ; '.' jnz loc_7AAAA mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+2] cmp eax, 2Fh ; '/' jnz loc_7AAAA mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax] cmp eax, 0 jnz short loc_7AA14 jmp loc_7AAB3 loc_7AA14: mov rdi, [rsp+48h+var_28] mov esi, 2Fh ; '/' call _strrchr mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_7AA3C mov rax, [rsp+48h+var_28] mov [rsp+48h+var_30], rax jmp short loc_7AA4A loc_7AA3C: mov rax, [rsp+48h+var_30] add rax, 1 mov [rsp+48h+var_30], rax loc_7AA4A: mov rdi, [rsp+48h+var_30] lea rsi, aMissingBinding+19h; "." call _strcmp cmp eax, 0 jz short loc_7AA76 mov rdi, [rsp+48h+var_30] lea rsi, aMissingBinding+18h; ".." call _strcmp cmp eax, 0 jnz short loc_7AA78 loc_7AA76: jmp short loc_7AAB3 loc_7AA78: mov rax, [rsp+48h+var_30] cmp rax, [rsp+48h+var_28] jbe short loc_7AA92 mov rax, [rsp+48h+var_30] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+48h+var_30], rax loc_7AA92: mov rax, [rsp+48h+var_30] mov byte ptr [rax], 0 mov rax, [rsp+48h+var_38] add rax, 3 mov [rsp+48h+var_38], rax jmp short loc_7AAAC loc_7AAAA: jmp short loc_7AAB3 loc_7AAAC: jmp short $+2 loc_7AAAE: jmp loc_7A99F loc_7AAB3: mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax] cmp eax, 0 jz short loc_7AAD5 mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_3C] lea rdx, asc_10FD53+1; "/" call js__pstrcat loc_7AAD5: mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_3C] mov rdx, [rsp+48h+var_38] call js__pstrcat mov rax, [rsp+48h+var_28] mov [rsp+48h+var_8], rax loc_7AAF2: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long js_default_module_normalize_name(long long a1, long long a2, char *a3) { int v3; // eax int v5; // [rsp+8h] [rbp-40h] int v6; // [rsp+Ch] [rbp-3Ch] char *i; // [rsp+10h] [rbp-38h] long long v8; // [rsp+18h] [rbp-30h] long long v9; // [rsp+18h] [rbp-30h] _BYTE *v10; // [rsp+18h] [rbp-30h] _BYTE *v11; // [rsp+20h] [rbp-28h] if ( *a3 != 46 ) return js_strdup(a1, (long long)a3); v8 = strrchr(a2, 47LL); if ( v8 ) v5 = v8 - a2; else v5 = 0; v6 = strlen(a3) + v5 + 2; v11 = (_BYTE *)js_malloc(a1, v6); if ( !v11 ) return 0LL; memcpy(v11, a2, v5); v11[v5] = 0; for ( i = a3; ; i += 3 ) { while ( *i == 46 && i[1] == 47 ) i += 2; if ( *i != 46 || i[1] != 46 || i[2] != 47 || !*v11 ) break; v9 = strrchr(v11, 47LL); if ( v9 ) { v10 = (_BYTE *)(v9 + 1); v3 = strcmp(v10, "."); } else { v10 = v11; v3 = strcmp(v11, "."); } if ( !v3 || !(unsigned int)strcmp(v10, "..") ) break; if ( v10 > v11 ) --v10; *v10 = 0; } if ( *v11 ) js__pstrcat((long long)v11, v6, "/"); js__pstrcat((long long)v11, v6, i); return (long long)v11; }
js_default_module_normalize_name: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2e JZ 0x0017a8e9 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001282f0 MOV qword ptr [RSP + 0x40],RAX JMP 0x0017aaf2 LAB_0017a8e9: MOV RDI,qword ptr [RSP + 0x30] MOV ESI,0x2f CALL 0x0010e320 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x0017a918 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x30] SUB RAX,RCX MOV dword ptr [RSP + 0x8],EAX JMP 0x0017a920 LAB_0017a918: MOV dword ptr [RSP + 0x8],0x0 LAB_0017a920: MOVSXD RAX,dword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x0010e260 MOV RCX,RAX MOV RAX,qword ptr [RSP] ADD RAX,RCX ADD RAX,0x1 ADD RAX,0x1 MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RSI,dword ptr [RSP + 0xc] CALL 0x00127fa0 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0017a973 MOV qword ptr [RSP + 0x40],0x0 JMP 0x0017aaf2 LAB_0017a973: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x30] MOVSXD RDX,dword ptr [RSP + 0x8] CALL 0x0010e610 MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0x8] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX LAB_0017a99f: MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0017a9cd MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x0017a9cd MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x2 MOV qword ptr [RSP + 0x10],RAX JMP 0x0017aaae LAB_0017a9cd: MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0017aaaa MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2e JNZ 0x0017aaaa MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0x2f JNZ 0x0017aaaa MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0017aa14 JMP 0x0017aab3 LAB_0017aa14: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2f CALL 0x0010e320 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x0017aa3c MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX JMP 0x0017aa4a LAB_0017aa3c: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX LAB_0017aa4a: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x215e40] CALL 0x0010e560 CMP EAX,0x0 JZ 0x0017aa76 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x215e3f] CALL 0x0010e560 CMP EAX,0x0 JNZ 0x0017aa78 LAB_0017aa76: JMP 0x0017aab3 LAB_0017aa78: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x20] JBE 0x0017aa92 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x1 MOV qword ptr [RSP + 0x18],RAX LAB_0017aa92: MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x3 MOV qword ptr [RSP + 0x10],RAX JMP 0x0017aaac LAB_0017aaaa: JMP 0x0017aab3 LAB_0017aaac: JMP 0x0017aaae LAB_0017aaae: JMP 0x0017a99f LAB_0017aab3: MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0017aad5 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] LEA RDX,[0x20fd54] CALL 0x001244c0 LAB_0017aad5: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] MOV RDX,qword ptr [RSP + 0x10] CALL 0x001244c0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX LAB_0017aaf2: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
char * js_default_module_normalize_name(int8 param_1,char *param_2,char *param_3) { int iVar1; int iVar2; char *pcVar3; size_t sVar4; int local_40; char *local_38; char *local_30; char *local_8; if (*param_3 == '.') { pcVar3 = strrchr(param_2,0x2f); if (pcVar3 == (char *)0x0) { local_40 = 0; } else { local_40 = (int)pcVar3 - (int)param_2; } sVar4 = strlen(param_3); iVar1 = local_40 + (int)sVar4 + 2; local_8 = (char *)js_malloc(param_1,(long)iVar1); if (local_8 == (char *)0x0) { local_8 = (char *)0x0; } else { memcpy(local_8,param_2,(long)local_40); local_8[local_40] = '\0'; local_38 = param_3; while( true ) { for (; (*local_38 == '.' && (local_38[1] == '/')); local_38 = local_38 + 2) { } if ((*local_38 != '.') || (((local_38[1] != '.' || (local_38[2] != '/')) || (*local_8 == '\0')))) break; pcVar3 = strrchr(local_8,0x2f); local_30 = local_8; if (pcVar3 != (char *)0x0) { local_30 = pcVar3 + 1; } iVar2 = strcmp(local_30,"."); if ((iVar2 == 0) || (iVar2 = strcmp(local_30,".."), iVar2 == 0)) break; if (local_8 < local_30) { local_30 = local_30 + -1; } *local_30 = '\0'; local_38 = local_38 + 3; } if (*local_8 != '\0') { js__pstrcat(local_8,iVar1,&DAT_0020fd54); } js__pstrcat(local_8,iVar1,local_38); } } else { local_8 = (char *)js_strdup(param_1,param_3); } return local_8; }
48,771
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!expr) throw std::runtime_error("ExpressionNode.expr is null"); auto result = expr->evaluate(context); if (result.is_string()) { out << result.get<std::string>(); } else if (result.is_boolean()) { out << (result.get<bool>() ? "True" : "False"); } else if (!result.is_null()) { out << result.dump(); } }
O2
cpp
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0x75218 leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x625b2 movzbl 0x40(%r14), %eax cmpl $0x4, %eax je 0x75197 cmpl $0x3, %eax jne 0x751bf leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x63464 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x237f0 jmp 0x751fc leaq 0x28(%rsp), %rdi callq 0x633ae leaq 0x3da34(%rip), %rcx # 0xb2bdc leaq 0x3da32(%rip), %rsi # 0xb2be1 testb %al, %al cmovneq %rcx, %rsi movq %rbx, %rdi callq 0x238c0 jmp 0x75206 testb %al, %al jne 0x751db cmpq $0x0, 0x48(%rsp) jne 0x751db cmpq $0x0, 0x38(%rsp) jne 0x751db cmpq $0x0, 0x58(%rsp) je 0x75206 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi pushq $-0x1 popq %rdx xorl %ecx, %ecx callq 0x62a30 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x237f0 leaq 0x8(%rsp), %rdi callq 0x241d8 leaq 0x28(%rsp), %rdi callq 0x62842 addq $0x78, %rsp popq %rbx popq %r14 retq pushq $0x10 popq %rdi callq 0x23460 movq %rax, %r14 leaq 0x3e999(%rip), %rsi # 0xb3bc3 movq %rax, %rdi callq 0x23320 movq 0x86db7(%rip), %rsi # 0xfbff0 movq 0x86d18(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23f20 jmp 0x7524c jmp 0x7526a movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241d8 jmp 0x7526d jmp 0x7526a movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x75277 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x62842 movq %rbx, %rdi callq 0x23fa0 nop
_ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r14 push rbx sub rsp, 78h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_75218 lea r14, [rsp+88h+var_60] mov rdi, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) movzx eax, byte ptr [r14+40h] cmp eax, 4 jz short loc_75197 cmp eax, 3 jnz short loc_751BF lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_60] call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rsi, [rsp+88h+var_80] mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short loc_751FC loc_75197: lea rdi, [rsp+88h+var_60] call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse; "False" test al, al cmovnz rsi, rcx mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short loc_75206 loc_751BF: test al, al jnz short loc_751DB cmp [rsp+88h+var_40], 0 jnz short loc_751DB cmp [rsp+88h+var_50], 0 jnz short loc_751DB cmp [rsp+88h+var_30], 0 jz short loc_75206 loc_751DB: lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, [rsp+88h+var_80] mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) loc_751FC: lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_75206: lea rdi, [rsp+88h+var_60]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 78h pop rbx pop r14 retn loc_75218: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpressionnode; "ExpressionNode.expr is null" 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, r14; void * call ___cxa_throw jmp short loc_7524C jmp short loc_7526A loc_7524C: mov rbx, rax lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7526D jmp short loc_7526A mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_75277 loc_7526A: mov rbx, rax loc_7526D: lea rdi, [rsp+88h+var_60]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_75277: mov rdi, rbx call __Unwind_Resume
void minja::ExpressionNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi const char *v4; // rsi std::runtime_error *exception; // r14 _BYTE v6[32]; // [rsp+8h] [rbp-80h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-60h] BYREF long long v8; // [rsp+38h] [rbp-50h] long long v9; // [rsp+48h] [rbp-40h] long long v10; // [rsp+58h] [rbp-30h] char v11; // [rsp+68h] [rbp-20h] v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v7, v3); if ( v11 == 4 ) { v4 = "False"; if ( (unsigned __int8)minja::Value::get<bool>((minja::Value *)v7) ) v4 = "True"; std::operator<<<std::char_traits<char>>(a2, v4); } else { if ( v11 == 3 ) { minja::Value::get<std::string>((long long)v6, (minja::Value *)v7); std::operator<<<char>(a2, v6); LABEL_13: std::string::~string(v6); goto LABEL_14; } if ( v11 || v9 || v8 || v10 ) { minja::Value::dump[abi:cxx11]((long long)v6, (long long)v7, 0xFFFFFFFF, 0); std::operator<<<char>(a2, v6); goto LABEL_13; } } LABEL_14: minja::Value::~Value((minja::Value *)v7); }
do_render: PUSH R14 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x00175218 LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x001625b2 MOVZX EAX,byte ptr [R14 + 0x40] CMP EAX,0x4 JZ 0x00175197 CMP EAX,0x3 JNZ 0x001751bf LAB_00175179: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x00163464 LAB_00175188: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001237f0 JMP 0x001751fc LAB_00175197: LEA RDI,[RSP + 0x28] CALL 0x001633ae LEA RCX,[0x1b2bdc] LEA RSI,[0x1b2be1] TEST AL,AL CMOVNZ RSI,RCX MOV RDI,RBX CALL 0x001238c0 JMP 0x00175206 LAB_001751bf: TEST AL,AL JNZ 0x001751db CMP qword ptr [RSP + 0x48],0x0 JNZ 0x001751db CMP qword ptr [RSP + 0x38],0x0 JNZ 0x001751db CMP qword ptr [RSP + 0x58],0x0 JZ 0x00175206 LAB_001751db: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] PUSH -0x1 POP RDX XOR ECX,ECX CALL 0x00162a30 LAB_001751ef: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001237f0 LAB_001751fc: LEA RDI,[RSP + 0x8] CALL 0x001241d8 LAB_00175206: LEA RDI,[RSP + 0x28] CALL 0x00162842 ADD RSP,0x78 POP RBX POP R14 RET LAB_00175218: PUSH 0x10 POP RDI CALL 0x00123460 MOV R14,RAX LAB_00175223: LEA RSI,[0x1b3bc3] MOV RDI,RAX CALL 0x00123320 LAB_00175232: MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123f20
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2) { bool bVar1; runtime_error *this; char *pcVar2; string local_80 [32]; Expression local_60 [16]; long local_50; long local_40; long local_30; char local_20; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00175223 to 00175231 has its CatchHandler @ 0017525d */ std::runtime_error::runtime_error(this,"ExpressionNode.expr is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20)); if (local_20 == '\x04') { /* try { // try from 00175197 to 001751bc has its CatchHandler @ 0017526a */ bVar1 = Value::get<bool>((Value *)local_60); pcVar2 = "False"; if (bVar1) { pcVar2 = "True"; } std::operator<<((ostream *)param_2,pcVar2); } else { if (local_20 == '\x03') { /* try { // try from 00175179 to 00175187 has its CatchHandler @ 0017525b */ Value::get<std::__cxx11::string>(); /* try { // try from 00175188 to 00175194 has its CatchHandler @ 0017524c */ std::operator<<((ostream *)param_2,local_80); } else { if ((((local_20 == '\0') && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0)) goto LAB_00175206; /* try { // try from 001751db to 001751ee has its CatchHandler @ 0017524a */ Value::dump_abi_cxx11_((int)local_80,SUB81(local_60,0)); /* try { // try from 001751ef to 001751fb has its CatchHandler @ 00175248 */ std::operator<<((ostream *)param_2,local_80); } std::__cxx11::string::~string(local_80); } LAB_00175206: Value::~Value((Value *)local_60); return; }
48,772
get_options
eloqsql/storage/maria/aria_chk.c
static void get_options(register int *argc,register char ***argv) { int ho_error; load_defaults_or_exit("my", load_default_groups, argc, argv); default_argv= *argv; check_param.testflag= T_UPDATE_STATE; if (isatty(fileno(stdout))) check_param.testflag|=T_WRITE_LOOP; if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) my_exit(ho_error); /* If using repair, then update checksum if one uses --update-state */ if ((check_param.testflag & T_UPDATE_STATE) && (check_param.testflag & T_REP_ANY)) check_param.testflag|= T_CALC_CHECKSUM; if (*argc == 0) { usage(); my_exit(-1); } if ((check_param.testflag & T_UNPACK) && (check_param.testflag & (T_QUICK | T_SORT_RECORDS))) { fprintf(stderr, "%s: --unpack can't be used with --quick or --sort-records\n", my_progname_short); my_exit(1); } if ((check_param.testflag & T_READONLY) && (check_param.testflag & (T_REP_ANY | T_STATISTICS | T_AUTO_INC | T_SORT_RECORDS | T_SORT_INDEX | T_FORCE_CREATE))) { fprintf(stderr, "%s: Can't use --readonly when repairing or sorting\n", my_progname_short); my_exit(1); } if (!opt_debug) { DEBUGGER_OFF; /* Speed up things a bit */ } if (init_tmpdir(&maria_chk_tmpdir, opt_tmpdir)) my_exit(1); check_param.tmpdir=&maria_chk_tmpdir; if (set_collation_name) if (!(set_collation= get_charset_by_name(set_collation_name, MYF(MY_UTF8_IS_UTF8MB3 | MY_WME)))) my_exit(1); if (maria_data_root != default_log_dir && opt_log_dir == default_log_dir) { /* --datadir was used and --log-dir was not. Set log-dir to datadir */ opt_log_dir= maria_data_root; } /* If we are using zerofill, then we don't need to read the control file */ if ((check_param.testflag & (T_ZEROFILL_KEEP_LSN | T_ZEROFILL)) && !(check_param.testflag & ~(T_REP_ANY | T_SORT_RECORDS | T_SORT_INDEX | T_STATISTICS | T_CHECK | T_FAST | T_CHECK_ONLY_CHANGED))) opt_ignore_control_file= 1; return; }
O0
c
get_options: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdx movq -0x10(%rbp), %rcx leaq 0x157fd2(%rip), %rdi # 0x1851c1 leaq 0x2d011a(%rip), %rsi # 0x2fd310 callq 0x1085a0 movl %eax, %ecx movl %ecx, -0x18(%rbp) testl %eax, %eax je 0x2d210 jmp 0x2d206 movl -0x18(%rbp), %eax subl $0x4, %eax je 0x2d212 jmp 0x2d220 jmp 0x2d231 xorl %edi, %edi callq 0x125860 xorl %edi, %edi callq 0x2c5c0 xorl %edi, %edi callq 0x125860 movl $0x1, %edi callq 0x2c5c0 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, 0x4ac859(%rip) # 0x4d9a98 movq $0x8000000, 0x48c58e(%rip) # imm = 0x8000000 movq 0x2cfd87(%rip), %rax # 0x2fcfd8 movq (%rax), %rdi callq 0x2cab0 movl %eax, %edi callq 0x2c840 cmpl $0x0, %eax je 0x2d27d movabsq $0x80000000, %rax # imm = 0x80000000 orq 0x48c562(%rip), %rax # 0x4b97d8 movq %rax, 0x48c55b(%rip) # 0x4b97d8 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x2d0094(%rip), %rdx # 0x2fd320 leaq 0x216d(%rip), %rcx # 0x2f400 callq 0x11f8c0 movl %eax, -0x14(%rbp) cmpl $0x0, %eax je 0x2d2a8 movl -0x14(%rbp), %edi callq 0x2f0a0 movq 0x48c529(%rip), %rax # 0x4b97d8 andq $0x8000000, %rax # imm = 0x8000000 cmpq $0x0, %rax je 0x2d2e0 movq 0x48c516(%rip), %rax # 0x4b97d8 andq $0xe0000, %rax # imm = 0xE0000 cmpq $0x0, %rax je 0x2d2e0 movq 0x48c503(%rip), %rax # 0x4b97d8 orq $0x8, %rax movq %rax, 0x48c4f8(%rip) # 0x4b97d8 movq -0x8(%rbp), %rax cmpl $0x0, (%rax) jne 0x2d2f8 callq 0x2fdd0 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x2f0a0 movq 0x48c4d9(%rip), %rax # 0x4b97d8 andq $0x4000000, %rax # imm = 0x4000000 cmpq $0x0, %rax je 0x2d34a movq 0x48c4c6(%rip), %rax # 0x4b97d8 andq $0x1008000, %rax # imm = 0x1008000 cmpq $0x0, %rax je 0x2d34a movq 0x2cfcbb(%rip), %rax # 0x2fcfe0 movq (%rax), %rdi leaq 0xcb8009(%rip), %rax # 0xce5338 movq (%rax), %rdx leaq 0x157e8b(%rip), %rsi # 0x1851c4 movb $0x0, %al callq 0x2c1b0 movl $0x1, %edi callq 0x2f0a0 movq 0x48c487(%rip), %rax # 0x4b97d8 andq $0x10000, %rax # imm = 0x10000 cmpq $0x0, %rax je 0x2d39c movq 0x48c474(%rip), %rax # 0x4b97d8 andq $0x38e0801, %rax # imm = 0x38E0801 cmpq $0x0, %rax je 0x2d39c movq 0x2cfc69(%rip), %rax # 0x2fcfe0 movq (%rax), %rdi leaq 0xcb7fb7(%rip), %rax # 0xce5338 movq (%rax), %rdx leaq 0x157e74(%rip), %rsi # 0x1851ff movb $0x0, %al callq 0x2c1b0 movl $0x1, %edi callq 0x2f0a0 cmpb $0x0, 0x4ac6fd(%rip) # 0x4d9aa0 jne 0x2d3ab jmp 0x2d3a7 jmp 0x2d3a9 jmp 0x2d3ab movq 0x4ac6f6(%rip), %rsi # 0x4d9aa8 leaq 0x4ac65f(%rip), %rdi # 0x4d9a18 callq 0x11b150 cmpb $0x0, %al je 0x2d3cc movl $0x1, %edi callq 0x2f0a0 leaq 0x4ac645(%rip), %rax # 0x4d9a18 movq %rax, 0x48b8f6(%rip) # 0x4b8cd0 cmpq $0x0, 0x4ac6ce(%rip) # 0x4d9ab0 je 0x2d40e movq 0x4ac6c5(%rip), %rdi # 0x4d9ab0 movl $0x410, %esi # imm = 0x410 callq 0x106900 movq %rax, 0x4ac6bc(%rip) # 0x4d9ab8 cmpq $0x0, %rax jne 0x2d40c movl $0x1, %edi callq 0x2f0a0 jmp 0x2d40e leaq 0x4acb9b(%rip), %rax # 0x4d9fb0 movq (%rax), %rax cmpq 0x48b8a1(%rip), %rax # 0x4b8cc0 je 0x2d442 movq 0x48b890(%rip), %rax # 0x4b8cb8 cmpq 0x48b891(%rip), %rax # 0x4b8cc0 jne 0x2d442 leaq 0x4acb78(%rip), %rax # 0x4d9fb0 movq (%rax), %rax movq %rax, 0x48b876(%rip) # 0x4b8cb8 movabsq $0x300000000, %rax # imm = 0x300000000 andq 0x48c385(%rip), %rax # 0x4b97d8 cmpq $0x0, %rax je 0x2d473 movq 0x48c378(%rip), %rax # 0x4b97d8 andq $-0x38e0431, %rax # imm = 0xFC71FBCF cmpq $0x0, %rax jne 0x2d473 movb $0x1, 0x4ac599(%rip) # 0x4d9a0c addq $0x20, %rsp popq %rbp retq nopl (%rax)
get_options: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdx, [rbp+var_8] mov rcx, [rbp+var_10] lea rdi, aMy; "my" lea rsi, load_default_groups call load_defaults mov ecx, eax mov [rbp+var_18], ecx test eax, eax jz short loc_2D210 jmp short $+2 loc_2D206: mov eax, [rbp+var_18] sub eax, 4 jz short loc_2D212 jmp short loc_2D220 loc_2D210: jmp short loc_2D231 loc_2D212: xor edi, edi call my_end xor edi, edi call _exit loc_2D220: xor edi, edi call my_end mov edi, 1 call _exit loc_2D231: mov rax, [rbp+var_10] mov rax, [rax] mov cs:default_argv, rax mov cs:qword_4B97D8, 8000000h mov rax, cs:stdout_ptr mov rdi, [rax] call _fileno mov edi, eax call _isatty cmp eax, 0 jz short loc_2D27D mov rax, 80000000h or rax, cs:qword_4B97D8 mov cs:qword_4B97D8, rax loc_2D27D: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, my_long_options lea rcx, get_one_option call handle_options mov [rbp+var_14], eax cmp eax, 0 jz short loc_2D2A8 mov edi, [rbp+var_14] call my_exit loc_2D2A8: mov rax, cs:qword_4B97D8 and rax, 8000000h cmp rax, 0 jz short loc_2D2E0 mov rax, cs:qword_4B97D8 and rax, 0E0000h cmp rax, 0 jz short loc_2D2E0 mov rax, cs:qword_4B97D8 or rax, 8 mov cs:qword_4B97D8, rax loc_2D2E0: mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jnz short loc_2D2F8 call usage mov edi, 0FFFFFFFFh call my_exit loc_2D2F8: mov rax, cs:qword_4B97D8 and rax, 4000000h cmp rax, 0 jz short loc_2D34A mov rax, cs:qword_4B97D8 and rax, 1008000h cmp rax, 0 jz short loc_2D34A mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, my_progname_short mov rdx, [rax] lea rsi, aSUnpackCanTBeU; "%s: --unpack can't be used with --quick"... mov al, 0 call _fprintf mov edi, 1 call my_exit loc_2D34A: mov rax, cs:qword_4B97D8 and rax, 10000h cmp rax, 0 jz short loc_2D39C mov rax, cs:qword_4B97D8 and rax, 38E0801h cmp rax, 0 jz short loc_2D39C mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, my_progname_short mov rdx, [rax] lea rsi, aSCanTUseReadon; "%s: Can't use --readonly when repairing"... mov al, 0 call _fprintf mov edi, 1 call my_exit loc_2D39C: cmp cs:opt_debug, 0 jnz short loc_2D3AB jmp short $+2 loc_2D3A7: jmp short $+2 loc_2D3A9: jmp short $+2 loc_2D3AB: mov rsi, cs:opt_tmpdir lea rdi, maria_chk_tmpdir call init_tmpdir cmp al, 0 jz short loc_2D3CC mov edi, 1 call my_exit loc_2D3CC: lea rax, maria_chk_tmpdir mov cs:qword_4B8CD0, rax cmp cs:set_collation_name, 0 jz short loc_2D40E mov rdi, cs:set_collation_name mov esi, 410h call get_charset_by_name mov cs:set_collation, rax cmp rax, 0 jnz short loc_2D40C mov edi, 1 call my_exit loc_2D40C: jmp short $+2 loc_2D40E: lea rax, maria_data_root mov rax, [rax] cmp rax, cs:default_log_dir jz short loc_2D442 mov rax, cs:opt_log_dir cmp rax, cs:default_log_dir jnz short loc_2D442 lea rax, maria_data_root mov rax, [rax] mov cs:opt_log_dir, rax loc_2D442: mov rax, 300000000h and rax, cs:qword_4B97D8 cmp rax, 0 jz short loc_2D473 mov rax, cs:qword_4B97D8 and rax, 0FFFFFFFFFC71FBCFh cmp rax, 0 jnz short loc_2D473 mov cs:opt_ignore_control_file, 1 loc_2D473: add rsp, 20h pop rbp retn
unsigned long long get_options(_DWORD *a1, long long *a2) { unsigned int v2; // eax unsigned long long result; // rax int defaults; // [rsp+8h] [rbp-18h] unsigned int v6; // [rsp+Ch] [rbp-14h] defaults = load_defaults("my", &load_default_groups, a1, a2); if ( defaults ) { if ( defaults != 4 ) { my_end(0LL); exit(1LL); } my_end(0LL); exit(0LL); } default_argv = *a2; qword_4B97D8 = 0x8000000LL; v2 = fileno(stdout); if ( (unsigned int)isatty(v2) ) qword_4B97D8 |= 0x80000000uLL; v6 = handle_options(a1, a2, &my_long_options, get_one_option); if ( v6 ) my_exit(v6); if ( (qword_4B97D8 & 0x8000000) != 0 && (qword_4B97D8 & 0xE0000) != 0 ) qword_4B97D8 |= 8uLL; if ( !*a1 ) { usage(); my_exit(0xFFFFFFFFLL); } if ( (qword_4B97D8 & 0x4000000) != 0 && (qword_4B97D8 & 0x1008000) != 0 ) { fprintf(stderr, "%s: --unpack can't be used with --quick or --sort-records\n", my_progname_short); my_exit(1LL); } if ( (qword_4B97D8 & 0x10000) != 0 && (qword_4B97D8 & 0x38E0801) != 0 ) { fprintf(stderr, "%s: Can't use --readonly when repairing or sorting\n", my_progname_short); my_exit(1LL); } if ( (unsigned __int8)init_tmpdir(&maria_chk_tmpdir, opt_tmpdir) ) my_exit(1LL); qword_4B8CD0 = (long long)&maria_chk_tmpdir; if ( set_collation_name ) { set_collation = get_charset_by_name(set_collation_name, 1040LL); if ( !set_collation ) my_exit(1LL); } if ( maria_data_root != default_log_dir && opt_log_dir == default_log_dir ) opt_log_dir = maria_data_root; result = qword_4B97D8 & 0x300000000LL; if ( (qword_4B97D8 & 0x300000000LL) != 0 ) { result = qword_4B97D8 & 0xFFFFFFFFFC71FBCFLL; if ( (qword_4B97D8 & 0xFFFFFFFFFC71FBCFLL) == 0 ) opt_ignore_control_file = 1; } return result; }
get_options: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] LEA RDI,[0x2851c1] LEA RSI,[0x3fd310] CALL 0x002085a0 MOV ECX,EAX MOV dword ptr [RBP + -0x18],ECX TEST EAX,EAX JZ 0x0012d210 JMP 0x0012d206 LAB_0012d206: MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x4 JZ 0x0012d212 JMP 0x0012d220 LAB_0012d210: JMP 0x0012d231 LAB_0012d212: XOR EDI,EDI CALL 0x00225860 XOR EDI,EDI CALL 0x0012c5c0 LAB_0012d220: XOR EDI,EDI CALL 0x00225860 MOV EDI,0x1 CALL 0x0012c5c0 LAB_0012d231: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [0x005d9a98],RAX MOV qword ptr [0x005b97d8],0x8000000 MOV RAX,qword ptr [0x003fcfd8] MOV RDI,qword ptr [RAX] CALL 0x0012cab0 MOV EDI,EAX CALL 0x0012c840 CMP EAX,0x0 JZ 0x0012d27d MOV RAX,0x80000000 OR RAX,qword ptr [0x005b97d8] MOV qword ptr [0x005b97d8],RAX LAB_0012d27d: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x3fd320] LEA RCX,[0x12f400] CALL 0x0021f8c0 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JZ 0x0012d2a8 MOV EDI,dword ptr [RBP + -0x14] CALL 0x0012f0a0 LAB_0012d2a8: MOV RAX,qword ptr [0x005b97d8] AND RAX,0x8000000 CMP RAX,0x0 JZ 0x0012d2e0 MOV RAX,qword ptr [0x005b97d8] AND RAX,0xe0000 CMP RAX,0x0 JZ 0x0012d2e0 MOV RAX,qword ptr [0x005b97d8] OR RAX,0x8 MOV qword ptr [0x005b97d8],RAX LAB_0012d2e0: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JNZ 0x0012d2f8 CALL 0x0012fdd0 MOV EDI,0xffffffff CALL 0x0012f0a0 LAB_0012d2f8: MOV RAX,qword ptr [0x005b97d8] AND RAX,0x4000000 CMP RAX,0x0 JZ 0x0012d34a MOV RAX,qword ptr [0x005b97d8] AND RAX,0x1008000 CMP RAX,0x0 JZ 0x0012d34a MOV RAX,qword ptr [0x003fcfe0] MOV RDI,qword ptr [RAX] LEA RAX,[0xde5338] MOV RDX,qword ptr [RAX] LEA RSI,[0x2851c4] MOV AL,0x0 CALL 0x0012c1b0 MOV EDI,0x1 CALL 0x0012f0a0 LAB_0012d34a: MOV RAX,qword ptr [0x005b97d8] AND RAX,0x10000 CMP RAX,0x0 JZ 0x0012d39c MOV RAX,qword ptr [0x005b97d8] AND RAX,0x38e0801 CMP RAX,0x0 JZ 0x0012d39c MOV RAX,qword ptr [0x003fcfe0] MOV RDI,qword ptr [RAX] LEA RAX,[0xde5338] MOV RDX,qword ptr [RAX] LEA RSI,[0x2851ff] MOV AL,0x0 CALL 0x0012c1b0 MOV EDI,0x1 CALL 0x0012f0a0 LAB_0012d39c: CMP byte ptr [0x005d9aa0],0x0 JNZ 0x0012d3ab JMP 0x0012d3a7 LAB_0012d3a7: JMP 0x0012d3a9 LAB_0012d3a9: JMP 0x0012d3ab LAB_0012d3ab: MOV RSI,qword ptr [0x005d9aa8] LEA RDI,[0x5d9a18] CALL 0x0021b150 CMP AL,0x0 JZ 0x0012d3cc MOV EDI,0x1 CALL 0x0012f0a0 LAB_0012d3cc: LEA RAX,[0x5d9a18] MOV qword ptr [0x005b8cd0],RAX CMP qword ptr [0x005d9ab0],0x0 JZ 0x0012d40e MOV RDI,qword ptr [0x005d9ab0] MOV ESI,0x410 CALL 0x00206900 MOV qword ptr [0x005d9ab8],RAX CMP RAX,0x0 JNZ 0x0012d40c MOV EDI,0x1 CALL 0x0012f0a0 LAB_0012d40c: JMP 0x0012d40e LAB_0012d40e: LEA RAX,[0x5d9fb0] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [0x005b8cc0] JZ 0x0012d442 MOV RAX,qword ptr [0x005b8cb8] CMP RAX,qword ptr [0x005b8cc0] JNZ 0x0012d442 LEA RAX,[0x5d9fb0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x005b8cb8],RAX LAB_0012d442: MOV RAX,0x300000000 AND RAX,qword ptr [0x005b97d8] CMP RAX,0x0 JZ 0x0012d473 MOV RAX,qword ptr [0x005b97d8] AND RAX,-0x38e0431 CMP RAX,0x0 JNZ 0x0012d473 MOV byte ptr [0x005d9a0c],0x1 LAB_0012d473: ADD RSP,0x20 POP RBP RET
void get_options(int *param_1,int8 *param_2) { char cVar1; int iVar2; iVar2 = load_defaults(&DAT_002851c1,load_default_groups,param_1,param_2); if (iVar2 == 0) { default_argv = *param_2; check_param._2832_8_ = 0x8000000; iVar2 = fileno(*(FILE **)PTR_stdout_003fcfd8); iVar2 = isatty(iVar2); if (iVar2 != 0) { check_param._2832_8_ = check_param._2832_8_ | 0x80000000; } iVar2 = handle_options(param_1,param_2,my_long_options,get_one_option); if (iVar2 != 0) { my_exit(iVar2); } if (((check_param._2832_8_ & 0x8000000) != 0) && ((check_param._2832_8_ & 0xe0000) != 0)) { check_param._2832_8_ = check_param._2832_8_ | 8; } if (*param_1 == 0) { usage(); my_exit(0xffffffff); } if (((check_param._2832_8_ & 0x4000000) != 0) && ((check_param._2832_8_ & 0x1008000) != 0)) { fprintf(*(FILE **)PTR_stderr_003fcfe0, "%s: --unpack can\'t be used with --quick or --sort-records\n",my_progname_short); my_exit(1); } if (((check_param._2832_8_ & 0x10000) != 0) && ((check_param._2832_8_ & 0x38e0801) != 0)) { fprintf(*(FILE **)PTR_stderr_003fcfe0,"%s: Can\'t use --readonly when repairing or sorting\n", my_progname_short); my_exit(1); } cVar1 = init_tmpdir(maria_chk_tmpdir,opt_tmpdir); if (cVar1 != '\0') { my_exit(1); } check_param._8_8_ = maria_chk_tmpdir; if ((set_collation_name != 0) && (set_collation = get_charset_by_name(set_collation_name,0x410), set_collation == 0)) { my_exit(1); } if ((maria_data_root != default_log_dir) && (opt_log_dir == default_log_dir)) { opt_log_dir = maria_data_root; } if (((check_param._2832_8_ & 0x300000000) != 0) && ((check_param._2832_8_ & 0xfffffffffc71fbcf) == 0)) { opt_ignore_control_file = 1; } return; } if (iVar2 != 4) { my_end(0); /* WARNING: Subroutine does not return */ exit(1); } my_end(); /* WARNING: Subroutine does not return */ exit(0); }
48,773
flux::lexer::Token::toString[abi:cxx11]() const
kvthweatt[P]FluxLang/src/lexer/token.cpp
std::string Token::toString() const { std::stringstream ss; ss << "Token(" << tokenTypeToString(type_) << ", '" << lexeme_ << "', "; // Add source position ss << "line " << start_.line << ", col " << start_.column << ")"; return ss.str(); }
O0
cpp
flux::lexer::Token::toString[abi:cxx11]() const: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %rdi, -0x1f0(%rbp) movq %rdi, %rax movq %rax, -0x1e8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x1e0(%rbp) leaq -0x198(%rbp), %rdi callq 0x7240 leaq -0x188(%rbp), %rdi leaq 0x4b7bb(%rip), %rsi # 0x62c94 callq 0x7330 movq %rax, -0x1d8(%rbp) jmp 0x174e7 movq -0x1e0(%rbp), %rax movl (%rax), %edi callq 0x176a0 movq %rdx, -0x200(%rbp) movq %rax, -0x1f8(%rbp) jmp 0x17505 movq -0x1d8(%rbp), %rdi movq -0x200(%rbp), %rax movq -0x1f8(%rbp), %rcx movq %rcx, -0x1b8(%rbp) movq %rax, -0x1b0(%rbp) movq -0x1b8(%rbp), %rsi movq -0x1b0(%rbp), %rdx callq 0x91b0 movq %rax, -0x208(%rbp) jmp 0x17544 movq -0x208(%rbp), %rdi leaq 0x4b749(%rip), %rsi # 0x62c9b callq 0x7330 movq %rax, -0x210(%rbp) jmp 0x17560 movq -0x210(%rbp), %rdi movq -0x1e0(%rbp), %rax movups 0x8(%rax), %xmm0 movaps %xmm0, -0x1d0(%rbp) movq -0x1d0(%rbp), %rsi movq -0x1c8(%rbp), %rdx callq 0x91b0 movq %rax, -0x218(%rbp) jmp 0x17595 movq -0x218(%rbp), %rdi leaq 0x4b6fc(%rip), %rsi # 0x62c9f callq 0x7330 jmp 0x175aa leaq -0x188(%rbp), %rdi leaq 0x4ad58(%rip), %rsi # 0x62310 callq 0x7330 movq %rax, -0x220(%rbp) jmp 0x175c6 movq -0x220(%rbp), %rdi movq -0x1e0(%rbp), %rax movq 0x18(%rax), %rsi callq 0x7080 movq %rax, -0x228(%rbp) jmp 0x175e6 movq -0x228(%rbp), %rdi leaq 0x4b6af(%rip), %rsi # 0x62ca3 callq 0x7330 movq %rax, -0x230(%rbp) jmp 0x17602 movq -0x230(%rbp), %rdi movq -0x1e0(%rbp), %rax movq 0x20(%rax), %rsi callq 0x7080 movq %rax, -0x238(%rbp) jmp 0x17622 movq -0x238(%rbp), %rdi leaq 0x4cc36(%rip), %rsi # 0x64266 callq 0x7330 jmp 0x17637 movq -0x1f0(%rbp), %rdi leaq -0x198(%rbp), %rsi callq 0x7320 jmp 0x1764c leaq -0x198(%rbp), %rdi callq 0x7280 movq -0x1e8(%rbp), %rax addq $0x240, %rsp # imm = 0x240 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1a0(%rbp) movl %eax, -0x1a4(%rbp) leaq -0x198(%rbp), %rdi callq 0x7280 movq -0x1a0(%rbp), %rdi callq 0x75a0 nopw %cs:(%rax,%rax)
_ZNK4flux5lexer5Token8toStringB5cxx11Ev: push rbp mov rbp, rsp sub rsp, 240h mov [rbp+var_1F0], rdi mov rax, rdi mov [rbp+var_1E8], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_1E0], rax lea rdi, [rbp+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rbp+var_188] lea rsi, aToken; "Token(" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_1D8], rax jmp short $+2 loc_174E7: mov rax, [rbp+var_1E0] mov edi, [rax] call _ZN4flux5lexer5Token17tokenTypeToStringENS0_9TokenTypeE; flux::lexer::Token::tokenTypeToString(flux::lexer::TokenType) mov [rbp+var_200], rdx mov [rbp+var_1F8], rax jmp short $+2 loc_17505: mov rdi, [rbp+var_1D8] mov rax, [rbp+var_200] mov rcx, [rbp+var_1F8] mov [rbp+var_1B8], rcx mov [rbp+var_1B0], rax mov rsi, [rbp+var_1B8] mov rdx, [rbp+var_1B0] call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St17basic_string_viewIS3_S4_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::string_view) mov [rbp+var_208], rax jmp short $+2 loc_17544: mov rdi, [rbp+var_208] lea rsi, asc_62C9B; ", '" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_210], rax jmp short $+2 loc_17560: mov rdi, [rbp+var_210] mov rax, [rbp+var_1E0] movups xmm0, xmmword ptr [rax+8] movaps [rbp+var_1D0], xmm0 mov rsi, qword ptr [rbp+var_1D0] mov rdx, qword ptr [rbp+var_1D0+8] call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St17basic_string_viewIS3_S4_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::string_view) mov [rbp+var_218], rax jmp short $+2 loc_17595: mov rdi, [rbp+var_218] lea rsi, asc_62C9F; "', " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_175AA: lea rdi, [rbp+var_188] lea rsi, aAtLine+5; "line " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_220], rax jmp short $+2 loc_175C6: mov rdi, [rbp+var_220] mov rax, [rbp+var_1E0] mov rsi, [rax+18h] call __ZNSolsEm; std::ostream::operator<<(ulong) mov [rbp+var_228], rax jmp short $+2 loc_175E6: mov rdi, [rbp+var_228] lea rsi, aCol; ", col " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_230], rax jmp short $+2 loc_17602: mov rdi, [rbp+var_230] mov rax, [rbp+var_1E0] mov rsi, [rax+20h] call __ZNSolsEm; std::ostream::operator<<(ulong) mov [rbp+var_238], rax jmp short $+2 loc_17622: mov rdi, [rbp+var_238] lea rsi, aEnteringTempla+1Dh; ")" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_17637: mov rdi, [rbp+var_1F0] lea rsi, [rbp+var_198] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_1764C: lea rdi, [rbp+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rbp+var_1E8] add rsp, 240h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_1A0], rcx mov [rbp+var_1A4], eax lea rdi, [rbp+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rbp+var_1A0] call __Unwind_Resume
long long flux::lexer::Token::toString[abi:cxx11](long long a1, long long *a2) { long long v2; // rax long long v3; // rdx long long v5; // [rsp+8h] [rbp-238h] long long v6; // [rsp+10h] [rbp-230h] long long v7; // [rsp+18h] [rbp-228h] long long v8; // [rsp+20h] [rbp-220h] long long v9; // [rsp+28h] [rbp-218h] long long v10; // [rsp+30h] [rbp-210h] long long v11; // [rsp+38h] [rbp-208h] long long v12; // [rsp+68h] [rbp-1D8h] _BYTE v13[16]; // [rsp+A8h] [rbp-198h] BYREF _BYTE v14[376]; // [rsp+B8h] [rbp-188h] BYREF long long *v15; // [rsp+230h] [rbp-10h] long long v16; // [rsp+238h] [rbp-8h] v16 = a1; v15 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13); v12 = std::operator<<<std::char_traits<char>>(v14, "Token("); v2 = flux::lexer::Token::tokenTypeToString(*(unsigned int *)a2); v11 = std::operator<<<char,std::char_traits<char>>(v12, v2, v3); v10 = std::operator<<<std::char_traits<char>>(v11, ", '"); v9 = std::operator<<<char,std::char_traits<char>>(v10, a2[1], a2[2]); std::operator<<<std::char_traits<char>>(v9, "', "); v8 = std::operator<<<std::char_traits<char>>(v14, "line "); v7 = std::ostream::operator<<(v8, a2[3]); v6 = std::operator<<<std::char_traits<char>>(v7, ", col "); v5 = std::ostream::operator<<(v6, a2[4]); std::operator<<<std::char_traits<char>>(v5, ")"); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v13); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v13); return a1; }
toString[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x240 MOV qword ptr [RBP + -0x1f0],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x1e8],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x1e0],RAX LEA RDI,[RBP + -0x198] CALL 0x00107240 LEA RDI,[RBP + -0x188] LAB_001174d2: LEA RSI,[0x162c94] CALL 0x00107330 MOV qword ptr [RBP + -0x1d8],RAX JMP 0x001174e7 LAB_001174e7: MOV RAX,qword ptr [RBP + -0x1e0] MOV EDI,dword ptr [RAX] CALL 0x001176a0 MOV qword ptr [RBP + -0x200],RDX MOV qword ptr [RBP + -0x1f8],RAX JMP 0x00117505 LAB_00117505: MOV RDI,qword ptr [RBP + -0x1d8] MOV RAX,qword ptr [RBP + -0x200] MOV RCX,qword ptr [RBP + -0x1f8] MOV qword ptr [RBP + -0x1b8],RCX MOV qword ptr [RBP + -0x1b0],RAX MOV RSI,qword ptr [RBP + -0x1b8] MOV RDX,qword ptr [RBP + -0x1b0] CALL 0x001091b0 MOV qword ptr [RBP + -0x208],RAX JMP 0x00117544 LAB_00117544: MOV RDI,qword ptr [RBP + -0x208] LEA RSI,[0x162c9b] CALL 0x00107330 MOV qword ptr [RBP + -0x210],RAX JMP 0x00117560 LAB_00117560: MOV RDI,qword ptr [RBP + -0x210] MOV RAX,qword ptr [RBP + -0x1e0] MOVUPS XMM0,xmmword ptr [RAX + 0x8] MOVAPS xmmword ptr [RBP + -0x1d0],XMM0 MOV RSI,qword ptr [RBP + -0x1d0] MOV RDX,qword ptr [RBP + -0x1c8] CALL 0x001091b0 MOV qword ptr [RBP + -0x218],RAX JMP 0x00117595 LAB_00117595: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[0x162c9f] CALL 0x00107330 JMP 0x001175aa LAB_001175aa: LEA RDI,[RBP + -0x188] LEA RSI,[0x162310] CALL 0x00107330 MOV qword ptr [RBP + -0x220],RAX JMP 0x001175c6 LAB_001175c6: MOV RDI,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RBP + -0x1e0] MOV RSI,qword ptr [RAX + 0x18] CALL 0x00107080 MOV qword ptr [RBP + -0x228],RAX JMP 0x001175e6 LAB_001175e6: MOV RDI,qword ptr [RBP + -0x228] LEA RSI,[0x162ca3] CALL 0x00107330 MOV qword ptr [RBP + -0x230],RAX JMP 0x00117602 LAB_00117602: MOV RDI,qword ptr [RBP + -0x230] MOV RAX,qword ptr [RBP + -0x1e0] MOV RSI,qword ptr [RAX + 0x20] CALL 0x00107080 MOV qword ptr [RBP + -0x238],RAX JMP 0x00117622 LAB_00117622: MOV RDI,qword ptr [RBP + -0x238] LEA RSI,[0x164266] CALL 0x00107330 JMP 0x00117637 LAB_00117637: MOV RDI,qword ptr [RBP + -0x1f0] LEA RSI,[RBP + -0x198] CALL 0x00107320 LAB_0011764a: JMP 0x0011764c LAB_0011764c: LEA RDI,[RBP + -0x198] CALL 0x00107280 MOV RAX,qword ptr [RBP + -0x1e8] ADD RSP,0x240 POP RBP RET
/* flux::lexer::Token::toString[abi:cxx11]() const */ int8 flux::lexer::Token::toString_abi_cxx11_(void) { ostream *poVar1; int4 *in_RSI; int8 in_RDI; int1 auVar2 [16]; stringstream local_1a0 [16]; ostream local_190 [392]; std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 001174d2 to 00117649 has its CatchHandler @ 00117668 */ poVar1 = std::operator<<(local_190,"Token("); auVar2 = tokenTypeToString(*in_RSI); poVar1 = std::operator<<(poVar1,auVar2._0_8_,auVar2._8_8_); poVar1 = std::operator<<(poVar1,", \'"); poVar1 = std::operator<<(poVar1,*(int8 *)(in_RSI + 2),*(int8 *)(in_RSI + 4)); std::operator<<(poVar1,"\', "); poVar1 = std::operator<<(local_190,"line "); poVar1 = (ostream *)std::ostream::operator<<(poVar1,*(ulong *)(in_RSI + 6)); poVar1 = std::operator<<(poVar1,", col "); poVar1 = (ostream *)std::ostream::operator<<(poVar1,*(ulong *)(in_RSI + 8)); std::operator<<(poVar1,")"); std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_1a0); return in_RDI; }
48,774
my_malloc
eloqsql/mysys/my_malloc.c
void *my_malloc(PSI_memory_key key, size_t size, myf my_flags) { my_memory_header *mh; void *point; DBUG_ENTER("my_malloc"); DBUG_PRINT("my",("size: %zu flags: %lu", size, my_flags)); compile_time_assert(sizeof(my_memory_header) <= HEADER_SIZE); if (!(my_flags & (MY_WME | MY_FAE))) my_flags|= my_global_flags; /* Safety */ if (!size) size=1; if (size > SIZE_T_MAX - 1024L*1024L*16L) /* Wrong call */ DBUG_RETURN(0); /* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */ size= ALIGN_SIZE(size); if (DBUG_EVALUATE_IF("simulate_out_of_memory", 1, 0)) mh= NULL; else mh= (my_memory_header*) sf_malloc(size + HEADER_SIZE, my_flags); if (mh == NULL) { my_errno=errno; if (my_flags & MY_FAE) error_handler_hook=fatal_error_handler_hook; if (my_flags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size); if (my_flags & MY_FAE) abort(); point= NULL; } else { int flag= MY_TEST(my_flags & MY_THREAD_SPECIFIC); mh->m_size= size | flag; mh->m_key= PSI_CALL_memory_alloc(key, size, & mh->m_owner); update_malloc_size(size + HEADER_SIZE, flag); point= HEADER_TO_USER(mh); if (my_flags & MY_ZEROFILL) bzero(point, size); else TRASH_ALLOC(point, size); } DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN(point); }
O3
c
my_malloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movl %edi, %r13d xorl %r14d, %r14d movl $0x0, %r15d testb $0x18, %dl jne 0x5d069 leaq 0x359262(%rip), %rax # 0x3b62c8 movq (%rax), %r15 cmpq $-0x1000001, %rbx # imm = 0xFEFFFFFF ja 0x5d149 orq %rdx, %r15 cmpq $0x1, %rbx adcq $0x7, %rbx andq $-0x8, %rbx leaq 0x18(%rbx), %r12 movq %r12, %rdi callq 0x28500 testq %rax, %rax je 0x5d0fc movq %rax, %r14 movl %r13d, %edi movl %r15d, %r13d shrl $0x10, %r13d andl $0x1, %r13d movq %rbx, %rax orq %r13, %rax movq %rax, 0x8(%r14) leaq 0x2d6da8(%rip), %rax # 0x333e60 movq (%rax), %rax movq %rbx, %rsi movq %r14, %rdx callq *0x3e0(%rax) movl %eax, 0x10(%r14) movq %r12, %rdi movl %r13d, %esi callq *0x2d6869(%rip) # 0x333940 addq $0x18, %r14 testb $0x20, %r15b je 0x5d149 movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x281d0 callq 0x28050 movl (%rax), %r14d callq 0x5ecfe movl %r14d, (%rax) testb $0x8, %r15b je 0x5d126 leaq 0x2d687f(%rip), %rax # 0x333998 movq (%rax), %rax leaq 0x2d686d(%rip), %rcx # 0x333990 movq %rax, (%rcx) testb $0x18, %r15b je 0x5d140 movl $0x1044, %esi # imm = 0x1044 movl $0x5, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x5b463 testb $0x8, %r15b jne 0x5d15b xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x281e0
my_malloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r13d, edi xor r14d, r14d mov r15d, 0 test dl, 18h jnz short loc_5D069 lea rax, my_global_flags mov r15, [rax] loc_5D069: cmp rbx, 0FFFFFFFFFEFFFFFFh ja loc_5D149 or r15, rdx cmp rbx, 1 adc rbx, 7 and rbx, 0FFFFFFFFFFFFFFF8h lea r12, [rbx+18h] mov rdi, r12 call _malloc test rax, rax jz short loc_5D0FC mov r14, rax mov edi, r13d mov r13d, r15d shr r13d, 10h and r13d, 1 mov rax, rbx or rax, r13 mov [r14+8], rax lea rax, PSI_server mov rax, [rax] mov rsi, rbx mov rdx, r14 call qword ptr [rax+3E0h] mov [r14+10h], eax mov rdi, r12 mov esi, r13d call cs:update_malloc_size add r14, 18h test r15b, 20h jz short loc_5D149 mov rdi, r14 xor esi, esi mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset loc_5D0FC: call ___errno_location mov r14d, [rax] call _my_thread_var mov [rax], r14d test r15b, 8 jz short loc_5D126 lea rax, fatal_error_handler_hook mov rax, [rax] lea rcx, error_handler_hook mov [rcx], rax loc_5D126: test r15b, 18h jz short loc_5D140 mov esi, 1044h mov edi, 5 mov rdx, rbx xor eax, eax call my_error loc_5D140: test r15b, 8 jnz short loc_5D15B xor r14d, r14d loc_5D149: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5D15B: call _abort
long long my_malloc(unsigned int a1, const char *a2, int a3) { long long v4; // r14 int v5; // r15d unsigned int v6; // r15d unsigned long long v7; // rbx long long v8; // rdi long long v9; // rax long long v10; // r14 int v12; // r14d v4 = 0LL; v5 = 0; if ( (a3 & 0x18) == 0 ) v5 = my_global_flags; if ( (unsigned long long)a2 <= 0xFFFFFFFFFEFFFFFFLL ) { v6 = a3 | v5; v7 = (unsigned long long)&a2[(a2 == 0LL) + 7] & 0xFFFFFFFFFFFFFFF8LL; v8 = v7 + 24; v9 = malloc(v7 + 24); if ( v9 ) { v10 = v9; *(_QWORD *)(v9 + 8) = HIWORD(v6) & 1 | v7; *(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, long long))PSI_server[124])(a1, v7, v9); update_malloc_size(); v4 = v10 + 24; if ( (v6 & 0x20) != 0 ) return memset(v4, 0LL, v7); } else { v12 = *(_DWORD *)__errno_location(v8); *(_DWORD *)my_thread_var(v8, a2) = v12; if ( (v6 & 8) != 0 ) error_handler_hook = fatal_error_handler_hook[0]; if ( (v6 & 0x18) != 0 ) { v8 = 5LL; my_error(5u, 4164LL, v7); } if ( (v6 & 8) != 0 ) abort(v8); return 0LL; } } return v4; }
my_malloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R13D,EDI XOR R14D,R14D MOV R15D,0x0 TEST DL,0x18 JNZ 0x0015d069 LEA RAX,[0x4b62c8] MOV R15,qword ptr [RAX] LAB_0015d069: CMP RBX,-0x1000001 JA 0x0015d149 OR R15,RDX CMP RBX,0x1 ADC RBX,0x7 AND RBX,-0x8 LEA R12,[RBX + 0x18] MOV RDI,R12 CALL 0x00128500 TEST RAX,RAX JZ 0x0015d0fc MOV R14,RAX MOV EDI,R13D MOV R13D,R15D SHR R13D,0x10 AND R13D,0x1 MOV RAX,RBX OR RAX,R13 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x433e60] MOV RAX,qword ptr [RAX] MOV RSI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x3e0] MOV dword ptr [R14 + 0x10],EAX MOV RDI,R12 MOV ESI,R13D CALL qword ptr [0x00433940] ADD R14,0x18 TEST R15B,0x20 JZ 0x0015d149 MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001281d0 LAB_0015d0fc: CALL 0x00128050 MOV R14D,dword ptr [RAX] CALL 0x0015ecfe MOV dword ptr [RAX],R14D TEST R15B,0x8 JZ 0x0015d126 LEA RAX,[0x433998] MOV RAX,qword ptr [RAX] LEA RCX,[0x433990] MOV qword ptr [RCX],RAX LAB_0015d126: TEST R15B,0x18 JZ 0x0015d140 MOV ESI,0x1044 MOV EDI,0x5 MOV RDX,RBX XOR EAX,EAX CALL 0x0015b463 LAB_0015d140: TEST R15B,0x8 JNZ 0x0015d15b XOR R14D,R14D LAB_0015d149: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015d15b: CALL 0x001281e0
void * my_malloc(int4 param_1,ulong param_2,ulong param_3) { int iVar1; int4 uVar2; void *pvVar3; int *piVar4; ulong __n; ulong uVar5; pvVar3 = (void *)0x0; uVar5 = 0; if ((param_3 & 0x18) == 0) { uVar5 = my_global_flags; } if (param_2 < 0xffffffffff000000) { uVar5 = uVar5 | param_3; __n = param_2 + 7 + (ulong)(param_2 == 0) & 0xfffffffffffffff8; pvVar3 = malloc(__n + 0x18); if (pvVar3 == (void *)0x0) { piVar4 = __errno_location(); iVar1 = *piVar4; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if ((uVar5 & 8) != 0) { error_handler_hook = fatal_error_handler_hook; } if ((uVar5 & 0x18) != 0) { my_error(5,0x1044,__n); } if ((uVar5 & 8) != 0) { /* WARNING: Subroutine does not return */ abort(); } pvVar3 = (void *)0x0; } else { *(ulong *)((long)pvVar3 + 8) = __n | (uint)(uVar5 >> 0x10) & 1; uVar2 = (**(code **)(PSI_server + 0x3e0))(param_1,__n,pvVar3); *(int4 *)((long)pvVar3 + 0x10) = uVar2; (*(code *)update_malloc_size)(__n + 0x18); pvVar3 = (void *)((long)pvVar3 + 0x18); if ((uVar5 & 0x20) != 0) { pvVar3 = memset(pvVar3,0,__n); return pvVar3; } } } return pvVar3; }
48,775
crossline_cursor_get
xtate/src/crossline/crossline.c
int crossline_cursor_get(int *pRow, int *pCol) { int i; char buf[32]; printf("\e[6n"); for (i = 0; i < (char)sizeof(buf) - 1; ++i) { buf[i] = (char)crossline_getch(); if ('R' == buf[i]) { break; } } buf[i] = '\0'; if (2 != sscanf(buf, "\e[%d;%dR", pRow, pCol)) { return -1; } (*pRow)--; (*pCol)--; return 0; }
O3
c
crossline_cursor_get: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x45b52(%rip), %rdi # 0x5d364 xorl %r15d, %r15d xorl %eax, %eax callq 0x150b0 callq 0x17722 movb %al, (%rsp,%r15) cmpb $0x52, %al je 0x17838 incq %r15 cmpq $0x1f, %r15 jne 0x1781c movl $0x1f, %r15d movl %r15d, %eax movb $0x0, (%rsp,%rax) leaq 0x45b23(%rip), %rsi # 0x5d369 movq %rsp, %rdi movq %r14, %rdx movq %rbx, %rcx xorl %eax, %eax callq 0x150d0 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x2, %ecx jne 0x17869 decl (%r14) decl (%rbx) xorl %eax, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
crossline_cursor_get: push r15 push r14 push rbx sub rsp, 20h mov rbx, rsi mov r14, rdi lea rdi, a6n; "\x1B[6n" xor r15d, r15d xor eax, eax call _printf loc_1781C: call crossline_getch mov [rsp+r15+38h+var_38], al cmp al, 52h ; 'R' jz short loc_17838 inc r15 cmp r15, 1Fh jnz short loc_1781C mov r15d, 1Fh loc_17838: mov eax, r15d mov [rsp+rax+38h+var_38], 0 lea rsi, aDDr; "\x1B[%d;%dR" mov rdi, rsp mov rdx, r14 mov rcx, rbx xor eax, eax call ___isoc99_sscanf mov ecx, eax mov eax, 0FFFFFFFFh cmp ecx, 2 jnz short loc_17869 dec dword ptr [r14] dec dword ptr [rbx] xor eax, eax loc_17869: add rsp, 20h pop rbx pop r14 pop r15 retn
long long crossline_cursor_get(_DWORD *a1, _DWORD *a2) { long long v2; // r15 char v3; // al int v4; // ecx long long result; // rax _BYTE v6[56]; // [rsp+0h] [rbp-38h] BYREF v2 = 0LL; printf("\x1B[6n"); while ( 1 ) { v3 = crossline_getch(); v6[v2] = v3; if ( v3 == 82 ) break; if ( ++v2 == 31 ) { LODWORD(v2) = 31; break; } } v6[(unsigned int)v2] = 0; v4 = __isoc99_sscanf(v6, "\x1B[%d;%dR", a1, a2); result = 0xFFFFFFFFLL; if ( v4 == 2 ) { --*a1; --*a2; return 0LL; } return result; }
crossline_cursor_get: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RSI MOV R14,RDI LEA RDI,[0x15d364] XOR R15D,R15D XOR EAX,EAX CALL 0x001150b0 LAB_0011781c: CALL 0x00117722 MOV byte ptr [RSP + R15*0x1],AL CMP AL,0x52 JZ 0x00117838 INC R15 CMP R15,0x1f JNZ 0x0011781c MOV R15D,0x1f LAB_00117838: MOV EAX,R15D MOV byte ptr [RSP + RAX*0x1],0x0 LEA RSI,[0x15d369] MOV RDI,RSP MOV RDX,R14 MOV RCX,RBX XOR EAX,EAX CALL 0x001150d0 MOV ECX,EAX MOV EAX,0xffffffff CMP ECX,0x2 JNZ 0x00117869 DEC dword ptr [R14] DEC dword ptr [RBX] XOR EAX,EAX LAB_00117869: ADD RSP,0x20 POP RBX POP R14 POP R15 RET
int8 crossline_cursor_get(int *param_1,int *param_2) { char cVar1; int iVar2; int8 uVar3; ulong uVar4; char local_38 [32]; uVar4 = 0; printf("\x1b[6n"); do { cVar1 = crossline_getch(); local_38[uVar4] = cVar1; if (cVar1 == 'R') goto LAB_00117838; uVar4 = uVar4 + 1; } while (uVar4 != 0x1f); uVar4 = 0x1f; LAB_00117838: local_38[uVar4 & 0xffffffff] = '\0'; iVar2 = __isoc99_sscanf(local_38,&DAT_0015d369,param_1,param_2); uVar3 = 0xffffffff; if (iVar2 == 2) { *param_1 = *param_1 + -1; *param_2 = *param_2 + -1; uVar3 = 0; } return uVar3; }
48,776
my_strnxfrm_simple_nopad
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_nopad(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *d0= dst; dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights, src, srclen); return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, d0 + dstlen, nweights, flags, 0); }
O0
c
my_strnxfrm_simple_nopad: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x95f40 movq %rax, %rcx movq -0x40(%rbp), %rax addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x38(%rbp), %rcx addq -0x18(%rbp), %rcx movl -0x1c(%rbp), %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x962a0 addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_simple_nopad: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov r8, [rbp+var_28] mov r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_simple_internal mov rcx, rax mov rax, [rbp+var_40] add rax, rcx mov [rbp+var_10], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] mov rdx, [rbp+var_10] mov rcx, [rbp+var_38] add rcx, [rbp+var_18] mov r8d, [rbp+var_1C] mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+50h+var_50], 0 call my_strxfrm_pad_desc_and_reverse_nopad add rsp, 50h pop rbp retn
long long my_strnxfrm_simple_nopad( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned int a4, unsigned __int8 *a5, unsigned long long a6, int a7) { _BYTE *v7; // rax unsigned int v9; // [rsp+34h] [rbp-1Ch] BYREF unsigned long long v10; // [rsp+38h] [rbp-18h] unsigned __int8 *v11; // [rsp+40h] [rbp-10h] long long v12; // [rsp+48h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v7 = my_strnxfrm_simple_internal(a1, a2, a3, &v9, a5, a6); v11 = &a2[(_QWORD)v7]; return my_strxfrm_pad_desc_and_reverse_nopad(v12, (_DWORD)a2, (int)v7 + (int)a2, (int)v10 + (int)a2, v9, a7, 0); }
my_strnxfrm_simple_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x00195f40 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] ADD RCX,qword ptr [RBP + -0x18] MOV R8D,dword ptr [RBP + -0x1c] MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x001962a0 ADD RSP,0x50 POP RBP RET
void my_strnxfrm_simple_nopad (int8 param_1,long param_2,long param_3,int4 param_4,int8 param_5, int8 param_6,int4 param_7) { int4 local_24; long local_20; long local_18; int8 local_10; local_24 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_18 = my_strnxfrm_simple_internal(param_1,param_2,param_3,&local_24,param_5,param_6); local_18 = param_2 + local_18; my_strxfrm_pad_desc_and_reverse_nopad (local_10,param_2,local_18,param_2 + local_20,local_24,param_7,0); return; }
48,777
google::protobuf::compiler::csharp::GetEnumValueName(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/compiler/csharp/csharp_helpers.cc
std::string GetEnumValueName(const std::string& enum_name, const std::string& enum_value_name) { std::string stripped = TryRemovePrefix(enum_name, enum_value_name); std::string result = ShoutyToPascalCase(stripped); // Just in case we have an enum name of FOO and a value of FOO_2... make sure the returned // string is a valid identifier. if (ascii_isdigit(result[0])) { result = "_" + result; } return result; }
O3
cpp
google::protobuf::compiler::csharp::GetEnumValueName(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&): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x3c785 movq %rbx, %rdi movq %r14, %rsi callq 0x3c6b6 movq (%rbx), %rax movb (%rax), %al addb $-0x30, %al cmpb $0x9, %al ja 0x3c959 leaq 0x16d0a7(%rip), %rsi # 0x1a99d1 leaq 0x8(%rsp), %rdi movq %rbx, %rdx callq 0x328fc leaq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x1f5d0 movq (%r14), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x3c959 callq 0x1f4a0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3c96c callq 0x1f4a0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0x3c990 callq 0x1f4a0 jmp 0x3c990 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3c9a3 callq 0x1f4a0 movq %r14, %rdi callq 0x1f860
_ZN6google8protobuf8compiler6csharp16GetEnumValueNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_: push r14 push rbx sub rsp, 48h mov rbx, rdi lea r14, [rsp+58h+var_30] mov rdi, r14; int call _ZN6google8protobuf8compiler6csharp15TryRemovePrefixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_; google::protobuf::compiler::csharp::TryRemovePrefix(std::string const&,std::string const&) mov rdi, rbx mov rsi, r14 call _ZN6google8protobuf8compiler6csharp18ShoutyToPascalCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::csharp::ShoutyToPascalCase(std::string const&) mov rax, [rbx] mov al, [rax] add al, 0D0h cmp al, 9 ja short loc_3C959 lea rsi, aPb_0+2; "_" lea rdi, [rsp+58h+var_50] mov rdx, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea r14, [rsp+58h+var_50] mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_3C959 call __ZdlPv; operator delete(void *) loc_3C959: lea rax, [rsp+58h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3C96C call __ZdlPv; operator delete(void *) loc_3C96C: mov rax, rbx add rsp, 48h pop rbx pop r14 retn mov r14, rax mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_3C990 call __ZdlPv; operator delete(void *) jmp short loc_3C990 mov r14, rax loc_3C990: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3C9A3 call __ZdlPv; operator delete(void *) loc_3C9A3: mov rdi, r14 call __Unwind_Resume
_QWORD * google::protobuf::compiler::csharp::GetEnumValueName(_QWORD *a1, _QWORD *a2, long long a3) { void *v4[2]; // [rsp+8h] [rbp-50h] BYREF char v5; // [rsp+18h] [rbp-40h] BYREF int v6[4]; // [rsp+28h] [rbp-30h] BYREF char v7; // [rsp+38h] [rbp-20h] BYREF google::protobuf::compiler::csharp::TryRemovePrefix(v6, a2, a3); google::protobuf::compiler::csharp::ShoutyToPascalCase((long long)a1, v6); if ( (unsigned __int8)(*(_BYTE *)*a1 - 48) <= 9u ) { std::operator+<char>((long long)v4, (long long)"_", a1); std::string::operator=(a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0]); } if ( *(char **)v6 != &v7 ) operator delete(*(void **)v6); return a1; }
GetEnumValueName: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x0013c785 LAB_0013c90d: MOV RDI,RBX MOV RSI,R14 CALL 0x0013c6b6 MOV RAX,qword ptr [RBX] MOV AL,byte ptr [RAX] ADD AL,0xd0 CMP AL,0x9 JA 0x0013c959 LAB_0013c923: LEA RSI,[0x2a99d1] LEA RDI,[RSP + 0x8] MOV RDX,RBX CALL 0x001328fc LAB_0013c937: LEA R14,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 CALL 0x0011f5d0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0013c959 CALL 0x0011f4a0 LAB_0013c959: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013c96c CALL 0x0011f4a0 LAB_0013c96c: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET
/* google::protobuf::compiler::csharp::GetEnumValueName(std::__cxx11::string const&, std::__cxx11::string const&) */ csharp * __thiscall google::protobuf::compiler::csharp::GetEnumValueName(csharp *this,string *param_1,string *param_2) { int1 *local_50 [2]; int1 local_40 [16]; int1 *local_30 [2]; int1 local_20 [16]; TryRemovePrefix((csharp *)local_30,param_1,param_2); /* try { // try from 0013c90d to 0013c917 has its CatchHandler @ 0013c98d */ ShoutyToPascalCase(this,(string *)local_30); if ((byte)(**(char **)this - 0x30U) < 10) { /* try { // try from 0013c923 to 0013c936 has its CatchHandler @ 0013c977 */ std::operator+((char *)local_50,(string *)&DAT_002a99d1); std::__cxx11::string::operator=((string *)this,(string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0]); } } if (local_30[0] != local_20) { operator_delete(local_30[0]); } return this; }
48,778
my_strnncoll_binary
eloqsql/strings/ctype-bin.c
static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len=MY_MIN(slen,tlen); int cmp= memcmp(s,t,len); return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen); }
O0
c
my_strnncoll_binary: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %r9b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movb %al, -0x29(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x3d3d6 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x3d3de movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x24130 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) je 0x3d408 movl -0x3c(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x3d42e movsbl -0x29(%rbp), %eax cmpl $0x0, %eax je 0x3d41b movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x3d423 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax subq -0x28(%rbp), %rax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
my_strnncoll_binary: push rbp mov rbp, rsp sub rsp, 60h mov al, r9b 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 [rbp+var_29], al mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_3D3D6 mov rax, [rbp+var_18] mov [rbp+var_48], rax jmp short loc_3D3DE loc_3D3D6: mov rax, [rbp+var_28] mov [rbp+var_48], rax loc_3D3DE: mov rax, [rbp+var_48] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_38] call _memcmp mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jz short loc_3D408 mov eax, [rbp+var_3C] mov [rbp+var_4C], eax jmp short loc_3D42E loc_3D408: movsx eax, [rbp+var_29] cmp eax, 0 jz short loc_3D41B mov rax, [rbp+var_38] mov [rbp+var_58], rax jmp short loc_3D423 loc_3D41B: mov rax, [rbp+var_18] mov [rbp+var_58], rax loc_3D423: mov rax, [rbp+var_58] sub rax, [rbp+var_28] mov [rbp+var_4C], eax loc_3D42E: mov eax, [rbp+var_4C] add rsp, 60h pop rbp retn
long long my_strnncoll_binary( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, char a6) { int v7; // [rsp+8h] [rbp-58h] unsigned long long v9; // [rsp+18h] [rbp-48h] unsigned int v10; // [rsp+24h] [rbp-3Ch] int v12; // [rsp+38h] [rbp-28h] int v13; // [rsp+48h] [rbp-18h] v13 = a3; v12 = a5; if ( a3 >= a5 ) v9 = a5; else v9 = a3; v10 = memcmp(a2, a4, v9); if ( v10 ) { return v10; } else { if ( a6 ) v7 = v9; else v7 = v13; return (unsigned int)(v7 - v12); } }
my_strnncoll_binary: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,R9B 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 byte ptr [RBP + -0x29],AL MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x0013d3d6 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX JMP 0x0013d3de LAB_0013d3d6: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX LAB_0013d3de: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00124130 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0013d408 MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x0013d42e LAB_0013d408: MOVSX EAX,byte ptr [RBP + -0x29] CMP EAX,0x0 JZ 0x0013d41b MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX JMP 0x0013d423 LAB_0013d41b: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX LAB_0013d423: MOV RAX,qword ptr [RBP + -0x58] SUB RAX,qword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4c],EAX LAB_0013d42e: MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x60 POP RBP RET
int my_strnncoll_binary(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, char param_6) { ulong local_60; int local_54; size_t local_50; local_50 = param_5; if (param_3 < param_5) { local_50 = param_3; } local_54 = memcmp(param_2,param_4,local_50); if (local_54 == 0) { local_60 = param_3; if (param_6 != '\0') { local_60 = local_50; } local_54 = (int)local_60 - (int)param_5; } return local_54; }
48,779
crossline_color_set
xtate/src/crossline/crossline.c
void crossline_color_set(crossline_color_e color) { if (!isatty(STDOUT_FILENO)) { return; } printf("\033[m"); if (CROSSLINE_FGCOLOR_DEFAULT != (color & CROSSLINE_FGCOLOR_MASK)) { printf("\033[%dm", 29 + (color & CROSSLINE_FGCOLOR_MASK) + ((color & CROSSLINE_FGCOLOR_BRIGHT) ? 60 : 0)); } if (CROSSLINE_BGCOLOR_DEFAULT != (color & CROSSLINE_BGCOLOR_MASK)) { printf("\033[%dm", 39 + ((color & CROSSLINE_BGCOLOR_MASK) >> 8) + ((color & CROSSLINE_BGCOLOR_BRIGHT) ? 60 : 0)); } if (color & CROSSLINE_UNDERLINE) { printf("\033[4m"); } }
O3
c
crossline_color_set: pushq %rbx movl %edi, %ebx movl $0x1, %edi callq 0x15a00 testl %eax, %eax je 0x1795f leaq 0x45a96(%rip), %rdi # 0x5d39b xorl %eax, %eax callq 0x150b0 movl %ebx, %eax andl $0x7f, %eax je 0x17930 movsbl %bl, %ecx shrl $0x7, %ecx andl $0x3c, %ecx leal (%rax,%rcx), %esi addl $0x1d, %esi leaq 0x45a76(%rip), %rdi # 0x5d39f xorl %eax, %eax callq 0x150b0 movl %ebx, %eax andl $0x7f00, %eax # imm = 0x7F00 je 0x17959 shrl $0x8, %eax movswl %bx, %ecx shrl $0xf, %ecx andl $0x3c, %ecx leal (%rax,%rcx), %esi addl $0x27, %esi leaq 0x45a4d(%rip), %rdi # 0x5d39f xorl %eax, %eax callq 0x150b0 btl $0x10, %ebx jb 0x17961 popq %rbx retq leaq 0x45a3d(%rip), %rdi # 0x5d3a5 xorl %eax, %eax popq %rbx jmp 0x150b0
crossline_color_set: push rbx mov ebx, edi mov edi, 1 call _isatty test eax, eax jz short loc_1795F lea rdi, aM; "\x1B[m" xor eax, eax call _printf mov eax, ebx and eax, 7Fh jz short loc_17930 movsx ecx, bl shr ecx, 7 and ecx, 3Ch lea esi, [rax+rcx] add esi, 1Dh lea rdi, aDm; "\x1B[%dm" xor eax, eax call _printf loc_17930: mov eax, ebx and eax, 7F00h jz short loc_17959 shr eax, 8 movsx ecx, bx shr ecx, 0Fh and ecx, 3Ch lea esi, [rax+rcx] add esi, 27h ; ''' lea rdi, aDm; "\x1B[%dm" xor eax, eax call _printf loc_17959: bt ebx, 10h jb short loc_17961 loc_1795F: pop rbx retn loc_17961: lea rdi, a4m; "\x1B[4m" xor eax, eax pop rbx jmp _printf
long long crossline_color_set(int a1) { long long result; // rax result = isatty(1LL); if ( (_DWORD)result ) { printf("\x1B[m"); if ( (a1 & 0x7F) != 0 ) printf("\x1B[%dm", (a1 & 0x7F) + (((unsigned int)(char)a1 >> 7) & 0x3C) + 29); result = a1 & 0x7F00; if ( (a1 & 0x7F00) != 0 ) result = printf("\x1B[%dm", ((unsigned int)result >> 8) + (((unsigned int)(__int16)a1 >> 15) & 0x3C) + 39); if ( (a1 & 0x10000) != 0 ) return printf("\x1B[4m"); } return result; }
crossline_color_set: PUSH RBX MOV EBX,EDI MOV EDI,0x1 CALL 0x00115a00 TEST EAX,EAX JZ 0x0011795f LEA RDI,[0x15d39b] XOR EAX,EAX CALL 0x001150b0 MOV EAX,EBX AND EAX,0x7f JZ 0x00117930 MOVSX ECX,BL SHR ECX,0x7 AND ECX,0x3c LEA ESI,[RAX + RCX*0x1] ADD ESI,0x1d LEA RDI,[0x15d39f] XOR EAX,EAX CALL 0x001150b0 LAB_00117930: MOV EAX,EBX AND EAX,0x7f00 JZ 0x00117959 SHR EAX,0x8 MOVSX ECX,BX SHR ECX,0xf AND ECX,0x3c LEA ESI,[RAX + RCX*0x1] ADD ESI,0x27 LEA RDI,[0x15d39f] XOR EAX,EAX CALL 0x001150b0 LAB_00117959: BT EBX,0x10 JC 0x00117961 LAB_0011795f: POP RBX RET LAB_00117961: LEA RDI,[0x15d3a5] XOR EAX,EAX POP RBX JMP 0x001150b0
void crossline_color_set(uint param_1) { int iVar1; iVar1 = isatty(1); if (iVar1 != 0) { printf("\x1b[m"); if ((param_1 & 0x7f) != 0) { printf("\x1b[%dm",(ulong)((param_1 & 0x7f) + ((uint)(int)(char)param_1 >> 7 & 0x3c) + 0x1d)); } if ((param_1 & 0x7f00) != 0) { printf("\x1b[%dm", (ulong)(((param_1 & 0x7f00) >> 8) + ((uint)(int)(short)param_1 >> 0xf & 0x3c) + 0x27)); } if ((param_1 >> 0x10 & 1) != 0) { printf("\x1b[4m"); return; } } return; }
48,780
minja::TextNode::~TextNode()
monkey531[P]llama/common/minja.hpp
TextNode(const Location & location, const std::string& t) : TemplateNode(location), text(t) {}
O1
cpp
minja::TextNode::~TextNode(): pushq %rbx movq %rdi, %rbx leaq 0x8ee83(%rip), %rax # 0x12e228 addq $0x10, %rax movq %rax, (%rdi) movq 0x20(%rdi), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0x9f3c4 movq (%rax), %rsi incq %rsi callq 0x1b8f0 leaq 0x8ec0d(%rip), %rax # 0x12dfd8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x9f3e0 callq 0x6e1aa movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1b8f0
_ZN5minja8TextNodeD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja8TextNodeE; `vtable for'minja::TextNode add rax, 10h mov [rdi], rax mov rdi, [rdi+20h]; void * lea rax, [rbx+30h] cmp rdi, rax jz short loc_9F3C4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9F3C4: lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_9F3E0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9F3E0: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::TextNode::~TextNode(minja::TextNode *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::TextNode + 2; v2 = (char *)*((_QWORD *)this + 4); if ( v2 != (char *)this + 48 ) operator delete(v2, *((_QWORD *)this + 6) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateNode + 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); }
~TextNode: PUSH RBX MOV RBX,RDI LEA RAX,[0x22e228] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x20] LEA RAX,[RBX + 0x30] CMP RDI,RAX JZ 0x0019f3c4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8f0 LAB_0019f3c4: LEA RAX,[0x22dfd8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0019f3e0 CALL 0x0016e1aa LAB_0019f3e0: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011b8f0
/* minja::TextNode::~TextNode() */ void __thiscall minja::TextNode::~TextNode(TextNode *this) { *(int ***)this = &PTR_do_render_0022e238; if (*(TextNode **)(this + 0x20) != this + 0x30) { operator_delete(*(TextNode **)(this + 0x20),*(long *)(this + 0x30) + 1); } *(int ***)this = &PTR___cxa_pure_virtual_0022dfe8; 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; }
48,781
minja::TextNode::~TextNode()
monkey531[P]llama/common/minja.hpp
TextNode(const Location & location, const std::string& t) : TemplateNode(location), text(t) {}
O3
cpp
minja::TextNode::~TextNode(): pushq %rbx movq %rdi, %rbx leaq 0x8d5c1(%rip), %rax # 0x12b228 addq $0x10, %rax movq %rax, (%rdi) movq 0x20(%rdi), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0x9dc86 movq (%rax), %rsi incq %rsi callq 0x1a8f0 leaq 0x8d34b(%rip), %rax # 0x12afd8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x9dca3 popq %rbx jmp 0x6d9b6 popq %rbx retq nop
_ZN5minja8TextNodeD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja8TextNodeE; `vtable for'minja::TextNode add rax, 10h mov [rdi], rax mov rdi, [rdi+20h]; void * lea rax, [rbx+30h] cmp rdi, rax jz short loc_9DC86 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9DC86: lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_9DCA3 pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DCA3: pop rbx retn
void minja::TextNode::~TextNode(minja::TextNode *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::TextNode + 2; v2 = (char *)*((_QWORD *)this + 4); if ( v2 != (char *)this + 48 ) operator delete(v2, *((_QWORD *)this + 6) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateNode + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~TextNode: PUSH RBX MOV RBX,RDI LEA RAX,[0x22b228] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x20] LEA RAX,[RBX + 0x30] CMP RDI,RAX JZ 0x0019dc86 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a8f0 LAB_0019dc86: LEA RAX,[0x22afd8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0019dca3 POP RBX JMP 0x0016d9b6 LAB_0019dca3: POP RBX RET
/* minja::TextNode::~TextNode() */ void __thiscall minja::TextNode::~TextNode(TextNode *this) { *(int ***)this = &PTR_do_render_0022b238; if (*(TextNode **)(this + 0x20) != this + 0x30) { operator_delete(*(TextNode **)(this + 0x20),*(long *)(this + 0x30) + 1); } *(int ***)this = &PTR___cxa_pure_virtual_0022afe8; 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)); return; } return; }
48,782
QueryCallback::WithChainingCallback(std::function<void (QueryCallback&, std::shared_ptr<ResultSet>)>&&)
SylCore-WoTLK/src/server/database/Database/QueryCallback.cpp
QueryCallback&& QueryCallback::WithChainingCallback(std::function<void(QueryCallback&, QueryResult)>&& callback) { ASSERT(!_callbacks.empty() || !_isPrepared, "Attempted to set callback function for string query on a prepared async query"); _callbacks.emplace(std::move(callback)); return std::move(*this); }
O3
cpp
QueryCallback::WithChainingCallback(std::function<void (QueryCallback&, std::shared_ptr<ResultSet>)>&&): pushq %rbx subq $0x80, %rsp movq %rsi, %rdx movq %rdi, %rbx addq $0x18, %rdi cmpq %rdi, 0x18(%rbx) jne 0x77e52 cmpb $0x1, 0x10(%rbx) je 0x77e66 movq %rdi, %rsi callq 0x78a5c movq %rbx, %rax addq $0x80, %rsp popq %rbx retq leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0xc7c65 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x50(%rsp) movq %rax, 0x58(%rsp) movq $0x23, 0x40(%rsp) leaq 0x857c9(%rip), %rax # 0xfd65d movq %rax, 0x48(%rsp) movq $0x4d, 0x30(%rsp) leaq 0x857d8(%rip), %rax # 0xfd681 movq %rax, 0x38(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, 0x20(%rsp) movups 0x40(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x50(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x85718(%rip), %rsi # 0xfd5ea leaq 0x8576f(%rip), %r8 # 0xfd648 movl $0x5d, %edi movl $0x14, %ecx movl $0xa9, %edx callq 0xc7130 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x77f0b movq 0x70(%rsp), %rsi incq %rsi callq 0xd32e8 movq %rbx, %rdi callq 0x1bba0 nop
_ZN13QueryCallback20WithChainingCallbackEOSt8functionIFvRS_St10shared_ptrI9ResultSetEEE: push rbx sub rsp, 80h mov rdx, rsi mov rbx, rdi add rdi, 18h cmp [rbx+18h], rdi jnz short loc_77E52 cmp byte ptr [rbx+10h], 1 jz short loc_77E66 loc_77E52: mov rsi, rdi call _ZNSt7__cxx114listIN13QueryCallback17QueryCallbackDataESaIS2_EE9_M_insertIJSt8functionIFvRS1_St10shared_ptrI9ResultSetEEEEEEvSt14_List_iteratorIS2_EDpOT_; std::list<QueryCallback::QueryCallbackData>::_M_insert<std::function<void ()(QueryCallback&,std::shared_ptr<ResultSet>)>>(std::_List_iterator<QueryCallback::QueryCallbackData>,std::function<void ()(QueryCallback&,std::shared_ptr<ResultSet>)> &&) mov rax, rbx add rsp, 80h pop rbx retn loc_77E66: lea rbx, [rsp+88h+var_28] mov rdi, rbx call _Z12GetDebugInfoB5cxx11v; GetDebugInfo(void) mov rax, [rbx] mov rcx, [rbx+8] mov qword ptr [rsp+88h+var_38], rcx mov qword ptr [rsp+88h+var_38+8], rax mov qword ptr [rsp+88h+var_48], 23h ; '#' lea rax, aCallbacksEmpty; "!_callbacks.empty() || !_isPrepared" mov qword ptr [rsp+88h+var_48+8], rax mov qword ptr [rsp+88h+var_58], 4Dh ; 'M' lea rax, aAttemptedToSet; "Attempted to set callback function for "... mov qword ptr [rsp+88h+var_58+8], rax movups xmm0, [rsp+88h+var_58] movups [rsp+88h+var_68], xmm0 movups xmm0, [rsp+88h+var_48] movups [rsp+88h+var_78], xmm0 movups xmm0, [rsp+88h+var_38] movups [rsp+88h+var_88], xmm0 lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/SylCor"... lea r8, aWithchainingca; "WithChainingCallback" mov edi, 5Dh ; ']' mov ecx, 14h mov edx, 0A9h call _ZN5Acore6AssertESt17basic_string_viewIcSt11char_traitsIcEEjS3_S3_S3_S3_; Acore::Assert(std::string_view,uint,std::string_view,std::string_view,std::string_view,std::string_view) mov rbx, rax lea rax, [rsp+88h+var_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_77F0B mov rsi, [rsp+88h+var_18] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_77F0B: mov rdi, rbx call __Unwind_Resume
long long QueryCallback::WithChainingCallback(long long a1, long long a2) { long long v3; // rdi long long v5; // r9 _QWORD v6[2]; // [rsp+60h] [rbp-28h] BYREF v3 = a1 + 24; if ( *(_QWORD *)(a1 + 24) == v3 && *(_BYTE *)(a1 + 16) == 1 ) { GetDebugInfo[abi:cxx11](v6); Acore::Assert( 93LL, "/workspace/llm4binary/github2025/SylCore-WoTLK/src/server/database/Database/QueryCallback.cpp", 169LL, 20LL, "WithChainingCallback", v5, v6[1], v6[0], 35LL, "!_callbacks.empty() || !_isPrepared", 77LL, "Attempted to set callback function for string query on a prepared async query"); } std::list<QueryCallback::QueryCallbackData>::_M_insert<std::function<void ()(QueryCallback&,std::shared_ptr<ResultSet>)>>( v3, v3, a2); return a1; }
WithChainingCallback: PUSH RBX SUB RSP,0x80 MOV RDX,RSI MOV RBX,RDI ADD RDI,0x18 CMP qword ptr [RBX + 0x18],RDI JNZ 0x00177e52 CMP byte ptr [RBX + 0x10],0x1 JZ 0x00177e66 LAB_00177e52: MOV RSI,RDI CALL 0x00178a5c MOV RAX,RBX ADD RSP,0x80 POP RBX RET LAB_00177e66: LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x001c7c65 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x40],0x23 LEA RAX,[0x1fd65d] MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x30],0x4d LEA RAX,[0x1fd681] MOV qword ptr [RSP + 0x38],RAX LAB_00177eae: MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP + 0x20],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x1fd5ea] LEA R8,[0x1fd648] MOV EDI,0x5d MOV ECX,0x14 MOV EDX,0xa9 CALL 0x001c7130 LAB_00177eed: MOV RBX,RAX LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00177f0b MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001d32e8 LAB_00177f0b: MOV RDI,RBX CALL 0x0011bba0
/* QueryCallback::WithChainingCallback(std::function<void (QueryCallback&, std::shared_ptr<ResultSet>)>&&) */ QueryCallback * __thiscall QueryCallback::WithChainingCallback(QueryCallback *this,function *param_1) { int8 uVar1; list<QueryCallback::QueryCallbackData,std::allocator<QueryCallback::QueryCallbackData>> *plVar2; int8 in_R9; int4 uStack_30; long *local_28; int4 local_20; long local_18 [2]; plVar2 = (list<QueryCallback::QueryCallbackData,std::allocator<QueryCallback::QueryCallbackData>> *)(this + 0x18); if ((*(list<QueryCallback::QueryCallbackData,std::allocator<QueryCallback::QueryCallbackData>> **) (this + 0x18) == plVar2) && (this[0x10] == (QueryCallback)0x1)) { GetDebugInfo_abi_cxx11_(); /* try { // try from 00177eae to 00177eec has its CatchHandler @ 00177eed */ uStack_30 = SUB84(local_28,0); uVar1 = Acore::Assert(0x5d, "/workspace/llm4binary/github2025/SylCore-WoTLK/src/server/database/Database/QueryCallback.cpp" ,0xa9,0x14,"WithChainingCallback",in_R9,local_20,uStack_30,0x23, "!_callbacks.empty() || !_isPrepared",0x4d, "Attempted to set callback function for string query on a prepared async query" ); /* catch() { ... } // from try @ 00177eae with catch @ 00177eed */ if (local_28 != local_18) { operator_delete(local_28,local_18[0] + 1); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar1); } std::__cxx11:: list<QueryCallback::QueryCallbackData,std::allocator<QueryCallback::QueryCallbackData>>:: _M_insert<std::function<void(QueryCallback&,std::shared_ptr<ResultSet>)>>(plVar2,plVar2,param_1); return this; }
48,783
mjv_makeLights
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_vis_visualize.c
void mjv_makeLights(const mjModel* m, const mjData* d, mjvScene* scn) { mjvLight* thislight; // clear counter scn->nlight = 0; // headlight if (m->vis.headlight.active) { // get pointer thislight = scn->lights; // set default properties memset(thislight, 0, sizeof(mjvLight)); thislight->headlight = 1; thislight->directional = 1; thislight->castshadow = 0; // compute head position and gaze direction in model space mjtNum hpos[3], hfwd[3]; mjv_cameraInModel(hpos, hfwd, NULL, scn); mju_n2f(thislight->pos, hpos, 3); mju_n2f(thislight->dir, hfwd, 3); // copy colors f2f(thislight->ambient, m->vis.headlight.ambient, 3); f2f(thislight->diffuse, m->vis.headlight.diffuse, 3); f2f(thislight->specular, m->vis.headlight.specular, 3); // advance counter scn->nlight++; } // remaining lights for (int i=0; i < m->nlight && scn->nlight < mjMAXLIGHT; i++) { if (m->light_active[i]) { // get pointer thislight = scn->lights + scn->nlight; // copy properties memset(thislight, 0, sizeof(mjvLight)); thislight->directional = m->light_directional[i]; thislight->castshadow = m->light_castshadow[i]; thislight->bulbradius = m->light_bulbradius[i]; if (!thislight->directional) { f2f(thislight->attenuation, m->light_attenuation+3*i, 3); thislight->exponent = m->light_exponent[i]; thislight->cutoff = m->light_cutoff[i]; } // copy colors f2f(thislight->ambient, m->light_ambient+3*i, 3); f2f(thislight->diffuse, m->light_diffuse+3*i, 3); f2f(thislight->specular, m->light_specular+3*i, 3); // copy position and direction mju_n2f(thislight->pos, d->light_xpos+3*i, 3); mju_n2f(thislight->dir, d->light_xdir+3*i, 3); // advance counter scn->nlight++; } } }
O3
c
mjv_makeLights: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r8 movq %rsi, 0x18(%rsp) movq %rdi, %r15 movl $0x0, 0xb0(%rdx) cmpl $0x0, 0x2d4(%rdi) movq %rdx, 0x8(%rsp) je 0xb4e21 leaq 0xb4(%r8), %r12 vxorps %xmm0, %xmm0, %xmm0 vmovups %ymm0, 0xec(%r8) vmovups %ymm0, 0xd4(%r8) vmovups %ymm0, 0xb4(%r8) movw $0x101, 0x104(%r8) # imm = 0x101 leaq 0x40(%rsp), %r13 leaq 0x20(%rsp), %rbp movq %r13, %rdi movq %rbp, %rsi xorl %edx, %edx movq %r8, %rcx vzeroupper callq 0x2e510 movq %r12, %rdi movq %r13, %rsi movl $0x3, %edx callq 0x2e550 movq 0x8(%rsp), %rax leaq 0xc0(%rax), %rdi movq %rbp, %rsi movl $0x3, %edx callq 0x2e550 movq 0x8(%rsp), %r8 movl 0x2b8(%r15), %eax movl %eax, 0xe8(%r8) movq 0x2b0(%r15), %rax movq %rax, 0xe0(%r8) movq 0x2bc(%r15), %rax movq %rax, 0xec(%r8) movl 0x2c4(%r15), %eax movl %eax, 0xf4(%r8) movl 0x2d0(%r15), %eax movl %eax, 0x100(%r8) movq 0x2c8(%r15), %rax movq %rax, 0xf8(%r8) movl 0xb0(%r8), %eax incl %eax movl %eax, 0xb0(%r8) jmp 0xb4e23 xorl %eax, %eax movl 0x30(%r15), %ecx testl %ecx, %ecx jle 0xb4fad leaq 0xb4(%r8), %rdx movq %rdx, 0x10(%rsp) xorl %r14d, %r14d xorl %ebx, %ebx movq 0x18(%rsp), %rbp cmpl $0x64, %eax jge 0xb4fad movq 0x8e0(%r15), %rdx cmpb $0x0, (%rdx,%rbx) je 0xb4f9a cltq imulq $0x58, %rax, %rax movq 0x10(%rsp), %rsi leaq (%rsi,%rax), %r12 vxorps %xmm0, %xmm0, %xmm0 vmovups %ymm0, 0x38(%rsi,%rax) vmovups %ymm0, 0x20(%rsi,%rax) vmovups %ymm0, (%rsi,%rax) movq 0x8c8(%r15), %rcx movb (%rcx,%rbx), %cl movb %cl, 0x51(%rsi,%rax) movq 0x8d0(%r15), %rdx movb (%rdx,%rbx), %dl movb %dl, 0x52(%rsi,%rax) movq 0x8d8(%r15), %rdx vmovss (%rdx,%rbx,4), %xmm0 vmovss %xmm0, 0x54(%rsi,%rax) movq %r14, %r13 testb %cl, %cl jne 0xb4efc movq 0x910(%r15), %rax leaq (%rbx,%rbx,2), %r13 movl 0x8(%rax,%r14,4), %ecx movl %ecx, 0x20(%r12) movq (%rax,%r14,4), %rax movq %rax, 0x18(%r12) movq 0x920(%r15), %rax vmovss (%rax,%rbx,4), %xmm0 vmovss %xmm0, 0x28(%r12) movq 0x918(%r15), %rax vmovss (%rax,%rbx,4), %xmm0 vmovss %xmm0, 0x24(%r12) movq 0x928(%r15), %rax movl 0x8(%rax,%r13,4), %ecx movl %ecx, 0x34(%r12) movq (%rax,%r13,4), %rax movq %rax, 0x2c(%r12) movq 0x930(%r15), %rax movl 0x8(%rax,%r13,4), %ecx movl %ecx, 0x40(%r12) movq (%rax,%r13,4), %rax movq %rax, 0x38(%r12) movq 0x938(%r15), %rax movl 0x8(%rax,%r13,4), %ecx movl %ecx, 0x4c(%r12) movq (%rax,%r13,4), %rax movq %rax, 0x44(%r12) shlq $0x3, %r13 movq 0x27868(%rbp), %rsi addq %r13, %rsi movq %r12, %rdi movl $0x3, %edx vzeroupper callq 0x2e550 addq $0xc, %r12 addq 0x27870(%rbp), %r13 movq %r12, %rdi movq %r13, %rsi movl $0x3, %edx callq 0x2e550 movq 0x8(%rsp), %rcx movl 0xb0(%rcx), %eax incl %eax movl %eax, 0xb0(%rcx) movl 0x30(%r15), %ecx incq %rbx movslq %ecx, %rdx addq $0x3, %r14 cmpq %rdx, %rbx jl 0xb4e45 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mjv_makeLights: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r8, rdx mov [rsp+88h+var_70], rsi mov r15, rdi mov dword ptr [rdx+0B0h], 0 cmp dword ptr [rdi+2D4h], 0 mov [rsp+88h+var_80], rdx jz loc_B4E21 lea r12, [r8+0B4h] vxorps xmm0, xmm0, xmm0 vmovups ymmword ptr [r8+0ECh], ymm0 vmovups ymmword ptr [r8+0D4h], ymm0 vmovups ymmword ptr [r8+0B4h], ymm0 mov word ptr [r8+104h], 101h lea r13, [rsp+88h+var_48] lea rbp, [rsp+88h+var_68] mov rdi, r13 mov rsi, rbp xor edx, edx mov rcx, r8 vzeroupper call _mjv_cameraInModel mov rdi, r12 mov rsi, r13 mov edx, 3 call _mju_n2f mov rax, [rsp+88h+var_80] lea rdi, [rax+0C0h] mov rsi, rbp mov edx, 3 call _mju_n2f mov r8, [rsp+88h+var_80] mov eax, [r15+2B8h] mov [r8+0E8h], eax mov rax, [r15+2B0h] mov [r8+0E0h], rax mov rax, [r15+2BCh] mov [r8+0ECh], rax mov eax, [r15+2C4h] mov [r8+0F4h], eax mov eax, [r15+2D0h] mov [r8+100h], eax mov rax, [r15+2C8h] mov [r8+0F8h], rax mov eax, [r8+0B0h] inc eax mov [r8+0B0h], eax jmp short loc_B4E23 loc_B4E21: xor eax, eax loc_B4E23: mov ecx, [r15+30h] test ecx, ecx jle loc_B4FAD lea rdx, [r8+0B4h] mov [rsp+88h+var_78], rdx xor r14d, r14d xor ebx, ebx mov rbp, [rsp+88h+var_70] loc_B4E45: cmp eax, 64h ; 'd' jge loc_B4FAD mov rdx, [r15+8E0h] cmp byte ptr [rdx+rbx], 0 jz loc_B4F9A cdqe imul rax, 58h ; 'X' mov rsi, [rsp+88h+var_78] lea r12, [rsi+rax] vxorps xmm0, xmm0, xmm0 vmovups ymmword ptr [rsi+rax+38h], ymm0 vmovups ymmword ptr [rsi+rax+20h], ymm0 vmovups ymmword ptr [rsi+rax], ymm0 mov rcx, [r15+8C8h] mov cl, [rcx+rbx] mov [rsi+rax+51h], cl mov rdx, [r15+8D0h] mov dl, [rdx+rbx] mov [rsi+rax+52h], dl mov rdx, [r15+8D8h] vmovss xmm0, dword ptr [rdx+rbx*4] vmovss dword ptr [rsi+rax+54h], xmm0 mov r13, r14 test cl, cl jnz short loc_B4EFC mov rax, [r15+910h] lea r13, [rbx+rbx*2] mov ecx, [rax+r14*4+8] mov [r12+20h], ecx mov rax, [rax+r14*4] mov [r12+18h], rax mov rax, [r15+920h] vmovss xmm0, dword ptr [rax+rbx*4] vmovss dword ptr [r12+28h], xmm0 mov rax, [r15+918h] vmovss xmm0, dword ptr [rax+rbx*4] vmovss dword ptr [r12+24h], xmm0 loc_B4EFC: mov rax, [r15+928h] mov ecx, [rax+r13*4+8] mov [r12+34h], ecx mov rax, [rax+r13*4] mov [r12+2Ch], rax mov rax, [r15+930h] mov ecx, [rax+r13*4+8] mov [r12+40h], ecx mov rax, [rax+r13*4] mov [r12+38h], rax mov rax, [r15+938h] mov ecx, [rax+r13*4+8] mov [r12+4Ch], ecx mov rax, [rax+r13*4] mov [r12+44h], rax shl r13, 3 mov rsi, [rbp+27868h] add rsi, r13 mov rdi, r12 mov edx, 3 vzeroupper call _mju_n2f add r12, 0Ch add r13, qword ptr ss:stru_27870.r_offset[rbp] mov rdi, r12 mov rsi, r13 mov edx, 3 call _mju_n2f mov rcx, [rsp+88h+var_80] mov eax, [rcx+0B0h] inc eax mov [rcx+0B0h], eax mov ecx, [r15+30h] loc_B4F9A: inc rbx movsxd rdx, ecx add r14, 3 cmp rbx, rdx jl loc_B4E45 loc_B4FAD: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mjv_makeLights( long long a1, long long a2, long long a3, __m128 _XMM0, double a5, __m128 a6, __m128 a7, __m128 a8) { long long v10; // r12 __m128 v11; // xmm4 __m128 v12; // xmm4 long long result; // rax int v14; // ecx long long v15; // r14 char v19; // cl long long v21; // r13 long long v22; // rax long long v26; // rax long long v27; // rax long long v28; // rax long long v29; // r13 __m128 v30; // xmm4 long long v32; // [rsp+10h] [rbp-78h] _BYTE v33[32]; // [rsp+20h] [rbp-68h] BYREF _BYTE v34[72]; // [rsp+40h] [rbp-48h] BYREF _R8 = a3; *(_DWORD *)(a3 + 176) = 0; if ( *(_DWORD *)(a1 + 724) ) { v10 = a3 + 180; __asm { vxorps xmm0, xmm0, xmm0 vmovups ymmword ptr [r8+0ECh], ymm0 vmovups ymmword ptr [r8+0D4h], ymm0 vmovups ymmword ptr [r8+0B4h], ymm0 } *(_WORD *)(a3 + 260) = 257; __asm { vzeroupper } *(double *)_XMM0.m128_u64 = mjv_cameraInModel((long long)v34, (long long)v33, 0LL, a3, _XMM0, a5, a6, a7); mju_n2f(v10, *(double *)_XMM0.m128_u64, a5, *(double *)a6.m128_u64, a7, v11, (long long)v34, 3); mju_n2f(a3 + 192, *(double *)_XMM0.m128_u64, a5, *(double *)a6.m128_u64, a7, v12, (long long)v33, 3); _R8 = a3; *(_DWORD *)(a3 + 232) = *(_DWORD *)(a1 + 696); *(_QWORD *)(a3 + 224) = *(_QWORD *)(a1 + 688); *(_QWORD *)(a3 + 236) = *(_QWORD *)(a1 + 700); *(_DWORD *)(a3 + 244) = *(_DWORD *)(a1 + 708); *(_DWORD *)(a3 + 256) = *(_DWORD *)(a1 + 720); *(_QWORD *)(a3 + 248) = *(_QWORD *)(a1 + 712); result = (unsigned int)(*(_DWORD *)(a3 + 176) + 1); *(_DWORD *)(a3 + 176) = result; } else { result = 0LL; } v14 = *(_DWORD *)(a1 + 48); if ( v14 > 0 ) { v32 = _R8 + 180; v15 = 0LL; for ( _RBX = 0LL; _RBX < v14; ++_RBX ) { if ( (int)result >= 100 ) break; if ( *(_BYTE *)(*(_QWORD *)(a1 + 2272) + _RBX) ) { _R12 = v32 + 88LL * (int)result; __asm { vxorps xmm0, xmm0, xmm0 vmovups ymmword ptr [rsi+rax+38h], ymm0 vmovups ymmword ptr [rsi+rax+20h], ymm0 vmovups ymmword ptr [rsi+rax], ymm0 } v19 = *(_BYTE *)(*(_QWORD *)(a1 + 2248) + _RBX); *(_BYTE *)(_R12 + 81) = v19; *(_BYTE *)(_R12 + 82) = *(_BYTE *)(*(_QWORD *)(a1 + 2256) + _RBX); _RDX = *(_QWORD *)(a1 + 2264); __asm { vmovss xmm0, dword ptr [rdx+rbx*4] vmovss dword ptr [rsi+rax+54h], xmm0 } v21 = v15; if ( !v19 ) { v22 = *(_QWORD *)(a1 + 2320); v21 = 3 * _RBX; *(_DWORD *)(_R12 + 32) = *(_DWORD *)(v22 + 4 * v15 + 8); *(_QWORD *)(_R12 + 24) = *(_QWORD *)(v22 + 4 * v15); _RAX = *(_QWORD *)(a1 + 2336); __asm { vmovss xmm0, dword ptr [rax+rbx*4] vmovss dword ptr [r12+28h], xmm0 } _RAX = *(_QWORD *)(a1 + 2328); __asm { vmovss xmm0, dword ptr [rax+rbx*4] vmovss dword ptr [r12+24h], xmm0 } } v26 = *(_QWORD *)(a1 + 2344); *(_DWORD *)(_R12 + 52) = *(_DWORD *)(v26 + 4 * v21 + 8); *(_QWORD *)(_R12 + 44) = *(_QWORD *)(v26 + 4 * v21); v27 = *(_QWORD *)(a1 + 2352); *(_DWORD *)(_R12 + 64) = *(_DWORD *)(v27 + 4 * v21 + 8); *(_QWORD *)(_R12 + 56) = *(_QWORD *)(v27 + 4 * v21); v28 = *(_QWORD *)(a1 + 2360); *(_DWORD *)(_R12 + 76) = *(_DWORD *)(v28 + 4 * v21 + 8); *(_QWORD *)(_R12 + 68) = *(_QWORD *)(v28 + 4 * v21); v29 = 8 * v21; __asm { vzeroupper } mju_n2f(_R12, *(double *)_XMM0.m128_u64, a5, *(double *)a6.m128_u64, a7, a8, v29 + *(_QWORD *)(a2 + 161896), 3); mju_n2f( _R12 + 12, *(double *)_XMM0.m128_u64, a5, *(double *)a6.m128_u64, a7, v30, *(unsigned long long *)((char *)&stru_27870.r_offset + a2) + v29, 3); result = (unsigned int)(*(_DWORD *)(a3 + 176) + 1); *(_DWORD *)(a3 + 176) = result; v14 = *(_DWORD *)(a1 + 48); } v15 += 3LL; } } return result; }
mjv_makeLights: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R8,RDX MOV qword ptr [RSP + 0x18],RSI MOV R15,RDI MOV dword ptr [RDX + 0xb0],0x0 CMP dword ptr [RDI + 0x2d4],0x0 MOV qword ptr [RSP + 0x8],RDX JZ 0x001b4e21 LEA R12,[R8 + 0xb4] VXORPS XMM0,XMM0,XMM0 VMOVUPS ymmword ptr [R8 + 0xec],YMM0 VMOVUPS ymmword ptr [R8 + 0xd4],YMM0 VMOVUPS ymmword ptr [R8 + 0xb4],YMM0 MOV word ptr [R8 + 0x104],0x101 LEA R13,[RSP + 0x40] LEA RBP,[RSP + 0x20] MOV RDI,R13 MOV RSI,RBP XOR EDX,EDX MOV RCX,R8 VZEROUPPER CALL 0x0012e510 MOV RDI,R12 MOV RSI,R13 MOV EDX,0x3 CALL 0x0012e550 MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RAX + 0xc0] MOV RSI,RBP MOV EDX,0x3 CALL 0x0012e550 MOV R8,qword ptr [RSP + 0x8] MOV EAX,dword ptr [R15 + 0x2b8] MOV dword ptr [R8 + 0xe8],EAX MOV RAX,qword ptr [R15 + 0x2b0] MOV qword ptr [R8 + 0xe0],RAX MOV RAX,qword ptr [R15 + 0x2bc] MOV qword ptr [R8 + 0xec],RAX MOV EAX,dword ptr [R15 + 0x2c4] MOV dword ptr [R8 + 0xf4],EAX MOV EAX,dword ptr [R15 + 0x2d0] MOV dword ptr [R8 + 0x100],EAX MOV RAX,qword ptr [R15 + 0x2c8] MOV qword ptr [R8 + 0xf8],RAX MOV EAX,dword ptr [R8 + 0xb0] INC EAX MOV dword ptr [R8 + 0xb0],EAX JMP 0x001b4e23 LAB_001b4e21: XOR EAX,EAX LAB_001b4e23: MOV ECX,dword ptr [R15 + 0x30] TEST ECX,ECX JLE 0x001b4fad LEA RDX,[R8 + 0xb4] MOV qword ptr [RSP + 0x10],RDX XOR R14D,R14D XOR EBX,EBX MOV RBP,qword ptr [RSP + 0x18] LAB_001b4e45: CMP EAX,0x64 JGE 0x001b4fad MOV RDX,qword ptr [R15 + 0x8e0] CMP byte ptr [RDX + RBX*0x1],0x0 JZ 0x001b4f9a CDQE IMUL RAX,RAX,0x58 MOV RSI,qword ptr [RSP + 0x10] LEA R12,[RSI + RAX*0x1] VXORPS XMM0,XMM0,XMM0 VMOVUPS ymmword ptr [RSI + RAX*0x1 + 0x38],YMM0 VMOVUPS ymmword ptr [RSI + RAX*0x1 + 0x20],YMM0 VMOVUPS ymmword ptr [RSI + RAX*0x1],YMM0 MOV RCX,qword ptr [R15 + 0x8c8] MOV CL,byte ptr [RCX + RBX*0x1] MOV byte ptr [RSI + RAX*0x1 + 0x51],CL MOV RDX,qword ptr [R15 + 0x8d0] MOV DL,byte ptr [RDX + RBX*0x1] MOV byte ptr [RSI + RAX*0x1 + 0x52],DL MOV RDX,qword ptr [R15 + 0x8d8] VMOVSS XMM0,dword ptr [RDX + RBX*0x4] VMOVSS dword ptr [RSI + RAX*0x1 + 0x54],XMM0 MOV R13,R14 TEST CL,CL JNZ 0x001b4efc MOV RAX,qword ptr [R15 + 0x910] LEA R13,[RBX + RBX*0x2] MOV ECX,dword ptr [RAX + R14*0x4 + 0x8] MOV dword ptr [R12 + 0x20],ECX MOV RAX,qword ptr [RAX + R14*0x4] MOV qword ptr [R12 + 0x18],RAX MOV RAX,qword ptr [R15 + 0x920] VMOVSS XMM0,dword ptr [RAX + RBX*0x4] VMOVSS dword ptr [R12 + 0x28],XMM0 MOV RAX,qword ptr [R15 + 0x918] VMOVSS XMM0,dword ptr [RAX + RBX*0x4] VMOVSS dword ptr [R12 + 0x24],XMM0 LAB_001b4efc: MOV RAX,qword ptr [R15 + 0x928] MOV ECX,dword ptr [RAX + R13*0x4 + 0x8] MOV dword ptr [R12 + 0x34],ECX MOV RAX,qword ptr [RAX + R13*0x4] MOV qword ptr [R12 + 0x2c],RAX MOV RAX,qword ptr [R15 + 0x930] MOV ECX,dword ptr [RAX + R13*0x4 + 0x8] MOV dword ptr [R12 + 0x40],ECX MOV RAX,qword ptr [RAX + R13*0x4] MOV qword ptr [R12 + 0x38],RAX MOV RAX,qword ptr [R15 + 0x938] MOV ECX,dword ptr [RAX + R13*0x4 + 0x8] MOV dword ptr [R12 + 0x4c],ECX MOV RAX,qword ptr [RAX + R13*0x4] MOV qword ptr [R12 + 0x44],RAX SHL R13,0x3 MOV RSI,qword ptr [RBP + 0x27868] ADD RSI,R13 MOV RDI,R12 MOV EDX,0x3 VZEROUPPER CALL 0x0012e550 ADD R12,0xc ADD R13,qword ptr [RBP + 0x27870] MOV RDI,R12 MOV RSI,R13 MOV EDX,0x3 CALL 0x0012e550 MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RCX + 0xb0] INC EAX MOV dword ptr [RCX + 0xb0],EAX MOV ECX,dword ptr [R15 + 0x30] LAB_001b4f9a: INC RBX MOVSXD RDX,ECX ADD R14,0x3 CMP RBX,RDX JL 0x001b4e45 LAB_001b4fad: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void mjv_makeLights(long param_1,long param_2,long param_3) { long lVar1; char cVar2; long lVar3; int iVar4; long lVar5; int iVar6; long lVar7; long lVar8; int1 auVar9 [16]; int1 local_68 [32]; int1 local_48 [24]; *(int4 *)(param_3 + 0xb0) = 0; if (*(int *)(param_1 + 0x2d4) == 0) { iVar4 = 0; } else { auVar9 = ZEXT816(0) << 0x40; *(int1 (*) [32])(param_3 + 0xec) = ZEXT1632(auVar9); *(int1 (*) [32])(param_3 + 0xd4) = ZEXT1632(auVar9); *(int1 (*) [32])(param_3 + 0xb4) = ZEXT1632(auVar9); *(int2 *)(param_3 + 0x104) = 0x101; mjv_cameraInModel(local_48,local_68,0,param_3); mju_n2f(param_3 + 0xb4,local_48,3); mju_n2f(param_3 + 0xc0,local_68,3); *(int4 *)(param_3 + 0xe8) = *(int4 *)(param_1 + 0x2b8); *(int8 *)(param_3 + 0xe0) = *(int8 *)(param_1 + 0x2b0); *(int8 *)(param_3 + 0xec) = *(int8 *)(param_1 + 700); *(int4 *)(param_3 + 0xf4) = *(int4 *)(param_1 + 0x2c4); *(int4 *)(param_3 + 0x100) = *(int4 *)(param_1 + 0x2d0); *(int8 *)(param_3 + 0xf8) = *(int8 *)(param_1 + 0x2c8); iVar4 = *(int *)(param_3 + 0xb0) + 1; *(int *)(param_3 + 0xb0) = iVar4; } iVar6 = *(int *)(param_1 + 0x30); if (0 < iVar6) { lVar8 = 0; lVar7 = 0; do { if (99 < iVar4) { return; } if (*(char *)(*(long *)(param_1 + 0x8e0) + lVar7) != '\0') { lVar5 = (long)iVar4 * 0x58; lVar1 = param_3 + 0xb4 + lVar5; auVar9 = ZEXT816(0) << 0x40; *(int1 (*) [32])(param_3 + 0xec + lVar5) = ZEXT1632(auVar9); *(int1 (*) [32])(param_3 + 0xd4 + lVar5) = ZEXT1632(auVar9); *(int1 (*) [32])(param_3 + 0xb4 + lVar5) = ZEXT1632(auVar9); cVar2 = *(char *)(*(long *)(param_1 + 0x8c8) + lVar7); *(char *)(param_3 + 0x105 + lVar5) = cVar2; *(int1 *)(param_3 + 0x106 + lVar5) = *(int1 *)(*(long *)(param_1 + 0x8d0) + lVar7); *(int4 *)(param_3 + 0x108 + lVar5) = *(int4 *)(*(long *)(param_1 + 0x8d8) + lVar7 * 4); lVar5 = lVar8; if (cVar2 == '\0') { lVar3 = *(long *)(param_1 + 0x910); lVar5 = lVar7 * 3; *(int4 *)(lVar1 + 0x20) = *(int4 *)(lVar3 + 8 + lVar8 * 4); *(int8 *)(lVar1 + 0x18) = *(int8 *)(lVar3 + lVar8 * 4); *(int4 *)(lVar1 + 0x28) = *(int4 *)(*(long *)(param_1 + 0x920) + lVar7 * 4); *(int4 *)(lVar1 + 0x24) = *(int4 *)(*(long *)(param_1 + 0x918) + lVar7 * 4); } lVar3 = *(long *)(param_1 + 0x928); *(int4 *)(lVar1 + 0x34) = *(int4 *)(lVar3 + 8 + lVar5 * 4); *(int8 *)(lVar1 + 0x2c) = *(int8 *)(lVar3 + lVar5 * 4); lVar3 = *(long *)(param_1 + 0x930); *(int4 *)(lVar1 + 0x40) = *(int4 *)(lVar3 + 8 + lVar5 * 4); *(int8 *)(lVar1 + 0x38) = *(int8 *)(lVar3 + lVar5 * 4); lVar3 = *(long *)(param_1 + 0x938); *(int4 *)(lVar1 + 0x4c) = *(int4 *)(lVar3 + 8 + lVar5 * 4); *(int8 *)(lVar1 + 0x44) = *(int8 *)(lVar3 + lVar5 * 4); mju_n2f(lVar1,*(long *)(param_2 + 0x27868) + lVar5 * 8,3); mju_n2f(lVar1 + 0xc,lVar5 * 8 + *(long *)(param_2 + 0x27870),3); iVar4 = *(int *)(param_3 + 0xb0) + 1; *(int *)(param_3 + 0xb0) = iVar4; iVar6 = *(int *)(param_1 + 0x30); } lVar7 = lVar7 + 1; lVar8 = lVar8 + 3; } while (lVar7 < iVar6); } return; }
48,784
my_caseup_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_utf8mb3(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); while ((src < srcend) && (srcres= my_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0) { my_toupper_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O3
c
my_caseup_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r13 movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0xcbcc7 movq %r8, %r14 movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq -0x30(%rbp), %r13 addq %r13, %r14 movq 0x78(%rdi), %rax movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r15, %rcx callq 0xcb907 testl %eax, %eax jle 0xcbcc7 movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movzbl %ah, %edx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0xcbca6 movzbl %al, %eax leaq (%rax,%rax,2), %rax movl (%rcx,%rax,4), %eax movq %rax, -0x38(%rbp) movq %rax, %rsi movq %r13, %rdx movq %r14, %rcx callq 0xcb9cc testl %eax, %eax jle 0xcbcc7 movl %ebx, %ecx addq %rcx, %r12 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r12 jb 0xcbc6b subq -0x30(%rbp), %r13 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rcx mov [rbp+var_30], rcx test rdx, rdx jle short loc_CBCC7 mov r14, r8 mov r15, rdx mov r12, rsi add r15, rsi mov r13, [rbp+var_30] add r14, r13 mov rax, [rdi+78h] mov [rbp+var_40], rax loc_CBC6B: lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r15 call my_utf8mb3_uni test eax, eax jle short loc_CBCC7 mov ebx, eax mov rax, [rbp+var_40] mov rcx, [rax+8] mov rax, [rbp+var_38] movzx edx, ah mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_CBCA6 movzx eax, al lea rax, [rax+rax*2] mov eax, [rcx+rax*4] mov [rbp+var_38], rax loc_CBCA6: mov rsi, rax mov rdx, r13 mov rcx, r14 call my_uni_utf8mb3 test eax, eax jle short loc_CBCC7 mov ecx, ebx add r12, rcx mov eax, eax add r13, rax cmp r12, r15 jb short loc_CBC6B loc_CBCC7: sub r13, [rbp+var_30] mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_caseup_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5) { _BYTE *v5; // r13 unsigned __int8 *v6; // r12 unsigned long long v7; // r15 unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rax long long v12; // rcx int v13; // eax long long v15; // [rsp+0h] [rbp-40h] unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF _BYTE *v17; // [rsp+10h] [rbp-30h] v5 = a4; v17 = a4; if ( a3 > 0 ) { v6 = a2; v7 = (unsigned long long)&a2[a3]; v5 = v17; v8 = (unsigned long long)&v17[a5]; v15 = *(_QWORD *)(a1 + 120); do { v9 = my_utf8mb3_uni(a1, &v16, v6, v7); if ( v9 <= 0 ) break; v10 = v9; v11 = v16; v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16); v16 = v11; } v13 = my_uni_utf8mb3(a1, v11, v5, v8); if ( v13 <= 0 ) break; v6 += v10; v5 += (unsigned int)v13; } while ( (unsigned long long)v6 < v7 ); } return (_BYTE *)(v5 - v17); }
my_caseup_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x001cbcc7 MOV R14,R8 MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV R13,qword ptr [RBP + -0x30] ADD R14,R13 MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x40],RAX LAB_001cbc6b: LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R15 CALL 0x001cb907 TEST EAX,EAX JLE 0x001cbcc7 MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOVZX EDX,AH MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x001cbca6 MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] MOV EAX,dword ptr [RCX + RAX*0x4] MOV qword ptr [RBP + -0x38],RAX LAB_001cbca6: MOV RSI,RAX MOV RDX,R13 MOV RCX,R14 CALL 0x001cb9cc TEST EAX,EAX JLE 0x001cbcc7 MOV ECX,EBX ADD R12,RCX MOV EAX,EAX ADD R13,RAX CMP R12,R15 JC 0x001cbc6b LAB_001cbcc7: SUB R13,qword ptr [RBP + -0x30] MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4) { long lVar1; long lVar2; uint uVar3; uint uVar4; long lVar5; ulong uVar6; int8 local_40; lVar5 = param_4; if (0 < param_3) { uVar6 = param_3 + param_2; lVar1 = *(long *)(param_1 + 0x78); do { uVar3 = my_utf8mb3_uni(); if ((int)uVar3 < 1) break; lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8); if (lVar2 != 0) { local_40 = (ulong)*(uint *)(lVar2 + (local_40 & 0xff) * 0xc); } uVar4 = my_uni_utf8mb3(); if ((int)uVar4 < 1) break; param_2 = param_2 + uVar3; lVar5 = lVar5 + (ulong)uVar4; } while (param_2 < uVar6); } return lVar5 - param_4; }
48,785
link_block
eloqsql/mysys/mf_keycache.c
static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, my_bool hot, my_bool at_end) { BLOCK_LINK *ins; BLOCK_LINK **pins; DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(!block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); if (!hot && keycache->waiting_for_block.last_thread) { /* Signal that in the LRU warm sub-chain an available block has appeared */ struct st_my_thread_var *last_thread= keycache->waiting_for_block.last_thread; struct st_my_thread_var *first_thread= last_thread->next; struct st_my_thread_var *next_thread= first_thread; HASH_LINK *hash_link= (HASH_LINK *) first_thread->keycache_link; struct st_my_thread_var *thread; do { thread= next_thread; next_thread= thread->next; /* We notify about the event all threads that ask for the same page as the first thread in the queue */ if ((HASH_LINK *) thread->keycache_link == hash_link) { KEYCACHE_DBUG_PRINT("link_block: signal", ("thread %ld", (ulong) thread->id)); keycache_pthread_cond_signal(&thread->suspend); unlink_from_queue(&keycache->waiting_for_block, thread); block->requests++; } } while (thread != last_thread); hash_link->block= block; /* NOTE: We assigned the block to the hash_link and signalled the requesting thread(s). But it is possible that other threads runs first. These threads see the hash_link assigned to a block which is assigned to another hash_link and not marked BLOCK_IN_SWITCH. This can be a problem for functions that do not select the block via its hash_link: flush and free. They do only see a block which is in a "normal" state and don't know that it will be evicted soon. We cannot set BLOCK_IN_SWITCH here because only one of the requesting threads must handle the eviction. All others must wait for it to complete. If we set the flag here, the threads would not know who is in charge of the eviction. Without the flag, the first thread takes the stick and sets the flag. But we need to note in the block that is has been selected for eviction. It must not be freed. The evicting thread will not expect the block in the free list. Before freeing we could also check if block->requests > 1. But I think including another flag in the check of block->status is slightly more efficient and probably easier to read. */ block->status|= BLOCK_IN_EVICTION; KEYCACHE_THREAD_TRACE("link_block: after signaling"); #if defined(KEYCACHE_DEBUG) KEYCACHE_DBUG_PRINT("link_block", ("linked,unlinked block %u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), block->status, block->requests, keycache->blocks_available)); #endif return; } pins= hot ? &keycache->used_ins : &keycache->used_last; ins= *pins; if (ins) { ins->next_used->prev_used= &block->next_used; block->next_used= ins->next_used; block->prev_used= &ins->next_used; ins->next_used= block; if (at_end) *pins= block; } else { /* The LRU ring is empty. Let the block point to itself. */ keycache->used_last= keycache->used_ins= block->next_used= block; block->prev_used= &block->next_used; } KEYCACHE_THREAD_TRACE("link_block"); #if defined(KEYCACHE_DEBUG) keycache->blocks_available++; KEYCACHE_DBUG_PRINT("link_block", ("linked block %u:%1u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), at_end, block->status, block->requests, keycache->blocks_available)); KEYCACHE_DBUG_ASSERT((ulong) keycache->blocks_available <= keycache->blocks_used); #endif }
O3
c
link_block: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r12 testb %dl, %dl je 0x98b58 leaq 0xb8(%r12), %r9 leaq 0xb0(%r12), %r10 xorl %r8d, %r8d testb %dl, %dl setne %r8b movq %r9, %rax cmoveq %r10, %rax movq 0xb0(%r12,%r8,8), %rdx testq %rdx, %rdx je 0x98c1a movq (%rdx), %rdi movq %r14, 0x8(%rdi) movq (%rdx), %rdi movq %rdi, (%r14) movq %rdx, 0x8(%r14) movq %r14, (%rdx) testb %cl, %cl je 0x98c32 movq %r14, (%rax) jmp 0x98c32 movq 0x120(%r12), %r15 testq %r15, %r15 je 0x98b03 movq 0x88(%r15), %r13 movq 0xa8(%r13), %rax movq %rax, -0x30(%rbp) movq 0x88(%r13), %rbx cmpq %rax, 0xa8(%r13) jne 0x98bf7 movq 0x38(%r13), %rdi testq %rdi, %rdi jne 0x98c05 leaq 0x8(%r13), %rdi callq 0x295c0 movq 0x88(%r13), %rax cmpq %r13, %rax je 0x98bda movq 0x90(%r13), %rcx movq %rcx, 0x90(%rax) movq 0x88(%r13), %rax movq %rax, (%rcx) cmpq %r13, 0x120(%r12) jne 0x98be4 movq 0x90(%r13), %rax movq $-0x88, %rcx addq %rcx, %rax jmp 0x98bdc xorl %eax, %eax movq %rax, 0x120(%r12) movq $0x0, 0x88(%r13) incl 0x38(%r14) movq -0x30(%rbp), %rax cmpq %r15, %r13 movq %rbx, %r13 jne 0x98b77 jmp 0x98c29 leaq 0x2ed404(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x170(%rax) jmp 0x98b90 movq %r14, (%r14) movq %r14, (%r9) movq %r14, (%r10) movq %r14, 0x8(%r14) jmp 0x98c32 movq %r14, 0x10(%rax) orb $-0x80, 0x50(%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
link_block_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov r12, rdi test dl, dl jz short loc_98B58 loc_98B03: lea r9, [r12+0B8h] lea r10, [r12+0B0h] xor r8d, r8d test dl, dl setnz r8b mov rax, r9 cmovz rax, r10 mov rdx, [r12+r8*8+0B0h] test rdx, rdx jz loc_98C1A mov rdi, [rdx] mov [rdi+8], r14 mov rdi, [rdx] mov [r14], rdi mov [r14+8], rdx mov [rdx], r14 test cl, cl jz loc_98C32 mov [rax], r14 jmp loc_98C32 loc_98B58: mov r15, [r12+120h] test r15, r15 jz short loc_98B03 mov r13, [r15+88h] mov rax, [r13+0A8h] mov [rbp+var_30], rax loc_98B77: mov rbx, [r13+88h] cmp [r13+0A8h], rax jnz short loc_98BF7 mov rdi, [r13+38h] test rdi, rdi jnz short loc_98C05 loc_98B90: lea rdi, [r13+8] call _pthread_cond_signal mov rax, [r13+88h] cmp rax, r13 jz short loc_98BDA mov rcx, [r13+90h] mov [rax+90h], rcx mov rax, [r13+88h] mov [rcx], rax cmp [r12+120h], r13 jnz short loc_98BE4 mov rax, [r13+90h] mov rcx, 0FFFFFFFFFFFFFF78h add rax, rcx jmp short loc_98BDC loc_98BDA: xor eax, eax loc_98BDC: mov [r12+120h], rax loc_98BE4: mov qword ptr [r13+88h], 0 inc dword ptr [r14+38h] mov rax, [rbp+var_30] loc_98BF7: cmp r13, r15 mov r13, rbx jnz loc_98B77 jmp short loc_98C29 loc_98C05: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp loc_98B90 loc_98C1A: mov [r14], r14 mov [r9], r14 mov [r10], r14 mov [r14+8], r14 jmp short loc_98C32 loc_98C29: mov [rax+10h], r14 or byte ptr [r14+50h], 80h loc_98C32: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * link_block_0(_QWORD *a1, long long a2, char a3, char a4) { _QWORD *result; // rax long long v5; // rdx _QWORD *v6; // r15 _QWORD *v7; // r13 _QWORD *v8; // rbx _QWORD *v9; // rax _QWORD *v10; // rcx long long v11; // rax bool v12; // zf _QWORD *v13; // [rsp+0h] [rbp-30h] if ( !a3 ) { v6 = (_QWORD *)a1[36]; if ( v6 ) { v7 = (_QWORD *)v6[17]; result = (_QWORD *)v7[21]; v13 = result; while ( 1 ) { v8 = (_QWORD *)v7[17]; if ( (_QWORD *)v7[21] == result ) break; LABEL_18: v12 = v7 == v6; v7 = v8; if ( v12 ) { result[2] = a2; *(_BYTE *)(a2 + 80) |= 0x80u; return result; } } if ( v7[7] ) PSI_server[46](); pthread_cond_signal(v7 + 1); v9 = (_QWORD *)v7[17]; if ( v9 == v7 ) { v11 = 0LL; } else { v10 = (_QWORD *)v7[18]; v9[18] = v10; *v10 = v7[17]; if ( (_QWORD *)a1[36] != v7 ) { LABEL_17: v7[17] = 0LL; ++*(_DWORD *)(a2 + 56); result = v13; goto LABEL_18; } v11 = v7[18] - 136LL; } a1[36] = v11; goto LABEL_17; } } result = a1 + 23; if ( !a3 ) result = a1 + 22; v5 = a1[(a3 != 0) + 22]; if ( v5 ) { *(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v5; *(_QWORD *)(a2 + 8) = v5; *(_QWORD *)v5 = a2; if ( a4 ) *result = a2; } else { *(_QWORD *)a2 = a2; a1[23] = a2; a1[22] = a2; *(_QWORD *)(a2 + 8) = a2; } return result; }
link_block: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R12,RDI TEST DL,DL JZ 0x00198b58 LAB_00198b03: LEA R9,[R12 + 0xb8] LEA R10,[R12 + 0xb0] XOR R8D,R8D TEST DL,DL SETNZ R8B MOV RAX,R9 CMOVZ RAX,R10 MOV RDX,qword ptr [R12 + R8*0x8 + 0xb0] TEST RDX,RDX JZ 0x00198c1a MOV RDI,qword ptr [RDX] MOV qword ptr [RDI + 0x8],R14 MOV RDI,qword ptr [RDX] MOV qword ptr [R14],RDI MOV qword ptr [R14 + 0x8],RDX MOV qword ptr [RDX],R14 TEST CL,CL JZ 0x00198c32 MOV qword ptr [RAX],R14 JMP 0x00198c32 LAB_00198b58: MOV R15,qword ptr [R12 + 0x120] TEST R15,R15 JZ 0x00198b03 MOV R13,qword ptr [R15 + 0x88] MOV RAX,qword ptr [R13 + 0xa8] MOV qword ptr [RBP + -0x30],RAX LAB_00198b77: MOV RBX,qword ptr [R13 + 0x88] CMP qword ptr [R13 + 0xa8],RAX JNZ 0x00198bf7 MOV RDI,qword ptr [R13 + 0x38] TEST RDI,RDI JNZ 0x00198c05 LAB_00198b90: LEA RDI,[R13 + 0x8] CALL 0x001295c0 MOV RAX,qword ptr [R13 + 0x88] CMP RAX,R13 JZ 0x00198bda MOV RCX,qword ptr [R13 + 0x90] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [R13 + 0x88] MOV qword ptr [RCX],RAX CMP qword ptr [R12 + 0x120],R13 JNZ 0x00198be4 MOV RAX,qword ptr [R13 + 0x90] MOV RCX,-0x88 ADD RAX,RCX JMP 0x00198bdc LAB_00198bda: XOR EAX,EAX LAB_00198bdc: MOV qword ptr [R12 + 0x120],RAX LAB_00198be4: MOV qword ptr [R13 + 0x88],0x0 INC dword ptr [R14 + 0x38] MOV RAX,qword ptr [RBP + -0x30] LAB_00198bf7: CMP R13,R15 MOV R13,RBX JNZ 0x00198b77 JMP 0x00198c29 LAB_00198c05: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00198b90 LAB_00198c1a: MOV qword ptr [R14],R14 MOV qword ptr [R9],R14 MOV qword ptr [R10],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x00198c32 LAB_00198c29: MOV qword ptr [RAX + 0x10],R14 OR byte ptr [R14 + 0x50],0x80 LAB_00198c32: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void link_block(long param_1,long *param_2,char param_3,char param_4) { long *plVar1; long lVar2; long lVar3; long lVar4; int8 *puVar5; long lVar6; long lVar7; bool bVar8; if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) { lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8); lVar7 = *(long *)(lVar2 + 0x88); do { lVar4 = *(long *)(lVar7 + 0x88); if (*(long *)(lVar7 + 0xa8) == lVar3) { if (*(long *)(lVar7 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar7 + 8)); if (*(long *)(lVar7 + 0x88) == lVar7) { lVar6 = 0; LAB_00198bdc: *(long *)(param_1 + 0x120) = lVar6; } else { puVar5 = *(int8 **)(lVar7 + 0x90); *(int8 **)(*(long *)(lVar7 + 0x88) + 0x90) = puVar5; *puVar5 = *(int8 *)(lVar7 + 0x88); if (*(long *)(param_1 + 0x120) == lVar7) { lVar6 = *(long *)(lVar7 + 0x90) + -0x88; goto LAB_00198bdc; } } *(int8 *)(lVar7 + 0x88) = 0; *(int *)(param_2 + 7) = (int)param_2[7] + 1; } bVar8 = lVar7 != lVar2; lVar7 = lVar4; } while (bVar8); *(long **)(lVar3 + 0x10) = param_2; *(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) | 0x80; } else { puVar5 = (int8 *)(param_1 + 0xb8); if (param_3 == '\0') { puVar5 = (int8 *)(param_1 + 0xb0); } plVar1 = *(long **)(param_1 + 0xb0 + (ulong)(param_3 != '\0') * 8); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(int8 *)(param_1 + 0xb8) = param_2; *(int8 *)(param_1 + 0xb0) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; if (param_4 != '\0') { *puVar5 = param_2; } } } return; }
48,786
heapsortx
bluesky950520[P]quickjs/cutils.c
static void heapsortx(void *base, size_t nmemb, size_t size, cmp_f cmp, void *opaque) { uint8_t *basep = (uint8_t *)base; size_t i, n, c, r; exchange_f swap = exchange_func(base, size); if (nmemb > 1) { i = (nmemb / 2) * size; n = nmemb * size; while (i > 0) { i -= size; for (r = i; (c = r * 2 + size) < n; r = c) { if (c < n - size && cmp(basep + c, basep + c + size, opaque) <= 0) c += size; if (cmp(basep + r, basep + c, opaque) > 0) break; swap(basep + r, basep + c, size); } } for (i = n - size; i > 0; i -= size) { swap(basep, basep + i, size); for (r = 0; (c = r * 2 + size) < i; r = c) { if (c < i - size && cmp(basep + c, basep + c + size, opaque) <= 0) c += size; if (cmp(basep + r, basep + c, opaque) > 0) break; swap(basep + r, basep + c, size); } } } }
O0
c
heapsortx: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq %rcx, 0x38(%rsp) movq %r8, 0x30(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x209c0 movq %rax, (%rsp) cmpq $0x1, 0x48(%rsp) jbe 0x20d2d movq 0x48(%rsp), %rax shrq %rax imulq 0x40(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rax imulq 0x40(%rsp), %rax movq %rax, 0x18(%rsp) cmpq $0x0, 0x20(%rsp) jbe 0x20c15 movq 0x40(%rsp), %rcx movq 0x20(%rsp), %rax subq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax shlq %rax addq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) cmpq 0x18(%rsp), %rax jae 0x20c10 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx subq 0x40(%rsp), %rcx cmpq %rcx, %rax jae 0x20bbb movq 0x38(%rsp), %rax movq 0x28(%rsp), %rdi addq 0x10(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x10(%rsp), %rsi addq 0x40(%rsp), %rsi movq 0x30(%rsp), %rdx callq *%rax cmpl $0x0, %eax jg 0x20bbb movq 0x40(%rsp), %rax addq 0x10(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x38(%rsp), %rax movq 0x28(%rsp), %rdi addq 0x8(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x10(%rsp), %rsi movq 0x30(%rsp), %rdx callq *%rax cmpl $0x0, %eax jle 0x20be2 jmp 0x20c10 movq (%rsp), %rax movq 0x28(%rsp), %rdi addq 0x8(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x10(%rsp), %rsi movq 0x40(%rsp), %rdx callq *%rax movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) jmp 0x20b51 jmp 0x20b29 movq 0x18(%rsp), %rax subq 0x40(%rsp), %rax movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jbe 0x20d2b movq (%rsp), %rax movq 0x28(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x20(%rsp), %rsi movq 0x40(%rsp), %rdx callq *%rax movq $0x0, 0x8(%rsp) movq 0x8(%rsp), %rax shlq %rax addq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) cmpq 0x20(%rsp), %rax jae 0x20d12 movq 0x10(%rsp), %rax movq 0x20(%rsp), %rcx subq 0x40(%rsp), %rcx cmpq %rcx, %rax jae 0x20cbd movq 0x38(%rsp), %rax movq 0x28(%rsp), %rdi addq 0x10(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x10(%rsp), %rsi addq 0x40(%rsp), %rsi movq 0x30(%rsp), %rdx callq *%rax cmpl $0x0, %eax jg 0x20cbd movq 0x40(%rsp), %rax addq 0x10(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x38(%rsp), %rax movq 0x28(%rsp), %rdi addq 0x8(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x10(%rsp), %rsi movq 0x30(%rsp), %rdx callq *%rax cmpl $0x0, %eax jle 0x20ce4 jmp 0x20d12 movq (%rsp), %rax movq 0x28(%rsp), %rdi addq 0x8(%rsp), %rdi movq 0x28(%rsp), %rsi addq 0x10(%rsp), %rsi movq 0x40(%rsp), %rdx callq *%rax movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) jmp 0x20c53 jmp 0x20d14 movq 0x40(%rsp), %rcx movq 0x20(%rsp), %rax subq %rcx, %rax movq %rax, 0x20(%rsp) jmp 0x20c24 jmp 0x20d2d addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
heapsortx: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_20], rcx mov [rsp+58h+var_28], r8 mov rax, [rsp+58h+var_8] mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_8] mov rsi, [rsp+58h+var_18] call exchange_func mov [rsp+58h+var_58], rax cmp [rsp+58h+var_10], 1 jbe loc_20D2D mov rax, [rsp+58h+var_10] shr rax, 1 imul rax, [rsp+58h+var_18] mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_10] imul rax, [rsp+58h+var_18] mov [rsp+58h+var_40], rax loc_20B29: cmp [rsp+58h+var_38], 0 jbe loc_20C15 mov rcx, [rsp+58h+var_18] mov rax, [rsp+58h+var_38] sub rax, rcx mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_38] mov [rsp+58h+var_50], rax loc_20B51: mov rax, [rsp+58h+var_50] shl rax, 1 add rax, [rsp+58h+var_18] mov [rsp+58h+var_48], rax cmp rax, [rsp+58h+var_40] jnb loc_20C10 mov rax, [rsp+58h+var_48] mov rcx, [rsp+58h+var_40] sub rcx, [rsp+58h+var_18] cmp rax, rcx jnb short loc_20BBB mov rax, [rsp+58h+var_20] mov rdi, [rsp+58h+var_30] add rdi, [rsp+58h+var_48] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_48] add rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_28] call rax cmp eax, 0 jg short loc_20BBB mov rax, [rsp+58h+var_18] add rax, [rsp+58h+var_48] mov [rsp+58h+var_48], rax loc_20BBB: mov rax, [rsp+58h+var_20] mov rdi, [rsp+58h+var_30] add rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_28] call rax cmp eax, 0 jle short loc_20BE2 jmp short loc_20C10 loc_20BE2: mov rax, [rsp+58h+var_58] mov rdi, [rsp+58h+var_30] add rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_18] call rax mov rax, [rsp+58h+var_48] mov [rsp+58h+var_50], rax jmp loc_20B51 loc_20C10: jmp loc_20B29 loc_20C15: mov rax, [rsp+58h+var_40] sub rax, [rsp+58h+var_18] mov [rsp+58h+var_38], rax loc_20C24: cmp [rsp+58h+var_38], 0 jbe loc_20D2B mov rax, [rsp+58h+var_58] mov rdi, [rsp+58h+var_30] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_38] mov rdx, [rsp+58h+var_18] call rax mov [rsp+58h+var_50], 0 loc_20C53: mov rax, [rsp+58h+var_50] shl rax, 1 add rax, [rsp+58h+var_18] mov [rsp+58h+var_48], rax cmp rax, [rsp+58h+var_38] jnb loc_20D12 mov rax, [rsp+58h+var_48] mov rcx, [rsp+58h+var_38] sub rcx, [rsp+58h+var_18] cmp rax, rcx jnb short loc_20CBD mov rax, [rsp+58h+var_20] mov rdi, [rsp+58h+var_30] add rdi, [rsp+58h+var_48] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_48] add rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_28] call rax cmp eax, 0 jg short loc_20CBD mov rax, [rsp+58h+var_18] add rax, [rsp+58h+var_48] mov [rsp+58h+var_48], rax loc_20CBD: mov rax, [rsp+58h+var_20] mov rdi, [rsp+58h+var_30] add rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_28] call rax cmp eax, 0 jle short loc_20CE4 jmp short loc_20D12 loc_20CE4: mov rax, [rsp+58h+var_58] mov rdi, [rsp+58h+var_30] add rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_30] add rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_18] call rax mov rax, [rsp+58h+var_48] mov [rsp+58h+var_50], rax jmp loc_20C53 loc_20D12: jmp short $+2 loc_20D14: mov rcx, [rsp+58h+var_18] mov rax, [rsp+58h+var_38] sub rax, rcx mov [rsp+58h+var_38], rax jmp loc_20C24 loc_20D2B: jmp short $+2 loc_20D2D: add rsp, 58h retn
long long ( * heapsortx( long long a1, unsigned long long a2, long long a3, int ( *a4)(unsigned long long, unsigned long long, long long), long long a5))() { long long ( *result)(); // rax long long ( *v6)(); // [rsp+0h] [rbp-58h] unsigned long long i; // [rsp+8h] [rbp-50h] unsigned long long k; // [rsp+8h] [rbp-50h] unsigned long long v9; // [rsp+10h] [rbp-48h] unsigned long long v10; // [rsp+10h] [rbp-48h] unsigned long long v11; // [rsp+18h] [rbp-40h] unsigned long long v12; // [rsp+20h] [rbp-38h] unsigned long long j; // [rsp+20h] [rbp-38h] result = exchange_func(a1, a3); v6 = result; if ( a2 > 1 ) { v12 = a3 * (a2 >> 1); v11 = a3 * a2; while ( v12 ) { v12 -= a3; for ( i = v12; ; i = v9 ) { v9 = a3 + 2 * i; if ( v9 >= v11 ) break; if ( v9 < v11 - a3 && a4(v9 + a1, a3 + v9 + a1, a5) <= 0 ) v9 += a3; if ( a4(i + a1, v9 + a1, a5) > 0 ) break; ((void ( *)(unsigned long long, unsigned long long, long long))v6)(i + a1, v9 + a1, a3); } } result = (long long ( *)())(v11 - a3); for ( j = v11 - a3; j; j -= a3 ) { ((void ( *)(long long, unsigned long long, long long))v6)(a1, j + a1, a3); for ( k = 0LL; ; k = v10 ) { v10 = a3 + 2 * k; if ( v10 >= j ) break; if ( v10 < j - a3 && a4(v10 + a1, a3 + v10 + a1, a5) <= 0 ) v10 += a3; if ( a4(k + a1, v10 + a1, a5) > 0 ) break; ((void ( *)(unsigned long long, unsigned long long, long long))v6)(k + a1, v10 + a1, a3); } result = (long long ( *)())(j - a3); } } return result; }
heapsortx: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x30],R8 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x40] CALL 0x001209c0 MOV qword ptr [RSP],RAX CMP qword ptr [RSP + 0x48],0x1 JBE 0x00120d2d MOV RAX,qword ptr [RSP + 0x48] SHR RAX,0x1 IMUL RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x48] IMUL RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RAX LAB_00120b29: CMP qword ptr [RSP + 0x20],0x0 JBE 0x00120c15 MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x20] SUB RAX,RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX LAB_00120b51: MOV RAX,qword ptr [RSP + 0x8] SHL RAX,0x1 ADD RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX CMP RAX,qword ptr [RSP + 0x18] JNC 0x00120c10 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] SUB RCX,qword ptr [RSP + 0x40] CMP RAX,RCX JNC 0x00120bbb MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x10] ADD RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x30] CALL RAX CMP EAX,0x0 JG 0x00120bbb MOV RAX,qword ptr [RSP + 0x40] ADD RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_00120bbb: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x30] CALL RAX CMP EAX,0x0 JLE 0x00120be2 JMP 0x00120c10 LAB_00120be2: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x40] CALL RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX JMP 0x00120b51 LAB_00120c10: JMP 0x00120b29 LAB_00120c15: MOV RAX,qword ptr [RSP + 0x18] SUB RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],RAX LAB_00120c24: CMP qword ptr [RSP + 0x20],0x0 JBE 0x00120d2b MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x40] CALL RAX MOV qword ptr [RSP + 0x8],0x0 LAB_00120c53: MOV RAX,qword ptr [RSP + 0x8] SHL RAX,0x1 ADD RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX CMP RAX,qword ptr [RSP + 0x20] JNC 0x00120d12 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x20] SUB RCX,qword ptr [RSP + 0x40] CMP RAX,RCX JNC 0x00120cbd MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x10] ADD RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x30] CALL RAX CMP EAX,0x0 JG 0x00120cbd MOV RAX,qword ptr [RSP + 0x40] ADD RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_00120cbd: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x30] CALL RAX CMP EAX,0x0 JLE 0x00120ce4 JMP 0x00120d12 LAB_00120ce4: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x40] CALL RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX JMP 0x00120c53 LAB_00120d12: JMP 0x00120d14 LAB_00120d14: MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x20] SUB RAX,RCX MOV qword ptr [RSP + 0x20],RAX JMP 0x00120c24 LAB_00120d2b: JMP 0x00120d2d LAB_00120d2d: ADD RSP,0x58 RET
void heapsortx(long param_1,ulong param_2,long param_3,code *param_4,int8 param_5) { int iVar1; code *pcVar2; ulong local_50; ulong local_48; ulong local_38; pcVar2 = (code *)exchange_func(param_1,param_3); if (1 < param_2) { local_38 = (param_2 >> 1) * param_3; param_2 = param_2 * param_3; LAB_00120b29: if (local_38 != 0) { local_38 = local_38 - param_3; local_50 = local_38; while (local_48 = local_50 * 2 + param_3, local_48 < param_2) { if ((local_48 < param_2 - param_3) && (iVar1 = (*param_4)(param_1 + local_48,param_1 + local_48 + param_3,param_5), iVar1 < 1)) { local_48 = param_3 + local_48; } iVar1 = (*param_4)(param_1 + local_50,param_1 + local_48,param_5); if (0 < iVar1) break; (*pcVar2)(param_1 + local_50,param_1 + local_48,param_3); local_50 = local_48; } goto LAB_00120b29; } for (local_38 = param_2 - param_3; local_38 != 0; local_38 = local_38 - param_3) { (*pcVar2)(param_1,param_1 + local_38,param_3); local_50 = 0; while (local_48 = local_50 * 2 + param_3, local_48 < local_38) { if ((local_48 < local_38 - param_3) && (iVar1 = (*param_4)(param_1 + local_48,param_1 + local_48 + param_3,param_5), iVar1 < 1)) { local_48 = param_3 + local_48; } iVar1 = (*param_4)(param_1 + local_50,param_1 + local_48,param_5); if (0 < iVar1) break; (*pcVar2)(param_1 + local_50,param_1 + local_48,param_3); local_50 = local_48; } } } return; }
48,787
remove_key
eloqsql/storage/myisam/mi_delete.c
static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag, uchar *keypos, /* Where key starts */ uchar *lastkey, /* key to be removed */ uchar *page_end, /* End of page */ my_off_t *next_block) /* ptr to next block */ { int s_length; uchar *start; DBUG_ENTER("remove_key"); DBUG_PRINT("enter",("keypos: %p page_end: %p",keypos, page_end)); start=keypos; if (!(keyinfo->flag & (HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { s_length=(int) (keyinfo->keylength+nod_flag); if (next_block && nod_flag) *next_block= _mi_kpos(nod_flag,keypos+s_length); } else { /* Let keypos point at next key */ /* Calculate length of key */ if (!(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,lastkey)) DBUG_RETURN(0); /* Error */ if (next_block && nod_flag) *next_block= _mi_kpos(nod_flag,keypos); s_length=(int) (keypos-start); if (keypos != page_end) { if (keyinfo->flag & HA_BINARY_PACK_KEY) { uchar *old_key=start; uint next_length,prev_length,prev_pack_length; get_key_length(next_length,keypos); get_key_pack_length(prev_length,prev_pack_length,old_key); if (next_length > prev_length) { /* We have to copy data from the current key to the next key */ bmove_upp(keypos, (lastkey+next_length), (next_length-prev_length)); keypos-=(next_length-prev_length)+prev_pack_length; store_key_length(keypos,prev_length); s_length=(int) (keypos-start); } } else { /* Check if a variable length first key part */ if ((keyinfo->seg->flag & HA_PACK_KEY) && *keypos & 128) { /* Next key is packed against the current one */ uint next_length,prev_length,prev_pack_length,lastkey_length, rest_length; if (keyinfo->seg[0].length >= 127) { if (!(prev_length=mi_uint2korr(start) & 32767)) goto end; next_length=mi_uint2korr(keypos) & 32767; keypos+=2; prev_pack_length=2; } else { if (!(prev_length= *start & 127)) goto end; /* Same key as previous*/ next_length= *keypos & 127; keypos++; prev_pack_length=1; } if (!(*start & 128)) prev_length=0; /* prev key not packed */ if (keyinfo->seg[0].flag & HA_NULL_PART) lastkey++; /* Skip null marker */ get_key_length(lastkey_length,lastkey); if (!next_length) /* Same key after */ { next_length=lastkey_length; rest_length=0; } else get_key_length(rest_length,keypos); if (next_length >= prev_length) { /* Key after is based on deleted key */ uint pack_length,tmp; bmove_upp(keypos, (lastkey+next_length), tmp=(next_length-prev_length)); rest_length+=tmp; pack_length= prev_length ? get_pack_length(rest_length): 0; keypos-=tmp+pack_length+prev_pack_length; s_length=(int) (keypos-start); if (prev_length) /* Pack against prev key */ { *keypos++= start[0]; if (prev_pack_length == 2) *keypos++= start[1]; store_key_length(keypos,rest_length); } else { /* Next key is not packed anymore */ if (keyinfo->seg[0].flag & HA_NULL_PART) { rest_length++; /* Mark not null */ } if (prev_pack_length == 2) { mi_int2store(keypos,rest_length); } else *keypos= rest_length; } } } } } } end: bmove((uchar*) start,(uchar*) start+s_length, (uint) (page_end-start-s_length)); DBUG_RETURN((uint) s_length); }
O3
c
remove_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %r12 movq %rdx, %r14 movl %esi, %ebx movq %rdi, %r13 movq %rdx, -0x30(%rbp) testb $0x2e, 0xa(%rdi) je 0x75482 movq %rcx, %r15 movq %r8, -0x48(%rbp) leaq -0x30(%rbp), %rdx movq %r13, %rdi movl %ebx, %esi callq *0x48(%r13) testl %eax, %eax je 0x754b9 movq %r15, -0x40(%rbp) testq %r12, %r12 sete %al testl %ebx, %ebx sete %cl orb %al, %cl jne 0x753fe movq -0x30(%rbp), %rsi movl %ebx, %edi callq 0x8443e movq %rax, (%r12) movq -0x30(%rbp), %rdi movl %edi, %r15d subl %r14d, %r15d movq -0x48(%rbp), %r8 cmpq %r8, %rdi je 0x75566 testb $0x20, 0xa(%r13) jne 0x754c1 movq 0x28(%r13), %rdx movzwl 0x12(%rdx), %ecx testb $0x2, %cl je 0x75566 movzbl (%rdi), %eax testb %al, %al jns 0x75566 movzwl 0x14(%rdx), %r10d cmpw $0x7f, %r10w jb 0x7558c movzbl 0x1(%r14), %edx movzbl (%r14), %r12d movl %r12d, %esi andl $0x7f, %esi shll $0x8, %esi orl %edx, %esi je 0x75566 movzbl 0x1(%rdi), %edx andl $0x7f, %eax shll $0x8, %eax orl %edx, %eax movl $0x2, %r11d movl $0x2, %edx jmp 0x755a6 movzwl 0x12(%r13), %r15d addl %ebx, %r15d testq %r12, %r12 sete %al testl %ebx, %ebx sete %cl orb %al, %cl jne 0x75566 movslq %r15d, %rsi addq %r14, %rsi movl %ebx, %edi movq %r8, %rbx callq 0x8443e movq %rbx, %r8 movq %rax, (%r12) jmp 0x75566 xorl %r15d, %r15d jmp 0x7557a cmpb $-0x1, (%rdi) je 0x754d3 leaq 0x1(%rdi), %rax movq %rax, -0x30(%rbp) movzbl (%rdi), %ecx jmp 0x754e9 movzwl 0x1(%rdi), %eax rolw $0x8, %ax movzwl %ax, %ecx addq $0x3, %rdi movq %rdi, -0x30(%rbp) movq %rdi, %rax movzbl (%r14), %edx cmpl $0xff, %edx je 0x754fd movl $0x1, %r12d jmp 0x7550f movzwl 0x1(%r14), %edx rolw $0x8, %dx movzwl %dx, %edx movl $0x3, %r12d movl %ecx, %ebx subl %edx, %ebx jbe 0x75566 movl %ecx, %ecx movq -0x40(%rbp), %rsi addq %rcx, %rsi movq %rax, %rdi movl %edx, %r15d movq %rbx, %rdx callq 0xaabfc movl %r15d, %ecx addl %ebx, %r12d movq -0x30(%rbp), %rax subq %r12, %rax movq %rax, -0x30(%rbp) cmpl $0xfe, %r15d ja 0x7554a movb %cl, (%rax) jmp 0x7555b movb $-0x1, (%rax) movq -0x30(%rbp), %rax movb %cl, 0x2(%rax) movq -0x30(%rbp), %rax movb %ch, 0x1(%rax) movl -0x30(%rbp), %r15d subl %r14d, %r15d movq -0x48(%rbp), %r8 movslq %r15d, %rsi addq %r14, %rsi subl %esi, %r8d movq %r14, %rdi movq %r8, %rdx callq 0x29110 movl %r15d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzbl (%r14), %r12d movl %r12d, %esi andl $0x7f, %esi je 0x75566 andl $0x7f, %eax movl $0x1, %r11d movl $0x1, %edx addq %rdx, %rdi movq %rdi, -0x30(%rbp) xorl %edx, %edx testb %r12b, %r12b cmovsl %esi, %edx btl $0x4, %ecx movq -0x40(%rbp), %rcx adcq $0x0, %rcx movzbl (%rcx), %esi cmpl $0xff, %esi je 0x755d6 movq %rcx, %r9 movl $0x1, %ecx jmp 0x755e9 movq %rcx, %r9 movzwl 0x1(%rcx), %ecx rolw $0x8, %cx movzwl %cx, %esi movl $0x3, %ecx testl %eax, %eax je 0x75605 cmpb $-0x1, (%rdi) je 0x7560e leaq 0x1(%rdi), %rsi movq %rsi, -0x30(%rbp) movzbl (%rdi), %edi movl %edi, -0x40(%rbp) movq %rsi, %rdi jmp 0x75624 movl $0x0, -0x40(%rbp) jmp 0x75626 movzwl 0x1(%rdi), %esi rolw $0x8, %si movzwl %si, %esi movl %esi, -0x40(%rbp) addq $0x3, %rdi movq %rdi, -0x30(%rbp) movl %eax, %esi movl %esi, %ebx subl %edx, %ebx jb 0x75566 movw %r10w, -0x32(%rbp) addq %rcx, %r9 movl %esi, %esi addq %r9, %rsi movq %rbx, %rdx movq %r11, %r15 callq 0xaabfc movl -0x40(%rbp), %edx addl %ebx, %edx xorl %eax, %eax cmpl $0xff, %edx setae %al xorl %ecx, %ecx testb %r12b, %r12b leal 0x1(%rax,%rax), %eax cmovnsl %ecx, %eax addl %ebx, %r15d addl %eax, %r15d movq -0x30(%rbp), %rax subq %r15, %rax movl %eax, %r15d subl %r14d, %r15d movq %rax, -0x30(%rbp) testb %r12b, %r12b js 0x756a4 movq 0x28(%r13), %rcx movzwl 0x12(%rcx), %ecx btl $0x4, %ecx adcl $0x0, %edx cmpw $0x7f, -0x32(%rbp) jb 0x756e5 movb %dl, 0x1(%rax) movq -0x30(%rbp), %rax movb %dh, (%rax) jmp 0x75562 movl %edx, %esi leaq 0x1(%rax), %rcx movb (%r14), %dl movq %rcx, -0x30(%rbp) movb %dl, (%rax) cmpw $0x7f, -0x32(%rbp) jb 0x756cc movb 0x1(%r14), %al movq -0x30(%rbp), %rcx leaq 0x1(%rcx), %rdx movq %rdx, -0x30(%rbp) movb %al, (%rcx) movl %esi, %ecx cmpl $0xfe, %esi movq -0x48(%rbp), %r8 ja 0x756ec movq -0x30(%rbp), %rax movb %cl, (%rax) jmp 0x75566 movb %dl, (%rax) jmp 0x75562 movq -0x30(%rbp), %rax movb $-0x1, (%rax) movq -0x30(%rbp), %rax movb %cl, 0x2(%rax) movq -0x30(%rbp), %rax movb %ch, 0x1(%rax) jmp 0x75566
remove_key_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, r9 mov r14, rdx mov ebx, esi mov r13, rdi mov [rbp+var_30], rdx test byte ptr [rdi+0Ah], 2Eh jz loc_75482 mov r15, rcx mov [rbp+var_48], r8 lea rdx, [rbp+var_30] mov rdi, r13 mov esi, ebx call qword ptr [r13+48h] test eax, eax jz loc_754B9 mov [rbp+var_40], r15 test r12, r12 setz al test ebx, ebx setz cl or cl, al jnz short loc_753FE mov rsi, [rbp+var_30] mov edi, ebx call _mi_kpos mov [r12], rax loc_753FE: mov rdi, [rbp+var_30] mov r15d, edi sub r15d, r14d mov r8, [rbp+var_48] cmp rdi, r8 jz loc_75566 test byte ptr [r13+0Ah], 20h jnz loc_754C1 mov rdx, [r13+28h] movzx ecx, word ptr [rdx+12h] test cl, 2 jz loc_75566 movzx eax, byte ptr [rdi] test al, al jns loc_75566 movzx r10d, word ptr [rdx+14h] cmp r10w, 7Fh jb loc_7558C movzx edx, byte ptr [r14+1] movzx r12d, byte ptr [r14] mov esi, r12d and esi, 7Fh shl esi, 8 or esi, edx jz loc_75566 movzx edx, byte ptr [rdi+1] and eax, 7Fh shl eax, 8 or eax, edx mov r11d, 2 mov edx, 2 jmp loc_755A6 loc_75482: movzx r15d, word ptr [r13+12h] add r15d, ebx test r12, r12 setz al test ebx, ebx setz cl or cl, al jnz loc_75566 movsxd rsi, r15d add rsi, r14 mov edi, ebx mov rbx, r8 call _mi_kpos mov r8, rbx mov [r12], rax jmp loc_75566 loc_754B9: xor r15d, r15d jmp loc_7557A loc_754C1: cmp byte ptr [rdi], 0FFh jz short loc_754D3 lea rax, [rdi+1] mov [rbp+var_30], rax movzx ecx, byte ptr [rdi] jmp short loc_754E9 loc_754D3: movzx eax, word ptr [rdi+1] rol ax, 8 movzx ecx, ax add rdi, 3 mov [rbp+var_30], rdi mov rax, rdi loc_754E9: movzx edx, byte ptr [r14] cmp edx, 0FFh jz short loc_754FD mov r12d, 1 jmp short loc_7550F loc_754FD: movzx edx, word ptr [r14+1] rol dx, 8 movzx edx, dx mov r12d, 3 loc_7550F: mov ebx, ecx sub ebx, edx jbe short loc_75566 mov ecx, ecx mov rsi, [rbp+var_40] add rsi, rcx mov rdi, rax mov r15d, edx mov rdx, rbx call bmove_upp mov ecx, r15d add r12d, ebx mov rax, [rbp+var_30] sub rax, r12 mov [rbp+var_30], rax cmp r15d, 0FEh ja short loc_7554A mov [rax], cl jmp short loc_7555B loc_7554A: mov byte ptr [rax], 0FFh mov rax, [rbp+var_30] mov [rax+2], cl mov rax, [rbp+var_30] mov [rax+1], ch loc_7555B: mov r15d, dword ptr [rbp+var_30] sub r15d, r14d loc_75562: mov r8, [rbp+var_48] loc_75566: movsxd rsi, r15d add rsi, r14 sub r8d, esi mov rdi, r14 mov rdx, r8 call _memmove loc_7557A: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7558C: movzx r12d, byte ptr [r14] mov esi, r12d and esi, 7Fh jz short loc_75566 and eax, 7Fh mov r11d, 1 mov edx, 1 loc_755A6: add rdi, rdx mov [rbp+var_30], rdi xor edx, edx test r12b, r12b cmovs edx, esi bt ecx, 4 mov rcx, [rbp+var_40] adc rcx, 0 movzx esi, byte ptr [rcx] cmp esi, 0FFh jz short loc_755D6 mov r9, rcx mov ecx, 1 jmp short loc_755E9 loc_755D6: mov r9, rcx movzx ecx, word ptr [rcx+1] rol cx, 8 movzx esi, cx mov ecx, 3 loc_755E9: test eax, eax jz short loc_75605 cmp byte ptr [rdi], 0FFh jz short loc_7560E lea rsi, [rdi+1] mov [rbp+var_30], rsi movzx edi, byte ptr [rdi] mov dword ptr [rbp+var_40], edi mov rdi, rsi jmp short loc_75624 loc_75605: mov dword ptr [rbp+var_40], 0 jmp short loc_75626 loc_7560E: movzx esi, word ptr [rdi+1] rol si, 8 movzx esi, si mov dword ptr [rbp+var_40], esi add rdi, 3 mov [rbp+var_30], rdi loc_75624: mov esi, eax loc_75626: mov ebx, esi sub ebx, edx jb loc_75566 mov [rbp+var_32], r10w add r9, rcx mov esi, esi add rsi, r9 mov rdx, rbx mov r15, r11 call bmove_upp mov edx, dword ptr [rbp+var_40] add edx, ebx xor eax, eax cmp edx, 0FFh setnb al xor ecx, ecx test r12b, r12b lea eax, [rax+rax+1] cmovns eax, ecx add r15d, ebx add r15d, eax mov rax, [rbp+var_30] sub rax, r15 mov r15d, eax sub r15d, r14d mov [rbp+var_30], rax test r12b, r12b js short loc_756A4 mov rcx, [r13+28h] movzx ecx, word ptr [rcx+12h] bt ecx, 4 adc edx, 0 cmp [rbp+var_32], 7Fh jb short loc_756E5 mov [rax+1], dl mov rax, [rbp+var_30] mov [rax], dh jmp loc_75562 loc_756A4: mov esi, edx lea rcx, [rax+1] mov dl, [r14] mov [rbp+var_30], rcx mov [rax], dl cmp [rbp+var_32], 7Fh jb short loc_756CC mov al, [r14+1] mov rcx, [rbp+var_30] lea rdx, [rcx+1] mov [rbp+var_30], rdx mov [rcx], al loc_756CC: mov ecx, esi cmp esi, 0FEh mov r8, [rbp+var_48] ja short loc_756EC mov rax, [rbp+var_30] mov [rax], cl jmp loc_75566 loc_756E5: mov [rax], dl jmp loc_75562 loc_756EC: mov rax, [rbp+var_30] mov byte ptr [rax], 0FFh mov rax, [rbp+var_30] mov [rax+2], cl mov rax, [rbp+var_30] mov [rax+1], ch jmp loc_75566
long long remove_key_0( long long a1, unsigned int a2, unsigned __int8 *a3, long long a4, unsigned __int8 *a5, long long *a6) { unsigned __int8 *v10; // rdi unsigned int v11; // r15d long long v12; // rdx __int16 v13; // cx unsigned __int8 v14; // al unsigned __int16 v15; // r10 char v16; // r12 int v17; // esi int v18; // eax int v19; // r11d long long v20; // rdx int v21; // ebx long long v22; // rax unsigned __int8 *v23; // rax unsigned int v24; // ecx unsigned int v25; // edx int v26; // r12d unsigned int v27; // ebx unsigned int v28; // r15d unsigned __int8 *v29; // rax unsigned __int8 *v31; // rdi unsigned int v32; // edx unsigned __int8 *v33; // rcx unsigned int v34; // esi unsigned __int8 *v35; // r9 long long v36; // rcx long long v37; // rbx int v38; // r15d int v39; // eax unsigned __int8 *v40; // rax __int16 v41; // dx unsigned int v42; // esi char v43; // dl unsigned __int8 v44; // al unsigned __int8 *v45; // rcx unsigned __int8 *v46; // [rsp+8h] [rbp-48h] long long v47; // [rsp+10h] [rbp-40h] int v48; // [rsp+10h] [rbp-40h] unsigned __int16 v49; // [rsp+1Eh] [rbp-32h] unsigned __int8 *v50; // [rsp+20h] [rbp-30h] BYREF v50 = a3; if ( (*(_BYTE *)(a1 + 10) & 0x2E) == 0 ) { v11 = a2 + *(unsigned __int16 *)(a1 + 18); if ( a6 != 0LL && a2 != 0 ) { v21 = (int)a5; v22 = mi_kpos(a2, &a3[v11]); LODWORD(a5) = v21; *a6 = v22; } goto LABEL_27; } v46 = a5; if ( (*(unsigned int ( **)(long long, _QWORD, unsigned __int8 **))(a1 + 72))(a1, a2, &v50) ) { v47 = a4; if ( a6 != 0LL && a2 != 0 ) *a6 = mi_kpos(a2, v50); v10 = v50; v11 = (_DWORD)v50 - (_DWORD)a3; LODWORD(a5) = (_DWORD)v46; if ( v50 == v46 ) goto LABEL_27; if ( (*(_BYTE *)(a1 + 10) & 0x20) != 0 ) { if ( *v50 == 0xFF ) { v24 = (unsigned __int16)__ROL2__(*(_WORD *)(v50 + 1), 8); v50 += 3; v23 = v50; } else { v23 = ++v50; v24 = *v10; } v25 = *a3; if ( v25 == 255 ) { v25 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8); v26 = 3; } else { v26 = 1; } v27 = v24 - v25; if ( v24 <= v25 ) goto LABEL_27; v28 = v25; bmove_upp(v23, v24 + v47, v24 - v25); v29 = &v50[-v27 - v26]; v50 = v29; if ( v28 > 0xFE ) { *v29 = -1; v50[2] = v28; v50[1] = BYTE1(v28); } else { *v29 = v28; } v11 = (_DWORD)v50 - (_DWORD)a3; } else { v12 = *(_QWORD *)(a1 + 40); v13 = *(_WORD *)(v12 + 18); if ( (v13 & 2) == 0 ) goto LABEL_27; v14 = *v50; if ( (*v50 & 0x80u) == 0 ) goto LABEL_27; v15 = *(_WORD *)(v12 + 20); if ( v15 < 0x7Fu ) { v16 = *a3; v17 = *a3 & 0x7F; if ( (*a3 & 0x7F) == 0 ) goto LABEL_27; v18 = v14 & 0x7F; v19 = 1; v20 = 1LL; } else { v16 = *a3; v17 = a3[1] | ((*a3 & 0x7F) << 8); if ( !v17 ) { LABEL_27: memmove(a3, &a3[v11], (unsigned int)a5 - ((_DWORD)a3 + v11)); return v11; } v18 = v50[1] | ((v14 & 0x7F) << 8); v19 = 2; v20 = 2LL; } v31 = &v50[v20]; v50 += v20; v32 = 0; if ( v16 < 0 ) v32 = v17; v33 = (unsigned __int8 *)(((v13 & 0x10) != 0) + v47); v34 = *v33; v35 = v33; if ( v34 == 255 ) { v34 = (unsigned __int16)__ROL2__(*(_WORD *)(v33 + 1), 8); v36 = 3LL; } else { v36 = 1LL; } if ( v18 ) { if ( *v31 == 0xFF ) { v48 = (unsigned __int16)__ROL2__(*(_WORD *)(v31 + 1), 8); v31 += 3; v50 = v31; } else { v50 = v31 + 1; v48 = *v31++; } v34 = v18; } else { v48 = 0; } v37 = v34 - v32; if ( v34 < v32 ) goto LABEL_27; v49 = v15; v38 = v19; bmove_upp(v31, &v35[v36 + v34], v37); v39 = 2 * ((unsigned int)(v37 + v48) >= 0xFF) + 1; if ( v16 >= 0 ) v39 = 0; v40 = &v50[-(unsigned int)(v39 + v37 + v38)]; v11 = (_DWORD)v40 - (_DWORD)a3; v50 = v40; if ( v16 < 0 ) { v42 = v37 + v48; v43 = *a3; v50 = v40 + 1; *v40 = v43; if ( v49 >= 0x7Fu ) { v44 = a3[1]; v45 = v50++; *v45 = v44; } LODWORD(a5) = (_DWORD)v46; if ( v42 > 0xFE ) { *v50 = -1; v50[2] = v42; v50[1] = BYTE1(v42); } else { *v50 = v42; } goto LABEL_27; } v41 = ((*(_WORD *)(*(_QWORD *)(a1 + 40) + 18LL) & 0x10) != 0) + v37 + v48; if ( v49 < 0x7Fu ) { *v40 = v41; } else { v40[1] = v41; *v50 = HIBYTE(v41); } } LODWORD(a5) = (_DWORD)v46; goto LABEL_27; } return 0; }
remove_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,R9 MOV R14,RDX MOV EBX,ESI MOV R13,RDI MOV qword ptr [RBP + -0x30],RDX TEST byte ptr [RDI + 0xa],0x2e JZ 0x00175482 MOV R15,RCX MOV qword ptr [RBP + -0x48],R8 LEA RDX,[RBP + -0x30] MOV RDI,R13 MOV ESI,EBX CALL qword ptr [R13 + 0x48] TEST EAX,EAX JZ 0x001754b9 MOV qword ptr [RBP + -0x40],R15 TEST R12,R12 SETZ AL TEST EBX,EBX SETZ CL OR CL,AL JNZ 0x001753fe MOV RSI,qword ptr [RBP + -0x30] MOV EDI,EBX CALL 0x0018443e MOV qword ptr [R12],RAX LAB_001753fe: MOV RDI,qword ptr [RBP + -0x30] MOV R15D,EDI SUB R15D,R14D MOV R8,qword ptr [RBP + -0x48] CMP RDI,R8 JZ 0x00175566 TEST byte ptr [R13 + 0xa],0x20 JNZ 0x001754c1 MOV RDX,qword ptr [R13 + 0x28] MOVZX ECX,word ptr [RDX + 0x12] TEST CL,0x2 JZ 0x00175566 MOVZX EAX,byte ptr [RDI] TEST AL,AL JNS 0x00175566 MOVZX R10D,word ptr [RDX + 0x14] CMP R10W,0x7f JC 0x0017558c MOVZX EDX,byte ptr [R14 + 0x1] MOVZX R12D,byte ptr [R14] MOV ESI,R12D AND ESI,0x7f SHL ESI,0x8 OR ESI,EDX JZ 0x00175566 MOVZX EDX,byte ptr [RDI + 0x1] AND EAX,0x7f SHL EAX,0x8 OR EAX,EDX MOV R11D,0x2 MOV EDX,0x2 JMP 0x001755a6 LAB_00175482: MOVZX R15D,word ptr [R13 + 0x12] ADD R15D,EBX TEST R12,R12 SETZ AL TEST EBX,EBX SETZ CL OR CL,AL JNZ 0x00175566 MOVSXD RSI,R15D ADD RSI,R14 MOV EDI,EBX MOV RBX,R8 CALL 0x0018443e MOV R8,RBX MOV qword ptr [R12],RAX JMP 0x00175566 LAB_001754b9: XOR R15D,R15D JMP 0x0017557a LAB_001754c1: CMP byte ptr [RDI],0xff JZ 0x001754d3 LEA RAX,[RDI + 0x1] MOV qword ptr [RBP + -0x30],RAX MOVZX ECX,byte ptr [RDI] JMP 0x001754e9 LAB_001754d3: MOVZX EAX,word ptr [RDI + 0x1] ROL AX,0x8 MOVZX ECX,AX ADD RDI,0x3 MOV qword ptr [RBP + -0x30],RDI MOV RAX,RDI LAB_001754e9: MOVZX EDX,byte ptr [R14] CMP EDX,0xff JZ 0x001754fd MOV R12D,0x1 JMP 0x0017550f LAB_001754fd: MOVZX EDX,word ptr [R14 + 0x1] ROL DX,0x8 MOVZX EDX,DX MOV R12D,0x3 LAB_0017550f: MOV EBX,ECX SUB EBX,EDX JBE 0x00175566 MOV ECX,ECX MOV RSI,qword ptr [RBP + -0x40] ADD RSI,RCX MOV RDI,RAX MOV R15D,EDX MOV RDX,RBX CALL 0x001aabfc MOV ECX,R15D ADD R12D,EBX MOV RAX,qword ptr [RBP + -0x30] SUB RAX,R12 MOV qword ptr [RBP + -0x30],RAX CMP R15D,0xfe JA 0x0017554a MOV byte ptr [RAX],CL JMP 0x0017555b LAB_0017554a: MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],CH LAB_0017555b: MOV R15D,dword ptr [RBP + -0x30] SUB R15D,R14D LAB_00175562: MOV R8,qword ptr [RBP + -0x48] LAB_00175566: MOVSXD RSI,R15D ADD RSI,R14 SUB R8D,ESI MOV RDI,R14 MOV RDX,R8 CALL 0x00129110 LAB_0017557a: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017558c: MOVZX R12D,byte ptr [R14] MOV ESI,R12D AND ESI,0x7f JZ 0x00175566 AND EAX,0x7f MOV R11D,0x1 MOV EDX,0x1 LAB_001755a6: ADD RDI,RDX MOV qword ptr [RBP + -0x30],RDI XOR EDX,EDX TEST R12B,R12B CMOVS EDX,ESI BT ECX,0x4 MOV RCX,qword ptr [RBP + -0x40] ADC RCX,0x0 MOVZX ESI,byte ptr [RCX] CMP ESI,0xff JZ 0x001755d6 MOV R9,RCX MOV ECX,0x1 JMP 0x001755e9 LAB_001755d6: MOV R9,RCX MOVZX ECX,word ptr [RCX + 0x1] ROL CX,0x8 MOVZX ESI,CX MOV ECX,0x3 LAB_001755e9: TEST EAX,EAX JZ 0x00175605 CMP byte ptr [RDI],0xff JZ 0x0017560e LEA RSI,[RDI + 0x1] MOV qword ptr [RBP + -0x30],RSI MOVZX EDI,byte ptr [RDI] MOV dword ptr [RBP + -0x40],EDI MOV RDI,RSI JMP 0x00175624 LAB_00175605: MOV dword ptr [RBP + -0x40],0x0 JMP 0x00175626 LAB_0017560e: MOVZX ESI,word ptr [RDI + 0x1] ROL SI,0x8 MOVZX ESI,SI MOV dword ptr [RBP + -0x40],ESI ADD RDI,0x3 MOV qword ptr [RBP + -0x30],RDI LAB_00175624: MOV ESI,EAX LAB_00175626: MOV EBX,ESI SUB EBX,EDX JC 0x00175566 MOV word ptr [RBP + -0x32],R10W ADD R9,RCX MOV ESI,ESI ADD RSI,R9 MOV RDX,RBX MOV R15,R11 CALL 0x001aabfc MOV EDX,dword ptr [RBP + -0x40] ADD EDX,EBX XOR EAX,EAX CMP EDX,0xff SETNC AL XOR ECX,ECX TEST R12B,R12B LEA EAX,[RAX + RAX*0x1 + 0x1] CMOVNS EAX,ECX ADD R15D,EBX ADD R15D,EAX MOV RAX,qword ptr [RBP + -0x30] SUB RAX,R15 MOV R15D,EAX SUB R15D,R14D MOV qword ptr [RBP + -0x30],RAX TEST R12B,R12B JS 0x001756a4 MOV RCX,qword ptr [R13 + 0x28] MOVZX ECX,word ptr [RCX + 0x12] BT ECX,0x4 ADC EDX,0x0 CMP word ptr [RBP + -0x32],0x7f JC 0x001756e5 MOV byte ptr [RAX + 0x1],DL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],DH JMP 0x00175562 LAB_001756a4: MOV ESI,EDX LEA RCX,[RAX + 0x1] MOV DL,byte ptr [R14] MOV qword ptr [RBP + -0x30],RCX MOV byte ptr [RAX],DL CMP word ptr [RBP + -0x32],0x7f JC 0x001756cc MOV AL,byte ptr [R14 + 0x1] MOV RCX,qword ptr [RBP + -0x30] LEA RDX,[RCX + 0x1] MOV qword ptr [RBP + -0x30],RDX MOV byte ptr [RCX],AL LAB_001756cc: MOV ECX,ESI CMP ESI,0xfe MOV R8,qword ptr [RBP + -0x48] JA 0x001756ec MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],CL JMP 0x00175566 LAB_001756e5: MOV byte ptr [RAX],DL JMP 0x00175562 LAB_001756ec: MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],CH JMP 0x00175566
int remove_key(long param_1,int param_2,byte *param_3,long param_4,byte *param_5,int8 *param_6 ) { ushort uVar1; ushort uVar2; int iVar3; uint uVar4; int8 uVar5; byte *pbVar6; byte bVar7; uint uVar8; int iVar9; long lVar10; int iVar11; uint uVar12; ulong uVar13; byte *pbVar14; byte bVar15; int iVar16; byte *local_38; local_38 = param_3; if ((*(byte *)(param_1 + 10) & 0x2e) == 0) { iVar3 = (uint)*(ushort *)(param_1 + 0x12) + param_2; if (param_2 != 0 && param_6 != (int8 *)0x0) { uVar5 = _mi_kpos(param_2,param_3 + iVar3); *param_6 = uVar5; } } else { iVar3 = (**(code **)(param_1 + 0x48))(param_1,param_2,&local_38); if (iVar3 == 0) { return 0; } if (param_2 != 0 && param_6 != (int8 *)0x0) { uVar5 = _mi_kpos(param_2,local_38); *param_6 = uVar5; } iVar9 = (int)param_3; iVar3 = (int)local_38 - iVar9; if (local_38 != param_5) { if ((*(byte *)(param_1 + 10) & 0x20) == 0) { uVar1 = *(ushort *)(*(long *)(param_1 + 0x28) + 0x12); if (((uVar1 & 2) != 0) && (bVar7 = *local_38, (char)bVar7 < '\0')) { uVar2 = *(ushort *)(*(long *)(param_1 + 0x28) + 0x14); if (uVar2 < 0x7f) { bVar15 = *param_3; uVar12 = bVar15 & 0x7f; if ((bVar15 & 0x7f) == 0) goto LAB_00175566; uVar4 = bVar7 & 0x7f; iVar16 = 1; lVar10 = 1; } else { bVar15 = *param_3; uVar12 = (bVar15 & 0x7f) << 8 | (uint)param_3[1]; if (uVar12 == 0) goto LAB_00175566; uVar4 = (bVar7 & 0x7f) << 8 | (uint)local_38[1]; iVar16 = 2; lVar10 = 2; } local_38 = local_38 + lVar10; uVar8 = 0; if ((char)bVar15 < '\0') { uVar8 = uVar12; } pbVar6 = (byte *)(param_4 + (ulong)((uVar1 >> 4 & 1) != 0)); uVar13 = (ulong)*pbVar6; if (*pbVar6 == 0xff) { uVar13 = (ulong)(ushort)(*(ushort *)(pbVar6 + 1) << 8 | *(ushort *)(pbVar6 + 1) >> 8); lVar10 = 3; } else { lVar10 = 1; } if (uVar4 == 0) { uVar12 = 0; } else { if (*local_38 == 0xff) { uVar12 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 | *(ushort *)(local_38 + 1) >> 8); pbVar14 = local_38 + 3; } else { pbVar14 = local_38 + 1; uVar12 = (uint)*local_38; } uVar13 = (ulong)uVar4; local_38 = pbVar14; } iVar11 = (uint)uVar13 - uVar8; if (uVar8 <= (uint)uVar13) { bmove_upp(local_38,pbVar6 + uVar13 + lVar10,iVar11); uVar12 = uVar12 + iVar11; iVar3 = (0xfe < uVar12) + 1 + (uint)(0xfe < uVar12); if (-1 < (char)bVar15) { iVar3 = 0; } pbVar6 = local_38 + -(ulong)(uint)(iVar16 + iVar11 + iVar3); iVar3 = (int)pbVar6 - iVar9; if ((char)bVar15 < '\0') { *pbVar6 = *param_3; local_38 = pbVar6 + 1; if (0x7e < uVar2) { local_38 = pbVar6 + 2; pbVar6[1] = param_3[1]; } if (uVar12 < 0xff) { *local_38 = (byte)uVar12; } else { *local_38 = 0xff; local_38[2] = (byte)uVar12; local_38[1] = (byte)(uVar12 >> 8); } } else { iVar9 = uVar12 + ((*(ushort *)(*(long *)(param_1 + 0x28) + 0x12) >> 4 & 1) != 0); bVar7 = (byte)iVar9; local_38 = pbVar6; if (uVar2 < 0x7f) { *pbVar6 = bVar7; } else { pbVar6[1] = bVar7; *pbVar6 = (byte)((uint)iVar9 >> 8); } } } } } else { if (*local_38 == 0xff) { uVar12 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 | *(ushort *)(local_38 + 1) >> 8); pbVar6 = local_38 + 3; } else { pbVar6 = local_38 + 1; uVar12 = (uint)*local_38; } uVar4 = (uint)*param_3; if (*param_3 == 0xff) { uVar4 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8); iVar16 = 3; } else { iVar16 = 1; } iVar11 = uVar12 - uVar4; local_38 = pbVar6; if (uVar4 <= uVar12 && iVar11 != 0) { bmove_upp(pbVar6,param_4 + (ulong)uVar12,iVar11); local_38 = local_38 + -(ulong)(uint)(iVar16 + iVar11); if (uVar4 < 0xff) { *local_38 = (byte)uVar4; } else { *local_38 = 0xff; local_38[2] = (byte)uVar4; local_38[1] = (byte)(uVar4 >> 8); } iVar3 = (int)local_38 - iVar9; } } } } LAB_00175566: memmove(param_3,param_3 + iVar3,(ulong)(uint)((int)param_5 - (int)(param_3 + iVar3))); return iVar3; }
48,788
mysql_hex_string
eloqsql/libmariadb/libmariadb/mariadb_lib.c
ulong STDCALL mysql_hex_string(char *to, const char *from, unsigned long len) { char *start= to; char hexdigits[]= "0123456789ABCDEF"; while (len--) { *to++= hexdigits[((unsigned char)*from) >> 4]; *to++= hexdigits[((unsigned char)*from) & 0x0F]; from++; } *to= 0; return (ulong)(to - start); }
O0
c
mysql_hex_string: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x28(%rbp) movq %rsi, -0x30(%rbp) movq %rdx, -0x38(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x92a00(%rip), %rax # 0xe65d0 movq %rax, -0x20(%rbp) movq 0x929fd(%rip), %rax # 0xe65d8 movq %rax, -0x18(%rbp) movb 0x929fb(%rip), %al # 0xe65e0 movb %al, -0x10(%rbp) movq -0x38(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x38(%rbp) cmpq $0x0, %rax je 0x53c4d movq -0x30(%rbp), %rax movzbl (%rax), %eax sarl $0x4, %eax cltq movb -0x20(%rbp,%rax), %cl movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0xf, %eax cltq movb -0x20(%rbp,%rax), %cl movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x53be8 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax movq %rax, -0x48(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x53c7f movq -0x48(%rbp), %rax addq $0x50, %rsp popq %rbp retq callq 0x382c0 nopw %cs:(%rax,%rax)
mysql_hex_string: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_38], rdx mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, cs:qword_E65D0 mov [rbp+var_20], rax mov rax, cs:qword_E65D8 mov [rbp+var_18], rax mov al, cs:byte_E65E0 mov [rbp+var_10], al loc_53BE8: mov rax, [rbp+var_38] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rcx cmp rax, 0 jz short loc_53C4D mov rax, [rbp+var_30] movzx eax, byte ptr [rax] sar eax, 4 cdqe mov cl, byte ptr [rbp+rax+var_20] mov rax, [rbp+var_28] mov rdx, rax add rdx, 1 mov [rbp+var_28], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 0Fh cdqe mov cl, byte ptr [rbp+rax+var_20] mov rax, [rbp+var_28] mov rdx, rax add rdx, 1 mov [rbp+var_28], rdx mov [rax], cl mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_53BE8 loc_53C4D: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_40] sub rax, rcx mov [rbp+var_48], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_53C7F mov rax, [rbp+var_48] add rsp, 50h pop rbp retn loc_53C7F: call ___stack_chk_fail
_BYTE * mysql_hex_string(_BYTE *a1, unsigned __int8 *a2, long long a3) { _BYTE *v4; // rax _BYTE *v8; // [rsp+28h] [rbp-28h] char v9[24]; // [rsp+30h] [rbp-20h] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] v10 = __readfsqword(0x28u); v8 = a1; strcpy(v9, "0123456789ABCDEF"); while ( a3-- ) { *v8 = v9[(int)*a2 >> 4]; v4 = v8 + 1; v8 += 2; *v4 = v9[*a2++ & 0xF]; } *v8 = 0; return (_BYTE *)(v8 - a1); }
mysql_hex_string: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RBP + -0x38],RDX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [0x001e65d0] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [0x001e65d8] MOV qword ptr [RBP + -0x18],RAX MOV AL,byte ptr [0x001e65e0] MOV byte ptr [RBP + -0x10],AL LAB_00153be8: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x38],RCX CMP RAX,0x0 JZ 0x00153c4d MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] SAR EAX,0x4 CDQE MOV CL,byte ptr [RBP + RAX*0x1 + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0xf CDQE MOV CL,byte ptr [RBP + RAX*0x1 + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00153be8 LAB_00153c4d: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00153c7f MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x50 POP RBP RET LAB_00153c7f: CALL 0x001382c0
long mysql_hex_string(char *param_1,byte *param_2,long param_3) { char *pcVar1; long in_FS_OFFSET; long local_40; byte *local_38; char *local_30; char local_28 [16]; char local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_28._0_8_ = s_0123456789ABCDEF_001e65d0._0_8_; local_28._8_8_ = s_0123456789ABCDEF_001e65d0._8_8_; local_18 = s_0123456789ABCDEF_001e65d0[0x10]; local_40 = param_3; local_38 = param_2; local_30 = param_1; while (local_40 != 0) { pcVar1 = local_30 + 1; *local_30 = local_28[(int)(uint)*local_38 >> 4]; local_30 = local_30 + 2; *pcVar1 = local_28[(int)(*local_38 & 0xf)]; local_38 = local_38 + 1; local_40 = local_40 + -1; } *local_30 = '\0'; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return (long)local_30 - (long)param_1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
48,789
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 0x7e55d movq %r14, %rdi movq %rbx, %rsi callq 0x3a3b8 testb %al, %al jne 0x7e55a addq $0x30, %r14 jmp 0x7e53c 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_7E53C: mov rax, [r15+8] cmp r14, rax jz short loc_7E55D 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_7E55A add r14, 30h ; '0' jmp short loc_7E53C loc_7E55A: mov rax, r14 loc_7E55D: 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_0017e53c: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x0017e55d MOV RDI,R14 MOV RSI,RBX CALL 0x0013a3b8 TEST AL,AL JNZ 0x0017e55a ADD R14,0x30 JMP 0x0017e53c LAB_0017e55a: MOV RAX,R14 LAB_0017e55d: 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; }
48,790
httplib::detail::if2ip(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string if2ip(int address_family, const std::string &ifn) { struct ifaddrs *ifap; getifaddrs(&ifap); auto se = detail::scope_exit([&] { freeifaddrs(ifap); }); std::string addr_candidate; for (auto ifa = ifap; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr && ifn == ifa->ifa_name && (AF_UNSPEC == address_family || ifa->ifa_addr->sa_family == address_family)) { if (ifa->ifa_addr->sa_family == AF_INET) { auto sa = reinterpret_cast<struct sockaddr_in *>(ifa->ifa_addr); char buf[INET_ADDRSTRLEN]; if (inet_ntop(AF_INET, &sa->sin_addr, buf, INET_ADDRSTRLEN)) { return std::string(buf, INET_ADDRSTRLEN); } } else if (ifa->ifa_addr->sa_family == AF_INET6) { auto sa = reinterpret_cast<struct sockaddr_in6 *>(ifa->ifa_addr); if (!IN6_IS_ADDR_LINKLOCAL(&sa->sin6_addr)) { char buf[INET6_ADDRSTRLEN] = {}; if (inet_ntop(AF_INET6, &sa->sin6_addr, buf, INET6_ADDRSTRLEN)) { // equivalent to mac's IN6_IS_ADDR_UNIQUE_LOCAL auto s6_addr_head = sa->sin6_addr.s6_addr[0]; if (s6_addr_head == 0xfc || s6_addr_head == 0xfd) { addr_candidate = std::string(buf, INET6_ADDRSTRLEN); } else { return std::string(buf, INET6_ADDRSTRLEN); } } } } } } return addr_candidate; }
O2
c
httplib::detail::if2ip(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x58(%rsp), %r15 movq %r15, %rdi callq 0x8a50 leaq 0x20(%rsp), %r12 andq $0x0, 0x8(%r12) movq %r15, (%r12) leaq 0x43f(%rip), %rax # 0x2b62c movq %rax, 0x18(%r12) leaq 0x439(%rip), %rax # 0x2b632 movq %rax, 0x10(%r12) leaq 0x80(%rsp), %rdi movq %r12, %rsi callq 0x151ec movq %r12, %rdi callq 0x35882 leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) movq (%r15), %r15 testq %r15, %r15 je 0x2b30b cmpq $0x0, 0x18(%r15) je 0x2b227 movq 0x8(%r15), %rsi movq %r14, %rdi callq 0x12b02 testb %al, %al je 0x2b227 movq 0x18(%r15), %r13 movzwl (%r13), %eax testl %ebp, %ebp je 0x2b25b cmpl %ebp, %eax jne 0x2b227 cmpl $0xa, %eax je 0x2b284 cmpl $0x2, %eax jne 0x2b227 addq $0x4, %r13 pushq $0x2 popq %rdi movq %r13, %rsi movq %r12, %rdx pushq $0x10 popq %rcx callq 0x8650 testq %rax, %rax je 0x2b227 jmp 0x2b376 movl 0x8(%r13), %eax movl $0xc0ff, %ecx # imm = 0xC0FF andl %ecx, %eax cmpl $0x80fe, %eax # imm = 0x80FE je 0x2b227 addq $0x8, %r13 xorps %xmm0, %xmm0 movups %xmm0, 0x3e(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) pushq $0xa popq %rdi movq %r13, %rsi movq %r12, %rdx pushq $0x2e popq %rcx callq 0x8650 testq %rax, %rax je 0x2b227 movb (%r13), %al andb $-0x2, %al cmpb $-0x4, %al jne 0x2b391 leaq 0x70(%rsp), %rax movq %rax, 0x60(%rsp) leaq 0x60(%rsp), %r13 movq %r13, %rdi movq %r12, %rsi leaq 0x4e(%rsp), %rdx callq 0xa5ea movq %rsp, %rdi movq %r13, %rsi callq 0x86e0 movq %r13, %rdi callq 0x8b18 jmp 0x2b227 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq (%rsp), %rcx leaq 0x10(%rsp), %rdx cmpq %rdx, %rcx je 0x2b32e movq %rcx, (%rbx) movq 0x10(%rsp), %rax movq %rax, 0x10(%rbx) jmp 0x2b334 movups (%rdx), %xmm0 movups %xmm0, (%rax) movq 0x8(%rsp), %rax movq %rax, 0x8(%rbx) movq %rdx, (%rsp) andq $0x0, 0x8(%rsp) movb $0x0, 0x10(%rsp) movq %rsp, %rdi callq 0x8b18 leaq 0x80(%rsp), %rdi callq 0x15244 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30(%rsp), %rdx leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0xa5ea jmp 0x2b34c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x20(%rsp), %rsi movq %rbx, %rdi leaq 0x4e(%rsp), %rdx callq 0xa5ea jmp 0x2b34c jmp 0x2b3b0 jmp 0x2b3b0 movq %rax, %rbx movq %rsp, %rdi callq 0x8b18 leaq 0x80(%rsp), %rdi callq 0x15244 movq %rbx, %rdi callq 0x89c0
_ZN7httplib6detail5if2ipEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rdx mov ebp, esi mov rbx, rdi lea r15, [rsp+0D8h+var_80] mov rdi, r15 call _getifaddrs lea r12, [rsp+0D8h+var_B8] and qword ptr [r12+8], 0 mov [r12], r15 lea rax, _ZNSt17_Function_handlerIFvvEZN7httplib6detail5if2ipEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<void ()(void),httplib::detail::if2ip(int,std::string const&)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&) mov [r12+18h], rax lea rax, _ZNSt17_Function_handlerIFvvEZN7httplib6detail5if2ipEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlvE_E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(void),httplib::detail::if2ip(int,std::string const&)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+10h], rax lea rdi, [rsp+0D8h+var_58] mov rsi, r12 call _ZN7httplib6detail10scope_exitC2EOSt8functionIFvvEE; httplib::detail::scope_exit::scope_exit(std::function<void ()(void)> &&) mov rdi, r12; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rax, [rsp+0D8h+var_C8] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 loc_2B227: mov r15, [r15] test r15, r15 jz loc_2B30B cmp qword ptr [r15+18h], 0 jz short loc_2B227 mov rsi, [r15+8] mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_2B227 mov r13, [r15+18h] movzx eax, word ptr [r13+0] test ebp, ebp jz short loc_2B25B cmp eax, ebp jnz short loc_2B227 loc_2B25B: cmp eax, 0Ah jz short loc_2B284 cmp eax, 2 jnz short loc_2B227 add r13, 4 push 2 pop rdi mov rsi, r13 mov rdx, r12 push 10h pop rcx call _inet_ntop test rax, rax jz short loc_2B227 jmp loc_2B376 loc_2B284: mov eax, [r13+8] mov ecx, 0C0FFh and eax, ecx cmp eax, 80FEh jz short loc_2B227 add r13, 8 xorps xmm0, xmm0 movups [rsp+0D8h+var_A8+0Eh], xmm0 movaps [rsp+0D8h+var_A8], xmm0 movaps [rsp+0D8h+var_B8], xmm0 push 0Ah pop rdi mov rsi, r13 mov rdx, r12 push 2Eh ; '.' pop rcx call _inet_ntop test rax, rax jz loc_2B227 mov al, [r13+0] and al, 0FEh cmp al, 0FCh jnz loc_2B391 lea rax, [rsp+0D8h+var_68] mov [rsp+0D8h+var_78], rax lea r13, [rsp+0D8h+var_78] mov rdi, r13 mov rsi, r12 lea rdx, [rsp+0D8h+var_8A] 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) mov rdi, rsp mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_2B227 loc_2B30B: lea rax, [rbx+10h] mov [rbx], rax mov rcx, [rsp+0D8h+var_D8] lea rdx, [rsp+0D8h+var_C8] cmp rcx, rdx jz short loc_2B32E mov [rbx], rcx mov rax, [rsp+0D8h+var_C8] mov [rbx+10h], rax jmp short loc_2B334 loc_2B32E: movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rax], xmm0 loc_2B334: mov rax, [rsp+0D8h+var_D0] mov [rbx+8], rax mov [rsp+0D8h+var_D8], rdx and [rsp+0D8h+var_D0], 0 mov byte ptr [rsp+0D8h+var_C8], 0 loc_2B34C: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_58]; this call _ZN7httplib6detail10scope_exitD2Ev; httplib::detail::scope_exit::~scope_exit() mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2B376: lea rax, [rbx+10h] mov [rbx], rax lea rdx, [rsp+0D8h+var_A8] lea rsi, [rsp+0D8h+var_B8] 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_2B34C loc_2B391: lea rax, [rbx+10h] mov [rbx], rax lea rsi, [rsp+0D8h+var_B8] mov rdi, rbx lea rdx, [rsp+0D8h+var_8A] 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_2B34C jmp short loc_2B3B0 jmp short $+2 loc_2B3B0: mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_78]; this call _ZN7httplib6detail10scope_exitD2Ev; httplib::detail::scope_exit::~scope_exit() mov rdi, rbx call __Unwind_Resume
long long httplib::detail::if2ip(long long a1, int a2, long long a3) { _QWORD *v4; // r15 unsigned __int16 *v5; // r13 int v6; // eax _BYTE *v7; // r13 __int128 *v9; // [rsp+0h] [rbp-D8h] BYREF long long v10; // [rsp+8h] [rbp-D0h] __int128 v11; // [rsp+10h] [rbp-C8h] BYREF __int128 v12; // [rsp+20h] [rbp-B8h] BYREF _BYTE v13[30]; // [rsp+30h] [rbp-A8h] BYREF _BYTE v14[10]; // [rsp+4Eh] [rbp-8Ah] BYREF _BYTE v15[8]; // [rsp+58h] [rbp-80h] BYREF _QWORD v16[2]; // [rsp+60h] [rbp-78h] BYREF char v17; // [rsp+70h] [rbp-68h] BYREF _BYTE v18[88]; // [rsp+80h] [rbp-58h] BYREF v4 = v15; getifaddrs(v15); v12 = (unsigned long long)v15; *(_QWORD *)&v13[8] = std::_Function_handler<void ()(void),httplib::detail::if2ip(int,std::string const&)::{lambda(void)#1}>::_M_invoke; *(_QWORD *)v13 = std::_Function_handler<void ()(void),httplib::detail::if2ip(int,std::string const&)::{lambda(void)#1}>::_M_manager; httplib::detail::scope_exit::scope_exit((long long)v18); std::_Function_base::~_Function_base((std::_Function_base *)&v12); v9 = &v11; v10 = 0LL; LOBYTE(v11) = 0; while ( 1 ) { v4 = (_QWORD *)*v4; if ( !v4 ) break; if ( v4[3] ) { if ( std::operator==<char>(a3) ) { v5 = (unsigned __int16 *)v4[3]; v6 = *v5; if ( !a2 || v6 == a2 ) { if ( v6 == 10 ) { if ( (*((_DWORD *)v5 + 2) & 0xC0FF) != 0x80FE ) { v7 = v5 + 4; memset(v13, 0, sizeof(v13)); v12 = 0LL; if ( inet_ntop(10LL, v7, &v12, 46LL) ) { if ( (*v7 & 0xFE) != 0xFC ) { *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, &v12, (long long)v14); goto LABEL_19; } v16[0] = &v17; std::string::_M_construct<char const*>((long long)v16, &v12, (long long)v14); std::string::operator=(&v9, v16); std::string::~string(v16); } } } else if ( v6 == 2 && inet_ntop(2LL, v5 + 2, &v12, 16LL) ) { *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, &v12, (long long)v13); goto LABEL_19; } } } } } *(_QWORD *)a1 = a1 + 16; if ( v9 == &v11 ) { *(_OWORD *)(a1 + 16) = v11; } else { *(_QWORD *)a1 = v9; *(_QWORD *)(a1 + 16) = v11; } *(_QWORD *)(a1 + 8) = v10; v9 = &v11; v10 = 0LL; LOBYTE(v11) = 0; LABEL_19: std::string::~string(&v9); httplib::detail::scope_exit::~scope_exit((httplib::detail::scope_exit *)v18); return a1; }
if2ip: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LEA R15,[RSP + 0x58] MOV RDI,R15 CALL 0x00108a50 LEA R12,[RSP + 0x20] AND qword ptr [R12 + 0x8],0x0 MOV qword ptr [R12],R15 LEA RAX,[0x12b62c] MOV qword ptr [R12 + 0x18],RAX LEA RAX,[0x12b632] MOV qword ptr [R12 + 0x10],RAX LEA RDI,[RSP + 0x80] MOV RSI,R12 CALL 0x001151ec MOV RDI,R12 CALL 0x00135882 LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LAB_0012b227: MOV R15,qword ptr [R15] TEST R15,R15 JZ 0x0012b30b CMP qword ptr [R15 + 0x18],0x0 JZ 0x0012b227 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,R14 CALL 0x00112b02 TEST AL,AL JZ 0x0012b227 MOV R13,qword ptr [R15 + 0x18] MOVZX EAX,word ptr [R13] TEST EBP,EBP JZ 0x0012b25b CMP EAX,EBP JNZ 0x0012b227 LAB_0012b25b: CMP EAX,0xa JZ 0x0012b284 CMP EAX,0x2 JNZ 0x0012b227 ADD R13,0x4 PUSH 0x2 POP RDI MOV RSI,R13 MOV RDX,R12 PUSH 0x10 POP RCX CALL 0x00108650 TEST RAX,RAX JZ 0x0012b227 JMP 0x0012b376 LAB_0012b284: MOV EAX,dword ptr [R13 + 0x8] MOV ECX,0xc0ff AND EAX,ECX CMP EAX,0x80fe JZ 0x0012b227 ADD R13,0x8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x3e],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 PUSH 0xa POP RDI MOV RSI,R13 MOV RDX,R12 PUSH 0x2e POP RCX CALL 0x00108650 TEST RAX,RAX JZ 0x0012b227 MOV AL,byte ptr [R13] AND AL,0xfe CMP AL,0xfc JNZ 0x0012b391 LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0x60],RAX LAB_0012b2de: LEA R13,[RSP + 0x60] MOV RDI,R13 MOV RSI,R12 LEA RDX,[RSP + 0x4e] CALL 0x0010a5ea MOV RDI,RSP MOV RSI,R13 CALL 0x001086e0 MOV RDI,R13 CALL 0x00108b18 JMP 0x0012b227 LAB_0012b30b: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RCX,qword ptr [RSP] LEA RDX,[RSP + 0x10] CMP RCX,RDX JZ 0x0012b32e MOV qword ptr [RBX],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x10],RAX JMP 0x0012b334 LAB_0012b32e: MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RAX],XMM0 LAB_0012b334: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RSP],RDX AND qword ptr [RSP + 0x8],0x0 MOV byte ptr [RSP + 0x10],0x0 LAB_0012b34c: MOV RDI,RSP CALL 0x00108b18 LEA RDI,[RSP + 0x80] CALL 0x00115244 MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012b376: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[RSP + 0x30] LAB_0012b382: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0010a5ea JMP 0x0012b34c LAB_0012b391: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_0012b398: LEA RSI,[RSP + 0x20] MOV RDI,RBX LEA RDX,[RSP + 0x4e] CALL 0x0010a5ea LAB_0012b3aa: JMP 0x0012b34c
/* httplib::detail::if2ip(int, std::__cxx11::string const&) */ detail * __thiscall httplib::detail::if2ip(detail *this,int param_1,string *param_2) { ushort *puVar1; bool bVar2; uint uVar3; char *pcVar4; long *plVar5; int1 *local_d8; int8 local_d0; int1 local_c8; int7 uStack_c7; int8 uStack_c0; long *local_b8; int8 uStack_b0; code *local_a8; int6 uStack_a0; int2 uStack_9a; int6 uStack_98; int8 uStack_92; int1 local_8a [10]; long local_80; int1 *local_78 [2]; int1 local_68 [16]; scope_exit local_58 [40]; plVar5 = &local_80; getifaddrs(plVar5); uStack_b0 = 0; uStack_a0 = 0x12b62c; uStack_9a = 0; local_a8 = std:: _Function_handler<void(),httplib::detail::if2ip(int,std::__cxx11::string_const&)::{lambda()#1}> ::_M_manager; local_b8 = plVar5; scope_exit::scope_exit(local_58,(_Function_base *)&local_b8); std::_Function_base::~_Function_base((_Function_base *)&local_b8); local_d8 = &local_c8; local_d0 = 0; local_c8 = 0; do { do { while( true ) { do { do { do { plVar5 = (long *)*plVar5; if (plVar5 == (long *)0x0) { *(detail **)this = this + 0x10; if (local_d8 == &local_c8) { *(ulong *)(this + 0x10) = CONCAT71(uStack_c7,local_c8); *(int8 *)(this + 0x18) = uStack_c0; } else { *(int1 **)this = local_d8; *(ulong *)(this + 0x10) = CONCAT71(uStack_c7,local_c8); } *(int8 *)(this + 8) = local_d0; local_d0 = 0; local_c8 = 0; local_d8 = &local_c8; goto LAB_0012b34c; } } while (plVar5[3] == 0); bVar2 = std::operator==(param_2,(char *)plVar5[1]); } while (!bVar2); puVar1 = (ushort *)plVar5[3]; uVar3 = (uint)*puVar1; } while ((param_1 != 0) && (uVar3 != param_1)); if (uVar3 != 10) break; if ((*(uint *)(puVar1 + 4) & 0xc0ff) != 0x80fe) { uStack_98 = 0; uStack_92 = 0; local_a8 = (code *)0x0; uStack_a0 = 0; uStack_9a = 0; local_b8 = (long *)0x0; uStack_b0 = 0; pcVar4 = inet_ntop(10,puVar1 + 4,(char *)&local_b8,0x2e); if (pcVar4 != (char *)0x0) { if ((puVar1[4] & 0xfe) != 0xfc) { *(detail **)this = this + 0x10; /* try { // try from 0012b398 to 0012b3a9 has its CatchHandler @ 0012b3ac */ std::__cxx11::string::_M_construct<char_const*>(this,&local_b8,local_8a); goto LAB_0012b34c; } local_78[0] = local_68; /* try { // try from 0012b2de to 0012b2f2 has its CatchHandler @ 0012b3b0 */ std::__cxx11::string::_M_construct<char_const*> ((string *)local_78,(_Function_base *)&local_b8,local_8a); std::__cxx11::string::operator=((string *)&local_d8,(string *)local_78); std::__cxx11::string::~string((string *)local_78); } } } } while (uVar3 != 2); pcVar4 = inet_ntop(2,puVar1 + 2,(char *)&local_b8,0x10); } while (pcVar4 == (char *)0x0); *(detail **)this = this + 0x10; /* try { // try from 0012b382 to 0012b38e has its CatchHandler @ 0012b3ae */ std::__cxx11::string::_M_construct<char_const*>(this,&local_b8,&local_a8); LAB_0012b34c: std::__cxx11::string::~string((string *)&local_d8); scope_exit::~scope_exit(local_58); return this; }
48,791
waitForVisibilityNotify
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c
static GLFWbool waitForVisibilityNotify(_GLFWwindow* window) { XEvent dummy; double timeout = 0.1; while (!XCheckTypedWindowEvent(_glfw.x11.display, window->x11.handle, VisibilityNotify, &dummy)) { if (!waitForEvent(&timeout)) return GLFW_FALSE; } return GLFW_TRUE; }
O3
c
waitForVisibilityNotify: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rdi, %rbx movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A movq %rsp, %r14 movq %rax, (%r14) leaq 0x851f7(%rip), %r12 # 0xa8638 leaq 0x8(%rsp), %r15 movq 0x1fec0(%r12), %rdi movq 0x348(%rbx), %rsi movl $0xf, %edx movq %r15, %rcx callq 0xcaf0 testl %eax, %eax jne 0x23472 movq %r14, %rdi callq 0x21bf9 testl %eax, %eax jne 0x23446 addq $0xc8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
waitForVisibilityNotify: push r15 push r14 push r12 push rbx sub rsp, 0C8h mov rbx, rdi mov rax, 3FB999999999999Ah mov r14, rsp mov [r14], rax lea r12, _glfw lea r15, [rsp+0E8h+var_E0] loc_23446: mov rdi, [r12+1FEC0h] mov rsi, [rbx+348h] mov edx, 0Fh mov rcx, r15 call _XCheckTypedWindowEvent test eax, eax jnz short loc_23472 mov rdi, r14 call waitForEvent test eax, eax jnz short loc_23446 loc_23472: add rsp, 0C8h pop rbx pop r12 pop r14 pop r15 retn
long long waitForVisibilityNotify(long long a1) { long long v1; // rsi long long result; // rax char v3; // dl double v4; // [rsp+0h] [rbp-E8h] BYREF _BYTE v5[224]; // [rsp+8h] [rbp-E0h] BYREF v4 = 0.1; do { v1 = *(_QWORD *)(a1 + 840); result = XCheckTypedWindowEvent(*(_QWORD *)&glfw[32688], v1, 15LL, v5); if ( (_DWORD)result ) break; result = waitForEvent(&v4, v1, v3); } while ( (_DWORD)result ); return result; }
waitForVisibilityNotify: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RDI MOV RAX,0x3fb999999999999a MOV R14,RSP MOV qword ptr [R14],RAX LEA R12,[0x1a8638] LEA R15,[RSP + 0x8] LAB_00123446: MOV RDI,qword ptr [R12 + 0x1fec0] MOV RSI,qword ptr [RBX + 0x348] MOV EDX,0xf MOV RCX,R15 CALL 0x0010caf0 TEST EAX,EAX JNZ 0x00123472 MOV RDI,R14 CALL 0x00121bf9 TEST EAX,EAX JNZ 0x00123446 LAB_00123472: ADD RSP,0xc8 POP RBX POP R12 POP R14 POP R15 RET
void waitForVisibilityNotify(long param_1) { int iVar1; int8 local_e8; int1 local_e0 [192]; local_e8 = 0x3fb999999999999a; do { iVar1 = XCheckTypedWindowEvent(DAT_001c84f8,*(int8 *)(param_1 + 0x348),0xf,local_e0); if (iVar1 != 0) { return; } iVar1 = waitForEvent(&local_e8); } while (iVar1 != 0); return; }
48,792
crc16
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
uint16_t crc16(const uint8_t *bytes, uint32_t count) { uint16_t crc = 0xFFFF; for (uint32_t i = 0; i < count; i++) { crc ^= bytes[i]; for (uint32_t j = 0; j < 8; j++) { uint16_t temp = crc & 0x0001; crc >>= 1; if (temp) crc ^= 0xA001; } } return crc; }
O0
cpp
crc16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movw $0xffff, -0xe(%rbp) # imm = 0xFFFF movl $0x0, -0x14(%rbp) movl -0x14(%rbp), %eax cmpl -0xc(%rbp), %eax jae 0x9de5 movq -0x8(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %ecx movzwl -0xe(%rbp), %eax xorl %ecx, %eax movw %ax, -0xe(%rbp) movl $0x0, -0x18(%rbp) cmpl $0x8, -0x18(%rbp) jae 0x9dd8 movzwl -0xe(%rbp), %eax andl $0x1, %eax movw %ax, -0x1a(%rbp) movzwl -0xe(%rbp), %eax sarl %eax movw %ax, -0xe(%rbp) cmpw $0x0, -0x1a(%rbp) je 0x9dcb movzwl -0xe(%rbp), %eax xorl $0xa001, %eax # imm = 0xA001 movw %ax, -0xe(%rbp) jmp 0x9dcd movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x9d9c jmp 0x9dda movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x9d78 movw -0xe(%rbp), %ax popq %rbp retq nopl (%rax,%rax)
crc16: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_E], 0FFFFh mov [rbp+var_14], 0 loc_9D78: mov eax, [rbp+var_14] cmp eax, [rbp+var_C] jnb short loc_9DE5 mov rax, [rbp+var_8] mov ecx, [rbp+var_14] movzx ecx, byte ptr [rax+rcx] movzx eax, [rbp+var_E] xor eax, ecx mov [rbp+var_E], ax mov [rbp+var_18], 0 loc_9D9C: cmp [rbp+var_18], 8 jnb short loc_9DD8 movzx eax, [rbp+var_E] and eax, 1 mov [rbp+var_1A], ax movzx eax, [rbp+var_E] sar eax, 1 mov [rbp+var_E], ax cmp [rbp+var_1A], 0 jz short loc_9DCB movzx eax, [rbp+var_E] xor eax, 0A001h mov [rbp+var_E], ax loc_9DCB: jmp short $+2 loc_9DCD: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_9D9C loc_9DD8: jmp short $+2 loc_9DDA: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_9D78 loc_9DE5: mov ax, [rbp+var_E] pop rbp retn
unsigned __int16 crc16(long long a1, unsigned int a2) { __int16 v3; // [rsp+0h] [rbp-1Ah] unsigned int j; // [rsp+2h] [rbp-18h] unsigned int i; // [rsp+6h] [rbp-14h] unsigned __int16 v6; // [rsp+Ch] [rbp-Eh] v6 = -1; for ( i = 0; i < a2; ++i ) { v6 ^= *(unsigned __int8 *)(a1 + i); for ( j = 0; j < 8; ++j ) { v3 = v6 & 1; v6 = (int)v6 >> 1; if ( v3 ) v6 ^= 0xA001u; } } return v6; }
crc16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV word ptr [RBP + -0xe],0xffff MOV dword ptr [RBP + -0x14],0x0 LAB_00109d78: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0xc] JNC 0x00109de5 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,byte ptr [RAX + RCX*0x1] MOVZX EAX,word ptr [RBP + -0xe] XOR EAX,ECX MOV word ptr [RBP + -0xe],AX MOV dword ptr [RBP + -0x18],0x0 LAB_00109d9c: CMP dword ptr [RBP + -0x18],0x8 JNC 0x00109dd8 MOVZX EAX,word ptr [RBP + -0xe] AND EAX,0x1 MOV word ptr [RBP + -0x1a],AX MOVZX EAX,word ptr [RBP + -0xe] SAR EAX,0x1 MOV word ptr [RBP + -0xe],AX CMP word ptr [RBP + -0x1a],0x0 JZ 0x00109dcb MOVZX EAX,word ptr [RBP + -0xe] XOR EAX,0xa001 MOV word ptr [RBP + -0xe],AX LAB_00109dcb: JMP 0x00109dcd LAB_00109dcd: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x00109d9c LAB_00109dd8: JMP 0x00109dda LAB_00109dda: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00109d78 LAB_00109de5: MOV AX,word ptr [RBP + -0xe] POP RBP RET
int4 crc16(long param_1,uint param_2) { ushort uVar1; int4 local_20; int4 local_1c; int2 local_16; local_16 = 0xffff; for (local_1c = 0; local_1c < param_2; local_1c = local_1c + 1) { local_16 = local_16 ^ *(byte *)(param_1 + (ulong)local_1c); for (local_20 = 0; local_20 < 8; local_20 = local_20 + 1) { uVar1 = local_16 & 1; local_16 = (ushort)((int)(uint)local_16 >> 1); if (uVar1 != 0) { local_16 = local_16 ^ 0xa001; } } } return CONCAT22((short)(local_1c >> 0x10),local_16); }
48,793
crc16
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
uint16_t crc16(const uint8_t *bytes, uint32_t count) { uint16_t crc = 0xFFFF; for (uint32_t i = 0; i < count; i++) { crc ^= bytes[i]; for (uint32_t j = 0; j < 8; j++) { uint16_t temp = crc & 0x0001; crc >>= 1; if (temp) crc ^= 0xA001; } } return crc; }
O3
cpp
crc16: testl %esi, %esi je 0x7ab8 movl %esi, %ecx movw $0xffff, %ax # imm = 0xFFFF xorl %edx, %edx movzbl (%rdi,%rdx), %esi xorl %esi, %eax movl $0x8, %esi movzwl %ax, %r8d shrl %r8d movl %r8d, %r9d xorl $0xffffa001, %r9d # imm = 0xFFFFA001 testb $0x1, %al cmovel %r8d, %r9d movl %r9d, %eax decl %esi jne 0x7a91 incq %rdx cmpq %rcx, %rdx jne 0x7a86 retq movw $0xffff, %ax # imm = 0xFFFF retq
crc16: test esi, esi jz short loc_7AB8 mov ecx, esi mov ax, 0FFFFh xor edx, edx loc_7A86: movzx esi, byte ptr [rdi+rdx] xor eax, esi mov esi, 8 loc_7A91: movzx r8d, ax shr r8d, 1 mov r9d, r8d xor r9d, 0FFFFA001h test al, 1 cmovz r9d, r8d mov eax, r9d dec esi jnz short loc_7A91 inc rdx cmp rdx, rcx jnz short loc_7A86 retn loc_7AB8: mov ax, 0FFFFh retn
unsigned __int16 crc16(long long a1, unsigned int a2) { long long v2; // rcx unsigned __int16 result; // ax long long i; // rdx int v5; // esi unsigned int v6; // r9d if ( !a2 ) return -1; v2 = a2; result = -1; for ( i = 0LL; i != v2; ++i ) { result ^= *(unsigned __int8 *)(a1 + i); v5 = 8; do { v6 = (result >> 1) ^ 0xFFFFA001; if ( (result & 1) == 0 ) v6 = result >> 1; result = v6; --v5; } while ( v5 ); } return result; }
crc16: TEST ESI,ESI JZ 0x00107ab8 MOV ECX,ESI MOV AX,0xffff XOR EDX,EDX LAB_00107a86: MOVZX ESI,byte ptr [RDI + RDX*0x1] XOR EAX,ESI MOV ESI,0x8 LAB_00107a91: MOVZX R8D,AX SHR R8D,0x1 MOV R9D,R8D XOR R9D,0xffffa001 TEST AL,0x1 CMOVZ R9D,R8D MOV EAX,R9D DEC ESI JNZ 0x00107a91 INC RDX CMP RDX,RCX JNZ 0x00107a86 RET LAB_00107ab8: MOV AX,0xffff RET
ulong crc16(long param_1,uint param_2) { ulong uVar1; ulong uVar2; ulong uVar3; ulong uVar4; int iVar5; if (param_2 != 0) { uVar3 = 0xffff; uVar4 = 0; do { uVar3 = (ulong)((uint)uVar3 ^ (uint)*(byte *)(param_1 + uVar4)); iVar5 = 8; do { uVar1 = (uVar3 & 0xffff) >> 1; uVar2 = uVar3 & 1; uVar3 = (ulong)((uint)uVar1 ^ 0xffffa001); if (uVar2 == 0) { uVar3 = uVar1; } iVar5 = iVar5 + -1; } while (iVar5 != 0); uVar4 = uVar4 + 1; } while (uVar4 != param_2); return uVar3; } return 0xffff; }
48,794
my_write
eloqsql/mysys/my_write.c
size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags) { size_t writtenbytes, written; uint errors; DBUG_ENTER("my_write"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); errors= 0; written= 0; if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; /* The behavior of write(fd, buf, 0) is not portable */ if (unlikely(!Count)) DBUG_RETURN(0); for (;;) { #ifdef _WIN32 if(Filedes < 0) { my_errno= errno= EBADF; DBUG_RETURN((size_t)-1); } writtenbytes= my_win_write(Filedes, Buffer, Count); #else writtenbytes= write(Filedes, Buffer, Count); #endif /** To simulate the write error set the errno = error code and the number pf written bytes to -1. */ DBUG_EXECUTE_IF ("simulate_file_write_error", if (!errors) { errno= ENOSPC; writtenbytes= (size_t) -1; }); if (writtenbytes == Count) break; if (writtenbytes != (size_t) -1) { /* Safeguard */ written+= writtenbytes; Buffer+= writtenbytes; Count-= writtenbytes; } my_errno= errno; DBUG_PRINT("error",("Write only %ld bytes, error: %d", (long) writtenbytes, my_errno)); #ifndef NO_BACKGROUND if (my_thread_var->abort) MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ if ((my_errno == ENOSPC || my_errno == EDQUOT) && (MyFlags & MY_WAIT_IF_FULL)) { wait_for_free_space(my_filename(Filedes), errors); errors++; continue; } if ((writtenbytes == 0 || writtenbytes == (size_t) -1)) { if (my_errno == EINTR) { DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld", (long) writtenbytes)); continue; /* Interrupted */ } if (!writtenbytes && !errors++) /* Retry once */ { /* We may come here if the file quota is exeeded */ errno= EFBIG; /* Assume this is the error */ continue; } } else continue; /* Retry */ #endif /* Don't give a warning if it's ok that we only write part of the data */ if (MyFlags & (MY_NABP | MY_FNABP)) { if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ } break; /* Return bytes written */ } if (MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN(0); /* Want only errors */ DBUG_RETURN(writtenbytes+written); }
O3
c
my_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movl %edi, %r12d xorl %ebx, %ebx movl $0x0, %r13d testb $0x1a, %cl jne 0x2a3ff leaq 0x38c28c(%rip), %rax # 0x3b6688 movq (%rax), %r13 testq %r15, %r15 je 0x2a543 orq %rcx, %r13 movl %r12d, %edi movq %rsi, -0x40(%rbp) movq %r15, %rdx callq 0x28110 cmpq %r15, %rax jne 0x2a435 movq %r15, %rcx xorl %ebx, %ebx testb $0x6, %r13b je 0x2a540 xorl %ebx, %ebx jmp 0x2a543 movq %rax, %r14 movq $0x0, -0x38(%rbp) callq 0x28050 movq %r15, %rcx movq %rax, -0x48(%rbp) xorl %ebx, %ebx movq -0x40(%rbp), %r15 movl %r12d, -0x2c(%rbp) movq %r13, %r12 movq %rbx, %rax cmpq $-0x1, %r14 movl $0x0, %ebx cmovneq %r14, %rbx addq %rbx, %r15 subq %rbx, %rcx movq %rcx, -0x40(%rbp) addq %rax, %rbx movq -0x48(%rbp), %rax movl (%rax), %r13d callq 0x5ed5e movl %r13d, (%rax) callq 0x5ed5e movl %r12d, %r13d andl $-0x21, %r13d cmpl $0x0, 0xe0(%rax) cmoveq %r12, %r13 callq 0x5ed5e cmpl $0x1c, (%rax) jne 0x2a4b2 testb $0x20, %r13b movl -0x2c(%rbp), %r12d je 0x2a4c8 jmp 0x2a502 callq 0x5ed5e cmpl $0x7a, (%rax) movl -0x2c(%rbp), %r12d jne 0x2a4c8 movl %r13d, %eax andl $0x20, %eax jne 0x2a502 leaq 0x1(%r14), %rax cmpq $0x1, %rax ja 0x2a4dc callq 0x5ed5e cmpl $0x4, (%rax) jne 0x2a522 movl %r12d, %edi movq %r15, %rsi movq -0x40(%rbp), %r14 movq %r14, %rdx callq 0x28110 movq %r14, %rcx movq %rax, %r14 cmpq %rcx, %rax jne 0x2a456 jmp 0x2a424 movl %r12d, %edi callq 0x658c8 movq %rax, %rdi movq -0x38(%rbp), %r14 movl %r14d, %esi callq 0x6524e incl %r14d movq %r14, -0x38(%rbp) jmp 0x2a4dc testq %r14, %r14 jne 0x2a555 cmpl $0x0, -0x38(%rbp) jne 0x2a555 movq -0x48(%rbp), %rax movl $0x1b, (%rax) pushq $0x1 popq %rax movq %rax, -0x38(%rbp) jmp 0x2a4dc addq %rcx, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x6, %r13b je 0x2a593 pushq $-0x1 popq %rbx testb $0x1a, %r13b je 0x2a543 andl $0x440, %r13d # imm = 0x440 orq $0x4, %r13 movl %r12d, %edi callq 0x658c8 movq %rax, %r14 callq 0x5ed5e movl (%rax), %ecx pushq $0x3 popq %rdi movq %r13, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x59193 jmp 0x2a543 movq %r14, %rcx jmp 0x2a424
my_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r12d, edi xor ebx, ebx mov r13d, 0 test cl, 1Ah jnz short loc_2A3FF lea rax, my_global_flags mov r13, [rax] loc_2A3FF: test r15, r15 jz loc_2A543 or r13, rcx mov edi, r12d mov [rbp+var_40], rsi mov rdx, r15 call _write cmp rax, r15 jnz short loc_2A435 mov rcx, r15 xor ebx, ebx loc_2A424: test r13b, 6 jz loc_2A540 xor ebx, ebx jmp loc_2A543 loc_2A435: mov r14, rax mov [rbp+var_38], 0 call ___errno_location mov rcx, r15 mov [rbp+var_48], rax xor ebx, ebx mov r15, [rbp+var_40] mov [rbp+var_2C], r12d loc_2A456: mov r12, r13 mov rax, rbx cmp r14, 0FFFFFFFFFFFFFFFFh mov ebx, 0 cmovnz rbx, r14 add r15, rbx sub rcx, rbx mov [rbp+var_40], rcx add rbx, rax mov rax, [rbp+var_48] mov r13d, [rax] call _my_thread_var mov [rax], r13d call _my_thread_var mov r13d, r12d and r13d, 0FFFFFFDFh cmp dword ptr [rax+0E0h], 0 cmovz r13, r12 call _my_thread_var cmp dword ptr [rax], 1Ch jnz short loc_2A4B2 test r13b, 20h mov r12d, [rbp+var_2C] jz short loc_2A4C8 jmp short loc_2A502 loc_2A4B2: call _my_thread_var cmp dword ptr [rax], 7Ah ; 'z' mov r12d, [rbp+var_2C] jnz short loc_2A4C8 mov eax, r13d and eax, 20h jnz short loc_2A502 loc_2A4C8: lea rax, [r14+1] cmp rax, 1 ja short loc_2A4DC call _my_thread_var cmp dword ptr [rax], 4 jnz short loc_2A522 loc_2A4DC: mov edi, r12d mov rsi, r15 mov r14, [rbp+var_40] mov rdx, r14 call _write mov rcx, r14 mov r14, rax cmp rax, rcx jnz loc_2A456 jmp loc_2A424 loc_2A502: mov edi, r12d call my_filename mov rdi, rax mov r14, [rbp+var_38] mov esi, r14d call wait_for_free_space inc r14d mov [rbp+var_38], r14 jmp short loc_2A4DC loc_2A522: test r14, r14 jnz short loc_2A555 cmp dword ptr [rbp+var_38], 0 jnz short loc_2A555 mov rax, [rbp+var_48] mov dword ptr [rax], 1Bh push 1 pop rax mov [rbp+var_38], rax jmp short loc_2A4DC loc_2A540: add rbx, rcx loc_2A543: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2A555: test r13b, 6 jz short loc_2A593 push 0FFFFFFFFFFFFFFFFh pop rbx test r13b, 1Ah jz short loc_2A543 and r13d, 440h or r13, 4 mov edi, r12d call my_filename mov r14, rax call _my_thread_var mov ecx, [rax] push 3 pop rdi mov rsi, r13 mov rdx, r14 xor eax, eax call my_error jmp short loc_2A543 loc_2A593: mov rcx, r14 jmp loc_2A424
long long my_write(unsigned int a1, long long a2, long long a3, long long a4) { long long v5; // rbx long long v6; // r13 long long v7; // r13 long long v8; // rax long long v9; // rcx long long v10; // rbx long long v11; // r14 long long v12; // rax long long v13; // r15 long long v14; // r12 long long v15; // rax long long v16; // rbx int v17; // r13d unsigned int v18; // r12d long long v19; // rax long long v20; // rax int v22; // r14d _DWORD *v23; // rax int v24; // r8d int v25; // r9d int *v26; // [rsp+8h] [rbp-48h] long long v27; // [rsp+10h] [rbp-40h] unsigned int v28; // [rsp+18h] [rbp-38h] v5 = 0LL; v6 = 0LL; if ( (a4 & 0x1A) == 0 ) v6 = my_global_flags; if ( a3 ) { v7 = a4 | v6; v8 = write(a1, a2, a3); if ( v8 == a3 ) { v9 = a3; v10 = 0LL; goto LABEL_6; } v11 = v8; v28 = 0; v12 = __errno_location(); v9 = a3; v26 = (int *)v12; v10 = 0LL; v13 = a2; while ( 1 ) { v14 = v7; v15 = v10; v16 = 0LL; if ( v11 != -1 ) v16 = v11; v13 += v16; v27 = v9 - v16; v10 = v15 + v16; v17 = *v26; *(_DWORD *)my_thread_var() = v17; v7 = (unsigned int)v14 & 0xFFFFFFDF; if ( !*(_DWORD *)(my_thread_var() + 224) ) v7 = v14; if ( *(_DWORD *)my_thread_var() == 28 ) { v18 = a1; if ( (v7 & 0x20) != 0 ) goto LABEL_22; } else { v18 = a1; if ( *(_DWORD *)my_thread_var() == 122 && (v7 & 0x20) != 0 ) { LABEL_22: v20 = my_filename(v18); wait_for_free_space(v20, v28++); goto LABEL_20; } } if ( (unsigned long long)(v11 + 1) <= 1 && *(_DWORD *)my_thread_var() != 4 ) { if ( v11 || v28 ) { if ( (v7 & 6) != 0 ) { v5 = -1LL; if ( (v7 & 0x1A) != 0 ) { v22 = my_filename(v18); v23 = (_DWORD *)my_thread_var(); my_error(3, v7 & 0x440 | 4, v22, *v23, v24, v25); } return v5; } v9 = v11; LABEL_6: if ( (v7 & 6) != 0 ) return 0LL; else return v9 + v10; } *v26 = 27; v28 = 1; } LABEL_20: v19 = write(v18, v13, v27); v9 = v27; v11 = v19; if ( v19 == v27 ) goto LABEL_6; } } return v5; }
my_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R12D,EDI XOR EBX,EBX MOV R13D,0x0 TEST CL,0x1a JNZ 0x0012a3ff LEA RAX,[0x4b6688] MOV R13,qword ptr [RAX] LAB_0012a3ff: TEST R15,R15 JZ 0x0012a543 OR R13,RCX MOV EDI,R12D MOV qword ptr [RBP + -0x40],RSI MOV RDX,R15 CALL 0x00128110 CMP RAX,R15 JNZ 0x0012a435 MOV RCX,R15 XOR EBX,EBX LAB_0012a424: TEST R13B,0x6 JZ 0x0012a540 XOR EBX,EBX JMP 0x0012a543 LAB_0012a435: MOV R14,RAX MOV qword ptr [RBP + -0x38],0x0 CALL 0x00128050 MOV RCX,R15 MOV qword ptr [RBP + -0x48],RAX XOR EBX,EBX MOV R15,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x2c],R12D LAB_0012a456: MOV R12,R13 MOV RAX,RBX CMP R14,-0x1 MOV EBX,0x0 CMOVNZ RBX,R14 ADD R15,RBX SUB RCX,RBX MOV qword ptr [RBP + -0x40],RCX ADD RBX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV R13D,dword ptr [RAX] CALL 0x0015ed5e MOV dword ptr [RAX],R13D CALL 0x0015ed5e MOV R13D,R12D AND R13D,0xffffffdf CMP dword ptr [RAX + 0xe0],0x0 CMOVZ R13,R12 CALL 0x0015ed5e CMP dword ptr [RAX],0x1c JNZ 0x0012a4b2 TEST R13B,0x20 MOV R12D,dword ptr [RBP + -0x2c] JZ 0x0012a4c8 JMP 0x0012a502 LAB_0012a4b2: CALL 0x0015ed5e CMP dword ptr [RAX],0x7a MOV R12D,dword ptr [RBP + -0x2c] JNZ 0x0012a4c8 MOV EAX,R13D AND EAX,0x20 JNZ 0x0012a502 LAB_0012a4c8: LEA RAX,[R14 + 0x1] CMP RAX,0x1 JA 0x0012a4dc CALL 0x0015ed5e CMP dword ptr [RAX],0x4 JNZ 0x0012a522 LAB_0012a4dc: MOV EDI,R12D MOV RSI,R15 MOV R14,qword ptr [RBP + -0x40] MOV RDX,R14 CALL 0x00128110 MOV RCX,R14 MOV R14,RAX CMP RAX,RCX JNZ 0x0012a456 JMP 0x0012a424 LAB_0012a502: MOV EDI,R12D CALL 0x001658c8 MOV RDI,RAX MOV R14,qword ptr [RBP + -0x38] MOV ESI,R14D CALL 0x0016524e INC R14D MOV qword ptr [RBP + -0x38],R14 JMP 0x0012a4dc LAB_0012a522: TEST R14,R14 JNZ 0x0012a555 CMP dword ptr [RBP + -0x38],0x0 JNZ 0x0012a555 MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],0x1b PUSH 0x1 POP RAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0012a4dc LAB_0012a540: ADD RBX,RCX LAB_0012a543: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012a555: TEST R13B,0x6 JZ 0x0012a593 PUSH -0x1 POP RBX TEST R13B,0x1a JZ 0x0012a543 AND R13D,0x440 OR R13,0x4 MOV EDI,R12D CALL 0x001658c8 MOV R14,RAX CALL 0x0015ed5e MOV ECX,dword ptr [RAX] PUSH 0x3 POP RDI MOV RSI,R13 MOV RDX,R14 XOR EAX,EAX CALL 0x00159193 JMP 0x0012a543 LAB_0012a593: MOV RCX,R14 JMP 0x0012a424
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; size_t sVar2; int *piVar3; int *piVar4; long lVar5; int8 uVar6; int4 *puVar7; size_t sVar8; long lVar9; ulong uVar10; ulong uVar11; int iVar12; lVar9 = 0; uVar10 = 0; if ((param_4 & 0x1a) == 0) { uVar10 = my_global_flags; } if (param_3 != 0) { uVar10 = uVar10 | param_4; sVar2 = write(param_1,param_2,param_3); if (sVar2 == param_3) { lVar9 = 0; } else { iVar12 = 0; piVar3 = __errno_location(); lVar9 = 0; uVar11 = uVar10; do { sVar8 = 0; if (sVar2 != 0xffffffffffffffff) { sVar8 = sVar2; } param_2 = (void *)((long)param_2 + sVar8); param_3 = param_3 - sVar8; lVar9 = sVar8 + lVar9; iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; lVar5 = _my_thread_var(); uVar10 = (ulong)((uint)uVar11 & 0xffffffdf); if (*(int *)(lVar5 + 0xe0) == 0) { uVar10 = uVar11; } piVar4 = (int *)_my_thread_var(); if (*piVar4 == 0x1c) { if ((uVar10 & 0x20) != 0) goto LAB_0012a502; LAB_0012a4c8: if ((sVar2 + 1 < 2) && (piVar4 = (int *)_my_thread_var(), *piVar4 != 4)) { if ((sVar2 != 0) || (iVar12 != 0)) { param_3 = sVar2; if ((uVar10 & 6) != 0) { if ((uVar10 & 0x1a) == 0) { return -1; } uVar6 = my_filename(param_1); puVar7 = (int4 *)_my_thread_var(); my_error(3,(uint)uVar10 & 0x440 | 4,uVar6,*puVar7); return -1; } break; } *piVar3 = 0x1b; iVar12 = 1; } } else { piVar4 = (int *)_my_thread_var(); if ((*piVar4 != 0x7a) || ((uVar10 & 0x20) == 0)) goto LAB_0012a4c8; LAB_0012a502: uVar6 = my_filename(param_1); wait_for_free_space(uVar6,iVar12); iVar12 = iVar12 + 1; } sVar2 = write(param_1,param_2,param_3); uVar11 = uVar10; } while (sVar2 != param_3); } if ((uVar10 & 6) == 0) { lVar9 = lVar9 + param_3; } else { lVar9 = 0; } } return lVar9; }
48,795
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
void FVarRefinement::propagateValueTags() { // // Value tags correspond to vertex-values and originate from all three sources: // Face-values: // - trivially initialized as matching // Edge-values: // - conditionally initialized based on parent edge continuity // - should be trivial though (unlike edge-tags for the child edges) // Vertex-values: // - if complete, trivially propagated/inherited // - if incomplete, need to map to child subset // // // Values from face-vertices -- all match and are sequential: // FVarLevel::ValueTag valTagMatch; valTagMatch.clear(); Index cVert = _refinement.getFirstChildVertexFromFaces(); Index cVertEnd = cVert + _refinement.getNumChildVerticesFromFaces(); Index cVertValue = _childFVar.getVertexValueOffset(cVert); for ( ; cVert < cVertEnd; ++cVert, ++cVertValue) { _childFVar._vertValueTags[cVertValue] = valTagMatch; } // // Values from edge-vertices -- for edges that are split, tag as mismatched and tag // as corner or crease depending on the presence of creases in the parent: // FVarLevel::ValueTag valTagMismatch = valTagMatch; valTagMismatch._mismatch = true; FVarLevel::ValueTag valTagCrease = valTagMismatch; valTagCrease._crease = true; FVarLevel::ValueTag& valTagSplitEdge = _parentFVar.hasSmoothBoundaries() ? valTagCrease : valTagMismatch; cVert = _refinement.getFirstChildVertexFromEdges(); cVertEnd = cVert + _refinement.getNumChildVerticesFromEdges(); for ( ; cVert < cVertEnd; ++cVert) { Index pEdge = _refinement.getChildVertexParentIndex(cVert); FVarLevel::ValueTagArray cValueTags = _childFVar.getVertexValueTags(cVert); FVarLevel::ETag pEdgeTag = _parentFVar._edgeTags[pEdge]; if (pEdgeTag._mismatch || pEdgeTag._linear) { std::fill(cValueTags.begin(), cValueTags.end(), valTagSplitEdge); } else { std::fill(cValueTags.begin(), cValueTags.end(), valTagMatch); } } // // Values from vertex-vertices -- inherit tags from parent values when complete // otherwise (not yet supported) need to identify the parent value for each child: // cVert = _refinement.getFirstChildVertexFromVertices(); cVertEnd = cVert + _refinement.getNumChildVerticesFromVertices(); for ( ; cVert < cVertEnd; ++cVert) { Index pVert = _refinement.getChildVertexParentIndex(cVert); assert(_refinement.isChildVertexComplete(cVert)); FVarLevel::ConstValueTagArray pValueTags = _parentFVar.getVertexValueTags(pVert); FVarLevel::ValueTagArray cValueTags = _childFVar.getVertexValueTags(cVert); memcpy(cValueTags.begin(), pValueTags.begin(), pValueTags.size()*sizeof(FVarLevel::ValueTag)); } }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq (%rdi), %rcx movl 0x34(%rcx), %eax testl %eax, %eax jle 0x404eb movl 0x4c(%rcx), %ecx movslq %ecx, %rdx addl %edx, %eax movq 0x20(%rbx), %rsi movq 0x60(%rsi), %rsi movslq (%rsi,%rdx,4), %rdx movq 0x20(%rbx), %rsi movq 0xa8(%rsi), %rsi movb $0x0, (%rsi,%rdx) incl %ecx incq %rdx cmpl %eax, %ecx jl 0x404d3 movq (%rbx), %rax movslq 0x38(%rax), %r14 testq %r14, %r14 jle 0x40560 movslq 0x50(%rax), %r15 addq %r15, %r14 movq 0x10(%rbx), %rax movb 0xd(%rax), %al xorb $0x1, %al shlb $0x3, %al incb %al xorl %ebp, %ebp movzbl %al, %r12d movq 0x20(%rbx), %rax movq 0x48(%rax), %rcx movzwl (%rcx,%r15,2), %edx testq %rdx, %rdx je 0x40558 movq (%rbx), %rcx movq 0x10(%rbx), %rsi movq 0x30(%rsi), %rsi movq 0x138(%rcx), %rcx movslq (%rcx,%r15,4), %rcx testb $0x9, (%rsi,%rcx) movl %r12d, %esi cmovel %ebp, %esi movq 0x60(%rax), %rcx movslq (%rcx,%r15,4), %rdi addq 0xa8(%rax), %rdi callq 0x391b0 incq %r15 cmpq %r14, %r15 jl 0x40512 movq (%rbx), %rax movslq 0x3c(%rax), %r14 testq %r14, %r14 jle 0x405ca movslq 0x54(%rax), %r15 addq %r15, %r14 movq (%rbx), %rax movq 0x180(%rax), %rcx testb $0x1, (%rcx,%r15) jne 0x405d3 movq 0x138(%rax), %rax movslq (%rax,%r15,4), %rax movq 0x10(%rbx), %rcx movq 0x20(%rbx), %r8 movq 0x48(%rcx), %rdx movq 0x60(%rcx), %rsi movzwl (%rdx,%rax,2), %edx movslq (%rsi,%rax,4), %rsi addq 0xa8(%rcx), %rsi movq 0x60(%r8), %rax movslq (%rax,%r15,4), %rdi addq 0xa8(%r8), %rdi callq 0x39ad0 incq %r15 cmpq %r14, %r15 jl 0x40573 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x71fe2(%rip), %rdi # 0xb25bc leaq 0x72004(%rip), %rsi # 0xb25e5 leaq 0x720b6(%rip), %rcx # 0xb269e movl $0x1b7, %edx # imm = 0x1B7 callq 0x39560
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement18propagateValueTagsEv: push rbp push r15 push r14 push r12 push rbx mov rbx, rdi mov rcx, [rdi] mov eax, [rcx+34h] test eax, eax jle short loc_404EB mov ecx, [rcx+4Ch] movsxd rdx, ecx add eax, edx mov rsi, [rbx+20h] mov rsi, [rsi+60h] movsxd rdx, dword ptr [rsi+rdx*4] loc_404D3: mov rsi, [rbx+20h] mov rsi, [rsi+0A8h] mov byte ptr [rsi+rdx], 0 inc ecx inc rdx cmp ecx, eax jl short loc_404D3 loc_404EB: mov rax, [rbx] movsxd r14, dword ptr [rax+38h] test r14, r14 jle short loc_40560 movsxd r15, dword ptr [rax+50h] add r14, r15 mov rax, [rbx+10h] mov al, [rax+0Dh] xor al, 1 shl al, 3 inc al xor ebp, ebp movzx r12d, al loc_40512: mov rax, [rbx+20h] mov rcx, [rax+48h] movzx edx, word ptr [rcx+r15*2] test rdx, rdx jz short loc_40558 mov rcx, [rbx] mov rsi, [rbx+10h] mov rsi, [rsi+30h] mov rcx, [rcx+138h] movsxd rcx, dword ptr [rcx+r15*4] test byte ptr [rsi+rcx], 9 mov esi, r12d cmovz esi, ebp mov rcx, [rax+60h] movsxd rdi, dword ptr [rcx+r15*4] add rdi, [rax+0A8h] call _memset loc_40558: inc r15 cmp r15, r14 jl short loc_40512 loc_40560: mov rax, [rbx] movsxd r14, dword ptr [rax+3Ch] test r14, r14 jle short loc_405CA movsxd r15, dword ptr [rax+54h] add r14, r15 loc_40573: mov rax, [rbx] mov rcx, [rax+180h] test byte ptr [rcx+r15], 1 jnz short loc_405D3 mov rax, [rax+138h] movsxd rax, dword ptr [rax+r15*4] mov rcx, [rbx+10h] mov r8, [rbx+20h] mov rdx, [rcx+48h] mov rsi, [rcx+60h] movzx edx, word ptr [rdx+rax*2] movsxd rsi, dword ptr [rsi+rax*4] add rsi, [rcx+0A8h] mov rax, [r8+60h] movsxd rdi, dword ptr [rax+r15*4] add rdi, [r8+0A8h] call _memcpy inc r15 cmp r15, r14 jl short loc_40573 loc_405CA: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_405D3: lea rdi, aRefinementIsch; "_refinement.isChildVertexComplete(cVert"... lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_3; "void OpenSubdiv::v3_6_0::Vtr::internal:"... mov edx, 1B7h call ___assert_fail
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags( OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *this, long long a2, long long a3, long long a4, long long a5, long long a6) { int v6; // eax int v7; // ecx int v8; // eax long long v9; // rdx long long v10; // r14 long long v11; // r15 long long v12; // r14 unsigned int v13; // r12d _QWORD *v14; // rax long long v15; // rcx long long v16; // rsi long long result; // rax long long v18; // r14 long long v19; // r15 long long v20; // r14 long long v21; // rax _QWORD *v22; // rcx long long v23; // [rsp+0h] [rbp-28h] long long v24; // [rsp+8h] [rbp-20h] long long v25; // [rsp+10h] [rbp-18h] long long v26; // [rsp+18h] [rbp-10h] int v27; // [rsp+20h] [rbp-8h] v6 = *(_DWORD *)(*(_QWORD *)this + 52LL); if ( v6 > 0 ) { v7 = *(_DWORD *)(*(_QWORD *)this + 76LL); v8 = v7 + v6; v9 = *(int *)(*(_QWORD *)(*((_QWORD *)this + 4) + 96LL) + 4LL * v7); do { *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 4) + 168LL) + v9) = 0; ++v7; ++v9; } while ( v7 < v8 ); } v10 = *(int *)(*(_QWORD *)this + 56LL); if ( v10 > 0 ) { v11 = *(int *)(*(_QWORD *)this + 80LL); v12 = v11 + v10; v13 = (unsigned __int8)(8 * (*(_BYTE *)(*((_QWORD *)this + 2) + 13LL) ^ 1) + 1); do { v14 = (_QWORD *)*((_QWORD *)this + 4); v15 = v14[9]; if ( *(_WORD *)(v15 + 2 * v11) ) { v16 = v13; if ( (*(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 2) + 48LL) + *(int *)(*(_QWORD *)(*(_QWORD *)this + 312LL) + 4 * v11)) & 9) == 0 ) v16 = 0LL; memset(v14[21] + *(int *)(v14[12] + 4 * v11), v16, *(unsigned __int16 *)(v15 + 2 * v11)); } ++v11; } while ( v11 < v12 ); } result = *(_QWORD *)this; v18 = *(int *)(*(_QWORD *)this + 60LL); if ( v18 > 0 ) { v19 = *(int *)(result + 84); v20 = v19 + v18; do { if ( (*(_BYTE *)(*(_QWORD *)(*(_QWORD *)this + 384LL) + v19) & 1) != 0 ) __assert_fail( "_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp", 439LL, "void OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()"); v21 = *(int *)(*(_QWORD *)(*(_QWORD *)this + 312LL) + 4 * v19); v22 = (_QWORD *)*((_QWORD *)this + 2); result = memcpy( *(_QWORD *)(*((_QWORD *)this + 4) + 168LL) + *(int *)(*(_QWORD *)(*((_QWORD *)this + 4) + 96LL) + 4 * v19++), v22[21] + *(int *)(v22[12] + 4 * v21), *(unsigned __int16 *)(v22[9] + 2 * v21), v22, *((_QWORD *)this + 4), a6, v23, v24, v25, v26, v27); } while ( v19 < v20 ); } return result; }
propagateValueTags: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV RCX,qword ptr [RDI] MOV EAX,dword ptr [RCX + 0x34] TEST EAX,EAX JLE 0x001404eb MOV ECX,dword ptr [RCX + 0x4c] MOVSXD RDX,ECX ADD EAX,EDX MOV RSI,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RSI + 0x60] MOVSXD RDX,dword ptr [RSI + RDX*0x4] LAB_001404d3: MOV RSI,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RSI + 0xa8] MOV byte ptr [RSI + RDX*0x1],0x0 INC ECX INC RDX CMP ECX,EAX JL 0x001404d3 LAB_001404eb: MOV RAX,qword ptr [RBX] MOVSXD R14,dword ptr [RAX + 0x38] TEST R14,R14 JLE 0x00140560 MOVSXD R15,dword ptr [RAX + 0x50] ADD R14,R15 MOV RAX,qword ptr [RBX + 0x10] MOV AL,byte ptr [RAX + 0xd] XOR AL,0x1 SHL AL,0x3 INC AL XOR EBP,EBP MOVZX R12D,AL LAB_00140512: MOV RAX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RAX + 0x48] MOVZX EDX,word ptr [RCX + R15*0x2] TEST RDX,RDX JZ 0x00140558 MOV RCX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RSI + 0x30] MOV RCX,qword ptr [RCX + 0x138] MOVSXD RCX,dword ptr [RCX + R15*0x4] TEST byte ptr [RSI + RCX*0x1],0x9 MOV ESI,R12D CMOVZ ESI,EBP MOV RCX,qword ptr [RAX + 0x60] MOVSXD RDI,dword ptr [RCX + R15*0x4] ADD RDI,qword ptr [RAX + 0xa8] CALL 0x001391b0 LAB_00140558: INC R15 CMP R15,R14 JL 0x00140512 LAB_00140560: MOV RAX,qword ptr [RBX] MOVSXD R14,dword ptr [RAX + 0x3c] TEST R14,R14 JLE 0x001405ca MOVSXD R15,dword ptr [RAX + 0x54] ADD R14,R15 LAB_00140573: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x180] TEST byte ptr [RCX + R15*0x1],0x1 JNZ 0x001405d3 MOV RAX,qword ptr [RAX + 0x138] MOVSXD RAX,dword ptr [RAX + R15*0x4] MOV RCX,qword ptr [RBX + 0x10] MOV R8,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RCX + 0x48] MOV RSI,qword ptr [RCX + 0x60] MOVZX EDX,word ptr [RDX + RAX*0x2] MOVSXD RSI,dword ptr [RSI + RAX*0x4] ADD RSI,qword ptr [RCX + 0xa8] MOV RAX,qword ptr [R8 + 0x60] MOVSXD RDI,dword ptr [RAX + R15*0x4] ADD RDI,qword ptr [R8 + 0xa8] CALL 0x00139ad0 INC R15 CMP R15,R14 JL 0x00140573 LAB_001405ca: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001405d3: LEA RDI,[0x1b25bc] LEA RSI,[0x1b25e5] LEA RCX,[0x1b269e] MOV EDX,0x1b7 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags(FVarRefinement *this) { byte bVar1; long lVar2; int iVar3; long lVar4; int iVar5; long lVar6; ulong __n; uint __c; long lVar7; iVar3 = *(int *)(*(long *)this + 0x34); if (0 < iVar3) { iVar5 = *(int *)(*(long *)this + 0x4c); iVar3 = iVar3 + iVar5; lVar6 = (long)*(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + (long)iVar5 * 4); do { *(int1 *)(*(long *)(*(long *)(this + 0x20) + 0xa8) + lVar6) = 0; iVar5 = iVar5 + 1; lVar6 = lVar6 + 1; } while (iVar5 < iVar3); } lVar6 = (long)*(int *)(*(long *)this + 0x38); if (0 < lVar6) { lVar7 = (long)*(int *)(*(long *)this + 0x50); lVar6 = lVar6 + lVar7; bVar1 = *(byte *)(*(long *)(this + 0x10) + 0xd); do { lVar2 = *(long *)(this + 0x20); __n = (ulong)*(ushort *)(*(long *)(lVar2 + 0x48) + lVar7 * 2); if (__n != 0) { __c = (uint)(byte)((bVar1 ^ 1) * '\b' + 1); if ((*(byte *)(*(long *)(*(long *)(this + 0x10) + 0x30) + (long)*(int *)(*(long *)(*(long *)this + 0x138) + lVar7 * 4)) & 9) == 0) { __c = 0; } memset((void *)((long)*(int *)(*(long *)(lVar2 + 0x60) + lVar7 * 4) + *(long *)(lVar2 + 0xa8)),__c,__n); } lVar7 = lVar7 + 1; } while (lVar7 < lVar6); } lVar6 = (long)*(int *)(*(long *)this + 0x3c); if (0 < lVar6) { lVar7 = (long)*(int *)(*(long *)this + 0x54); lVar6 = lVar6 + lVar7; do { if ((*(byte *)(*(long *)(*(long *)this + 0x180) + lVar7) & 1) != 0) { /* WARNING: Subroutine does not return */ __assert_fail("_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp" ,0x1b7, "void OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()" ); } lVar4 = (long)*(int *)(*(long *)(*(long *)this + 0x138) + lVar7 * 4); lVar2 = *(long *)(this + 0x10); memcpy((void *)((long)*(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + lVar7 * 4) + *(long *)(*(long *)(this + 0x20) + 0xa8)), (void *)((long)*(int *)(*(long *)(lVar2 + 0x60) + lVar4 * 4) + *(long *)(lVar2 + 0xa8)) ,(ulong)*(ushort *)(*(long *)(lVar2 + 0x48) + lVar4 * 2)); lVar7 = lVar7 + 1; } while (lVar7 < lVar6); } return; }
48,796
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
void FVarRefinement::propagateValueTags() { // // Value tags correspond to vertex-values and originate from all three sources: // Face-values: // - trivially initialized as matching // Edge-values: // - conditionally initialized based on parent edge continuity // - should be trivial though (unlike edge-tags for the child edges) // Vertex-values: // - if complete, trivially propagated/inherited // - if incomplete, need to map to child subset // // // Values from face-vertices -- all match and are sequential: // FVarLevel::ValueTag valTagMatch; valTagMatch.clear(); Index cVert = _refinement.getFirstChildVertexFromFaces(); Index cVertEnd = cVert + _refinement.getNumChildVerticesFromFaces(); Index cVertValue = _childFVar.getVertexValueOffset(cVert); for ( ; cVert < cVertEnd; ++cVert, ++cVertValue) { _childFVar._vertValueTags[cVertValue] = valTagMatch; } // // Values from edge-vertices -- for edges that are split, tag as mismatched and tag // as corner or crease depending on the presence of creases in the parent: // FVarLevel::ValueTag valTagMismatch = valTagMatch; valTagMismatch._mismatch = true; FVarLevel::ValueTag valTagCrease = valTagMismatch; valTagCrease._crease = true; FVarLevel::ValueTag& valTagSplitEdge = _parentFVar.hasSmoothBoundaries() ? valTagCrease : valTagMismatch; cVert = _refinement.getFirstChildVertexFromEdges(); cVertEnd = cVert + _refinement.getNumChildVerticesFromEdges(); for ( ; cVert < cVertEnd; ++cVert) { Index pEdge = _refinement.getChildVertexParentIndex(cVert); FVarLevel::ValueTagArray cValueTags = _childFVar.getVertexValueTags(cVert); FVarLevel::ETag pEdgeTag = _parentFVar._edgeTags[pEdge]; if (pEdgeTag._mismatch || pEdgeTag._linear) { std::fill(cValueTags.begin(), cValueTags.end(), valTagSplitEdge); } else { std::fill(cValueTags.begin(), cValueTags.end(), valTagMatch); } } // // Values from vertex-vertices -- inherit tags from parent values when complete // otherwise (not yet supported) need to identify the parent value for each child: // cVert = _refinement.getFirstChildVertexFromVertices(); cVertEnd = cVert + _refinement.getNumChildVerticesFromVertices(); for ( ; cVert < cVertEnd; ++cVert) { Index pVert = _refinement.getChildVertexParentIndex(cVert); assert(_refinement.isChildVertexComplete(cVert)); FVarLevel::ConstValueTagArray pValueTags = _parentFVar.getVertexValueTags(pVert); FVarLevel::ValueTagArray cValueTags = _childFVar.getVertexValueTags(cVert); memcpy(cValueTags.begin(), pValueTags.begin(), pValueTags.size()*sizeof(FVarLevel::ValueTag)); } }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq (%rdi), %rcx movq 0x20(%rdi), %rdx movslq 0x4c(%rcx), %rax movl 0x34(%rcx), %ecx addl %eax, %ecx movq 0x60(%rdx), %rdx movslq (%rdx,%rax,4), %rdx cmpl %ecx, %eax jge 0x5970c movq 0x20(%rbx), %rsi movq 0xa8(%rsi), %rsi movb $0x0, (%rsi,%rdx) incl %eax incq %rdx jmp 0x596f2 movq (%rbx), %rdx movq 0x10(%rbx), %rax movb 0xd(%rax), %al movslq 0x50(%rdx), %rcx movslq 0x38(%rdx), %rdx addq %rcx, %rdx xorb $0x1, %al shlb $0x3, %al incb %al movq (%rbx), %rsi cmpq %rdx, %rcx jge 0x5978d movq 0x138(%rsi), %rsi movslq (%rsi,%rcx,4), %r8 movq 0x10(%rbx), %r9 movq 0x20(%rbx), %r10 movq 0x48(%r10), %rsi movq 0x60(%r10), %rdi movzwl (%rsi,%rcx,2), %esi movslq (%rdi,%rcx,4), %rdi movq 0x30(%r9), %r9 addq 0xa8(%r10), %rdi testb $0x9, (%r9,%r8) je 0x59776 xorl %r8d, %r8d cmpq %r8, %rsi je 0x59788 movb %al, (%rdi,%r8) incq %r8 jmp 0x59768 xorl %r8d, %r8d cmpq %r8, %rsi je 0x59788 movb $0x0, (%rdi,%r8) incq %r8 jmp 0x59779 incq %rcx jmp 0x59728 movslq 0x54(%rsi), %r14 movslq 0x3c(%rsi), %r15 addq %r14, %r15 cmpq %r15, %r14 jge 0x597f1 movq (%rbx), %rax movq 0x180(%rax), %rcx testb $0x1, (%rcx,%r14) jne 0x597f7 movq 0x138(%rax), %rax movslq (%rax,%r14,4), %rax movq 0x10(%rbx), %rcx movq 0x20(%rbx), %r8 movq 0x48(%rcx), %rdx movq 0x60(%rcx), %rsi movzwl (%rdx,%rax,2), %edx movslq (%rsi,%rax,4), %rsi addq 0xa8(%rcx), %rsi movq 0x60(%r8), %rax movslq (%rax,%r14,4), %rdi addq 0xa8(%r8), %rdi callq 0x51bd0 incq %r14 jmp 0x59798 popq %rbx popq %r14 popq %r15 retq leaq 0x62dbe(%rip), %rdi # 0xbc5bc leaq 0x62de0(%rip), %rsi # 0xbc5e5 leaq 0x62e92(%rip), %rcx # 0xbc69e movl $0x1b7, %edx # imm = 0x1B7 callq 0x512a0
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement18propagateValueTagsEv: push r15 push r14 push rbx mov rbx, rdi mov rcx, [rdi] mov rdx, [rdi+20h] movsxd rax, dword ptr [rcx+4Ch] mov ecx, [rcx+34h] add ecx, eax mov rdx, [rdx+60h] movsxd rdx, dword ptr [rdx+rax*4] loc_596F2: cmp eax, ecx jge short loc_5970C mov rsi, [rbx+20h] mov rsi, [rsi+0A8h] mov byte ptr [rsi+rdx], 0 inc eax inc rdx jmp short loc_596F2 loc_5970C: mov rdx, [rbx] mov rax, [rbx+10h] mov al, [rax+0Dh] movsxd rcx, dword ptr [rdx+50h] movsxd rdx, dword ptr [rdx+38h] add rdx, rcx xor al, 1 shl al, 3 inc al loc_59728: mov rsi, [rbx] cmp rcx, rdx jge short loc_5978D mov rsi, [rsi+138h] movsxd r8, dword ptr [rsi+rcx*4] mov r9, [rbx+10h] mov r10, [rbx+20h] mov rsi, [r10+48h] mov rdi, [r10+60h] movzx esi, word ptr [rsi+rcx*2] movsxd rdi, dword ptr [rdi+rcx*4] mov r9, [r9+30h] add rdi, [r10+0A8h] test byte ptr [r9+r8], 9 jz short loc_59776 xor r8d, r8d loc_59768: cmp rsi, r8 jz short loc_59788 mov [rdi+r8], al inc r8 jmp short loc_59768 loc_59776: xor r8d, r8d loc_59779: cmp rsi, r8 jz short loc_59788 mov byte ptr [rdi+r8], 0 inc r8 jmp short loc_59779 loc_59788: inc rcx jmp short loc_59728 loc_5978D: movsxd r14, dword ptr [rsi+54h] movsxd r15, dword ptr [rsi+3Ch] add r15, r14 loc_59798: cmp r14, r15 jge short loc_597F1 mov rax, [rbx] mov rcx, [rax+180h] test byte ptr [rcx+r14], 1 jnz short loc_597F7 mov rax, [rax+138h] movsxd rax, dword ptr [rax+r14*4] mov rcx, [rbx+10h] mov r8, [rbx+20h] mov rdx, [rcx+48h] mov rsi, [rcx+60h] movzx edx, word ptr [rdx+rax*2] movsxd rsi, dword ptr [rsi+rax*4] add rsi, [rcx+0A8h] mov rax, [r8+60h] movsxd rdi, dword ptr [rax+r14*4] add rdi, [r8+0A8h] call _memcpy inc r14 jmp short loc_59798 loc_597F1: pop rbx pop r14 pop r15 retn loc_597F7: lea rdi, aRefinementIsch; "_refinement.isChildVertexComplete(cVert"... lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_3; "void OpenSubdiv::v3_6_0::Vtr::internal:"... mov edx, 1B7h call ___assert_fail
propagateValueTags: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV RCX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x20] MOVSXD RAX,dword ptr [RCX + 0x4c] MOV ECX,dword ptr [RCX + 0x34] ADD ECX,EAX MOV RDX,qword ptr [RDX + 0x60] MOVSXD RDX,dword ptr [RDX + RAX*0x4] LAB_001596f2: CMP EAX,ECX JGE 0x0015970c MOV RSI,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RSI + 0xa8] MOV byte ptr [RSI + RDX*0x1],0x0 INC EAX INC RDX JMP 0x001596f2 LAB_0015970c: MOV RDX,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x10] MOV AL,byte ptr [RAX + 0xd] MOVSXD RCX,dword ptr [RDX + 0x50] MOVSXD RDX,dword ptr [RDX + 0x38] ADD RDX,RCX XOR AL,0x1 SHL AL,0x3 INC AL LAB_00159728: MOV RSI,qword ptr [RBX] CMP RCX,RDX JGE 0x0015978d MOV RSI,qword ptr [RSI + 0x138] MOVSXD R8,dword ptr [RSI + RCX*0x4] MOV R9,qword ptr [RBX + 0x10] MOV R10,qword ptr [RBX + 0x20] MOV RSI,qword ptr [R10 + 0x48] MOV RDI,qword ptr [R10 + 0x60] MOVZX ESI,word ptr [RSI + RCX*0x2] MOVSXD RDI,dword ptr [RDI + RCX*0x4] MOV R9,qword ptr [R9 + 0x30] ADD RDI,qword ptr [R10 + 0xa8] TEST byte ptr [R9 + R8*0x1],0x9 JZ 0x00159776 XOR R8D,R8D LAB_00159768: CMP RSI,R8 JZ 0x00159788 MOV byte ptr [RDI + R8*0x1],AL INC R8 JMP 0x00159768 LAB_00159776: XOR R8D,R8D LAB_00159779: CMP RSI,R8 JZ 0x00159788 MOV byte ptr [RDI + R8*0x1],0x0 INC R8 JMP 0x00159779 LAB_00159788: INC RCX JMP 0x00159728 LAB_0015978d: MOVSXD R14,dword ptr [RSI + 0x54] MOVSXD R15,dword ptr [RSI + 0x3c] ADD R15,R14 LAB_00159798: CMP R14,R15 JGE 0x001597f1 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x180] TEST byte ptr [RCX + R14*0x1],0x1 JNZ 0x001597f7 MOV RAX,qword ptr [RAX + 0x138] MOVSXD RAX,dword ptr [RAX + R14*0x4] MOV RCX,qword ptr [RBX + 0x10] MOV R8,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RCX + 0x48] MOV RSI,qword ptr [RCX + 0x60] MOVZX EDX,word ptr [RDX + RAX*0x2] MOVSXD RSI,dword ptr [RSI + RAX*0x4] ADD RSI,qword ptr [RCX + 0xa8] MOV RAX,qword ptr [R8 + 0x60] MOVSXD RDI,dword ptr [RAX + R14*0x4] ADD RDI,qword ptr [R8 + 0xa8] CALL 0x00151bd0 INC R14 JMP 0x00159798 LAB_001597f1: POP RBX POP R14 POP R15 RET LAB_001597f7: LEA RDI,[0x1bc5bc] LEA RSI,[0x1bc5e5] LEA RCX,[0x1bc69e] MOV EDX,0x1b7 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags(FVarRefinement *this) { byte bVar1; int iVar2; int iVar3; long lVar4; ulong uVar5; long lVar6; long lVar7; long lVar8; ulong uVar9; iVar2 = *(int *)(*(long *)this + 0x4c); uVar5 = (ulong)iVar2; iVar3 = *(int *)(*(long *)this + 0x34); lVar6 = (long)*(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + uVar5 * 4); for (; (int)uVar5 < iVar3 + iVar2; uVar5 = (ulong)((int)uVar5 + 1)) { *(int1 *)(*(long *)(*(long *)(this + 0x20) + 0xa8) + lVar6) = 0; lVar6 = lVar6 + 1; } bVar1 = *(byte *)(*(long *)(this + 0x10) + 0xd); lVar6 = (long)*(int *)(*(long *)this + 0x50); lVar7 = *(int *)(*(long *)this + 0x38) + lVar6; for (; lVar4 = *(long *)this, lVar6 < lVar7; lVar6 = lVar6 + 1) { lVar8 = *(long *)(this + 0x20); uVar5 = (ulong)*(ushort *)(*(long *)(lVar8 + 0x48) + lVar6 * 2); lVar8 = (long)*(int *)(*(long *)(lVar8 + 0x60) + lVar6 * 4) + *(long *)(lVar8 + 0xa8); if ((*(byte *)(*(long *)(*(long *)(this + 0x10) + 0x30) + (long)*(int *)(*(long *)(lVar4 + 0x138) + lVar6 * 4)) & 9) == 0) { for (uVar9 = 0; uVar5 != uVar9; uVar9 = uVar9 + 1) { *(int1 *)(lVar8 + uVar9) = 0; } } else { for (uVar9 = 0; uVar5 != uVar9; uVar9 = uVar9 + 1) { *(byte *)(lVar8 + uVar9) = (bVar1 ^ 1) * '\b' + '\x01'; } } } lVar6 = (long)*(int *)(lVar4 + 0x54); lVar7 = *(int *)(lVar4 + 0x3c) + lVar6; while( true ) { if (lVar7 <= lVar6) { return; } if ((*(byte *)(*(long *)(*(long *)this + 0x180) + lVar6) & 1) != 0) break; lVar8 = (long)*(int *)(*(long *)(*(long *)this + 0x138) + lVar6 * 4); lVar4 = *(long *)(this + 0x10); memcpy((void *)((long)*(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + lVar6 * 4) + *(long *)(*(long *)(this + 0x20) + 0xa8)), (void *)((long)*(int *)(*(long *)(lVar4 + 0x60) + lVar8 * 4) + *(long *)(lVar4 + 0xa8)), (ulong)*(ushort *)(*(long *)(lVar4 + 0x48) + lVar8 * 2)); lVar6 = lVar6 + 1; } /* WARNING: Subroutine does not return */ __assert_fail("_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp" ,0x1b7, "void OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()"); }
48,797
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
void FVarRefinement::propagateValueTags() { // // Value tags correspond to vertex-values and originate from all three sources: // Face-values: // - trivially initialized as matching // Edge-values: // - conditionally initialized based on parent edge continuity // - should be trivial though (unlike edge-tags for the child edges) // Vertex-values: // - if complete, trivially propagated/inherited // - if incomplete, need to map to child subset // // // Values from face-vertices -- all match and are sequential: // FVarLevel::ValueTag valTagMatch; valTagMatch.clear(); Index cVert = _refinement.getFirstChildVertexFromFaces(); Index cVertEnd = cVert + _refinement.getNumChildVerticesFromFaces(); Index cVertValue = _childFVar.getVertexValueOffset(cVert); for ( ; cVert < cVertEnd; ++cVert, ++cVertValue) { _childFVar._vertValueTags[cVertValue] = valTagMatch; } // // Values from edge-vertices -- for edges that are split, tag as mismatched and tag // as corner or crease depending on the presence of creases in the parent: // FVarLevel::ValueTag valTagMismatch = valTagMatch; valTagMismatch._mismatch = true; FVarLevel::ValueTag valTagCrease = valTagMismatch; valTagCrease._crease = true; FVarLevel::ValueTag& valTagSplitEdge = _parentFVar.hasSmoothBoundaries() ? valTagCrease : valTagMismatch; cVert = _refinement.getFirstChildVertexFromEdges(); cVertEnd = cVert + _refinement.getNumChildVerticesFromEdges(); for ( ; cVert < cVertEnd; ++cVert) { Index pEdge = _refinement.getChildVertexParentIndex(cVert); FVarLevel::ValueTagArray cValueTags = _childFVar.getVertexValueTags(cVert); FVarLevel::ETag pEdgeTag = _parentFVar._edgeTags[pEdge]; if (pEdgeTag._mismatch || pEdgeTag._linear) { std::fill(cValueTags.begin(), cValueTags.end(), valTagSplitEdge); } else { std::fill(cValueTags.begin(), cValueTags.end(), valTagMatch); } } // // Values from vertex-vertices -- inherit tags from parent values when complete // otherwise (not yet supported) need to identify the parent value for each child: // cVert = _refinement.getFirstChildVertexFromVertices(); cVertEnd = cVert + _refinement.getNumChildVerticesFromVertices(); for ( ; cVert < cVertEnd; ++cVert) { Index pVert = _refinement.getChildVertexParentIndex(cVert); assert(_refinement.isChildVertexComplete(cVert)); FVarLevel::ConstValueTagArray pValueTags = _parentFVar.getVertexValueTags(pVert); FVarLevel::ValueTagArray cValueTags = _childFVar.getVertexValueTags(cVert); memcpy(cValueTags.begin(), pValueTags.begin(), pValueTags.size()*sizeof(FVarLevel::ValueTag)); } }
O3
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rcx movl 0x34(%rcx), %eax testl %eax, %eax jle 0x414bf movl 0x4c(%rcx), %ecx movslq %ecx, %rdx addl %edx, %eax movq 0x20(%rbx), %rsi movq 0x60(%rsi), %rsi movslq (%rsi,%rdx,4), %rdx movq 0x20(%rbx), %rsi movq 0xa8(%rsi), %rsi movb $0x0, (%rsi,%rdx) incl %ecx incq %rdx cmpl %eax, %ecx jl 0x414a4 movq (%rbx), %rcx movslq 0x38(%rcx), %r14 testq %r14, %r14 jle 0x41538 movslq 0x50(%rcx), %r15 addq %r15, %r14 movq 0x10(%rbx), %rax movb 0xd(%rax), %al xorb $0x1, %al shlb $0x3, %al incb %al movzbl %al, %ebp movq (%rbx), %rax movq 0x10(%rbx), %rcx movq 0x138(%rax), %rax movslq (%rax,%r15,4), %rax movq 0x20(%rbx), %rsi movq 0x48(%rsi), %rdx movq 0x60(%rsi), %rdi movzwl (%rdx,%r15,2), %edx movslq (%rdi,%r15,4), %rdi movq 0x30(%rcx), %rcx addq 0xa8(%rsi), %rdi testb $0x9, (%rcx,%rax) je 0x41521 testq %rdx, %rdx je 0x4152d movl %ebp, %esi jmp 0x41528 testq %rdx, %rdx je 0x4152d xorl %esi, %esi callq 0x391a0 incq %r15 cmpq %r14, %r15 jl 0x414e0 movq (%rbx), %rcx movslq 0x3c(%rcx), %r14 testq %r14, %r14 jle 0x4159f movslq 0x54(%rcx), %r15 addq %r15, %r14 movq (%rbx), %rax movq 0x180(%rax), %rcx testb $0x1, (%rcx,%r15) jne 0x415aa movq 0x138(%rax), %rax movslq (%rax,%r15,4), %rax movq 0x10(%rbx), %rcx movq 0x20(%rbx), %r8 movq 0x48(%rcx), %rdx movq 0x60(%rcx), %rsi movzwl (%rdx,%rax,2), %edx movslq (%rsi,%rax,4), %rsi addq 0xa8(%rcx), %rsi movq 0x60(%r8), %rax movslq (%rax,%r15,4), %rdi addq 0xa8(%r8), %rdi callq 0x39ab0 incq %r15 cmpq %r14, %r15 jl 0x41548 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x7407f(%rip), %rdi # 0xb5630 leaq 0x740a1(%rip), %rsi # 0xb5659 leaq 0x74153(%rip), %rcx # 0xb5712 movl $0x1b7, %edx # imm = 0x1B7 callq 0x39540 nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement18propagateValueTagsEv: push rbp push r15 push r14 push rbx push rax mov rbx, rdi mov rcx, [rdi] mov eax, [rcx+34h] test eax, eax jle short loc_414BF mov ecx, [rcx+4Ch] movsxd rdx, ecx add eax, edx mov rsi, [rbx+20h] mov rsi, [rsi+60h] movsxd rdx, dword ptr [rsi+rdx*4] loc_414A4: mov rsi, [rbx+20h] mov rsi, [rsi+0A8h] mov byte ptr [rsi+rdx], 0 inc ecx inc rdx cmp ecx, eax jl short loc_414A4 mov rcx, [rbx] loc_414BF: movsxd r14, dword ptr [rcx+38h] test r14, r14 jle short loc_41538 movsxd r15, dword ptr [rcx+50h] add r14, r15 mov rax, [rbx+10h] mov al, [rax+0Dh] xor al, 1 shl al, 3 inc al movzx ebp, al loc_414E0: mov rax, [rbx] mov rcx, [rbx+10h] mov rax, [rax+138h] movsxd rax, dword ptr [rax+r15*4] mov rsi, [rbx+20h] mov rdx, [rsi+48h] mov rdi, [rsi+60h] movzx edx, word ptr [rdx+r15*2] movsxd rdi, dword ptr [rdi+r15*4] mov rcx, [rcx+30h] add rdi, [rsi+0A8h] test byte ptr [rcx+rax], 9 jz short loc_41521 test rdx, rdx jz short loc_4152D mov esi, ebp jmp short loc_41528 loc_41521: test rdx, rdx jz short loc_4152D xor esi, esi loc_41528: call _memset loc_4152D: inc r15 cmp r15, r14 jl short loc_414E0 mov rcx, [rbx] loc_41538: movsxd r14, dword ptr [rcx+3Ch] test r14, r14 jle short loc_4159F movsxd r15, dword ptr [rcx+54h] add r14, r15 loc_41548: mov rax, [rbx] mov rcx, [rax+180h] test byte ptr [rcx+r15], 1 jnz short loc_415AA mov rax, [rax+138h] movsxd rax, dword ptr [rax+r15*4] mov rcx, [rbx+10h] mov r8, [rbx+20h] mov rdx, [rcx+48h] mov rsi, [rcx+60h] movzx edx, word ptr [rdx+rax*2] movsxd rsi, dword ptr [rsi+rax*4] add rsi, [rcx+0A8h] mov rax, [r8+60h] movsxd rdi, dword ptr [rax+r15*4] add rdi, [r8+0A8h] call _memcpy inc r15 cmp r15, r14 jl short loc_41548 loc_4159F: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_415AA: lea rdi, aRefinementIsch; "_refinement.isChildVertexComplete(cVert"... lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_3; "void OpenSubdiv::v3_6_0::Vtr::internal:"... mov edx, 1B7h call ___assert_fail
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags( int **this, long long a2, long long a3, long long a4, long long a5, long long a6) { long long v6; // rax int *v8; // rcx long long result; // rax int v10; // ecx long long v11; // rdx long long v12; // r14 long long v13; // r15 long long v14; // r14 unsigned int v15; // ebp int *v16; // rsi long long v17; // rdx long long v18; // rdi long long v19; // rsi long long v20; // r14 long long v21; // r15 long long v22; // r14 long long v23; // rax int *v24; // rcx long long v25; // [rsp-8h] [rbp-28h] long long v26; // [rsp+0h] [rbp-20h] long long v27; // [rsp+8h] [rbp-18h] long long v28; // [rsp+10h] [rbp-10h] int v29; // [rsp+18h] [rbp-8h] v25 = v6; v8 = *this; result = (unsigned int)(*this)[13]; if ( (int)result > 0 ) { v10 = v8[19]; result = (unsigned int)(v10 + result); v11 = *(int *)(*((_QWORD *)this[4] + 12) + 4LL * v10); do { *(_BYTE *)(*((_QWORD *)this[4] + 21) + v11) = 0; ++v10; ++v11; } while ( v10 < (int)result ); v8 = *this; } v12 = v8[14]; if ( v12 > 0 ) { v13 = v8[20]; v14 = v13 + v12; v15 = (unsigned __int8)(8 * (*((_BYTE *)this[2] + 13) ^ 1) + 1); while ( 1 ) { result = *(int *)(*((_QWORD *)*this + 39) + 4 * v13); v16 = this[4]; v17 = *(unsigned __int16 *)(*((_QWORD *)v16 + 9) + 2 * v13); v18 = *((_QWORD *)v16 + 21) + *(int *)(*((_QWORD *)v16 + 12) + 4 * v13); if ( (*(_BYTE *)(*((_QWORD *)this[2] + 6) + result) & 9) != 0 ) { if ( *(_WORD *)(*((_QWORD *)v16 + 9) + 2 * v13) ) { v19 = v15; LABEL_12: result = memset(v18, v19, v17); } } else if ( *(_WORD *)(*((_QWORD *)v16 + 9) + 2 * v13) ) { v19 = 0LL; goto LABEL_12; } if ( ++v13 >= v14 ) { v8 = *this; break; } } } v20 = v8[15]; if ( v20 > 0 ) { v21 = v8[21]; v22 = v21 + v20; do { if ( (*(_BYTE *)(*((_QWORD *)*this + 48) + v21) & 1) != 0 ) __assert_fail( "_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp", 439LL, "void OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()"); v23 = *(int *)(*((_QWORD *)*this + 39) + 4 * v21); v24 = this[2]; result = memcpy( *((_QWORD *)this[4] + 21) + *(int *)(*((_QWORD *)this[4] + 12) + 4 * v21++), *((_QWORD *)v24 + 21) + *(int *)(*((_QWORD *)v24 + 12) + 4 * v23), *(unsigned __int16 *)(*((_QWORD *)v24 + 9) + 2 * v23), v24, this[4], a6, v25, v26, v27, v28, v29); } while ( v21 < v22 ); } return result; }
propagateValueTags: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RCX,qword ptr [RDI] MOV EAX,dword ptr [RCX + 0x34] TEST EAX,EAX JLE 0x001414bf MOV ECX,dword ptr [RCX + 0x4c] MOVSXD RDX,ECX ADD EAX,EDX MOV RSI,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RSI + 0x60] MOVSXD RDX,dword ptr [RSI + RDX*0x4] LAB_001414a4: MOV RSI,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RSI + 0xa8] MOV byte ptr [RSI + RDX*0x1],0x0 INC ECX INC RDX CMP ECX,EAX JL 0x001414a4 MOV RCX,qword ptr [RBX] LAB_001414bf: MOVSXD R14,dword ptr [RCX + 0x38] TEST R14,R14 JLE 0x00141538 MOVSXD R15,dword ptr [RCX + 0x50] ADD R14,R15 MOV RAX,qword ptr [RBX + 0x10] MOV AL,byte ptr [RAX + 0xd] XOR AL,0x1 SHL AL,0x3 INC AL MOVZX EBP,AL LAB_001414e0: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + 0x138] MOVSXD RAX,dword ptr [RAX + R15*0x4] MOV RSI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RSI + 0x48] MOV RDI,qword ptr [RSI + 0x60] MOVZX EDX,word ptr [RDX + R15*0x2] MOVSXD RDI,dword ptr [RDI + R15*0x4] MOV RCX,qword ptr [RCX + 0x30] ADD RDI,qword ptr [RSI + 0xa8] TEST byte ptr [RCX + RAX*0x1],0x9 JZ 0x00141521 TEST RDX,RDX JZ 0x0014152d MOV ESI,EBP JMP 0x00141528 LAB_00141521: TEST RDX,RDX JZ 0x0014152d XOR ESI,ESI LAB_00141528: CALL 0x001391a0 LAB_0014152d: INC R15 CMP R15,R14 JL 0x001414e0 MOV RCX,qword ptr [RBX] LAB_00141538: MOVSXD R14,dword ptr [RCX + 0x3c] TEST R14,R14 JLE 0x0014159f MOVSXD R15,dword ptr [RCX + 0x54] ADD R14,R15 LAB_00141548: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x180] TEST byte ptr [RCX + R15*0x1],0x1 JNZ 0x001415aa MOV RAX,qword ptr [RAX + 0x138] MOVSXD RAX,dword ptr [RAX + R15*0x4] MOV RCX,qword ptr [RBX + 0x10] MOV R8,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RCX + 0x48] MOV RSI,qword ptr [RCX + 0x60] MOVZX EDX,word ptr [RDX + RAX*0x2] MOVSXD RSI,dword ptr [RSI + RAX*0x4] ADD RSI,qword ptr [RCX + 0xa8] MOV RAX,qword ptr [R8 + 0x60] MOVSXD RDI,dword ptr [RAX + R15*0x4] ADD RDI,qword ptr [R8 + 0xa8] CALL 0x00139ab0 INC R15 CMP R15,R14 JL 0x00141548 LAB_0014159f: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001415aa: LEA RDI,[0x1b5630] LEA RSI,[0x1b5659] LEA RCX,[0x1b5712] MOV EDX,0x1b7 CALL 0x00139540
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags(FVarRefinement *this) { byte bVar1; long lVar2; int iVar3; long lVar4; int iVar5; long lVar6; ulong __n; uint __c; long lVar7; lVar6 = *(long *)this; if (0 < *(int *)(lVar6 + 0x34)) { iVar5 = *(int *)(lVar6 + 0x4c); iVar3 = *(int *)(lVar6 + 0x34) + iVar5; lVar6 = (long)*(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + (long)iVar5 * 4); do { *(int1 *)(*(long *)(*(long *)(this + 0x20) + 0xa8) + lVar6) = 0; iVar5 = iVar5 + 1; lVar6 = lVar6 + 1; } while (iVar5 < iVar3); lVar6 = *(long *)this; } if (0 < (long)*(int *)(lVar6 + 0x38)) { lVar7 = (long)*(int *)(lVar6 + 0x50); lVar6 = *(int *)(lVar6 + 0x38) + lVar7; bVar1 = *(byte *)(*(long *)(this + 0x10) + 0xd); do { lVar2 = *(long *)(this + 0x20); __n = (ulong)*(ushort *)(*(long *)(lVar2 + 0x48) + lVar7 * 2); if ((*(byte *)(*(long *)(*(long *)(this + 0x10) + 0x30) + (long)*(int *)(*(long *)(*(long *)this + 0x138) + lVar7 * 4)) & 9) == 0) { if (__n != 0) { __c = 0; goto LAB_00141528; } } else if (__n != 0) { __c = (uint)(byte)((bVar1 ^ 1) * '\b' + 1); LAB_00141528: memset((void *)((long)*(int *)(*(long *)(lVar2 + 0x60) + lVar7 * 4) + *(long *)(lVar2 + 0xa8)),__c,__n); } lVar7 = lVar7 + 1; } while (lVar7 < lVar6); lVar6 = *(long *)this; } if (0 < (long)*(int *)(lVar6 + 0x3c)) { lVar7 = (long)*(int *)(lVar6 + 0x54); lVar6 = *(int *)(lVar6 + 0x3c) + lVar7; do { if ((*(byte *)(*(long *)(*(long *)this + 0x180) + lVar7) & 1) != 0) { /* WARNING: Subroutine does not return */ __assert_fail("_refinement.isChildVertexComplete(cVert)", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp" ,0x1b7, "void OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::propagateValueTags()" ); } lVar4 = (long)*(int *)(*(long *)(*(long *)this + 0x138) + lVar7 * 4); lVar2 = *(long *)(this + 0x10); memcpy((void *)((long)*(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + lVar7 * 4) + *(long *)(*(long *)(this + 0x20) + 0xa8)), (void *)((long)*(int *)(*(long *)(lVar2 + 0x60) + lVar4 * 4) + *(long *)(lVar2 + 0xa8)) ,(ulong)*(ushort *)(*(long *)(lVar2 + 0x48) + lVar4 * 2)); lVar7 = lVar7 + 1; } while (lVar7 < lVar6); } return; }
48,798
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O0
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x7483e jmp 0x74840 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x39(%rbp) je 0x7486e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x18(%rbp), %rsi callq 0x786d0 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0x74877 jmp 0x748c6 movq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x78910 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x78980 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jg 0x7489f jmp 0x748c6 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x74840 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nop
my_caseup_str_utf8mb4: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_38], rax jmp short $+2 loc_7483E: jmp short $+2 loc_74840: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_39], al jz short loc_7486E mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, [rbp+var_18] call my_mb_wc_utf8mb4_no_range mov [rbp+var_1C], eax cmp eax, 0 setnle al mov [rbp+var_39], al loc_7486E: mov al, [rbp+var_39] test al, 1 jnz short loc_74877 jmp short loc_748C6 loc_74877: mov rdi, [rbp+var_38] lea rsi, [rbp+var_18] call my_toupper_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call my_wc_mb_utf8mb4_no_range mov [rbp+var_20], eax cmp eax, 0 jg short loc_7489F jmp short loc_748C6 loc_7489F: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_74840 loc_748C6: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] sub rax, rcx add rsp, 40h pop rbp retn
_BYTE * my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { bool v3; // [rsp+7h] [rbp-39h] long long v4; // [rsp+8h] [rbp-38h] _BYTE *v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] BYREF _BYTE *v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v5 = a2; v4 = *(_QWORD *)(a1 + 120); while ( 1 ) { v3 = 0; if ( *v9 ) { v7 = my_mb_wc_utf8mb4_no_range(v10, &v8, v9); v3 = v7 > 0; } if ( !v3 ) break; my_toupper_utf8mb4(v4, &v8); v6 = my_wc_mb_utf8mb4_no_range(v10, v8, v5); if ( v6 <= 0 ) break; v9 += v7; v5 += v6; } *v5 = 0; return (_BYTE *)(v5 - a2); }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x38],RAX JMP 0x0017483e LAB_0017483e: JMP 0x00174840 LAB_00174840: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x0017486e MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x001786d0 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x39],AL LAB_0017486e: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x00174877 JMP 0x001748c6 LAB_00174877: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x18] CALL 0x00178910 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00178980 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JG 0x0017489f JMP 0x001748c6 LAB_0017489f: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00174840 LAB_001748c6: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { int8 uVar1; bool bVar2; int iVar3; char *local_30; int local_24; int8 local_20; char *local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_2; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (*local_18 != '\0') { local_24 = my_mb_wc_utf8mb4_no_range(local_10,&local_20,local_18); bVar2 = 0 < local_24; } if (!bVar2) break; my_toupper_utf8mb4(uVar1,&local_20); iVar3 = my_wc_mb_utf8mb4_no_range(local_10,local_20,local_30); if (iVar3 < 1) break; local_18 = local_18 + local_24; local_30 = local_30 + iVar3; } *local_30 = '\0'; return (long)local_30 - (long)param_2; }
48,799
testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void ReportFailureInUnknownLocation(TestPartResult::Type result_type, const std::string& message) { // This function is a friend of UnitTest and as such has access to // AddTestPartResult. UnitTest::GetInstance()->AddTestPartResult( result_type, nullptr, // No info about the source file where the exception occurred. -1, // We have no info on which line caused the exception. message, ""); // No stack trace, either. }
O0
cpp
testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x68, %rsp movl %edi, 0x64(%rsp) movq %rsi, 0x58(%rsp) callq 0xc4be0 movq %rax, (%rsp) movl 0x64(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x16d00 movq 0x18(%rsp), %rdx leaq 0x4f601(%rip), %rsi # 0x11d894 leaq 0x38(%rsp), %rdi callq 0x1dbb0 jmp 0xce29f movq 0x10(%rsp), %r8 movl 0xc(%rsp), %esi movq (%rsp), %rdi xorl %eax, %eax movl %eax, %edx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF leaq 0x38(%rsp), %r9 callq 0xc4c70 jmp 0xce2c1 leaq 0x38(%rsp), %rdi callq 0x1dfd0 leaq 0x37(%rsp), %rdi callq 0x16790 addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) jmp 0xce302 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x1dfd0 leaq 0x37(%rsp), %rdi callq 0x16790 movq 0x28(%rsp), %rdi callq 0x16cf0 nopw %cs:(%rax,%rax)
_ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 68h mov [rsp+68h+var_4], edi mov qword ptr [rsp+68h+var_10], rsi; int call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov [rsp+68h+var_68], rax; void * mov eax, [rsp+68h+var_4] mov [rsp+68h+var_5C], eax mov rax, qword ptr [rsp+68h+var_10] mov qword ptr [rsp+68h+var_58], rax; int lea rdi, [rsp+68h+var_31] mov qword ptr [rsp+68h+var_50], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+68h+var_50] lea rsi, aSFromSSMsTotal+1Ah; "" lea rdi, [rsp+68h+var_31+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_CE29F: mov r8, qword ptr [rsp+68h+var_58]; int mov esi, [rsp+68h+var_5C]; int mov rdi, [rsp+68h+var_68]; int xor eax, eax mov edx, eax; int mov ecx, 0FFFFFFFFh; int lea r9, [rsp+68h+var_31+1]; int call _ZN7testing8UnitTest17AddTestPartResultENS_14TestPartResult4TypeEPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_; testing::UnitTest::AddTestPartResult(testing::TestPartResult::Type,char const*,int,std::string const&,std::string const&) jmp short $+2 loc_CE2C1: lea rdi, [rsp+68h+var_31+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+68h+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax jmp short loc_CE302 mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_CE302: lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long testing::internal::ReportFailureInUnknownLocation(testing::UnitTest *a1, long long a2) { void *Instance; // [rsp+0h] [rbp-68h] int v4[8]; // [rsp+37h] [rbp-31h] BYREF int v5[2]; // [rsp+58h] [rbp-10h] int v6; // [rsp+64h] [rbp-4h] v6 = (int)a1; *(_QWORD *)v5 = a2; Instance = testing::UnitTest::GetInstance(a1); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v4 + 1, (long long)"", (long long)v4); testing::UnitTest::AddTestPartResult((long long)Instance, (int)a1, 0LL, -1, a2, (long long)v4 + 1); std::string::~string((char *)v4 + 1); return std::allocator<char>::~allocator(v4, (const char *)(unsigned int)a1); }
ReportFailureInUnknownLocation: SUB RSP,0x68 MOV dword ptr [RSP + 0x64],EDI MOV qword ptr [RSP + 0x58],RSI CALL 0x001c4be0 MOV qword ptr [RSP],RAX MOV EAX,dword ptr [RSP + 0x64] MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x37] MOV qword ptr [RSP + 0x18],RDI CALL 0x00116d00 MOV RDX,qword ptr [RSP + 0x18] LAB_001ce28c: LEA RSI,[0x21d894] LEA RDI,[RSP + 0x38] CALL 0x0011dbb0 JMP 0x001ce29f LAB_001ce29f: MOV R8,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RSP] XOR EAX,EAX MOV EDX,EAX MOV ECX,0xffffffff LEA R9,[RSP + 0x38] CALL 0x001c4c70 LAB_001ce2bf: JMP 0x001ce2c1 LAB_001ce2c1: LEA RDI,[RSP + 0x38] CALL 0x0011dfd0 LEA RDI,[RSP + 0x37] CALL 0x00116790 ADD RSP,0x68 RET
/* testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::string const&) */ void testing::internal::ReportFailureInUnknownLocation(int4 param_1,int8 param_2) { int8 uVar1; int4 uVar2; UnitTest *pUVar3; allocator local_31; string local_30 [32]; int8 local_10; int4 local_4; local_10 = param_2; local_4 = param_1; pUVar3 = (UnitTest *)UnitTest::GetInstance(); uVar2 = local_4; uVar1 = local_10; std::allocator<char>::allocator(); /* try { // try from 001ce28c to 001ce29c has its CatchHandler @ 001ce2da */ std::__cxx11::string::string<std::allocator<char>>(local_30,"",&local_31); /* try { // try from 001ce29f to 001ce2be has its CatchHandler @ 001ce2ea */ UnitTest::AddTestPartResult(pUVar3,uVar2,0,0xffffffff,uVar1,local_30); std::__cxx11::string::~string(local_30); std::allocator<char>::~allocator((allocator<char> *)&local_31); return; }