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
28,800
JS_ReadSharedArrayBuffer
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadSharedArrayBuffer(BCReaderState *s) { JSContext *ctx = s->ctx; uint32_t byte_length, max_byte_length; uint64_t max_byte_length_u64, *pmax_byte_length = NULL; uint8_t *data_ptr; JSValue obj; uint64_t u64; if (bc_get_leb128(s, &byte_length)) return JS_EXCEPTION; if (bc_get_leb128(s, &max_byte_length)) return JS_EXCEPTION; if (max_byte_length < byte_length) return JS_ThrowTypeError(ctx, "invalid array buffer"); if (max_byte_length != UINT32_MAX) { max_byte_length_u64 = max_byte_length; pmax_byte_length = &max_byte_length_u64; } if (bc_get_u64(s, &u64)) return JS_EXCEPTION; data_ptr = (uint8_t *)(uintptr_t)u64; if (js_resize_array(s->ctx, (void **)&s->sab_tab, sizeof(s->sab_tab[0]), &s->sab_tab_size, s->sab_tab_len + 1)) return JS_EXCEPTION; /* keep the SAB pointer so that the user can clone it or free it */ s->sab_tab[s->sab_tab_len++] = data_ptr; /* the SharedArrayBuffer is cloned */ obj = js_array_buffer_constructor3(ctx, JS_UNDEFINED, byte_length, pmax_byte_length, JS_CLASS_SHARED_ARRAY_BUFFER, data_ptr, NULL, NULL, FALSE); if (JS_IsException(obj)) goto fail; if (BC_add_object_ref(s, obj)) goto fail; return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
JS_ReadSharedArrayBuffer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r15 movq (%rdi), %r14 leaq 0x24(%rsp), %rsi callq 0x44e61 movl $0x6, %ebx testl %eax, %eax jne 0x45e52 leaq 0x20(%rsp), %rsi movq %r15, %rdi callq 0x44e61 testl %eax, %eax je 0x45e6f xorl %r15d, %r15d xorl %eax, %eax orq %rax, %r15 movq %r15, %rax movq %rbx, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x20(%rsp), %eax movl 0x24(%rsp), %r12d cmpl %r12d, %eax jae 0x45e93 leaq 0x5847c(%rip), %rsi # 0x9e300 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x21953 jmp 0x45e55 cmpl $-0x1, %eax je 0x45ea3 leaq 0x30(%rsp), %r13 movq %rax, (%r13) jmp 0x45ea6 xorl %r13d, %r13d leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0x4500e testl %eax, %eax jne 0x45e52 movq 0x28(%rsp), %rbp movl 0x50(%r15), %r8d cmpl %r8d, 0x54(%r15) jle 0x45f56 movq 0x48(%r15), %rax movslq 0x50(%r15), %rcx leal 0x1(%rcx), %edx movl %edx, 0x50(%r15) movq %rbp, (%rax,%rcx,8) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movq %rbp, (%rsp) movl $0x0, 0x18(%rsp) movl $0x3, %edx movq %r14, %rdi xorl %esi, %esi movq %r12, %rcx movq %r13, %r8 movl $0x14, %r9d callq 0x38005 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x45f27 movq %r15, %rdi movq %r13, %rsi callq 0x4647d testl %eax, %eax je 0x45f3b movq 0x18(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1ccb2 jmp 0x45e52 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r13, %rax andq %rcx, %rax movl %r13d, %r15d movq %r12, %rbx jmp 0x45e57 leaq 0x48(%r15), %rsi leaq 0x54(%r15), %rcx incl %r8d movq (%r15), %rdi movl $0x8, %edx callq 0x428db testl %eax, %eax jne 0x45e52 jmp 0x45eca
JS_ReadSharedArrayBuffer: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rdi mov r14, [rdi] lea rsi, [rsp+68h+var_44] call bc_get_leb128 mov ebx, 6 test eax, eax jnz short loc_45E52 lea rsi, [rsp+68h+var_48] mov rdi, r15 call bc_get_leb128 test eax, eax jz short loc_45E6F loc_45E52: xor r15d, r15d loc_45E55: xor eax, eax loc_45E57: or r15, rax mov rax, r15 mov rdx, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45E6F: mov eax, [rsp+68h+var_48] mov r12d, [rsp+68h+var_44] cmp eax, r12d jnb short loc_45E93 lea rsi, aInvalidArrayBu_0; "invalid array buffer" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp short loc_45E55 loc_45E93: cmp eax, 0FFFFFFFFh jz short loc_45EA3 lea r13, [rsp+68h+var_38] mov [r13+0], rax jmp short loc_45EA6 loc_45EA3: xor r13d, r13d loc_45EA6: lea rsi, [rsp+68h+var_40] mov rdi, r15 call bc_get_u64 test eax, eax jnz short loc_45E52 mov rbp, [rsp+68h+var_40] mov r8d, [r15+50h] cmp [r15+54h], r8d jle loc_45F56 loc_45ECA: mov rax, [r15+48h] movsxd rcx, dword ptr [r15+50h] lea edx, [rcx+1] mov [r15+50h], edx mov [rax+rcx*8], rbp xorps xmm0, xmm0 movups [rsp+68h+var_60], xmm0 mov [rsp+68h+var_68], rbp mov [rsp+68h+var_50], 0 mov edx, 3 mov rdi, r14 xor esi, esi mov rcx, r12 mov r8, r13 mov r9d, 14h call js_array_buffer_constructor3 mov r13, rax mov r12, rdx cmp r12d, 6 jz short loc_45F27 mov rdi, r15 mov rsi, r13 call BC_add_object_ref1 test eax, eax jz short loc_45F3B loc_45F27: mov rdi, [r14+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT jmp loc_45E52 loc_45F3B: mov rcx, 0FFFFFFFF00000000h mov rax, r13 and rax, rcx mov r15d, r13d mov rbx, r12 jmp loc_45E57 loc_45F56: lea rsi, [r15+48h] lea rcx, [r15+54h] inc r8d mov rdi, [r15] mov edx, 8 call js_realloc_array test eax, eax jnz loc_45E52 jmp loc_45ECA
unsigned long long JS_ReadSharedArrayBuffer( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, unsigned long long a13) { long long v13; // r14 long long v14; // rdx int v15; // ecx unsigned long long v16; // r8 long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 long long v23; // r15 unsigned long long v24; // rax unsigned long long v26; // r12 int *v27; // r13 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rbp int v31; // r8d long long v32; // rax long long v33; // rcx unsigned long long v34; // rax unsigned long long v35; // r13 long long v36; // rdx long long v37; // r12 char v38; // [rsp+0h] [rbp-68h] unsigned int v39; // [rsp+20h] [rbp-48h] BYREF unsigned int v40; // [rsp+24h] [rbp-44h] BYREF long long v41; // [rsp+28h] [rbp-40h] BYREF long long v42; // [rsp+30h] [rbp-38h] BYREF v13 = *(_QWORD *)a1; if ( !(unsigned int)bc_get_leb128(a1, &v40, a11, a12, a13) && !(unsigned int)bc_get_leb128(a1, &v39, v14, v15, v16) ) { v26 = v40; if ( v39 < v40 ) { v23 = 0LL; JS_ThrowTypeError(v13, (long long)"invalid array buffer", v17, v18, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9, v38); goto LABEL_4; } if ( v39 == -1 ) { v27 = 0LL; } else { v27 = (int *)&v42; v42 = v39; } if ( !(unsigned int)bc_get_u64(a1, &v41, v17, v18, v19, v20) ) { v30 = v41; v31 = *(_DWORD *)(a1 + 80); if ( *(_DWORD *)(a1 + 84) > v31 || !(unsigned int)js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 72), 8u, (_DWORD *)(a1 + 84), v31 + 1) ) { v32 = *(_QWORD *)(a1 + 72); v33 = *(int *)(a1 + 80); *(_DWORD *)(a1 + 80) = v33 + 1; *(_QWORD *)(v32 + 8 * v33) = v30; v34 = js_array_buffer_constructor3( v13, 0LL, 3LL, v26, v27, 20LL, (__m128)0LL, a3, a4, a5, v28, v29, a8, a9, v30, 0LL, 0LL, 0); v35 = v34; v37 = v36; if ( (_DWORD)v36 != 6 && !(unsigned int)BC_add_object_ref1(a1, v34) ) { v24 = v35 & 0xFFFFFFFF00000000LL; v23 = (unsigned int)v35; return v24 | v23; } JS_FreeValueRT(*(_QWORD *)(v13 + 24), (_DWORD *)v35, v37); } } } v23 = 0LL; LABEL_4: v24 = 0LL; return v24 | v23; }
JS_ReadSharedArrayBuffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDI MOV R14,qword ptr [RDI] LEA RSI,[RSP + 0x24] CALL 0x00144e61 MOV EBX,0x6 TEST EAX,EAX JNZ 0x00145e52 LEA RSI,[RSP + 0x20] MOV RDI,R15 CALL 0x00144e61 TEST EAX,EAX JZ 0x00145e6f LAB_00145e52: XOR R15D,R15D LAB_00145e55: XOR EAX,EAX LAB_00145e57: OR R15,RAX MOV RAX,R15 MOV RDX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00145e6f: MOV EAX,dword ptr [RSP + 0x20] MOV R12D,dword ptr [RSP + 0x24] CMP EAX,R12D JNC 0x00145e93 LEA RSI,[0x19e300] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x00121953 JMP 0x00145e55 LAB_00145e93: CMP EAX,-0x1 JZ 0x00145ea3 LEA R13,[RSP + 0x30] MOV qword ptr [R13],RAX JMP 0x00145ea6 LAB_00145ea3: XOR R13D,R13D LAB_00145ea6: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x0014500e TEST EAX,EAX JNZ 0x00145e52 MOV RBP,qword ptr [RSP + 0x28] MOV R8D,dword ptr [R15 + 0x50] CMP dword ptr [R15 + 0x54],R8D JLE 0x00145f56 LAB_00145eca: MOV RAX,qword ptr [R15 + 0x48] MOVSXD RCX,dword ptr [R15 + 0x50] LEA EDX,[RCX + 0x1] MOV dword ptr [R15 + 0x50],EDX MOV qword ptr [RAX + RCX*0x8],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],RBP MOV dword ptr [RSP + 0x18],0x0 MOV EDX,0x3 MOV RDI,R14 XOR ESI,ESI MOV RCX,R12 MOV R8,R13 MOV R9D,0x14 CALL 0x00138005 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00145f27 MOV RDI,R15 MOV RSI,R13 CALL 0x0014647d TEST EAX,EAX JZ 0x00145f3b LAB_00145f27: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011ccb2 JMP 0x00145e52 LAB_00145f3b: MOV RCX,-0x100000000 MOV RAX,R13 AND RAX,RCX MOV R15D,R13D MOV RBX,R12 JMP 0x00145e57 LAB_00145f56: LEA RSI,[R15 + 0x48] LEA RCX,[R15 + 0x54] INC R8D MOV RDI,qword ptr [R15] MOV EDX,0x8 CALL 0x001428db TEST EAX,EAX JNZ 0x00145e52 JMP 0x00145eca
int1 [16] JS_ReadSharedArrayBuffer(long *param_1) { long lVar1; long lVar2; int iVar3; ulong uVar4; int8 uVar5; ulong *puVar6; ulong uVar7; int1 auVar8 [16]; uint local_48; uint local_44; int8 local_40; ulong local_38; lVar1 = *param_1; iVar3 = bc_get_leb128(param_1,&local_44); if ((iVar3 == 0) && (iVar3 = bc_get_leb128(param_1,&local_48), iVar3 == 0)) { if (local_48 < local_44) { JS_ThrowTypeError(lVar1,"invalid array buffer"); } else { if (local_48 == 0xffffffff) { puVar6 = (ulong *)0x0; } else { puVar6 = &local_38; local_38 = (ulong)local_48; } iVar3 = bc_get_u64(param_1,&local_40); if ((iVar3 == 0) && (((int)param_1[10] < *(int *)((long)param_1 + 0x54) || (iVar3 = js_realloc_array(*param_1,param_1 + 9,8,(long)param_1 + 0x54,(int)param_1[10] + 1 ), iVar3 == 0)))) { lVar2 = param_1[10]; *(int *)(param_1 + 10) = (int)lVar2 + 1; *(int8 *)(param_1[9] + (long)(int)lVar2 * 8) = local_40; auVar8 = js_array_buffer_constructor3(lVar1,0,3,local_44,puVar6,0x14,local_40,0,0,0); uVar5 = auVar8._8_8_; uVar7 = auVar8._0_8_; if ((auVar8._8_4_ != 6) && (iVar3 = BC_add_object_ref1(param_1,uVar7), iVar3 == 0)) { uVar4 = uVar7 & 0xffffffff00000000; uVar7 = uVar7 & 0xffffffff; goto LAB_00145e57; } JS_FreeValueRT(*(int8 *)(lVar1 + 0x18),uVar7,uVar5); } } } uVar7 = 0; uVar4 = 0; uVar5 = 6; LAB_00145e57: auVar8._8_8_ = uVar5; auVar8._0_8_ = uVar7 | uVar4; return auVar8; }
28,801
JS_ReadSharedArrayBuffer
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadSharedArrayBuffer(BCReaderState *s) { JSContext *ctx = s->ctx; uint32_t byte_length, max_byte_length; uint64_t max_byte_length_u64, *pmax_byte_length = NULL; uint8_t *data_ptr; JSValue obj; uint64_t u64; if (bc_get_leb128(s, &byte_length)) return JS_EXCEPTION; if (bc_get_leb128(s, &max_byte_length)) return JS_EXCEPTION; if (max_byte_length < byte_length) return JS_ThrowTypeError(ctx, "invalid array buffer"); if (max_byte_length != UINT32_MAX) { max_byte_length_u64 = max_byte_length; pmax_byte_length = &max_byte_length_u64; } if (bc_get_u64(s, &u64)) return JS_EXCEPTION; data_ptr = (uint8_t *)(uintptr_t)u64; if (js_resize_array(s->ctx, (void **)&s->sab_tab, sizeof(s->sab_tab[0]), &s->sab_tab_size, s->sab_tab_len + 1)) return JS_EXCEPTION; /* keep the SAB pointer so that the user can clone it or free it */ s->sab_tab[s->sab_tab_len++] = data_ptr; /* the SharedArrayBuffer is cloned */ obj = js_array_buffer_constructor3(ctx, JS_UNDEFINED, byte_length, pmax_byte_length, JS_CLASS_SHARED_ARRAY_BUFFER, data_ptr, NULL, NULL, FALSE); if (JS_IsException(obj)) goto fail; if (BC_add_object_ref(s, obj)) goto fail; return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
JS_ReadSharedArrayBuffer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r15 movq (%rdi), %r14 leaq 0x24(%rsp), %rsi callq 0x469d0 movl $0x6, %ebx testl %eax, %eax jne 0x479b2 leaq 0x20(%rsp), %rsi movq %r15, %rdi callq 0x469d0 testl %eax, %eax je 0x479cf xorl %r15d, %r15d xorl %eax, %eax orq %rax, %r15 movq %r15, %rax movq %rbx, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x20(%rsp), %eax movl 0x24(%rsp), %r12d cmpl %r12d, %eax jae 0x479f3 leaq 0x598ec(%rip), %rsi # 0xa12d0 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x2214f jmp 0x479b5 cmpl $-0x1, %eax je 0x47a03 leaq 0x30(%rsp), %r13 movq %rax, (%r13) jmp 0x47a06 xorl %r13d, %r13d leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0x46b6f testl %eax, %eax jne 0x479b2 movq 0x28(%rsp), %rbp movl 0x50(%r15), %r8d cmpl %r8d, 0x54(%r15) jle 0x47ad4 movq 0x48(%r15), %rax leal 0x1(%r8), %ecx movl %ecx, 0x50(%r15) movslq %r8d, %rcx movq %rbp, (%rax,%rcx,8) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movq %rbp, (%rsp) movl $0x0, 0x18(%rsp) movl $0x3, %edx movq %r14, %rdi xorl %esi, %esi movq %r12, %rcx movq %r13, %r8 movl $0x14, %r9d callq 0x392b3 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x47a87 movq %r15, %rdi movq %r13, %rsi callq 0x48064 testl %eax, %eax je 0x47ab9 cmpl $-0x9, %r12d jb 0x479b2 movq 0x18(%r14), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x479b2 movq %r13, %rsi movq %r12, %rdx callq 0x20d90 jmp 0x479b2 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r13, %rax andq %rcx, %rax movl %r13d, %r15d movq %r12, %rbx jmp 0x479b7 leaq 0x48(%r15), %rsi leaq 0x54(%r15), %rcx incl %r8d movq (%r15), %rdi movl $0x8, %edx callq 0x444ee testl %eax, %eax jne 0x479b2 movl 0x50(%r15), %r8d jmp 0x47a2a
JS_ReadSharedArrayBuffer: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rdi mov r14, [rdi] lea rsi, [rsp+68h+var_44] call bc_get_leb128 mov ebx, 6 test eax, eax jnz short loc_479B2 lea rsi, [rsp+68h+var_48] mov rdi, r15 call bc_get_leb128 test eax, eax jz short loc_479CF loc_479B2: xor r15d, r15d loc_479B5: xor eax, eax loc_479B7: or r15, rax mov rax, r15 mov rdx, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_479CF: mov eax, [rsp+68h+var_48] mov r12d, [rsp+68h+var_44] cmp eax, r12d jnb short loc_479F3 lea rsi, aInvalidArrayBu_0; "invalid array buffer" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp short loc_479B5 loc_479F3: cmp eax, 0FFFFFFFFh jz short loc_47A03 lea r13, [rsp+68h+var_38] mov [r13+0], rax jmp short loc_47A06 loc_47A03: xor r13d, r13d loc_47A06: lea rsi, [rsp+68h+var_40] mov rdi, r15 call bc_get_u64 test eax, eax jnz short loc_479B2 mov rbp, [rsp+68h+var_40] mov r8d, [r15+50h] cmp [r15+54h], r8d jle loc_47AD4 loc_47A2A: mov rax, [r15+48h] lea ecx, [r8+1] mov [r15+50h], ecx movsxd rcx, r8d mov [rax+rcx*8], rbp xorps xmm0, xmm0 movups [rsp+68h+var_60], xmm0 mov [rsp+68h+var_68], rbp mov [rsp+68h+var_50], 0 mov edx, 3 mov rdi, r14 xor esi, esi mov rcx, r12 mov r8, r13 mov r9d, 14h call js_array_buffer_constructor3 mov r13, rax mov r12, rdx cmp r12d, 6 jz short loc_47A87 mov rdi, r15 mov rsi, r13 call BC_add_object_ref1 test eax, eax jz short loc_47AB9 loc_47A87: cmp r12d, 0FFFFFFF7h jb loc_479B2 mov rdi, [r14+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg loc_479B2 mov rsi, r13 mov rdx, r12 call js_free_value_rt jmp loc_479B2 loc_47AB9: mov rcx, 0FFFFFFFF00000000h mov rax, r13 and rax, rcx mov r15d, r13d mov rbx, r12 jmp loc_479B7 loc_47AD4: lea rsi, [r15+48h] lea rcx, [r15+54h] inc r8d mov rdi, [r15] mov edx, 8 call js_realloc_array test eax, eax jnz loc_479B2 mov r8d, [r15+50h] jmp loc_47A2A
unsigned long long JS_ReadSharedArrayBuffer( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, int a13, int a14) { long long v14; // r14 long long v15; // rdx int v16; // ecx int v17; // r8d int v18; // r9d long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 long long v25; // r15 unsigned long long v26; // rax unsigned long long v28; // r12 unsigned long long *v29; // r13 __m128 v30; // xmm4 __m128 v31; // xmm5 long long v32; // rbp int v33; // r8d long long v34; // rax unsigned long long v35; // rax long long v36; // r8 long long v37; // r9 unsigned long long v38; // r13 long long v39; // rdx long long v40; // r12 long long v41; // rdi int v42; // eax long long v43; // rcx char v44; // [rsp+0h] [rbp-68h] unsigned int v45; // [rsp+20h] [rbp-48h] BYREF unsigned int v46; // [rsp+24h] [rbp-44h] BYREF long long v47; // [rsp+28h] [rbp-40h] BYREF long long v48; // [rsp+30h] [rbp-38h] BYREF v14 = *(_QWORD *)a1; if ( !(unsigned int)bc_get_leb128(a1, (int *)&v46, a11, a12, a13, a14) && !(unsigned int)bc_get_leb128(a1, (int *)&v45, v15, v16, v17, v18) ) { v28 = v46; if ( v45 < v46 ) { v25 = 0LL; JS_ThrowTypeError(v14, (long long)"invalid array buffer", v19, v20, v21, v22, a2, a3, a4, a5, v23, v24, a8, a9, v44); goto LABEL_4; } if ( v45 == -1 ) { v29 = 0LL; } else { v29 = (unsigned long long *)&v48; v48 = v45; } if ( !(unsigned int)bc_get_u64(a1, &v47, v19, v20, v21, v22) ) { v32 = v47; v33 = *(_DWORD *)(a1 + 80); if ( *(_DWORD *)(a1 + 84) > v33 ) goto LABEL_13; if ( !(unsigned int)js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 72), 8u, (_DWORD *)(a1 + 84), v33 + 1) ) { v33 = *(_DWORD *)(a1 + 80); LABEL_13: v34 = *(_QWORD *)(a1 + 72); *(_DWORD *)(a1 + 80) = v33 + 1; *(_QWORD *)(v34 + 8LL * v33) = v32; v35 = js_array_buffer_constructor3( v14, 0LL, 3LL, v28, v29, 20LL, (__m128)0LL, a3, a4, a5, v30, v31, a8, a9, v32, 0LL, 0LL, 0); v38 = v35; v40 = v39; if ( (_DWORD)v39 != 6 && !(unsigned int)BC_add_object_ref1(a1, v35) ) { v26 = v38 & 0xFFFFFFFF00000000LL; v25 = (unsigned int)v38; return v26 | v25; } if ( (unsigned int)v40 >= 0xFFFFFFF7 ) { v41 = *(_QWORD *)(v14 + 24); v42 = *(_DWORD *)v38; v43 = (unsigned int)(*(_DWORD *)v38 - 1); *(_DWORD *)v38 = v43; if ( v42 <= 1 ) js_free_value_rt(v41, (_QWORD *)v38, v40, v43, v36, v37); } } } } v25 = 0LL; LABEL_4: v26 = 0LL; return v26 | v25; }
JS_ReadSharedArrayBuffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDI MOV R14,qword ptr [RDI] LEA RSI,[RSP + 0x24] CALL 0x001469d0 MOV EBX,0x6 TEST EAX,EAX JNZ 0x001479b2 LEA RSI,[RSP + 0x20] MOV RDI,R15 CALL 0x001469d0 TEST EAX,EAX JZ 0x001479cf LAB_001479b2: XOR R15D,R15D LAB_001479b5: XOR EAX,EAX LAB_001479b7: OR R15,RAX MOV RAX,R15 MOV RDX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001479cf: MOV EAX,dword ptr [RSP + 0x20] MOV R12D,dword ptr [RSP + 0x24] CMP EAX,R12D JNC 0x001479f3 LEA RSI,[0x1a12d0] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0012214f JMP 0x001479b5 LAB_001479f3: CMP EAX,-0x1 JZ 0x00147a03 LEA R13,[RSP + 0x30] MOV qword ptr [R13],RAX JMP 0x00147a06 LAB_00147a03: XOR R13D,R13D LAB_00147a06: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x00146b6f TEST EAX,EAX JNZ 0x001479b2 MOV RBP,qword ptr [RSP + 0x28] MOV R8D,dword ptr [R15 + 0x50] CMP dword ptr [R15 + 0x54],R8D JLE 0x00147ad4 LAB_00147a2a: MOV RAX,qword ptr [R15 + 0x48] LEA ECX,[R8 + 0x1] MOV dword ptr [R15 + 0x50],ECX MOVSXD RCX,R8D MOV qword ptr [RAX + RCX*0x8],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],RBP MOV dword ptr [RSP + 0x18],0x0 MOV EDX,0x3 MOV RDI,R14 XOR ESI,ESI MOV RCX,R12 MOV R8,R13 MOV R9D,0x14 CALL 0x001392b3 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00147a87 MOV RDI,R15 MOV RSI,R13 CALL 0x00148064 TEST EAX,EAX JZ 0x00147ab9 LAB_00147a87: CMP R12D,-0x9 JC 0x001479b2 MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x001479b2 MOV RSI,R13 MOV RDX,R12 CALL 0x00120d90 JMP 0x001479b2 LAB_00147ab9: MOV RCX,-0x100000000 MOV RAX,R13 AND RAX,RCX MOV R15D,R13D MOV RBX,R12 JMP 0x001479b7 LAB_00147ad4: LEA RSI,[R15 + 0x48] LEA RCX,[R15 + 0x54] INC R8D MOV RDI,qword ptr [R15] MOV EDX,0x8 CALL 0x001444ee TEST EAX,EAX JNZ 0x001479b2 MOV R8D,dword ptr [R15 + 0x50] JMP 0x00147a2a
int1 [16] JS_ReadSharedArrayBuffer(long *param_1) { long lVar1; int8 uVar2; int iVar3; ulong uVar5; int8 uVar6; ulong *puVar7; ulong uVar8; int1 auVar9 [16]; uint local_48; uint local_44; int8 local_40; ulong local_38; int *piVar4; lVar1 = *param_1; iVar3 = bc_get_leb128(param_1,&local_44); if ((iVar3 == 0) && (iVar3 = bc_get_leb128(param_1,&local_48), iVar3 == 0)) { if (local_48 < local_44) { JS_ThrowTypeError(lVar1,"invalid array buffer"); } else { if (local_48 == 0xffffffff) { puVar7 = (ulong *)0x0; } else { puVar7 = &local_38; local_38 = (ulong)local_48; } iVar3 = bc_get_u64(param_1,&local_40); if (iVar3 == 0) { iVar3 = (int)param_1[10]; if (*(int *)((long)param_1 + 0x54) <= iVar3) { iVar3 = js_realloc_array(*param_1,param_1 + 9,8,(long)param_1 + 0x54,iVar3 + 1); if (iVar3 != 0) goto LAB_001479b5; iVar3 = (int)param_1[10]; } *(int *)(param_1 + 10) = iVar3 + 1; *(int8 *)(param_1[9] + (long)iVar3 * 8) = local_40; auVar9 = js_array_buffer_constructor3(lVar1,0,3,local_44,puVar7,0x14,local_40,0,0,0); uVar6 = auVar9._8_8_; piVar4 = auVar9._0_8_; if ((auVar9._8_4_ != 6) && (iVar3 = BC_add_object_ref1(param_1,piVar4), iVar3 == 0)) { uVar5 = (ulong)piVar4 & 0xffffffff00000000; uVar8 = (ulong)piVar4 & 0xffffffff; goto LAB_001479b7; } if (0xfffffff6 < auVar9._8_4_) { uVar2 = *(int8 *)(lVar1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar2,piVar4,uVar6); } } } } } LAB_001479b5: uVar8 = 0; uVar5 = 0; uVar6 = 6; LAB_001479b7: auVar9._8_8_ = uVar6; auVar9._0_8_ = uVar8 | uVar5; return auVar9; }
28,802
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
PatchParam PatchTable::GetPatchParam(int arrayIndex, int patchIndex) const { PatchArray const & pa = getPatchArray(arrayIndex); assert((pa.patchIndex + patchIndex) < (int)_paramTable.size()); return _paramTable[pa.patchIndex + patchIndex]; }
O1
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const: pushq %rax movq 0x8(%rdi), %rax movq 0x10(%rdi), %rcx subq %rax, %rcx shrq $0x2, %rcx imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD cmpl %esi, %ecx jle 0x69bc5 movslq %esi, %rcx leaq (%rcx,%rcx,4), %rcx movslq 0xc(%rax,%rcx,4), %rcx movslq %edx, %rax addq %rcx, %rax movq 0x38(%rdi), %rcx movq 0x40(%rdi), %rdx subq %rcx, %rdx shrq $0x3, %rdx cmpl %edx, %eax jge 0x69be4 movq (%rcx,%rax,8), %rax popq %rcx retq leaq 0x4f131(%rip), %rdi # 0xb8cfd leaq 0x4ebff(%rip), %rsi # 0xb87d2 leaq 0x4f149(%rip), %rcx # 0xb8d23 movl $0x90, %edx callq 0x39560 leaq 0x4ee6a(%rip), %rdi # 0xb8a55 leaq 0x4ebe0(%rip), %rsi # 0xb87d2 leaq 0x4ee93(%rip), %rcx # 0xb8a8c movl $0x136, %edx # imm = 0x136 callq 0x39560 nop
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable13GetPatchParamEii: push rax mov rax, [rdi+8] mov rcx, [rdi+10h] sub rcx, rax shr rcx, 2 imul ecx, 0CCCCCCCDh cmp ecx, esi jle short loc_69BC5 movsxd rcx, esi lea rcx, [rcx+rcx*4] movsxd rcx, dword ptr [rax+rcx*4+0Ch] movsxd rax, edx add rax, rcx mov rcx, [rdi+38h] mov rdx, [rdi+40h] sub rdx, rcx shr rdx, 3 cmp eax, edx jge short loc_69BE4 mov rax, [rcx+rax*8] pop rcx retn loc_69BC5: lea rdi, aArrayindexInde; "arrayIndex<(Index)GetNumPatchArrays()" lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstPatchtabl; "const PatchTable::PatchArray &OpenSubdi"... mov edx, 90h call ___assert_fail loc_69BE4: lea rdi, aPaPatchindexPa; "(pa.patchIndex + patchIndex) < (int)_pa"... lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aPatchparamOpen_1; "PatchParam OpenSubdiv::v3_6_0::Far::Pat"... mov edx, 136h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam( OpenSubdiv::v3_6_0::Far::PatchTable *this, signed int a2, int a3) { long long v3; // rax long long v4; // rax long long v5; // rcx v3 = *((_QWORD *)this + 1); if ( (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 2) - v3) >> 2)) <= a2 ) __assert_fail( "arrayIndex<(Index)GetNumPatchArrays()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 144LL, "const PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index) const"); v4 = *(int *)(v3 + 20LL * a2 + 12) + (long long)a3; v5 = *((_QWORD *)this + 7); if ( (int)v4 >= (int)((unsigned long long)(*((_QWORD *)this + 8) - v5) >> 3) ) __assert_fail( "(pa.patchIndex + patchIndex) < (int)_paramTable.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 310LL, "PatchParam OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const"); return *(_QWORD *)(v5 + 8 * v4); }
GetPatchParam: PUSH RAX MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] SUB RCX,RAX SHR RCX,0x2 IMUL ECX,ECX,-0x33333333 CMP ECX,ESI JLE 0x00169bc5 MOVSXD RCX,ESI LEA RCX,[RCX + RCX*0x4] MOVSXD RCX,dword ptr [RAX + RCX*0x4 + 0xc] MOVSXD RAX,EDX ADD RAX,RCX MOV RCX,qword ptr [RDI + 0x38] MOV RDX,qword ptr [RDI + 0x40] SUB RDX,RCX SHR RDX,0x3 CMP EAX,EDX JGE 0x00169be4 MOV RAX,qword ptr [RCX + RAX*0x8] POP RCX RET LAB_00169bc5: LEA RDI,[0x1b8cfd] LEA RSI,[0x1b87d2] LEA RCX,[0x1b8d23] MOV EDX,0x90 CALL 0x00139560 LAB_00169be4: LEA RDI,[0x1b8a55] LEA RSI,[0x1b87d2] LEA RCX,[0x1b8a8c] MOV EDX,0x136 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const */ int8 __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(PatchTable *this,int param_1,int param_2) { long lVar1; if ((int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 2) * -0x33333333 <= param_1) { /* WARNING: Subroutine does not return */ __assert_fail("arrayIndex<(Index)GetNumPatchArrays()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0x90, "const PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index) const" ); } lVar1 = (long)param_2 + (long)*(int *)(*(long *)(this + 8) + 0xc + (long)param_1 * 0x14); if ((int)lVar1 < (int)((ulong)(*(long *)(this + 0x40) - *(long *)(this + 0x38)) >> 3)) { return *(int8 *)(*(long *)(this + 0x38) + lVar1 * 8); } /* WARNING: Subroutine does not return */ __assert_fail("(pa.patchIndex + patchIndex) < (int)_paramTable.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0x136, "PatchParam OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const"); }
28,803
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
PatchParam PatchTable::GetPatchParam(int arrayIndex, int patchIndex) const { PatchArray const & pa = getPatchArray(arrayIndex); assert((pa.patchIndex + patchIndex) < (int)_paramTable.size()); return _paramTable[pa.patchIndex + patchIndex]; }
O2
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const: pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rdi, %r14 callq 0x50dd0 movslq 0xc(%rax), %rcx movslq %ebx, %rax addq %rcx, %rax movq 0x38(%r14), %rcx movq 0x40(%r14), %rdx subq %rcx, %rdx shrq $0x3, %rdx cmpl %edx, %eax jge 0x7c15d movq (%rcx,%rax,8), %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x46ed9(%rip), %rdi # 0xc303d leaq 0x46c4f(%rip), %rsi # 0xc2dba leaq 0x46f02(%rip), %rcx # 0xc3074 movl $0x136, %edx # imm = 0x136 callq 0x512a0
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable13GetPatchParamEii: push r14 push rbx push rax mov ebx, edx mov r14, rdi call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable13getPatchArrayEi; OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(int) movsxd rcx, dword ptr [rax+0Ch] movsxd rax, ebx add rax, rcx mov rcx, [r14+38h] mov rdx, [r14+40h] sub rdx, rcx shr rdx, 3 cmp eax, edx jge short loc_7C15D mov rax, [rcx+rax*8] add rsp, 8 pop rbx pop r14 retn loc_7C15D: lea rdi, aPaPatchindexPa; "(pa.patchIndex + patchIndex) < (int)_pa"... lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aPatchparamOpen_1; "PatchParam OpenSubdiv::v3_6_0::Far::Pat"... mov edx, 136h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam( OpenSubdiv::v3_6_0::Far::PatchTable *this, int a2, int a3) { long long v3; // rax long long v4; // rcx v3 = *(int *)(OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(this, a2) + 12) + (long long)a3; v4 = *((_QWORD *)this + 7); if ( (int)v3 >= (int)((unsigned long long)(*((_QWORD *)this + 8) - v4) >> 3) ) __assert_fail( "(pa.patchIndex + patchIndex) < (int)_paramTable.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 310LL, "PatchParam OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const"); return *(_QWORD *)(v4 + 8 * v3); }
GetPatchParam: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R14,RDI CALL 0x00150dd0 MOVSXD RCX,dword ptr [RAX + 0xc] MOVSXD RAX,EBX ADD RAX,RCX MOV RCX,qword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] SUB RDX,RCX SHR RDX,0x3 CMP EAX,EDX JGE 0x0017c15d MOV RAX,qword ptr [RCX + RAX*0x8] ADD RSP,0x8 POP RBX POP R14 RET LAB_0017c15d: LEA RDI,[0x1c303d] LEA RSI,[0x1c2dba] LEA RCX,[0x1c3074] MOV EDX,0x136 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const */ int8 __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(PatchTable *this,int param_1,int param_2) { long lVar1; lVar1 = getPatchArray(this,param_1); lVar1 = (long)param_2 + (long)*(int *)(lVar1 + 0xc); if ((int)lVar1 < (int)((ulong)(*(long *)(this + 0x40) - *(long *)(this + 0x38)) >> 3)) { return *(int8 *)(*(long *)(this + 0x38) + lVar1 * 8); } /* WARNING: Subroutine does not return */ __assert_fail("(pa.patchIndex + patchIndex) < (int)_paramTable.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0x136, "PatchParam OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchParam(int, int) const"); }
28,804
mbr_join_square
eloqsql/storage/myisam/rt_split.c
static double mbr_join_square(const double *a, const double *b, int n_dim) { const double *end = a + n_dim * 2; double square = 1.0; do { square *= ((a[1] < b[1]) ? b[1] : a[1]) - ((a[0] > b[0]) ? b[0] : a[0]); a += 2; b += 2; }while (a != end); /* Check if not finite (i.e. infinity or NaN) */ if (!isfinite(square)) square = DBL_MAX; return square; }
O0
c
mbr_join_square: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movl -0x14(%rbp), %ecx shll %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movsd 0x82cf2(%rip), %xmm0 # 0x158c60 movsd %xmm0, -0x28(%rbp) movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm1 movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm0 ucomisd %xmm1, %xmm0 jbe 0xd5f9b movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm0 movsd %xmm0, -0x30(%rbp) jmp 0xd5fa9 movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm0 movsd %xmm0, -0x30(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) movq -0x8(%rbp), %rax movsd (%rax), %xmm0 movq -0x10(%rbp), %rax ucomisd (%rax), %xmm0 jbe 0xd5fd4 movq -0x10(%rbp), %rax movsd (%rax), %xmm0 movsd %xmm0, -0x40(%rbp) jmp 0xd5fe1 movq -0x8(%rbp), %rax movsd (%rax), %xmm0 movsd %xmm0, -0x40(%rbp) movsd -0x38(%rbp), %xmm0 movsd -0x40(%rbp), %xmm1 subsd %xmm1, %xmm0 mulsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x28(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax addq $0x10, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0xd5f73 movsd -0x28(%rbp), %xmm0 movq %xmm0, %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF andq %rcx, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 subq %rcx, %rax setl %al testb $0x1, %al jne 0xd6057 movsd 0x82c26(%rip), %xmm0 # 0x158c78 movsd %xmm0, -0x28(%rbp) movsd -0x28(%rbp), %xmm0 popq %rbp retq nop
mbr_join_square_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov ecx, [rbp+var_14] shl ecx, 1 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_20], rax movsd xmm0, cs:qword_158C60 movsd [rbp+var_28], xmm0 loc_D5F73: mov rax, [rbp+var_8] movsd xmm1, qword ptr [rax+8] mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+8] ucomisd xmm0, xmm1 jbe short loc_D5F9B mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+8] movsd [rbp+var_30], xmm0 jmp short loc_D5FA9 loc_D5F9B: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax+8] movsd [rbp+var_30], xmm0 loc_D5FA9: movsd xmm0, [rbp+var_30] movsd [rbp+var_38], xmm0 mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_10] ucomisd xmm0, qword ptr [rax] jbe short loc_D5FD4 mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax] movsd [rbp+var_40], xmm0 jmp short loc_D5FE1 loc_D5FD4: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax] movsd [rbp+var_40], xmm0 loc_D5FE1: movsd xmm0, [rbp+var_38] movsd xmm1, [rbp+var_40] subsd xmm0, xmm1 mulsd xmm0, [rbp+var_28] movsd [rbp+var_28], xmm0 mov rax, [rbp+var_8] add rax, 10h mov [rbp+var_8], rax mov rax, [rbp+var_10] add rax, 10h mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp rax, [rbp+var_20] jnz loc_D5F73 movsd xmm0, [rbp+var_28] movq rax, xmm0 mov rcx, 7FFFFFFFFFFFFFFFh and rax, rcx mov rcx, 7FF0000000000000h sub rax, rcx setl al test al, 1 jnz short loc_D6057 movsd xmm0, cs:qword_158C78 movsd [rbp+var_28], xmm0 loc_D6057: movsd xmm0, [rbp+var_28] pop rbp retn
double mbr_join_square_0(double *a1, double *a2, int a3) { double v4; // [rsp+0h] [rbp-40h] double v5; // [rsp+10h] [rbp-30h] double v6; // [rsp+18h] [rbp-28h] double *v8; // [rsp+38h] [rbp-8h] v8 = a1; v6 = 1.0; do { if ( a2[1] <= v8[1] ) v5 = v8[1]; else v5 = a2[1]; if ( *v8 <= *a2 ) v4 = *v8; else v4 = *a2; v6 = (v5 - v4) * v6; v8 += 2; a2 += 2; } while ( v8 != &a1[2 * a3] ); if ( (*(_QWORD *)&v6 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return 1.797693134862316e308; return v6; }
mbr_join_square: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x14] SHL ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVSD XMM0,qword ptr [0x00258c60] MOVSD qword ptr [RBP + -0x28],XMM0 LAB_001d5f73: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x8] UCOMISD XMM0,XMM1 JBE 0x001d5f9b MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x8] MOVSD qword ptr [RBP + -0x30],XMM0 JMP 0x001d5fa9 LAB_001d5f9b: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX + 0x8] MOVSD qword ptr [RBP + -0x30],XMM0 LAB_001d5fa9: MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD qword ptr [RBP + -0x38],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] UCOMISD XMM0,qword ptr [RAX] JBE 0x001d5fd4 MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x40],XMM0 JMP 0x001d5fe1 LAB_001d5fd4: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x40],XMM0 LAB_001d5fe1: MOVSD XMM0,qword ptr [RBP + -0x38] MOVSD XMM1,qword ptr [RBP + -0x40] SUBSD XMM0,XMM1 MULSD XMM0,qword ptr [RBP + -0x28] MOVSD qword ptr [RBP + -0x28],XMM0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x10 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001d5f73 MOVSD XMM0,qword ptr [RBP + -0x28] MOVQ RAX,XMM0 MOV RCX,0x7fffffffffffffff AND RAX,RCX MOV RCX,0x7ff0000000000000 SUB RAX,RCX SETL AL TEST AL,0x1 JNZ 0x001d6057 MOVSD XMM0,qword ptr [0x00258c78] MOVSD qword ptr [RBP + -0x28],XMM0 LAB_001d6057: MOVSD XMM0,qword ptr [RBP + -0x28] POP RBP RET
double mbr_join_square(double *param_1,double *param_2,int param_3) { double local_48; double local_38; double local_30; double *local_18; double *local_10; local_30 = DAT_00258c60; local_18 = param_2; local_10 = param_1; do { if (local_18[1] <= local_10[1]) { local_38 = local_10[1]; } else { local_38 = local_18[1]; } if (*local_10 < *local_18 || *local_10 == *local_18) { local_48 = *local_10; } else { local_48 = *local_18; } local_30 = (local_38 - local_48) * local_30; local_10 = local_10 + 2; local_18 = local_18 + 2; } while (local_10 != param_1 + (param_3 << 1)); if (0x7fefffffffffffff < (ulong)ABS(local_30)) { local_30 = DAT_00258c78; } return local_30; }
28,805
ftxui::(anonymous namespace)::Separator::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/separator.cpp
void Render(Screen& screen) override { for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { Pixel& pixel = screen.PixelAt(x, y); pixel.character = value_; pixel.automerge = true; } } }
O0
cpp
ftxui::(anonymous namespace)::Separator::Render(ftxui::Screen&): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movl 0x54(%rax), %eax movl %eax, -0x14(%rbp) movq -0x28(%rbp), %rcx movl -0x14(%rbp), %eax cmpl 0x58(%rcx), %eax jg 0x46bce movq -0x28(%rbp), %rax movl 0x4c(%rax), %eax movl %eax, -0x18(%rbp) movq -0x28(%rbp), %rcx movl -0x18(%rbp), %eax cmpl 0x50(%rcx), %eax jg 0x46bc1 movq -0x10(%rbp), %rdi movl -0x18(%rbp), %esi movl -0x14(%rbp), %edx callq 0x882f0 movq -0x28(%rbp), %rsi movq %rax, -0x20(%rbp) addq $0x60, %rsi movq -0x20(%rbp), %rdi addq $0x8, %rdi callq 0xd060 movq -0x20(%rbp), %rax movb (%rax), %cl andb $0x7f, %cl orb $-0x80, %cl movb %cl, (%rax) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x46b74 jmp 0x46bc3 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x46b5e addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5ftxui12_GLOBAL__N_19Separator6RenderERNS_6ScreenE: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_28], rax mov eax, [rax+54h] mov [rbp+var_14], eax loc_46B5E: mov rcx, [rbp+var_28] mov eax, [rbp+var_14] cmp eax, [rcx+58h] jg short loc_46BCE mov rax, [rbp+var_28] mov eax, [rax+4Ch] mov [rbp+var_18], eax loc_46B74: mov rcx, [rbp+var_28] mov eax, [rbp+var_18] cmp eax, [rcx+50h] jg short loc_46BC1 mov rdi, [rbp+var_10]; this mov esi, [rbp+var_18]; int mov edx, [rbp+var_14]; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov rsi, [rbp+var_28] mov [rbp+var_20], rax add rsi, 60h ; '`' mov rdi, [rbp+var_20] add rdi, 8 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) mov rax, [rbp+var_20] mov cl, [rax] and cl, 7Fh or cl, 80h mov [rax], cl mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_46B74 loc_46BC1: jmp short $+2 loc_46BC3: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_46B5E loc_46BCE: add rsp, 30h pop rbp retn
long long ftxui::`anonymous namespace'::Separator::Render( ftxui::_anonymous_namespace_::Separator *this, ftxui::Screen *a2) { long long result; // rax _BYTE *v3; // [rsp+10h] [rbp-20h] int j; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] for ( i = *((_DWORD *)this + 21); ; ++i ) { result = (unsigned int)i; if ( i > *((_DWORD *)this + 22) ) break; for ( j = *((_DWORD *)this + 19); j <= *((_DWORD *)this + 20); ++j ) { v3 = (_BYTE *)ftxui::Screen::PixelAt(a2, j, i); std::string::operator=(v3 + 8, (char *)this + 96); *v3 = *v3 & 0x7F | 0x80; } } return result; }
Render: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RAX + 0x54] MOV dword ptr [RBP + -0x14],EAX LAB_00146b5e: MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RCX + 0x58] JG 0x00146bce MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4c] MOV dword ptr [RBP + -0x18],EAX LAB_00146b74: MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x50] JG 0x00146bc1 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x14] CALL 0x001882f0 MOV RSI,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX ADD RSI,0x60 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x8 CALL 0x0010d060 MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] AND CL,0x7f OR CL,0x80 MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x00146b74 LAB_00146bc1: JMP 0x00146bc3 LAB_00146bc3: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00146b5e LAB_00146bce: ADD RSP,0x30 POP RBP RET
/* ftxui::(anonymous namespace)::Separator::Render(ftxui::Screen&) */ void __thiscall ftxui::(anonymous_namespace)::Separator::Render(Separator *this,Screen *param_1) { byte *pbVar1; int local_20; int local_1c; for (local_1c = *(int *)(this + 0x54); local_1c <= *(int *)(this + 0x58); local_1c = local_1c + 1) { for (local_20 = *(int *)(this + 0x4c); local_20 <= *(int *)(this + 0x50); local_20 = local_20 + 1) { pbVar1 = (byte *)Screen::PixelAt(param_1,local_20,local_1c); std::__cxx11::string::operator=((string *)(pbVar1 + 8),(string *)(this + 0x60)); *pbVar1 = *pbVar1 & 0x7f | 0x80; } } return; }
28,806
used_buffs_urgent_unlock
eloqsql/storage/maria/ma_loghandler.c
static void used_buffs_urgent_unlock(TRUNSLOG_USED_BUFFERS *buffs) { uint i; DBUG_ENTER("used_buffs_urgent_unlock"); translog_lock(); translog_stop_writing(); translog_unlock(); for (i= buffs->unlck_ptr; i < buffs->wrt_ptr; i++) { struct st_translog_buffer *buf= buffs->buff[i]; translog_buffer_lock(buf); translog_buffer_decrease_writers(buf); translog_buffer_unlock(buf); buffs->buff[i]= NULL; } used_buffs_init(buffs); DBUG_VOID_RETURN; }
O0
c
used_buffs_urgent_unlock: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) callq 0x500f0 callq 0x4f7e0 callq 0x501e0 movq -0x8(%rbp), %rax movzbl 0x19(%rax), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx movzbl 0x18(%rcx), %ecx cmpl %ecx, %eax jae 0x5be69 movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x50170 movq -0x18(%rbp), %rdi callq 0x5bd70 movq -0x18(%rbp), %rdi callq 0x501b0 movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x5be16 movq -0x8(%rbp), %rdi callq 0x5bea0 jmp 0x5be74 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
used_buffs_urgent_unlock: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi call translog_lock call translog_stop_writing call translog_unlock mov rax, [rbp+var_8] movzx eax, byte ptr [rax+19h] mov [rbp+var_C], eax loc_5BE16: mov eax, [rbp+var_C] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+18h] cmp eax, ecx jnb short loc_5BE69 mov rax, [rbp+var_8] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov [rbp+var_18], rax mov rdi, [rbp+var_18] call translog_buffer_lock mov rdi, [rbp+var_18] call translog_buffer_decrease_writers mov rdi, [rbp+var_18] call translog_buffer_unlock mov rax, [rbp+var_8] mov ecx, [rbp+var_C] mov qword ptr [rax+rcx*8], 0 mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_5BE16 loc_5BE69: mov rdi, [rbp+var_8] call used_buffs_init jmp short $+2 loc_5BE74: add rsp, 20h pop rbp retn
long long used_buffs_urgent_unlock(long long a1) { long long v2; // [rsp+8h] [rbp-18h] unsigned int i; // [rsp+14h] [rbp-Ch] translog_lock(); translog_stop_writing(); translog_unlock(); for ( i = *(unsigned __int8 *)(a1 + 25); i < *(unsigned __int8 *)(a1 + 24); ++i ) { v2 = *(_QWORD *)(a1 + 8LL * i); translog_buffer_lock(v2); translog_buffer_decrease_writers(v2); translog_buffer_unlock(v2); *(_QWORD *)(a1 + 8LL * i) = 0LL; } return used_buffs_init(a1); }
used_buffs_urgent_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI CALL 0x001500f0 CALL 0x0014f7e0 CALL 0x001501e0 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x19] MOV dword ptr [RBP + -0xc],EAX LAB_0015be16: MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x18] CMP EAX,ECX JNC 0x0015be69 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00150170 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0015bd70 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001501b0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],0x0 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0015be16 LAB_0015be69: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0015bea0 JMP 0x0015be74 LAB_0015be74: ADD RSP,0x20 POP RBP RET
void used_buffs_urgent_unlock(long param_1) { int8 uVar1; int4 local_14; translog_lock(); translog_stop_writing(); translog_unlock(); for (local_14 = (uint)*(byte *)(param_1 + 0x19); local_14 < *(byte *)(param_1 + 0x18); local_14 = local_14 + 1) { uVar1 = *(int8 *)(param_1 + (ulong)local_14 * 8); translog_buffer_lock(uVar1); translog_buffer_decrease_writers(uVar1); translog_buffer_unlock(uVar1); *(int8 *)(param_1 + (ulong)local_14 * 8) = 0; } used_buffs_init(param_1); return; }
28,807
js_regexp_get_flag
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_get_flag(JSContext *ctx, JSValue this_val, int mask) { JSRegExp *re; int flags; if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); re = js_get_regexp(ctx, this_val, FALSE); if (!re) { if (js_same_value(ctx, this_val, ctx->class_proto[JS_CLASS_REGEXP])) return JS_UNDEFINED; else return JS_ThrowTypeErrorInvalidClass(ctx, JS_CLASS_REGEXP); } flags = lre_get_flags(re->bytecode->u.str8); return js_bool(flags & mask); }
O0
c
js_regexp_get_flag: subq $0x48, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq 0x30(%rsp), %rax cmpl $-0x1, %eax je 0x7de9a movq 0x20(%rsp), %rdi callq 0x2e2e0 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x7df48 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx xorl %ecx, %ecx callq 0x83010 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x7df1b movq 0x20(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x40(%rax), %rax movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x120(%rax), %rcx movq 0x128(%rax), %r8 callq 0x34850 cmpl $0x0, %eax je 0x7df00 movl $0x0, 0x38(%rsp) movq $0x3, 0x40(%rsp) jmp 0x7df48 movq 0x20(%rsp), %rdi movl $0x12, %esi callq 0x37160 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x7df48 movq 0x10(%rsp), %rax movq 0x8(%rax), %rdi addq $0x18, %rdi callq 0xfc9f0 movl %eax, 0xc(%rsp) movl 0xc(%rsp), %edi andl 0x1c(%rsp), %edi callq 0x55f90 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x48, %rsp retq nopw (%rax,%rax)
js_regexp_get_flag: sub rsp, 48h mov [rsp+48h+var_20], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_28], rdi mov [rsp+48h+var_2C], ecx mov rax, [rsp+48h+var_18] cmp eax, 0FFFFFFFFh jz short loc_7DE9A mov rdi, [rsp+48h+var_28] call JS_ThrowTypeErrorNotAnObject mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp loc_7DF48 loc_7DE9A: mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_18] xor ecx, ecx call js_get_regexp mov [rsp+48h+var_38], rax cmp [rsp+48h+var_38], 0 jnz short loc_7DF1B mov rdi, [rsp+48h+var_28] mov rax, [rsp+48h+var_28] mov rax, [rax+40h] mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_18] mov rcx, [rax+120h] mov r8, [rax+128h] call js_same_value cmp eax, 0 jz short loc_7DF00 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 3 jmp short loc_7DF48 loc_7DF00: mov rdi, [rsp+48h+var_28] mov esi, 12h call JS_ThrowTypeErrorInvalidClass mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp short loc_7DF48 loc_7DF1B: mov rax, [rsp+48h+var_38] mov rdi, [rax+8] add rdi, 18h call lre_get_flags mov [rsp+48h+var_3C], eax mov edi, [rsp+48h+var_3C] and edi, [rsp+48h+var_2C] call js_bool mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx loc_7DF48: mov rax, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] add rsp, 48h retn
long long js_regexp_get_flag( long long a1, _DWORD *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 int flags; // [rsp+Ch] [rbp-3Ch] long long regexp; // [rsp+10h] [rbp-38h] int v17; // [rsp+1Ch] [rbp-2Ch] unsigned int v18; // [rsp+30h] [rbp-18h] long long v19; // [rsp+38h] [rbp-10h] v18 = a3; v17 = a4; if ( (_DWORD)a3 != -1 ) return JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6); regexp = js_get_regexp(a1, a2, a3, 0LL); if ( regexp ) { flags = lre_get_flags(*(_QWORD *)(regexp + 8) + 24LL); return js_bool(v17 & flags); } else if ( (unsigned int)js_same_value( a1, a2, v18, *(_DWORD **)(*(_QWORD *)(a1 + 64) + 288LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 296LL)) ) { LODWORD(v19) = 0; } else { return JS_ThrowTypeErrorInvalidClass(a1, 18); } return v19; }
js_regexp_get_flag: SUB RSP,0x48 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV RAX,qword ptr [RSP + 0x30] CMP EAX,-0x1 JZ 0x0017de9a MOV RDI,qword ptr [RSP + 0x20] CALL 0x0012e2e0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x0017df48 LAB_0017de9a: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] XOR ECX,ECX CALL 0x00183010 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x0017df1b MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x120] MOV R8,qword ptr [RAX + 0x128] CALL 0x00134850 CMP EAX,0x0 JZ 0x0017df00 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x3 JMP 0x0017df48 LAB_0017df00: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x12 CALL 0x00137160 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x0017df48 LAB_0017df1b: MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x8] ADD RDI,0x18 CALL 0x001fc9f0 MOV dword ptr [RSP + 0xc],EAX MOV EDI,dword ptr [RSP + 0xc] AND EDI,dword ptr [RSP + 0x1c] CALL 0x00155f90 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX LAB_0017df48: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int1 [16] js_regexp_get_flag(long param_1,int8 param_2,int8 param_3,uint param_4) { int iVar1; uint uVar2; long lVar3; int1 auVar4 [16]; int4 local_10; int4 uStack_c; int8 local_8; if ((int)param_3 == -1) { lVar3 = js_get_regexp(param_1,param_2,param_3,0); if (lVar3 == 0) { iVar1 = js_same_value(param_1,param_2,param_3, *(int8 *)(*(long *)(param_1 + 0x40) + 0x120), *(int8 *)(*(long *)(param_1 + 0x40) + 0x128)); if (iVar1 == 0) { auVar4 = JS_ThrowTypeErrorInvalidClass(param_1,0x12); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } else { local_10 = 0; local_8 = 3; } } else { uVar2 = lre_get_flags(*(long *)(lVar3 + 8) + 0x18); auVar4 = js_bool(uVar2 & param_4); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } } else { auVar4 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
28,808
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
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> 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x284e2 movq %rbx, %rdi movl $0x1, %esi callq 0x284e2 movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x27e94 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x27de8 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x27ef2 leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x28a22 movq -0x18(%r14), %rax testq %rax, %rax je 0x87789 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0x877a0 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x877e4 jmp 0x877e4 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x284b4 jmp 0x877cb movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0x877ef movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x877ef movq %rax, %rdi callq 0x27a01 movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x284e2 movq %rbx, %rdi callq 0x2d98e movq %r14, %rdi callq 0x19be0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_87789 lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_87789: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_877A0 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_877A0: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_877E4 jmp short loc_877E4 mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_877CB mov r14, rax loc_877CB: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_877EF mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_877EF loc_877E4: mov rdi, rax call __clang_call_terminate mov r14, rax loc_877EF: mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, 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>::parse<std::string>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); 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); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( &v11, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x001284e2 MOV RDI,RBX MOV ESI,0x1 CALL 0x001284e2 MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_00187729: MOV RDI,RSP MOV RSI,R13 CALL 0x00127e94 ADD R12,R15 LAB_00187737: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x00127de8 LAB_00187752: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x00127ef2 LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00128a22 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x00187789 LAB_0018777a: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00187789: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001877a0 LAB_00187793: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001877a0: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> 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>::parse<std::__cxx11::string >(std::__cxx11::string&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: 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> ::parse<std::__cxx11::string> (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,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *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; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 00187729 to 00187733 has its CatchHandler @ 001877ec */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 00187737 to 00187751 has its CatchHandler @ 001877c8 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 00187752 to 00187763 has its CatchHandler @ 001877b9 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 0018777a to 00187788 has its CatchHandler @ 001877b7 */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 00187793 to 0018779f has its CatchHandler @ 001877b5 */ (*local_108)(afStack_118,afStack_118,3); } return this; }
28,809
my_hash_free
eloqsql/mysys/hash.c
void my_hash_free(HASH *hash) { DBUG_ENTER("my_hash_free"); DBUG_PRINT("enter",("hash:%p elements: %ld", hash, hash->records)); my_hash_free_elements(hash); hash->free= 0; delete_dynamic(&hash->array); hash->blength= 0; DBUG_VOID_RETURN; }
O3
c
my_hash_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x94b0d movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x94b0d movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x94afd xorl %r14d, %r14d movq %r14, 0x60(%rbx) leaq 0x28(%rbx), %rdi callq 0x92cfc movq %r14, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_free: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_94B0D mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_94B0D mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_94AFD: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_94AFD loc_94B0D: xor r14d, r14d mov [rbx+60h], r14 lea rdi, [rbx+28h] call delete_dynamic mov [rbx+10h], r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_free(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; (*(void ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_QWORD *)(a1 + 96) = 0LL; result = delete_dynamic((long long *)(a1 + 40)); *(_QWORD *)(a1 + 16) = 0LL; return result; }
my_hash_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x00194b0d MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x00194b0d MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_00194afd: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x00194afd LAB_00194b0d: XOR R14D,R14D MOV qword ptr [RBX + 0x60],R14 LEA RDI,[RBX + 0x28] CALL 0x00192cfc MOV qword ptr [RBX + 0x10],R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_free(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int8 *)(param_1 + 0x60) = 0; delete_dynamic(param_1 + 0x28); *(int8 *)(param_1 + 0x10) = 0; return; }
28,810
ggml_easy::string_format[abi:cxx11](char const*, ...)
ngxson[P]ggml-easy/ggml-easy.h
std::string string_format(const char * fmt, ...) { va_list ap; va_list ap2; va_start(ap, fmt); va_copy(ap2, ap); int size = vsnprintf(NULL, 0, fmt, ap); GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT std::vector<char> buf(size + 1); int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2); GGML_ASSERT(size2 == size); va_end(ap2); va_end(ap); return std::string(buf.data(), size); }
O0
c
ggml_easy::string_format[abi:cxx11](char const*, ...): subq $0x178, %rsp # imm = 0x178 movq %rdi, 0x30(%rsp) movq %rdi, %r10 movq %r10, 0x38(%rsp) testb %al, %al je 0xaca5 movaps %xmm0, 0x70(%rsp) movaps %xmm1, 0x80(%rsp) movaps %xmm2, 0x90(%rsp) movaps %xmm3, 0xa0(%rsp) movaps %xmm4, 0xb0(%rsp) movaps %xmm5, 0xc0(%rsp) movaps %xmm6, 0xd0(%rsp) movaps %xmm7, 0xe0(%rsp) movq %r9, 0x68(%rsp) movq %r8, 0x60(%rsp) movq %rcx, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x170(%rsp) movq %rsi, 0x168(%rsp) leaq 0x150(%rsp), %rax leaq 0x40(%rsp), %rcx movq %rcx, 0x10(%rax) leaq 0x180(%rsp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) leaq 0x130(%rsp), %rax leaq 0x150(%rsp), %rcx movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movups (%rcx), %xmm0 movups %xmm0, (%rax) movq 0x168(%rsp), %rdx leaq 0x150(%rsp), %rcx xorl %eax, %eax movl %eax, %esi movq %rsi, %rdi callq 0x9280 movl %eax, 0x12c(%rsp) cmpl $0x0, 0x12c(%rsp) jl 0xad4b cmpl $0x7fffffff, 0x12c(%rsp) # imm = 0x7FFFFFFF jl 0xad6c leaq 0xb346(%rip), %rdi # 0x16098 movl $0x2d8, %esi # imm = 0x2D8 leaq 0xb381(%rip), %rdx # 0x160df leaq 0xb4d3(%rip), %rcx # 0x16238 movb $0x0, %al callq 0x95a0 movl 0x12c(%rsp), %eax incl %eax cltq movq %rax, 0x20(%rsp) leaq 0x10f(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x9630 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq 0x110(%rsp), %rdi callq 0xce00 jmp 0xada7 leaq 0x10f(%rsp), %rdi callq 0x93c0 leaq 0x110(%rsp), %rdi callq 0xce80 movq %rax, %rdi movl 0x12c(%rsp), %eax addl $0x1, %eax movslq %eax, %rsi movq 0x168(%rsp), %rdx leaq 0x130(%rsp), %rcx callq 0x9280 movl %eax, 0xf8(%rsp) movl 0xf8(%rsp), %eax cmpl 0x12c(%rsp), %eax je 0xae5f leaq 0xb294(%rip), %rdi # 0x16098 leaq 0xb2d4(%rip), %rdx # 0x160df leaq 0xb442(%rip), %rcx # 0x16254 xorl %eax, %eax movl $0x2db, %esi # imm = 0x2DB callq 0x95a0 jmp 0xae20 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0x10f(%rsp), %rdi callq 0x93c0 jmp 0xaf00 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) jmp 0xaef3 leaq 0x110(%rsp), %rdi callq 0xce80 movq %rax, 0x8(%rsp) movslq 0x12c(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0xf7(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x9630 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx callq 0x9400 jmp 0xaeab leaq 0xf7(%rsp), %rdi callq 0x93c0 leaq 0x110(%rsp), %rdi callq 0xcd40 movq 0x38(%rsp), %rax addq $0x178, %rsp # imm = 0x178 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0xf7(%rsp), %rdi callq 0x93c0 leaq 0x110(%rsp), %rdi callq 0xcd40 movq 0x100(%rsp), %rdi callq 0x9610 nopl (%rax)
_ZN9ggml_easy13string_formatB5cxx11EPKcz: sub rsp, 178h mov [rsp+178h+var_148], rdi mov r10, rdi mov [rsp+178h+var_140], r10 test al, al jz short loc_ACA5 movaps [rsp+178h+var_108], xmm0 movaps [rsp+178h+var_F8], xmm1 movaps [rsp+178h+var_E8], xmm2 movaps [rsp+178h+var_D8], xmm3 movaps [rsp+178h+var_C8], xmm4 movaps [rsp+178h+var_B8], xmm5 movaps [rsp+178h+var_A8], xmm6 movaps [rsp+178h+var_98], xmm7 loc_ACA5: mov [rsp+178h+var_110], r9 mov [rsp+178h+var_118], r8 mov [rsp+178h+var_120], rcx mov [rsp+178h+var_128], rdx mov [rsp+178h+var_8], rdi mov [rsp+178h+var_10], rsi lea rax, [rsp+178h+var_28] lea rcx, [rsp+178h+var_138] mov [rax+10h], rcx lea rcx, [rsp+178h+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h lea rax, [rsp+178h+var_48] lea rcx, [rsp+178h+var_28] mov rdx, [rcx+10h] mov [rax+10h], rdx movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rax], xmm0 mov rdx, [rsp+178h+var_10] lea rcx, [rsp+178h+var_28] xor eax, eax mov esi, eax mov rdi, rsi call _vsnprintf mov [rsp+178h+var_4C], eax cmp [rsp+178h+var_4C], 0 jl short loc_AD4B cmp [rsp+178h+var_4C], 7FFFFFFFh jl short loc_AD6C loc_AD4B: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2D8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX" mov al, 0 call _ggml_abort loc_AD6C: mov eax, [rsp+178h+var_4C] inc eax cdqe mov [rsp+178h+var_158], rax lea rdi, [rsp+178h+var_69] mov [rsp+178h+var_150], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+178h+var_158] mov rdx, [rsp+178h+var_150] lea rdi, [rsp+178h+var_68] call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&) jmp short $+2 loc_ADA7: lea rdi, [rsp+178h+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+178h+var_68] call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void) mov rdi, rax mov eax, [rsp+178h+var_4C] add eax, 1 movsxd rsi, eax mov rdx, [rsp+178h+var_10] lea rcx, [rsp+178h+var_48] call _vsnprintf mov [rsp+178h+var_80], eax mov eax, [rsp+178h+var_80] cmp eax, [rsp+178h+var_4C] jz short loc_AE5F lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize2Size; "size2 == size" xor eax, eax mov esi, 2DBh call _ggml_abort jmp short $+2 loc_AE20: mov rcx, rax mov eax, edx mov [rsp+178h+var_78], rcx mov [rsp+178h+var_7C], eax lea rdi, [rsp+178h+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_AF00 mov rcx, rax mov eax, edx mov [rsp+178h+var_78], rcx mov [rsp+178h+var_7C], eax jmp loc_AEF3 loc_AE5F: lea rdi, [rsp+178h+var_68] call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void) mov [rsp+178h+var_170], rax movsxd rax, [rsp+178h+var_4C] mov [rsp+178h+var_168], rax lea rdi, [rsp+178h+var_81] mov [rsp+178h+var_160], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+178h+var_148] mov rsi, [rsp+178h+var_170] mov rdx, [rsp+178h+var_168] mov rcx, [rsp+178h+var_160] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&) jmp short $+2 loc_AEAB: lea rdi, [rsp+178h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+178h+var_68] call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector() mov rax, [rsp+178h+var_140] add rsp, 178h retn mov rcx, rax mov eax, edx mov [rsp+178h+var_78], rcx mov [rsp+178h+var_7C], eax lea rdi, [rsp+178h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_AEF3: lea rdi, [rsp+178h+var_68] call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector() loc_AF00: mov rdi, [rsp+178h+var_78] call __Unwind_Resume
long long ggml_easy::string_format[abi:cxx11]( 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, char a15) { int v15; // ecx int v16; // r8d int v17; // r9d long long v18; // rax int v19; // edx long long v21; // [rsp+8h] [rbp-170h] long long v22; // [rsp+10h] [rbp-168h] unsigned int v23; // [rsp+20h] [rbp-158h] _BYTE v24[16]; // [rsp+40h] [rbp-138h] BYREF long long v25; // [rsp+50h] [rbp-128h] long long v26; // [rsp+58h] [rbp-120h] long long v27; // [rsp+60h] [rbp-118h] long long v28; // [rsp+68h] [rbp-110h] __m128 v29; // [rsp+70h] [rbp-108h] __m128 v30; // [rsp+80h] [rbp-F8h] __m128 v31; // [rsp+90h] [rbp-E8h] __m128 v32; // [rsp+A0h] [rbp-D8h] __m128 v33; // [rsp+B0h] [rbp-C8h] __m128 v34; // [rsp+C0h] [rbp-B8h] __m128 v35; // [rsp+D0h] [rbp-A8h] __m128 v36; // [rsp+E0h] [rbp-98h] char v37; // [rsp+F7h] [rbp-81h] BYREF int v38; // [rsp+F8h] [rbp-80h] int v39; // [rsp+FCh] [rbp-7Ch] long long v40; // [rsp+100h] [rbp-78h] char v41; // [rsp+10Fh] [rbp-69h] BYREF _BYTE v42[28]; // [rsp+110h] [rbp-68h] BYREF unsigned int v43; // [rsp+12Ch] [rbp-4Ch] __int128 v44; // [rsp+130h] [rbp-48h] BYREF _BYTE *v45; // [rsp+140h] [rbp-38h] __int128 v46; // [rsp+150h] [rbp-28h] BYREF _BYTE *v47; // [rsp+160h] [rbp-18h] long long v48; // [rsp+168h] [rbp-10h] long long v49; // [rsp+170h] [rbp-8h] v29 = a7; v30 = a8; v31 = a9; v32 = a10; v33 = a11; v34 = a12; v35 = a13; v36 = a14; v28 = a6; v27 = a5; v26 = a4; v25 = a3; v49 = a1; v48 = a2; v47 = v24; *((_QWORD *)&v46 + 1) = &a15; *(_QWORD *)&v46 = 0x3000000010LL; v45 = v24; v44 = v46; v43 = vsnprintf(0LL, 0LL, a2, &v46); if ( v43 > 0x7FFFFFFE ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml-easy.h", 728LL, "GGML_ASSERT(%s) failed", "size >= 0 && size < INT_MAX"); v23 = v43 + 1; std::allocator<char>::allocator(); std::vector<char>::vector((unsigned int)v42, v23, (unsigned int)&v41, v15, v16, v17); std::allocator<char>::~allocator(&v41); v18 = std::vector<char>::data(v42); v38 = vsnprintf(v18, (int)(v43 + 1), v48, &v44); if ( v38 != v43 ) { v40 = ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml-easy.h", 731LL, "GGML_ASSERT(%s) failed", "size2 == size"); v39 = v19; std::allocator<char>::~allocator(&v41); _Unwind_Resume(v40); } v21 = std::vector<char>::data(v42); v22 = (int)v43; std::allocator<char>::allocator(); std::string::basic_string(a1, v21, v22, &v37); std::allocator<char>::~allocator(&v37); std::vector<char>::~vector(v42); return a1; }
string_format[abi:cxx11]: SUB RSP,0x178 MOV qword ptr [RSP + 0x30],RDI MOV R10,RDI MOV qword ptr [RSP + 0x38],R10 TEST AL,AL JZ 0x0010aca5 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM1 MOVAPS xmmword ptr [RSP + 0x90],XMM2 MOVAPS xmmword ptr [RSP + 0xa0],XMM3 MOVAPS xmmword ptr [RSP + 0xb0],XMM4 MOVAPS xmmword ptr [RSP + 0xc0],XMM5 MOVAPS xmmword ptr [RSP + 0xd0],XMM6 MOVAPS xmmword ptr [RSP + 0xe0],XMM7 LAB_0010aca5: MOV qword ptr [RSP + 0x68],R9 MOV qword ptr [RSP + 0x60],R8 MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x170],RDI MOV qword ptr [RSP + 0x168],RSI LEA RAX,[RSP + 0x150] LEA RCX,[RSP + 0x40] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RSP + 0x180] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 LEA RAX,[RSP + 0x130] LEA RCX,[RSP + 0x150] MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RAX],XMM0 MOV RDX,qword ptr [RSP + 0x168] LEA RCX,[RSP + 0x150] XOR EAX,EAX MOV ESI,EAX MOV RDI,RSI CALL 0x00109280 MOV dword ptr [RSP + 0x12c],EAX CMP dword ptr [RSP + 0x12c],0x0 JL 0x0010ad4b CMP dword ptr [RSP + 0x12c],0x7fffffff JL 0x0010ad6c LAB_0010ad4b: LEA RDI,[0x116098] MOV ESI,0x2d8 LEA RDX,[0x1160df] LEA RCX,[0x116238] MOV AL,0x0 CALL 0x001095a0 LAB_0010ad6c: MOV EAX,dword ptr [RSP + 0x12c] INC EAX CDQE MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x10f] MOV qword ptr [RSP + 0x28],RDI CALL 0x00109630 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] LAB_0010ad98: LEA RDI,[RSP + 0x110] CALL 0x0010ce00 JMP 0x0010ada7 LAB_0010ada7: LEA RDI,[RSP + 0x10f] CALL 0x001093c0 LEA RDI,[RSP + 0x110] CALL 0x0010ce80 MOV RDI,RAX MOV EAX,dword ptr [RSP + 0x12c] ADD EAX,0x1 MOVSXD RSI,EAX MOV RDX,qword ptr [RSP + 0x168] LEA RCX,[RSP + 0x130] CALL 0x00109280 MOV dword ptr [RSP + 0xf8],EAX MOV EAX,dword ptr [RSP + 0xf8] CMP EAX,dword ptr [RSP + 0x12c] JZ 0x0010ae5f LAB_0010adfd: LEA RDI,[0x116098] LEA RDX,[0x1160df] LEA RCX,[0x116254] XOR EAX,EAX MOV ESI,0x2db CALL 0x001095a0 JMP 0x0010ae20 LAB_0010ae20: MOV RCX,RAX MOV EAX,EDX MOV qword ptr [RSP + 0x100],RCX MOV dword ptr [RSP + 0xfc],EAX LEA RDI,[RSP + 0x10f] CALL 0x001093c0 JMP 0x0010af00 LAB_0010ae5f: LEA RDI,[RSP + 0x110] CALL 0x0010ce80 MOV qword ptr [RSP + 0x8],RAX MOVSXD RAX,dword ptr [RSP + 0x12c] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0xf7] MOV qword ptr [RSP + 0x18],RDI CALL 0x00109630 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] LAB_0010aea4: CALL 0x00109400 LAB_0010aea9: JMP 0x0010aeab LAB_0010aeab: LEA RDI,[RSP + 0xf7] CALL 0x001093c0 LEA RDI,[RSP + 0x110] CALL 0x0010cd40 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x178 RET LAB_0010af00: MOV RDI,qword ptr [RSP + 0x100] CALL 0x00109610
/* ggml_easy::string_format[abi:cxx11](char const*, ...) */ char * ggml_easy::string_format_abi_cxx11_(char *param_1,...) { char in_AL; int iVar1; char *pcVar2; ulong uVar3; int8 in_RCX; int8 in_RDX; char *in_RSI; int8 in_R8; int8 in_R9; int4 in_XMM0_Da; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; int1 auVar4 [12]; int1 local_138 [16]; int8 local_128; int8 local_120; int8 local_118; int8 local_110; int4 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; allocator local_81; int local_80; int4 local_7c; int8 local_78; allocator local_69; vector<char,std::allocator<char>> local_68 [28]; int local_4c; int8 local_48; int1 *puStack_40; int1 *local_38; int4 local_28; int4 uStack_24; int1 *puStack_20; int1 *local_18; char *local_10; char *local_8; if (in_AL != '\0') { local_108 = in_XMM0_Da; local_f8 = in_XMM1_Qa; local_e8 = in_XMM2_Qa; local_d8 = in_XMM3_Qa; local_c8 = in_XMM4_Qa; local_b8 = in_XMM5_Qa; local_a8 = in_XMM6_Qa; local_98 = in_XMM7_Qa; } local_38 = local_138; puStack_40 = &stack0x00000008; uStack_24 = 0x30; local_28 = 0x10; local_48 = 0x3000000010; local_128 = in_RDX; local_120 = in_RCX; local_118 = in_R8; local_110 = in_R9; puStack_20 = puStack_40; local_18 = local_38; local_10 = in_RSI; local_8 = param_1; local_4c = vsnprintf((char *)0x0,0,in_RSI,&local_28); if ((local_4c < 0) || (0x7ffffffe < local_4c)) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml-easy.h",0x2d8, "GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX"); } iVar1 = local_4c + 1; std::allocator<char>::allocator(); /* try { // try from 0010ad98 to 0010ada4 has its CatchHandler @ 0010ae20 */ std::vector<char,std::allocator<char>>::vector(local_68,(long)iVar1,&local_69); std::allocator<char>::~allocator((allocator<char> *)&local_69); pcVar2 = (char *)std::vector<char,std::allocator<char>>::data(local_68); local_80 = vsnprintf(pcVar2,(long)(local_4c + 1),local_10,&local_48); if (local_80 != local_4c) { /* try { // try from 0010adfd to 0010ae1d has its CatchHandler @ 0010ae46 */ auVar4 = ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml-easy.h", 0x2db,"GGML_ASSERT(%s) failed","size2 == size"); local_7c = auVar4._8_4_; local_78 = auVar4._0_8_; /* catch() { ... } // from try @ 0010ad98 with catch @ 0010ae20 */ std::allocator<char>::~allocator((allocator<char> *)&local_69); /* WARNING: Subroutine does not return */ _Unwind_Resume(local_78); } pcVar2 = (char *)std::vector<char,std::allocator<char>>::data(local_68); uVar3 = (ulong)local_4c; std::allocator<char>::allocator(); /* try { // try from 0010aea4 to 0010aea8 has its CatchHandler @ 0010aed2 */ std::__cxx11::string::string((string *)param_1,pcVar2,uVar3,&local_81); std::allocator<char>::~allocator((allocator<char> *)&local_81); std::vector<char,std::allocator<char>>::~vector(local_68); return param_1; }
28,811
js_object___lookupGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___lookupGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int setter) { JSValue obj, res = JS_EXCEPTION; JSAtom prop = JS_ATOM_NULL; JSPropertyDescriptor desc; int has_prop; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) goto exception; prop = JS_ValueToAtom(ctx, argv[0]); if (unlikely(prop == JS_ATOM_NULL)) goto exception; for (;;) { has_prop = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), prop); if (has_prop < 0) goto exception; if (has_prop) { if (desc.flags & JS_PROP_GETSET) res = js_dup(setter ? desc.setter : desc.getter); else res = JS_UNDEFINED; js_free_desc(ctx, &desc); break; } obj = JS_GetPrototypeFree(ctx, obj); if (JS_IsException(obj)) goto exception; if (JS_IsNull(obj)) { res = JS_UNDEFINED; break; } /* avoid infinite loop (possible with proxies) */ if (js_poll_interrupts(ctx)) goto exception; } exception: JS_FreeAtom(ctx, prop); JS_FreeValue(ctx, obj); return res; }
O2
c
js_object___lookupGetter__: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rdi, %rbx callq 0x20b92 movq %rax, %r14 movq %rdx, %r15 pushq $0x6 popq %rax movq %rax, (%rsp) cmpl $0x6, %r15d jne 0x5f9ca xorl %r13d, %r13d xorl %ebp, %ebp xorl %r12d, %r12d orq %r12, %rbp movq %rbx, %rdi movl %r13d, %esi callq 0x1a995 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1801e movq %rbp, %rax movq (%rsp), %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x1e0bc testl %eax, %eax je 0x5f990 movl %eax, %r13d movl %ebp, 0xc(%rsp) leaq 0x10(%rsp), %r12 xorl %ebp, %ebp movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movl %r13d, %ecx callq 0x1db80 testl %eax, %eax js 0x5f995 jne 0x5fa39 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x35dad movq %rax, %r14 movq %rdx, %r15 cmpl $0x2, %r15d je 0x5fa4e cmpl $0x6, %r15d je 0x5f993 movq %rbx, %rdi callq 0x35de8 testl %eax, %eax je 0x5f9ed jmp 0x5f995 testb $0x10, 0x10(%rsp) jne 0x5fa5a pushq $0x3 popq %rax movq %rax, (%rsp) xorl %ebp, %ebp xorl %r12d, %r12d jmp 0x5fa9b pushq $0x3 popq %rax movq %rax, (%rsp) jmp 0x5f995 cmpl $0x0, 0xc(%rsp) leaq 0x38(%rsp), %rax leaq 0x40(%rsp), %rcx leaq 0x28(%rsp), %rdx leaq 0x30(%rsp), %rsi cmovneq %rax, %rdx movq (%rdx), %rax cmovneq %rcx, %rsi movq (%rsi), %rcx movq %rcx, (%rsp) cmpl $-0x9, %ecx jb 0x5fa8c incl (%rax) movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 andq %rax, %r12 movl %eax, %ebp leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x360ed jmp 0x5f998
js_object___lookupGetter__: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, r9d mov r12, r8 mov rbx, rdi call JS_ToObject mov r14, rax mov r15, rdx push 6 pop rax mov [rsp+78h+var_78], rax cmp r15d, 6 jnz short loc_5F9CA loc_5F990: xor r13d, r13d loc_5F993: xor ebp, ebp loc_5F995: xor r12d, r12d loc_5F998: or rbp, r12 mov rdi, rbx mov esi, r13d call JS_FreeAtom mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue mov rax, rbp mov rdx, [rsp+78h+var_78] add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5F9CA: mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call JS_ValueToAtom test eax, eax jz short loc_5F990 mov r13d, eax mov [rsp+78h+var_6C], ebp lea r12, [rsp+78h+var_68] xor ebp, ebp loc_5F9ED: mov rdi, rbx mov rsi, r12 mov rdx, r14 mov ecx, r13d call JS_GetOwnPropertyInternal test eax, eax js short loc_5F995 jnz short loc_5FA39 mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_GetPrototypeFree mov r14, rax mov r15, rdx cmp r15d, 2 jz short loc_5FA4E cmp r15d, 6 jz loc_5F993 mov rdi, rbx call js_poll_interrupts test eax, eax jz short loc_5F9ED jmp loc_5F995 loc_5FA39: test [rsp+78h+var_68], 10h jnz short loc_5FA5A push 3 pop rax mov [rsp+78h+var_78], rax xor ebp, ebp xor r12d, r12d jmp short loc_5FA9B loc_5FA4E: push 3 pop rax mov [rsp+78h+var_78], rax jmp loc_5F995 loc_5FA5A: cmp [rsp+78h+var_6C], 0 lea rax, [rsp+78h+var_40] lea rcx, [rsp+78h+var_38] lea rdx, [rsp+78h+var_50] lea rsi, [rsp+78h+var_48] cmovnz rdx, rax mov rax, [rdx] cmovnz rsi, rcx mov rcx, [rsi] mov [rsp+78h+var_78], rcx cmp ecx, 0FFFFFFF7h jb short loc_5FA8C inc dword ptr [rax] loc_5FA8C: mov r12, 0FFFFFFFF00000000h and r12, rax mov ebp, eax loc_5FA9B: lea rsi, [rsp+78h+var_68] mov rdi, rbx call js_free_desc jmp loc_5F998
unsigned long long js_object___lookupGetter__( 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) { int v14; // ebp long long PrototypeFree; // r14 long long v17; // rdx long long v18; // r15 unsigned int v19; // r13d long long v20; // rbp unsigned long long v21; // r12 unsigned int v23; // eax unsigned int *v24; // r8 int v25; // eax double v26; // xmm4_8 double v27; // xmm5_8 long long v28; // rdx char *v29; // rdx char *v30; // rsi unsigned long long v31; // rax int v32; // [rsp+Ch] [rbp-6Ch] long long v33[3]; // [rsp+10h] [rbp-68h] BYREF char v34; // [rsp+28h] [rbp-50h] BYREF char v35; // [rsp+30h] [rbp-48h] BYREF char v36; // [rsp+38h] [rbp-40h] BYREF char v37; // [rsp+40h] [rbp-38h] BYREF v14 = a6; PrototypeFree = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; if ( (_DWORD)v17 == 6 || (v23 = JS_ValueToAtom(a1, *a5, a5[1])) == 0 ) { v19 = 0; LABEL_3: v20 = 0LL; } else { v19 = v23; v32 = v14; v20 = 0LL; do { LOBYTE(v25) = JS_GetOwnPropertyInternal(a1, (long long)v33, PrototypeFree, v19, v24); if ( v25 < 0 ) break; if ( v25 ) { if ( (v33[0] & 0x10) != 0 ) { v29 = &v34; v30 = &v35; if ( v32 ) v29 = &v36; v31 = *(_QWORD *)v29; if ( v32 ) v30 = &v37; if ( (unsigned int)*(_QWORD *)v30 >= 0xFFFFFFF7 ) ++*(_DWORD *)v31; v21 = v31 & 0xFFFFFFFF00000000LL; v20 = (unsigned int)v31; } else { v20 = 0LL; v21 = 0LL; } js_free_desc(a1, v33); goto LABEL_5; } PrototypeFree = JS_GetPrototypeFree(a1, PrototypeFree, v18, a7, a8, a9, a10, v26, v27, a13, a14); v18 = v28; if ( (_DWORD)v28 == 2 ) break; if ( (_DWORD)v28 == 6 ) goto LABEL_3; } while ( !(unsigned int)js_poll_interrupts(a1) ); } v21 = 0LL; LABEL_5: JS_FreeAtom(a1, v19); JS_FreeValue(a1, PrototypeFree, v18); return v21 | v20; }
js_object___lookupGetter__: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,R9D MOV R12,R8 MOV RBX,RDI CALL 0x00120b92 MOV R14,RAX MOV R15,RDX PUSH 0x6 POP RAX MOV qword ptr [RSP],RAX CMP R15D,0x6 JNZ 0x0015f9ca LAB_0015f990: XOR R13D,R13D LAB_0015f993: XOR EBP,EBP LAB_0015f995: XOR R12D,R12D LAB_0015f998: OR RBP,R12 MOV RDI,RBX MOV ESI,R13D CALL 0x0011a995 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011801e MOV RAX,RBP MOV RDX,qword ptr [RSP] ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015f9ca: MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,RBX CALL 0x0011e0bc TEST EAX,EAX JZ 0x0015f990 MOV R13D,EAX MOV dword ptr [RSP + 0xc],EBP LEA R12,[RSP + 0x10] XOR EBP,EBP LAB_0015f9ed: MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 MOV ECX,R13D CALL 0x0011db80 TEST EAX,EAX JS 0x0015f995 JNZ 0x0015fa39 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00135dad MOV R14,RAX MOV R15,RDX CMP R15D,0x2 JZ 0x0015fa4e CMP R15D,0x6 JZ 0x0015f993 MOV RDI,RBX CALL 0x00135de8 TEST EAX,EAX JZ 0x0015f9ed JMP 0x0015f995 LAB_0015fa39: TEST byte ptr [RSP + 0x10],0x10 JNZ 0x0015fa5a PUSH 0x3 POP RAX MOV qword ptr [RSP],RAX XOR EBP,EBP XOR R12D,R12D JMP 0x0015fa9b LAB_0015fa4e: PUSH 0x3 POP RAX MOV qword ptr [RSP],RAX JMP 0x0015f995 LAB_0015fa5a: CMP dword ptr [RSP + 0xc],0x0 LEA RAX,[RSP + 0x38] LEA RCX,[RSP + 0x40] LEA RDX,[RSP + 0x28] LEA RSI,[RSP + 0x30] CMOVNZ RDX,RAX MOV RAX,qword ptr [RDX] CMOVNZ RSI,RCX MOV RCX,qword ptr [RSI] MOV qword ptr [RSP],RCX CMP ECX,-0x9 JC 0x0015fa8c INC dword ptr [RAX] LAB_0015fa8c: MOV R12,-0x100000000 AND R12,RAX MOV EBP,EAX LAB_0015fa9b: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001360ed JMP 0x0015f998
int1 [16] js_object___lookupGetter__(int8 param_1) { int *piVar1; int iVar2; int iVar3; int8 *puVar4; ulong uVar5; int8 *in_R8; int in_R9D; ulong uVar6; int1 auVar7 [16]; int8 local_78; byte local_68 [24]; int8 local_50; int8 local_48; int8 local_40; int8 local_38; auVar7 = JS_ToObject(); local_78 = 6; if ((auVar7._8_4_ == 6) || (iVar2 = JS_ValueToAtom(param_1,*in_R8,in_R8[1]), iVar2 == 0)) { iVar2 = 0; } else { while( true ) { iVar3 = JS_GetOwnPropertyInternal(param_1,local_68,auVar7._0_8_,iVar2); if (iVar3 < 0) break; if (iVar3 != 0) { if ((local_68[0] & 0x10) == 0) { local_78 = 3; uVar5 = 0; uVar6 = 0; } else { puVar4 = &local_50; if (in_R9D != 0) { puVar4 = &local_40; } piVar1 = (int *)*puVar4; puVar4 = &local_48; if (in_R9D != 0) { puVar4 = &local_38; } local_78 = *puVar4; if (0xfffffff6 < (uint)local_78) { *piVar1 = *piVar1 + 1; } uVar6 = (ulong)piVar1 & 0xffffffff00000000; uVar5 = (ulong)piVar1 & 0xffffffff; } js_free_desc(param_1,local_68); goto LAB_0015f998; } auVar7 = JS_GetPrototypeFree(param_1,auVar7._0_8_,auVar7._8_8_); if (auVar7._8_4_ == 2) { local_78 = 3; break; } if ((auVar7._8_4_ == 6) || (iVar3 = js_poll_interrupts(param_1), iVar3 != 0)) break; } } uVar5 = 0; uVar6 = 0; LAB_0015f998: JS_FreeAtom(param_1,iVar2); JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); auVar7._8_8_ = local_78; auVar7._0_8_ = uVar5 | uVar6; return auVar7; }
28,812
process_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/examples/tts/tts.cpp
static std::string process_text(const std::string & text) { // For now I skipped text romanization as I am unsure how to handle // uroman and MeCab implementations in C++ // maybe something like https://github.com/anyascii/anyascii/ could work. // currently only English would be supported in this function std::string processed_text = replace_numbers_with_words(text); std::transform(processed_text.begin(), processed_text.end(), processed_text.begin(), ::tolower); std::regex special_chars(R"([-_/,\.\\])"); processed_text = std::regex_replace(processed_text, special_chars, " "); std::regex non_alpha(R"([^a-z\s])"); processed_text = std::regex_replace(processed_text, non_alpha, ""); std::regex multiple_spaces(R"(\s+)"); processed_text = std::regex_replace(processed_text, multiple_spaces, " "); processed_text = std::regex_replace(processed_text, std::regex(R"(^\s+|\s+$)"), ""); /* Replace spaces with the separator token same as in line 365 for (auto & c : prompt_user) { if (c == ' ') { prompt_clean += "<|text_sep|>"; */ processed_text = std::regex_replace(processed_text, std::regex(R"(\s)"), "<|text_sep|>"); return processed_text; }
O0
cpp
process_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x1c8, %rsp # imm = 0x1C8 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0x1c0(%rsp) movq %rsi, 0x1b8(%rsp) movb $0x0, 0x1b7(%rsp) movq 0x1b8(%rsp), %rsi callq 0x67bb0 movq 0x30(%rsp), %rdi callq 0x5e890 movq 0x30(%rsp), %rdi movq %rax, 0x1a8(%rsp) callq 0x5e9a0 movq 0x30(%rsp), %rdi movq %rax, 0x1a0(%rsp) callq 0x5e890 movq %rax, 0x198(%rsp) movq 0x1a8(%rsp), %rdi movq 0x1a0(%rsp), %rsi movq 0x198(%rsp), %rdx movq 0x24cd3a(%rip), %rcx # 0x2b2f88 callq 0x6eef0 movq %rax, 0x38(%rsp) jmp 0x6625a movq 0x38(%rsp), %rax movq %rax, 0x180(%rsp) leaq 0x1af3ab(%rip), %rsi # 0x215619 leaq 0x160(%rsp), %rdi movl $0x10, %edx callq 0x6ef80 jmp 0x66282 movq 0x30(%rsp), %rsi leaq 0x1b8dc3(%rip), %rcx # 0x21f051 leaq 0x140(%rsp), %rdi leaq 0x160(%rsp), %rdx xorl %r8d, %r8d callq 0x6f030 jmp 0x662a8 movq 0x30(%rsp), %rdi leaq 0x140(%rsp), %rsi movq %rsi, 0x20(%rsp) callq 0x5e980 movq 0x20(%rsp), %rdi callq 0x5f5d8 leaq 0x1af354(%rip), %rsi # 0x215624 leaq 0x120(%rsp), %rdi movl $0x10, %edx callq 0x6ef80 jmp 0x662e4 movq 0x30(%rsp), %rsi leaq 0x1b5e7e(%rip), %rcx # 0x21c16e leaq 0x100(%rsp), %rdi leaq 0x120(%rsp), %rdx xorl %r8d, %r8d callq 0x6f030 jmp 0x6630a movq 0x30(%rsp), %rdi leaq 0x100(%rsp), %rsi movq %rsi, 0x18(%rsp) callq 0x5e980 movq 0x18(%rsp), %rdi callq 0x5f5d8 leaq 0x1af2fb(%rip), %rsi # 0x21562d leaq 0xe0(%rsp), %rdi movl $0x10, %edx callq 0x6ef80 jmp 0x66346 movq 0x30(%rsp), %rsi leaq 0x1b8cff(%rip), %rcx # 0x21f051 leaq 0xc0(%rsp), %rdi leaq 0xe0(%rsp), %rdx xorl %r8d, %r8d callq 0x6f030 jmp 0x6636c movq 0x30(%rsp), %rdi leaq 0xc0(%rsp), %rsi movq %rsi, 0x10(%rsp) callq 0x5e980 movq 0x10(%rsp), %rdi callq 0x5f5d8 leaq 0x1af29d(%rip), %rsi # 0x215631 leaq 0x80(%rsp), %rdi movl $0x10, %edx callq 0x6ef80 jmp 0x663a8 movq 0x30(%rsp), %rsi leaq 0x1b5dba(%rip), %rcx # 0x21c16e leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rdx xorl %r8d, %r8d callq 0x6f030 jmp 0x663ce movq 0x30(%rsp), %rdi leaq 0xa0(%rsp), %rsi movq %rsi, 0x8(%rsp) callq 0x5e980 movq 0x8(%rsp), %rdi callq 0x5f5d8 leaq 0x80(%rsp), %rdi callq 0x6f120 leaq 0x1af238(%rip), %rsi # 0x21563b leaq 0x40(%rsp), %rdi movl $0x10, %edx callq 0x6ef80 jmp 0x66414 movq 0x30(%rsp), %rsi leaq 0x1aee26(%rip), %rcx # 0x215246 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rdx xorl %r8d, %r8d callq 0x6f030 jmp 0x66434 movq 0x30(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x5e980 leaq 0x60(%rsp), %rdi callq 0x5f5d8 leaq 0x40(%rsp), %rdi callq 0x6f120 movb $0x1, 0x1b7(%rsp) leaq 0xe0(%rsp), %rdi callq 0x6f120 leaq 0x120(%rsp), %rdi callq 0x6f120 leaq 0x160(%rsp), %rdi callq 0x6f120 testb $0x1, 0x1b7(%rsp) jne 0x6656b jmp 0x66561 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x190(%rsp) movl %eax, 0x18c(%rsp) jmp 0x66578 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x190(%rsp) movl %eax, 0x18c(%rsp) jmp 0x66552 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x190(%rsp) movl %eax, 0x18c(%rsp) jmp 0x66545 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x190(%rsp) movl %eax, 0x18c(%rsp) jmp 0x66538 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x190(%rsp) movl %eax, 0x18c(%rsp) leaq 0x80(%rsp), %rdi callq 0x6f120 jmp 0x66538 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x190(%rsp) movl %eax, 0x18c(%rsp) leaq 0x40(%rsp), %rdi callq 0x6f120 leaq 0xe0(%rsp), %rdi callq 0x6f120 leaq 0x120(%rsp), %rdi callq 0x6f120 leaq 0x160(%rsp), %rdi callq 0x6f120 jmp 0x66578 movq 0x30(%rsp), %rdi callq 0x5f5d8 movq 0x28(%rsp), %rax addq $0x1c8, %rsp # imm = 0x1C8 retq movq 0x30(%rsp), %rdi callq 0x5f5d8 movq 0x190(%rsp), %rdi callq 0x5ebf0 nop
_ZL12process_textRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 1C8h mov [rsp+1C8h+var_198], rdi; int mov rax, rdi mov [rsp+1C8h+var_1A0], rax; int mov [rsp+1C8h+var_8], rdi mov qword ptr [rsp+1C8h+var_10], rsi mov [rsp+1C8h+var_11], 0 mov rsi, qword ptr [rsp+1C8h+var_10]; int call _ZL26replace_numbers_with_wordsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; replace_numbers_with_words(std::string const&) mov rdi, [rsp+1C8h+var_198] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov rdi, [rsp+1C8h+var_198] mov [rsp+1C8h+var_20], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov rdi, [rsp+1C8h+var_198] mov [rsp+1C8h+var_28], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+1C8h+var_30], rax mov rdi, [rsp+1C8h+var_20] mov rsi, [rsp+1C8h+var_28] mov rdx, [rsp+1C8h+var_30] mov rcx, cs:tolower_ptr call _ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_ mov [rsp+1C8h+var_190], rax; __int64 jmp short $+2 loc_6625A: mov rax, [rsp+1C8h+var_190] mov [rsp+1C8h+var_48], rax lea rsi, asc_215619; "[-_/,\\.\\\\]" lea rdi, [rsp+1C8h+var_68] mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_66282: mov rsi, [rsp+1C8h+var_198]; int lea rcx, aForMessageInMe+144h; int lea rdi, [rsp+1C8h+var_88]; int lea rdx, [rsp+1C8h+var_68]; int xor r8d, r8d; int call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type) jmp short $+2 loc_662A8: mov rdi, [rsp+1C8h+var_198] lea rsi, [rsp+1C8h+var_88] mov [rsp+1C8h+var_1A8], rsi; int call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+1C8h+var_1A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rsi, aAZS; "[^a-z\\s]" lea rdi, [rsp+1C8h+var_A8] mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_662E4: mov rsi, [rsp+1C8h+var_198]; int lea rcx, aExampleSpecifi+27h; int lea rdi, [rsp+1C8h+var_C8]; int lea rdx, [rsp+1C8h+var_A8]; int xor r8d, r8d; int call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type) jmp short $+2 loc_6630A: mov rdi, [rsp+1C8h+var_198] lea rsi, [rsp+1C8h+var_C8] mov [rsp+1C8h+var_1B0], rsi; int call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+1C8h+var_1B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rsi, aS; "\\s+" lea rdi, [rsp+1C8h+var_E8] mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_66346: mov rsi, [rsp+1C8h+var_198]; int lea rcx, aForMessageInMe+144h; int lea rdi, [rsp+1C8h+var_108]; int lea rdx, [rsp+1C8h+var_E8]; int xor r8d, r8d; int call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type) jmp short $+2 loc_6636C: mov rdi, [rsp+1C8h+var_198] lea rsi, [rsp+1C8h+var_108] mov [rsp+1C8h+var_1B8], rsi; int call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+1C8h+var_1B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rsi, aSS; "^\\s+|\\s+$" lea rdi, [rsp+1C8h+var_148] mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_663A8: mov rsi, [rsp+1C8h+var_198]; int lea rcx, aExampleSpecifi+27h; int lea rdi, [rsp+1C8h+var_128]; int lea rdx, [rsp+1C8h+var_148]; int xor r8d, r8d; int call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type) jmp short $+2 loc_663CE: mov rdi, [rsp+1C8h+var_198] lea rsi, [rsp+1C8h+var_128] mov [rsp+1C8h+var_1C0], rsi; void * call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+1C8h+var_1C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1C8h+var_148]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() lea rsi, aS_0; "\\s" lea rdi, [rsp+1C8h+var_188] mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_66414: mov rsi, [rsp+1C8h+var_198]; int lea rcx, aTextStartTheTe+1FBh; int lea rdi, [rsp+1C8h+var_168]; int lea rdx, [rsp+1C8h+var_188]; int xor r8d, r8d; int call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type) jmp short $+2 loc_66434: mov rdi, [rsp+1C8h+var_198] lea rsi, [rsp+1C8h+var_168] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1C8h+var_168]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1C8h+var_188]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() mov [rsp+1C8h+var_11], 1 lea rdi, [rsp+1C8h+var_E8]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() lea rdi, [rsp+1C8h+var_A8]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() lea rdi, [rsp+1C8h+var_68]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() test [rsp+1C8h+var_11], 1 jnz loc_6656B jmp loc_66561 mov rcx, rax mov eax, edx mov [rsp+arg_188], rcx mov [rsp+arg_184], eax jmp loc_66578 mov rcx, rax mov eax, edx mov [rsp+arg_188], rcx mov [rsp+arg_184], eax jmp loc_66552 mov rcx, rax mov eax, edx mov [rsp+arg_188], rcx mov [rsp+arg_184], eax jmp short loc_66545 mov rcx, rax mov eax, edx mov [rsp+arg_188], rcx mov [rsp+arg_184], eax jmp short loc_66538 mov rcx, rax mov eax, edx mov [rsp+arg_188], rcx mov [rsp+arg_184], eax lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() jmp short loc_66538 mov rcx, rax mov eax, edx mov [rsp+arg_188], rcx mov [rsp+arg_184], eax lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() loc_66538: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() loc_66545: lea rdi, [rsp+arg_118]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() loc_66552: lea rdi, [rsp+arg_158]; void * call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() jmp short loc_66578 loc_66561: mov rdi, [rsp+1C8h+var_198]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_6656B: mov rax, [rsp+1C8h+var_1A0] add rsp, 1C8h retn loc_66578: mov rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_188] call __Unwind_Resume
void * process_text(void *a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // ecx int v7; // r8d int v8; // r9d int v9; // r9d int v10; // ecx int v11; // r8d int v12; // r9d int v13; // r9d int v14; // ecx int v15; // r8d int v16; // r9d int v17; // r9d int v18; // ecx int v19; // r8d int v20; // r9d int v21; // r9d int v22; // ecx int v23; // r8d int v24; // r9d int v25; // r9d int v27; // [rsp+0h] [rbp-1C8h] int v28; // [rsp+0h] [rbp-1C8h] int v29; // [rsp+0h] [rbp-1C8h] int v30; // [rsp+0h] [rbp-1C8h] int v31; // [rsp+0h] [rbp-1C8h] int v32; // [rsp+0h] [rbp-1C8h] int v33; // [rsp+0h] [rbp-1C8h] int v34; // [rsp+0h] [rbp-1C8h] int v35; // [rsp+0h] [rbp-1C8h] int v36; // [rsp+0h] [rbp-1C8h] int v37; // [rsp+0h] [rbp-1C8h] int v38; // [rsp+8h] [rbp-1C0h] void *v39; // [rsp+8h] [rbp-1C0h] void *v40; // [rsp+8h] [rbp-1C0h] void *v41; // [rsp+8h] [rbp-1C0h] void *v42; // [rsp+8h] [rbp-1C0h] void *v43; // [rsp+8h] [rbp-1C0h] void *v44; // [rsp+8h] [rbp-1C0h] void *v45; // [rsp+8h] [rbp-1C0h] void *v46; // [rsp+8h] [rbp-1C0h] void *v47; // [rsp+8h] [rbp-1C0h] int v48; // [rsp+10h] [rbp-1B8h] int v49; // [rsp+10h] [rbp-1B8h] int v50; // [rsp+10h] [rbp-1B8h] int v51; // [rsp+10h] [rbp-1B8h] int v52; // [rsp+10h] [rbp-1B8h] int v53; // [rsp+10h] [rbp-1B8h] int v54; // [rsp+10h] [rbp-1B8h] int v55; // [rsp+10h] [rbp-1B8h] int v56; // [rsp+10h] [rbp-1B8h] int v57; // [rsp+10h] [rbp-1B8h] int v58; // [rsp+18h] [rbp-1B0h] int v59; // [rsp+18h] [rbp-1B0h] int v60; // [rsp+18h] [rbp-1B0h] int v61; // [rsp+18h] [rbp-1B0h] int v62; // [rsp+18h] [rbp-1B0h] int v63; // [rsp+18h] [rbp-1B0h] int v64; // [rsp+18h] [rbp-1B0h] int v65; // [rsp+18h] [rbp-1B0h] int v66; // [rsp+18h] [rbp-1B0h] int v67; // [rsp+18h] [rbp-1B0h] int v68; // [rsp+20h] [rbp-1A8h] int v69; // [rsp+20h] [rbp-1A8h] int v70; // [rsp+20h] [rbp-1A8h] int v71; // [rsp+20h] [rbp-1A8h] int v72; // [rsp+20h] [rbp-1A8h] int v73; // [rsp+20h] [rbp-1A8h] int v74; // [rsp+20h] [rbp-1A8h] int v75; // [rsp+20h] [rbp-1A8h] int v76; // [rsp+20h] [rbp-1A8h] int v77; // [rsp+20h] [rbp-1A8h] int v78; // [rsp+28h] [rbp-1A0h] int v79; // [rsp+28h] [rbp-1A0h] int v80; // [rsp+28h] [rbp-1A0h] int v81; // [rsp+28h] [rbp-1A0h] int v82; // [rsp+28h] [rbp-1A0h] int v83; // [rsp+28h] [rbp-1A0h] int v84; // [rsp+28h] [rbp-1A0h] int v85; // [rsp+28h] [rbp-1A0h] int v86; // [rsp+28h] [rbp-1A0h] int v87; // [rsp+28h] [rbp-1A0h] void *v88; // [rsp+28h] [rbp-1A0h] void *v89; // [rsp+30h] [rbp-198h] int v90; // [rsp+30h] [rbp-198h] void *v91; // [rsp+30h] [rbp-198h] int v92; // [rsp+30h] [rbp-198h] void *v93; // [rsp+30h] [rbp-198h] int v94; // [rsp+30h] [rbp-198h] void *v95; // [rsp+30h] [rbp-198h] int v96; // [rsp+30h] [rbp-198h] void *v97; // [rsp+30h] [rbp-198h] int v98; // [rsp+30h] [rbp-198h] void *v99; // [rsp+30h] [rbp-198h] char v100; // [rsp+38h] [rbp-190h] long long v101; // [rsp+38h] [rbp-190h] long long v102; // [rsp+38h] [rbp-190h] long long v103; // [rsp+38h] [rbp-190h] long long v104; // [rsp+38h] [rbp-190h] long long v105; // [rsp+38h] [rbp-190h] int v106[6]; // [rsp+40h] [rbp-188h] BYREF char v107; // [rsp+58h] [rbp-170h] int v108[8]; // [rsp+60h] [rbp-168h] BYREF int v109[8]; // [rsp+80h] [rbp-148h] BYREF int v110[8]; // [rsp+A0h] [rbp-128h] BYREF int v111; // [rsp+C0h] [rbp-108h] BYREF char v112; // [rsp+C8h] [rbp-100h] int v113; // [rsp+D0h] [rbp-F8h] int v114; // [rsp+D8h] [rbp-F0h] int v115[8]; // [rsp+E0h] [rbp-E8h] BYREF int v116[4]; // [rsp+100h] [rbp-C8h] BYREF long long v117; // [rsp+110h] [rbp-B8h] int v118; // [rsp+118h] [rbp-B0h] int v119; // [rsp+120h] [rbp-A8h] BYREF char v120; // [rsp+128h] [rbp-A0h] int v121; // [rsp+130h] [rbp-98h] int v122; // [rsp+138h] [rbp-90h] int v123[8]; // [rsp+140h] [rbp-88h] BYREF int v124[4]; // [rsp+160h] [rbp-68h] BYREF char v125; // [rsp+170h] [rbp-58h] long long v126; // [rsp+180h] [rbp-48h] long long v127; // [rsp+198h] [rbp-30h] long long v128; // [rsp+1A0h] [rbp-28h] long long v129; // [rsp+1A8h] [rbp-20h] char v130; // [rsp+1B7h] [rbp-11h] int v131[2]; // [rsp+1B8h] [rbp-10h] void *v132; // [rsp+1C0h] [rbp-8h] v132 = a1; *(_QWORD *)v131 = a2; v130 = 0; replace_numbers_with_words( (int)a1, a2, a3, a4, a5, a6, v27, v38, v48, v58, v68, a1, (int)a1, v100, v106[0], v106[2], v106[4], v107, v108[0], v108[2], v108[4], v108[6], v109[0], v109[2], v109[4], v109[6], v110[0], v110[2], v110[4], v110[6], v111, v112, v113, v114, v115[0], v115[2], v115[4], v115[6], v116[0], v116[2], v117, v118, v119, v120, v121, v122, v123[0], v123[2], v123[4], v123[6], v124[0], v124[2], v125); v129 = std::string::begin(v89); v128 = std::string::end(v89); v127 = std::string::begin(v89); v101 = ZSt9transformIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES9_PDoFiiEET0_T_SD_SC_T1_( v129, v128, v127, &tolower); v126 = v101; std::basic_regex<char,std::regex_traits<char>>::basic_regex( (unsigned int)v124, (unsigned int)"[-_/,\\.\\\\]", 16, v6, v7, v8, v28, (long long)v39, v49, v59, v69, v78, (long long)v89); std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>( (int)v123, v90, (int)v124, (int)" ", 0, v9, v29, v40, v50, v60, v70, v79, v90, v101); std::string::operator=(v91); std::string::~string(v123); std::basic_regex<char,std::regex_traits<char>>::basic_regex( (unsigned int)&v119, (unsigned int)"[^a-z\\s]", 16, v10, v11, v12, v30, (long long)v41, v51, v61, (unsigned int)v123, v80, (long long)v91); std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>( (int)v116, v92, (int)&v119, (int)"", 0, v13, v31, v42, v52, v62, v71, v81, v92, v102); std::string::operator=(v93); std::string::~string(v116); std::basic_regex<char,std::regex_traits<char>>::basic_regex( (unsigned int)v115, (unsigned int)"\\s+", 16, v14, v15, v16, v32, (long long)v43, v53, (unsigned int)v116, v72, v82, (long long)v93); std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>( (int)&v111, v94, (int)v115, (int)" ", 0, v17, v33, v44, v54, v63, v73, v83, v94, v103); std::string::operator=(v95); std::string::~string(&v111); std::basic_regex<char,std::regex_traits<char>>::basic_regex( (unsigned int)v109, (unsigned int)"^\\s+|\\s+$", 16, v18, v19, v20, v34, (long long)v45, (unsigned int)&v111, v64, v74, v84, (long long)v95); std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>( (int)v110, v96, (int)v109, (int)"", 0, v21, v35, v46, v55, v65, v75, v85, v96, v104); std::string::operator=(v97); std::string::~string(v110); std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v109); std::basic_regex<char,std::regex_traits<char>>::basic_regex( (unsigned int)v106, (unsigned int)"\\s", 16, v22, v23, v24, v36, (long long)v110, v56, v66, v76, v86, (long long)v97); std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>( (int)v108, v98, (int)v106, (int)"<|text_sep|>", 0, v25, v37, v47, v57, v67, v77, v87, v98, v105); std::string::operator=(v99); std::string::~string(v108); std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v106); v130 = 1; std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v115); std::basic_regex<char,std::regex_traits<char>>::~basic_regex(&v119); std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v124); if ( (v130 & 1) == 0 ) std::string::~string(v99); return v88; }
process_text: SUB RSP,0x1c8 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x1c0],RDI MOV qword ptr [RSP + 0x1b8],RSI MOV byte ptr [RSP + 0x1b7],0x0 MOV RSI,qword ptr [RSP + 0x1b8] CALL 0x00167bb0 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0015e890 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x1a8],RAX CALL 0x0015e9a0 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x1a0],RAX CALL 0x0015e890 MOV qword ptr [RSP + 0x198],RAX MOV RDI,qword ptr [RSP + 0x1a8] MOV RSI,qword ptr [RSP + 0x1a0] MOV RDX,qword ptr [RSP + 0x198] LAB_00166247: MOV RCX,qword ptr [0x003b2f88] CALL 0x0016eef0 MOV qword ptr [RSP + 0x38],RAX JMP 0x0016625a LAB_0016625a: MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x180],RAX LEA RSI,[0x315619] LEA RDI,[RSP + 0x160] MOV EDX,0x10 CALL 0x0016ef80 JMP 0x00166282 LAB_00166282: MOV RSI,qword ptr [RSP + 0x30] LEA RCX,[0x31f051] LEA RDI,[RSP + 0x140] LEA RDX,[RSP + 0x160] XOR R8D,R8D CALL 0x0016f030 JMP 0x001662a8 LAB_001662a8: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x140] MOV qword ptr [RSP + 0x20],RSI CALL 0x0015e980 MOV RDI,qword ptr [RSP + 0x20] CALL 0x0015f5d8 LEA RSI,[0x315624] LEA RDI,[RSP + 0x120] MOV EDX,0x10 CALL 0x0016ef80 JMP 0x001662e4 LAB_001662e4: MOV RSI,qword ptr [RSP + 0x30] LEA RCX,[0x31c16e] LEA RDI,[RSP + 0x100] LEA RDX,[RSP + 0x120] XOR R8D,R8D CALL 0x0016f030 JMP 0x0016630a LAB_0016630a: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x100] MOV qword ptr [RSP + 0x18],RSI CALL 0x0015e980 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0015f5d8 LEA RSI,[0x31562d] LEA RDI,[RSP + 0xe0] MOV EDX,0x10 CALL 0x0016ef80 JMP 0x00166346 LAB_00166346: MOV RSI,qword ptr [RSP + 0x30] LEA RCX,[0x31f051] LEA RDI,[RSP + 0xc0] LEA RDX,[RSP + 0xe0] XOR R8D,R8D CALL 0x0016f030 JMP 0x0016636c LAB_0016636c: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xc0] MOV qword ptr [RSP + 0x10],RSI CALL 0x0015e980 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0015f5d8 LEA RSI,[0x315631] LEA RDI,[RSP + 0x80] MOV EDX,0x10 CALL 0x0016ef80 JMP 0x001663a8 LAB_001663a8: MOV RSI,qword ptr [RSP + 0x30] LEA RCX,[0x31c16e] LEA RDI,[RSP + 0xa0] LEA RDX,[RSP + 0x80] XOR R8D,R8D CALL 0x0016f030 JMP 0x001663ce LAB_001663ce: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xa0] MOV qword ptr [RSP + 0x8],RSI CALL 0x0015e980 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0015f5d8 LEA RDI,[RSP + 0x80] CALL 0x0016f120 LAB_001663fc: LEA RSI,[0x31563b] LEA RDI,[RSP + 0x40] MOV EDX,0x10 CALL 0x0016ef80 JMP 0x00166414 LAB_00166414: MOV RSI,qword ptr [RSP + 0x30] LEA RCX,[0x315246] LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x40] XOR R8D,R8D CALL 0x0016f030 LAB_00166432: JMP 0x00166434 LAB_00166434: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x60] CALL 0x0015e980 LEA RDI,[RSP + 0x60] CALL 0x0015f5d8 LEA RDI,[RSP + 0x40] CALL 0x0016f120 MOV byte ptr [RSP + 0x1b7],0x1 LEA RDI,[RSP + 0xe0] CALL 0x0016f120 LEA RDI,[RSP + 0x120] CALL 0x0016f120 LEA RDI,[RSP + 0x160] CALL 0x0016f120 TEST byte ptr [RSP + 0x1b7],0x1 JNZ 0x0016656b JMP 0x00166561 LAB_00166561: MOV RDI,qword ptr [RSP + 0x30] CALL 0x0015f5d8 LAB_0016656b: MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0x1c8 RET
/* process_text(std::__cxx11::string const&) */ string * process_text(string *param_1) { basic_regex<char,std::__cxx11::regex_traits<char>> local_188 [32]; string local_168 [32]; basic_regex<char,std::__cxx11::regex_traits<char>> local_148 [32]; string local_128 [32]; string local_108 [32]; basic_regex<char,std::__cxx11::regex_traits<char>> local_e8 [32]; string local_c8 [32]; basic_regex<char,std::__cxx11::regex_traits<char>> local_a8 [32]; string local_88 [32]; basic_regex<char,std::__cxx11::regex_traits<char>> local_68 [32]; int8 local_48; int8 local_30; int8 local_28; int8 local_20; byte local_11; string *local_8; local_11 = 0; local_8 = param_1; replace_numbers_with_words(param_1); local_20 = std::__cxx11::string::begin(); local_28 = std::__cxx11::string::end(); local_30 = std::__cxx11::string::begin(); /* try { // try from 00166247 to 0016627f has its CatchHandler @ 00166499 */ local_48 = std:: transform<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,int(*)(int)noexcept> (local_20,local_28,local_30,PTR_tolower_003b2f88); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_68,"[-_/,\\.\\\\]",0x10); /* try { // try from 00166282 to 001662e1 has its CatchHandler @ 001664b2 */ std:: regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>> (local_88,param_1,local_68," ",0); std::__cxx11::string::operator=(param_1,local_88); std::__cxx11::string::~string(local_88); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_a8,"[^a-z\\s]",0x10); /* try { // try from 001662e4 to 00166343 has its CatchHandler @ 001664cb */ std:: regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>> (local_c8,param_1,local_a8,"",0); std::__cxx11::string::operator=(param_1,local_c8); std::__cxx11::string::~string(local_c8); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_e8,&DAT_0031562d,0x10); /* try { // try from 00166346 to 001663a5 has its CatchHandler @ 001664e1 */ std:: regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>> (local_108,param_1,local_e8," ",0); std::__cxx11::string::operator=(param_1,local_108); std::__cxx11::string::~string(local_108); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_148,"^\\s+|\\s+$",0x10); /* try { // try from 001663a8 to 001663cb has its CatchHandler @ 001664f7 */ std:: regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>> (local_128,param_1,local_148,"",0); std::__cxx11::string::operator=(param_1,local_128); std::__cxx11::string::~string(local_128); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_148); /* try { // try from 001663fc to 00166411 has its CatchHandler @ 001664e1 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_188,&DAT_0031563b,0x10); /* try { // try from 00166414 to 00166431 has its CatchHandler @ 0016651a */ std:: regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>> (local_168,param_1,local_188,"<|text_sep|>",0); std::__cxx11::string::operator=(param_1,local_168); std::__cxx11::string::~string(local_168); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_188); local_11 = 1; std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_e8); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_a8); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_68); if ((local_11 & 1) == 0) { std::__cxx11::string::~string(param_1); } return param_1; }
28,813
void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&)
ng-log[P]ng-log/src/logging.cc
void MakeCheckOpValueString(std::ostream* os, const signed char& v) { if (v >= 32 && v <= 126) { (*os) << "'" << v << "'"; } else { (*os) << "signed char value " << static_cast<short>(v); } }
O1
cpp
void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movb (%rsi), %al addb $-0x7f, %al cmpb $-0x5f, %al jae 0xf0fe leaq 0x14b82(%rip), %rsi # 0x23c5e movl $0x12, %edx movq %rbx, %rdi callq 0x75f0 movsbl (%r14), %esi movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmp 0x74a0 leaq 0x149a1(%rip), %r15 # 0x23aa6 movl $0x1, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x75f0 movb (%r14), %al leaq 0xf(%rsp), %rsi movb %al, (%rsi) movl $0x1, %edx movq %rbx, %rdi callq 0x75f0 movl $0x1, %edx movq %rax, %rdi movq %r15, %rsi callq 0x75f0 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5nglog8internal22MakeCheckOpValueStringIaEEvPSoRKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi mov al, [rsi] add al, 81h cmp al, 0A1h jnb short loc_F0FE lea rsi, aUnsignedCharVa+2; "signed char value " mov edx, 12h mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) movsx esi, byte ptr [r14] mov rdi, rbx add rsp, 10h pop rbx pop r14 pop r15 jmp __ZNSolsEs; std::ostream::operator<<(short) loc_F0FE: lea r15, aDataNumCharsTo+59h; "'" mov edx, 1 mov rdi, rbx mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov al, [r14] lea rsi, [rsp+28h+var_19] mov [rsi], al mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 10h pop rbx pop r14 pop r15 retn
long long nglog::internal::MakeCheckOpValueString<signed char>(long long a1, char *a2) { long long v3; // rax _BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF if ( (unsigned __int8)(*a2 - 127) >= 0xA1u ) { std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL); v4[0] = *a2; v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL); return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL); } else { std::__ostream_insert<char,std::char_traits<char>>(a1, "signed char value ", 18LL); return std::ostream::operator<<(a1, (unsigned int)*a2); } }
MakeCheckOpValueString<signed_char>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI MOV AL,byte ptr [RSI] ADD AL,0x81 CMP AL,0xa1 JNC 0x0010f0fe LEA RSI,[0x123c5e] MOV EDX,0x12 MOV RDI,RBX CALL 0x001075f0 MOVSX ESI,byte ptr [R14] MOV RDI,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 JMP 0x001074a0 LAB_0010f0fe: LEA R15,[0x123aa6] MOV EDX,0x1 MOV RDI,RBX MOV RSI,R15 CALL 0x001075f0 MOV AL,byte ptr [R14] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL MOV EDX,0x1 MOV RDI,RBX CALL 0x001075f0 MOV EDX,0x1 MOV RDI,RAX MOV RSI,R15 CALL 0x001075f0 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&) */ void nglog::internal::MakeCheckOpValueString<signed_char>(ostream *param_1,signed *param_2) { ostream *poVar1; signed local_19; if ((byte)((char)*param_2 + 0x81U) < 0xa1) { std::__ostream_insert<char,std::char_traits<char>>(param_1,"signed char value ",0x12); std::ostream::operator<<(param_1,(short)(char)*param_2); return; } std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1); local_19 = *param_2; poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)&local_19,1); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1); return; }
28,814
ma_find_writepos
eloqsql/storage/maria/ma_dynrec.c
static int _ma_find_writepos(MARIA_HA *info, ulong reclength, /* record length */ my_off_t *filepos, /* Return file pos */ ulong *length) /* length of block at filepos */ { MARIA_BLOCK_INFO block_info; ulong tmp; DBUG_ENTER("_ma_find_writepos"); if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { /* Deleted blocks exists; Get last used block */ *filepos=info->s->state.dellink; block_info.second_read=0; info->rec_cache.seek_not_done=1; if (!(_ma_get_block_info(info, &block_info, info->dfile.file, info->s->state.dellink) & BLOCK_DELETED)) { DBUG_PRINT("error",("Delete link crashed")); _ma_set_fatal_error_with_share(info->s, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(-1); } info->s->state.dellink=block_info.next_filepos; info->state->del--; info->state->empty-= block_info.block_len; *length= block_info.block_len; } else { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else tmp= ((tmp+MARIA_DYN_ALIGN_SIZE-1) & (~ (ulong) (MARIA_DYN_ALIGN_SIZE-1))); if (info->state->data_file_length > (info->s->base.max_data_file_length - tmp)) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(-1); } if (tmp > MARIA_MAX_BLOCK_LENGTH) tmp=MARIA_MAX_BLOCK_LENGTH; *length= tmp; info->state->data_file_length+= tmp; info->s->state.split++; info->update|=HA_STATE_WRITE_AT_END; } DBUG_RETURN(0); }
O0
c
ma_find_writepos: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movq %rcx, -0x88(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax cmpq $-0x1, 0xc8(%rax) je 0x42669 movq -0x70(%rbp), %rax cmpb $0x0, 0x681(%rax) jne 0x42669 movq -0x70(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rcx movq -0x80(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x10(%rbp) movq -0x70(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x70(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x3f460 andl $0x4, %eax cmpl $0x0, %eax jne 0x42619 jmp 0x425fa jmp 0x425fc movq -0x70(%rbp), %rax movq (%rax), %rdi movl $0x7f, %esi callq 0x34cc0 movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0x42799 movq -0x20(%rbp), %rcx movq -0x70(%rbp), %rax movq (%rax), %rax movq %rcx, 0xc8(%rax) movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x38(%rbp), %rcx movq -0x88(%rbp), %rax movq %rcx, (%rax) jmp 0x42790 movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x28(%rax), %rcx movq -0x80(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax addq $0x3, %rax movq -0x78(%rbp), %rsi xorl %ecx, %ecx movl $0x1, %edx cmpq $0xffed, %rsi # imm = 0xFFED cmovael %edx, %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rcx movq (%rcx), %rcx cmpq 0x3b8(%rcx), %rax jae 0x426cd movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x3b8(%rax), %rax movq %rax, -0x90(%rbp) jmp 0x426e7 movq -0x90(%rbp), %rax addq $0x4, %rax subq $0x1, %rax andq $-0x4, %rax movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x28(%rax), %rax movq -0x70(%rbp), %rcx movq (%rcx), %rcx movq 0x368(%rcx), %rcx subq -0x90(%rbp), %rcx cmpq %rcx, %rax jbe 0x42721 callq 0xf7440 movl $0x87, (%rax) movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0x42799 cmpq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC jbe 0x42739 movq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC movq -0x90(%rbp), %rcx movq -0x88(%rbp), %rax movq %rcx, (%rax) movq -0x90(%rbp), %rcx movq -0x70(%rbp), %rax movq 0x20(%rax), %rax addq 0x28(%rax), %rcx movq %rcx, 0x28(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0xc0(%rax), %rcx addq $0x1, %rcx movq %rcx, 0xc0(%rax) movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0x624(%rax) jmp 0x42792 movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x94(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x427c3 movl -0x94(%rbp), %eax addq $0xa0, %rsp popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
_ma_find_writepos: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_88], rcx mov rax, [rbp+var_70] mov rax, [rax] cmp qword ptr [rax+0C8h], 0FFFFFFFFFFFFFFFFh jz loc_42669 mov rax, [rbp+var_70] cmp byte ptr [rax+681h], 0 jnz loc_42669 mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+0C8h] mov rax, [rbp+var_80] mov [rax], rcx mov [rbp+var_10], 0 mov rax, [rbp+var_70] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+0C8h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_42619 jmp short $+2 loc_425FA: jmp short $+2 loc_425FC: mov rax, [rbp+var_70] mov rdi, [rax] mov esi, 7Fh call _ma_set_fatal_error_with_share mov [rbp+var_64], 0FFFFFFFFh jmp loc_42799 loc_42619: mov rcx, [rbp+var_20] mov rax, [rbp+var_70] mov rax, [rax] mov [rax+0C8h], rcx mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rdx, [rbp+var_38] mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_88] mov [rax], rcx jmp loc_42790 loc_42669: mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+28h] mov rax, [rbp+var_80] mov [rax], rcx mov rax, [rbp+var_78] add rax, 3 mov rsi, [rbp+var_78] xor ecx, ecx mov edx, 1 cmp rsi, 0FFEDh cmovnb ecx, edx movsxd rcx, ecx add rax, rcx mov [rbp+var_90], rax mov rcx, [rbp+var_70] mov rcx, [rcx] cmp rax, [rcx+3B8h] jnb short loc_426CD mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+3B8h] mov [rbp+var_90], rax jmp short loc_426E7 loc_426CD: mov rax, [rbp+var_90] add rax, 4 sub rax, 1 and rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_90], rax loc_426E7: mov rax, [rbp+var_70] mov rax, [rax+20h] mov rax, [rax+28h] mov rcx, [rbp+var_70] mov rcx, [rcx] mov rcx, [rcx+368h] sub rcx, [rbp+var_90] cmp rax, rcx jbe short loc_42721 call _my_thread_var mov dword ptr [rax], 87h mov [rbp+var_64], 0FFFFFFFFh jmp short loc_42799 loc_42721: cmp [rbp+var_90], 0FFFFFCh jbe short loc_42739 mov [rbp+var_90], 0FFFFFCh loc_42739: mov rcx, [rbp+var_90] mov rax, [rbp+var_88] mov [rax], rcx mov rcx, [rbp+var_90] mov rax, [rbp+var_70] mov rax, [rax+20h] add rcx, [rax+28h] mov [rax+28h], rcx mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+0C0h] add rcx, 1 mov [rax+0C0h], rcx mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 100h mov [rax+624h], ecx loc_42790: jmp short $+2 loc_42792: mov [rbp+var_64], 0 loc_42799: mov eax, [rbp+var_64] mov [rbp+var_94], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_427C3 mov eax, [rbp+var_94] add rsp, 0A0h pop rbp retn loc_427C3: call ___stack_chk_fail
long long ma_find_writepos( long long *a1, unsigned long long a2, _QWORD *a3, unsigned long long *a4, long long a5, int a6) { long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d unsigned long long v11; // [rsp+10h] [rbp-90h] unsigned long long v12; // [rsp+10h] [rbp-90h] unsigned __int8 v15[40]; // [rsp+40h] [rbp-60h] BYREF unsigned long long v16; // [rsp+68h] [rbp-38h] long long v17; // [rsp+80h] [rbp-20h] int v18; // [rsp+90h] [rbp-10h] unsigned long long v19; // [rsp+98h] [rbp-8h] v19 = __readfsqword(0x28u); if ( *(_QWORD *)(*a1 + 200) == -1LL || *((_BYTE *)a1 + 1665) ) { *a3 = *(_QWORD *)(a1[4] + 40); v11 = (a2 >= 0xFFED) + a2 + 3; if ( v11 >= *(_QWORD *)(*a1 + 952) ) v12 = (v11 + 3) & 0xFFFFFFFFFFFFFFFCLL; else v12 = *(_QWORD *)(*a1 + 952); if ( *(_QWORD *)(a1[4] + 40) > *(_QWORD *)(*a1 + 872) - v12 ) { *(_DWORD *)my_thread_var() = 135; return (unsigned int)-1; } if ( v12 > 0xFFFFFC ) v12 = 16777212LL; *a4 = v12; *(_QWORD *)(a1[4] + 40) += v12; ++*(_QWORD *)(*a1 + 192); *((_DWORD *)a1 + 393) |= 0x100u; return 0; } *a3 = *(_QWORD *)(*a1 + 200); v18 = 0; *((_DWORD *)a1 + 358) = 1; if ( (ma_get_block_info((long long)a1, v15, *((unsigned int *)a1 + 288), *(_QWORD *)(*a1 + 200), a5, a6) & 4) != 0 ) { *(_QWORD *)(*a1 + 200) = v17; --*(_QWORD *)(a1[4] + 8); *(_QWORD *)(a1[4] + 16) -= v16; *a4 = v16; return 0; } ma_set_fatal_error_with_share(*a1, 127, v6, v7, v8, v9); return (unsigned int)-1; }
_ma_find_writepos: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 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 qword ptr [RBP + -0x80],RDX MOV qword ptr [RBP + -0x88],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0xc8],-0x1 JZ 0x00142669 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x681],0x0 JNZ 0x00142669 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc8] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc8] LEA RSI,[RBP + -0x60] CALL 0x0013f460 AND EAX,0x4 CMP EAX,0x0 JNZ 0x00142619 JMP 0x001425fa LAB_001425fa: JMP 0x001425fc LAB_001425fc: MOV RAX,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RAX] MOV ESI,0x7f CALL 0x00134cc0 MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x00142799 LAB_00142619: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RAX],RCX JMP 0x00142790 LAB_00142669: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x3 MOV RSI,qword ptr [RBP + -0x78] XOR ECX,ECX MOV EDX,0x1 CMP RSI,0xffed CMOVNC ECX,EDX MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x3b8] JNC 0x001426cd MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3b8] MOV qword ptr [RBP + -0x90],RAX JMP 0x001426e7 LAB_001426cd: MOV RAX,qword ptr [RBP + -0x90] ADD RAX,0x4 SUB RAX,0x1 AND RAX,-0x4 MOV qword ptr [RBP + -0x90],RAX LAB_001426e7: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x368] SUB RCX,qword ptr [RBP + -0x90] CMP RAX,RCX JBE 0x00142721 CALL 0x001f7440 MOV dword ptr [RAX],0x87 MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x00142799 LAB_00142721: CMP qword ptr [RBP + -0x90],0xfffffc JBE 0x00142739 MOV qword ptr [RBP + -0x90],0xfffffc LAB_00142739: MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] ADD RCX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc0] ADD RCX,0x1 MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x100 MOV dword ptr [RAX + 0x624],ECX LAB_00142790: JMP 0x00142792 LAB_00142792: MOV dword ptr [RBP + -0x64],0x0 LAB_00142799: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001427c3 MOV EAX,dword ptr [RBP + -0x94] ADD RSP,0xa0 POP RBP RET LAB_001427c3: CALL 0x0012a270
int4 _ma_find_writepos(long *param_1,ulong param_2,int8 *param_3,ulong *param_4) { uint uVar1; ulong uVar2; int4 *puVar3; long in_FS_OFFSET; ulong local_98; int4 local_6c; int1 local_68 [40]; ulong local_40; int8 local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) { *param_3 = *(int8 *)(param_1[4] + 0x28); uVar2 = param_2 + 3 + (long)(int)(uint)(0xffec < param_2); if (uVar2 < *(ulong *)(*param_1 + 0x3b8)) { local_98 = *(ulong *)(*param_1 + 0x3b8); } else { local_98 = uVar2 + 3 & 0xfffffffffffffffc; } if (*(long *)(*param_1 + 0x368) - local_98 < *(ulong *)(param_1[4] + 0x28)) { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x87; local_6c = 0xffffffff; goto LAB_00142799; } if (0xfffffc < local_98) { local_98 = 0xfffffc; } *param_4 = local_98; *(ulong *)(param_1[4] + 0x28) = local_98 + *(long *)(param_1[4] + 0x28); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x100; } else { *param_3 = *(int8 *)(*param_1 + 200); local_18 = 0; *(int4 *)(param_1 + 0xb3) = 1; uVar1 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(*param_1 + 200)); if ((uVar1 & 4) == 0) { _ma_set_fatal_error_with_share(*param_1,0x7f); local_6c = 0xffffffff; goto LAB_00142799; } *(int8 *)(*param_1 + 200) = local_28; *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(ulong *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - local_40; *param_4 = local_40; } local_6c = 0; LAB_00142799: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_6c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,815
mysql_stmt_prepare_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, const char *query, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_prepare, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.query= query; parms.length= length; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_prepare(stmt, query, length); return 0; }) }
O0
c
mysql_stmt_prepare_start: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x40e78 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2eef0 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x40f99 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x38(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x40fb0 leaq -0x50(%rbp), %rdx callq 0x43990 movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x38(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x2c(%rbp) jle 0x40ef6 movq -0x38(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x40f99 cmpl $0x0, -0x2c(%rbp) jge 0x40f85 jmp 0x40f02 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x24256(%rip), %rax # 0x65180 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x24234(%rip), %rax # 0x65190 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x40f92 movq -0x38(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_prepare_start: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_40E78 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call mysql_stmt_prepare mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_40F99 loc_40E78: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_38] add rdi, 38h ; '8' lea rsi, mysql_stmt_prepare_start_internal lea rdx, [rbp+var_50] call my_context_spawn mov [rbp+var_2C], eax mov rax, [rbp+var_38] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_38] mov byte ptr [rax+14h], 0 cmp [rbp+var_2C], 0 jle short loc_40EF6 mov rax, [rbp+var_38] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_38] mov eax, [rax] mov [rbp+var_4], eax jmp loc_40F99 loc_40EF6: cmp [rbp+var_2C], 0 jge loc_40F85 jmp short $+2 loc_40F02: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_40F92 loc_40F85: mov rax, [rbp+var_38] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_40F92: mov [rbp+var_4], 0 loc_40F99: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mysql_stmt_prepare_start(_DWORD *a1, long long a2, long long a3, long long a4) { _QWORD v5[3]; // [rsp+0h] [rbp-50h] BYREF unsigned int *v6; // [rsp+18h] [rbp-38h] int v7; // [rsp+24h] [rbp-2Ch] long long v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] long long v10; // [rsp+38h] [rbp-18h] _DWORD *v11; // [rsp+40h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; if ( *(_QWORD *)(a2 + 56) ) { v6 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v10 + 56) + 1152LL) + 40LL); v5[0] = v10; v5[1] = v9; v5[2] = v8; *((_BYTE *)v6 + 20) = 1; v7 = my_context_spawn(v6 + 14, mysql_stmt_prepare_start_internal, v5); *((_BYTE *)v6 + 21) = 0; *((_BYTE *)v6 + 20) = 0; if ( v7 <= 0 ) { if ( v7 >= 0 ) { *v11 = v6[2]; } else { *(_DWORD *)(*(_QWORD *)(v10 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v10 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v10 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v10 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v10 + 56) + 662LL) = 0; *v11 = 1; } return 0; } else { *((_BYTE *)v6 + 21) = 1; return *v6; } } else { *v11 = mysql_stmt_prepare(v10, v9, v8); return 0; } }
mysql_stmt_prepare_start: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00140e78 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012eef0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00140f99 LAB_00140e78: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x38 LEA RSI,[0x140fb0] LEA RDX,[RBP + -0x50] CALL 0x00143990 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x2c],0x0 JLE 0x00140ef6 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00140f99 LAB_00140ef6: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x00140f85 JMP 0x00140f02 LAB_00140f02: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x165180] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x165190] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x00140f92 LAB_00140f85: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_00140f92: MOV dword ptr [RBP + -0x4],0x0 LAB_00140f99: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 mysql_stmt_prepare_start(int4 *param_1,long param_2,int8 param_3,int8 param_4) { int4 uVar1; long local_58; int8 local_50; int8 local_48; int4 *local_40; int local_34; int8 local_30; int8 local_28; long local_20; int4 *local_18; int4 local_c; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_prepare(param_2,param_3,param_4); *local_18 = uVar1; local_c = 0; } else { local_40 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_40 + 5) = 1; local_58 = param_2; local_50 = param_3; local_48 = param_4; local_34 = my_context_spawn(local_40 + 0xe,mysql_stmt_prepare_start_internal,&local_58); *(int1 *)((long)local_40 + 0x15) = 0; *(int1 *)(local_40 + 5) = 0; if (local_34 < 1) { if (local_34 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_001651d0, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_40[2]; } local_c = 0; } else { *(int1 *)((long)local_40 + 0x15) = 1; local_c = *local_40; } } return local_c; }
28,816
ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>::Receive(std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/include/ftxui/component/receiver.hpp
void Receive(T t) { { std::unique_lock<std::mutex> lock(mutex_); queue_.push(std::move(t)); } notifier_.notify_one(); }
O1
cpp
ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>::Receive(std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %r15 movq %rdi, (%r15) movb $0x0, 0x8(%r15) movq %r15, %rdi callq 0x32112 movb $0x1, 0x8(%r15) leaq 0x28(%rbx), %rdi movq %r14, %rsi callq 0x3214e movq %rsp, %rdi callq 0x320fc addq $0x78, %rbx movq %rbx, %rdi callq 0xb1c0 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x320fc movq %rbx, %rdi callq 0xb780
_ZN5ftxui12ReceiverImplISt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEEE7ReceiveES7_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi mov r15, rsp mov [r15], rdi mov byte ptr [r15+8], 0 mov rdi, r15 call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void) mov byte ptr [r15+8], 1 lea rdi, [rbx+28h] mov rsi, r14 call _ZNSt5dequeISt7variantIJN5ftxui5EventESt8functionIFvvEENS1_13AnimationTaskEEESaIS7_EE12emplace_backIJS7_EEERS7_DpOT_; std::deque<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::emplace_back<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>(std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask> &&) mov rdi, rsp call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() add rbx, 78h ; 'x' mov rdi, rbx; this call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void) add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() mov rdi, rbx call __Unwind_Resume
long long ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::Receive( long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-28h] BYREF char v4; // [rsp+8h] [rbp-20h] v3 = a1; v4 = 0; std::unique_lock<std::mutex>::lock(&v3); v4 = 1; std::deque<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::emplace_back<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>( a1 + 40, a2); std::unique_lock<std::mutex>::~unique_lock(&v3); return std::condition_variable::notify_one((std::condition_variable *)(a1 + 120)); }
Receive: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI MOV R15,RSP MOV qword ptr [R15],RDI MOV byte ptr [R15 + 0x8],0x0 MOV RDI,R15 CALL 0x00132112 MOV byte ptr [R15 + 0x8],0x1 LEA RDI,[RBX + 0x28] LAB_001320c3: MOV RSI,R14 CALL 0x0013214e LAB_001320cb: MOV RDI,RSP CALL 0x001320fc ADD RBX,0x78 MOV RDI,RBX CALL 0x0010b1c0 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask> >::Receive(std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>) */ void __thiscall ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>::Receive (ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>> *this ,variant *param_2) { ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>> *local_28; int1 local_20; local_20 = 0; local_28 = this; std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_28); local_20 = 1; /* try { // try from 001320c3 to 001320ca has its CatchHandler @ 001320e9 */ std:: deque<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>,std::allocator<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>> ::emplace_back<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>> ((deque<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>,std::allocator<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>> *)(this + 0x28),param_2); std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_28); std::condition_variable::notify_one(); return; }
28,817
my_hash_sort_utf16_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res= mb_wc(cs, &wc, (uchar *) s, (uchar *) e)) > 0) { my_tosort_utf16(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+= res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf16_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, -0x40(%rbp) movq (%rcx), %rbx movq %r8, -0x48(%rbp) movq (%r8), %r14 testq %rdx, %rdx jle 0x497f1 movq %rdx, %r15 movq %rsi, %r12 movq 0x78(%rdi), %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rax movq %rax, -0x50(%rbp) addq %rsi, %r15 movq %rdi, %r13 leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r15, %rcx callq *-0x50(%rbp) testl %eax, %eax jle 0x497f1 movq -0x38(%rbp), %rdx movl $0xfffd, %esi # imm = 0xFFFD movq -0x30(%rbp), %rcx cmpq (%rcx), %rdx movq %r13, %rdi ja 0x4979a movq -0x30(%rbp), %rcx movq 0x8(%rcx), %rsi movq %rdx, %rcx shrq $0x8, %rcx movq (%rsi,%rcx,8), %rsi testq %rsi, %rsi je 0x497a6 movzbl %dl, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x8(%rsi,%rcx,4), %esi movq %rsi, -0x38(%rbp) movl %esi, %ecx shrl $0x8, %ecx movq %rsi, %rdx movl %ebx, %esi andl $0x3f, %esi addq %r14, %rsi movzbl %dl, %edx imulq %rsi, %rdx movq %rbx, %rsi shlq $0x8, %rsi addq %rdx, %rsi xorq %rbx, %rsi movl %esi, %edx andl $0x3f, %edx addq %r14, %rdx addq $0x3, %rdx imulq %rcx, %rdx movq %rsi, %rbx shlq $0x8, %rbx addq %rdx, %rbx xorq %rsi, %rbx addq $0x6, %r14 movl %eax, %eax addq %rax, %r12 cmpq %r15, %r12 jb 0x4974a movq -0x40(%rbp), %rax movq %rbx, (%rax) movq -0x48(%rbp), %rax movq %r14, (%rax) addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf16_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_40], rcx mov rbx, [rcx] mov [rbp+var_48], r8 mov r14, [r8] test rdx, rdx jle loc_497F1 mov r15, rdx mov r12, rsi mov rax, [rdi+78h] mov [rbp+var_30], rax mov rax, [rdi+0B8h] mov rax, [rax+28h] mov [rbp+var_50], rax add r15, rsi loc_4974A: mov r13, rdi lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r15 call [rbp+var_50] test eax, eax jle loc_497F1 mov rdx, [rbp+var_38] mov esi, 0FFFDh mov rcx, [rbp+var_30] cmp rdx, [rcx] mov rdi, r13 ja short loc_4979A mov rcx, [rbp+var_30] mov rsi, [rcx+8] mov rcx, rdx shr rcx, 8 mov rsi, [rsi+rcx*8] test rsi, rsi jz short loc_497A6 movzx ecx, dl lea rcx, [rcx+rcx*2] mov esi, [rsi+rcx*4+8] loc_4979A: mov [rbp+var_38], rsi mov ecx, esi shr ecx, 8 mov rdx, rsi loc_497A6: mov esi, ebx and esi, 3Fh add rsi, r14 movzx edx, dl imul rdx, rsi mov rsi, rbx shl rsi, 8 add rsi, rdx xor rsi, rbx mov edx, esi and edx, 3Fh add rdx, r14 add rdx, 3 imul rdx, rcx mov rbx, rsi shl rbx, 8 add rbx, rdx xor rbx, rsi add r14, 6 mov eax, eax add r12, rax cmp r12, r15 jb loc_4974A loc_497F1: mov rax, [rbp+var_40] mov [rax], rbx mov rax, [rbp+var_48] mov [rax], r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * my_hash_sort_utf16_nopad(long long a1, unsigned long long a2, long long a3, long long *a4, _QWORD *a5) { long long v5; // rbx long long v6; // r14 unsigned long long v7; // r12 unsigned long long v8; // r15 int v9; // eax unsigned __int8 v10; // dl long long v11; // rsi unsigned long long v12; // rcx long long v13; // rsi long long v14; // rsi _QWORD *result; // rax long long ( *v16)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+0h] [rbp-50h] unsigned long long v19; // [rsp+18h] [rbp-38h] BYREF unsigned long long *v20; // [rsp+20h] [rbp-30h] v5 = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = a2; v20 = *(unsigned long long **)(a1 + 120); v16 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); v8 = a2 + a3; while ( 1 ) { v9 = v16(a1, &v19, v7, v8); if ( v9 <= 0 ) goto LABEL_9; v10 = v19; v11 = 65533LL; if ( v19 > *v20 ) goto LABEL_7; v12 = v19 >> 8; v13 = *(_QWORD *)(v20[1] + 8 * (v19 >> 8)); if ( v13 ) break; LABEL_8: v14 = v5 ^ ((v6 + (v5 & 0x3F)) * v10 + (v5 << 8)); v5 = v14 ^ (v12 * (v6 + (((unsigned __int8)v5 ^ (unsigned __int8)((v6 + (v5 & 0x3F)) * v10)) & 0x3F) + 3) + (v14 << 8)); v6 += 6LL; v7 += (unsigned int)v9; if ( v7 >= v8 ) goto LABEL_9; } v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v19 + 8); LABEL_7: v19 = v11; v12 = (unsigned int)v11 >> 8; v10 = v11; goto LABEL_8; } LABEL_9: *a4 = v5; result = a5; *a5 = v6; return result; }
my_hash_sort_utf16_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x40],RCX MOV RBX,qword ptr [RCX] MOV qword ptr [RBP + -0x48],R8 MOV R14,qword ptr [R8] TEST RDX,RDX JLE 0x001497f1 MOV R15,RDX MOV R12,RSI MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x50],RAX ADD R15,RSI LAB_0014974a: MOV R13,RDI LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R15 CALL qword ptr [RBP + -0x50] TEST EAX,EAX JLE 0x001497f1 MOV RDX,qword ptr [RBP + -0x38] MOV ESI,0xfffd MOV RCX,qword ptr [RBP + -0x30] CMP RDX,qword ptr [RCX] MOV RDI,R13 JA 0x0014979a MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x8] MOV RCX,RDX SHR RCX,0x8 MOV RSI,qword ptr [RSI + RCX*0x8] TEST RSI,RSI JZ 0x001497a6 MOVZX ECX,DL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RSI + RCX*0x4 + 0x8] LAB_0014979a: MOV qword ptr [RBP + -0x38],RSI MOV ECX,ESI SHR ECX,0x8 MOV RDX,RSI LAB_001497a6: MOV ESI,EBX AND ESI,0x3f ADD RSI,R14 MOVZX EDX,DL IMUL RDX,RSI MOV RSI,RBX SHL RSI,0x8 ADD RSI,RDX XOR RSI,RBX MOV EDX,ESI AND EDX,0x3f ADD RDX,R14 ADD RDX,0x3 IMUL RDX,RCX MOV RBX,RSI SHL RBX,0x8 ADD RBX,RDX XOR RBX,RSI ADD R14,0x6 MOV EAX,EAX ADD R12,RAX CMP R12,R15 JC 0x0014974a LAB_001497f1: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RBX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX],R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_hash_sort_utf16_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { code *pcVar1; long lVar2; uint uVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ulong uVar8; ulong local_40; ulong *local_38; uVar6 = *param_4; lVar7 = *param_5; if (0 < param_3) { local_38 = *(ulong **)(param_1 + 0x78); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar8 = param_3 + param_2; do { uVar3 = (*pcVar1)(param_1,&local_40,param_2,uVar8); if ((int)uVar3 < 1) break; uVar5 = 0xfffd; if (*local_38 < local_40) { LAB_0014979a: uVar4 = uVar5 >> 8; local_40 = uVar5; } else { uVar4 = local_40 >> 8; lVar2 = *(long *)(local_38[1] + uVar4 * 8); if (lVar2 != 0) { uVar5 = (ulong)*(uint *)(lVar2 + 8 + (local_40 & 0xff) * 0xc); goto LAB_0014979a; } } uVar6 = uVar6 * 0x100 + (local_40 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar7) ^ uVar6; uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar7 + 3) * uVar4 ^ uVar6; lVar7 = lVar7 + 6; param_2 = param_2 + uVar3; } while (param_2 < uVar8); } *param_4 = uVar6; *param_5 = lVar7; return; }
28,818
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_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 ulonglong cutoff; register unsigned int cutlim; register ulonglong 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 = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) 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 *= (ulonglong) 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 (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O3
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x44(%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 0xc3c1a movl $0x0, -0x34(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0xc3bea cmpq $0x9, %rcx je 0xc3c02 cmpq $0x20, %rcx je 0xc3c02 jmp 0xc3c4c cmpq $0x2b, %rcx je 0xc3c02 cmpq $0x2d, %rcx jne 0xc3c4c xorl %ecx, %ecx cmpl $0x0, -0x34(%rbp) sete %cl movl %ecx, -0x34(%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 0xc3bd2 movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0xc3c26 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 $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movslq -0x44(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx movq %rcx, -0x60(%rbp) divq %rcx movq %rdx, %rbx movq %rax, -0x58(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0xc3d26 movq %r12, -0x70(%rbp) movl %ebx, %ecx movq %rcx, -0x68(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %edi, %edi movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0xc3cac movq %rax, -0x30(%rbp) jmp 0xc3cd1 leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0xc3cbc addq $-0x37, %rsi jmp 0xc3cca leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0xc3d37 addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x44(%rbp), %eax jge 0xc3d37 movl $0x1, %esi cmpq -0x58(%rbp), %rcx jbe 0xc3ce6 movq %rcx, %r12 jmp 0xc3cff jne 0xc3cf2 movq -0x58(%rbp), %r12 cmpq -0x68(%rbp), %rax ja 0xc3cff imulq -0x60(%rbp), %rcx addq %rcx, %rax movl %edi, %esi movq %rax, %r12 movq %rsi, -0x78(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *-0x70(%rbp) movq -0x78(%rbp), %rsi movq %r12, %rcx movl %esi, %edi testl %eax, %eax jg 0xc3c90 jmp 0xc3d2e xorl %r12d, %r12d movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0xc3d71 movl %esi, %edi movq %r12, %rcx movq -0x40(%rbp), %rax testq %rax, %rax je 0xc3d43 movq %rbx, (%rax) cmpq %r15, %rbx je 0xc3d62 testl %edi, %edi je 0xc3d8c movq -0x50(%rbp), %rax movl $0x22, (%rax) movq $-0x1, %rax jmp 0xc3c3d movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0xc3c3b movq -0x40(%rbp), %rax testq %rax, %rax je 0xc3d7d movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0xc3c3b movq %rcx, %rax negq %rax cmpl $0x0, -0x34(%rbp) cmoveq %rcx, %rax jmp 0xc3c3d
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_40], r8 mov [rbp+var_44], 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_C3C1A mov [rbp+var_34], 0 lea rbx, [rbp+var_30] loc_C3BD2: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_C3BEA cmp rcx, 9 jz short loc_C3C02 cmp rcx, 20h ; ' ' jz short loc_C3C02 jmp short loc_C3C4C loc_C3BEA: cmp rcx, 2Bh ; '+' jz short loc_C3C02 cmp rcx, 2Dh ; '-' jnz short loc_C3C4C xor ecx, ecx cmp [rbp+var_34], 0 setz cl mov [rbp+var_34], ecx loc_C3C02: 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_C3BD2 loc_C3C1A: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_C3C26 mov [rcx], r15 loc_C3C26: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_C3C3B: xor eax, eax loc_C3C3D: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C3C4C: movsxd rcx, [rbp+var_44] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_60], rcx div rcx mov rbx, rdx mov [rbp+var_58], rax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_C3D26 mov [rbp+var_70], r12 mov ecx, ebx mov [rbp+var_68], rcx xor ecx, ecx mov rbx, r15 xor edi, edi loc_C3C90: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_C3CAC mov [rbp+var_30], rax jmp short loc_C3CD1 loc_C3CAC: lea rax, [rsi-41h] cmp rax, 19h ja short loc_C3CBC add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_C3CCA loc_C3CBC: lea rax, [rsi-61h] cmp rax, 19h ja short loc_C3D37 add rsi, 0FFFFFFFFFFFFFFA9h loc_C3CCA: mov [rbp+var_30], rsi mov rax, rsi loc_C3CD1: cmp eax, [rbp+var_44] jge short loc_C3D37 mov esi, 1 cmp rcx, [rbp+var_58] jbe short loc_C3CE6 mov r12, rcx jmp short loc_C3CFF loc_C3CE6: jnz short loc_C3CF2 mov r12, [rbp+var_58] cmp rax, [rbp+var_68] ja short loc_C3CFF loc_C3CF2: imul rcx, [rbp+var_60] add rax, rcx mov esi, edi mov r12, rax loc_C3CFF: mov [rbp+var_78], rsi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call [rbp+var_70] mov rsi, [rbp+var_78] mov rcx, r12 mov edi, esi test eax, eax jg loc_C3C90 jmp short loc_C3D2E loc_C3D26: xor r12d, r12d mov rbx, r15 xor esi, esi loc_C3D2E: test eax, eax jz short loc_C3D71 mov edi, esi mov rcx, r12 loc_C3D37: mov rax, [rbp+var_40] test rax, rax jz short loc_C3D43 mov [rax], rbx loc_C3D43: cmp rbx, r15 jz short loc_C3D62 test edi, edi jz short loc_C3D8C mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov rax, 0FFFFFFFFFFFFFFFFh jmp loc_C3C3D loc_C3D62: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_C3C3B loc_C3D71: mov rax, [rbp+var_40] test rax, rax jz short loc_C3D7D mov [rax], rbx loc_C3D7D: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_C3C3B loc_C3D8C: mov rax, rcx neg rax cmp [rbp+var_34], 0 cmovz rax, rcx jmp loc_C3C3D
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, 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 unsigned long long v14; // rcx long long v15; // rbx int v16; // edi unsigned long long v17; // rax long long v18; // rsi int v19; // esi unsigned long long v20; // r12 long long ( *v21)(long long, _QWORD *, long long, long long); // [rsp+10h] [rbp-70h] unsigned long long v22; // [rsp+28h] [rbp-58h] BOOL v26; // [rsp+4Ch] [rbp-34h] _QWORD v27[6]; // [rsp+50h] [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, v27, 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 ( v27[0] > 42LL ) { if ( v27[0] != 43LL ) { if ( v27[0] != 45LL ) goto LABEL_17; v26 = !v26; } LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v27, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } if ( v27[0] == 9LL || v27[0] == 32LL ) goto LABEL_10; LABEL_17: v22 = 0xFFFFFFFFFFFFFFFFLL / a4; v13 = v8(a1, v27, v6, v9); if ( v13 <= 0 ) { v20 = 0LL; v15 = v6; v19 = 0; LABEL_35: if ( v13 ) { v16 = v19; v14 = v20; goto LABEL_37; } if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } v21 = v8; v14 = 0LL; v15 = v6; v16 = 0; while ( 1 ) { v15 += (unsigned int)v13; v17 = v27[0] - 48LL; if ( (unsigned long long)(v27[0] - 48LL) > 9 ) { if ( (unsigned long long)(v27[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v27[0] - 97LL) > 0x19 ) break; v18 = v27[0] - 87LL; } else { v18 = v27[0] - 55LL; } v27[0] = v18; v17 = v18; } else { v27[0] -= 48LL; } if ( (int)v17 >= a4 ) break; v19 = 1; if ( v14 <= v22 ) { if ( v14 != v22 || (v20 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v19 = v16; v20 = a4 * v14 + v17; } } else { v20 = v14; } v13 = v21(a1, v27, v15, v9); v14 = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } if ( v16 ) { *a6 = 34; return -1LL; } else { result = -(long long)v14; if ( !v26 ) return v14; } return result; }
my_strntoull_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x44],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 0x001c3c1a MOV dword ptr [RBP + -0x34],0x0 LEA RBX,[RBP + -0x30] LAB_001c3bd2: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x001c3bea CMP RCX,0x9 JZ 0x001c3c02 CMP RCX,0x20 JZ 0x001c3c02 JMP 0x001c3c4c LAB_001c3bea: CMP RCX,0x2b JZ 0x001c3c02 CMP RCX,0x2d JNZ 0x001c3c4c XOR ECX,ECX CMP dword ptr [RBP + -0x34],0x0 SETZ CL MOV dword ptr [RBP + -0x34],ECX LAB_001c3c02: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x001c3bd2 LAB_001c3c1a: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x001c3c26 MOV qword ptr [RCX],R15 LAB_001c3c26: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_001c3c3b: XOR EAX,EAX LAB_001c3c3d: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c3c4c: MOVSXD RCX,dword ptr [RBP + -0x44] MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x60],RCX DIV RCX MOV RBX,RDX MOV qword ptr [RBP + -0x58],RAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001c3d26 MOV qword ptr [RBP + -0x70],R12 MOV ECX,EBX MOV qword ptr [RBP + -0x68],RCX XOR ECX,ECX MOV RBX,R15 XOR EDI,EDI LAB_001c3c90: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x001c3cac MOV qword ptr [RBP + -0x30],RAX JMP 0x001c3cd1 LAB_001c3cac: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x001c3cbc ADD RSI,-0x37 JMP 0x001c3cca LAB_001c3cbc: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x001c3d37 ADD RSI,-0x57 LAB_001c3cca: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_001c3cd1: CMP EAX,dword ptr [RBP + -0x44] JGE 0x001c3d37 MOV ESI,0x1 CMP RCX,qword ptr [RBP + -0x58] JBE 0x001c3ce6 MOV R12,RCX JMP 0x001c3cff LAB_001c3ce6: JNZ 0x001c3cf2 MOV R12,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JA 0x001c3cff LAB_001c3cf2: IMUL RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV ESI,EDI MOV R12,RAX LAB_001c3cff: MOV qword ptr [RBP + -0x78],RSI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RCX,R12 MOV EDI,ESI TEST EAX,EAX JG 0x001c3c90 JMP 0x001c3d2e LAB_001c3d26: XOR R12D,R12D MOV RBX,R15 XOR ESI,ESI LAB_001c3d2e: TEST EAX,EAX JZ 0x001c3d71 MOV EDI,ESI MOV RCX,R12 LAB_001c3d37: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001c3d43 MOV qword ptr [RAX],RBX LAB_001c3d43: CMP RBX,R15 JZ 0x001c3d62 TEST EDI,EDI JZ 0x001c3d8c MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV RAX,-0x1 JMP 0x001c3c3d LAB_001c3d62: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x001c3c3b LAB_001c3d71: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001c3d7d MOV qword ptr [RAX],RBX LAB_001c3d7d: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x001c3c3b LAB_001c3d8c: MOV RAX,RCX NEG RAX CMP dword ptr [RBP + -0x34],0x0 CMOVZ RAX,RCX JMP 0x001c3c3d
ulong my_strntoull_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; bool bVar4; bool bVar5; ulong uVar6; bool bVar7; uint uVar8; ulong uVar9; int4 uVar10; ulong uVar11; long lVar12; ulong uVar13; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar8) { bVar4 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_001c3c4c: auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; auVar3 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar9 = SUB168(auVar3 / auVar2,0); uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar12 = param_2; if ((int)uVar8 < 1) { uVar11 = 0; bVar5 = false; goto LAB_001c3d2e; } uVar11 = 0; bVar5 = false; goto LAB_001c3c90; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_001c3c4c; bVar4 = !bVar4; } param_2 = param_2 + (ulong)uVar8; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar8); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar10 = 0x21; if (uVar8 == 0) { uVar10 = 0x54; } *param_6 = uVar10; return 0; while( true ) { if (param_4 <= (int)uVar13) goto LAB_001c3d37; uVar6 = uVar11; bVar7 = true; if ((uVar11 <= uVar9) && ((uVar11 != uVar9 || (uVar6 = uVar9, uVar13 <= (SUB168(auVar3 % auVar2,0) & 0xffffffff))))) { uVar6 = uVar13 + uVar11 * (long)param_4; bVar7 = bVar5; } bVar5 = bVar7; uVar11 = uVar6; local_38 = uVar13; uVar8 = (*pcVar1)(param_1,&local_38,lVar12,param_3); if ((int)uVar8 < 1) break; LAB_001c3c90: lVar12 = (ulong)uVar8 + lVar12; uVar13 = local_38 - 0x30; if (9 < uVar13) { if (local_38 - 0x41 < 0x1a) { uVar13 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_001c3d37; uVar13 = local_38 - 0x57; } } } LAB_001c3d2e: if (uVar8 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar12; } *param_6 = 0x54; } else { LAB_001c3d37: if (param_5 != (long *)0x0) { *param_5 = lVar12; } if (lVar12 != param_2) { if (bVar5) { *param_6 = 0x22; return 0xffffffffffffffff; } if (!bVar4) { return uVar11; } return -uVar11; } *param_6 = 0x21; } return 0; }
28,819
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O2
cpp
common_init(): pushq %rax leaq 0x44f4(%rip), %rdi # 0x593bc xorl %esi, %esi callq 0x240d0 leaq 0xab652(%rip), %rax # 0x100528 cmpl $0x0, (%rax) js 0x54f26 callq 0x9813a leaq 0xaaec9(%rip), %rcx # 0xffdb0 movl (%rcx), %ecx leaq 0xaaec8(%rip), %rdx # 0xffdb8 movq (%rdx), %r8 leaq 0xaaec6(%rip), %rdx # 0xffdc0 movq (%rdx), %r9 leaq 0xaaec4(%rip), %r10 # 0xffdc8 leaq 0x566c8(%rip), %r11 # 0xab5d3 leaq 0x5f287(%rip), %rdx # 0xb4199 pushq $0x2 popq %rsi movq %rax, %rdi xorl %eax, %eax pushq %r11 pushq (%r10) callq 0x981d2 popq %rax popq %rcx popq %rax retq
_Z11common_initv: push rax lea rdi, _ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv; common_init(void)::$_0::__invoke(ggml_log_level,char const*,void *) xor esi, esi call _llama_log_set lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_54F26 call _Z15common_log_mainv; common_log_main(void) lea rcx, LLAMA_BUILD_NUMBER mov ecx, [rcx] lea rdx, LLAMA_COMMIT mov r8, [rdx] lea rdx, LLAMA_COMPILER mov r9, [rdx] lea r10, LLAMA_BUILD_TARGET lea r11, aInfillMode+1Ch; "" lea rdx, aBuildDSWithSFo; "build: %d (%s) with %s for %s%s\n" push 2 pop rsi mov rdi, rax xor eax, eax push r11 push qword ptr [r10] call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) pop rax pop rcx loc_54F26: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> common_init(void) { int v0; // eax llama_log_set(common_init(void)::$_0::__invoke, 0LL); if ( common_log_verbosity_thold >= 0 ) { v0 = common_log_main(); common_log_add( v0, 2, (unsigned int)"build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT[0], LLAMA_COMPILER[0]); } }
common_init: PUSH RAX LEA RDI,[0x1593bc] XOR ESI,ESI CALL 0x001240d0 LEA RAX,[0x200528] CMP dword ptr [RAX],0x0 JS 0x00154f26 CALL 0x0019813a LEA RCX,[0x1ffdb0] MOV ECX,dword ptr [RCX] LEA RDX,[0x1ffdb8] MOV R8,qword ptr [RDX] LEA RDX,[0x1ffdc0] MOV R9,qword ptr [RDX] LEA R10,[0x1ffdc8] LEA R11,[0x1ab5d3] LEA RDX,[0x1b4199] PUSH 0x2 POP RSI MOV RDI,RAX XOR EAX,EAX PUSH R11 PUSH qword ptr [R10] CALL 0x001981d2 POP RAX POP RCX LAB_00154f26: POP RAX RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* common_init() */ int8 common_init(void) { int8 in_RAX; int8 uVar1; llama_log_set(common_init()::$_0::__invoke,0); if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,LLAMA_COMMIT, LLAMA_COMPILER,LLAMA_BUILD_TARGET,""); } return in_RAX; }
28,820
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O3
cpp
common_init(): pushq %rax leaq 0x5e7f(%rip), %rdi # 0x7a22e xorl %esi, %esi callq 0x1c0c0 leaq 0xbb14b(%rip), %rax # 0x12f508 cmpl $0x0, (%rax) js 0x74411 callq 0xcea9f leaq 0xba9c2(%rip), %rcx # 0x12ed90 movl (%rcx), %ecx leaq 0xba9c1(%rip), %rdx # 0x12ed98 movq (%rdx), %r8 leaq 0xba9bf(%rip), %rdx # 0x12eda0 movq (%rdx), %r9 leaq 0xba9bd(%rip), %r10 # 0x12eda8 leaq 0x741e1(%rip), %r11 # 0xe85d3 leaq 0x7cdb0(%rip), %rdx # 0xf11a9 movq %rax, %rdi movl $0x2, %esi xorl %eax, %eax pushq %r11 pushq (%r10) callq 0xceb3c addq $0x10, %rsp popq %rax retq
_Z11common_initv: push rax lea rdi, _ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv; common_init(void)::$_0::__invoke(ggml_log_level,char const*,void *) xor esi, esi call _llama_log_set lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_74411 call _Z15common_log_mainv; common_log_main(void) lea rcx, LLAMA_BUILD_NUMBER mov ecx, [rcx] lea rdx, LLAMA_COMMIT mov r8, [rdx] lea rdx, LLAMA_COMPILER mov r9, [rdx] lea r10, LLAMA_BUILD_TARGET lea r11, aInfillMode+1Ch; "" lea rdx, aBuildDSWithSFo; "build: %d (%s) with %s for %s%s\n" mov rdi, rax mov esi, 2 xor eax, eax push r11 push qword ptr [r10] call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) add rsp, 10h loc_74411: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> common_init(void) { int v0; // eax llama_log_set(common_init(void)::$_0::__invoke, 0LL); if ( common_log_verbosity_thold >= 0 ) { v0 = common_log_main(); common_log_add( v0, 2, (unsigned int)"build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT[0], LLAMA_COMPILER[0]); } }
common_init: PUSH RAX LEA RDI,[0x17a22e] XOR ESI,ESI CALL 0x0011c0c0 LEA RAX,[0x22f508] CMP dword ptr [RAX],0x0 JS 0x00174411 CALL 0x001cea9f LEA RCX,[0x22ed90] MOV ECX,dword ptr [RCX] LEA RDX,[0x22ed98] MOV R8,qword ptr [RDX] LEA RDX,[0x22eda0] MOV R9,qword ptr [RDX] LEA R10,[0x22eda8] LEA R11,[0x1e85d3] LEA RDX,[0x1f11a9] MOV RDI,RAX MOV ESI,0x2 XOR EAX,EAX PUSH R11 PUSH qword ptr [R10] CALL 0x001ceb3c ADD RSP,0x10 LAB_00174411: POP RAX RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* common_init() */ int8 common_init(void) { int8 in_RAX; int8 uVar1; llama_log_set(common_init()::$_0::__invoke,0); if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,LLAMA_COMMIT, LLAMA_COMPILER,LLAMA_BUILD_TARGET,""); } return in_RAX; }
28,821
link_into_queue
eloqsql/mysys/mf_keycache.c
static void link_into_queue(KEYCACHE_WQUEUE *wqueue, struct st_my_thread_var *thread) { struct st_my_thread_var *last; DBUG_ASSERT(!thread->next && !thread->prev); if (! (last= wqueue->last_thread)) { /* Queue is empty */ thread->next= thread; thread->prev= &thread->next; } else { DBUG_ASSERT(last->next->prev == &last->next); /* Add backlink to previous element */ thread->prev= last->next->prev; /* Fix first in list to point backwords to current */ last->next->prev= &thread->next; /* Next should point to the first element in list */ thread->next= last->next; /* Fix old element to point to new one */ last->next= thread; } wqueue->last_thread= thread; }
O0
c
link_into_queue: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe485e movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xe4896 movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx addq $0x88, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) jmp 0xe48f9 jmp 0xe4898 jmp 0xe489a movq -0x18(%rbp), %rax movq 0x88(%rax), %rax movq 0x90(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) movq -0x10(%rbp), %rcx addq $0x88, %rcx movq -0x18(%rbp), %rax movq 0x88(%rax), %rax movq %rcx, 0x90(%rax) movq -0x18(%rbp), %rax movq 0x88(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
link_into_queue: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E485E: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax cmp rax, 0 jnz short loc_E4896 mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+88h], rcx mov rcx, [rbp+var_10] add rcx, 88h mov rax, [rbp+var_10] mov [rax+90h], rcx jmp short loc_E48F9 loc_E4896: jmp short $+2 loc_E4898: jmp short $+2 loc_E489A: mov rax, [rbp+var_18] mov rax, [rax+88h] mov rcx, [rax+90h] mov rax, [rbp+var_10] mov [rax+90h], rcx mov rcx, [rbp+var_10] add rcx, 88h mov rax, [rbp+var_18] mov rax, [rax+88h] mov [rax+90h], rcx mov rax, [rbp+var_18] mov rcx, [rax+88h] mov rax, [rbp+var_10] mov [rax+88h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_18] mov [rax+88h], rcx loc_E48F9: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx pop rbp retn
_QWORD * link_into_queue(_QWORD *a1, long long a2) { _QWORD *result; // rax long long v3; // [rsp+0h] [rbp-18h] v3 = *a1; if ( *a1 ) { *(_QWORD *)(a2 + 144) = *(_QWORD *)(*(_QWORD *)(v3 + 136) + 144LL); *(_QWORD *)(*(_QWORD *)(v3 + 136) + 144LL) = a2 + 136; *(_QWORD *)(a2 + 136) = *(_QWORD *)(v3 + 136); *(_QWORD *)(v3 + 136) = a2; } else { *(_QWORD *)(a2 + 136) = a2; *(_QWORD *)(a2 + 144) = a2 + 136; } result = a1; *a1 = a2; return result; }
link_into_queue: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e485e LAB_001e485e: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001e4896 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x88 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX JMP 0x001e48f9 LAB_001e4896: JMP 0x001e4898 LAB_001e4898: JMP 0x001e489a LAB_001e489a: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x88] MOV RCX,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x88 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x88],RCX LAB_001e48f9: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX POP RBP RET
void link_into_queue(long *param_1,long param_2) { long lVar1; lVar1 = *param_1; if (lVar1 == 0) { *(long *)(param_2 + 0x88) = param_2; *(long *)(param_2 + 0x90) = param_2 + 0x88; } else { *(int8 *)(param_2 + 0x90) = *(int8 *)(*(long *)(lVar1 + 0x88) + 0x90); *(long *)(*(long *)(lVar1 + 0x88) + 0x90) = param_2 + 0x88; *(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88); *(long *)(lVar1 + 0x88) = param_2; } *param_1 = param_2; return; }
28,822
my_uca_alloc_contractions
eloqsql/strings/ctype-uca.c
static my_bool my_uca_alloc_contractions(MY_CONTRACTIONS *contractions, MY_CHARSET_LOADER *loader, size_t n) { size_t size= n * sizeof(MY_CONTRACTION); if (!(contractions->item= (loader->once_alloc)(size)) || !(contractions->flags= (char *) (loader->once_alloc)(MY_UCA_CNT_FLAG_SIZE))) return 1; memset(contractions->item, 0, size); memset(contractions->flags, 0, MY_UCA_CNT_FLAG_SIZE); return 0; }
O0
c
my_uca_alloc_contractions: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) imulq $0x58, -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movq -0x28(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax je 0x56cc9 movq -0x18(%rbp), %rax movl $0x1000, %edi # imm = 0x1000 callq *0x80(%rax) movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x56ccf movb $0x1, -0x1(%rbp) jmp 0x56cfa movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x24180 movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi xorl %esi, %esi movl $0x1000, %edx # imm = 0x1000 callq 0x24180 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_alloc_contractions: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx imul rax, [rbp+var_20], 58h ; 'X' mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax+80h] mov rdi, [rbp+var_28] call rax mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jz short loc_56CC9 mov rax, [rbp+var_18] mov edi, 1000h call qword ptr [rax+80h] mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_56CCF loc_56CC9: mov [rbp+var_1], 1 jmp short loc_56CFA loc_56CCF: mov rax, [rbp+var_10] mov rdi, [rax+8] mov rdx, [rbp+var_28] xor esi, esi call _memset mov rax, [rbp+var_10] mov rdi, [rax+10h] xor esi, esi mov edx, 1000h call _memset mov [rbp+var_1], 0 loc_56CFA: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_alloc_contractions(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax long long v6; // [rsp+8h] [rbp-28h] v6 = 88 * a3; v3 = (*(long long ( **)(long long))(a2 + 128))(88 * a3); *(_QWORD *)(a1 + 8) = v3; if ( !v3 ) return 1; v4 = (*(long long ( **)(long long))(a2 + 128))(4096LL); *(_QWORD *)(a1 + 16) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(a1 + 8), 0LL, v6); memset(*(_QWORD *)(a1 + 16), 0LL, 4096LL); return 0; }
my_uca_alloc_contractions: 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 IMUL RAX,qword ptr [RBP + -0x20],0x58 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x28] CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JZ 0x00156cc9 MOV RAX,qword ptr [RBP + -0x18] MOV EDI,0x1000 CALL qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x00156ccf LAB_00156cc9: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00156cfa LAB_00156ccf: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] XOR ESI,ESI MOV EDX,0x1000 CALL 0x00124180 MOV byte ptr [RBP + -0x1],0x0 LAB_00156cfa: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_alloc_contractions(long param_1,long param_2,long param_3) { long lVar1; lVar1 = (**(code **)(param_2 + 0x80))(param_3 * 0x58); *(long *)(param_1 + 8) = lVar1; if (lVar1 != 0) { lVar1 = (**(code **)(param_2 + 0x80))(0x1000); *(long *)(param_1 + 0x10) = lVar1; if (lVar1 != 0) { memset(*(void **)(param_1 + 8),0,param_3 * 0x58); memset(*(void **)(param_1 + 0x10),0,0x1000); return 0; } } return 1; }
28,823
unlink_deleted_block
eloqsql/storage/myisam/mi_dynrec.c
static my_bool unlink_deleted_block(MI_INFO *info, MI_BLOCK_INFO *block_info) { DBUG_ENTER("unlink_deleted_block"); if (block_info->filepos == info->s->state.dellink) { /* First deleted block; We can just use this ! */ info->s->state.dellink=block_info->next_filepos; } else { MI_BLOCK_INFO tmp; tmp.second_read=0; /* Unlink block from the previous block */ if (!(_mi_get_block_info(&tmp,info->dfile,block_info->prev_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+4,block_info->next_filepos); if (info->s->file_write(info, tmp.header+4,8, block_info->prev_filepos+4, MYF(MY_NABP))) DBUG_RETURN(1); /* Unlink block from next block */ if (block_info->next_filepos != HA_OFFSET_ERROR) { if (!(_mi_get_block_info(&tmp,info->dfile,block_info->next_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+12,block_info->prev_filepos); if (info->s->file_write(info, tmp.header+12,8, block_info->next_filepos+12, MYF(MY_NABP))) DBUG_RETURN(1); } } /* We now have one less deleted block */ info->state->del--; info->state->empty-= block_info->block_len; info->s->state.split--; /* If this was a block that we where accessing through table scan (mi_rrnd() or mi_scan(), then ensure that we skip over this block when doing next mi_rrnd() or mi_scan(). */ if (info->nextpos == block_info->filepos) info->nextpos+=block_info->block_len; DBUG_RETURN(0); }
O3
c
unlink_deleted_block: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq 0x38(%rsi), %rcx movq (%rdi), %rax cmpq 0x58(%rax), %rcx jne 0x78f9f movq 0x40(%r14), %rcx movq %rcx, 0x58(%rax) movq 0x8(%rbx), %rax decq 0x8(%rax) movq 0x28(%r14), %rax movq 0x8(%rbx), %rcx subq %rax, 0x10(%rcx) movq (%rbx), %rax decq 0x50(%rax) movq 0x178(%rbx), %rax cmpq 0x38(%r14), %rax jne 0x78f9b addq 0x28(%r14), %rax movq %rax, 0x178(%rbx) xorl %eax, %eax jmp 0x78ff1 leaq -0x70(%rbp), %rdi movl $0x0, 0x50(%rdi) movl 0x1c0(%rbx), %esi movq 0x48(%r14), %rdx callq 0x78b5f testb $0x4, %al je 0x78fef movq 0x40(%r14), %rax leaq -0x6c(%rbp), %rsi bswapq %rax movq %rax, (%rsi) movq (%rbx), %rax movq 0x48(%r14), %rcx addq $0x4, %rcx movl $0x8, %edx movl $0x4, %r8d movq %rbx, %rdi callq *0x2e8(%rax) testq %rax, %rax je 0x79009 movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x79061 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x40(%r14), %rdx cmpq $-0x1, %rdx je 0x78f68 movl 0x1c0(%rbx), %esi leaq -0x70(%rbp), %rdi callq 0x78b5f testb $0x4, %al je 0x78fef movq 0x48(%r14), %rax leaq -0x64(%rbp), %rsi bswapq %rax movq %rax, (%rsi) movq (%rbx), %rax movq 0x40(%r14), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d movq %rbx, %rdi callq *0x2e8(%rax) testq %rax, %rax jne 0x78fef jmp 0x78f68 callq 0x29260
unlink_deleted_block_0: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax mov rcx, [rsi+38h] mov rax, [rdi] cmp rcx, [rax+58h] jnz short loc_78F9F mov rcx, [r14+40h] mov [rax+58h], rcx loc_78F68: mov rax, [rbx+8] dec qword ptr [rax+8] mov rax, [r14+28h] mov rcx, [rbx+8] sub [rcx+10h], rax mov rax, [rbx] dec qword ptr [rax+50h] mov rax, [rbx+178h] cmp rax, [r14+38h] jnz short loc_78F9B add rax, [r14+28h] mov [rbx+178h], rax loc_78F9B: xor eax, eax jmp short loc_78FF1 loc_78F9F: lea rdi, [rbp+var_70] mov dword ptr [rdi+50h], 0 mov esi, [rbx+1C0h] mov rdx, [r14+48h] call _mi_get_block_info test al, 4 jz short loc_78FEF mov rax, [r14+40h] lea rsi, [rbp+var_6C] bswap rax mov [rsi], rax mov rax, [rbx] mov rcx, [r14+48h] add rcx, 4 mov edx, 8 mov r8d, 4 mov rdi, rbx call qword ptr [rax+2E8h] test rax, rax jz short loc_79009 loc_78FEF: mov al, 1 loc_78FF1: mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_79061 add rsp, 60h pop rbx pop r14 pop rbp retn loc_79009: mov rdx, [r14+40h] cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_78F68 mov esi, [rbx+1C0h] lea rdi, [rbp+var_70] call _mi_get_block_info test al, 4 jz short loc_78FEF mov rax, [r14+48h] lea rsi, [rbp+var_64] bswap rax mov [rsi], rax mov rax, [rbx] mov rcx, [r14+40h] add rcx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, rbx call qword ptr [rax+2E8h] test rax, rax jnz short loc_78FEF jmp loc_78F68 loc_79061: call ___stack_chk_fail
char unlink_deleted_block_0(_QWORD *a1, _QWORD *a2) { long long v2; // rax long long v4; // rdx _BYTE v5[4]; // [rsp+0h] [rbp-70h] BYREF unsigned long long v6; // [rsp+4h] [rbp-6Ch] BYREF unsigned long long v7[8]; // [rsp+Ch] [rbp-64h] BYREF int v8; // [rsp+50h] [rbp-20h] unsigned long long v9; // [rsp+58h] [rbp-18h] v9 = __readfsqword(0x28u); if ( a2[7] == *(_QWORD *)(*a1 + 88LL) ) { *(_QWORD *)(*a1 + 88LL) = a2[8]; } else { v8 = 0; if ( (mi_get_block_info((long long)v5, *((unsigned int *)a1 + 112), a2[9]) & 4) == 0 ) return 1; v6 = _byteswap_uint64(a2[8]); if ( (*(long long ( **)(_QWORD *, unsigned long long *, long long, long long, long long))(*a1 + 744LL))( a1, &v6, 8LL, a2[9] + 4LL, 4LL) ) { return 1; } v4 = a2[8]; if ( v4 != -1 ) { if ( (mi_get_block_info((long long)v5, *((unsigned int *)a1 + 112), v4) & 4) == 0 ) return 1; v7[0] = _byteswap_uint64(a2[9]); if ( (*(long long ( **)(_QWORD *, unsigned long long *, long long, long long, long long))(*a1 + 744LL))( a1, v7, 8LL, a2[8] + 12LL, 4LL) ) { return 1; } } } --*(_QWORD *)(a1[1] + 8LL); *(_QWORD *)(a1[1] + 16LL) -= a2[5]; --*(_QWORD *)(*a1 + 80LL); v2 = a1[47]; if ( v2 == a2[7] ) a1[47] = a2[5] + v2; return 0; }
unlink_deleted_block: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RSI + 0x38] MOV RAX,qword ptr [RDI] CMP RCX,qword ptr [RAX + 0x58] JNZ 0x00178f9f MOV RCX,qword ptr [R14 + 0x40] MOV qword ptr [RAX + 0x58],RCX LAB_00178f68: MOV RAX,qword ptr [RBX + 0x8] DEC qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x28] MOV RCX,qword ptr [RBX + 0x8] SUB qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBX] DEC qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBX + 0x178] CMP RAX,qword ptr [R14 + 0x38] JNZ 0x00178f9b ADD RAX,qword ptr [R14 + 0x28] MOV qword ptr [RBX + 0x178],RAX LAB_00178f9b: XOR EAX,EAX JMP 0x00178ff1 LAB_00178f9f: LEA RDI,[RBP + -0x70] MOV dword ptr [RDI + 0x50],0x0 MOV ESI,dword ptr [RBX + 0x1c0] MOV RDX,qword ptr [R14 + 0x48] CALL 0x00178b5f TEST AL,0x4 JZ 0x00178fef MOV RAX,qword ptr [R14 + 0x40] LEA RSI,[RBP + -0x6c] BSWAP RAX MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [R14 + 0x48] ADD RCX,0x4 MOV EDX,0x8 MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x2e8] TEST RAX,RAX JZ 0x00179009 LAB_00178fef: MOV AL,0x1 LAB_00178ff1: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x00179061 ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_00179009: MOV RDX,qword ptr [R14 + 0x40] CMP RDX,-0x1 JZ 0x00178f68 MOV ESI,dword ptr [RBX + 0x1c0] LEA RDI,[RBP + -0x70] CALL 0x00178b5f TEST AL,0x4 JZ 0x00178fef MOV RAX,qword ptr [R14 + 0x48] LEA RSI,[RBP + -0x64] BSWAP RAX MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [R14 + 0x40] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x2e8] TEST RAX,RAX JNZ 0x00178fef JMP 0x00178f68 LAB_00179061: CALL 0x00129260
int8 unlink_deleted_block(long *param_1,long param_2) { ulong uVar1; long lVar2; int8 uVar3; long in_FS_OFFSET; int1 local_78 [4]; ulong local_74; ulong local_6c [8]; int4 local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_2 + 0x38) == *(long *)(*param_1 + 0x58)) { *(int8 *)(*param_1 + 0x58) = *(int8 *)(param_2 + 0x40); goto LAB_00178f68; } local_28 = 0; uVar1 = _mi_get_block_info(local_78,(int)param_1[0x38],*(int8 *)(param_2 + 0x48)); if ((uVar1 & 4) != 0) { uVar1 = *(ulong *)(param_2 + 0x40); local_74 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38; lVar2 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_74,8,*(long *)(param_2 + 0x48) + 4,4); if (lVar2 == 0) { if (*(long *)(param_2 + 0x40) == -1) { LAB_00178f68: *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - *(long *)(param_2 + 0x28); *(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + -1; if (param_1[0x2f] == *(long *)(param_2 + 0x38)) { param_1[0x2f] = param_1[0x2f] + *(long *)(param_2 + 0x28); } uVar3 = 0; goto LAB_00178ff1; } uVar1 = _mi_get_block_info(local_78,(int)param_1[0x38]); if ((uVar1 & 4) != 0) { uVar1 = *(ulong *)(param_2 + 0x48); local_6c[0] = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38; lVar2 = (**(code **)(*param_1 + 0x2e8)) (param_1,local_6c,8,*(long *)(param_2 + 0x40) + 0xc,4); if (lVar2 == 0) goto LAB_00178f68; } } } uVar3 = 1; LAB_00178ff1: if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar3; }
28,824
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O0
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x3310e movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0x35ecef(%rip), %rax # 0x391e10 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0x362cd0(%rip), %rdi # 0x395e10 callq 0x38320 cmpb $0x0, %al je 0x33181 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi movq -0x8(%rbp), %rax movq 0x18(%rax), %rdx leaq 0x362cb0(%rip), %rdi # 0x395e10 callq 0x37f30 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
add_compiled_extra_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_3310E: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_33181 mov rax, [rbp+var_8] mov rsi, [rax+10h] mov rax, [rbp+var_8] mov rdx, [rax+18h] lea rdi, charset_name_hash call my_hash_search mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx loc_33181: add rsp, 10h pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] all_charsets[*a1] = a1; a1[3] |= 0x200u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); result = (long long)a1; *((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16); *((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0013310e LAB_0013310e: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0x491e10] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x495e10] CALL 0x00138320 CMP AL,0x0 JZ 0x00133181 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x18] LEA RDI,[0x495e10] CALL 0x00137f30 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_00133181: ADD RSP,0x10 POP RBP RET
void add_compiled_extra_collation(uint *param_1) { char cVar1; long lVar2; (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; cVar1 = my_hash_insert(charset_name_hash,param_1); if (cVar1 != '\0') { lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); *(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10); *(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18); } return; }
28,825
js_method_set_home_object
bluesky950520[P]quickjs/quickjs.c
static void js_method_set_home_object(JSContext *ctx, JSValue func_obj, JSValue home_obj) { JSObject *p, *p1; JSFunctionBytecode *b; if (JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT) return; p = JS_VALUE_GET_OBJ(func_obj); if (!js_class_has_bytecode(p->class_id)) return; b = p->u.func.function_bytecode; if (b->need_home_object) { p1 = p->u.func.home_object; if (p1) { JS_FreeValue(ctx, JS_MKPTR(JS_TAG_OBJECT, p1)); } if (JS_VALUE_GET_TAG(home_obj) == JS_TAG_OBJECT) p1 = JS_VALUE_GET_OBJ(js_dup(home_obj)); else p1 = NULL; p->u.func.home_object = p1; } }
O0
c
js_method_set_home_object: subq $0x68, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rcx, 0x48(%rsp) movq %r8, 0x50(%rsp) movq %rdi, 0x40(%rsp) movq 0x60(%rsp), %rax cmpl $-0x1, %eax je 0x6f19c jmp 0x6f268 movq 0x58(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movzwl 0x6(%rax), %edi callq 0x50530 cmpl $0x0, %eax jne 0x6f1be jmp 0x6f268 movq 0x38(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movw 0x18(%rax), %ax shrw $0x4, %ax andw $0x1, %ax cmpb $0x0, %al je 0x6f268 movq 0x38(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) je 0x6f222 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rax movq %rax, 0x18(%rsp) movq $-0x1, 0x20(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x29f80 movq 0x50(%rsp), %rax cmpl $-0x1, %eax jne 0x6f251 movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x279c0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x6f25a movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x40(%rax) addq $0x68, %rsp retq nopl (%rax)
js_method_set_home_object: sub rsp, 68h mov [rsp+68h+var_10], rsi mov [rsp+68h+var_8], rdx mov [rsp+68h+var_20], rcx mov [rsp+68h+var_18], r8 mov [rsp+68h+var_28], rdi mov rax, [rsp+68h+var_8] cmp eax, 0FFFFFFFFh jz short loc_6F19C jmp loc_6F268 loc_6F19C: mov rax, [rsp+68h+var_10] mov [rsp+68h+var_30], rax mov rax, [rsp+68h+var_30] movzx edi, word ptr [rax+6] call js_class_has_bytecode cmp eax, 0 jnz short loc_6F1BE jmp loc_6F268 loc_6F1BE: mov rax, [rsp+68h+var_30] mov rax, [rax+30h] mov [rsp+68h+var_40], rax mov rax, [rsp+68h+var_40] mov ax, [rax+18h] shr ax, 4 and ax, 1 cmp al, 0 jz loc_6F268 mov rax, [rsp+68h+var_30] mov rax, [rax+40h] mov [rsp+68h+var_38], rax cmp [rsp+68h+var_38], 0 jz short loc_6F222 mov rdi, [rsp+68h+var_28] mov rax, [rsp+68h+var_38] mov [rsp+68h+var_50], rax mov [rsp+68h+var_48], 0FFFFFFFFFFFFFFFFh mov rsi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_48] call JS_FreeValue loc_6F222: mov rax, [rsp+68h+var_18] cmp eax, 0FFFFFFFFh jnz short loc_6F251 mov rdi, [rsp+68h+var_20] mov rsi, [rsp+68h+var_18] call js_dup mov [rsp+68h+var_60], rax mov [rsp+68h+var_58], rdx mov rax, [rsp+68h+var_60] mov [rsp+68h+var_38], rax jmp short loc_6F25A loc_6F251: mov [rsp+68h+var_38], 0 loc_6F25A: mov rcx, [rsp+68h+var_38] mov rax, [rsp+68h+var_30] mov [rax+40h], rcx loc_6F268: add rsp, 68h retn
__int16 js_method_set_home_object(long long a1, long long a2, int a3, _DWORD *a4, int a5) { BOOL has_bytecode; // eax long long v7; // [rsp+28h] [rbp-40h] long long v8; // [rsp+30h] [rbp-38h] _DWORD *v9; // [rsp+30h] [rbp-38h] LOWORD(has_bytecode) = a3; if ( a3 == -1 ) { has_bytecode = js_class_has_bytecode(*(unsigned __int16 *)(a2 + 6)); if ( has_bytecode ) { v7 = *(_QWORD *)(a2 + 48); LOWORD(has_bytecode) = (*(_WORD *)(v7 + 24) >> 4) & 1; if ( (*(_WORD *)(v7 + 24) & 0x10) != 0 ) { v8 = *(_QWORD *)(a2 + 64); if ( v8 ) JS_FreeValue(a1, v8, -1LL); if ( a5 == -1 ) v9 = js_dup(a4, 0xFFFFFFFF); else v9 = 0LL; LOWORD(has_bytecode) = a2; *(_QWORD *)(a2 + 64) = v9; } } } return has_bytecode; }
js_method_set_home_object: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x50],R8 MOV qword ptr [RSP + 0x40],RDI MOV RAX,qword ptr [RSP + 0x60] CMP EAX,-0x1 JZ 0x0016f19c JMP 0x0016f268 LAB_0016f19c: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOVZX EDI,word ptr [RAX + 0x6] CALL 0x00150530 CMP EAX,0x0 JNZ 0x0016f1be JMP 0x0016f268 LAB_0016f1be: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] MOV AX,word ptr [RAX + 0x18] SHR AX,0x4 AND AX,0x1 CMP AL,0x0 JZ 0x0016f268 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JZ 0x0016f222 MOV RDI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],-0x1 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00129f80 LAB_0016f222: MOV RAX,qword ptr [RSP + 0x50] CMP EAX,-0x1 JNZ 0x0016f251 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x001279c0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x30],RAX JMP 0x0016f25a LAB_0016f251: MOV qword ptr [RSP + 0x30],0x0 LAB_0016f25a: MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x40],RCX LAB_0016f268: ADD RSP,0x68 RET
void js_method_set_home_object (int8 param_1,long param_2,int param_3,int8 param_4,int8 param_5) { int iVar1; int8 local_38; if (((param_3 == -1) && (iVar1 = js_class_has_bytecode(*(int2 *)(param_2 + 6)), iVar1 != 0)) && ((*(ushort *)(*(long *)(param_2 + 0x30) + 0x18) >> 4 & 1) != 0)) { if (*(long *)(param_2 + 0x40) != 0) { JS_FreeValue(param_1,*(long *)(param_2 + 0x40),0xffffffffffffffff); } if ((int)param_5 == -1) { local_38 = js_dup(param_4,param_5); } else { local_38 = 0; } *(int8 *)(param_2 + 0x40) = local_38; } return; }
28,826
js_method_set_home_object
bluesky950520[P]quickjs/quickjs.c
static void js_method_set_home_object(JSContext *ctx, JSValue func_obj, JSValue home_obj) { JSObject *p, *p1; JSFunctionBytecode *b; if (JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT) return; p = JS_VALUE_GET_OBJ(func_obj); if (!js_class_has_bytecode(p->class_id)) return; b = p->u.func.function_bytecode; if (b->need_home_object) { p1 = p->u.func.home_object; if (p1) { JS_FreeValue(ctx, JS_MKPTR(JS_TAG_OBJECT, p1)); } if (JS_VALUE_GET_TAG(home_obj) == JS_TAG_OBJECT) p1 = JS_VALUE_GET_OBJ(js_dup(home_obj)); else p1 = NULL; p->u.func.home_object = p1; } }
O2
c
js_method_set_home_object: cmpl $-0x1, %edx jne 0x3bc13 pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movzwl 0x6(%rsi), %eax cmpq $0x38, %rax ja 0x3bc0e movq %rcx, %rbx movabsq $0x110000000012000, %rcx # imm = 0x110000000012000 btq %rax, %rcx jae 0x3bc0e movq 0x30(%r14), %rax testb $0x10, 0x18(%rax) je 0x3bc0e movq %r8, %r15 movq 0x40(%r14), %rsi testq %rsi, %rsi je 0x3bbfe pushq $-0x1 popq %rdx callq 0x1bbce cmpl $-0x1, %r15d jne 0x3bc08 incl (%rbx) jmp 0x3bc0a xorl %ebx, %ebx movq %rbx, 0x40(%r14) popq %rbx popq %r14 popq %r15 retq
js_method_set_home_object: cmp edx, 0FFFFFFFFh jnz short locret_3BC13 push r15 push r14 push rbx mov r14, rsi movzx eax, word ptr [rsi+6] cmp rax, 38h ; '8' ja short loc_3BC0E mov rbx, rcx mov rcx, 110000000012000h bt rcx, rax jnb short loc_3BC0E mov rax, [r14+30h] test byte ptr [rax+18h], 10h jz short loc_3BC0E mov r15, r8 mov rsi, [r14+40h] test rsi, rsi jz short loc_3BBFE push 0FFFFFFFFFFFFFFFFh pop rdx call JS_FreeValue loc_3BBFE: cmp r15d, 0FFFFFFFFh jnz short loc_3BC08 inc dword ptr [rbx] jmp short loc_3BC0A loc_3BC08: xor ebx, ebx loc_3BC0A: mov [r14+40h], rbx loc_3BC0E: pop rbx pop r14 pop r15 locret_3BC13: retn
void js_method_set_home_object(long long a1, long long a2, int a3, _DWORD *a4, int a5) { unsigned long long v6; // rax long long v8; // rcx long long v10; // rsi if ( a3 == -1 ) { v6 = *(unsigned __int16 *)(a2 + 6); if ( v6 <= 0x38 ) { v8 = 0x110000000012000LL; if ( _bittest64(&v8, v6) ) { if ( (*(_BYTE *)(*(_QWORD *)(a2 + 48) + 24LL) & 0x10) != 0 ) { v10 = *(_QWORD *)(a2 + 64); if ( v10 ) JS_FreeValue(a1, v10, -1LL); if ( a5 == -1 ) ++*a4; else a4 = 0LL; *(_QWORD *)(a2 + 64) = a4; } } } } }
js_method_set_home_object: CMP EDX,-0x1 JNZ 0x0013bc13 PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOVZX EAX,word ptr [RSI + 0x6] CMP RAX,0x38 JA 0x0013bc0e MOV RBX,RCX MOV RCX,0x110000000012000 BT RCX,RAX JNC 0x0013bc0e MOV RAX,qword ptr [R14 + 0x30] TEST byte ptr [RAX + 0x18],0x10 JZ 0x0013bc0e MOV R15,R8 MOV RSI,qword ptr [R14 + 0x40] TEST RSI,RSI JZ 0x0013bbfe PUSH -0x1 POP RDX CALL 0x0011bbce LAB_0013bbfe: CMP R15D,-0x1 JNZ 0x0013bc08 INC dword ptr [RBX] JMP 0x0013bc0a LAB_0013bc08: XOR EBX,EBX LAB_0013bc0a: MOV qword ptr [R14 + 0x40],RBX LAB_0013bc0e: POP RBX POP R14 POP R15 LAB_0013bc13: RET
void js_method_set_home_object(int8 param_1,long param_2,int param_3,int *param_4,int param_5) { if ((((param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x39)) && ((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) && ((*(byte *)(*(long *)(param_2 + 0x30) + 0x18) & 0x10) != 0)) { if (*(long *)(param_2 + 0x40) != 0) { JS_FreeValue(param_1,*(long *)(param_2 + 0x40),0xffffffffffffffff); } if (param_5 == -1) { *param_4 = *param_4 + 1; } else { param_4 = (int *)0x0; } *(int **)(param_2 + 0x40) = param_4; } return; }
28,827
my_like_range_win1250ch
eloqsql/strings/ctype-win1250ch.c
static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length) { int only_min_found= 1; const char *end = ptr + ptr_length; char *min_org = min_str; char *min_end = min_str + res_length; /* return 1; */ for (; ptr != end && min_str != min_end ; ptr++) { if (*ptr == escape && ptr+1 != end) ptr++; /* Skip escape */ else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */ break; *min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)]; if (*min_str != min_sort_char) only_min_found= 0; min_str++; *max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)]; } if (cs->state & MY_CS_BINSORT) *min_length= (size_t) (min_str - min_org); else { /* 'a\0\0... is the smallest possible string */ *min_length= res_length; } /* a\ff\ff... is the biggest possible string */ *max_length= res_length; while (min_str != min_end) { *min_str++ = min_sort_char; *max_str++ = max_sort_char; } return (only_min_found); }
O0
c
my_like_range_win1250ch: pushq %rbp movq %rsp, %rbp movl %r8d, -0x50(%rbp) movl %ecx, %eax movl -0x50(%rbp), %ecx movl %eax, -0x4c(%rbp) movq %rdx, %rax movl -0x4c(%rbp), %edx movq %rax, -0x48(%rbp) movq %rsi, %rax movq -0x48(%rbp), %rsi movq %rax, -0x40(%rbp) movq %rdi, %r8 movq -0x40(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x8(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %dl, -0x19(%rbp) movb %cl, -0x1a(%rbp) movb %al, -0x1b(%rbp) movl $0x1, -0x20(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x51(%rbp) je 0xa06ec movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al testb $0x1, %al jne 0xa06f8 jmp 0xa07b6 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x19(%rbp), %ecx cmpl %ecx, %eax jne 0xa0723 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x28(%rbp), %rax je 0xa0723 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xa0745 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1a(%rbp), %ecx cmpl %ecx, %eax je 0xa0741 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1b(%rbp), %ecx cmpl %ecx, %eax jne 0xa0743 jmp 0xa07b6 jmp 0xa0745 movq -0x10(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movl %eax, %ecx leaq 0x14b5d9(%rip), %rax # 0x1ebd30 movb (%rax,%rcx), %cl movq 0x18(%rbp), %rax movb %cl, (%rax) movq 0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax je 0xa0773 movl $0x0, -0x20(%rbp) movq 0x18(%rbp), %rax addq $0x1, %rax movq %rax, 0x18(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movl %eax, %ecx leaq 0x32a3cf(%rip), %rax # 0x3cab60 movb (%rax,%rcx), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xa06cf movq -0x8(%rbp), %rax movl 0xc(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xa07d9 movq 0x18(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xa07e4 movq 0x10(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax je 0xa081f movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $-0x1, (%rax) jmp 0xa07ef movl -0x20(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax) nop
my_like_range_win1250ch: push rbp mov rbp, rsp mov [rbp+var_50], r8d mov eax, ecx mov ecx, [rbp+var_50] mov [rbp+var_4C], eax mov rax, rdx mov edx, [rbp+var_4C] mov [rbp+var_48], rax mov rax, rsi mov rsi, [rbp+var_48] mov [rbp+var_40], rax mov r8, rdi mov rdi, [rbp+var_40] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_8], r8 mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], dl mov [rbp+var_1A], cl mov [rbp+var_1B], al mov [rbp+var_20], 1 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+arg_8] mov [rbp+var_30], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_38], rax loc_A06CF: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_51], al jz short loc_A06EC mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] setnz al mov [rbp+var_51], al loc_A06EC: mov al, [rbp+var_51] test al, 1 jnz short loc_A06F8 jmp loc_A07B6 loc_A06F8: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_19] cmp eax, ecx jnz short loc_A0723 mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_28] jz short loc_A0723 mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_A0745 loc_A0723: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1A] cmp eax, ecx jz short loc_A0741 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1B] cmp eax, ecx jnz short loc_A0743 loc_A0741: jmp short loc_A07B6 loc_A0743: jmp short $+2 loc_A0745: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] mov eax, eax mov ecx, eax lea rax, like_range_prefix_min_win1250ch mov cl, [rax+rcx] mov rax, [rbp+arg_8] mov [rax], cl mov rax, [rbp+arg_8] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_A0773 mov [rbp+var_20], 0 loc_A0773: mov rax, [rbp+arg_8] add rax, 1 mov [rbp+arg_8], rax mov rax, [rbp+var_10] movzx eax, byte ptr [rax] mov eax, eax mov ecx, eax lea rax, like_range_prefix_max_win1250ch mov cl, [rax+rcx] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_A06CF loc_A07B6: mov rax, [rbp+var_8] mov eax, [rax+0Ch] and eax, 10h cmp eax, 0 jz short loc_A07D9 mov rcx, [rbp+arg_8] mov rax, [rbp+var_30] sub rcx, rax mov rax, [rbp+arg_18] mov [rax], rcx jmp short loc_A07E4 loc_A07D9: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_18] mov [rax], rcx loc_A07E4: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_A07EF: mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] jz short loc_A081F mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 0FFh jmp short loc_A07EF loc_A081F: mov eax, [rbp+var_20] pop rbp retn
long long my_like_range_win1250ch( long long a1, unsigned __int8 *a2, long long a3, char a4, char a5, char a6, long long a7, _BYTE *a8, _BYTE *a9, _QWORD *a10, _QWORD *a11) { _BYTE *v11; // rax _BYTE *v12; // rax _BYTE *v13; // rax bool v15; // [rsp+1h] [rbp-51h] _BYTE *v16; // [rsp+1Ah] [rbp-38h] _BYTE *v17; // [rsp+22h] [rbp-30h] char *v18; // [rsp+2Ah] [rbp-28h] unsigned int v19; // [rsp+32h] [rbp-20h] unsigned __int8 *v20; // [rsp+42h] [rbp-10h] v20 = a2; v19 = 1; v18 = (char *)&a2[a3]; v17 = a8; v16 = &a8[a7]; while ( 1 ) { v15 = 0; if ( v20 != (unsigned __int8 *)v18 ) v15 = a8 != v16; if ( !v15 ) break; if ( (char)*v20 != a4 || v20 + 1 == (unsigned __int8 *)v18 ) { if ( (char)*v20 == a5 || (char)*v20 == a6 ) break; } else { ++v20; } *a8 = like_range_prefix_min_win1250ch[*v20]; if ( *a8 != 32 ) v19 = 0; ++a8; v11 = a9++; *v11 = like_range_prefix_max_win1250ch[*v20++]; } if ( (*(_DWORD *)(a1 + 12) & 0x10) != 0 ) *a10 = a8 - v17; else *a10 = a7; *a11 = a7; while ( a8 != v16 ) { v12 = a8++; *v12 = 32; v13 = a9++; *v13 = -1; } return v19; }
my_like_range_win1250ch: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x50],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x4c] MOV qword ptr [RBP + -0x48],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x40] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],DL MOV byte ptr [RBP + -0x1a],CL MOV byte ptr [RBP + -0x1b],AL MOV dword ptr [RBP + -0x20],0x1 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX LAB_001a06cf: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x51],AL JZ 0x001a06ec MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_001a06ec: MOV AL,byte ptr [RBP + -0x51] TEST AL,0x1 JNZ 0x001a06f8 JMP 0x001a07b6 LAB_001a06f8: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x19] CMP EAX,ECX JNZ 0x001a0723 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x28] JZ 0x001a0723 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001a0745 LAB_001a0723: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1a] CMP EAX,ECX JZ 0x001a0741 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1b] CMP EAX,ECX JNZ 0x001a0743 LAB_001a0741: JMP 0x001a07b6 LAB_001a0743: JMP 0x001a0745 LAB_001a0745: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x2ebd30] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + 0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001a0773 MOV dword ptr [RBP + -0x20],0x0 LAB_001a0773: MOV RAX,qword ptr [RBP + 0x18] ADD RAX,0x1 MOV qword ptr [RBP + 0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x4cab60] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001a06cf LAB_001a07b6: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x10 CMP EAX,0x0 JZ 0x001a07d9 MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x30] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX JMP 0x001a07e4 LAB_001a07d9: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_001a07e4: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_001a07ef: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] JZ 0x001a081f MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0xff JMP 0x001a07ef LAB_001a081f: MOV EAX,dword ptr [RBP + -0x20] POP RBP RET
int4 my_like_range_win1250ch (long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6, long param_7,char *param_8,int1 *param_9,long *param_10,long *param_11) { char *pcVar1; char *pcVar2; int4 local_28; byte *local_18; pcVar1 = param_8; local_28 = 1; pcVar2 = param_8 + param_7; for (local_18 = param_2; local_18 != param_2 + param_3 && param_8 != pcVar2; local_18 = local_18 + 1) { if ((*local_18 == param_4) && (local_18 + 1 != param_2 + param_3)) { local_18 = local_18 + 1; } else if ((*local_18 == param_5) || (*local_18 == param_6)) break; *param_8 = like_range_prefix_min_win1250ch[*local_18]; if (*param_8 != ' ') { local_28 = 0; } param_8 = param_8 + 1; *param_9 = like_range_prefix_max_win1250ch[*local_18]; param_9 = param_9 + 1; } if ((*(uint *)(param_1 + 0xc) & 0x10) == 0) { *param_10 = param_7; } else { *param_10 = (long)param_8 - (long)pcVar1; } *param_11 = param_7; while (param_8 != pcVar2) { *param_8 = ' '; *param_9 = 0xff; param_8 = param_8 + 1; param_9 = param_9 + 1; } return local_28; }
28,828
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
llama.cpp/common/common.cpp
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } int seq_count = 0; for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { seq_count++; } } putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]); } printf("\n=== Done dumping\n"); }
O3
cpp
common_kv_cache_dump_view(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x20e0c(%rip), %rdi # 0xd1272 xorl %eax, %eax callq 0x1c090 cmpl $0x0, (%r14) jle 0xb04e3 movq 0x20(%r14), %r12 movl $0x3e, %r13d leaq 0x2127c(%rip), %r15 # 0xd1700 xorl %ebp, %ebp movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0xb049f leaq 0x20e66(%rip), %rdi # 0xd12fc movl %ebp, %esi xorl %eax, %eax callq 0x1c090 movslq 0x4(%r14), %rcx testq %rcx, %rcx jle 0xb04c1 xorl %edx, %edx xorl %eax, %eax movl (%r12,%rdx,4), %esi notl %esi shrl $0x1f, %esi addl %esi, %eax incq %rdx cmpq %rdx, %rcx jne 0xb04ac jmp 0xb04c3 xorl %eax, %eax cmpl $0x3e, %eax cmovael %r13d, %eax movsbl (%rax,%r15), %edi callq 0x1cd50 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 cmpl (%r14), %ebp jl 0xb0486 leaq 0x211f7(%rip), %rdi # 0xd16e1 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1cbf0
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+38h+var_38], eax lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"... xor eax, eax call _printf cmp dword ptr [r14], 0 jle short loc_B04E3 mov r12, [r14+20h] mov r13d, 3Eh ; '>' lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_B0486: mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_B049F lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_B049F: movsxd rcx, dword ptr [r14+4] test rcx, rcx jle short loc_B04C1 xor edx, edx xor eax, eax loc_B04AC: mov esi, [r12+rdx*4] not esi shr esi, 1Fh add eax, esi inc rdx cmp rcx, rdx jnz short loc_B04AC jmp short loc_B04C3 loc_B04C1: xor eax, eax loc_B04C3: cmp eax, 3Eh ; '>' cmovnb eax, r13d movsx edi, byte ptr [rax+r15] call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r12, [r12+rax*4] cmp ebp, [r14] jl short loc_B0486 loc_B04E3: lea rdi, aDoneDumping; "\n=== Done dumping" add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _puts
long long common_kv_cache_dump_view(long long a1, int a2) { long long v2; // r12 int v3; // ebp long long v4; // rcx long long v5; // rdx long long v6; // rax printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); if ( *(int *)a1 > 0 ) { v2 = *(_QWORD *)(a1 + 32); v3 = 0; do { if ( !(v3 % a2) ) printf("\n%5d: ", v3); v4 = *(int *)(a1 + 4); if ( v4 <= 0 ) { v6 = 0LL; } else { v5 = 0LL; LODWORD(v6) = 0; do v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6; while ( v4 != v5 ); } if ( (unsigned int)v6 >= 0x3E ) v6 = 62LL; putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]); ++v3; v2 += 4LL * *(int *)(a1 + 4); } while ( v3 < *(_DWORD *)a1 ); } return puts("\n=== Done dumping"); }
common_kv_cache_dump_view: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1d1272] XOR EAX,EAX CALL 0x0011c090 CMP dword ptr [R14],0x0 JLE 0x001b04e3 MOV R12,qword ptr [R14 + 0x20] MOV R13D,0x3e LEA R15,[0x1d1700] XOR EBP,EBP LAB_001b0486: MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x001b049f LEA RDI,[0x1d12fc] MOV ESI,EBP XOR EAX,EAX CALL 0x0011c090 LAB_001b049f: MOVSXD RCX,dword ptr [R14 + 0x4] TEST RCX,RCX JLE 0x001b04c1 XOR EDX,EDX XOR EAX,EAX LAB_001b04ac: MOV ESI,dword ptr [R12 + RDX*0x4] NOT ESI SHR ESI,0x1f ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x001b04ac JMP 0x001b04c3 LAB_001b04c1: XOR EAX,EAX LAB_001b04c3: CMP EAX,0x3e CMOVNC EAX,R13D MOVSX EDI,byte ptr [RAX + R15*0x1] CALL 0x0011cd50 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x001b0486 LAB_001b04e3: LEA RDI,[0x1d16e1] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011cbf0
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2) { uint uVar1; int8 in_RAX; ulong uVar2; long lVar3; uint uVar4; long lVar5; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14))); if (0 < *(int *)param_1) { lVar5 = *(long *)(param_1 + 0x20); uVar4 = 0; do { if ((int)uVar4 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar4); } if ((long)*(int *)(param_1 + 4) < 1) { uVar1 = 0; } else { lVar3 = 0; uVar1 = 0; do { uVar1 = uVar1 - ((int)~*(uint *)(lVar5 + lVar3 * 4) >> 0x1f); lVar3 = lVar3 + 1; } while (*(int *)(param_1 + 4) != lVar3); } uVar2 = (ulong)uVar1; if (0x3d < uVar1) { uVar2 = 0x3e; } putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar2]); uVar4 = uVar4 + 1; lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4; } while ((int)uVar4 < *(int *)param_1); } puts("\n=== Done dumping"); return; }
28,829
inline_mysql_cond_signal
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_signal( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(signal_cond)(that->m_psi); #endif result= pthread_cond_signal(&that->m_cond); return result; }
O0
c
inline_mysql_cond_signal: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x336cb leaq 0x1aa201(%rip), %rax # 0x1dd8b8 movq (%rax), %rax movq 0x170(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x24030 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_signal_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_336CB lea rax, PSI_server mov rax, [rax] mov rax, [rax+170h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_336CB: mov rdi, [rbp+var_8] call _pthread_cond_signal mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_signal_0(long long a1) { if ( *(_QWORD *)(a1 + 48) ) (*((void ( **)(_QWORD))PSI_server[0] + 46))(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_signal(a1); }
inline_mysql_cond_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001336cb LEA RAX,[0x2dd8b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x170] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_001336cb: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124030 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_signal(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(param_1[1].__align); } iVar1 = pthread_cond_signal(param_1); return iVar1; }
28,830
test_bug10729
eloqsql/libmariadb/unittest/libmariadb/cursor.c
static int test_bug10729(MYSQL *mysql) { MYSQL_STMT *stmt; MYSQL_BIND my_bind[1]; char a[21]; int rc; const char *stmt_text; int i= 0; const char *name_array[3]= { "aaa", "bbb", "ccc" }; ulong type; mysql_query(mysql, "drop table if exists t1"); mysql_query(mysql, "create table t1 (id integer not null primary key," "name VARCHAR(20) NOT NULL)"); rc= mysql_query(mysql, "insert into t1 (id, name) values " "(1, 'aaa'), (2, 'bbb'), (3, 'ccc')"); check_mysql_rc(rc, mysql); stmt= mysql_stmt_init(mysql); FAIL_IF(!stmt, mysql_error(mysql)); type= (ulong) CURSOR_TYPE_READ_ONLY; rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type); check_stmt_rc(rc, stmt); stmt_text= "select name from t1"; rc= mysql_stmt_prepare(stmt, SL(stmt_text)); check_stmt_rc(rc, stmt); memset(my_bind, '\0', sizeof(my_bind)); my_bind[0].buffer_type= MYSQL_TYPE_STRING; my_bind[0].buffer= (void*) a; my_bind[0].buffer_length= sizeof(a); mysql_stmt_bind_result(stmt, my_bind); for (i= 0; i < 3; i++) { int row_no= 0; rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); while ((rc= mysql_stmt_fetch(stmt)) == 0) { FAIL_UNLESS(strcmp(a, name_array[row_no]) == 0, "a != name_array[row_no]"); ++row_no; } FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); } rc= mysql_stmt_close(stmt); rc= mysql_query(mysql, "drop table t1"); check_mysql_rc(rc, mysql); return OK; }
O0
c
test_bug10729: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x30(%rbp) movl $0x0, -0xc4(%rbp) movq 0x4b4b3(%rip), %rax # 0x60f70 movq %rax, -0xe0(%rbp) movq 0x4b4ad(%rip), %rax # 0x60f78 movq %rax, -0xd8(%rbp) movq 0x4b4a7(%rip), %rax # 0x60f80 movq %rax, -0xd0(%rbp) movq -0x30(%rbp), %rdi leaq 0x3e22b(%rip), %rsi # 0x53d16 callq 0x26160 movq -0x30(%rbp), %rdi leaq 0x3e233(%rip), %rsi # 0x53d2e callq 0x26160 movq -0x30(%rbp), %rdi leaq 0x3e26f(%rip), %rsi # 0x53d7a callq 0x26160 movl %eax, -0xb4(%rbp) cmpl $0x0, -0xb4(%rbp) je 0x15b7a movl -0xb4(%rbp), %eax movl %eax, -0xfc(%rbp) movq -0x30(%rbp), %rdi callq 0x29ae0 movq %rax, -0xf8(%rbp) movq -0x30(%rbp), %rdi callq 0x29ab0 movl -0xfc(%rbp), %esi movq -0xf8(%rbp), %rdx movl %eax, %ecx leaq 0x3d743(%rip), %rdi # 0x5329d leaq 0x3db83(%rip), %r8 # 0x536e4 movl $0x15c, %r9d # imm = 0x15C movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15b7c movq -0x30(%rbp), %rdi callq 0x32040 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x15bc2 movq -0x30(%rbp), %rdi callq 0x29ae0 movq %rax, %rsi leaq 0x3d5b5(%rip), %rdi # 0x53158 leaq 0x3db3a(%rip), %rdx # 0x536e4 movl $0x15f, %ecx # imm = 0x15F movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15bc4 movq $0x1, -0xe8(%rbp) movq -0x38(%rbp), %rdi movl $0x1, %esi leaq -0xe8(%rbp), %rdx callq 0x30220 movsbl %al, %eax movl %eax, -0xb4(%rbp) cmpl $0x0, -0xb4(%rbp) je 0x15c28 movq -0x38(%rbp), %rdi callq 0x316c0 movq %rax, %rsi leaq 0x3d54f(%rip), %rdi # 0x53158 leaq 0x3dad4(%rip), %rdx # 0x536e4 movl $0x163, %ecx # imm = 0x163 movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15c2a leaq 0x3e18d(%rip), %rax # 0x53dbe movq %rax, -0xc0(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x110(%rbp) movq -0xc0(%rbp), %rax movq %rax, -0x108(%rbp) movq -0xc0(%rbp), %rdi callq 0x131a0 movq -0x110(%rbp), %rdi movq -0x108(%rbp), %rsi movq %rax, %rdx callq 0x32760 movl %eax, -0xb4(%rbp) cmpl $0x0, -0xb4(%rbp) je 0x15cb4 movq -0x38(%rbp), %rdi callq 0x316c0 movq %rax, %rsi leaq 0x3d4c3(%rip), %rdi # 0x53158 leaq 0x3da48(%rip), %rdx # 0x536e4 movl $0x166, %ecx # imm = 0x166 movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15cb6 leaq -0xb0(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x13250 movl $0xfe, -0x50(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0xa0(%rbp) movq $0x15, -0x70(%rbp) movq -0x38(%rbp), %rdi leaq -0xb0(%rbp), %rsi callq 0x31030 movl $0x0, -0xc4(%rbp) cmpl $0x3, -0xc4(%rbp) jge 0x15e25 movl $0x0, -0xec(%rbp) movq -0x38(%rbp), %rdi callq 0x33c70 movl %eax, -0xb4(%rbp) cmpl $0x0, -0xb4(%rbp) je 0x15d5e movq -0x38(%rbp), %rdi callq 0x316c0 movq %rax, %rsi leaq 0x3d419(%rip), %rdi # 0x53158 leaq 0x3d99e(%rip), %rdx # 0x536e4 movl $0x172, %ecx # imm = 0x172 movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15d60 jmp 0x15d62 movq -0x38(%rbp), %rdi callq 0x31710 movl %eax, -0xb4(%rbp) cmpl $0x0, %eax jne 0x15dd5 jmp 0x15d78 leaq -0x20(%rbp), %rdi movslq -0xec(%rbp), %rax movq -0xe0(%rbp,%rax,8), %rsi callq 0x135f0 cmpl $0x0, %eax je 0x15dc2 leaq 0x3d3bc(%rip), %rdi # 0x53158 leaq 0x3e02f(%rip), %rsi # 0x53dd2 leaq 0x3d93a(%rip), %rdx # 0x536e4 movl $0x175, %ecx # imm = 0x175 movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15dc4 movl -0xec(%rbp), %eax addl $0x1, %eax movl %eax, -0xec(%rbp) jmp 0x15d62 jmp 0x15dd7 cmpl $0x64, -0xb4(%rbp) je 0x15e0d leaq 0x3d371(%rip), %rdi # 0x53158 leaq 0x3dffc(%rip), %rsi # 0x53dea leaq 0x3d8ef(%rip), %rdx # 0x536e4 movl $0x178, %ecx # imm = 0x178 movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15e0f jmp 0x15e11 movl -0xc4(%rbp), %eax addl $0x1, %eax movl %eax, -0xc4(%rbp) jmp 0x15cfd movq -0x38(%rbp), %rdi callq 0x315a0 movsbl %al, %eax movl %eax, -0xb4(%rbp) movq -0x30(%rbp), %rdi leaq 0x3dfbc(%rip), %rsi # 0x53dfe callq 0x26160 movl %eax, -0xb4(%rbp) cmpl $0x0, -0xb4(%rbp) je 0x15eae movl -0xb4(%rbp), %eax movl %eax, -0x11c(%rbp) movq -0x30(%rbp), %rdi callq 0x29ae0 movq %rax, -0x118(%rbp) movq -0x30(%rbp), %rdi callq 0x29ab0 movl -0x11c(%rbp), %esi movq -0x118(%rbp), %rdx movl %eax, %ecx leaq 0x3d40c(%rip), %rdi # 0x5329d leaq 0x3d84c(%rip), %r8 # 0x536e4 movl $0x17d, %r9d # imm = 0x17D movb $0x0, %al callq 0x1d330 movl $0x1, -0x24(%rbp) jmp 0x15eb7 jmp 0x15eb0 movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x120(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x15ee1 movl -0x120(%rbp), %eax addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x134b0 nopw %cs:(%rax,%rax)
test_bug10729: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_30], rdi mov [rbp+var_C4], 0 mov rax, cs:off_60F70; "aaa" mov [rbp+var_E0], rax mov rax, cs:off_60F78; "bbb" mov [rbp+var_D8], rax mov rax, cs:off_60F80; "ccc" mov [rbp+var_D0], rax mov rdi, [rbp+var_30] lea rsi, aDropTableIfExi; "drop table if exists t1" call mysql_query mov rdi, [rbp+var_30] lea rsi, aCreateTableT1I; "create table t1 (id integer not null pr"... call mysql_query mov rdi, [rbp+var_30] lea rsi, aInsertIntoT1Id; "insert into t1 (id, name) values (1, 'a"... call mysql_query mov [rbp+var_B4], eax cmp [rbp+var_B4], 0 jz short loc_15B7A mov eax, [rbp+var_B4] mov [rbp+var_FC], eax mov rdi, [rbp+var_30] call mysql_error mov [rbp+var_F8], rax mov rdi, [rbp+var_30] call mysql_errno mov esi, [rbp+var_FC] mov rdx, [rbp+var_F8] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 15Ch mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15B7A: jmp short $+2 loc_15B7C: mov rdi, [rbp+var_30] call mysql_stmt_init mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_15BC2 mov rdi, [rbp+var_30] call mysql_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 15Fh mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15BC2: jmp short $+2 loc_15BC4: mov [rbp+var_E8], 1 mov rdi, [rbp+var_38] mov esi, 1 lea rdx, [rbp+var_E8] call mysql_stmt_attr_set movsx eax, al mov [rbp+var_B4], eax cmp [rbp+var_B4], 0 jz short loc_15C28 mov rdi, [rbp+var_38] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 163h mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15C28: jmp short $+2 loc_15C2A: lea rax, aSelectNameFrom; "select name from t1" mov [rbp+var_C0], rax mov rax, [rbp+var_38] mov [rbp+var_110], rax mov rax, [rbp+var_C0] mov [rbp+var_108], rax mov rdi, [rbp+var_C0] call _strlen mov rdi, [rbp+var_110] mov rsi, [rbp+var_108] mov rdx, rax call mysql_stmt_prepare mov [rbp+var_B4], eax cmp [rbp+var_B4], 0 jz short loc_15CB4 mov rdi, [rbp+var_38] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 166h mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15CB4: jmp short $+2 loc_15CB6: lea rdi, [rbp+var_B0] xor esi, esi mov edx, 70h ; 'p' call _memset mov [rbp+var_50], 0FEh lea rax, [rbp+var_20] mov [rbp+var_A0], rax mov [rbp+var_70], 15h mov rdi, [rbp+var_38] lea rsi, [rbp+var_B0] call mysql_stmt_bind_result mov [rbp+var_C4], 0 loc_15CFD: cmp [rbp+var_C4], 3 jge loc_15E25 mov [rbp+var_EC], 0 mov rdi, [rbp+var_38] call mysql_stmt_execute mov [rbp+var_B4], eax cmp [rbp+var_B4], 0 jz short loc_15D5E mov rdi, [rbp+var_38] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 172h mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15D5E: jmp short $+2 loc_15D60: jmp short $+2 loc_15D62: mov rdi, [rbp+var_38] call mysql_stmt_fetch mov [rbp+var_B4], eax cmp eax, 0 jnz short loc_15DD5 jmp short $+2 loc_15D78: lea rdi, [rbp+var_20] movsxd rax, [rbp+var_EC] mov rsi, [rbp+rax*8+var_E0] call _strcmp cmp eax, 0 jz short loc_15DC2 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aANameArrayRowN; "a != name_array[row_no]" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 175h mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15DC2: jmp short $+2 loc_15DC4: mov eax, [rbp+var_EC] add eax, 1 mov [rbp+var_EC], eax jmp short loc_15D62 loc_15DD5: jmp short $+2 loc_15DD7: cmp [rbp+var_B4], 64h ; 'd' jz short loc_15E0D lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aRcMysqlNoData; "rc != MYSQL_NO_DATA" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 178h mov al, 0 call diag mov [rbp+var_24], 1 jmp loc_15EB7 loc_15E0D: jmp short $+2 loc_15E0F: jmp short $+2 loc_15E11: mov eax, [rbp+var_C4] add eax, 1 mov [rbp+var_C4], eax jmp loc_15CFD loc_15E25: mov rdi, [rbp+var_38] call mysql_stmt_close movsx eax, al mov [rbp+var_B4], eax mov rdi, [rbp+var_30] lea rsi, aDropTableT1; "drop table t1" call mysql_query mov [rbp+var_B4], eax cmp [rbp+var_B4], 0 jz short loc_15EAE mov eax, [rbp+var_B4] mov [rbp+var_11C], eax mov rdi, [rbp+var_30] call mysql_error mov [rbp+var_118], rax mov rdi, [rbp+var_30] call mysql_errno mov esi, [rbp+var_11C] mov rdx, [rbp+var_118] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 17Dh mov al, 0 call diag mov [rbp+var_24], 1 jmp short loc_15EB7 loc_15EAE: jmp short $+2 loc_15EB0: mov [rbp+var_24], 0 loc_15EB7: mov eax, [rbp+var_24] mov [rbp+var_120], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_15EE1 mov eax, [rbp+var_120] add rsp, 120h pop rbp retn loc_15EE1: call ___stack_chk_fail
long long test_bug10729(long long a1) { int v1; // eax int v2; // eax int v3; // r8d int v4; // r9d char v5; // al int v6; // eax int v7; // r8d int v8; // r9d long long v9; // rax int v10; // eax int v11; // r8d int v12; // r9d int v13; // eax int v14; // r8d int v15; // r9d int v16; // r8d int v17; // r9d int v18; // r8d int v19; // r9d int v20; // eax int v22; // [rsp+4h] [rbp-11Ch] int v23; // [rsp+8h] [rbp-118h] long long v24; // [rsp+10h] [rbp-110h] int v25; // [rsp+28h] [rbp-F8h] int v26; // [rsp+34h] [rbp-ECh] long long v27; // [rsp+38h] [rbp-E8h] BYREF _QWORD v28[3]; // [rsp+40h] [rbp-E0h] int i; // [rsp+5Ch] [rbp-C4h] const char *v30; // [rsp+60h] [rbp-C0h] int v31; // [rsp+6Ch] [rbp-B4h] _BYTE v32[16]; // [rsp+70h] [rbp-B0h] BYREF _BYTE *v33; // [rsp+80h] [rbp-A0h] long long v34; // [rsp+B0h] [rbp-70h] int v35; // [rsp+D0h] [rbp-50h] long long v36; // [rsp+E8h] [rbp-38h] long long v37; // [rsp+F0h] [rbp-30h] _BYTE v39[24]; // [rsp+100h] [rbp-20h] BYREF unsigned long long v40; // [rsp+118h] [rbp-8h] v40 = __readfsqword(0x28u); v37 = a1; i = 0; v28[0] = "aaa"; v28[1] = "bbb"; v28[2] = "ccc"; mysql_query(a1, "drop table if exists t1"); mysql_query(a1, "create table t1 (id integer not null primary key,name VARCHAR(20) NOT NULL)"); v31 = mysql_query(a1, "insert into t1 (id, name) values (1, 'aaa'), (2, 'bbb'), (3, 'ccc')"); if ( v31 ) { v25 = mysql_error(v37); v1 = mysql_errno(v37); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v31, v25, v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 348); return 1; } else { v36 = mysql_stmt_init(v37); if ( v36 ) { v27 = 1LL; v5 = mysql_stmt_attr_set(v36, 1LL, &v27); v31 = v5; if ( v5 ) { v6 = mysql_stmt_error(v36); diag( (unsigned int)"Error: %s (%s: %d)", v6, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 355, v7, v8); return 1; } else { v30 = "select name from t1"; v24 = v36; v9 = strlen("select name from t1"); v31 = mysql_stmt_prepare(v24, "select name from t1", v9); if ( v31 ) { v10 = mysql_stmt_error(v36); diag( (unsigned int)"Error: %s (%s: %d)", v10, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 358, v11, v12); return 1; } else { memset(v32, 0LL, 112LL); v35 = 254; v33 = v39; v34 = 21LL; mysql_stmt_bind_result(v36, v32); for ( i = 0; i < 3; ++i ) { v26 = 0; v31 = mysql_stmt_execute(v36); if ( v31 ) { v13 = mysql_stmt_error(v36); diag( (unsigned int)"Error: %s (%s: %d)", v13, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 370, v14, v15); return 1; } while ( 1 ) { v31 = mysql_stmt_fetch(v36); if ( v31 ) break; if ( (unsigned int)strcmp(v39, v28[v26]) ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"a != name_array[row_no]", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 373, v18, v19); return 1; } ++v26; } if ( v31 != 100 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"rc != MYSQL_NO_DATA", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 376, v16, v17); return 1; } } v31 = (char)mysql_stmt_close(v36); v31 = mysql_query(v37, "drop table t1"); if ( v31 ) { v22 = v31; v23 = mysql_error(v37); v20 = mysql_errno(v37); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v22, v23, v20, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 381); return 1; } else { return 0; } } } } else { v2 = mysql_error(v37); diag( (unsigned int)"Error: %s (%s: %d)", v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 351, v3, v4); return 1; } } }
test_bug10729: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x30],RDI MOV dword ptr [RBP + -0xc4],0x0 MOV RAX,qword ptr [0x00160f70] MOV qword ptr [RBP + -0xe0],RAX MOV RAX,qword ptr [0x00160f78] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [0x00160f80] MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x153d16] CALL 0x00126160 MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x153d2e] CALL 0x00126160 MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x153d7a] CALL 0x00126160 MOV dword ptr [RBP + -0xb4],EAX CMP dword ptr [RBP + -0xb4],0x0 JZ 0x00115b7a MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xfc],EAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00129ae0 MOV qword ptr [RBP + -0xf8],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00129ab0 MOV ESI,dword ptr [RBP + -0xfc] MOV RDX,qword ptr [RBP + -0xf8] MOV ECX,EAX LEA RDI,[0x15329d] LEA R8,[0x1536e4] MOV R9D,0x15c MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115b7a: JMP 0x00115b7c LAB_00115b7c: MOV RDI,qword ptr [RBP + -0x30] CALL 0x00132040 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00115bc2 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00129ae0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x15f MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115bc2: JMP 0x00115bc4 LAB_00115bc4: MOV qword ptr [RBP + -0xe8],0x1 MOV RDI,qword ptr [RBP + -0x38] MOV ESI,0x1 LEA RDX,[RBP + -0xe8] CALL 0x00130220 MOVSX EAX,AL MOV dword ptr [RBP + -0xb4],EAX CMP dword ptr [RBP + -0xb4],0x0 JZ 0x00115c28 MOV RDI,qword ptr [RBP + -0x38] CALL 0x001316c0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x163 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115c28: JMP 0x00115c2a LAB_00115c2a: LEA RAX,[0x153dbe] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x110],RAX MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x108],RAX MOV RDI,qword ptr [RBP + -0xc0] CALL 0x001131a0 MOV RDI,qword ptr [RBP + -0x110] MOV RSI,qword ptr [RBP + -0x108] MOV RDX,RAX CALL 0x00132760 MOV dword ptr [RBP + -0xb4],EAX CMP dword ptr [RBP + -0xb4],0x0 JZ 0x00115cb4 MOV RDI,qword ptr [RBP + -0x38] CALL 0x001316c0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x166 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115cb4: JMP 0x00115cb6 LAB_00115cb6: LEA RDI,[RBP + -0xb0] XOR ESI,ESI MOV EDX,0x70 CALL 0x00113250 MOV dword ptr [RBP + -0x50],0xfe LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0xa0],RAX MOV qword ptr [RBP + -0x70],0x15 MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0xb0] CALL 0x00131030 MOV dword ptr [RBP + -0xc4],0x0 LAB_00115cfd: CMP dword ptr [RBP + -0xc4],0x3 JGE 0x00115e25 MOV dword ptr [RBP + -0xec],0x0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00133c70 MOV dword ptr [RBP + -0xb4],EAX CMP dword ptr [RBP + -0xb4],0x0 JZ 0x00115d5e MOV RDI,qword ptr [RBP + -0x38] CALL 0x001316c0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x172 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115d5e: JMP 0x00115d60 LAB_00115d60: JMP 0x00115d62 LAB_00115d62: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00131710 MOV dword ptr [RBP + -0xb4],EAX CMP EAX,0x0 JNZ 0x00115dd5 JMP 0x00115d78 LAB_00115d78: LEA RDI,[RBP + -0x20] MOVSXD RAX,dword ptr [RBP + -0xec] MOV RSI,qword ptr [RBP + RAX*0x8 + -0xe0] CALL 0x001135f0 CMP EAX,0x0 JZ 0x00115dc2 LEA RDI,[0x153158] LEA RSI,[0x153dd2] LEA RDX,[0x1536e4] MOV ECX,0x175 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115dc2: JMP 0x00115dc4 LAB_00115dc4: MOV EAX,dword ptr [RBP + -0xec] ADD EAX,0x1 MOV dword ptr [RBP + -0xec],EAX JMP 0x00115d62 LAB_00115dd5: JMP 0x00115dd7 LAB_00115dd7: CMP dword ptr [RBP + -0xb4],0x64 JZ 0x00115e0d LEA RDI,[0x153158] LEA RSI,[0x153dea] LEA RDX,[0x1536e4] MOV ECX,0x178 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115e0d: JMP 0x00115e0f LAB_00115e0f: JMP 0x00115e11 LAB_00115e11: MOV EAX,dword ptr [RBP + -0xc4] ADD EAX,0x1 MOV dword ptr [RBP + -0xc4],EAX JMP 0x00115cfd LAB_00115e25: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001315a0 MOVSX EAX,AL MOV dword ptr [RBP + -0xb4],EAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x153dfe] CALL 0x00126160 MOV dword ptr [RBP + -0xb4],EAX CMP dword ptr [RBP + -0xb4],0x0 JZ 0x00115eae MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0x11c],EAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00129ae0 MOV qword ptr [RBP + -0x118],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00129ab0 MOV ESI,dword ptr [RBP + -0x11c] MOV RDX,qword ptr [RBP + -0x118] MOV ECX,EAX LEA RDI,[0x15329d] LEA R8,[0x1536e4] MOV R9D,0x17d MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x24],0x1 JMP 0x00115eb7 LAB_00115eae: JMP 0x00115eb0 LAB_00115eb0: MOV dword ptr [RBP + -0x24],0x0 LAB_00115eb7: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x120],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00115ee1 MOV EAX,dword ptr [RBP + -0x120] ADD RSP,0x120 POP RBP RET LAB_00115ee1: CALL 0x001134b0
int4 test_bug10729(int8 param_1) { long lVar1; char cVar2; int iVar3; int4 uVar4; int8 uVar5; size_t sVar6; long in_FS_OFFSET; int local_f4; int8 local_f0; int *local_e8 [3]; int local_cc; char *local_c8; int local_bc; int1 local_b8 [16]; char *local_a8; int8 local_78; int4 local_58; long local_40; int8 local_38; int4 local_2c; char local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_cc = 0; local_e8[0] = PTR_DAT_00160f70; local_e8[1] = PTR_DAT_00160f78; local_e8[2] = PTR_DAT_00160f80; local_38 = param_1; mysql_query(param_1,"drop table if exists t1"); mysql_query(local_38,"create table t1 (id integer not null primary key,name VARCHAR(20) NOT NULL)" ); iVar3 = mysql_query(local_38, "insert into t1 (id, name) values (1, \'aaa\'), (2, \'bbb\'), (3, \'ccc\')"); local_bc = iVar3; if (iVar3 == 0) { local_40 = mysql_stmt_init(local_38); if (local_40 == 0) { uVar5 = mysql_error(local_38); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",0x15f) ; local_2c = 1; } else { local_f0 = 1; cVar2 = mysql_stmt_attr_set(local_40,1,&local_f0); lVar1 = local_40; local_bc = (int)cVar2; if (local_bc == 0) { local_c8 = "select name from t1"; sVar6 = strlen("select name from t1"); local_bc = mysql_stmt_prepare(lVar1,"select name from t1",sVar6); if (local_bc == 0) { memset(local_b8,0,0x70); local_58 = 0xfe; local_a8 = local_28; local_78 = 0x15; mysql_stmt_bind_result(local_40,local_b8); for (local_cc = 0; local_cc < 3; local_cc = local_cc + 1) { local_f4 = 0; local_bc = mysql_stmt_execute(local_40); if (local_bc != 0) { uVar5 = mysql_stmt_error(local_40); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c" ,0x172); local_2c = 1; goto LAB_00115eb7; } local_bc = 0; while( true ) { local_bc = mysql_stmt_fetch(local_40); if (local_bc != 0) break; iVar3 = strcmp(local_28,local_e8[local_f4]); if (iVar3 != 0) { diag("Error: %s (%s: %d)","a != name_array[row_no]", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c" ,0x175); local_2c = 1; goto LAB_00115eb7; } local_f4 = local_f4 + 1; } if (local_bc != 100) { diag("Error: %s (%s: %d)","rc != MYSQL_NO_DATA", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c" ,0x178); local_2c = 1; goto LAB_00115eb7; } } cVar2 = mysql_stmt_close(local_40); local_bc = (int)cVar2; iVar3 = mysql_query(local_38,"drop table t1"); local_bc = iVar3; if (iVar3 == 0) { local_2c = 0; } else { uVar5 = mysql_error(local_38); uVar4 = mysql_errno(local_38); diag("Error (%d): %s (%d) in %s line %d",iVar3,uVar5,uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 0x17d); local_2c = 1; } } else { uVar5 = mysql_stmt_error(local_40); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 0x166); local_2c = 1; } } else { uVar5 = mysql_stmt_error(local_40); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 0x163); local_2c = 1; } } } else { uVar5 = mysql_error(local_38); uVar4 = mysql_errno(local_38); diag("Error (%d): %s (%d) in %s line %d",iVar3,uVar5,uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",0x15c); local_2c = 1; } LAB_00115eb7: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_2c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,831
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::object(); for (const auto& [key, value] : elements) { if (!key) throw std::runtime_error("Dict key is null"); if (!value) throw std::runtime_error("Dict value is null"); result.set(key->evaluate(context), value->evaluate(context)); } return result; }
O2
cpp
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x68bd8 movq %rbx, %rdi movq %r12, %rsi callq 0x6af08 leaq 0x10(%rsp), %rdi callq 0x50bd8 movq 0x20(%r15), %r13 movq 0x28(%r15), %rbp leaq 0x68(%rsp), %r15 leaq 0x18(%rsp), %r12 cmpq %rbp, %r13 je 0x6ace5 movq (%r13), %rsi testq %rsi, %rsi je 0x6acfa cmpq $0x0, 0x10(%r13) je 0x6ad16 movq %r15, %rdi movq %r14, %rdx callq 0x63f0a movq 0x10(%r13), %rsi movq %r12, %rdi movq %r14, %rdx callq 0x63f0a movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x6adc2 movq %r12, %rdi callq 0x6419a movq %r15, %rdi callq 0x6419a addq $0x20, %r13 jmp 0x6ac92 movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x4a6b5(%rip), %rsi # 0xb53c1 movq %rax, %rdi callq 0x23330 jmp 0x6ad30 pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x4a6aa(%rip), %rsi # 0xb53d2 movq %rax, %rdi callq 0x23330 movq 0x942b1(%rip), %rsi # 0xfefe8 movq 0x9420a(%rip), %rdx # 0xfef48 movq %r15, %rdi callq 0x23f00 jmp 0x6ad48 movq %rax, %r14 movq %r15, %rdi callq 0x236a0 jmp 0x6ad78 movq %rax, %r14 jmp 0x6ad67 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x6419a leaq 0x68(%rsp), %rdi callq 0x6419a jmp 0x6ad78 jmp 0x6ad75 movq %rax, %r14 movq %rbx, %rdi callq 0x6419a movq %r14, %rdi callq 0x23f80
_ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsp+0E8h+var_E0] mov rdi, r12 call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>() mov rdi, rbx mov rsi, r12 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) lea rdi, [rsp+0E8h+var_D8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov r13, [r15+20h] mov rbp, [r15+28h] lea r15, [rsp+0E8h+var_80] lea r12, [rsp+0E8h+var_D0] loc_6AC92: cmp r13, rbp jz short loc_6ACE5 mov rsi, [r13+0] test rsi, rsi jz short loc_6ACFA cmp qword ptr [r13+10h], 0 jz short loc_6AD16 mov rdi, r15 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rsi, [r13+10h] mov rdi, r12 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r15; minja::Value * mov rdx, r12; minja::Value * call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&) mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r13, 20h ; ' ' jmp short loc_6AC92 loc_6ACE5: mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6ACFA: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictKeyIsNull; "Dict key is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_6AD30 loc_6AD16: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictValueIsNul; "Dict value is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_6AD30: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short $+2 loc_6AD48: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6AD78 mov r14, rax jmp short loc_6AD67 mov r14, rax lea rdi, [rsp+0E8h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6AD67: lea rdi, [rsp+0E8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6AD78 jmp short $+2 loc_6AD75: mov r14, rax loc_6AD78: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, r14 call __Unwind_Resume
minja::Value * minja::DictExpr::do_evaluate(minja::Value *this, long long a2) { void (****v2)(void); // r13 void (****v3)(void); // rbp std::runtime_error *exception; // r15 _BYTE v6[8]; // [rsp+8h] [rbp-E0h] BYREF long long v7; // [rsp+10h] [rbp-D8h] BYREF _BYTE v8[80]; // [rsp+18h] [rbp-D0h] BYREF _BYTE v9[128]; // [rsp+68h] [rbp-80h] BYREF std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>((long long)v6); minja::Value::Value(this, v6); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); v2 = *(void (*****)(void))(a2 + 32); v3 = *(void (*****)(void))(a2 + 40); while ( v2 != v3 ) { if ( !*v2 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict key is null"); goto LABEL_9; } if ( !v2[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict value is null"); LABEL_9: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v9, *v2); minja::Expression::evaluate((long long)v8, v2[2]); minja::Value::set(this, (const minja::Value *)v9, (const minja::Value *)v8); minja::Value::~Value((minja::Value *)v8); minja::Value::~Value((minja::Value *)v9); v2 += 4; } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSP + 0x8] MOV RDI,R12 CALL 0x00168bd8 MOV RDI,RBX MOV RSI,R12 CALL 0x0016af08 LEA RDI,[RSP + 0x10] CALL 0x00150bd8 MOV R13,qword ptr [R15 + 0x20] MOV RBP,qword ptr [R15 + 0x28] LEA R15,[RSP + 0x68] LEA R12,[RSP + 0x18] LAB_0016ac92: CMP R13,RBP JZ 0x0016ace5 MOV RSI,qword ptr [R13] TEST RSI,RSI JZ 0x0016acfa CMP qword ptr [R13 + 0x10],0x0 JZ 0x0016ad16 LAB_0016aca7: MOV RDI,R15 MOV RDX,R14 CALL 0x00163f0a MOV RSI,qword ptr [R13 + 0x10] LAB_0016acb6: MOV RDI,R12 MOV RDX,R14 CALL 0x00163f0a LAB_0016acc1: MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x0016adc2 LAB_0016accf: MOV RDI,R12 CALL 0x0016419a MOV RDI,R15 CALL 0x0016419a ADD R13,0x20 JMP 0x0016ac92 LAB_0016ace5: MOV RAX,RBX ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016acfa: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_0016ad05: LEA RSI,[0x1b53c1] MOV RDI,RAX CALL 0x00123330 LAB_0016ad14: JMP 0x0016ad30 LAB_0016ad16: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_0016ad21: LEA RSI,[0x1b53d2] MOV RDI,RAX CALL 0x00123330 LAB_0016ad30: MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R15 CALL 0x00123f00
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1) { int8 *puVar1; runtime_error *this_00; int8 *puVar2; shared_ptr local_e0 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_d8 [8]; Expression local_d0 [80]; Expression local_80 [80]; std:: make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> (); Value::Value((Value *)this,local_e0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d8); puVar2 = *(int8 **)(param_1 + 0x20); puVar1 = *(int8 **)(param_1 + 0x28); while( true ) { if (puVar2 == puVar1) { return this; } if ((shared_ptr *)*puVar2 == (shared_ptr *)0x0) break; if (puVar2[2] == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016ad21 to 0016ad2f has its CatchHandler @ 0016ad46 */ std::runtime_error::runtime_error(this_00,"Dict value is null"); goto LAB_0016ad30; } /* try { // try from 0016aca7 to 0016acb1 has its CatchHandler @ 0016ad75 */ Expression::evaluate(local_80,(shared_ptr *)*puVar2); /* try { // try from 0016acb6 to 0016acc0 has its CatchHandler @ 0016ad55 */ Expression::evaluate(local_d0,(shared_ptr *)puVar2[2]); /* try { // try from 0016acc1 to 0016acce has its CatchHandler @ 0016ad5a */ Value::set((Value *)this,(Value *)local_80,(Value *)local_d0); Value::~Value((Value *)local_d0); Value::~Value((Value *)local_80); puVar2 = puVar2 + 4; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016ad05 to 0016ad13 has its CatchHandler @ 0016ad48 */ std::runtime_error::runtime_error(this_00,"Dict key is null"); LAB_0016ad30: /* try { // try from 0016ad30 to 0016ad45 has its CatchHandler @ 0016ad73 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); }
28,832
my_wc_mb_latin1
eloqsql/strings/ctype-latin1.c
static int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *str, uchar *end __attribute__((unused))) { const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; if (wc > 0xFFFF) return MY_CS_ILUNI; pl= uni_to_cs[wc >> 8]; str[0]= pl ? pl[wc & 0xFF] : '\0'; return (!str[0] && wc) ? MY_CS_ILUNI : 1; }
O0
c
my_wc_mb_latin1: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xd4e6a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xd4ef1 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jbe 0xd4e7d movl $0x0, -0x4(%rbp) jmp 0xd4ef1 movq -0x18(%rbp), %rcx shrq $0x8, %rcx leaq 0x1ae0a4(%rip), %rax # 0x282f30 movq (%rax,%rcx,8), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0xd4eb3 movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx andq $0xff, %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x34(%rbp) jmp 0xd4eba xorl %eax, %eax movl %eax, -0x34(%rbp) jmp 0xd4eba movl -0x34(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, (%rcx) movb %al, -0x35(%rbp) jne 0xd4ede cmpq $0x0, -0x18(%rbp) setne %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_wc_mb_latin1: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_D4E6A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_D4EF1 loc_D4E6A: cmp [rbp+var_18], 0FFFFh jbe short loc_D4E7D mov [rbp+var_4], 0 jmp short loc_D4EF1 loc_D4E7D: mov rcx, [rbp+var_18] shr rcx, 8 lea rax, uni_to_cs mov rax, [rax+rcx*8] mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_D4EB3 mov rax, [rbp+var_30] mov rcx, [rbp+var_18] and rcx, 0FFh movzx eax, byte ptr [rax+rcx] mov [rbp+var_34], eax jmp short loc_D4EBA loc_D4EB3: xor eax, eax mov [rbp+var_34], eax jmp short $+2 loc_D4EBA: mov eax, [rbp+var_34] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx], 0 mov [rbp+var_35], al jnz short loc_D4EDE cmp [rbp+var_18], 0 setnz al mov [rbp+var_35], al loc_D4EDE: mov dl, [rbp+var_35] mov eax, 1 xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_4], eax loc_D4EF1: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { bool v5; // [rsp+1h] [rbp-35h] char v6; // [rsp+2h] [rbp-34h] long long v7; // [rsp+6h] [rbp-30h] if ( (unsigned long long)a3 < a4 ) { if ( a2 <= 0xFFFF ) { v7 = (long long)*(&uni_to_cs + (a2 >> 8)); if ( v7 ) v6 = *(_BYTE *)(v7 + (unsigned __int8)a2); else v6 = 0; *a3 = v6; v5 = 0; if ( !*a3 ) v5 = a2 != 0; return !v5; } else { return 0; } } else { return (unsigned int)-101; } }
my_wc_mb_latin1: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001d4e6a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001d4ef1 LAB_001d4e6a: CMP qword ptr [RBP + -0x18],0xffff JBE 0x001d4e7d MOV dword ptr [RBP + -0x4],0x0 JMP 0x001d4ef1 LAB_001d4e7d: MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 LEA RAX,[0x382f30] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x001d4eb3 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] AND RCX,0xff MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x34],EAX JMP 0x001d4eba LAB_001d4eb3: XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x001d4eba LAB_001d4eba: MOV EAX,dword ptr [RBP + -0x34] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX],0x0 MOV byte ptr [RBP + -0x35],AL JNZ 0x001d4ede CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x35],AL LAB_001d4ede: MOV DL,byte ptr [RBP + -0x35] MOV EAX,0x1 XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_001d4ef1: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; uint local_c; if (param_3 < param_4) { if (param_2 < 0x10000) { if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; local_c = (uint)(*param_3 != '\0' || param_2 == 0); } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
28,833
nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
hkr04[P]cpp-mcp/common/json.hpp
static const char* token_type_name(const token_type t) noexcept { switch (t) { case token_type::uninitialized: return "<uninitialized>"; case token_type::literal_true: return "true literal"; case token_type::literal_false: return "false literal"; case token_type::literal_null: return "null literal"; case token_type::value_string: return "string literal"; case token_type::value_unsigned: case token_type::value_integer: case token_type::value_float: return "number literal"; case token_type::begin_array: return "'['"; case token_type::begin_object: return "'{'"; case token_type::end_array: return "']'"; case token_type::end_object: return "'}'"; case token_type::name_separator: return "':'"; case token_type::value_separator: return "','"; case token_type::parse_error: return "<parse error>"; case token_type::end_of_input: return "end of input"; case token_type::literal_or_value: return "'[', '{', or a literal"; // LCOV_EXCL_START default: // catch non-enum values return "unknown token"; // LCOV_EXCL_STOP } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type): cmpl $0x10, %edi ja 0x4d376 movl %edi, %eax leaq 0xb0b2(%rip), %rcx # 0x58420 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0xdb2c(%rip), %rax # 0x5aea9 retq
_ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE: cmp edi, 10h ja short loc_4D376 mov eax, edi lea rcx, unk_58420 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_4D376: lea rax, aUnknownToken; "unknown token" retn
const char * nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name( unsigned int a1) { if ( a1 > 0x10 ) return "unknown token"; else return (char *)dword_58420 + dword_58420[a1]; }
token_type_name: CMP EDI,0x10 JA 0x0014d376 MOV EAX,EDI LEA RCX,[0x158420] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0014d376: LEA RAX,[0x15aea9] RET
/* nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type) */ char * nlohmann::json_abi_v3_11_3::detail:: lexer_base<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>> ::token_type_name(uint param_1) { if (param_1 < 0x11) { return &DAT_00158420 + *(int *)(&DAT_00158420 + (ulong)param_1 * 4); } return "unknown token"; }
28,834
ma_init_block_record_data
eloqsql/storage/maria/ma_blockrec.c
void _ma_init_block_record_data(void) { uint i; bzero(total_header_size, sizeof(total_header_size)); total_header_size[0]= FLAG_SIZE; /* Flag uchar */ for (i= 1; i < array_elements(total_header_size); i++) { uint size= FLAG_SIZE, j, bit; for (j= 0; (bit= (1 << j)) <= i; j++) { if (i & bit) size+= header_sizes[j]; } total_header_size[i]= size; } }
O0
c
ma_init_block_record_data: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0xc25e41(%rip), %rdi # 0xc7bcd0 xorl %esi, %esi movl $0x10, %edx callq 0x2a2a0 movb $0x1, 0xc25e2e(%rip) # 0xc7bcd0 movl $0x1, -0x4(%rbp) cmpl $0x10, -0x4(%rbp) jae 0x55f1c movl $0x1, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x10(%rbp) cmpl -0x4(%rbp), %eax ja 0x55efd movl -0x4(%rbp), %eax andl -0x10(%rbp), %eax cmpl $0x0, %eax je 0x55ef0 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x26a29e(%rip), %rax # 0x2c0184 movzbl (%rax,%rcx), %eax addl -0x8(%rbp), %eax movl %eax, -0x8(%rbp) jmp 0x55ef2 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x55ebd movl -0x8(%rbp), %eax movb %al, %dl movl -0x4(%rbp), %eax movl %eax, %ecx leaq 0xc25dc2(%rip), %rax # 0xc7bcd0 movb %dl, (%rax,%rcx) movl -0x4(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x55ea9 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_init_block_record_data: push rbp mov rbp, rsp sub rsp, 10h lea rdi, total_header_size xor esi, esi mov edx, 10h call _memset mov cs:total_header_size, 1 mov [rbp+var_4], 1 loc_55EA9: cmp [rbp+var_4], 10h jnb short loc_55F1C mov [rbp+var_8], 1 mov [rbp+var_C], 0 loc_55EBD: mov ecx, [rbp+var_C] mov eax, 1 shl eax, cl mov [rbp+var_10], eax cmp eax, [rbp+var_4] ja short loc_55EFD mov eax, [rbp+var_4] and eax, [rbp+var_10] cmp eax, 0 jz short loc_55EF0 mov eax, [rbp+var_C] mov ecx, eax lea rax, header_sizes movzx eax, byte ptr [rax+rcx] add eax, [rbp+var_8] mov [rbp+var_8], eax loc_55EF0: jmp short $+2 loc_55EF2: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_55EBD loc_55EFD: mov eax, [rbp+var_8] mov dl, al mov eax, [rbp+var_4] mov ecx, eax lea rax, total_header_size mov [rax+rcx], dl mov eax, [rbp+var_4] add eax, 1 mov [rbp+var_4], eax jmp short loc_55EA9 loc_55F1C: add rsp, 10h pop rbp retn
long long ma_init_block_record_data() { long long result; // rax int j; // [rsp+4h] [rbp-Ch] char v2; // [rsp+8h] [rbp-8h] unsigned int i; // [rsp+Ch] [rbp-4h] result = memset(total_header_size, 0LL, 16LL); total_header_size[0] = 1; for ( i = 1; i < 0x10; ++i ) { v2 = 1; for ( j = 0; 1 << j <= i; ++j ) { if ( ((1 << j) & i) != 0 ) v2 += header_sizes[j]; } total_header_size[i] = v2; result = i + 1; } return result; }
_ma_init_block_record_data: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RDI,[0xd7bcd0] XOR ESI,ESI MOV EDX,0x10 CALL 0x0012a2a0 MOV byte ptr [0x00d7bcd0],0x1 MOV dword ptr [RBP + -0x4],0x1 LAB_00155ea9: CMP dword ptr [RBP + -0x4],0x10 JNC 0x00155f1c MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0xc],0x0 LAB_00155ebd: MOV ECX,dword ptr [RBP + -0xc] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x10],EAX CMP EAX,dword ptr [RBP + -0x4] JA 0x00155efd MOV EAX,dword ptr [RBP + -0x4] AND EAX,dword ptr [RBP + -0x10] CMP EAX,0x0 JZ 0x00155ef0 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x3c0184] MOVZX EAX,byte ptr [RAX + RCX*0x1] ADD EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x8],EAX LAB_00155ef0: JMP 0x00155ef2 LAB_00155ef2: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00155ebd LAB_00155efd: MOV EAX,dword ptr [RBP + -0x8] MOV DL,AL MOV EAX,dword ptr [RBP + -0x4] MOV ECX,EAX LEA RAX,[0xd7bcd0] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x00155ea9 LAB_00155f1c: ADD RSP,0x10 POP RBP RET
void _ma_init_block_record_data(void) { char cVar1; uint uVar2; uint local_14; uint local_c; memset(total_header_size,0,0x10); total_header_size[0] = 1; for (local_c = 1; local_c < 0x10; local_c = local_c + 1) { cVar1 = '\x01'; for (local_14 = 0; uVar2 = 1 << ((byte)local_14 & 0x1f), uVar2 <= local_c; local_14 = local_14 + 1) { if ((local_c & uVar2) != 0) { cVar1 = *(char *)((long)&header_sizes + (ulong)local_14) + cVar1; } } total_header_size[local_c] = cVar1; } return; }
28,835
Rpl_filter::Rpl_filter()
eloqsql/sql/rpl_filter.cc
Rpl_filter::Rpl_filter() : parallel_mode(SLAVE_PARALLEL_OPTIMISTIC), table_rules_on(0), do_table_inited(0), ignore_table_inited(0), wild_do_table_inited(0), wild_ignore_table_inited(0) { do_db.empty(); ignore_db.empty(); rewrite_db.empty(); }
O3
cpp
Rpl_filter::Rpl_filter(): pushq %rbp movq %rsp, %rbp movq $0x3, 0x130(%rdi) leaq 0x140(%rdi), %rax leaq 0x148(%rdi), %rcx movb $0x0, 0x138(%rdi) leaq 0x307e41(%rip), %rdx # 0x35c5e0 movq %rdx, 0x148(%rdi) xorl %esi, %esi movq %rsi, 0x158(%rdi) leaq 0x160(%rdi), %r8 leaq 0x168(%rdi), %r9 movq %rdx, 0x168(%rdi) movq %rsi, 0x178(%rdi) leaq 0x180(%rdi), %r10 leaq 0x188(%rdi), %r11 movq %rdx, 0x188(%rdi) movq %rsi, 0x198(%rdi) movq %rcx, 0x140(%rdi) movq %rax, 0x150(%rdi) movq %r9, 0x160(%rdi) movq %r8, 0x170(%rdi) movq %r11, 0x180(%rdi) movq %r10, 0x190(%rdi) popq %rbp retq nop
_ZN10Rpl_filterC2Ev: push rbp; Alternative name is 'Rpl_filter::Rpl_filter(void)' mov rbp, rsp mov qword ptr [rdi+130h], 3 lea rax, [rdi+140h] lea rcx, [rdi+148h] mov byte ptr [rdi+138h], 0 lea rdx, off_35C5E0 mov [rdi+148h], rdx xor esi, esi mov [rdi+158h], rsi lea r8, [rdi+160h] lea r9, [rdi+168h] mov [rdi+168h], rdx mov [rdi+178h], rsi lea r10, [rdi+180h] lea r11, [rdi+188h] mov [rdi+188h], rdx mov [rdi+198h], rsi mov [rdi+140h], rcx mov [rdi+150h], rax mov [rdi+160h], r9 mov [rdi+170h], r8 mov [rdi+180h], r11 mov [rdi+190h], r10 pop rbp retn
void Rpl_filter::Rpl_filter(Rpl_filter *this) { *((_QWORD *)this + 38) = 3LL; *((_BYTE *)this + 312) = 0; *((_QWORD *)this + 41) = off_35C5E0; *((_QWORD *)this + 43) = 0LL; *((_QWORD *)this + 45) = off_35C5E0; *((_QWORD *)this + 47) = 0LL; *((_QWORD *)this + 49) = off_35C5E0; *((_QWORD *)this + 51) = 0LL; *((_QWORD *)this + 40) = (char *)this + 328; *((_QWORD *)this + 42) = (char *)this + 320; *((_QWORD *)this + 44) = (char *)this + 360; *((_QWORD *)this + 46) = (char *)this + 352; *((_QWORD *)this + 48) = (char *)this + 392; *((_QWORD *)this + 50) = (char *)this + 384; }
Rpl_filter: PUSH RBP MOV RBP,RSP MOV qword ptr [RDI + 0x130],0x3 LEA RAX,[RDI + 0x140] LEA RCX,[RDI + 0x148] MOV byte ptr [RDI + 0x138],0x0 LEA RDX,[0x45c5e0] MOV qword ptr [RDI + 0x148],RDX XOR ESI,ESI MOV qword ptr [RDI + 0x158],RSI LEA R8,[RDI + 0x160] LEA R9,[RDI + 0x168] MOV qword ptr [RDI + 0x168],RDX MOV qword ptr [RDI + 0x178],RSI LEA R10,[RDI + 0x180] LEA R11,[RDI + 0x188] MOV qword ptr [RDI + 0x188],RDX MOV qword ptr [RDI + 0x198],RSI MOV qword ptr [RDI + 0x140],RCX MOV qword ptr [RDI + 0x150],RAX MOV qword ptr [RDI + 0x160],R9 MOV qword ptr [RDI + 0x170],R8 MOV qword ptr [RDI + 0x180],R11 MOV qword ptr [RDI + 0x190],R10 POP RBP RET
/* Rpl_filter::Rpl_filter() */ void __thiscall Rpl_filter::Rpl_filter(Rpl_filter *this) { *(int8 *)(this + 0x130) = 3; this[0x138] = (Rpl_filter)0x0; *(int ***)(this + 0x148) = &PTR__ilink_0045c5e0; *(int8 *)(this + 0x158) = 0; *(int ***)(this + 0x168) = &PTR__ilink_0045c5e0; *(int8 *)(this + 0x178) = 0; *(int ***)(this + 0x188) = &PTR__ilink_0045c5e0; *(int8 *)(this + 0x198) = 0; *(Rpl_filter **)(this + 0x140) = this + 0x148; *(Rpl_filter **)(this + 0x150) = this + 0x140; *(Rpl_filter **)(this + 0x160) = this + 0x168; *(Rpl_filter **)(this + 0x170) = this + 0x160; *(Rpl_filter **)(this + 0x180) = this + 0x188; *(Rpl_filter **)(this + 400) = this + 0x180; return; }
28,836
ma_kpointer
eloqsql/storage/maria/ma_search.c
void _ma_kpointer(register MARIA_HA *info, register uchar *buff, my_off_t pos) { pos/=maria_block_size; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O0
c
ma_kpointer: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x251cb5(%rip), %rax # 0x2bc070 movq (%rax), %rcx movq -0x18(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x3e4(%rax), %eax decl %eax movl %eax, %ecx movq %rcx, -0x68(%rbp) subl $0x6, %eax ja 0x6a611 movq -0x68(%rbp), %rax leaq 0xed850(%rip), %rcx # 0x157c44 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x20(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x20(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x28(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x28(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x28(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 movq -0x18(%rbp), %rax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x5c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x6a616 callq 0x2a5b0 addq $0x70, %rsp popq %rbp retq nopl (%rax)
_ma_kpointer: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, maria_block_size mov rcx, [rax] mov rax, [rbp+var_18] xor edx, edx div rcx mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+3E4h] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_68], rcx sub eax, 6 ja def_6A3FB; jumptable 000000000006A3FB default case mov rax, [rbp+var_68] lea rcx, jpt_6A3FB movsxd rax, ds:(jpt_6A3FB - 157C44h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_6A3FD: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 7 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_20] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_20] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_20] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_28] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_28] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_28] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_6A616 loc_6A484: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 6 mov [rbp+var_30], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_38], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_6A616 loc_6A4FA: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 5 mov [rbp+var_40], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_48], rax mov rax, [rbp+var_40] mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_6A616 loc_6A55F: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 4 mov [rbp+var_50], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_6A616 loc_6A5A8: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 3 mov [rbp+var_58], rax mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_6A616 loc_6A5E0: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 2 mov [rbp+var_5C], eax mov eax, [rbp+var_5C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_5C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_6A616 loc_6A603: mov rax, [rbp+var_18]; jumptable 000000000006A3FB case 1 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_6A616 def_6A3FB: call _abort; jumptable 000000000006A3FB default case loc_6A616: add rsp, 70h pop rbp retn
_BYTE * ma_kpointer(long long a1, _BYTE *a2, unsigned long long a3) { unsigned long long v3; // rdx _BYTE *result; // rax unsigned long long v6; // [rsp+58h] [rbp-18h] v3 = a3 % *(_QWORD *)&maria_block_size; v6 = a3 / *(_QWORD *)&maria_block_size; switch ( *(_DWORD *)(*(_QWORD *)a1 + 996LL) ) { case 1: result = a2; *a2 = v6; break; case 2: a2[1] = v6; result = a2; *a2 = BYTE1(v6); break; case 3: a2[2] = v6; a2[1] = BYTE1(v6); result = a2; *a2 = BYTE2(v6); break; case 4: a2[3] = v6; a2[2] = BYTE1(v6); a2[1] = BYTE2(v6); result = a2; *a2 = BYTE3(v6); break; case 5: a2[4] = v6; a2[3] = BYTE1(v6); a2[2] = BYTE2(v6); a2[1] = BYTE3(v6); result = a2; *a2 = BYTE4(v6); break; case 6: a2[5] = v6; a2[4] = BYTE1(v6); a2[3] = BYTE2(v6); a2[2] = BYTE3(v6); a2[1] = BYTE4(v6); result = a2; *a2 = BYTE5(v6); break; case 7: a2[6] = v6; a2[5] = BYTE1(v6); a2[4] = BYTE2(v6); a2[3] = BYTE3(v6); a2[2] = BYTE4(v6); a2[1] = BYTE5(v6); result = a2; *a2 = BYTE6(v6); break; default: abort(a1, a2, v3); } return result; }
_ma_kpointer: 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 LEA RAX,[0x3bc070] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x3e4] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x68],RCX SUB EAX,0x6 JA 0x0016a611 MOV RAX,qword ptr [RBP + -0x68] LEA RCX,[0x257c44] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x28] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 caseD_5: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x5c],EAX MOV EAX,dword ptr [RBP + -0x5c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x5c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0016a616 default: CALL 0x0012a5b0 LAB_0016a616: ADD RSP,0x70 POP RBP RET
void _ma_kpointer(long *param_1,int1 *param_2,ulong param_3) { int1 uVar1; int1 uVar2; int1 uVar3; int1 uVar4; int1 uVar5; int1 uVar6; param_3 = param_3 / maria_block_size; uVar1 = (int1)param_3; uVar2 = (int1)(param_3 >> 8); uVar3 = (int1)(param_3 >> 0x10); uVar4 = (int1)(param_3 >> 0x18); uVar5 = (int1)(param_3 >> 0x20); uVar6 = (int1)(param_3 >> 0x28); switch(*(int4 *)(*param_1 + 0x3e4)) { case 1: *param_2 = uVar1; break; case 2: param_2[1] = uVar1; *param_2 = uVar2; break; case 3: param_2[2] = uVar1; param_2[1] = uVar2; *param_2 = uVar3; break; case 4: param_2[3] = uVar1; param_2[2] = uVar2; param_2[1] = uVar3; *param_2 = uVar4; break; case 5: param_2[4] = uVar1; param_2[3] = uVar2; param_2[2] = uVar3; param_2[1] = uVar4; *param_2 = uVar5; break; case 6: param_2[5] = uVar1; param_2[4] = uVar2; param_2[3] = uVar3; param_2[2] = uVar4; param_2[1] = uVar5; *param_2 = uVar6; break; case 7: param_2[6] = uVar1; param_2[5] = uVar2; param_2[4] = uVar3; param_2[3] = uVar4; param_2[2] = uVar5; param_2[1] = uVar6; *param_2 = (char)(param_3 >> 0x30); break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
28,837
ma_kpointer
eloqsql/storage/maria/ma_search.c
void _ma_kpointer(register MARIA_HA *info, register uchar *buff, my_off_t pos) { pos/=maria_block_size; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O3
c
ma_kpointer: movq %rdx, %rax leaq 0x32c779(%rip), %rcx # 0x383070 xorl %edx, %edx divq (%rcx) movq (%rdi), %rcx movl 0x3e4(%rcx), %ecx decl %ecx cmpl $0x6, %ecx ja 0x5699b leaq 0x897d5(%rip), %rdx # 0xe00ec movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movb %al, 0x1(%rsi) shrq $0x8, %rax jmp 0x56998 movq %rax, %rcx shrq $0x20, %rcx bswapl %eax movl %eax, 0x1(%rsi) movq %rcx, %rax jmp 0x56998 movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x1(%rsi) shrq $0x10, %rax jmp 0x56998 movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x2(%rsi) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x1(%rsi) shrq $0x18, %rax jmp 0x56998 movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x2(%rsi) movb %cl, 0x1(%rsi) shrq $0x28, %rax jmp 0x56998 movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x3(%rsi) movb %cl, 0x2(%rsi) movq %rax, %rcx shrq $0x28, %rcx movb %cl, 0x1(%rsi) shrq $0x30, %rax movb %al, (%rsi) retq pushq %rbp movq %rsp, %rbp callq 0x295f0
_ma_kpointer: mov rax, rdx lea rcx, maria_block_size xor edx, edx div qword ptr [rcx] mov rcx, [rdi] mov ecx, [rcx+3E4h] dec ecx; switch 7 cases cmp ecx, 6 ja def_5691E; jumptable 000000000005691E default case lea rdx, jpt_5691E movsxd rcx, ds:(jpt_5691E - 0E00ECh)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_56920: mov [rsi+1], al; jumptable 000000000005691E case 2 shr rax, 8 jmp short loc_56998; jumptable 000000000005691E case 1 loc_56929: mov rcx, rax; jumptable 000000000005691E case 5 shr rcx, 20h bswap eax mov [rsi+1], eax mov rax, rcx jmp short loc_56998; jumptable 000000000005691E case 1 loc_5693A: mov ecx, eax; jumptable 000000000005691E case 3 rol cx, 8 mov [rsi+1], cx shr rax, 10h jmp short loc_56998; jumptable 000000000005691E case 1 loc_5694A: mov ecx, eax; jumptable 000000000005691E case 4 rol cx, 8 mov [rsi+2], cx mov ecx, eax shr ecx, 10h mov [rsi+1], cl shr rax, 18h jmp short loc_56998; jumptable 000000000005691E case 1 loc_56962: mov rcx, rax; jumptable 000000000005691E case 6 shr rcx, 20h mov edx, eax bswap edx mov [rsi+2], edx mov [rsi+1], cl shr rax, 28h jmp short loc_56998; jumptable 000000000005691E case 1 loc_56979: mov rcx, rax; jumptable 000000000005691E case 7 shr rcx, 20h mov edx, eax bswap edx mov [rsi+3], edx mov [rsi+2], cl mov rcx, rax shr rcx, 28h mov [rsi+1], cl shr rax, 30h loc_56998: mov [rsi], al; jumptable 000000000005691E case 1 retn def_5691E: push rbp; jumptable 000000000005691E default case mov rbp, rsp call _abort
unsigned long long ma_kpointer(long long a1, long long a2, unsigned long long a3) { unsigned long long result; // rax unsigned long long v4; // rdx result = a3 / *(_QWORD *)&maria_block_size; v4 = a3 % *(_QWORD *)&maria_block_size; switch ( *(_DWORD *)(*(_QWORD *)a1 + 996LL) ) { case 1: break; case 2: *(_BYTE *)(a2 + 1) = result; result >>= 8; break; case 3: *(_WORD *)(a2 + 1) = __ROL2__(result, 8); result >>= 16; break; case 4: *(_WORD *)(a2 + 2) = __ROL2__(result, 8); *(_BYTE *)(a2 + 1) = BYTE2(result); result >>= 24; break; case 5: *(_DWORD *)(a2 + 1) = _byteswap_ulong(result); result >>= 32; break; case 6: *(_DWORD *)(a2 + 2) = _byteswap_ulong(result); *(_BYTE *)(a2 + 1) = BYTE4(result); result >>= 40; break; case 7: *(_DWORD *)(a2 + 3) = _byteswap_ulong(result); *(_BYTE *)(a2 + 2) = BYTE4(result); *(_BYTE *)(a2 + 1) = BYTE5(result); result >>= 48; break; default: abort(a1, a2, v4); } *(_BYTE *)a2 = result; return result; }
_ma_kpointer: MOV RAX,RDX LEA RCX,[0x483070] XOR EDX,EDX DIV qword ptr [RCX] MOV RCX,qword ptr [RDI] MOV ECX,dword ptr [RCX + 0x3e4] DEC ECX CMP ECX,0x6 JA 0x0015699b LEA RDX,[0x1e00ec] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_2: MOV byte ptr [RSI + 0x1],AL SHR RAX,0x8 JMP 0x00156998 caseD_5: MOV RCX,RAX SHR RCX,0x20 BSWAP EAX MOV dword ptr [RSI + 0x1],EAX MOV RAX,RCX JMP 0x00156998 caseD_3: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RSI + 0x1],CX SHR RAX,0x10 JMP 0x00156998 caseD_4: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RSI + 0x2],CX MOV ECX,EAX SHR ECX,0x10 MOV byte ptr [RSI + 0x1],CL SHR RAX,0x18 JMP 0x00156998 caseD_6: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RSI + 0x2],EDX MOV byte ptr [RSI + 0x1],CL SHR RAX,0x28 JMP 0x00156998 caseD_7: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RSI + 0x3],EDX MOV byte ptr [RSI + 0x2],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RSI + 0x1],CL SHR RAX,0x30 caseD_1: MOV byte ptr [RSI],AL RET default: PUSH RBP MOV RBP,RSP CALL 0x001295f0
void _ma_kpointer(long *param_1,int1 *param_2,ulong param_3) { int1 auVar1 [16]; int1 auVar2 [16]; ushort uVar3; uint uVar4; ulong uVar5; auVar1._8_8_ = 0; auVar1._0_8_ = maria_block_size; auVar2._8_8_ = 0; auVar2._0_8_ = param_3; auVar2 = auVar2 / auVar1; uVar5 = auVar2._0_8_; uVar4 = auVar2._0_4_; uVar3 = auVar2._0_2_; switch(*(int4 *)(*param_1 + 0x3e4)) { case 1: break; case 2: param_2[1] = auVar2[0]; uVar5 = uVar5 >> 8; break; case 3: *(ushort *)(param_2 + 1) = uVar3 << 8 | uVar3 >> 8; uVar5 = uVar5 >> 0x10; break; case 4: *(ushort *)(param_2 + 2) = uVar3 << 8 | uVar3 >> 8; param_2[1] = auVar2[2]; uVar5 = uVar5 >> 0x18; break; case 5: uVar5 = uVar5 >> 0x20; *(uint *)(param_2 + 1) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; break; case 6: *(uint *)(param_2 + 2) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; param_2[1] = auVar2[4]; uVar5 = uVar5 >> 0x28; break; case 7: *(uint *)(param_2 + 3) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; param_2[2] = auVar2[4]; param_2[1] = auVar2[5]; uVar5 = uVar5 >> 0x30; break; default: /* WARNING: Subroutine does not return */ abort(); } *param_2 = (char)uVar5; return; }
28,838
list_del
bluesky950520[P]quickjs/list.h
static inline void list_del(struct list_head *el) { struct list_head *prev, *next; prev = el->prev; next = el->next; prev->next = next; next->prev = prev; el->prev = NULL; /* fail safe */ el->next = NULL; /* fail safe */ }
O0
c
list_del: movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movq (%rax), %rax movq %rax, -0x10(%rsp) movq -0x8(%rsp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rsp) movq -0x18(%rsp), %rcx movq -0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rsp), %rcx movq -0x18(%rsp), %rax movq %rcx, (%rax) movq -0x8(%rsp), %rax movq $0x0, (%rax) movq -0x8(%rsp), %rax movq $0x0, 0x8(%rax) retq nopw %cs:(%rax,%rax)
list_del: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov rax, [rax] mov [rsp+var_10], rax mov rax, [rsp+var_8] mov rax, [rax+8] mov [rsp+var_18], rax mov rcx, [rsp+var_18] mov rax, [rsp+var_10] mov [rax+8], rcx mov rcx, [rsp+var_10] mov rax, [rsp+var_18] mov [rax], rcx mov rax, [rsp+var_8] mov qword ptr [rax], 0 mov rax, [rsp+var_8] mov qword ptr [rax+8], 0 retn
_QWORD * list_del(_QWORD *a1) { _QWORD *result; // rax _QWORD *v2; // [rsp+0h] [rbp-18h] long long v3; // [rsp+8h] [rbp-10h] v3 = *a1; v2 = (_QWORD *)a1[1]; *(_QWORD *)(v3 + 8) = v2; *v2 = v3; *a1 = 0LL; result = a1; a1[1] = 0LL; return result; }
list_del: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + -0x10],RAX MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + -0x18],RAX MOV RCX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX + 0x8],0x0 RET
void list_del(long *param_1) { long lVar1; long *plVar2; lVar1 = *param_1; plVar2 = (long *)param_1[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_1 = 0; param_1[1] = 0; return; }
28,839
minja::chat_template::try_raw_render(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&, 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&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const
monkey531[P]llama/common/chat-template.hpp
std::string try_raw_render( const nlohmann::ordered_json & messages, const nlohmann::ordered_json & tools, bool add_generation_prompt, const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const { try { auto prompt = apply(messages, tools, add_generation_prompt, extra_context, /* adjust_inputs= */ false); // fprintf(stderr, "try_raw_render: %s\n", prompt.c_str()); return prompt; } catch (const std::exception & e) { // fprintf(stderr, "try_raw_render error: %s\n", e.what()); return ""; } }
O0
cpp
minja::chat_template::try_raw_render(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&, 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&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const: subq $0x78, %rsp movq %rdi, 0x10(%rsp) movb %r8b, %al movq %rdi, %r8 movq %r8, 0x18(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq %rdx, 0x60(%rsp) movq %rcx, 0x58(%rsp) andb $0x1, %al movb %al, 0x57(%rsp) movq %r9, 0x48(%rsp) movq 0x68(%rsp), %rsi movb $0x0, 0x47(%rsp) movq 0x60(%rsp), %rdx movq 0x58(%rsp), %rcx movq 0x48(%rsp), %r9 movzbl 0x57(%rsp), %r8d movq %rsp, %rax movl $0x0, (%rax) andl $0x1, %r8d callq 0x16c080 jmp 0x1142f6 movb $0x1, 0x47(%rsp) testb $0x1, 0x47(%rsp) jne 0x114370 jmp 0x114366 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x11439d movq 0x38(%rsp), %rdi callq 0x5e0f0 movq %rax, 0x28(%rsp) leaq 0x27(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x5f150 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rdx leaq 0x107e20(%rip), %rsi # 0x21c16e callq 0x6b630 jmp 0x114355 leaq 0x27(%rsp), %rdi callq 0x5f5b0 callq 0x5ee00 jmp 0x114393 movq 0x10(%rsp), %rdi callq 0x5f5d8 jmp 0x114393 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x27(%rsp), %rdi callq 0x5f5b0 callq 0x5ee00 jmp 0x114391 jmp 0x11439d movq 0x18(%rsp), %rax addq $0x78, %rsp retq movq 0x38(%rsp), %rdi callq 0x5ebf0 movq %rax, %rdi callq 0x6c1c0 nop
_ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_: sub rsp, 78h mov [rsp+78h+var_68], rdi mov al, r8b mov r8, rdi mov [rsp+78h+var_60], r8 mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_20], rcx and al, 1 mov [rsp+78h+var_21], al mov [rsp+78h+var_30], r9 mov rsi, [rsp+78h+var_10] mov [rsp+78h+var_31], 0 mov rdx, [rsp+78h+var_18] mov rcx, [rsp+78h+var_20] mov r9, [rsp+78h+var_30] movzx r8d, [rsp+78h+var_21] mov rax, rsp mov dword ptr [rax], 0 and r8d, 1 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,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&,bool) jmp short $+2 loc_1142F6: mov [rsp+78h+var_31], 1 test [rsp+78h+var_31], 1 jnz short loc_114370 jmp short loc_114366 mov rcx, rax mov eax, edx mov [rsp+78h+var_40], rcx mov [rsp+78h+var_44], eax mov eax, [rsp+78h+var_44] mov ecx, 1 cmp eax, ecx jnz short loc_11439D mov rdi, [rsp+78h+var_40]; void * call ___cxa_begin_catch mov [rsp+78h+var_50], rax lea rdi, [rsp+78h+var_51] mov [rsp+78h+var_70], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+78h+var_68] mov rdx, [rsp+78h+var_70] lea rsi, aExampleSpecifi+27h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_114355: lea rdi, [rsp+78h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short loc_114393 loc_114366: mov rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_114370: jmp short loc_114393 mov rcx, rax mov eax, edx mov [rsp+78h+var_40], rcx mov [rsp+78h+var_44], eax lea rdi, [rsp+78h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short $+2 loc_114391: jmp short loc_11439D loc_114393: mov rax, [rsp+78h+var_60] add rsp, 78h retn loc_11439D: mov rdi, [rsp+78h+var_40] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::chat_template::try_raw_render(long long a1, int a2, int a3, int a4, char a5, int a6) { minja::chat_template::apply(a1, a2, a3, a4, a5 & 1, a6, 0); return a1; }
28,840
minja::chat_template::try_raw_render(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&, 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&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const
monkey531[P]llama/common/chat-template.hpp
std::string try_raw_render( const nlohmann::ordered_json & messages, const nlohmann::ordered_json & tools, bool add_generation_prompt, const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const { try { auto prompt = apply(messages, tools, add_generation_prompt, extra_context, /* adjust_inputs= */ false); // fprintf(stderr, "try_raw_render: %s\n", prompt.c_str()); return prompt; } catch (const std::exception & e) { // fprintf(stderr, "try_raw_render error: %s\n", e.what()); return ""; } }
O1
cpp
minja::chat_template::try_raw_render(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&, 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&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x0, (%rsp) callq 0xa731c movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 cmpl $0x1, %edx jne 0x84c12 movq %r14, %rdi callq 0x1b390 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x6fdfc(%rip), %rdx # 0xf49f4 movq %rbx, %rdi movq %rdx, %rsi callq 0x28a68 callq 0x1bea0 jmp 0x84bcf movq %rax, %r14 callq 0x1bea0 movq %r14, %rdi callq 0x1bff0 movq %rax, %rdi callq 0x25a95
_ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_: push r14 push rbx push rax mov rbx, rdi mov [rsp+18h+var_18], 0 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,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&,bool) loc_84BCF: mov rax, rbx add rsp, 8 pop rbx pop r14 retn mov r14, rax cmp edx, 1 jnz short loc_84C12 mov rdi, r14; void * call ___cxa_begin_catch lea rax, [rbx+10h] mov [rbx], rax lea rdx, aErrorWhileHand_0+34h; "" mov rdi, rbx 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) call ___cxa_end_catch jmp short loc_84BCF mov r14, rax call ___cxa_end_catch loc_84C12: mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::chat_template::try_raw_render(long long a1) { minja::chat_template::apply(a1); return a1; }
try_raw_render: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LAB_00184bc3: MOV dword ptr [RSP],0x0 CALL 0x001a731c LAB_00184bcf: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* minja::chat_template::try_raw_render(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&, 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&, bool, 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&) const */ chat_template * __thiscall minja::chat_template::try_raw_render (chat_template *this,basic_json *param_1,basic_json *param_2,bool param_3, basic_json *param_4) { int7 in_register_00000009; /* try { // try from 00184bc3 to 00184bce has its CatchHandler @ 00184bda */ apply((basic_json *)this,param_1,SUB81(param_2,0), (basic_json *)CONCAT71(in_register_00000009,param_3),SUB81(param_4,0)); return this; }
28,841
get_simple_collation_handler_by_flags
eloqsql/mysys/charset.c
static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags) { return flags & MY_CS_BINSORT ? (flags & MY_CS_NOPAD ? &my_collation_8bit_nopad_bin_handler : &my_collation_8bit_bin_handler) : (flags & MY_CS_NOPAD ? &my_collation_8bit_simple_nopad_ci_handler : &my_collation_8bit_simple_ci_handler); }
O0
c
get_simple_collation_handler_by_flags: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xdcdf6 movl -0x4(%rbp), %edx andl $0x20000, %edx # imm = 0x20000 leaq 0x1df136(%rip), %rax # 0x2bbf18 leaq 0x1df19f(%rip), %rcx # 0x2bbf88 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xdce18 movl -0x4(%rbp), %edx andl $0x20000, %edx # imm = 0x20000 leaq 0x1e1c52(%rip), %rax # 0x2bea58 leaq 0x1e1cbb(%rip), %rcx # 0x2beac8 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax popq %rbp retq nop
get_simple_collation_handler_by_flags: push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] and eax, 10h cmp eax, 0 jz short loc_DCDF6 mov edx, [rbp+var_4] and edx, 20000h lea rax, my_collation_8bit_bin_handler lea rcx, my_collation_8bit_nopad_bin_handler cmp edx, 0 cmovnz rax, rcx mov [rbp+var_10], rax jmp short loc_DCE18 loc_DCDF6: mov edx, [rbp+var_4] and edx, 20000h lea rax, my_collation_8bit_simple_ci_handler lea rcx, my_collation_8bit_simple_nopad_ci_handler cmp edx, 0 cmovnz rax, rcx mov [rbp+var_10], rax loc_DCE18: mov rax, [rbp+var_10] pop rbp retn
long long ( ** get_simple_collation_handler_by_flags(int a1))() { long long ( **v1)(); // rax long long ( **v2)(); // rax if ( (a1 & 0x10) != 0 ) { v1 = my_collation_8bit_bin_handler; if ( (a1 & 0x20000) != 0 ) return my_collation_8bit_nopad_bin_handler; return v1; } else { v2 = my_collation_8bit_simple_ci_handler; if ( (a1 & 0x20000) != 0 ) return my_collation_8bit_simple_nopad_ci_handler; return v2; } }
get_simple_collation_handler_by_flags: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x10 CMP EAX,0x0 JZ 0x001dcdf6 MOV EDX,dword ptr [RBP + -0x4] AND EDX,0x20000 LEA RAX,[0x3bbf18] LEA RCX,[0x3bbf88] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001dce18 LAB_001dcdf6: MOV EDX,dword ptr [RBP + -0x4] AND EDX,0x20000 LEA RAX,[0x3bea58] LEA RCX,[0x3beac8] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_001dce18: MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
int1 * get_simple_collation_handler_by_flags(uint param_1) { int1 *local_18; if ((param_1 & 0x10) == 0) { local_18 = my_collation_8bit_simple_ci_handler; if ((param_1 & 0x20000) != 0) { local_18 = my_collation_8bit_simple_nopad_ci_handler; } } else { local_18 = my_collation_8bit_bin_handler; if ((param_1 & 0x20000) != 0) { local_18 = my_collation_8bit_nopad_bin_handler; } } return local_18; }
28,842
mi_copy_status
eloqsql/storage/myisam/mi_locking.c
void mi_copy_status(void* to,void *from) { MI_INFO *info= (MI_INFO*) to; DBUG_ENTER("mi_copy_status"); info->state= &((MI_INFO*) from)->save_state; DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); DBUG_VOID_RETURN; }
O3
c
mi_copy_status: pushq %rbp movq %rsp, %rbp addq $0x10, %rsi movq %rsi, 0x8(%rdi) popq %rbp retq
mi_copy_status: push rbp mov rbp, rsp add rsi, 10h mov [rdi+8], rsi pop rbp retn
void mi_copy_status(long long a1, long long a2) { *(_QWORD *)(a1 + 8) = a2 + 16; }
mi_copy_status: PUSH RBP MOV RBP,RSP ADD RSI,0x10 MOV qword ptr [RDI + 0x8],RSI POP RBP RET
void mi_copy_status(long param_1,long param_2) { *(long *)(param_1 + 8) = param_2 + 0x10; return; }
28,843
UpdateFetcher::ReadSQLUpdate(std::filesystem::__cxx11::path const&) const
SylCore-WoTLK/src/server/database/Updater/UpdateFetcher.cpp
std::string UpdateFetcher::ReadSQLUpdate(Path const& file) const { std::ifstream in(file.c_str()); if (!in.is_open()) { LOG_FATAL("sql.updates", "Failed to open the sql update \"{}\" for reading! " "Stopping the server to keep the database integrity, " "try to identify and solve the issue or disable the database updater.", file.generic_string()); throw UpdateException("Opening the sql update failed!"); } auto update = [&in] { std::ostringstream ss; ss << in.rdbuf(); return ss.str(); }(); in.close(); return update; }
O3
cpp
UpdateFetcher::ReadSQLUpdate(std::filesystem::__cxx11::path const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x3d8, %rsp # imm = 0x3D8 movq %rdx, %rbx movq %rdi, %r14 movq (%rdx), %rsi leaq 0x1d0(%rsp), %rdi movl $0x8, %edx callq 0x1b090 leaq 0x248(%rsp), %rdi callq 0x1c4a0 testb %al, %al je 0x98e1b leaq 0x58(%rsp), %rdi callq 0x1c2e0 leaq 0x1e0(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x1b2f0 leaq 0x60(%rsp), %rsi movq %r14, %rdi callq 0x1c450 movq 0xd30ef(%rip), %rsi # 0x16bec8 leaq 0x58(%rsp), %rdi callq 0x1bd40 leaq 0xc8(%rsp), %rdi callq 0x1bcf0 leaq 0x1d0(%rsp), %rdi callq 0x1bb00 leaq 0x1d0(%rsp), %rdi callq 0x1b070 movq %r14, %rax addq $0x3d8, %rsp # imm = 0x3D8 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0xb4614 movq %rax, %r14 leaq 0x68(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x634e9(%rip), %rsi # 0xfc31c leaq 0x634ed(%rip), %rdx # 0xfc327 leaq 0x58(%rsp), %rdi callq 0x29098 leaq 0x58(%rsp), %rsi movq %r14, %rdi movl $0x1, %edx callq 0xb45e4 movl %eax, %ebp movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x98e6f movq 0x68(%rsp), %rsi incq %rsi callq 0xd32e8 testb %bpl, %bpl je 0x9904d callq 0xb4614 movq %rax, %r14 leaq 0x58(%rsp), %rdi movq %r15, (%rdi) leaq 0x6348d(%rip), %rsi # 0xfc31c leaq 0x63491(%rip), %rdx # 0xfc327 callq 0x29098 leaq 0x20(%rsp), %rdi leaq 0x40(%rsp), %rdx movq %rbx, %rsi callq 0x29436 movups 0x20(%rsp), %xmm0 leaq 0x40(%rsp), %r8 movaps %xmm0, (%r8) leaq 0x74659(%rip), %rsi # 0x10d51b movq %rsp, %rdi movl $0xa8, %edx movl $0xd, %ecx callq 0xea7c3 movq (%rsp), %rcx movq 0x8(%rsp), %r8 leaq 0x58(%rsp), %rsi movq %r14, %rdi movl $0x1, %edx callq 0x285d8 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98f0a movq 0x10(%rsp), %rsi incq %rsi callq 0xd32e8 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98f25 movq 0x30(%rsp), %rsi incq %rsi callq 0xd32e8 movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x9904d movq 0x68(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x9904d movq %rdx, %r14 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98f6e movq 0x10(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x98f6e movq %rdx, %r14 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98f91 movq 0x30(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x98f91 movq %rdx, %r14 movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x98fb2 movq 0x68(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x98fb2 jmp 0x98fac movq %rdx, %r14 movq %rax, %rbx cmpl $0x1, %r14d jne 0x9915d movq %rbx, %rdi callq 0x1b0d0 movq %rax, %r14 callq 0xb4614 movq %rax, %rbx leaq 0x58(%rsp), %rdi movq %r15, (%rdi) leaq 0x6020a(%rip), %rsi # 0xf91e8 leaq 0x60209(%rip), %rdx # 0xf91ee callq 0x29098 movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) movq %rsp, %r9 movq %rax, (%r9) leaq 0x20(%rsp), %rax movl $0xd4, (%rax) leaq 0x7429f(%rip), %r10 # 0x10d2aa leaq 0x601ed(%rip), %rcx # 0xf91ff leaq 0x58(%rsp), %rsi movl $0x25, %r8d movq %rbx, %rdi movl $0x2, %edx pushq %rax pushq %r10 callq 0x9e1be addq $0x10, %rsp movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x99048 movq 0x68(%rsp), %rsi incq %rsi callq 0xd32e8 callq 0x1be70 movl $0x28, %edi callq 0x1b6a0 movq %rax, %r14 leaq 0x58(%rsp), %rdi movq %r15, (%rdi) leaq 0x7455b(%rip), %rsi # 0x10d5c4 leaq 0x74572(%rip), %rdx # 0x10d5e2 callq 0x29098 movb $0x1, %bpl leaq 0x58(%rsp), %rsi movq %r14, %rdi callq 0x897a8 xorl %ebp, %ebp leaq 0xce6ca(%rip), %rsi # 0x167758 leaq -0xf8a3(%rip), %rdx # 0x897f2 movq %r14, %rdi callq 0x1baf0 jmp 0x99137 movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x990c3 movq 0x68(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x990c3 jmp 0x990c0 movq %rax, %rbx callq 0x1be70 jmp 0x9915d movq %rax, %rdi callq 0x2841d movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x990ef movq 0x68(%rsp), %rsi incq %rsi callq 0xd32e8 testb %bpl, %bpl jne 0x990f9 jmp 0x9915d movq %rax, %rbx movq %r14, %rdi callq 0x1c130 jmp 0x9915d movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x9915d movq 0x68(%rsp), %rsi jmp 0x9912d jmp 0x99137 jmp 0x99137 movq %rax, %rbx movq (%r14), %rdi addq $0x10, %r14 cmpq %r14, %rdi je 0x9915d movq (%r14), %rsi incq %rsi callq 0xd32e8 jmp 0x9915d movq %rax, %rbx jmp 0x9915d movq %rax, %rbx movq 0xd2d82(%rip), %rsi # 0x16bec8 leaq 0x58(%rsp), %rdi callq 0x1bd40 leaq 0xc8(%rsp), %rdi callq 0x1bcf0 leaq 0x1d0(%rsp), %rdi callq 0x1b070 movq %rbx, %rdi callq 0x1bba0
_ZNK13UpdateFetcher13ReadSQLUpdateERKNSt10filesystem7__cxx114pathE: push rbp push r15 push r14 push rbx sub rsp, 3D8h mov rbx, rdx mov r14, rdi mov rsi, [rdx] lea rdi, [rsp+3F8h+var_228] mov edx, 8 call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode) lea rdi, [rsp+3F8h+var_1B0]; this call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) test al, al jz short loc_98E1B lea rdi, [rsp+3F8h+var_3A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, [rsp+3F8h+var_218] lea rdi, [rsp+3F8h+var_3A0] call __ZNSolsEPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::operator<<(std::streambuf *) lea rsi, [rsp+3F8h+var_398] mov rdi, r14 call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+3F8h+var_3A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+3F8h+var_330]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() lea rdi, [rsp+3F8h+var_228] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void) lea rdi, [rsp+3F8h+var_228] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov rax, r14 add rsp, 3D8h pop rbx pop r14 pop r15 pop rbp retn loc_98E1B: call _ZN3Log8instanceEv; Log::instance(void) mov r14, rax lea r15, [rsp+3F8h+var_390] mov [r15-10h], r15 lea rsi, aSqlUpdates; "sql.updates" lea rdx, aSqlUpdates+0Bh; "" lea rdi, [rsp+3F8h+var_3A0] 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 rsi, [rsp+3F8h+var_3A0] mov rdi, r14 mov edx, 1 call _ZNK3Log9ShouldLogERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevel; Log::ShouldLog(std::string const&,LogLevel) mov ebp, eax mov rdi, [rsp+3F8h+var_3A0]; this cmp rdi, r15 jz short loc_98E6F mov rsi, [rsp+3F8h+var_390] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_98E6F: test bpl, bpl jz loc_9904D call _ZN3Log8instanceEv; Log::instance(void) mov r14, rax lea rdi, [rsp+3F8h+var_3A0] mov [rdi], r15 lea rsi, aSqlUpdates; "sql.updates" lea rdx, aSqlUpdates+0Bh; "" 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+3F8h+var_3D8] lea rdx, [rsp+3F8h+var_3B8] mov rsi, rbx call _ZNKSt10filesystem7__cxx114path14generic_stringIcSt11char_traitsIcESaIcEEENSt7__cxx1112basic_stringIT_T0_T1_EERKSA_; std::filesystem::__cxx11::path::generic_string<char,std::char_traits<char>,std::allocator<char>>(std::allocator<char> const&) movups xmm0, [rsp+3F8h+var_3D8] lea r8, [rsp+3F8h+var_3B8]; int movaps xmmword ptr [r8], xmm0 lea rsi, aFailedToOpenTh; "Failed to open the sql update \"{}\" fo"... mov rdi, rsp; int mov edx, 0A8h; int mov ecx, 0Dh; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) mov rcx, [rsp+3F8h+var_3F8] mov r8, [rsp+3F8h+var_3F0] lea rsi, [rsp+3F8h+var_3A0] mov rdi, r14 mov edx, 1 call _ZN3Log10outMessageIJEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevelN3fmt3v1019basic_format_stringIcJDpNSB_13type_identityIT_E4typeEEEEDpOSE_ lea rax, [rsp+3F8h+var_3E8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98F0A mov rsi, [rsp+3F8h+var_3E8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_98F0A: lea rax, [rsp+3F8h+var_3C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98F25 mov rsi, [rsp+3F8h+var_3C8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_98F25: mov rdi, [rsp+3F8h+var_3A0]; void * cmp rdi, r15 jz loc_9904D mov rsi, [rsp+3F8h+var_390] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp loc_9904D mov r14, rdx mov rbx, rax lea rax, [rsp+3F8h+var_3E8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98F6E mov rsi, [rsp+3F8h+var_3E8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_98F6E mov r14, rdx mov rbx, rax loc_98F6E: lea rax, [rsp+3F8h+var_3C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98F91 mov rsi, [rsp+3F8h+var_3C8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_98F91 mov r14, rdx mov rbx, rax loc_98F91: mov rdi, [rsp+3F8h+var_3A0]; void * cmp rdi, r15 jz short loc_98FB2 mov rsi, [rsp+3F8h+var_390] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_98FB2 jmp short $+2 loc_98FAC: mov r14, rdx mov rbx, rax loc_98FB2: cmp r14d, 1 jnz loc_9915D mov rdi, rbx; this call ___cxa_begin_catch mov r14, rax call _ZN3Log8instanceEv; Log::instance(void) mov rbx, rax lea rdi, [rsp+3F8h+var_3A0] mov [rdi], r15 lea rsi, aServerAuthserv+0Bh; "server" lea rdx, aServerAuthserv+11h; "" 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 rax, [r14] mov rdi, r14 call qword ptr [rax+10h] mov r9, rsp mov [r9], rax lea rax, [rsp+3F8h+var_3D8] mov dword ptr [rax], 0D4h lea r10, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/SylCor"... lea rcx, aWrongFormatOcc; "Wrong format occurred ({}) at '{}:{}'" lea rsi, [rsp+3F8h+var_3A0] mov r8d, 25h ; '%' mov rdi, rbx mov edx, 2 push rax push r10 call _ZN3Log10outMessageIJPKcRA93_S1_iEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevelN3fmt3v1019basic_format_stringIcJDpNSF_13type_identityIT_E4typeEEEEDpOSI_; Log::outMessage<char const*,char const(&)[93],int>(std::string const&,LogLevel,fmt::v10::basic_format_string<char,fmt::v10::type_identity<char const*,char const(&)[93],int>::type>,char const*,char const(&)[93],int&&) add rsp, 10h mov rdi, [rsp+3F8h+var_3A0]; void * cmp rdi, r15 jz short loc_99048 mov rsi, [rsp+3F8h+var_390] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_99048: call ___cxa_end_catch loc_9904D: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+3F8h+var_3A0] mov [rdi], r15 lea rsi, aOpeningTheSqlU; "Opening the sql update failed!" lea rdx, aOpeningTheSqlU+1Eh; "" 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 bpl, 1 lea rsi, [rsp+3F8h+var_3A0] mov rdi, r14 call _ZN15UpdateExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; UpdateException::UpdateException(std::string const&) xor ebp, ebp lea rsi, _ZTI15UpdateException; lptinfo lea rdx, _ZN15UpdateExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_99137 mov rbx, rax mov rdi, [rsp+3F8h+var_3A0]; void * cmp rdi, r15 jz short loc_990C3 mov rsi, [rsp+3F8h+var_390] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_990C3 jmp short $+2 loc_990C0: mov rbx, rax loc_990C3: call ___cxa_end_catch jmp loc_9915D mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, [rsp+3F8h+var_3A0]; void * cmp rdi, r15 jz short loc_990EF mov rsi, [rsp+3F8h+var_390] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_990EF: test bpl, bpl jnz short loc_990F9 jmp short loc_9915D mov rbx, rax loc_990F9: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_9915D mov rbx, rax mov rdi, [rsp+3F8h+var_3A0] cmp rdi, r15 jz short loc_9915D mov rsi, [rsp+3F8h+var_390] jmp short loc_9912D jmp short loc_99137 jmp short loc_99137 mov rbx, rax mov rdi, [r14]; void * add r14, 10h cmp rdi, r14 jz short loc_9915D mov rsi, [r14] loc_9912D: inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_9915D loc_99137: mov rbx, rax jmp short loc_9915D mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+3F8h+var_3A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+3F8h+var_330]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_9915D: lea rdi, [rsp+3F8h+var_228] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov rdi, rbx call __Unwind_Resume
UpdateFetcher * UpdateFetcher::ReadSQLUpdate( UpdateFetcher *this, const std::filesystem::__cxx11::path *a2, _QWORD *a3) { long long v5; // r14 char ShouldLog; // bp Log *v7; // rdi long long v8; // r14 int v9; // r9d int v10; // r9d _QWORD *exception; // r14 void **v12; // [rsp+0h] [rbp-3F8h] BYREF long long v13; // [rsp+8h] [rbp-3F0h] void *v14; // [rsp+10h] [rbp-3E8h] BYREF int v15; // [rsp+18h] [rbp-3E0h] __int128 v16; // [rsp+20h] [rbp-3D8h] BYREF long long v17; // [rsp+30h] [rbp-3C8h] BYREF __int128 v18; // [rsp+40h] [rbp-3B8h] BYREF Log *v19; // [rsp+58h] [rbp-3A0h] BYREF _BYTE v20[8]; // [rsp+60h] [rbp-398h] BYREF _QWORD v21[12]; // [rsp+68h] [rbp-390h] BYREF _BYTE v22[264]; // [rsp+C8h] [rbp-330h] BYREF _BYTE v23[16]; // [rsp+1D0h] [rbp-228h] BYREF _BYTE v24[104]; // [rsp+1E0h] [rbp-218h] BYREF _BYTE v25[432]; // [rsp+248h] [rbp-1B0h] BYREF std::ifstream::basic_ifstream(v23, *a3, 8LL); if ( !(unsigned __int8)std::__basic_file<char>::is_open(v25) ) { v5 = Log::instance((Log *)v25); v19 = (Log *)v21; std::string::_M_construct<char const*>((long long)&v19, "sql.updates", (long long)""); ShouldLog = Log::ShouldLog(v5, &v19, 1LL); v7 = v19; if ( v19 != (Log *)v21 ) operator delete(v19, v21[0] + 1LL); if ( ShouldLog ) { v8 = Log::instance(v7); v19 = (Log *)v21; std::string::_M_construct<char const*>((long long)&v19, "sql.updates", (long long)""); std::filesystem::__cxx11::path::generic_string<char,std::char_traits<char>,std::allocator<char>>( &v16, (long long)a3); v18 = v16; fmt::v10::vformat[abi:cxx11]( (int)&v12, (int)"Failed to open the sql update \"{}\" for reading! Stopping the server to keep the database integrity, try t" "o identify and solve the issue or disable the database updater.", 168, 13, (int)&v18, v9, (int)v12, v13, v14, v15, v16); Log::outMessage<>(v8, (long long)&v19, 1u, (int)v12, v13, v10); if ( v12 != &v14 ) operator delete(v12, (unsigned long long)v14 + 1); if ( (long long *)v16 != &v17 ) operator delete((void *)v16, v17 + 1); if ( v19 != (Log *)v21 ) operator delete(v19, v21[0] + 1LL); } exception = __cxa_allocate_exception(0x28uLL); v19 = (Log *)v21; std::string::_M_construct<char const*>((long long)&v19, "Opening the sql update failed!", (long long)""); UpdateException::UpdateException(exception, (long long)&v19); __cxa_throw( exception, (struct type_info *)&`typeinfo for'UpdateException, (void (*)(void *))UpdateException::~UpdateException); } std::ostringstream::basic_ostringstream(&v19); std::ostream::operator<<(&v19, v24); std::stringbuf::str(this, v20); std::ostringstream::~ostringstream(&v19, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v22); std::ifstream::close(v23); std::ifstream::~ifstream(v23); return this; }
ReadSQLUpdate: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x3d8 MOV RBX,RDX MOV R14,RDI MOV RSI,qword ptr [RDX] LEA RDI,[RSP + 0x1d0] MOV EDX,0x8 CALL 0x0011b090 LEA RDI,[RSP + 0x248] CALL 0x0011c4a0 TEST AL,AL JZ 0x00198e1b LAB_00198da9: LEA RDI,[RSP + 0x58] CALL 0x0011c2e0 LEA RSI,[RSP + 0x1e0] LAB_00198dbb: LEA RDI,[RSP + 0x58] CALL 0x0011b2f0 LEA RSI,[RSP + 0x60] MOV RDI,R14 CALL 0x0011c450 MOV RSI,qword ptr [0x0026bec8] LEA RDI,[RSP + 0x58] CALL 0x0011bd40 LEA RDI,[RSP + 0xc8] CALL 0x0011bcf0 LAB_00198df0: LEA RDI,[RSP + 0x1d0] CALL 0x0011bb00 LEA RDI,[RSP + 0x1d0] CALL 0x0011b070 MOV RAX,R14 ADD RSP,0x3d8 POP RBX POP R14 POP R15 POP RBP RET LAB_00198e1b: CALL 0x001b4614 MOV R14,RAX LEA R15,[RSP + 0x68] MOV qword ptr [R15 + -0x10],R15 LAB_00198e2c: LEA RSI,[0x1fc31c] LEA RDX,[0x1fc327] LEA RDI,[RSP + 0x58] CALL 0x00129098 LAB_00198e44: LEA RSI,[RSP + 0x58] MOV RDI,R14 MOV EDX,0x1 CALL 0x001b45e4 MOV EBP,EAX MOV RDI,qword ptr [RSP + 0x58] CMP RDI,R15 JZ 0x00198e6f MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x001d32e8 LAB_00198e6f: TEST BPL,BPL JZ 0x0019904d LAB_00198e78: CALL 0x001b4614 MOV R14,RAX LEA RDI,[RSP + 0x58] MOV qword ptr [RDI],R15 LAB_00198e88: LEA RSI,[0x1fc31c] LEA RDX,[0x1fc327] CALL 0x00129098 LAB_00198e9b: LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x40] MOV RSI,RBX CALL 0x00129436 MOVUPS XMM0,xmmword ptr [RSP + 0x20] LEA R8,[RSP + 0x40] MOVAPS xmmword ptr [R8],XMM0 LAB_00198ebb: LEA RSI,[0x20d51b] MOV RDI,RSP MOV EDX,0xa8 MOV ECX,0xd CALL 0x001ea7c3 MOV RCX,qword ptr [RSP] MOV R8,qword ptr [RSP + 0x8] LAB_00198edd: LEA RSI,[RSP + 0x58] MOV RDI,R14 MOV EDX,0x1 CALL 0x001285d8 LAB_00198eef: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00198f0a MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001d32e8 LAB_00198f0a: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00198f25 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001d32e8 LAB_00198f25: MOV RDI,qword ptr [RSP + 0x58] CMP RDI,R15 JZ 0x0019904d MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x001d32e8 JMP 0x0019904d LAB_0019904d: MOV EDI,0x28 CALL 0x0011b6a0 MOV R14,RAX LEA RDI,[RSP + 0x58] MOV qword ptr [RDI],R15 LAB_00199062: LEA RSI,[0x20d5c4] LEA RDX,[0x20d5e2] CALL 0x00129098 MOV BPL,0x1 LAB_00199078: LEA RSI,[RSP + 0x58] MOV RDI,R14 CALL 0x001897a8 XOR EBP,EBP LEA RSI,[0x267758] LEA RDX,[0x1897f2] MOV RDI,R14 CALL 0x0011baf0
/* UpdateFetcher::ReadSQLUpdate(std::filesystem::__cxx11::path const&) const */ path * UpdateFetcher::ReadSQLUpdate(path *param_1) { char cVar1; Log *pLVar2; int8 uVar3; UpdateException *this; allocator *in_RDX; long *local_3f8; int8 local_3f0; long local_3e8 [2]; int4 local_3d8; int4 uStack_3d4; int4 uStack_3d0; int4 uStack_3cc; long local_3c8 [2]; int4 local_3b8; int4 uStack_3b4; int4 uStack_3b0; int4 uStack_3ac; long *local_3a0 [2]; long local_390 [12]; ios_base local_330 [264]; ifstream local_228 [16]; streambuf local_218 [504]; std::ifstream::ifstream(local_228,*(int8 *)in_RDX,8); cVar1 = std::__basic_file<char>::is_open(); if (cVar1 != '\0') { /* try { // try from 00198da9 to 00198db2 has its CatchHandler @ 00199137 */ std::__cxx11::ostringstream::ostringstream((ostringstream *)local_3a0); /* try { // try from 00198dbb to 00198dd1 has its CatchHandler @ 0019913c */ std::ostream::operator<<((ostream *)local_3a0,local_218); std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_3a0); std::ios_base::~ios_base(local_330); /* try { // try from 00198df0 to 00198dfc has its CatchHandler @ 0019911b */ std::ifstream::close(); std::ifstream::~ifstream(local_228); return param_1; } /* try { // try from 00198e1b to 00198e1f has its CatchHandler @ 00199119 */ pLVar2 = (Log *)Log::instance(); /* try { // try from 00198e2c to 00198e43 has its CatchHandler @ 00199117 */ local_3a0[0] = local_390; std::__cxx11::string::_M_construct<char_const*>(local_3a0,"sql.updates",""); /* try { // try from 00198e44 to 00198e55 has its CatchHandler @ 00199103 */ cVar1 = Log::ShouldLog(pLVar2,local_3a0,1); if (local_3a0[0] != local_390) { operator_delete(local_3a0[0],local_390[0] + 1); } if (cVar1 != '\0') { /* try { // try from 00198e78 to 00198e7c has its CatchHandler @ 00198fac */ uVar3 = Log::instance(); local_3a0[0] = local_390; /* try { // try from 00198e88 to 00198e9a has its CatchHandler @ 00198faa */ std::__cxx11::string::_M_construct<char_const*>(local_3a0,"sql.updates",""); /* try { // try from 00198e9b to 00198eac has its CatchHandler @ 00198f8b */ std::filesystem::__cxx11::path::generic_string<char,std::char_traits<char>,std::allocator<char>> ((path *)&local_3d8,in_RDX); local_3b8 = local_3d8; uStack_3b4 = uStack_3d4; uStack_3b0 = uStack_3d0; uStack_3ac = uStack_3cc; /* try { // try from 00198ebb to 00198ed3 has its CatchHandler @ 00198f68 */ fmt::v10::vformat_abi_cxx11_ (&local_3f8, "Failed to open the sql update \"{}\" for reading! Stopping the server to keep the database integrity, try to identify and solve the issue or disable the database updater." ,0xa8,0xd); /* try { // try from 00198edd to 00198eee has its CatchHandler @ 00198f45 */ Log::outMessage<>(uVar3,local_3a0,1,local_3f8,local_3f0); if (local_3f8 != local_3e8) { operator_delete(local_3f8,local_3e8[0] + 1); } if ((long *)CONCAT44(uStack_3d4,local_3d8) != local_3c8) { operator_delete((long *)CONCAT44(uStack_3d4,local_3d8),local_3c8[0] + 1); } if (local_3a0[0] != local_390) { operator_delete(local_3a0[0],local_390[0] + 1); } } this = (UpdateException *)__cxa_allocate_exception(0x28); local_3a0[0] = local_390; /* try { // try from 00199062 to 00199074 has its CatchHandler @ 001990f6 */ std::__cxx11::string::_M_construct<char_const*>(local_3a0,"Opening the sql update failed!",""); /* try { // try from 00199078 to 0019909c has its CatchHandler @ 001990d5 */ UpdateException::UpdateException(this,(string *)local_3a0); /* WARNING: Subroutine does not return */ __cxa_throw(this,&UpdateException::typeinfo,UpdateException::~UpdateException); }
28,844
maria_page_filler_set_normal
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_filler_set_normal(PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; #ifdef DBUG_ASSERT_EXISTS pgcache_page_no_t page_no= args->pageno; #endif MARIA_SHARE *share= (MARIA_SHARE *)args->data; DBUG_ENTER("maria_page_filler_set_normal"); DBUG_ASSERT(page_no != 0); /* Catches some simple bugs */ int4store_aligned(page + share->block_size - CRC_SIZE, MARIA_NO_CRC_NORMAL_PAGE); DBUG_RETURN(0); }
O3
c
maria_page_filler_set_normal: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x10(%rdi), %rcx movl 0x7bc(%rcx), %ecx movl $0xffffffff, -0x4(%rax,%rcx) # imm = 0xFFFFFFFF xorl %eax, %eax popq %rbp retq
maria_page_filler_set_normal: push rbp mov rbp, rsp mov rax, [rdi] mov rcx, [rdi+10h] mov ecx, [rcx+7BCh] mov dword ptr [rax+rcx-4], 0FFFFFFFFh xor eax, eax pop rbp retn
long long maria_page_filler_set_normal(_QWORD *a1) { *(_DWORD *)(*a1 + *(unsigned int *)(a1[2] + 1980LL) - 4LL) = -1; return 0LL; }
maria_page_filler_set_normal: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x10] MOV ECX,dword ptr [RCX + 0x7bc] MOV dword ptr [RAX + RCX*0x1 + -0x4],0xffffffff XOR EAX,EAX POP RBP RET
int8 maria_page_filler_set_normal(long *param_1) { *(int4 *)(*param_1 + -4 + (ulong)*(uint *)(param_1[2] + 0x7bc)) = 0xffffffff; return 0; }
28,845
ma_delete_dynamic_element
eloqsql/libmariadb/libmariadb/ma_array.c
void ma_delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx) { char *ptr=array->buffer+array->size_of_element*idx; array->elements--; memmove(ptr,ptr+array->size_of_element, (array->elements-idx)*array->size_of_element); }
O3
c
ma_delete_dynamic_element: pushq %rbp movq %rsp, %rbp movl 0x8(%rdi), %edx movl 0x14(%rdi), %ecx movl %ecx, %eax imull %esi, %eax addq (%rdi), %rax decl %edx movl %edx, 0x8(%rdi) subl %esi, %edx imull %ecx, %edx movq %rcx, %rsi addq %rax, %rsi movq %rax, %rdi popq %rbp jmp 0x37150
ma_delete_dynamic_element: push rbp mov rbp, rsp mov edx, [rdi+8] mov ecx, [rdi+14h] mov eax, ecx imul eax, esi add rax, [rdi] dec edx mov [rdi+8], edx sub edx, esi imul edx, ecx mov rsi, rcx add rsi, rax mov rdi, rax pop rbp jmp _memmove
long long ma_delete_dynamic_element(long long a1, int a2) { long long v2; // rcx long long v3; // rax int v4; // edx v2 = *(unsigned int *)(a1 + 20); v3 = *(_QWORD *)a1 + (unsigned int)(a2 * *(_DWORD *)(a1 + 20)); v4 = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 8) = v4; return memmove(v3, v3 + v2, (unsigned int)(v2 * (v4 - a2))); }
ma_delete_dynamic_element: PUSH RBP MOV RBP,RSP MOV EDX,dword ptr [RDI + 0x8] MOV ECX,dword ptr [RDI + 0x14] MOV EAX,ECX IMUL EAX,ESI ADD RAX,qword ptr [RDI] DEC EDX MOV dword ptr [RDI + 0x8],EDX SUB EDX,ESI IMUL EDX,ECX MOV RSI,RCX ADD RSI,RAX MOV RDI,RAX POP RBP JMP 0x00137150
void ma_delete_dynamic_element(long *param_1,int param_2) { uint uVar1; void *__dest; int iVar2; uVar1 = *(uint *)((long)param_1 + 0x14); __dest = (void *)((ulong)(uVar1 * param_2) + *param_1); iVar2 = (int)param_1[1] + -1; *(int *)(param_1 + 1) = iVar2; memmove(__dest,(void *)((ulong)uVar1 + (long)__dest),(ulong)((iVar2 - param_2) * uVar1)); return; }
28,846
mysql_find_charset_nr
eloqsql/libmariadb/libmariadb/ma_charset.c
const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr) { const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets; if (my_collation_id_is_uca1400(charsetnr)) charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr); do { if (c->nr == charsetnr) { return(c); } ++c; } while (c[0].nr != 0); return(NULL); }
O0
c
mysql_find_charset_nr: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) leaq 0x1d374e(%rip), %rax # 0x29fb80 movq %rax, -0x18(%rbp) movl -0xc(%rbp), %edi callq 0xcc490 cmpb $0x0, %al je 0xcc44d movl -0xc(%rbp), %edi callq 0xcc4c0 movl %eax, -0xc(%rbp) jmp 0xcc44f movq -0x18(%rbp), %rax movl (%rax), %eax cmpl -0xc(%rbp), %eax jne 0xcc464 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xcc481 movq -0x18(%rbp), %rax addq $0x48, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0xcc44f movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_find_charset_nr: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi lea rax, mariadb_compiled_charsets mov [rbp+var_18], rax mov edi, [rbp+var_C] call my_collation_id_is_uca1400 cmp al, 0 jz short loc_CC44D mov edi, [rbp+var_C] call my_uca1400_collation_id_uca400_compat mov [rbp+var_C], eax loc_CC44D: jmp short $+2 loc_CC44F: mov rax, [rbp+var_18] mov eax, [rax] cmp eax, [rbp+var_C] jnz short loc_CC464 mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_CC481 loc_CC464: mov rax, [rbp+var_18] add rax, 48h ; 'H' mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_CC44F mov [rbp+var_8], 0 loc_CC481: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
_DWORD * mysql_find_charset_nr(unsigned int a1) { _DWORD *v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+14h] [rbp-Ch] v3 = a1; v2 = &mariadb_compiled_charsets; if ( (unsigned __int8)my_collation_id_is_uca1400(a1) ) v3 = my_uca1400_collation_id_uca400_compat(a1); do { if ( *v2 == v3 ) return v2; v2 += 18; } while ( *v2 ); return 0LL; }
mysql_find_charset_nr: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI LEA RAX,[0x39fb80] MOV qword ptr [RBP + -0x18],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001cc490 CMP AL,0x0 JZ 0x001cc44d MOV EDI,dword ptr [RBP + -0xc] CALL 0x001cc4c0 MOV dword ptr [RBP + -0xc],EAX LAB_001cc44d: JMP 0x001cc44f LAB_001cc44f: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x001cc464 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001cc481 LAB_001cc464: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x48 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x001cc44f MOV qword ptr [RBP + -0x8],0x0 LAB_001cc481: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int * mysql_find_charset_nr(int param_1) { char cVar1; int *local_20; int local_14; local_20 = &mariadb_compiled_charsets; cVar1 = my_collation_id_is_uca1400(param_1); local_14 = param_1; if (cVar1 != '\0') { local_14 = my_uca1400_collation_id_uca400_compat(param_1); } do { if (*local_20 == local_14) { return local_20; } local_20 = local_20 + 0x12; } while (*local_20 != 0); return (int *)0x0; }
28,847
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parse(bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)
monkey531[P]llama/common/json.hpp
void parse(const bool strict, BasicJsonType& result) { if (callback) { json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions); sax_parse_internal(&sdp); // in strict mode, input must be completely read if (strict && (get_token() != token_type::end_of_input)) { sdp.parse_error(m_lexer.get_position(), m_lexer.get_token_string(), parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); } // in case of an error, return discarded value if (sdp.is_errored()) { result = value_t::discarded; return; } // set top-level value to null if it was discarded by the callback // function if (result.is_discarded()) { result = nullptr; } } else { json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions); sax_parse_internal(&sdp); // in strict mode, input must be completely read if (strict && (get_token() != token_type::end_of_input)) { sdp.parse_error(m_lexer.get_position(), m_lexer.get_token_string(), parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); } // in case of an error, return discarded value if (sdp.is_errored()) { result = value_t::discarded; return; } } result.assert_invariant(); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parse(bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1c0, %rsp # imm = 0x1C0 movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r15 cmpq $0x0, 0x10(%rdi) je 0x40e4c leaq 0xc8(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x40c9e movzbl 0xc0(%r15), %ecx leaq 0x108(%rsp), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x426ea leaq 0xc8(%rsp), %rdi callq 0x4b47a leaq 0x108(%rsp), %rsi movq %r15, %rdi callq 0x427ae testb %bpl, %bpl je 0x40e22 movq %r15, %rdi callq 0x41850 cmpl $0xf, %eax je 0x40e22 leaq 0x28(%r15), %rsi movq 0x48(%r15), %r14 leaq 0x70(%rsp), %rdi callq 0x432ca leaq 0x48(%r15), %rax movq 0x10(%rax), %rcx movq %rcx, 0x20(%rsp) movups (%rax), %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0x7247d(%rip), %rsi # 0xb3216 leaq 0x30(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x291dc leaq 0x50(%rsp), %rdi pushq $0xf popq %rdx leaq 0x30(%rsp), %rcx movq %r15, %rsi callq 0x434a8 leaq 0x90(%rsp), %rdi pushq $0x65 popq %rsi leaq 0x10(%rsp), %rdx leaq 0x50(%rsp), %rcx xorl %r8d, %r8d callq 0x43372 leaq 0x108(%rsp), %rdi leaq 0x70(%rsp), %rdx leaq 0x90(%rsp), %rcx movq %r14, %rsi callq 0x43286 leaq 0x90(%rsp), %rdi callq 0x43644 leaq 0x50(%rsp), %rdi callq 0x254d8 leaq 0x30(%rsp), %rdi callq 0x254d8 leaq 0x70(%rsp), %rdi callq 0x254d8 movb 0x180(%rsp), %bpl cmpb $0x1, %bpl jne 0x40f94 leaq 0xf8(%rsp), %r14 pushq $0x9 popq %rsi movq %r14, %rdi callq 0x43668 jmp 0x40fab movb 0xc0(%r15), %al leaq 0x110(%rsp), %r14 movq %rbx, -0x8(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%r14) movups %xmm0, 0x10(%r14) movb $0x0, 0x20(%r14) movb %al, 0x21(%r14) leaq 0x108(%rsp), %rsi movq %r15, %rdi callq 0x436fe testb %bpl, %bpl je 0x40f55 movq %r15, %rdi callq 0x41850 cmpl $0xf, %eax je 0x40f55 leaq 0x28(%r15), %rsi movq 0x48(%r15), %r12 leaq 0x70(%rsp), %rdi callq 0x432ca leaq 0x48(%r15), %rax movq 0x10(%rax), %rcx movq %rcx, 0x20(%rsp) movups (%rax), %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0x7234a(%rip), %rsi # 0xb3216 leaq 0x30(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x291dc leaq 0x50(%rsp), %rdi pushq $0xf popq %rdx leaq 0x30(%rsp), %rcx movq %r15, %rsi callq 0x434a8 leaq 0x90(%rsp), %rdi pushq $0x65 popq %rsi leaq 0x10(%rsp), %rdx leaq 0x50(%rsp), %rcx xorl %r8d, %r8d callq 0x43372 leaq 0x108(%rsp), %rdi leaq 0x70(%rsp), %rdx leaq 0x90(%rsp), %rcx movq %r12, %rsi callq 0x441d6 leaq 0x90(%rsp), %rdi callq 0x43644 leaq 0x50(%rsp), %rdi callq 0x254d8 leaq 0x30(%rsp), %rdi callq 0x254d8 leaq 0x70(%rsp), %rdi callq 0x254d8 cmpb $0x1, 0x130(%rsp) jne 0x40fd2 leaq 0xb8(%rsp), %rdi pushq $0x9 popq %rsi callq 0x43668 leaq 0xb8(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x4367e movq %r15, %rdi callq 0x40bea movq %r14, %rdi callq 0x44782 jmp 0x40fe5 cmpb $0x9, (%rbx) jne 0x40fbe leaq 0xe8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x40bfe movq %rbx, %rdi movq %r14, %rsi callq 0x4367e movq %r14, %rdi callq 0x40bea leaq 0x108(%rsp), %rdi callq 0x436c2 testb %bpl, %bpl je 0x40fda jmp 0x40fe5 movq %r14, %rdi callq 0x44782 pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x410c4 addq $0x1c0, %rsp # imm = 0x1C0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x43644 jmp 0x4100a movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x254d8 jmp 0x41019 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x254d8 jmp 0x41028 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x254d8 jmp 0x4108c jmp 0x41089 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x43644 jmp 0x4104b movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x254d8 jmp 0x4105a movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x254d8 jmp 0x41069 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x254d8 jmp 0x41099 jmp 0x41096 movq %rax, %rbx leaq 0xc8(%rsp), %rdi callq 0x4b47a jmp 0x410a6 movq %rax, %rbx movq %r14, %rdi callq 0x44782 jmp 0x410a6 movq %rax, %rbx leaq 0x108(%rsp), %rdi callq 0x436c2 movq %rbx, %rdi callq 0x25250
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_: push rbp push r15 push r14 push r12 push rbx sub rsp, 1C0h mov rbx, rdx mov ebp, esi mov r15, rdi cmp qword ptr [rdi+10h], 0 jz loc_40E4C lea r14, [rsp+1E8h+var_120] mov rdi, r14 mov rsi, r15 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) movzx ecx, byte ptr [r15+0C0h] lea rdi, [rsp+1E8h+var_E0] mov rsi, rbx mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool) lea rdi, [rsp+1E8h+var_120]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rsi, [rsp+1E8h+var_E0] mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18sax_parse_internalINS1_28json_sax_dom_callback_parserISF_EEEEbPT_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>(nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *) test bpl, bpl jz loc_40E22 mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE9get_tokenEv; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token(void) cmp eax, 0Fh jz loc_40E22 lea rsi, [r15+28h] mov r14, [r15+48h] lea rdi, [rsp+1E8h+var_178] call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea rax, [r15+48h] mov rcx, [rax+10h] mov qword ptr [rsp+1E8h+var_1C8], rcx; int movups xmm0, xmmword ptr [rax] movaps xmmword ptr [rsp+1E8h+var_1D8], xmm0; char lea rsi, aInvalidValue+8; "value" lea rdi, [rsp+1E8h+var_1B8] lea rdx, [rsp+1E8h+var_1D9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+1E8h+var_198] push 0Fh pop rdx lea rcx, [rsp+1E8h+var_1B8] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type,std::string const&) lea rdi, [rsp+1E8h+var_158]; this push 65h ; 'e' pop rsi; int lea rdx, [rsp+1E8h+var_1D8] lea rcx, [rsp+1E8h+var_198] xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ lea rdi, [rsp+1E8h+var_E0] lea rdx, [rsp+1E8h+var_178] lea rcx, [rsp+1E8h+var_158] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11parse_errorINS1_11parse_errorEEEbmRKSB_RKT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>(ulong,std::string const&,nlohmann::json_abi_v3_11_3::detail::parse_error const&) lea rdi, [rsp+1E8h+var_158]; void * call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; nlohmann::json_abi_v3_11_3::detail::exception::~exception() lea rdi, [rsp+1E8h+var_198]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1E8h+var_1B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1E8h+var_178]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_40E22: mov bpl, [rsp+1E8h+var_68] cmp bpl, 1 jnz loc_40F94 lea r14, [rsp+1E8h+var_F0] push 9 pop rsi mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t) jmp loc_40FAB loc_40E4C: mov al, [r15+0C0h] lea r14, [rsp+1E8h+var_D8] mov [r14-8], rbx xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 movups xmmword ptr [r14+10h], xmm0 mov byte ptr [r14+20h], 0 mov [r14+21h], al lea rsi, [rsp+1E8h+var_E0] mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18sax_parse_internalINS1_19json_sax_dom_parserISF_EEEEbPT_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>(nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *) test bpl, bpl jz loc_40F55 mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE9get_tokenEv; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token(void) cmp eax, 0Fh jz loc_40F55 lea rsi, [r15+28h] mov r12, [r15+48h] lea rdi, [rsp+1E8h+var_178] call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea rax, [r15+48h] mov rcx, [rax+10h] mov qword ptr [rsp+1E8h+var_1C8], rcx; int movups xmm0, xmmword ptr [rax] movaps xmmword ptr [rsp+1E8h+var_1D8], xmm0; char lea rsi, aInvalidValue+8; "value" lea rdi, [rsp+1E8h+var_1B8] lea rdx, [rsp+1E8h+var_1D9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+1E8h+var_198] push 0Fh pop rdx lea rcx, [rsp+1E8h+var_1B8] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type,std::string const&) lea rdi, [rsp+1E8h+var_158]; this push 65h ; 'e' pop rsi; int lea rdx, [rsp+1E8h+var_1D8] lea rcx, [rsp+1E8h+var_198] xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ lea rdi, [rsp+1E8h+var_E0] lea rdx, [rsp+1E8h+var_178] lea rcx, [rsp+1E8h+var_158] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11parse_errorINS1_11parse_errorEEEbmRKSB_RKT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>(ulong,std::string const&,nlohmann::json_abi_v3_11_3::detail::parse_error const&) lea rdi, [rsp+1E8h+var_158]; void * call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; nlohmann::json_abi_v3_11_3::detail::exception::~exception() lea rdi, [rsp+1E8h+var_198]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1E8h+var_1B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1E8h+var_178]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_40F55: cmp [rsp+1E8h+var_B8], 1 jnz short loc_40FD2 lea rdi, [rsp+1E8h+var_130] push 9 pop rsi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t) lea r15, [rsp+1E8h+var_130] mov rdi, rbx mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rdi, r14 call _ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::~_Vector_base() jmp short loc_40FE5 loc_40F94: cmp byte ptr [rbx], 9 jnz short loc_40FBE lea r14, [rsp+1E8h+var_100] mov rdi, r14 xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) loc_40FAB: mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_40FBE: lea rdi, [rsp+1E8h+var_E0] call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~json_sax_dom_callback_parser() test bpl, bpl jz short loc_40FDA jmp short loc_40FE5 loc_40FD2: mov rdi, r14 call _ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::~_Vector_base() loc_40FDA: push 1 pop rsi mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_40FE5: add rsp, 1C0h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_88]; void * call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; nlohmann::json_abi_v3_11_3::detail::exception::~exception() jmp short loc_4100A mov rbx, rax loc_4100A: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_41019 mov rbx, rax loc_41019: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_41028 mov rbx, rax loc_41028: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4108C jmp short loc_41089 mov rbx, rax lea rdi, [rsp+arg_88]; void * call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; nlohmann::json_abi_v3_11_3::detail::exception::~exception() jmp short loc_4104B mov rbx, rax loc_4104B: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4105A mov rbx, rax loc_4105A: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_41069 mov rbx, rax loc_41069: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_41099 jmp short loc_41096 mov rbx, rax lea rdi, [rsp+arg_C0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_410A6 loc_41089: mov rbx, rax loc_4108C: mov rdi, r14 call _ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::~_Vector_base() jmp short loc_410A6 loc_41096: mov rbx, rax loc_41099: lea rdi, [rsp+arg_100] call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~json_sax_dom_callback_parser() loc_410A6: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( long long a1, char a2, _BYTE *a3, int a4, int a5, int a6) { int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // r14 int v12; // r8d int v13; // r9d char v14; // bp _BYTE *v15; // r14 char v16; // al long long v17; // r12 int v18; // r8d int v19; // r9d long long result; // rax int v21; // [rsp+0h] [rbp-1E8h] int v22; // [rsp+8h] [rbp-1E0h] char v23[16]; // [rsp+10h] [rbp-1D8h] char v24[16]; // [rsp+10h] [rbp-1D8h] int v25[2]; // [rsp+20h] [rbp-1C8h] int v26[2]; // [rsp+20h] [rbp-1C8h] int v27; // [rsp+28h] [rbp-1C0h] long long v28; // [rsp+30h] [rbp-1B8h] BYREF int v29; // [rsp+38h] [rbp-1B0h] int v30; // [rsp+40h] [rbp-1A8h] int v31; // [rsp+48h] [rbp-1A0h] char v32[8]; // [rsp+50h] [rbp-198h] BYREF int v33; // [rsp+58h] [rbp-190h] int v34; // [rsp+60h] [rbp-188h] int v35; // [rsp+68h] [rbp-180h] char v36[8]; // [rsp+70h] [rbp-178h] BYREF int v37; // [rsp+78h] [rbp-170h] int v38; // [rsp+80h] [rbp-168h] int v39; // [rsp+88h] [rbp-160h] char v40[40]; // [rsp+90h] [rbp-158h] BYREF _BYTE v41[16]; // [rsp+B8h] [rbp-130h] BYREF _OWORD v42[2]; // [rsp+C8h] [rbp-120h] BYREF _BYTE v43[16]; // [rsp+E8h] [rbp-100h] BYREF _BYTE v44[16]; // [rsp+F8h] [rbp-F0h] BYREF _BYTE *v45; // [rsp+108h] [rbp-E0h] BYREF _BYTE v46[32]; // [rsp+110h] [rbp-D8h] BYREF char v47; // [rsp+130h] [rbp-B8h] char v48; // [rsp+131h] [rbp-B7h] char v49; // [rsp+180h] [rbp-68h] if ( !*(_QWORD *)(a1 + 16) ) { v16 = *(_BYTE *)(a1 + 192); v45 = a3; memset(v46, 0, sizeof(v46)); v47 = 0; v48 = v16; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>( a1, (unsigned int)&v45, (_DWORD)a3, a4, a5, a6); if ( a2 && (unsigned int)nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token(a1) != 15 ) { v17 = *(_QWORD *)(a1 + 72); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( v36, a1 + 40); *(_QWORD *)v26 = *(_QWORD *)(a1 + 88); *(_OWORD *)v24 = *(_OWORD *)(a1 + 72); std::string::basic_string<std::allocator<char>>(&v28, (long long)"value"); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( (unsigned int)v32, a1, 15, (unsigned int)&v28, v18, v19); ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( (nlohmann::json_abi_v3_11_3::detail::parse_error *)v40, 101, v21, v22, v24[0], *(int *)&v24[8], v26[0], v27, v28, v29, v30, v31, v32[0], v33, v34, v35, v36[0], v37, v38, v39, v40[0]); nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>( &v45, v17, v36, v40); nlohmann::json_abi_v3_11_3::detail::exception::~exception(v40); std::string::~string(v32); std::string::~string(&v28); std::string::~string(v36); } if ( v47 == 1 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v41, 9LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( a3, v41); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v41); return std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::~_Vector_base(v46); } std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::~_Vector_base(v46); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( a3, 1LL); } std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( v42, a1); nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( &v45, a3, v42, *(unsigned __int8 *)(a1 + 192)); std::_Function_base::~_Function_base((std::_Function_base *)v42); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>( a1, (unsigned int)&v45, v7, v8, v9, v10); if ( a2 ) { if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token(a1) != 15 ) { v11 = *(_QWORD *)(a1 + 72); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( v36, a1 + 40); *(_QWORD *)v25 = *(_QWORD *)(a1 + 88); *(_OWORD *)v23 = *(_OWORD *)(a1 + 72); std::string::basic_string<std::allocator<char>>(&v28, (long long)"value"); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( (unsigned int)v32, a1, 15, (unsigned int)&v28, v12, v13); ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( (nlohmann::json_abi_v3_11_3::detail::parse_error *)v40, 101, v21, v22, v23[0], *(int *)&v23[8], v25[0], v27, v28, v29, v30, v31, v32[0], v33, v34, v35, v36[0], v37, v38, v39, v40[0]); nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error>( &v45, v11, v36, v40); nlohmann::json_abi_v3_11_3::detail::exception::~exception(v40); std::string::~string(v32); std::string::~string(&v28); std::string::~string(v36); } } v14 = v49; if ( v49 == 1 ) { v15 = v44; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v44, 9LL); } else { if ( *a3 != 9 ) goto LABEL_15; v15 = v43; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)v43); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( a3, v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v15); LABEL_15: result = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~json_sax_dom_callback_parser(&v45); if ( !v14 ) return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( a3, 1LL); return result; }
parse: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1c0 MOV RBX,RDX MOV EBP,ESI MOV R15,RDI CMP qword ptr [RDI + 0x10],0x0 JZ 0x00140e4c LEA R14,[RSP + 0xc8] MOV RDI,R14 MOV RSI,R15 CALL 0x00140c9e MOVZX ECX,byte ptr [R15 + 0xc0] LAB_00140d21: LEA RDI,[RSP + 0x108] MOV RSI,RBX MOV RDX,R14 CALL 0x001426ea LEA RDI,[RSP + 0xc8] CALL 0x0014b47a LAB_00140d41: LEA RSI,[RSP + 0x108] MOV RDI,R15 CALL 0x001427ae TEST BPL,BPL JZ 0x00140e22 MOV RDI,R15 CALL 0x00141850 CMP EAX,0xf JZ 0x00140e22 LEA RSI,[R15 + 0x28] MOV R14,qword ptr [R15 + 0x48] LAB_00140d73: LEA RDI,[RSP + 0x70] CALL 0x001432ca LEA RAX,[R15 + 0x48] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x20],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_00140d92: LEA RSI,[0x1b3216] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0xf] CALL 0x001291dc LAB_00140da8: LEA RDI,[RSP + 0x50] PUSH 0xf POP RDX LEA RCX,[RSP + 0x30] MOV RSI,R15 CALL 0x001434a8 LAB_00140dbd: LEA RDI,[RSP + 0x90] PUSH 0x65 POP RSI LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0x50] XOR R8D,R8D CALL 0x00143372 LAB_00140dda: LEA RDI,[RSP + 0x108] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x90] MOV RSI,R14 CALL 0x00143286 LEA RDI,[RSP + 0x90] CALL 0x00143644 LEA RDI,[RSP + 0x50] CALL 0x001254d8 LEA RDI,[RSP + 0x30] CALL 0x001254d8 LEA RDI,[RSP + 0x70] CALL 0x001254d8 LAB_00140e22: MOV BPL,byte ptr [RSP + 0x180] CMP BPL,0x1 JNZ 0x00140f94 LEA R14,[RSP + 0xf8] LAB_00140e3c: PUSH 0x9 POP RSI MOV RDI,R14 CALL 0x00143668 JMP 0x00140fab LAB_00140e4c: MOV AL,byte ptr [R15 + 0xc0] LEA R14,[RSP + 0x110] MOV qword ptr [R14 + -0x8],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOV byte ptr [R14 + 0x20],0x0 MOV byte ptr [R14 + 0x21],AL LAB_00140e74: LEA RSI,[RSP + 0x108] MOV RDI,R15 CALL 0x001436fe TEST BPL,BPL JZ 0x00140f55 MOV RDI,R15 CALL 0x00141850 CMP EAX,0xf JZ 0x00140f55 LEA RSI,[R15 + 0x28] MOV R12,qword ptr [R15 + 0x48] LAB_00140ea6: LEA RDI,[RSP + 0x70] CALL 0x001432ca LEA RAX,[R15 + 0x48] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x20],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_00140ec5: LEA RSI,[0x1b3216] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0xf] CALL 0x001291dc LAB_00140edb: LEA RDI,[RSP + 0x50] PUSH 0xf POP RDX LEA RCX,[RSP + 0x30] MOV RSI,R15 CALL 0x001434a8 LAB_00140ef0: LEA RDI,[RSP + 0x90] PUSH 0x65 POP RSI LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0x50] XOR R8D,R8D CALL 0x00143372 LAB_00140f0d: LEA RDI,[RSP + 0x108] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x90] MOV RSI,R12 CALL 0x001441d6 LEA RDI,[RSP + 0x90] CALL 0x00143644 LEA RDI,[RSP + 0x50] CALL 0x001254d8 LEA RDI,[RSP + 0x30] CALL 0x001254d8 LEA RDI,[RSP + 0x70] CALL 0x001254d8 LAB_00140f55: CMP byte ptr [RSP + 0x130],0x1 JNZ 0x00140fd2 LAB_00140f5f: LEA RDI,[RSP + 0xb8] PUSH 0x9 POP RSI CALL 0x00143668 LAB_00140f6f: LEA R15,[RSP + 0xb8] MOV RDI,RBX MOV RSI,R15 CALL 0x0014367e MOV RDI,R15 CALL 0x00140bea MOV RDI,R14 CALL 0x00144782 JMP 0x00140fe5 LAB_00140f94: CMP byte ptr [RBX],0x9 JNZ 0x00140fbe LEA R14,[RSP + 0xe8] MOV RDI,R14 XOR ESI,ESI CALL 0x00140bfe LAB_00140fab: MOV RDI,RBX MOV RSI,R14 CALL 0x0014367e MOV RDI,R14 CALL 0x00140bea LAB_00140fbe: LEA RDI,[RSP + 0x108] CALL 0x001436c2 TEST BPL,BPL JZ 0x00140fda JMP 0x00140fe5 LAB_00140fd2: MOV RDI,R14 CALL 0x00144782 LAB_00140fda: PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x001410c4 LAB_00140fe5: ADD RSP,0x1c0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::parse(bool, 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>&) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this,bool param_1,basic_json *param_2) { ulong uVar1; int iVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this_00; allocator local_1d9; int8 local_1d8; int8 uStack_1d0; int8 local_1c8; string local_1b8 [32]; string local_198 [32]; string local_178 [32]; parse_error local_158 [40]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_130 [16]; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> local_120 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_100 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_f0 [16]; basic_json *local_e0; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; char local_b8; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_b7; char local_68; if (*(long *)(this + 0x10) == 0) { local_b7 = this[0xc0]; local_d8 = 0; uStack_d0 = 0; local_c8 = 0; uStack_c0 = 0; local_b8 = '\0'; /* try { // try from 00140e74 to 00140e94 has its CatchHandler @ 00141089 */ local_e0 = param_2; sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> (this,(json_sax_dom_parser *)&local_e0); if ((param_1) && (iVar2 = get_token(this), iVar2 != 0xf)) { uVar1 = *(ulong *)(this + 0x48); /* try { // try from 00140ea6 to 00140eaf has its CatchHandler @ 00141034 */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_1c8 = *(int8 *)(this + 0x58); local_1d8 = *(int8 *)(this + 0x48); uStack_1d0 = *(int8 *)(this + 0x50); /* try { // try from 00140ec5 to 00140eda has its CatchHandler @ 00141025 */ std::__cxx11::string::string<std::allocator<char>>(local_1b8,"value",&local_1d9); /* try { // try from 00140edb to 00140eef has its CatchHandler @ 00141016 */ exception_message(local_198,this,0xf,local_1b8); /* try { // try from 00140ef0 to 00140f0c has its CatchHandler @ 00141007 */ _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (local_158,0x65,&local_1d8,local_198,0); /* try { // try from 00140f0d to 00140f29 has its CatchHandler @ 00140ff5 */ json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error> ((json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_e0,uVar1,local_178,local_158); exception::~exception((exception *)local_158); std::__cxx11::string::~string(local_198); std::__cxx11::string::~string(local_1b8); std::__cxx11::string::~string(local_178); } if (local_b8 == '\x01') { /* try { // try from 00140f5f to 00140f6e has its CatchHandler @ 00141089 */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_130,9); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_2,local_130); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_130); std:: _Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::~_Vector_base((_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)&local_d8); return; } std:: _Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::~_Vector_base((_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)&local_d8); goto LAB_00140fda; } std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(local_120,this); /* try { // try from 00140d21 to 00140d33 has its CatchHandler @ 00141077 */ json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser ((json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_e0,param_2,local_120,this[0xc0]); std::_Function_base::~_Function_base((_Function_base *)local_120); /* try { // try from 00140d41 to 00140d61 has its CatchHandler @ 00141096 */ sax_parse_internal<nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> (this,(json_sax_dom_callback_parser *)&local_e0); if ((param_1) && (iVar2 = get_token(this), iVar2 != 0xf)) { uVar1 = *(ulong *)(this + 0x48); /* try { // try from 00140d73 to 00140d7c has its CatchHandler @ 00141075 */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_1c8 = *(int8 *)(this + 0x58); local_1d8 = *(int8 *)(this + 0x48); uStack_1d0 = *(int8 *)(this + 0x50); /* try { // try from 00140d92 to 00140da7 has its CatchHandler @ 00141066 */ std::__cxx11::string::string<std::allocator<char>>(local_1b8,"value",&local_1d9); /* try { // try from 00140da8 to 00140dbc has its CatchHandler @ 00141057 */ exception_message(local_198,this,0xf,local_1b8); /* try { // try from 00140dbd to 00140dd9 has its CatchHandler @ 00141048 */ _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (local_158,0x65,&local_1d8,local_198,0); /* try { // try from 00140dda to 00140df6 has its CatchHandler @ 00141036 */ json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::parse_error<nlohmann::json_abi_v3_11_3::detail::parse_error> ((json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_e0,uVar1,local_178,local_158); exception::~exception((exception *)local_158); std::__cxx11::string::~string(local_198); std::__cxx11::string::~string(local_1b8); std::__cxx11::string::~string(local_178); } if (local_68 == '\x01') { this_00 = local_f0; /* try { // try from 00140e3c to 00140e46 has its CatchHandler @ 00141096 */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(this_00,9); LAB_00140fab: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_2,this_00); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(this_00); } else if (*param_2 == '\t') { this_00 = local_100; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((_func_decltype_nullptr *)this_00); goto LAB_00140fab; } json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::~json_sax_dom_callback_parser ((json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_e0); if (local_68 != '\0') { return; } LAB_00140fda: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_2,0)); return; }
28,848
minja::Value::contains(char const*) const
monkey531[P]llama/common/minja.hpp
bool contains(const char * key) const { return contains(std::string(key)); }
O3
cpp
minja::Value::contains(char const*) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x23586 movq %rbx, %rdi movq %r14, %rsi callq 0x676c8 movl %eax, %ebx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x812a6 movq 0x18(%rsp), %rsi incq %rsi callq 0x197f0 movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x812ce movq 0x18(%rsp), %rsi incq %rsi callq 0x197f0 movq %rbx, %rdi callq 0x19dc0
_ZNK5minja5Value8containsEPKc: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) mov ebx, eax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_812A6 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_812A6: mov eax, ebx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_812CE mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_812CE: mov rdi, rbx call __Unwind_Resume
long long minja::Value::contains(minja::Value *this, const char *a2) { unsigned int v2; // eax unsigned int v3; // ebx long long *v5; // [rsp+8h] [rbp-30h] BYREF long long v6; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(&v5, (long long)a2); LOBYTE(v2) = minja::Value::contains((long long)this); v3 = v2; if ( v5 != &v6 ) operator delete(v5, v6 + 1); return v3; }
contains: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x00123586 LAB_0018127e: MOV RDI,RBX MOV RSI,R14 CALL 0x001676c8 LAB_00181289: MOV EBX,EAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001812a6 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001197f0 LAB_001812a6: MOV EAX,EBX ADD RSP,0x28 POP RBX POP R14 RET
/* minja::Value::contains(char const*) const */ int4 __thiscall minja::Value::contains(Value *this,char *param_1) { int4 uVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 0018127e to 00181288 has its CatchHandler @ 001812b0 */ uVar1 = contains(this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return uVar1; }
28,849
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O2
cpp
common_chat_templates_from_model(llama_model const*, 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, %rbp movq %rsi, %r13 movq %rdi, %rbx movq %rsi, %rdi callq 0x25220 movq %rax, %r14 movq %rax, 0x8(%rsp) leaq 0x10(%rsp), %rdi movq %rbp, %rsi callq 0x24c40 leaq 0x30(%rsp), %r12 movq %r12, %rdi movq %rbp, %rsi callq 0x24c40 movb $0x1, %r15b cmpq $0x0, 0x8(%rbp) jne 0x5c0f6 movq %r13, %rdi xorl %esi, %esi callq 0x243e0 testq %rax, %rax setne %r15b je 0x5c0d2 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x25170 leaq 0x5c438(%rip), %rsi # 0xb8511 movq %r13, %rdi callq 0x243e0 testq %rax, %rax je 0x5c0f6 leaq 0x30(%rsp), %rdi movq %rax, %rsi callq 0x25170 movb $0x1, %r15b cmpq $0x0, 0x18(%rsp) je 0x5c113 leaq 0x5c415(%rip), %rsi # 0xb851a leaq 0x10(%rsp), %rdi callq 0x2cbe9 testb %al, %al je 0x5c13d cmpq $0x0, 0x38(%rsp) je 0x5c12c leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x244e0 jmp 0x5c13d leaq 0x5c3ee(%rip), %rsi # 0xb8521 leaq 0x10(%rsp), %rdi callq 0x25170 leaq 0x10(%rsp), %rax movq %rax, 0x50(%rsp) movq %r12, 0x58(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x60(%rsp) movq %r14, %rdi callq 0x247e0 leaq 0x5c502(%rip), %rcx # 0xb8667 leaq 0x5c4ff(%rip), %r8 # 0xb866b leaq 0x88(%rsp), %rdi leaq 0x50(%rsp), %rsi movl %eax, %edx callq 0x5c28a movq 0x8(%rsp), %rdi callq 0x24090 leaq 0x5c4e4(%rip), %rcx # 0xb8675 leaq 0x5c4e1(%rip), %r8 # 0xb8679 leaq 0x68(%rsp), %rdi leaq 0x50(%rsp), %rsi movl %eax, %edx callq 0x5c28a movb %r15b, (%rbx) leaq 0x8(%rbx), %r14 leaq 0x10(%rsp), %rsi leaq 0x88(%rsp), %rdx leaq 0x68(%rsp), %rcx movq %r14, %rdi callq 0x6118c leaq 0x10(%rbx), %rdi cmpq $0x0, 0x38(%rsp) je 0x5c1ef leaq 0x30(%rsp), %rsi leaq 0x88(%rsp), %rdx leaq 0x68(%rsp), %rcx callq 0x6118c jmp 0x5c1f3 andq $0x0, (%rdi) leaq 0x68(%rsp), %rdi callq 0x25258 leaq 0x88(%rsp), %rdi callq 0x25258 leaq 0x30(%rsp), %rdi callq 0x25258 leaq 0x10(%rsp), %rdi callq 0x25258 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %r14, %rdi callq 0x611e8 jmp 0x5c245 jmp 0x5c26a movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x25258 jmp 0x5c25b movq %rax, %rbx jmp 0x5c277 jmp 0x5c26a movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x25258 jmp 0x5c26d movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x25258 leaq 0x10(%rsp), %rdi callq 0x25258 movq %rbx, %rdi callq 0x24fe0 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbp, rdx mov r13, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov r14, rax mov [rsp+0D8h+var_D0], rax lea rdi, [rsp+0D8h+var_C8] mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea r12, [rsp+0D8h+var_A8] mov rdi, r12 mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov r15b, 1 cmp qword ptr [rbp+8], 0 jnz short loc_5C0F6 mov rdi, r13 xor esi, esi call _llama_model_chat_template test rax, rax setnz r15b jz short loc_5C0D2 lea rdi, [rsp+0D8h+var_C8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) loc_5C0D2: lea rsi, aToolUse; "tool_use" mov rdi, r13 call _llama_model_chat_template test rax, rax jz short loc_5C0F6 lea rdi, [rsp+0D8h+var_A8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov r15b, 1 loc_5C0F6: cmp [rsp+0D8h+var_C0], 0 jz short loc_5C113 lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_C8] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_5C13D loc_5C113: cmp [rsp+0D8h+var_A0], 0 jz short loc_5C12C lea rdi, [rsp+0D8h+var_C8] lea rsi, [rsp+0D8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_5C13D loc_5C12C: lea rsi, aForMessageInMe; "\n {%- for message in me"... lea rdi, [rsp+0D8h+var_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) loc_5C13D: lea rax, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_88], rax mov [rsp+0D8h+var_80], r12 lea rax, [rsp+0D8h+var_D0] mov [rsp+0D8h+var_78], rax mov rdi, r14 call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_50]; void * lea rsi, [rsp+0D8h+var_88] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, [rsp+0D8h+var_D0] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_70]; void * lea rsi, [rsp+0D8h+var_88] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b lea r14, [rbx+8] lea rsi, [rsp+0D8h+var_C8] lea rdx, [rsp+0D8h+var_50] lea rcx, [rsp+0D8h+var_70] mov rdi, r14 call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) lea rdi, [rbx+10h] cmp [rsp+0D8h+var_A0], 0 jz short loc_5C1EF lea rsi, [rsp+0D8h+var_A8] lea rdx, [rsp+0D8h+var_50] lea rcx, [rsp+0D8h+var_70] call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) jmp short loc_5C1F3 loc_5C1EF: and qword ptr [rdi], 0 loc_5C1F3: lea rdi, [rsp+0D8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, r14 call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr() jmp short loc_5C245 jmp short loc_5C26A mov rbx, rax loc_5C245: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_5C25B mov rbx, rax jmp short loc_5C277 jmp short loc_5C26A mov rbx, rax loc_5C25B: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_5C26D loc_5C26A: mov rbx, rax loc_5C26D: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_5C277: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3) { long long vocab; // r14 bool v6; // r15 const char *v7; // rax const char *v8; // rax _QWORD *v9; // rdi long long v11; // [rsp+8h] [rbp-D0h] BYREF char v12[8]; // [rsp+10h] [rbp-C8h] BYREF long long v13; // [rsp+18h] [rbp-C0h] char v14[8]; // [rsp+30h] [rbp-A8h] BYREF long long v15; // [rsp+38h] [rbp-A0h] char *v16; // [rsp+50h] [rbp-88h] char *v17; // [rsp+58h] [rbp-80h] long long *v18; // [rsp+60h] [rbp-78h] _BYTE v19[32]; // [rsp+68h] [rbp-70h] BYREF _BYTE v20[80]; // [rsp+88h] [rbp-50h] BYREF vocab = llama_model_get_vocab(a2, a2); v11 = vocab; std::string::basic_string(v12); std::string::basic_string(v14); v6 = 1; if ( !*(_QWORD *)(a3 + 8) ) { v7 = (const char *)llama_model_chat_template(a2, 0LL); v6 = v7 != 0LL; if ( v7 ) std::string::assign(v12, v7); v8 = (const char *)llama_model_chat_template(a2, "tool_use"); if ( v8 ) { std::string::assign(v14, v8); v6 = 1; } } if ( !v13 || std::operator==<char>((long long)v12) ) { if ( v15 ) std::string::_M_assign(v12, v14); else std::string::assign( v12, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " "); } v16 = v12; v17 = v14; v18 = &v11; llama_vocab_bos(vocab); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v20); llama_vocab_eos(v11); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v19); *a1 = v6; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(a1 + 8, v12, v20, v19); v9 = a1 + 16; if ( v15 ) std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(v9, v14, v20, v19); else *v9 = 0LL; std::string::~string(v19); std::string::~string(v20); std::string::~string(v14); std::string::~string(v12); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBP,RDX MOV R13,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x00125220 MOV R14,RAX MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x10] MOV RSI,RBP CALL 0x00124c40 LAB_0015c098: LEA R12,[RSP + 0x30] MOV RDI,R12 MOV RSI,RBP CALL 0x00124c40 MOV R15B,0x1 CMP qword ptr [RBP + 0x8],0x0 JNZ 0x0015c0f6 LAB_0015c0b2: MOV RDI,R13 XOR ESI,ESI CALL 0x001243e0 TEST RAX,RAX SETNZ R15B JZ 0x0015c0d2 LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00125170 LAB_0015c0d2: LEA RSI,[0x1b8511] MOV RDI,R13 CALL 0x001243e0 TEST RAX,RAX JZ 0x0015c0f6 LEA RDI,[RSP + 0x30] MOV RSI,RAX CALL 0x00125170 MOV R15B,0x1 LAB_0015c0f6: CMP qword ptr [RSP + 0x18],0x0 JZ 0x0015c113 LEA RSI,[0x1b851a] LEA RDI,[RSP + 0x10] CALL 0x0012cbe9 TEST AL,AL JZ 0x0015c13d LAB_0015c113: CMP qword ptr [RSP + 0x38],0x0 JZ 0x0015c12c LAB_0015c11b: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x30] CALL 0x001244e0 JMP 0x0015c13d LAB_0015c12c: LEA RSI,[0x1b8521] LEA RDI,[RSP + 0x10] CALL 0x00125170 LAB_0015c13d: LEA RAX,[RSP + 0x10] MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],R12 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x60],RAX LAB_0015c156: MOV RDI,R14 CALL 0x001247e0 LEA RCX,[0x1b8667] LEA R8,[0x1b866b] LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x50] MOV EDX,EAX CALL 0x0015c28a MOV RDI,qword ptr [RSP + 0x8] LAB_0015c185: CALL 0x00124090 LEA RCX,[0x1b8675] LEA R8,[0x1b8679] LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x50] MOV EDX,EAX CALL 0x0015c28a MOV byte ptr [RBX],R15B LEA R14,[RBX + 0x8] LAB_0015c1b0: LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x88] LEA RCX,[RSP + 0x68] MOV RDI,R14 CALL 0x0016118c LEA RDI,[RBX + 0x10] CMP qword ptr [RSP + 0x38],0x0 JZ 0x0015c1ef LAB_0015c1d6: LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x88] LEA RCX,[RSP + 0x68] CALL 0x0016118c LAB_0015c1ed: JMP 0x0015c1f3 LAB_0015c1ef: AND qword ptr [RDI],0x0 LAB_0015c1f3: LEA RDI,[RSP + 0x68] CALL 0x00125258 LEA RDI,[RSP + 0x88] CALL 0x00125258 LEA RDI,[RSP + 0x30] CALL 0x00125258 LEA RDI,[RSP + 0x10] CALL 0x00125258 MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { bool bVar1; uint uVar2; int8 uVar3; long lVar4; string *in_RDX; llama_model lVar5; int8 local_d0; string local_c8 [8]; long local_c0; string local_a8 [8]; long local_a0; string *local_88; string *local_80; int8 *local_78; string local_70 [32]; string local_50 [32]; uVar3 = llama_model_get_vocab(param_2); local_d0 = uVar3; std::__cxx11::string::string(local_c8,in_RDX); /* try { // try from 0015c098 to 0015c0a7 has its CatchHandler @ 0015c251 */ std::__cxx11::string::string(local_a8,in_RDX); lVar5 = (llama_model)0x1; if (*(long *)(in_RDX + 8) == 0) { /* try { // try from 0015c0b2 to 0015c0f2 has its CatchHandler @ 0015c256 */ lVar4 = llama_model_chat_template(param_2,0); lVar5 = (llama_model)(lVar4 != 0); if ((bool)lVar5) { std::__cxx11::string::assign((char *)local_c8); } lVar4 = llama_model_chat_template(param_2,"tool_use"); if (lVar4 != 0) { std::__cxx11::string::assign((char *)local_a8); lVar5 = (llama_model)0x1; } } if (local_c0 != 0) { bVar1 = std::operator==(local_c8,"chatml"); if (!bVar1) goto LAB_0015c13d; } if (local_a0 == 0) { std::__cxx11::string::assign((char *)local_c8); } else { /* try { // try from 0015c11b to 0015c13c has its CatchHandler @ 0015c240 */ std::__cxx11::string::_M_assign(local_c8); } LAB_0015c13d: local_88 = local_c8; local_78 = &local_d0; local_80 = local_a8; /* try { // try from 0015c156 to 0015c17f has its CatchHandler @ 0015c26a */ uVar2 = llama_vocab_bos(uVar3); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_50,(char *)&local_88,(char *)(ulong)uVar2); /* try { // try from 0015c185 to 0015c1a8 has its CatchHandler @ 0015c258 */ uVar2 = llama_vocab_eos(local_d0); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_70,(char *)&local_88,(char *)(ulong)uVar2); *param_1 = lVar5; /* try { // try from 0015c1b0 to 0015c1c9 has its CatchHandler @ 0015c242 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 8),local_c8,local_50); if (local_a0 == 0) { *(int8 *)(param_1 + 0x10) = 0; } else { /* try { // try from 0015c1d6 to 0015c1ec has its CatchHandler @ 0015c233 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 0x10),local_a8,local_50); } std::__cxx11::string::~string(local_70); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_a8); std::__cxx11::string::~string(local_c8); return param_1; }
28,850
mi_ft_segiterator_dummy_init
eloqsql/storage/myisam/ft_update.c
void _mi_ft_segiterator_dummy_init(const uchar *record, uint len, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_mi_ft_segiterator_dummy_init"); ftsi->num=1; ftsi->seg=0; ftsi->pos=record; ftsi->len=len; DBUG_VOID_RETURN; }
O0
c
mi_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x1, (%rax) movq -0x18(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movl -0xc(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x4(%rax) jmp 0xaa4ad popq %rbp retq nop
_mi_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov rax, [rbp+var_18] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_8] mov rax, [rbp+var_18] mov [rax+18h], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_18] mov [rax+4], ecx jmp short $+2 loc_AA4AD: pop rbp retn
long long mi_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { long long result; // rax *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; result = a3; *(_DWORD *)(a3 + 4) = a2; return result; }
_mi_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x4],ECX JMP 0x001aa4ad LAB_001aa4ad: POP RBP RET
void _mi_ft_segiterator_dummy_init(int8 param_1,int4 param_2,int4 *param_3) { *param_3 = 1; *(int8 *)(param_3 + 2) = 0; *(int8 *)(param_3 + 6) = param_1; param_3[1] = param_2; return; }
28,851
analyze_identifier_captures
tsotchke[P]eshkol/src/frontend/binding/analysis/binding_analysis.c
static bool analyze_identifier_captures(BindingSystem* system, const AstNode* node) { assert(system != NULL); assert(node != NULL); assert(node->type == AST_IDENTIFIER); // Get the binding ID uint64_t binding_id = node->binding_id; if (binding_id == 0) { // Binding not found, might be a built-in or undefined return true; } // Get the binding scope uint64_t binding_scope = binding_system_get_binding_scope(system, binding_id); if (binding_scope == 0) { // Binding scope not found return false; } // Check if the binding is from an outer scope if (binding_scope != system->current_scope_id && !binding_system_is_descendant_scope(system, system->current_scope_id, binding_scope)) { // Binding is from an outer scope, mark it as captured if (!binding_system_mark_binding_captured(system, binding_id)) { return false; } } return true; }
O1
c
analyze_identifier_captures: pushq %r15 pushq %r14 pushq %rbx cmpl $0x6, (%rsi) jne 0x16f94 movq 0x28(%rsi), %r15 movb $0x1, %bl testq %r15, %r15 je 0x16f8c movq %rdi, %r14 movq %r15, %rsi callq 0x85c0 testq %rax, %rax je 0x16f8a movq 0x110(%r14), %rsi cmpq %rsi, %rax je 0x16f8c movq %r14, %rdi movq %rax, %rdx callq 0x80b3 testb %al, %al jne 0x16f8c movq %r14, %rdi movq %r15, %rsi callq 0x15d01 testb %al, %al jne 0x16f8c xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq leaq 0xa0c2(%rip), %rdi # 0x2105d leaq 0xb55a(%rip), %rsi # 0x224fc leaq 0xb689(%rip), %rcx # 0x22632 movl $0x11d, %edx # imm = 0x11D callq 0x2180 nop
analyze_identifier_captures: push r15 push r14 push rbx cmp dword ptr [rsi], 6 jnz short loc_16F94 mov r15, [rsi+28h] mov bl, 1 test r15, r15 jz short loc_16F8C mov r14, rdi mov rsi, r15 call binding_system_get_binding_scope test rax, rax jz short loc_16F8A mov rsi, [r14+110h] cmp rax, rsi jz short loc_16F8C mov rdi, r14 mov rdx, rax call binding_system_is_descendant_scope test al, al jnz short loc_16F8C mov rdi, r14 mov rsi, r15 call binding_system_mark_binding_captured test al, al jnz short loc_16F8C loc_16F8A: xor ebx, ebx loc_16F8C: mov eax, ebx pop rbx pop r14 pop r15 retn loc_16F94: lea rdi, aNodeTypeAstIde; "node->type == AST_IDENTIFIER" lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolAnalyzeIde; "_Bool analyze_identifier_captures(Bindi"... mov edx, 11Dh call ___assert_fail
long long analyze_identifier_captures(long long *a1, long long a2) { unsigned int v2; // ebx long long v3; // r15 long long binding_scope; // rax long long v5; // rsi if ( *(_DWORD *)a2 != 6 ) __assert_fail( "node->type == AST_IDENTIFIER", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/analysis/binding_analysis.c", 285LL, "_Bool analyze_identifier_captures(BindingSystem *, const AstNode *)"); v3 = *(_QWORD *)(a2 + 40); LOBYTE(v2) = 1; if ( v3 ) { binding_scope = binding_system_get_binding_scope(a1, *(_QWORD *)(a2 + 40)); if ( !binding_scope ) return 0; v5 = a1[34]; if ( binding_scope != v5 && !binding_system_is_descendant_scope(a1, v5, binding_scope) && !(unsigned __int8)binding_system_mark_binding_captured(a1, v3) ) { return 0; } } return v2; }
analyze_identifier_captures: PUSH R15 PUSH R14 PUSH RBX CMP dword ptr [RSI],0x6 JNZ 0x00116f94 MOV R15,qword ptr [RSI + 0x28] MOV BL,0x1 TEST R15,R15 JZ 0x00116f8c MOV R14,RDI MOV RSI,R15 CALL 0x001085c0 TEST RAX,RAX JZ 0x00116f8a MOV RSI,qword ptr [R14 + 0x110] CMP RAX,RSI JZ 0x00116f8c MOV RDI,R14 MOV RDX,RAX CALL 0x001080b3 TEST AL,AL JNZ 0x00116f8c MOV RDI,R14 MOV RSI,R15 CALL 0x00115d01 TEST AL,AL JNZ 0x00116f8c LAB_00116f8a: XOR EBX,EBX LAB_00116f8c: MOV EAX,EBX POP RBX POP R14 POP R15 RET LAB_00116f94: LEA RDI,[0x12105d] LEA RSI,[0x1224fc] LEA RCX,[0x122632] MOV EDX,0x11d CALL 0x00102180
ulong analyze_identifier_captures(long param_1,int *param_2) { long lVar1; char cVar2; long lVar3; int8 unaff_RBX; ulong uVar4; if (*param_2 != 6) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_IDENTIFIER", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/analysis/binding_analysis.c" ,0x11d,"_Bool analyze_identifier_captures(BindingSystem *, const AstNode *)"); } lVar1 = *(long *)(param_2 + 10); uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (lVar1 == 0) goto LAB_00116f8c; lVar3 = binding_system_get_binding_scope(param_1,lVar1); if (lVar3 != 0) { if (lVar3 == *(long *)(param_1 + 0x110)) goto LAB_00116f8c; cVar2 = binding_system_is_descendant_scope(param_1,*(long *)(param_1 + 0x110),lVar3); if (cVar2 != '\0') goto LAB_00116f8c; cVar2 = binding_system_mark_binding_captured(param_1,lVar1); if (cVar2 != '\0') goto LAB_00116f8c; } uVar4 = 0; LAB_00116f8c: return uVar4 & 0xffffffff; }
28,852
analyze_identifier_captures
tsotchke[P]eshkol/src/frontend/binding/analysis/binding_analysis.c
static bool analyze_identifier_captures(BindingSystem* system, const AstNode* node) { assert(system != NULL); assert(node != NULL); assert(node->type == AST_IDENTIFIER); // Get the binding ID uint64_t binding_id = node->binding_id; if (binding_id == 0) { // Binding not found, might be a built-in or undefined return true; } // Get the binding scope uint64_t binding_scope = binding_system_get_binding_scope(system, binding_id); if (binding_scope == 0) { // Binding scope not found return false; } // Check if the binding is from an outer scope if (binding_scope != system->current_scope_id && !binding_system_is_descendant_scope(system, system->current_scope_id, binding_scope)) { // Binding is from an outer scope, mark it as captured if (!binding_system_mark_binding_captured(system, binding_id)) { return false; } } return true; }
O3
c
analyze_identifier_captures: pushq %r15 pushq %r14 pushq %rbx cmpl $0x6, (%rsi) jne 0x164d6 movq 0x28(%rsi), %r15 movb $0x1, %bl testq %r15, %r15 je 0x164ce movq %rdi, %r14 movq %r15, %rsi callq 0x8342 testq %rax, %rax je 0x164cc movq 0x110(%r14), %rsi cmpq %rsi, %rax je 0x164ce movq %r14, %rdi movq %rax, %rdx callq 0x7edc testb %al, %al jne 0x164ce movq %r14, %rdi movq %r15, %rsi callq 0x15384 testb %al, %al jne 0x164ce xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq leaq 0x9b80(%rip), %rdi # 0x2005d leaq 0xb034(%rip), %rsi # 0x21518 leaq 0xb163(%rip), %rcx # 0x2164e movl $0x11d, %edx # imm = 0x11D callq 0x2180 nopl (%rax)
analyze_identifier_captures: push r15 push r14 push rbx cmp dword ptr [rsi], 6 jnz short loc_164D6 mov r15, [rsi+28h] mov bl, 1 test r15, r15 jz short loc_164CE mov r14, rdi mov rsi, r15 call binding_system_get_binding_scope test rax, rax jz short loc_164CC mov rsi, [r14+110h] cmp rax, rsi jz short loc_164CE mov rdi, r14 mov rdx, rax call binding_system_is_descendant_scope test al, al jnz short loc_164CE mov rdi, r14 mov rsi, r15 call binding_system_mark_binding_captured test al, al jnz short loc_164CE loc_164CC: xor ebx, ebx loc_164CE: mov eax, ebx pop rbx pop r14 pop r15 retn loc_164D6: lea rdi, aNodeTypeAstIde; "node->type == AST_IDENTIFIER" lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolAnalyzeIde; "_Bool analyze_identifier_captures(Bindi"... mov edx, 11Dh call ___assert_fail
long long analyze_identifier_captures(long long *a1, long long a2) { unsigned int v2; // ebx long long v3; // r15 long long binding_scope; // rax long long v5; // rsi if ( *(_DWORD *)a2 != 6 ) __assert_fail( "node->type == AST_IDENTIFIER", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/analysis/binding_analysis.c", 285LL, "_Bool analyze_identifier_captures(BindingSystem *, const AstNode *)"); v3 = *(_QWORD *)(a2 + 40); LOBYTE(v2) = 1; if ( v3 ) { binding_scope = binding_system_get_binding_scope(a1, *(_QWORD *)(a2 + 40)); if ( !binding_scope ) return 0; v5 = a1[34]; if ( binding_scope != v5 && !binding_system_is_descendant_scope(a1, v5, binding_scope) && !binding_system_mark_binding_captured(a1, v3) ) { return 0; } } return v2; }
analyze_identifier_captures: PUSH R15 PUSH R14 PUSH RBX CMP dword ptr [RSI],0x6 JNZ 0x001164d6 MOV R15,qword ptr [RSI + 0x28] MOV BL,0x1 TEST R15,R15 JZ 0x001164ce MOV R14,RDI MOV RSI,R15 CALL 0x00108342 TEST RAX,RAX JZ 0x001164cc MOV RSI,qword ptr [R14 + 0x110] CMP RAX,RSI JZ 0x001164ce MOV RDI,R14 MOV RDX,RAX CALL 0x00107edc TEST AL,AL JNZ 0x001164ce MOV RDI,R14 MOV RSI,R15 CALL 0x00115384 TEST AL,AL JNZ 0x001164ce LAB_001164cc: XOR EBX,EBX LAB_001164ce: MOV EAX,EBX POP RBX POP R14 POP R15 RET LAB_001164d6: LEA RDI,[0x12005d] LEA RSI,[0x121518] LEA RCX,[0x12164e] MOV EDX,0x11d CALL 0x00102180
ulong analyze_identifier_captures(long param_1,int *param_2) { long lVar1; char cVar2; long lVar3; int8 unaff_RBX; ulong uVar4; if (*param_2 != 6) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_IDENTIFIER", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/analysis/binding_analysis.c" ,0x11d,"_Bool analyze_identifier_captures(BindingSystem *, const AstNode *)"); } lVar1 = *(long *)(param_2 + 10); uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (lVar1 == 0) goto LAB_001164ce; lVar3 = binding_system_get_binding_scope(param_1,lVar1); if (lVar3 != 0) { if (lVar3 == *(long *)(param_1 + 0x110)) goto LAB_001164ce; cVar2 = binding_system_is_descendant_scope(param_1,*(long *)(param_1 + 0x110),lVar3); if (cVar2 != '\0') goto LAB_001164ce; cVar2 = binding_system_mark_binding_captured(param_1,lVar1); if (cVar2 != '\0') goto LAB_001164ce; } uVar4 = 0; LAB_001164ce: return uVar4 & 0xffffffff; }
28,853
JS_ToQuotedString
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ToQuotedString(JSContext *ctx, JSValue val1) { JSValue val; JSString *p; int i; uint32_t c; StringBuffer b_s, *b = &b_s; char buf[16]; val = JS_ToStringCheckObject(ctx, val1); if (JS_IsException(val)) return val; p = JS_VALUE_GET_STRING(val); if (string_buffer_init(ctx, b, p->len + 2)) goto fail; if (string_buffer_putc8(b, '\"')) goto fail; for(i = 0; i < p->len; ) { c = string_getc(p, &i); switch(c) { case '\t': c = 't'; goto quote; case '\r': c = 'r'; goto quote; case '\n': c = 'n'; goto quote; case '\b': c = 'b'; goto quote; case '\f': c = 'f'; goto quote; case '\"': case '\\': quote: if (string_buffer_putc8(b, '\\')) goto fail; if (string_buffer_putc8(b, c)) goto fail; break; default: if (c < 32 || is_surrogate(c)) { snprintf(buf, sizeof(buf), "\\u%04x", c); if (string_buffer_write8(b, (uint8_t*)buf, 6)) goto fail; } else { if (string_buffer_putc(b, c)) goto fail; } break; } } if (string_buffer_putc8(b, '\"')) goto fail; JS_FreeValue(ctx, val); return string_buffer_end(b); fail: JS_FreeValue(ctx, val); string_buffer_free(b); return JS_EXCEPTION; }
O0
c
JS_ToQuotedString: subq $0xa8, %rsp movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rdi, 0x80(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x707d0 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 0x88477 movq 0x70(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0x886a6 movq 0x70(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x80(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x68(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %edx addl $0x2, %edx callq 0x50640 cmpl $0x0, %eax je 0x884b1 jmp 0x8866e movq 0x38(%rsp), %rdi movl $0x22, %esi callq 0x84540 cmpl $0x0, %eax je 0x884ca jmp 0x8866e movl $0x0, 0x64(%rsp) movl 0x64(%rsp), %eax movq 0x68(%rsp), %rcx movq 0x4(%rcx), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF cmpl %ecx, %eax jge 0x88625 movq 0x68(%rsp), %rdi leaq 0x64(%rsp), %rsi callq 0x85b60 movl %eax, 0x60(%rsp) movl 0x60(%rsp), %eax movl %eax, 0xc(%rsp) subl $0x8, %eax je 0x88570 jmp 0x88510 movl 0xc(%rsp), %eax subl $0x9, %eax je 0x88552 jmp 0x8851b movl 0xc(%rsp), %eax subl $0xa, %eax je 0x88566 jmp 0x88526 movl 0xc(%rsp), %eax subl $0xc, %eax je 0x8857a jmp 0x88531 movl 0xc(%rsp), %eax subl $0xd, %eax je 0x8855c jmp 0x8853c movl 0xc(%rsp), %eax subl $0x22, %eax je 0x88584 jmp 0x88547 movl 0xc(%rsp), %eax subl $0x5c, %eax je 0x88584 jmp 0x885b9 movl $0x74, 0x60(%rsp) jmp 0x88586 movl $0x72, 0x60(%rsp) jmp 0x88586 movl $0x6e, 0x60(%rsp) jmp 0x88586 movl $0x62, 0x60(%rsp) jmp 0x88586 movl $0x66, 0x60(%rsp) jmp 0x88586 jmp 0x88586 movq 0x38(%rsp), %rdi movl $0x5c, %esi callq 0x84540 cmpl $0x0, %eax je 0x8859f jmp 0x8866e movq 0x38(%rsp), %rdi movl 0x60(%rsp), %esi callq 0x84540 cmpl $0x0, %eax je 0x885b7 jmp 0x8866e jmp 0x88620 cmpl $0x20, 0x60(%rsp) jb 0x885ce movl 0x60(%rsp), %edi callq 0x860c0 cmpl $0x0, %eax je 0x88607 leaq 0x20(%rsp), %rdi movl 0x60(%rsp), %ecx movl $0x10, %esi leaq 0x866b9(%rip), %rdx # 0x10ec9c movb $0x0, %al callq 0xe2d0 movq 0x38(%rsp), %rdi leaq 0x20(%rsp), %rsi movl $0x6, %edx callq 0x6fb20 cmpl $0x0, %eax je 0x88605 jmp 0x8866e jmp 0x8861e movq 0x38(%rsp), %rdi movl 0x60(%rsp), %esi callq 0x4da80 cmpl $0x0, %eax je 0x8861c jmp 0x8866e jmp 0x8861e jmp 0x88620 jmp 0x884d2 movq 0x38(%rsp), %rdi movl $0x22, %esi callq 0x84540 cmpl $0x0, %eax je 0x8863b jmp 0x8866e movq 0x80(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movq 0x38(%rsp), %rdi callq 0x4db00 movq %rax, 0x98(%rsp) movq %rdx, 0xa0(%rsp) jmp 0x886a6 movq 0x80(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movq 0x38(%rsp), %rdi callq 0x524b0 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nop
JS_ToQuotedString: sub rsp, 0A8h mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_28], rdi lea rax, [rsp+0A8h+var_68] mov [rsp+0A8h+var_70], rax mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] call JS_ToStringCheckObject mov [rsp+0A8h+var_98], rax mov [rsp+0A8h+var_90], rdx mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_38], rax mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_30], rax mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_30] call JS_IsException_1 cmp eax, 0 jz short loc_88477 mov rax, [rsp+0A8h+var_38] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_30] mov [rsp+0A8h+var_8], rax jmp loc_886A6 loc_88477: mov rax, [rsp+0A8h+var_38] mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_70] mov rax, [rsp+0A8h+var_40] mov rax, [rax+4] and rax, 7FFFFFFFh mov edx, eax add edx, 2 call string_buffer_init cmp eax, 0 jz short loc_884B1 jmp loc_8866E loc_884B1: mov rdi, [rsp+0A8h+var_70] mov esi, 22h ; '"' call string_buffer_putc8 cmp eax, 0 jz short loc_884CA jmp loc_8866E loc_884CA: mov [rsp+0A8h+var_44], 0 loc_884D2: mov eax, [rsp+0A8h+var_44] mov rcx, [rsp+0A8h+var_40] mov rcx, [rcx+4] and rcx, 7FFFFFFFh cmp eax, ecx jge loc_88625 mov rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_44] call string_getc mov [rsp+0A8h+var_48], eax mov eax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_9C], eax sub eax, 8 jz short loc_88570 jmp short $+2 loc_88510: mov eax, [rsp+0A8h+var_9C] sub eax, 9 jz short loc_88552 jmp short $+2 loc_8851B: mov eax, [rsp+0A8h+var_9C] sub eax, 0Ah jz short loc_88566 jmp short $+2 loc_88526: mov eax, [rsp+0A8h+var_9C] sub eax, 0Ch jz short loc_8857A jmp short $+2 loc_88531: mov eax, [rsp+0A8h+var_9C] sub eax, 0Dh jz short loc_8855C jmp short $+2 loc_8853C: mov eax, [rsp+0A8h+var_9C] sub eax, 22h ; '"' jz short loc_88584 jmp short $+2 loc_88547: mov eax, [rsp+0A8h+var_9C] sub eax, 5Ch ; '\' jz short loc_88584 jmp short loc_885B9 loc_88552: mov [rsp+0A8h+var_48], 74h ; 't' jmp short loc_88586 loc_8855C: mov [rsp+0A8h+var_48], 72h ; 'r' jmp short loc_88586 loc_88566: mov [rsp+0A8h+var_48], 6Eh ; 'n' jmp short loc_88586 loc_88570: mov [rsp+0A8h+var_48], 62h ; 'b' jmp short loc_88586 loc_8857A: mov [rsp+0A8h+var_48], 66h ; 'f' jmp short loc_88586 loc_88584: jmp short $+2 loc_88586: mov rdi, [rsp+0A8h+var_70] mov esi, 5Ch ; '\' call string_buffer_putc8 cmp eax, 0 jz short loc_8859F jmp loc_8866E loc_8859F: mov rdi, [rsp+0A8h+var_70] mov esi, [rsp+0A8h+var_48] call string_buffer_putc8 cmp eax, 0 jz short loc_885B7 jmp loc_8866E loc_885B7: jmp short loc_88620 loc_885B9: cmp [rsp+0A8h+var_48], 20h ; ' ' jb short loc_885CE mov edi, [rsp+0A8h+var_48] call is_surrogate cmp eax, 0 jz short loc_88607 loc_885CE: lea rdi, [rsp+0A8h+var_88] mov ecx, [rsp+0A8h+var_48] mov esi, 10h lea rdx, aU04x; "\\u%04x" mov al, 0 call _snprintf mov rdi, [rsp+0A8h+var_70] lea rsi, [rsp+0A8h+var_88] mov edx, 6 call string_buffer_write8 cmp eax, 0 jz short loc_88605 jmp short loc_8866E loc_88605: jmp short loc_8861E loc_88607: mov rdi, [rsp+0A8h+var_70] mov esi, [rsp+0A8h+var_48] call string_buffer_putc cmp eax, 0 jz short loc_8861C jmp short loc_8866E loc_8861C: jmp short $+2 loc_8861E: jmp short $+2 loc_88620: jmp loc_884D2 loc_88625: mov rdi, [rsp+0A8h+var_70] mov esi, 22h ; '"' call string_buffer_putc8 cmp eax, 0 jz short loc_8863B jmp short loc_8866E loc_8863B: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_38] mov rdx, [rsp+0A8h+var_30] call JS_FreeValue mov rdi, [rsp+0A8h+var_70] call string_buffer_end mov [rsp+0A8h+var_10], rax mov [rsp+0A8h+var_8], rdx jmp short loc_886A6 loc_8866E: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_38] mov rdx, [rsp+0A8h+var_30] call JS_FreeValue mov rdi, [rsp+0A8h+var_70] call string_buffer_free mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 loc_886A6: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long JS_ToQuotedString( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rdx long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long v26; // rcx long long v27; // rdx long long v28; // rcx long long v29; // r8 long long v30; // r9 __m128 v31; // xmm4 __m128 v32; // xmm5 long long v33; // rdx long long v34; // rcx long long v35; // r8 long long v36; // r9 __m128 v37; // xmm4 __m128 v38; // xmm5 long long v39; // rdx _BYTE v41[24]; // [rsp+20h] [rbp-88h] BYREF long long *v42; // [rsp+38h] [rbp-70h] char v43; // [rsp+40h] [rbp-68h] BYREF unsigned int v44; // [rsp+60h] [rbp-48h] int v45; // [rsp+64h] [rbp-44h] BYREF long long v46; // [rsp+68h] [rbp-40h] long long v47; // [rsp+70h] [rbp-38h] long long v48; // [rsp+78h] [rbp-30h] long long v49; // [rsp+80h] [rbp-28h] long long v50; // [rsp+88h] [rbp-20h] long long v51; // [rsp+90h] [rbp-18h] long long v52; // [rsp+98h] [rbp-10h] long long v53; // [rsp+A0h] [rbp-8h] v50 = a2; v51 = a3; v49 = a1; v42 = (long long *)&v43; v47 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v48 = v14; if ( !JS_IsException_1(v47, v14) ) { v46 = v47; if ( (unsigned int)string_buffer_init(v49, (long long)v42, (*(_DWORD *)(v47 + 4) & 0x7FFFFFFFu) + 2) || (unsigned int)string_buffer_putc8((long long)v42, 0x22u, a7, a8, a9, a10, v19, v20, a13, a14, v15, v16, v17, v18) ) { goto LABEL_31; } v45 = 0; while ( 1 ) { v26 = *(_QWORD *)(v46 + 4) & 0x7FFFFFFFLL; if ( v45 >= (int)v26 ) { if ( !(unsigned int)string_buffer_putc8( (long long)v42, 0x22u, a7, a8, a9, a10, v24, v25, a13, a14, v21, v26, v22, v23) ) { JS_FreeValue(v49, v47, v48); v52 = string_buffer_end((long long)v42); v53 = v39; return v52; } LABEL_31: JS_FreeValue(v49, v47, v48); string_buffer_free(v42); LODWORD(v52) = 0; v53 = 6LL; return v52; } v44 = string_getc(v46, &v45); if ( v44 == 8 ) break; switch ( v44 ) { case 9u: v44 = 116; goto LABEL_20; case 0xAu: v44 = 110; goto LABEL_20; case 0xCu: v44 = 102; LABEL_20: if ( (unsigned int)string_buffer_putc8( (long long)v42, 0x5Cu, a7, a8, a9, a10, v31, v32, a13, a14, v27, v28, v29, v30) || (unsigned int)string_buffer_putc8( (long long)v42, v44, a7, a8, a9, a10, v37, v38, a13, a14, v33, v34, v35, v36) ) { goto LABEL_31; } break; case 0xDu: v44 = 114; goto LABEL_20; case 0x22u: case 0x5Cu: goto LABEL_20; default: if ( v44 < 0x20 || is_surrogate(v44) ) { snprintf(v41, 16LL, "\\u%04x", v44); if ( (unsigned int)string_buffer_write8((long long)v42, (long long)v41, 6) ) goto LABEL_31; } else if ( (unsigned int)string_buffer_putc((long long)v42, v44) ) { goto LABEL_31; } break; } } v44 = 98; goto LABEL_20; } v52 = v47; v53 = v48; return v52; }
JS_ToQuotedString: SUB RSP,0xa8 MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x80],RDI LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x001707d0 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 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00188477 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xa0],RAX JMP 0x001886a6 LAB_00188477: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV EDX,EAX ADD EDX,0x2 CALL 0x00150640 CMP EAX,0x0 JZ 0x001884b1 JMP 0x0018866e LAB_001884b1: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x22 CALL 0x00184540 CMP EAX,0x0 JZ 0x001884ca JMP 0x0018866e LAB_001884ca: MOV dword ptr [RSP + 0x64],0x0 LAB_001884d2: MOV EAX,dword ptr [RSP + 0x64] MOV RCX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RCX + 0x4] AND RCX,0x7fffffff CMP EAX,ECX JGE 0x00188625 MOV RDI,qword ptr [RSP + 0x68] LEA RSI,[RSP + 0x64] CALL 0x00185b60 MOV dword ptr [RSP + 0x60],EAX MOV EAX,dword ptr [RSP + 0x60] MOV dword ptr [RSP + 0xc],EAX SUB EAX,0x8 JZ 0x00188570 JMP 0x00188510 LAB_00188510: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x9 JZ 0x00188552 JMP 0x0018851b LAB_0018851b: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0xa JZ 0x00188566 JMP 0x00188526 LAB_00188526: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0xc JZ 0x0018857a JMP 0x00188531 LAB_00188531: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0xd JZ 0x0018855c JMP 0x0018853c LAB_0018853c: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x22 JZ 0x00188584 JMP 0x00188547 LAB_00188547: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x5c JZ 0x00188584 JMP 0x001885b9 LAB_00188552: MOV dword ptr [RSP + 0x60],0x74 JMP 0x00188586 LAB_0018855c: MOV dword ptr [RSP + 0x60],0x72 JMP 0x00188586 LAB_00188566: MOV dword ptr [RSP + 0x60],0x6e JMP 0x00188586 LAB_00188570: MOV dword ptr [RSP + 0x60],0x62 JMP 0x00188586 LAB_0018857a: MOV dword ptr [RSP + 0x60],0x66 JMP 0x00188586 LAB_00188584: JMP 0x00188586 LAB_00188586: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x5c CALL 0x00184540 CMP EAX,0x0 JZ 0x0018859f JMP 0x0018866e LAB_0018859f: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x60] CALL 0x00184540 CMP EAX,0x0 JZ 0x001885b7 JMP 0x0018866e LAB_001885b7: JMP 0x00188620 LAB_001885b9: CMP dword ptr [RSP + 0x60],0x20 JC 0x001885ce MOV EDI,dword ptr [RSP + 0x60] CALL 0x001860c0 CMP EAX,0x0 JZ 0x00188607 LAB_001885ce: LEA RDI,[RSP + 0x20] MOV ECX,dword ptr [RSP + 0x60] MOV ESI,0x10 LEA RDX,[0x20ec9c] MOV AL,0x0 CALL 0x0010e2d0 MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x20] MOV EDX,0x6 CALL 0x0016fb20 CMP EAX,0x0 JZ 0x00188605 JMP 0x0018866e LAB_00188605: JMP 0x0018861e LAB_00188607: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x60] CALL 0x0014da80 CMP EAX,0x0 JZ 0x0018861c JMP 0x0018866e LAB_0018861c: JMP 0x0018861e LAB_0018861e: JMP 0x00188620 LAB_00188620: JMP 0x001884d2 LAB_00188625: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x22 CALL 0x00184540 CMP EAX,0x0 JZ 0x0018863b JMP 0x0018866e LAB_0018863b: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x38] CALL 0x0014db00 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX JMP 0x001886a6 LAB_0018866e: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001524b0 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 LAB_001886a6: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
int1 [16] JS_ToQuotedString(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int1 auVar2 [16]; char local_88 [24]; int1 *local_70; int1 local_68 [32]; uint local_48; int local_44; long local_40; int1 local_38 [16]; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_70 = local_68; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_38 = JS_ToStringCheckObject(param_1,param_2,param_3); iVar1 = JS_IsException(local_38._0_8_,local_38._8_8_); if (iVar1 == 0) { local_40 = local_38._0_8_; iVar1 = string_buffer_init(local_28,local_70, ((uint)*(int8 *)(local_38._0_8_ + 4) & 0x7fffffff) + 2); if (iVar1 == 0) { iVar1 = string_buffer_putc8(local_70,0x22); if (iVar1 == 0) { local_44 = 0; do { while( true ) { if ((int)((uint)*(int8 *)(local_40 + 4) & 0x7fffffff) <= local_44) { iVar1 = string_buffer_putc8(local_70,0x22); if (iVar1 == 0) { JS_FreeValue(local_28,local_38._0_8_,local_38._8_8_); auVar2 = string_buffer_end(local_70); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; goto LAB_001886a6; } goto LAB_0018866e; } local_48 = string_getc(local_40,&local_44); if (local_48 != 8) break; local_48 = 0x62; LAB_00188586: iVar1 = string_buffer_putc8(local_70,0x5c); if (iVar1 != 0) goto LAB_0018866e; iVar1 = string_buffer_putc8(local_70,local_48); if (iVar1 != 0) goto LAB_0018866e; } if (local_48 == 9) { local_48 = 0x74; goto LAB_00188586; } if (local_48 == 10) { local_48 = 0x6e; goto LAB_00188586; } if (local_48 == 0xc) { local_48 = 0x66; goto LAB_00188586; } if (local_48 == 0xd) { local_48 = 0x72; goto LAB_00188586; } if ((local_48 == 0x22) || (local_48 == 0x5c)) goto LAB_00188586; if (local_48 < 0x20) { LAB_001885ce: snprintf(local_88,0x10,"\\u%04x",(ulong)local_48); iVar1 = string_buffer_write8(local_70,local_88,6); } else { iVar1 = is_surrogate(local_48); if (iVar1 != 0) goto LAB_001885ce; iVar1 = string_buffer_putc(local_70,local_48); } } while (iVar1 == 0); } } LAB_0018866e: JS_FreeValue(local_28,local_38._0_8_,local_38._8_8_); string_buffer_free(local_70); local_10 = 0; local_8 = 6; } else { local_10 = local_38._0_4_; uStack_c = local_38._4_4_; local_8 = local_38._8_8_; } LAB_001886a6: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
28,854
simple_pin_test2
eloqsql/storage/maria/unittest/ma_pagecache_single.c
int simple_pin_test2() { unsigned char *buffw= malloc(TEST_PAGE_SIZE); int res; DBUG_ENTER("simple_pin_test2"); /* prepare the file */ bfill(buffw, TEST_PAGE_SIZE, '\1'); pagecache_write(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); /* test */ if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error during flushing pagecache\n"); exit(1); } pagecache_read(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, 0); pagecache_write(&pagecache, &file1, 1, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); bfill(buffw + TEST_PAGE_SIZE/2, TEST_PAGE_SIZE/2, ((unsigned char) 129)); pagecache_write(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE_TO_READ, PAGECACHE_PIN_LEFT_PINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); /* We have to get error because one page of the file is pinned, other page should be flushed */ if (!flush_pagecache_blocks(&pagecache, &file1, FLUSH_KEEP_LAZY)) { diag("Did not get error in flush_pagecache_blocks 2\n"); res= 0; goto err; } ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, TEST_PAGE_SIZE * 2, simple_pin_test_file1))), "Simple pin page file with pin 2"); /* Test that a normal flush goes through */ if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error in flush_pagecache_blocks 3\n"); res= 0; goto err; } pagecache_unlock(&pagecache, &file1, 0, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, 0, 0, 0); if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error in flush_pagecache_blocks 4\n"); res= 0; goto err; } ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, TEST_PAGE_SIZE, simple_pin_test_file2))), "Simple pin page result file 2"); if (res) reset_file(&file1, file1_name); err: free(buffw); DBUG_RETURN(res); }
O3
c
simple_pin_test2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl $0x10000, %edi # imm = 0x10000 callq 0x29710 movq %rax, %rbx movl $0x10000, %edx # imm = 0x10000 movq %rax, %rdi movl $0x1, %esi callq 0x292c0 leaq 0x3cdb50(%rip), %r14 # 0x3fe460 movl 0x3cdbca(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) xorl %r12d, %r12d movl %r12d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r12d, 0x10(%rsp) movl %r12d, (%rsp) movl $0x1, 0x8(%rsp) leaq 0x3cdd3e(%rip), %r15 # 0x3fe680 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x349ca movq %r14, %rdi movq %r15, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x350c0 testl %eax, %eax jne 0x30be5 movq $0x0, 0x8(%rsp) movl $0x4, (%rsp) leaq 0x3cdacf(%rip), %r14 # 0x3fe460 leaq 0x3cdce8(%rip), %r15 # 0x3fe680 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x33566 movl 0x3cdb27(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) movl %r12d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r12d, 0x10(%rsp) movl %r12d, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, %edx movq %r14, %rdi movq %r15, %rsi movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x349ca movq %rbx, %rdi addq $0x8000, %rdi # imm = 0x8000 movl $0x8000, %edx # imm = 0x8000 movl $0x81, %esi callq 0x292c0 movl 0x3cdac8(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) movl %r12d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r12d, 0x10(%rsp) movl %r12d, 0x8(%rsp) movl $0x7, (%rsp) movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x349ca movq %r14, %rdi movq %r15, %rsi movl $0x4, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x350c0 testl %eax, %eax je 0x30ae2 leaq 0x3cdc0b(%rip), %r12 # 0x3fe680 movl $0x9, %ecx movq %rsp, %rdi movq %r12, %rsi rep movsq (%rsi), %es:(%rdi) leaq 0x3cdc46(%rip), %rdi # 0x3fe6d0 leaq 0x3555af(%rip), %rcx # 0x386040 movl $0x20000, %esi # imm = 0x20000 movl $0x20000, %edx # imm = 0x20000 callq 0x31bc8 movl %eax, %r15d xorl %edi, %edi testl %eax, %eax setne %dil leaq 0xa9884(%rip), %rsi # 0xda336 xorl %r14d, %r14d xorl %eax, %eax callq 0x92273 leaq 0x3cd99d(%rip), %rdi # 0x3fe460 movq %r12, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x350c0 testl %eax, %eax je 0x30aee leaq 0xa9876(%rip), %rdi # 0xda356 jmp 0x30b4a leaq 0xa981e(%rip), %rdi # 0xda307 xorl %r14d, %r14d jmp 0x30b4a movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) leaq 0x3cd95b(%rip), %r12 # 0x3fe460 leaq 0x3cdb74(%rip), %r13 # 0x3fe680 xorl %r14d, %r14d movq %r12, %rdi movq %r13, %rsi xorl %edx, %edx movl $0x5, %ecx movl $0x3, %r8d xorl %r9d, %r9d callq 0x32571 movq %r12, %rdi movq %r13, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x350c0 testl %eax, %eax je 0x30b6b leaq 0xa9833(%rip), %rdi # 0xda37d xorl %eax, %eax callq 0x92013 movq %rbx, %rdi callq 0x29160 movl %r14d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r15d, %r15d setne %r14b leaq 0x3cdb07(%rip), %rsi # 0x3fe680 movl $0x9, %ecx movq %rsp, %rdi rep movsq (%rsi), %es:(%rdi) leaq 0x3cdb45(%rip), %rdi # 0x3fe6d0 leaq 0x3554be(%rip), %rcx # 0x386050 movl $0x20000, %esi # imm = 0x20000 movl $0x10000, %edx # imm = 0x10000 callq 0x31bc8 testl %eax, %eax setne %al andb %r14b, %al movzbl %al, %r15d leaq 0xa97f0(%rip), %rsi # 0xda3a4 xorl %r14d, %r14d movl %r15d, %edi xorl %eax, %eax callq 0x92273 cmpb $0x1, %r15b jne 0x30b51 leaq 0x3cdab2(%rip), %rdi # 0x3fe680 leaq 0x3cdafb(%rip), %rsi # 0x3fe6d0 callq 0x3016c movl $0x1, %r14d jmp 0x30b51 leaq 0xa9602(%rip), %rdi # 0xda1ee xorl %eax, %eax callq 0x92013 movl $0x1, %edi callq 0x29540
simple_pin_test2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov edi, offset stru_10000 call _malloc mov rbx, rax mov edx, offset stru_10000 mov rdi, rax mov esi, 1 call _memset lea r14, pagecache mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax xor r12d, r12d mov [rsp+70h+var_48], r12d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r12d mov dword ptr [rsp+70h+var_70], r12d mov dword ptr [rsp+70h+var_68], 1 lea r15, file1 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, r14 mov rsi, r15 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jnz loc_30BE5 mov [rsp+70h+var_68], 0 mov dword ptr [rsp+70h+var_70], 4 lea r14, pagecache lea r15, file1 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_read mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax mov [rsp+70h+var_48], r12d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r12d mov dword ptr [rsp+70h+var_70], r12d mov dword ptr [rsp+70h+var_68], 1 mov edx, 1 mov rdi, r14 mov rsi, r15 mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, rbx add rdi, 8000h mov edx, 8000h mov esi, 81h call _memset mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax mov [rsp+70h+var_48], r12d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r12d mov dword ptr [rsp+70h+var_68], r12d mov dword ptr [rsp+70h+var_70], 7 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, r14 mov rsi, r15 mov edx, 4 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jz short loc_30AE2 lea r12, file1 mov ecx, 9 mov rdi, rsp mov rsi, r12 rep movsq lea rdi, file1_name lea rcx, simple_pin_test_file1 mov esi, 20000h mov edx, 20000h call test_file mov r15d, eax xor edi, edi test eax, eax setnz dil lea rsi, aSimplePinPageF_0; "Simple pin page file with pin 2" xor r14d, r14d xor eax, eax call ok lea rdi, pagecache mov rsi, r12 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jz short loc_30AEE lea rdi, aGotErrorInFlus_0; "Got error in flush_pagecache_blocks 3\n" jmp short loc_30B4A loc_30AE2: lea rdi, aDidNotGetError_0; "Did not get error in flush_pagecache_bl"... xor r14d, r14d jmp short loc_30B4A loc_30AEE: mov dword ptr [rsp+70h+var_68], 0 mov [rsp+70h+var_70], 0 lea r12, pagecache lea r13, file1 xor r14d, r14d mov rdi, r12 mov rsi, r13 xor edx, edx mov ecx, 5 mov r8d, 3 xor r9d, r9d call pagecache_unlock mov rdi, r12 mov rsi, r13 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jz short loc_30B6B lea rdi, aGotErrorInFlus_1; "Got error in flush_pagecache_blocks 4\n" loc_30B4A: xor eax, eax call diag loc_30B51: mov rdi, rbx call _free mov eax, r14d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_30B6B: test r15d, r15d setnz r14b lea rsi, file1 mov ecx, 9 mov rdi, rsp rep movsq lea rdi, file1_name lea rcx, simple_pin_test_file2 mov esi, 20000h mov edx, offset stru_10000 call test_file test eax, eax setnz al and al, r14b movzx r15d, al lea rsi, aSimplePinPageR_0; "Simple pin page result file 2" xor r14d, r14d mov edi, r15d xor eax, eax call ok cmp r15b, 1 jnz short loc_30B51 lea rdi, file1 lea rsi, file1_name call reset_file mov r14d, 1 jmp loc_30B51 loc_30BE5: lea rdi, aGotErrorDuring_0; "Got error during flushing pagecache\n" xor eax, eax call diag mov edi, 1 call _exit
long long simple_pin_test2() { long long v0; // rbx int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // r15d unsigned int v10; // r14d int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d const char *v15; // rdi int v17; // r15d int v18; // edx int v19; // ecx int v20; // r8d int v21; // r9d _QWORD v22[9]; // [rsp+0h] [rbp-70h] BYREF v0 = malloc(&stru_10000); memset(v0, 1LL, &stru_10000); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 0, 1, 0, 0LL, 0LL, 0, dword_3FE4E0); if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL) ) { diag((unsigned int)"Got error during flushing pagecache\n", (unsigned int)&file1, v1, v2, v3, v4); exit(1LL); } pagecache_read((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 4, 0LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 1, 3, v0, 1, 0, 1, 0, 0LL, 0LL, 0, dword_3FE4E0); memset(v0 + 0x8000, 129LL, 0x8000LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 7, 0, 0, 0LL, 0LL, 0, dword_3FE4E0); if ( !(unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 4LL, 0LL, 0LL) ) { v15 = "Did not get error in flush_pagecache_blocks 2\n"; v10 = 0; goto LABEL_8; } qmemcpy(v22, &file1, sizeof(v22)); v9 = test_file((unsigned int)&file1_name, 0x20000, 0x20000, (unsigned int)&simple_pin_test_file1, v7, v8, v22[0]); v10 = 0; ok(v9 != 0, (unsigned int)"Simple pin page file with pin 2", v11, v12, v13, v14, v22[0]); if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL) ) { v15 = "Got error in flush_pagecache_blocks 3\n"; LABEL_8: diag((_DWORD)v15, (unsigned int)&file1, v5, v6, v7, v8); goto LABEL_9; } v10 = 0; pagecache_unlock((unsigned int)&pagecache, (unsigned int)&file1, 0, 5, 3, 0, 0LL, 0); if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL) ) { v15 = "Got error in flush_pagecache_blocks 4\n"; goto LABEL_8; } qmemcpy(v22, &file1, sizeof(v22)); v17 = (v9 != 0) & ((unsigned int)test_file( (unsigned int)&file1_name, 0x20000, (unsigned int)&stru_10000, (unsigned int)&simple_pin_test_file2, v7, v8, v22[0]) != 0); v10 = 0; ok(v17, (unsigned int)"Simple pin page result file 2", v18, v19, v20, v21, v22[0]); if ( (_BYTE)v17 == 1 ) { reset_file((long long)&file1, (long long)&file1_name); v10 = 1; } LABEL_9: free(v0); return v10; }
simple_pin_test2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EDI,0x10000 CALL 0x00129710 MOV RBX,RAX MOV EDX,0x10000 MOV RDI,RAX MOV ESI,0x1 CALL 0x001292c0 LEA R14,[0x4fe460] MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX XOR R12D,R12D MOV dword ptr [RSP + 0x28],R12D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R12D MOV dword ptr [RSP],R12D MOV dword ptr [RSP + 0x8],0x1 LEA R15,[0x4fe680] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x001349ca MOV RDI,R14 MOV RSI,R15 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x001350c0 TEST EAX,EAX JNZ 0x00130be5 MOV qword ptr [RSP + 0x8],0x0 MOV dword ptr [RSP],0x4 LEA R14,[0x4fe460] LEA R15,[0x4fe680] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x00133566 MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x28],R12D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R12D MOV dword ptr [RSP],R12D MOV dword ptr [RSP + 0x8],0x1 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R15 MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x001349ca MOV RDI,RBX ADD RDI,0x8000 MOV EDX,0x8000 MOV ESI,0x81 CALL 0x001292c0 MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x28],R12D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R12D MOV dword ptr [RSP + 0x8],R12D MOV dword ptr [RSP],0x7 MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x001349ca MOV RDI,R14 MOV RSI,R15 MOV EDX,0x4 XOR ECX,ECX XOR R8D,R8D CALL 0x001350c0 TEST EAX,EAX JZ 0x00130ae2 LEA R12,[0x4fe680] MOV ECX,0x9 MOV RDI,RSP MOV RSI,R12 MOVSQ.REP RDI,RSI LEA RDI,[0x4fe6d0] LEA RCX,[0x486040] MOV ESI,0x20000 MOV EDX,0x20000 CALL 0x00131bc8 MOV R15D,EAX XOR EDI,EDI TEST EAX,EAX SETNZ DIL LEA RSI,[0x1da336] XOR R14D,R14D XOR EAX,EAX CALL 0x00192273 LEA RDI,[0x4fe460] MOV RSI,R12 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x001350c0 TEST EAX,EAX JZ 0x00130aee LEA RDI,[0x1da356] JMP 0x00130b4a LAB_00130ae2: LEA RDI,[0x1da307] XOR R14D,R14D JMP 0x00130b4a LAB_00130aee: MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 LEA R12,[0x4fe460] LEA R13,[0x4fe680] XOR R14D,R14D MOV RDI,R12 MOV RSI,R13 XOR EDX,EDX MOV ECX,0x5 MOV R8D,0x3 XOR R9D,R9D CALL 0x00132571 MOV RDI,R12 MOV RSI,R13 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x001350c0 TEST EAX,EAX JZ 0x00130b6b LEA RDI,[0x1da37d] LAB_00130b4a: XOR EAX,EAX CALL 0x00192013 LAB_00130b51: MOV RDI,RBX CALL 0x00129160 MOV EAX,R14D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00130b6b: TEST R15D,R15D SETNZ R14B LEA RSI,[0x4fe680] MOV ECX,0x9 MOV RDI,RSP MOVSQ.REP RDI,RSI LEA RDI,[0x4fe6d0] LEA RCX,[0x486050] MOV ESI,0x20000 MOV EDX,0x10000 CALL 0x00131bc8 TEST EAX,EAX SETNZ AL AND AL,R14B MOVZX R15D,AL LEA RSI,[0x1da3a4] XOR R14D,R14D MOV EDI,R15D XOR EAX,EAX CALL 0x00192273 CMP R15B,0x1 JNZ 0x00130b51 LEA RDI,[0x4fe680] LEA RSI,[0x4fe6d0] CALL 0x0013016c MOV R14D,0x1 JMP 0x00130b51 LAB_00130be5: LEA RDI,[0x1da1ee] XOR EAX,EAX CALL 0x00192013 MOV EDI,0x1 CALL 0x00129540
int8 simple_pin_test2(void) { int iVar1; int iVar2; void *__s; long lVar3; int8 *puVar4; char *pcVar5; int8 *puVar6; int8 uVar7; byte bVar8; int8 local_78; int8 local_70; int4 local_68; int8 local_60; int8 uStack_58; int4 local_50; int4 local_48; bVar8 = 0; __s = malloc(0x10000); memset(__s,1,0x10000); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_78._0_4_ = 0; local_70 = CONCAT44(local_70._4_4_,1); pagecache_write_part(pagecache,&file1,0,3,__s,1); iVar1 = flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); if (iVar1 != 0) { diag("Got error during flushing pagecache\n"); /* WARNING: Subroutine does not return */ exit(1); } local_70 = 0; local_78._0_4_ = 4; pagecache_read(pagecache,&file1,0,3,__s,1); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_78._0_4_ = 0; local_70._0_4_ = 1; pagecache_write_part(pagecache,&file1,1,3,__s,1); memset((void *)((long)__s + 0x8000),0x81,0x8000); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_70 = (ulong)local_70._4_4_ << 0x20; local_78 = CONCAT44(local_78._4_4_,7); pagecache_write_part(pagecache,&file1,0,3,__s,1); iVar1 = flush_pagecache_blocks_with_filter(pagecache,&file1,4,0,0); if (iVar1 == 0) { pcVar5 = "Did not get error in flush_pagecache_blocks 2\n"; } else { puVar4 = &file1; puVar6 = &local_78; for (lVar3 = 9; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar6 = *puVar4; puVar4 = puVar4 + (ulong)bVar8 * -2 + 1; puVar6 = puVar6 + (ulong)bVar8 * -2 + 1; } iVar1 = test_file(file1_name,0x20000,0x20000,simple_pin_test_file1); ok(iVar1 != 0,"Simple pin page file with pin 2"); iVar2 = flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); if (iVar2 == 0) { local_70 = local_70 & 0xffffffff00000000; local_78 = 0; pagecache_unlock(pagecache,&file1,0,5,3,0); iVar2 = flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); if (iVar2 == 0) { puVar4 = &file1; puVar6 = &local_78; for (lVar3 = 9; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar6 = *puVar4; puVar4 = puVar4 + (ulong)bVar8 * -2 + 1; puVar6 = puVar6 + (ulong)bVar8 * -2 + 1; } iVar2 = test_file(file1_name,0x20000,0x10000,simple_pin_test_file2); uVar7 = 0; ok(iVar2 != 0 && iVar1 != 0,"Simple pin page result file 2"); if (iVar2 != 0 && iVar1 != 0) { reset_file(&file1,file1_name); uVar7 = 1; } goto LAB_00130b51; } pcVar5 = "Got error in flush_pagecache_blocks 4\n"; } else { pcVar5 = "Got error in flush_pagecache_blocks 3\n"; } } uVar7 = 0; diag(pcVar5); LAB_00130b51: free(__s); return uVar7; }
28,855
get_collation_name_alias
eloqsql/mysys/charset.c
static const char* get_collation_name_alias(const char *name, char *buf, size_t bufsize, myf flags) { if (!strncasecmp(name, "utf8_", 5)) { my_snprintf(buf, bufsize, "utf8mb%c_%s", flags & MY_UTF8_IS_UTF8MB3 ? '3' : '4', name + 5); return buf; } return NULL; }
O0
c
get_collation_name_alias: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi leaq 0x500b3(%rip), %rsi # 0xb21c6 movl $0x5, %edx callq 0x26440 cmpl $0x0, %eax jne 0x62166 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx andq $0x400, %rdx # imm = 0x400 movl $0x34, %ecx movl $0x33, %eax cmpq $0x0, %rdx cmovnel %eax, %ecx movq -0x10(%rbp), %r8 addq $0x5, %r8 leaq 0x50077(%rip), %rdx # 0xb21cc movb $0x0, %al callq 0xad530 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x6216e movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
get_collation_name_alias: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] lea rsi, aUtf8_0; "utf8_" mov edx, 5 call _strncasecmp cmp eax, 0 jnz short loc_62166 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] and rdx, 400h mov ecx, 34h ; '4' mov eax, 33h ; '3' cmp rdx, 0 cmovnz ecx, eax mov r8, [rbp+var_10] add r8, 5 lea rdx, aUtf8mbCS; "utf8mb%c_%s" mov al, 0 call my_snprintf mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_6216E loc_62166: mov [rbp+var_8], 0 loc_6216E: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long get_collation_name_alias(long long a1, long long a2, int a3, __int16 a4) { int v4; // r9d int v5; // ecx if ( (unsigned int)strncasecmp(a1, "utf8_", 5LL) ) return 0LL; v5 = 52; if ( (a4 & 0x400) != 0 ) v5 = 51; my_snprintf(a2, a3, (unsigned int)"utf8mb%c_%s", v5, a1 + 5, v4); return a2; }
get_collation_name_alias: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1b21c6] MOV EDX,0x5 CALL 0x00126440 CMP EAX,0x0 JNZ 0x00162166 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] AND RDX,0x400 MOV ECX,0x34 MOV EAX,0x33 CMP RDX,0x0 CMOVNZ ECX,EAX MOV R8,qword ptr [RBP + -0x10] ADD R8,0x5 LEA RDX,[0x1b21cc] MOV AL,0x0 CALL 0x001ad530 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0016216e LAB_00162166: MOV qword ptr [RBP + -0x8],0x0 LAB_0016216e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int8 get_collation_name_alias(char *param_1,int8 param_2,int8 param_3,ulong param_4) { int iVar1; int8 uVar2; int8 local_10; iVar1 = strncasecmp(param_1,"utf8_",5); if (iVar1 == 0) { uVar2 = 0x34; if ((param_4 & 0x400) != 0) { uVar2 = 0x33; } my_snprintf(param_2,param_3,"utf8mb%c_%s",uVar2,param_1 + 5); local_10 = param_2; } else { local_10 = 0; } return local_10; }
28,856
nglog::LogDestination::WaitForSinks(nglog::internal::LogMessageData*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::WaitForSinks(internal::LogMessageData* data) { std::shared_lock<SinkMutex> l{sink_mutex_}; if (sinks_) { for (size_t i = sinks_->size(); i-- > 0;) { (*sinks_)[i]->WaitTillSent(); } } const bool send_to_sink = (data->send_method_ == &LogMessage::SendToSink) || (data->send_method_ == &LogMessage::SendToSinkAndLog); if (send_to_sink && data->sink_ != nullptr) { data->sink_->WaitTillSent(); } }
O2
cpp
nglog::LogDestination::WaitForSinks(nglog::internal::LogMessageData*): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x23f3f(%rip), %rdi # 0x32c98 movq %rdi, 0x8(%rsp) movb $0x1, 0x10(%rsp) callq 0xff64 movq 0x23f21(%rip), %rax # 0x32c90 testq %rax, %rax je 0xed9b movq 0x8(%rax), %r14 subq (%rax), %r14 sarq $0x3, %r14 subq $0x1, %r14 jb 0xed9b movq 0x23f04(%rip), %rax # 0x32c90 movq (%rax), %rax movq (%rax,%r14,8), %rdi movq (%rdi), %rax callq *0x18(%rax) jmp 0xed7f movq 0x76a0(%rbx), %rax cmpq 0x2123f(%rip), %rax # 0x2ffe8 setne %cl cmpq 0x211ed(%rip), %rax # 0x2ffa0 setne %al testb %al, %cl jne 0xedd6 cmpq $0x0, 0x76a8(%rbx) jne 0xedd6 movq 0x76b0(%rbx), %rdi testq %rdi, %rdi je 0xedd6 movq (%rdi), %rax callq *0x18(%rax) leaq 0x8(%rsp), %rdi callq 0xff54 addq $0x18, %rsp popq %rbx popq %r14 retq jmp 0xedea movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xff54 movq %rbx, %rdi callq 0x79c0 nop
_ZN5nglog14LogDestination12WaitForSinksEPNS_8internal14LogMessageDataE: push r14 push rbx sub rsp, 18h mov rbx, rdi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this mov [rsp+28h+var_20], rdi mov [rsp+28h+var_18], 1 call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rax, rax jz short loc_ED9B mov r14, [rax+8] sub r14, [rax] sar r14, 3 loc_ED7F: sub r14, 1 jb short loc_ED9B mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rax, [rax] mov rdi, [rax+r14*8] mov rax, [rdi] call qword ptr [rax+18h] jmp short loc_ED7F loc_ED9B: mov rax, [rbx+76A0h] cmp rax, cs:_ZN5nglog10LogMessage10SendToSinkEv_ptr setnz cl cmp rax, cs:_ZN5nglog10LogMessage16SendToSinkAndLogEv_ptr setnz al test cl, al jnz short loc_EDD6 cmp qword ptr [rbx+76A8h], 0 jnz short loc_EDD6 mov rdi, [rbx+76B0h] test rdi, rdi jz short loc_EDD6 mov rax, [rdi] call qword ptr [rax+18h] loc_EDD6: lea rdi, [rsp+28h+var_20] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() add rsp, 18h pop rbx pop r14 retn jmp short $+2 loc_EDEA: mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::WaitForSinks( nglog::LogDestination *this, nglog::internal::LogMessageData *a2) { long long i; // r14 long long v4; // rdi void *v6; // [rsp+8h] [rbp-20h] BYREF char v7; // [rsp+10h] [rbp-18h] v6 = &nglog::LogDestination::sink_mutex_; v7 = 1; std::__shared_mutex_pthread::lock_shared((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_); if ( nglog::LogDestination::sinks_ ) { for ( i = (long long)(*(_QWORD *)(nglog::LogDestination::sinks_ + 8) - *(_QWORD *)nglog::LogDestination::sinks_) >> 3; i-- != 0; (*(void ( **)(_QWORD, nglog::internal::LogMessageData *))(**(_QWORD **)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i) + 24LL))( *(_QWORD *)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i), a2) ) { ; } } if ( (*((_QWORD *)this + 3796) == (_QWORD)nglog::LogMessage::SendToSinkAndLog || *((_QWORD *)this + 3796) == (_QWORD)nglog::LogMessage::SendToSink) && !*((_QWORD *)this + 3797) ) { v4 = *((_QWORD *)this + 3798); if ( v4 ) (*(void ( **)(long long, nglog::internal::LogMessageData *))(*(_QWORD *)v4 + 24LL))(v4, a2); } return std::shared_lock<std::shared_mutex>::~shared_lock(&v6, a2); }
WaitForSinks: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA RDI,[0x132c98] MOV qword ptr [RSP + 0x8],RDI MOV byte ptr [RSP + 0x10],0x1 CALL 0x0010ff64 MOV RAX,qword ptr [0x00132c90] TEST RAX,RAX JZ 0x0010ed9b MOV R14,qword ptr [RAX + 0x8] SUB R14,qword ptr [RAX] SAR R14,0x3 LAB_0010ed7f: SUB R14,0x1 JC 0x0010ed9b MOV RAX,qword ptr [0x00132c90] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + R14*0x8] MOV RAX,qword ptr [RDI] LAB_0010ed96: CALL qword ptr [RAX + 0x18] JMP 0x0010ed7f LAB_0010ed9b: MOV RAX,qword ptr [RBX + 0x76a0] CMP RAX,qword ptr [0x0012ffe8] SETNZ CL CMP RAX,qword ptr [0x0012ffa0] SETNZ AL TEST CL,AL JNZ 0x0010edd6 CMP qword ptr [RBX + 0x76a8],0x0 JNZ 0x0010edd6 MOV RDI,qword ptr [RBX + 0x76b0] TEST RDI,RDI JZ 0x0010edd6 MOV RAX,qword ptr [RDI] LAB_0010edd3: CALL qword ptr [RAX + 0x18] LAB_0010edd6: LEA RDI,[RSP + 0x8] CALL 0x0010ff54 ADD RSP,0x18 POP RBX POP R14 RET
/* nglog::LogDestination::WaitForSinks(nglog::internal::LogMessageData*) */ void nglog::LogDestination::WaitForSinks(LogMessageData *param_1) { long lVar1; bool bVar2; int1 *local_20; int1 local_18; local_20 = sink_mutex_; local_18 = 1; std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)sink_mutex_); if (sinks_ != (long *)0x0) { lVar1 = sinks_[1] - *sinks_ >> 3; while (bVar2 = lVar1 != 0, lVar1 = lVar1 + -1, bVar2) { /* try { // try from 0010ed96 to 0010ed98 has its CatchHandler @ 0010edea */ (**(code **)(**(long **)(*sinks_ + lVar1 * 8) + 0x18))(); } } if (((*(int **)(param_1 + 0x76a0) == PTR_SendToSink_0012ffe8 || *(int **)(param_1 + 0x76a0) == PTR_SendToSinkAndLog_0012ffa0) && (*(long *)(param_1 + 0x76a8) == 0)) && (*(long **)(param_1 + 0x76b0) != (long *)0x0)) { /* try { // try from 0010edd3 to 0010edd5 has its CatchHandler @ 0010ede8 */ (**(code **)(**(long **)(param_1 + 0x76b0) + 0x18))(); } std::shared_lock<std::shared_mutex>::~shared_lock((shared_lock<std::shared_mutex> *)&local_20); return; }
28,857
uf_space_prespace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_prespace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); } }
O0
c
uf_space_prespace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbe867 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbe88b jmp 0xbe8a9 movq -0x10(%rbp), %rdi callq 0xbd720 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbe8a9 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2c0 jmp 0xbe9d2 movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbe8db movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbe903 jmp 0xbe9bb movq -0x10(%rbp), %rdi callq 0xbd720 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbe9bb movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbe946 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x201da2(%rip), %rcx # 0x2c06e0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbe959 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbbed0 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xbe97b movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbe9d2 movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2c0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbe9b9 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0xbde30 jmp 0xbe9d0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbde30 jmp 0xbe9d2 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
uf_space_prespace_selected_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BE867 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BE88B jmp short loc_BE8A9 loc_BE867: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BE8A9 loc_BE88B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_BE9D2 loc_BE8A9: mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BE8DB mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BE903 jmp loc_BE9BB loc_BE8DB: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_BE9BB loc_BE903: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BE946 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BE959 loc_BE946: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BE959: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_BE97B mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BE9D2 loc_BE97B: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BE9B9 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes_0 loc_BE9B9: jmp short loc_BE9D0 loc_BE9BB: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 loc_BE9D0: jmp short $+2 loc_BE9D2: add rsp, 30h pop rbp retn
long long uf_space_prespace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax int v7; // eax int v8; // ecx unsigned int v9; // eax int v10; // ecx unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( !a2[1] ) { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) != 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( a2[1] ) { v7 = *a2; v8 = a2[1] - 1; a2[1] = v8; if ( ((1 << v8) & v7) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v9 = *a2; v10 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v10; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10); } if ( &a3[bits_0] <= a4 ) { memset(a3, 32LL, bits_0); result = (long long)&a3[bits_0]; if ( (_BYTE *)result != a4 ) return decode_bytes_0(a1, (long long)a2, &a3[bits_0], a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_prespace_selected: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001be867 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001be88b JMP 0x001be8a9 LAB_001be867: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bd720 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001be8a9 LAB_001be88b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2c0 JMP 0x001be9d2 LAB_001be8a9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001be8db MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001be903 JMP 0x001be9bb LAB_001be8db: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bd720 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001be9bb LAB_001be903: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001be946 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3c06e0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001be959 LAB_001be946: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bbed0 MOV dword ptr [RBP + -0x28],EAX LAB_001be959: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001be97b MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001be9d2 LAB_001be97b: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001be9b9 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bde30 LAB_001be9b9: JMP 0x001be9d0 LAB_001be9bb: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bde30 LAB_001be9d0: JMP 0x001be9d2 LAB_001be9d2: ADD RSP,0x30 POP RBP RET
void uf_space_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
28,858
my_strnxfrm_8bit_nopad_bin
eloqsql/strings/ctype-bin.c
static size_t my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs, uchar * dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { set_if_smaller(srclen, dstlen); set_if_smaller(srclen, nweights); if (dst != src) memcpy(dst, src, srclen); return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen, dst + dstlen,(uint)(nweights - srclen), flags, 0); }
O3
c
my_strnxfrm_8bit_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %ebx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x10(%rbp), %r9d cmpq %rdx, %r13 cmovaeq %rdx, %r13 movl %ecx, %eax cmpq %rax, %r13 cmovaeq %rax, %r13 cmpq %r8, %rsi je 0x4a9fa movq %r12, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x25240 movl 0x10(%rbp), %r9d leaq (%r12,%r13), %rdx addq %r12, %r14 subl %r13d, %ebx movl $0x0, (%rsp) movq %r15, %rdi movq %r12, %rsi movq %r14, %rcx movl %ebx, %r8d callq 0x3c39e addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_8bit_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov ebx, ecx mov r14, rdx mov r12, rsi mov r15, rdi mov r9d, [rbp+arg_0] cmp r13, rdx cmovnb r13, rdx mov eax, ecx cmp r13, rax cmovnb r13, rax cmp rsi, r8 jz short loc_4A9FA mov rdi, r12 mov rsi, r8 mov rdx, r13 call _memcpy mov r9d, [rbp+arg_0] loc_4A9FA: lea rdx, [r12+r13] add r14, r12 sub ebx, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r12 mov rcx, r14 mov r8d, ebx call my_strxfrm_pad_desc_and_reverse_nopad add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_8bit_nopad_bin( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned int v10; // r9d v10 = a7; if ( a6 >= a3 ) a6 = a3; if ( a6 >= a4 ) a6 = a4; if ( a2 != a5 ) { memcpy(a2, a5, a6); v10 = a7; } return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, a2 + a6, a2 + a3, a4 - (unsigned int)a6, v10, 0); }
my_strnxfrm_8bit_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV EBX,ECX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV R9D,dword ptr [RBP + 0x10] CMP R13,RDX CMOVNC R13,RDX MOV EAX,ECX CMP R13,RAX CMOVNC R13,RAX CMP RSI,R8 JZ 0x0014a9fa MOV RDI,R12 MOV RSI,R8 MOV RDX,R13 CALL 0x00125240 MOV R9D,dword ptr [RBP + 0x10] LAB_0014a9fa: LEA RDX,[R12 + R13*0x1] ADD R14,R12 SUB EBX,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R12 MOV RCX,R14 MOV R8D,EBX CALL 0x0013c39e ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnxfrm_8bit_nopad_bin (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; uint uVar1; uVar1 = (uint)((ulong)in_RAX >> 0x20); if (param_3 <= param_6) { param_6 = param_3; } if (param_4 <= param_6) { param_6 = (ulong)param_4; } if (param_2 != param_5) { memcpy(param_2,param_5,param_6); } my_strxfrm_pad_desc_and_reverse_nopad (param_1,param_2,(long)param_2 + param_6,param_3 + (long)param_2,param_4 - (int)param_6, param_7,(ulong)uVar1 << 0x20); return; }
28,859
thr_lock_delete
eloqsql/mysys/thr_lock.c
void thr_lock_delete(THR_LOCK *lock) { DBUG_ENTER("thr_lock_delete"); mysql_mutex_lock(&THR_LOCK_lock); thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list); mysql_mutex_unlock(&THR_LOCK_lock); mysql_mutex_destroy(&lock->mutex); DBUG_VOID_RETURN; }
O3
c
thr_lock_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xb65c61(%rip), %r14 # 0xc082b8 cmpq $0x0, 0x40(%r14) jne 0xa26c8 leaq 0xb65c53(%rip), %rdi # 0xc082b8 callq 0x29200 leaq 0xb65ef7(%rip), %r15 # 0xc08568 movq (%r15), %rdi movq %rbx, %rsi callq 0x94618 movq %rax, (%r15) movq 0x40(%r14), %rdi testq %rdi, %rdi jne 0xa26cf leaq 0xb65c29(%rip), %rdi # 0xc082b8 callq 0x291c0 movq 0x58(%rbx), %rdi testq %rdi, %rdi je 0xa26b2 leaq 0x2e396c(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x58(%rbx) addq $0x18, %rbx movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x290c0 callq 0x2f1cb jmp 0xa266a leaq 0x2e393a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0xa2688
thr_lock_delete: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea r14, THR_LOCK_lock cmp qword ptr [r14+40h], 0 jnz short loc_A26C8 lea rdi, THR_LOCK_lock call _pthread_mutex_lock loc_A266A: lea r15, thr_lock_thread_list mov rdi, [r15] mov rsi, rbx call list_delete mov [r15], rax mov rdi, [r14+40h] test rdi, rdi jnz short loc_A26CF loc_A2688: lea rdi, THR_LOCK_lock call _pthread_mutex_unlock mov rdi, [rbx+58h] test rdi, rdi jz short loc_A26B2 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+58h], 0 loc_A26B2: add rbx, 18h mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_mutex_destroy loc_A26C8: call thr_lock_delete_cold_1 jmp short loc_A266A loc_A26CF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A2688
long long thr_lock_delete(_QWORD *a1) { long long v2; // rdi long long v3; // rdi if ( THR_LOCK_lock[8] ) thr_lock_delete_cold_1(a1); else pthread_mutex_lock(THR_LOCK_lock); thr_lock_thread_list = list_delete(thr_lock_thread_list, a1); v2 = THR_LOCK_lock[8]; if ( v2 ) ((void ( *)(long long))PSI_server[44])(v2); pthread_mutex_unlock(THR_LOCK_lock); v3 = a1[11]; if ( v3 ) { ((void ( *)(long long))PSI_server[9])(v3); a1[11] = 0LL; } return pthread_mutex_destroy(a1 + 3); }
thr_lock_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[0xd082b8] CMP qword ptr [R14 + 0x40],0x0 JNZ 0x001a26c8 LEA RDI,[0xd082b8] CALL 0x00129200 LAB_001a266a: LEA R15,[0xd08568] MOV RDI,qword ptr [R15] MOV RSI,RBX CALL 0x00194618 MOV qword ptr [R15],RAX MOV RDI,qword ptr [R14 + 0x40] TEST RDI,RDI JNZ 0x001a26cf LAB_001a2688: LEA RDI,[0xd082b8] CALL 0x001291c0 MOV RDI,qword ptr [RBX + 0x58] TEST RDI,RDI JZ 0x001a26b2 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x58],0x0 LAB_001a26b2: ADD RBX,0x18 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001290c0 LAB_001a26c8: CALL 0x0012f1cb JMP 0x001a266a LAB_001a26cf: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a2688
void thr_lock_delete(long param_1) { if (THR_LOCK_lock._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_lock); } else { thr_lock_delete_cold_1(); } thr_lock_thread_list = list_delete(thr_lock_thread_list,param_1); if (THR_LOCK_lock._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_lock); if (*(long *)(param_1 + 0x58) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0x58) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x18)); return; }
28,860
blst_scalar_from_uint64
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_scalar_from_uint64(pow256 ret, const unsigned long long a[4]) { const union { long one; char little; } is_endian = { 1 }; size_t i; if ((uptr_t)ret==(uptr_t)a && is_endian.little) return; for(i = 0; i < 4; i++) { unsigned long long w = a[i]; *ret++ = (byte)w; *ret++ = (byte)(w >> 8); *ret++ = (byte)(w >> 16); *ret++ = (byte)(w >> 24); *ret++ = (byte)(w >> 32); *ret++ = (byte)(w >> 40); *ret++ = (byte)(w >> 48); *ret++ = (byte)(w >> 56); } }
O3
c
blst_scalar_from_uint64: pushq %rbp movq %rsp, %rbp cmpq %rsi, %rdi je 0x63a1a xorl %eax, %eax movq (%rsi,%rax,8), %rcx movq %rcx, (%rdi,%rax,8) incq %rax cmpq $0x4, %rax jne 0x63a09 popq %rbp retq
blst_scalar_from_uint64: push rbp mov rbp, rsp cmp rdi, rsi jz short loc_63A1A xor eax, eax loc_63A09: mov rcx, [rsi+rax*8] mov [rdi+rax*8], rcx inc rax cmp rax, 4 jnz short loc_63A09 loc_63A1A: pop rbp retn
void blst_scalar_from_uint64(long long a1, long long a2) { long long i; // rax if ( a1 != a2 ) { for ( i = 0LL; i != 4; ++i ) *(_QWORD *)(a1 + 8 * i) = *(_QWORD *)(a2 + 8 * i); } }
blst_scalar_from_uint64: PUSH RBP MOV RBP,RSP CMP RDI,RSI JZ 0x00163a1a XOR EAX,EAX LAB_00163a09: MOV RCX,qword ptr [RSI + RAX*0x8] MOV qword ptr [RDI + RAX*0x8],RCX INC RAX CMP RAX,0x4 JNZ 0x00163a09 LAB_00163a1a: POP RBP RET
void blst_scalar_from_uint64(long param_1,long param_2) { long lVar1; if (param_1 != param_2) { lVar1 = 0; do { *(int8 *)(param_1 + lVar1 * 8) = *(int8 *)(param_2 + lVar1 * 8); lVar1 = lVar1 + 1; } while (lVar1 != 4); } return; }
28,861
ma_scan_init_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_scan_init_block_record(MARIA_HA *info) { MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_scan_init_block_record"); DBUG_ASSERT(info->dfile.file == share->bitmap.file.file); /* bitmap_buff may already be allocated if this is the second call to rnd_init() without a rnd_end() in between, see sql/handler.h */ if (!(info->scan.bitmap_buff || ((info->scan.bitmap_buff= (uchar *) my_malloc(PSI_INSTRUMENT_ME, share->block_size * 2, flag))))) DBUG_RETURN(1); info->scan.page_buff= info->scan.bitmap_buff + share->block_size; info->scan.bitmap_end= info->scan.bitmap_buff + share->bitmap.max_total_size; /* Set scan variables to get _ma_scan_block() to start with reading bitmap */ info->scan.number_of_rows= 0; info->scan.bitmap_pos= info->scan.bitmap_end; info->scan.bitmap_page= (pgcache_page_no_t) 0 - share->bitmap.pages_covered; info->scan.max_page= share->state.state.data_file_length / share->block_size; /* We need to flush what's in memory (bitmap.map) to page cache otherwise, as we are going to read bitmaps from page cache in table scan (see _ma_scan_block_record()), we may miss recently inserted rows (bitmap page in page cache would be too old). */ DBUG_RETURN(_ma_bitmap_flush(info->s)); }
O3
c
ma_scan_init_block_record: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq (%rdi), %r14 movq 0x220(%rdi), %rax movq %r14, %rdi testq %rax, %rax jne 0x370e1 xorl %edx, %edx cmpb $0x0, 0x7d9(%r14) setne %dl shll $0x10, %edx orq $0x10, %rdx movl 0x7bc(%r14), %esi addl %esi, %esi xorl %edi, %edi callq 0xbf321 movq %rax, 0x220(%rbx) testq %rax, %rax je 0x37144 movq (%rbx), %rdi movl 0x7bc(%r14), %ecx addq %rax, %rcx movq %rcx, 0x238(%rbx) movl 0xb3c(%r14), %ecx addq %rax, %rcx movq %rcx, 0x230(%rbx) movl $0x0, 0x268(%rbx) movq %rcx, 0x228(%rbx) xorl %eax, %eax subq 0xb48(%r14), %rax movq %rax, 0x250(%rbx) movq 0x40(%r14), %rax movl 0x7bc(%r14), %ecx xorl %edx, %edx divq %rcx movq %rax, 0x258(%rbx) popq %rbx popq %r14 popq %rbp jmp 0x3ca59 movb $0x1, %al popq %rbx popq %r14 popq %rbp retq
_ma_scan_init_block_record: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov r14, [rdi] mov rax, [rdi+220h] mov rdi, r14 test rax, rax jnz short loc_370E1 xor edx, edx cmp byte ptr [r14+7D9h], 0 setnz dl shl edx, 10h or rdx, 10h mov esi, [r14+7BCh] add esi, esi xor edi, edi call my_malloc mov [rbx+220h], rax test rax, rax jz short loc_37144 mov rdi, [rbx] loc_370E1: mov ecx, [r14+7BCh] add rcx, rax mov [rbx+238h], rcx mov ecx, [r14+0B3Ch] add rcx, rax mov [rbx+230h], rcx mov dword ptr [rbx+268h], 0 mov [rbx+228h], rcx xor eax, eax sub rax, [r14+0B48h] mov [rbx+250h], rax mov rax, [r14+40h] mov ecx, [r14+7BCh] xor edx, edx div rcx mov [rbx+258h], rax pop rbx pop r14 pop rbp jmp _ma_bitmap_flush loc_37144: mov al, 1 pop rbx pop r14 pop rbp retn
long long ma_scan_init_block_record(long long *a1, long long a2) { long long v3; // r14 long long v4; // rax long long v5; // rdi long long v6; // rcx unsigned long long v7; // rdx v3 = *a1; v4 = a1[68]; v5 = *a1; if ( v4 ) goto LABEL_4; a2 = (unsigned int)(2 * *(_DWORD *)(v3 + 1980)); v4 = my_malloc(0LL, a2, ((unsigned __int8)(*(_BYTE *)(v3 + 2009) != 0) << 16) | 0x10LL); a1[68] = v4; if ( v4 ) { v5 = *a1; LABEL_4: a1[71] = v4 + *(unsigned int *)(v3 + 1980); v6 = v4 + *(unsigned int *)(v3 + 2876); a1[70] = v6; *((_DWORD *)a1 + 154) = 0; a1[69] = v6; a1[74] = -*(_QWORD *)(v3 + 2888); v7 = *(_QWORD *)(v3 + 64) % (unsigned long long)*(unsigned int *)(v3 + 1980); a1[75] = *(_QWORD *)(v3 + 64) / (unsigned long long)*(unsigned int *)(v3 + 1980); return ma_bitmap_flush(v5, a2, v7); } return 1LL; }
_ma_scan_init_block_record: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x220] MOV RDI,R14 TEST RAX,RAX JNZ 0x001370e1 XOR EDX,EDX CMP byte ptr [R14 + 0x7d9],0x0 SETNZ DL SHL EDX,0x10 OR RDX,0x10 MOV ESI,dword ptr [R14 + 0x7bc] ADD ESI,ESI XOR EDI,EDI CALL 0x001bf321 MOV qword ptr [RBX + 0x220],RAX TEST RAX,RAX JZ 0x00137144 MOV RDI,qword ptr [RBX] LAB_001370e1: MOV ECX,dword ptr [R14 + 0x7bc] ADD RCX,RAX MOV qword ptr [RBX + 0x238],RCX MOV ECX,dword ptr [R14 + 0xb3c] ADD RCX,RAX MOV qword ptr [RBX + 0x230],RCX MOV dword ptr [RBX + 0x268],0x0 MOV qword ptr [RBX + 0x228],RCX XOR EAX,EAX SUB RAX,qword ptr [R14 + 0xb48] MOV qword ptr [RBX + 0x250],RAX MOV RAX,qword ptr [R14 + 0x40] MOV ECX,dword ptr [R14 + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x258],RAX POP RBX POP R14 POP RBP JMP 0x0013ca59 LAB_00137144: MOV AL,0x1 POP RBX POP R14 POP RBP RET
int8 _ma_scan_init_block_record(long *param_1) { long lVar1; long lVar2; int8 uVar3; long lVar4; lVar1 = *param_1; lVar2 = param_1[0x44]; lVar4 = lVar1; if (lVar2 == 0) { lVar2 = my_malloc(0,*(int *)(lVar1 + 0x7bc) * 2, (ulong)(*(char *)(lVar1 + 0x7d9) != '\0') << 0x10 | 0x10); param_1[0x44] = lVar2; if (lVar2 == 0) { return 1; } lVar4 = *param_1; } param_1[0x47] = (ulong)*(uint *)(lVar1 + 0x7bc) + lVar2; lVar2 = (ulong)*(uint *)(lVar1 + 0xb3c) + lVar2; param_1[0x46] = lVar2; *(int4 *)(param_1 + 0x4d) = 0; param_1[0x45] = lVar2; param_1[0x4a] = -*(long *)(lVar1 + 0xb48); param_1[0x4b] = *(ulong *)(lVar1 + 0x40) / (ulong)*(uint *)(lVar1 + 0x7bc); uVar3 = _ma_bitmap_flush(lVar4); return uVar3; }
28,862
glfw_error_callback(int, char const*)
LumonMDR/src/main.cpp
void glfw_error_callback(int error, const char* description) { std::cerr << "GLFW Error (" << error << "): " << description << std::endl; }
O3
cpp
glfw_error_callback(int, char const*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movl %edi, %ebx movq 0xd4dfb(%rip), %r15 # 0xdbfe8 leaq 0x97e10(%rip), %rsi # 0x9f004 movl $0xc, %edx movq %r15, %rdi callq 0x6660 movq %r15, %rdi movl %ebx, %esi callq 0x69f0 movq %rax, %rbx leaq 0x97dfc(%rip), %rsi # 0x9f011 movl $0x3, %edx movq %rax, %rdi callq 0x6660 testq %r14, %r14 je 0x723f movq %r14, %rdi callq 0x62a0 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x6660 jmp 0x7258 movq (%rbx), %rax movq -0x18(%rax), %rax movq %rbx, %rdi addq %rax, %rdi movl 0x20(%rbx,%rax), %esi orl $0x1, %esi callq 0x69d0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x6520 movsbl %al, %esi movq %rbx, %rdi callq 0x6040 movq %rax, %rdi popq %rbx popq %r14 popq %r15 jmp 0x63e0
_Z19glfw_error_callbackiPKc: push r15 push r14 push rbx mov r14, rsi mov ebx, edi mov r15, cs:_ZSt4cerr_ptr lea rsi, aGlfwError; "GLFW Error (" mov edx, 0Ch mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r15 mov esi, ebx call __ZNSolsEi; std::ostream::operator<<(int) mov rbx, rax lea rsi, asc_9F011; "): " mov edx, 3 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r14, r14 jz short loc_723F mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_7258 loc_723F: mov rax, [rbx] mov rax, [rax-18h] mov rdi, rbx add rdi, rax mov esi, [rbx+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_7258: mov rax, [rbx] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbx; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this pop rbx pop r14 pop r15 jmp __ZNSo5flushEv; std::ostream::flush(void)
long long glfw_error_callback(unsigned int a1, const char *a2) { std::ostream *v2; // rbx long long v3; // rax char v4; // al std::ostream *v5; // rax std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "GLFW Error (", 12LL); v2 = (std::ostream *)std::ostream::operator<<(&std::cerr, a1); std::__ostream_insert<char,std::char_traits<char>>(v2, "): ", 3LL); if ( a2 ) { v3 = strlen(a2); std::__ostream_insert<char,std::char_traits<char>>(v2, a2, v3); } else { std::ios::clear( (char *)v2 + *(_QWORD *)(*(_QWORD *)v2 - 24LL), *(_DWORD *)((char *)v2 + *(_QWORD *)(*(_QWORD *)v2 - 24LL) + 32) | 1u); } v4 = std::ios::widen((char *)v2 + *(_QWORD *)(*(_QWORD *)v2 - 24LL), 10LL); v5 = (std::ostream *)std::ostream::put(v2, v4); return std::ostream::flush(v5); }
glfw_error_callback: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV EBX,EDI MOV R15,qword ptr [0x001dbfe8] LEA RSI,[0x19f004] MOV EDX,0xc MOV RDI,R15 CALL 0x00106660 MOV RDI,R15 MOV ESI,EBX CALL 0x001069f0 MOV RBX,RAX LEA RSI,[0x19f011] MOV EDX,0x3 MOV RDI,RAX CALL 0x00106660 TEST R14,R14 JZ 0x0010723f MOV RDI,R14 CALL 0x001062a0 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x00106660 JMP 0x00107258 LAB_0010723f: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,RBX ADD RDI,RAX MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x001069d0 LAB_00107258: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX MOV ESI,0xa CALL 0x00106520 MOVSX ESI,AL MOV RDI,RBX CALL 0x00106040 MOV RDI,RAX POP RBX POP R14 POP R15 JMP 0x001063e0
/* glfw_error_callback(int, char const*) */ void glfw_error_callback(int param_1,char *param_2) { int *this; ostream *poVar1; size_t sVar2; this = PTR_cerr_001dbfe8; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_001dbfe8,"GLFW Error (",0xc); poVar1 = (ostream *)std::ostream::operator<<((ostream *)this,param_1); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"): ",3); if (param_2 == (char *)0x0) { std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18), *(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1); } else { sVar2 = strlen(param_2); std::__ostream_insert<char,std::char_traits<char>>(poVar1,param_2,sVar2); } std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1); std::ostream::put((char)poVar1); std::ostream::flush(); return; }
28,863
inline_mysql_file_read
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_read( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_read(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_read(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_read: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x2056d0(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x41087 leaq 0x205686(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x8bab0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x41032 cmpq $0x0, -0x38(%rbp) jne 0x41017 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x41022 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0x41022 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x4105f cmpq $-0x1, -0x38(%rbp) je 0x41046 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x41051 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0x41051 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x2055e2(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x410a7 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x8bab0 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_read_0: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 6 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_41087 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_41032 cmp [rbp+var_38], 0 jnz short loc_41017 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_41022 loc_41017: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_41022: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_4105F loc_41032: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_41046 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_41051 loc_41046: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_41051: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_4105F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_410A7 loc_41087: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_410A7: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_read_0( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v9, a3, 6LL); if ( v10 ) { (*((void ( **)(long long, long long, long long, _QWORD))PSI_server + 66))(v10, v13, v17, v16); v11 = my_read(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; (*((void ( **)(long long, long long))PSI_server + 67))(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; (*((void ( **)(long long, long long))PSI_server + 67))(v10, v7); } return v11; } else { return my_read(v15, v14, v13, v12); } }
inline_mysql_file_read: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00141087 LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0018bab0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x00141032 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00141017 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x00141022 LAB_00141017: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x00141022 LAB_00141022: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x0014105f LAB_00141032: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x00141046 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x00141051 LAB_00141046: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x00141051 LAB_00141051: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_0014105f: LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001410a7 LAB_00141087: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0018bab0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001410a7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_read (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6); if (local_48 == 0) { local_10 = my_read(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_read(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
28,864
plutovg_path_add_arc
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_add_arc(plutovg_path_t* path, float cx, float cy, float r, float a0, float a1, bool ccw) { float da = a1 - a0; if(fabsf(da) > PLUTOVG_TWO_PI) { da = PLUTOVG_TWO_PI; } else if(da != 0.f && ccw != (da < 0.f)) { da += PLUTOVG_TWO_PI * (ccw ? -1 : 1); } int seg_n = (int)(ceilf(fabsf(da) / PLUTOVG_HALF_PI)); if(seg_n == 0) return; float a = a0; float ax = cx + cosf(a) * r; float ay = cy + sinf(a) * r; float seg_a = da / seg_n; float d = (seg_a / PLUTOVG_HALF_PI) * PLUTOVG_KAPPA * r; float dx = -sinf(a) * d; float dy = cosf(a) * d; plutovg_path_reserve(path, 2 + 4 * seg_n); if(path->elements.size == 0) { plutovg_path_move_to(path, ax, ay); } else { plutovg_path_line_to(path, ax, ay); } for(int i = 0; i < seg_n; i++) { float cp1x = ax + dx; float cp1y = ay + dy; a += seg_a; ax = cx + cosf(a) * r; ay = cy + sinf(a) * r; dx = -sinf(a) * d; dy = cosf(a) * d; float cp2x = ax - dx; float cp2y = ay - dy; plutovg_path_cubic_to(path, cp1x, cp1y, cp2x, cp2y, ax, ay); } }
O1
c
plutovg_path_add_arc: pushq %r14 pushq %rbx subq $0x68, %rsp movaps %xmm0, %xmm5 movq %rdi, %rbx subss %xmm3, %xmm4 movaps 0x18166(%rip), %xmm0 # 0x23290 andps %xmm4, %xmm0 movss 0x17ed7(%rip), %xmm6 # 0x2300c ucomiss %xmm6, %xmm0 ja 0xb16f xorps %xmm0, %xmm0 ucomiss %xmm4, %xmm0 setbe %al ucomiss %xmm0, %xmm4 jne 0xb14a jnp 0xb15e xorb %sil, %al jne 0xb15e testb %sil, %sil jne 0xb163 movss 0x17eb0(%rip), %xmm6 # 0x2300c jmp 0xb16b movaps %xmm4, %xmm6 jmp 0xb16f movss 0x18bc1(%rip), %xmm6 # 0x23d2c addss %xmm4, %xmm6 movaps %xmm6, 0x40(%rsp) movaps 0x18115(%rip), %xmm0 # 0x23290 andps %xmm6, %xmm0 divss 0x18bba(%rip), %xmm0 # 0x23d40 movss %xmm3, 0xc(%rsp) movss %xmm2, 0x18(%rsp) movss %xmm1, 0x24(%rsp) movss %xmm5, 0x20(%rsp) callq 0x3110 cvttss2si %xmm0, %r14d testl %r14d, %r14d je 0xb3ad movss 0xc(%rsp), %xmm0 callq 0x3050 mulss 0x18(%rsp), %xmm0 addss 0x20(%rsp), %xmm0 movss %xmm0, 0x14(%rsp) movss 0xc(%rsp), %xmm0 callq 0x30c0 mulss 0x18(%rsp), %xmm0 addss 0x24(%rsp), %xmm0 movss %xmm0, 0x10(%rsp) movss 0xc(%rsp), %xmm0 callq 0x30c0 movaps %xmm0, 0x30(%rsp) movss 0xc(%rsp), %xmm0 callq 0x3050 movss %xmm0, 0x1c(%rsp) leal 0x2(,%r14,4), %esi movq %rbx, %rdi callq 0xac17 cmpl $0x0, 0x20(%rbx) je 0xb23e movq %rbx, %rdi movss 0x14(%rsp), %xmm0 movss 0x10(%rsp), %xmm1 callq 0xa41d movss 0x14(%rsp), %xmm1 jmp 0xb26f movq %rbx, %rdi xorl %esi, %esi movl $0x1, %edx callq 0xa3a7 movss 0x14(%rsp), %xmm1 movss %xmm1, (%rax) movss 0x10(%rsp), %xmm0 movss %xmm0, 0x4(%rax) movss %xmm1, 0x10(%rbx) movss %xmm0, 0x14(%rbx) incl 0x8(%rbx) testl %r14d, %r14d movss 0xc(%rsp), %xmm0 movaps 0x40(%rsp), %xmm5 movss 0x10(%rsp), %xmm6 movss 0x1c(%rsp), %xmm2 movaps 0x30(%rsp), %xmm3 jle 0xb3ad xorps %xmm4, %xmm4 cvtsi2ss %r14d, %xmm4 divss %xmm4, %xmm5 movaps %xmm5, 0x40(%rsp) divss 0x18a93(%rip), %xmm5 # 0x23d40 mulss 0x18a87(%rip), %xmm5 # 0x23d3c xorps 0x17fc4(%rip), %xmm3 # 0x23280 mulss 0x18(%rsp), %xmm5 mulss %xmm5, %xmm3 movaps %xmm5, 0x50(%rsp) mulss %xmm5, %xmm2 addss %xmm6, %xmm2 movss %xmm2, 0x1c(%rsp) addss %xmm3, %xmm1 movss %xmm1, 0x14(%rsp) addss 0x40(%rsp), %xmm0 movss %xmm0, 0xc(%rsp) callq 0x3050 mulss 0x18(%rsp), %xmm0 addss 0x20(%rsp), %xmm0 movss %xmm0, 0x28(%rsp) movss 0xc(%rsp), %xmm0 callq 0x30c0 mulss 0x18(%rsp), %xmm0 addss 0x24(%rsp), %xmm0 movss %xmm0, 0x10(%rsp) movss 0xc(%rsp), %xmm0 callq 0x30c0 xorps 0x17f4b(%rip), %xmm0 # 0x23280 mulss 0x50(%rsp), %xmm0 movaps %xmm0, 0x30(%rsp) movss 0xc(%rsp), %xmm0 callq 0x3050 mulss 0x50(%rsp), %xmm0 movss %xmm0, 0x2c(%rsp) movss 0x28(%rsp), %xmm4 movaps %xmm4, %xmm2 subss 0x30(%rsp), %xmm2 movss 0x10(%rsp), %xmm5 movaps %xmm5, %xmm3 subss %xmm0, %xmm3 movq %rbx, %rdi movss 0x14(%rsp), %xmm0 movss 0x1c(%rsp), %xmm1 callq 0xa526 movss 0x10(%rsp), %xmm6 movss 0xc(%rsp), %xmm0 movaps 0x30(%rsp), %xmm3 movss 0x28(%rsp), %xmm1 movss 0x2c(%rsp), %xmm2 decl %r14d jne 0xb2cf addq $0x68, %rsp popq %rbx popq %r14 retq
plutovg_path_add_arc: push r14 push rbx sub rsp, 68h movaps xmm5, xmm0 mov rbx, rdi subss xmm4, xmm3 movaps xmm0, cs:xmmword_23290 andps xmm0, xmm4 movss xmm6, cs:dword_2300C ucomiss xmm0, xmm6 ja short loc_B16F xorps xmm0, xmm0 ucomiss xmm0, xmm4 setbe al ucomiss xmm4, xmm0 jnz short loc_B14A jnp short loc_B15E loc_B14A: xor al, sil jnz short loc_B15E test sil, sil jnz short loc_B163 movss xmm6, cs:dword_2300C jmp short loc_B16B loc_B15E: movaps xmm6, xmm4 jmp short loc_B16F loc_B163: movss xmm6, cs:dword_23D2C loc_B16B: addss xmm6, xmm4 loc_B16F: movaps [rsp+78h+var_38], xmm6 movaps xmm0, cs:xmmword_23290 andps xmm0, xmm6 divss xmm0, cs:dword_23D40 movss [rsp+78h+var_6C], xmm3 movss [rsp+78h+var_60], xmm2 movss [rsp+78h+var_54], xmm1 movss [rsp+78h+var_58], xmm5 call _ceilf cvttss2si r14d, xmm0 test r14d, r14d jz loc_B3AD movss xmm0, [rsp+78h+var_6C] call _cosf mulss xmm0, [rsp+78h+var_60] addss xmm0, [rsp+78h+var_58] movss [rsp+78h+var_64], xmm0 movss xmm0, [rsp+78h+var_6C] call _sinf mulss xmm0, [rsp+78h+var_60] addss xmm0, [rsp+78h+var_54] movss [rsp+78h+var_68], xmm0 movss xmm0, [rsp+78h+var_6C] call _sinf movaps [rsp+78h+var_48], xmm0 movss xmm0, [rsp+78h+var_6C] call _cosf movss [rsp+78h+var_5C], xmm0 lea esi, ds:2[r14*4] mov rdi, rbx call plutovg_path_reserve cmp dword ptr [rbx+20h], 0 jz short loc_B23E mov rdi, rbx movss xmm0, [rsp+78h+var_64] movss xmm1, [rsp+78h+var_68] call plutovg_path_line_to movss xmm1, [rsp+78h+var_64] jmp short loc_B26F loc_B23E: mov rdi, rbx xor esi, esi mov edx, 1 call plutovg_path_add_command movss xmm1, [rsp+78h+var_64] movss dword ptr [rax], xmm1 movss xmm0, [rsp+78h+var_68] movss dword ptr [rax+4], xmm0 movss dword ptr [rbx+10h], xmm1 movss dword ptr [rbx+14h], xmm0 inc dword ptr [rbx+8] loc_B26F: test r14d, r14d movss xmm0, [rsp+78h+var_6C] movaps xmm5, [rsp+78h+var_38] movss xmm6, [rsp+78h+var_68] movss xmm2, [rsp+78h+var_5C] movaps xmm3, [rsp+78h+var_48] jle loc_B3AD xorps xmm4, xmm4 cvtsi2ss xmm4, r14d divss xmm5, xmm4 movaps [rsp+78h+var_38], xmm5 divss xmm5, cs:dword_23D40 mulss xmm5, cs:dword_23D3C xorps xmm3, cs:xmmword_23280 mulss xmm5, [rsp+78h+var_60] mulss xmm3, xmm5 movaps [rsp+78h+var_28], xmm5 mulss xmm2, xmm5 loc_B2CF: addss xmm2, xmm6 movss [rsp+78h+var_5C], xmm2 addss xmm1, xmm3 movss [rsp+78h+var_64], xmm1 addss xmm0, dword ptr [rsp+78h+var_38] movss [rsp+78h+var_6C], xmm0 call _cosf mulss xmm0, [rsp+78h+var_60] addss xmm0, [rsp+78h+var_58] movss [rsp+78h+var_50], xmm0 movss xmm0, [rsp+78h+var_6C] call _sinf mulss xmm0, [rsp+78h+var_60] addss xmm0, [rsp+78h+var_54] movss [rsp+78h+var_68], xmm0 movss xmm0, [rsp+78h+var_6C] call _sinf xorps xmm0, cs:xmmword_23280 mulss xmm0, dword ptr [rsp+78h+var_28] movaps [rsp+78h+var_48], xmm0 movss xmm0, [rsp+78h+var_6C] call _cosf mulss xmm0, dword ptr [rsp+78h+var_28] movss [rsp+78h+var_4C], xmm0 movss xmm4, [rsp+78h+var_50] movaps xmm2, xmm4 subss xmm2, dword ptr [rsp+78h+var_48] movss xmm5, [rsp+78h+var_68] movaps xmm3, xmm5 subss xmm3, xmm0 mov rdi, rbx movss xmm0, [rsp+78h+var_64] movss xmm1, [rsp+78h+var_5C] call plutovg_path_cubic_to movss xmm6, [rsp+78h+var_68] movss xmm0, [rsp+78h+var_6C] movaps xmm3, [rsp+78h+var_48] movss xmm1, [rsp+78h+var_50] movss xmm2, [rsp+78h+var_4C] dec r14d jnz loc_B2CF loc_B3AD: add rsp, 68h pop rbx pop r14 retn
void plutovg_path_add_arc(long long a1, char a2, float a3, float a4, float a5, float a6, double a7) { long long v8; // xmm6_8 double v9; // xmm0_8 int v10; // r14d long long v11; // rdx float v12; // xmm1_4 float *v13; // rax float v14; // xmm0_4 float v15; // xmm6_4 float v16; // xmm5_4 float v17; // xmm3_4 float v18; // xmm2_4 float v19; // [rsp+Ch] [rbp-6Ch] float v20; // [rsp+10h] [rbp-68h] float v21; // [rsp+10h] [rbp-68h] float v22; // [rsp+14h] [rbp-64h] float v24; // [rsp+1Ch] [rbp-5Ch] float v25; // [rsp+20h] [rbp-58h] float v27; // [rsp+28h] [rbp-50h] float v28; // [rsp+2Ch] [rbp-4Ch] float v29; // [rsp+30h] [rbp-48h] float v30; // [rsp+30h] [rbp-48h] float v31; // [rsp+40h] [rbp-38h] float v32; // [rsp+40h] [rbp-38h] float v33; // [rsp+50h] [rbp-28h] *(float *)&a7 = *(float *)&a7 - a6; v8 = 1086918619LL; if ( fabs(*(float *)&a7) <= 6.2831855 ) { if ( *(float *)&a7 == 0.0 || a2 != *(float *)&a7 >= 0.0 ) { v8 = *(_QWORD *)&a7; } else { if ( a2 ) v8 = 3234402267LL; else v8 = 1086918619LL; *(float *)&v8 = *(float *)&v8 + *(float *)&a7; } } v31 = *(float *)&v8; HIDWORD(v9) = HIDWORD(v8) & 0x7FFFFFFF; *(float *)&v9 = fabs(*(float *)&v8) / 1.5707964; v25 = a3; v10 = (int)ceilf(v9); if ( v10 ) { v22 = (float)(cosf(a6) * a5) + v25; v20 = (float)(sinf(a6) * a5) + a4; v29 = sinf(a6); v24 = cosf(a6); plutovg_path_reserve(a1, 4 * v10 + 2, v11); if ( *(_DWORD *)(a1 + 32) ) { plutovg_path_line_to(a1, v22, v20); v12 = v22; } else { v13 = (float *)plutovg_path_add_command(a1, 0, 1); v12 = v22; *v13 = v22; v13[1] = v20; *(float *)(a1 + 16) = v22; *(float *)(a1 + 20) = v20; ++*(_DWORD *)(a1 + 8); } v14 = a6; v15 = v20; if ( v10 > 0 ) { v32 = v31 / (float)v10; v16 = (float)((float)(v32 / 1.5707964) * 0.55228478) * a5; v17 = (float)-v29 * v16; v33 = v16; v18 = v24 * v16; do { v19 = v14 + v32; v27 = (float)(cosf(v14 + v32) * a5) + v25; v21 = (float)(sinf(v19) * a5) + a4; v30 = (float)-sinf(v19) * v33; v28 = cosf(v19) * v33; plutovg_path_cubic_to(a1, v12 + v17, v18 + v15, v27 - v30, v21 - v28, v27, v21); v15 = v21; v14 = v19; v17 = v30; v12 = v27; v18 = v28; --v10; } while ( v10 ); } } }
plutovg_path_add_arc: PUSH R14 PUSH RBX SUB RSP,0x68 MOVAPS XMM5,XMM0 MOV RBX,RDI SUBSS XMM4,XMM3 MOVAPS XMM0,xmmword ptr [0x00123290] ANDPS XMM0,XMM4 MOVSS XMM6,dword ptr [0x0012300c] UCOMISS XMM0,XMM6 JA 0x0010b16f XORPS XMM0,XMM0 UCOMISS XMM0,XMM4 SETBE AL UCOMISS XMM4,XMM0 JNZ 0x0010b14a JNP 0x0010b15e LAB_0010b14a: XOR AL,SIL JNZ 0x0010b15e TEST SIL,SIL JNZ 0x0010b163 MOVSS XMM6,dword ptr [0x0012300c] JMP 0x0010b16b LAB_0010b15e: MOVAPS XMM6,XMM4 JMP 0x0010b16f LAB_0010b163: MOVSS XMM6,dword ptr [0x00123d2c] LAB_0010b16b: ADDSS XMM6,XMM4 LAB_0010b16f: MOVAPS xmmword ptr [RSP + 0x40],XMM6 MOVAPS XMM0,xmmword ptr [0x00123290] ANDPS XMM0,XMM6 DIVSS XMM0,dword ptr [0x00123d40] MOVSS dword ptr [RSP + 0xc],XMM3 MOVSS dword ptr [RSP + 0x18],XMM2 MOVSS dword ptr [RSP + 0x24],XMM1 MOVSS dword ptr [RSP + 0x20],XMM5 CALL 0x00103110 CVTTSS2SI R14D,XMM0 TEST R14D,R14D JZ 0x0010b3ad MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x00103050 MULSS XMM0,dword ptr [RSP + 0x18] ADDSS XMM0,dword ptr [RSP + 0x20] MOVSS dword ptr [RSP + 0x14],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x001030c0 MULSS XMM0,dword ptr [RSP + 0x18] ADDSS XMM0,dword ptr [RSP + 0x24] MOVSS dword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x001030c0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x00103050 MOVSS dword ptr [RSP + 0x1c],XMM0 LEA ESI,[0x2 + R14*0x4] MOV RDI,RBX CALL 0x0010ac17 CMP dword ptr [RBX + 0x20],0x0 JZ 0x0010b23e MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS XMM1,dword ptr [RSP + 0x10] CALL 0x0010a41d MOVSS XMM1,dword ptr [RSP + 0x14] JMP 0x0010b26f LAB_0010b23e: MOV RDI,RBX XOR ESI,ESI MOV EDX,0x1 CALL 0x0010a3a7 MOVSS XMM1,dword ptr [RSP + 0x14] MOVSS dword ptr [RAX],XMM1 MOVSS XMM0,dword ptr [RSP + 0x10] MOVSS dword ptr [RAX + 0x4],XMM0 MOVSS dword ptr [RBX + 0x10],XMM1 MOVSS dword ptr [RBX + 0x14],XMM0 INC dword ptr [RBX + 0x8] LAB_0010b26f: TEST R14D,R14D MOVSS XMM0,dword ptr [RSP + 0xc] MOVAPS XMM5,xmmword ptr [RSP + 0x40] MOVSS XMM6,dword ptr [RSP + 0x10] MOVSS XMM2,dword ptr [RSP + 0x1c] MOVAPS XMM3,xmmword ptr [RSP + 0x30] JLE 0x0010b3ad XORPS XMM4,XMM4 CVTSI2SS XMM4,R14D DIVSS XMM5,XMM4 MOVAPS xmmword ptr [RSP + 0x40],XMM5 DIVSS XMM5,dword ptr [0x00123d40] MULSS XMM5,dword ptr [0x00123d3c] XORPS XMM3,xmmword ptr [0x00123280] MULSS XMM5,dword ptr [RSP + 0x18] MULSS XMM3,XMM5 MOVAPS xmmword ptr [RSP + 0x50],XMM5 MULSS XMM2,XMM5 LAB_0010b2cf: ADDSS XMM2,XMM6 MOVSS dword ptr [RSP + 0x1c],XMM2 ADDSS XMM1,XMM3 MOVSS dword ptr [RSP + 0x14],XMM1 ADDSS XMM0,dword ptr [RSP + 0x40] MOVSS dword ptr [RSP + 0xc],XMM0 CALL 0x00103050 MULSS XMM0,dword ptr [RSP + 0x18] ADDSS XMM0,dword ptr [RSP + 0x20] MOVSS dword ptr [RSP + 0x28],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x001030c0 MULSS XMM0,dword ptr [RSP + 0x18] ADDSS XMM0,dword ptr [RSP + 0x24] MOVSS dword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x001030c0 XORPS XMM0,xmmword ptr [0x00123280] MULSS XMM0,dword ptr [RSP + 0x50] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x00103050 MULSS XMM0,dword ptr [RSP + 0x50] MOVSS dword ptr [RSP + 0x2c],XMM0 MOVSS XMM4,dword ptr [RSP + 0x28] MOVAPS XMM2,XMM4 SUBSS XMM2,dword ptr [RSP + 0x30] MOVSS XMM5,dword ptr [RSP + 0x10] MOVAPS XMM3,XMM5 SUBSS XMM3,XMM0 MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS XMM1,dword ptr [RSP + 0x1c] CALL 0x0010a526 MOVSS XMM6,dword ptr [RSP + 0x10] MOVSS XMM0,dword ptr [RSP + 0xc] MOVAPS XMM3,xmmword ptr [RSP + 0x30] MOVSS XMM1,dword ptr [RSP + 0x28] MOVSS XMM2,dword ptr [RSP + 0x2c] DEC R14D JNZ 0x0010b2cf LAB_0010b3ad: ADD RSP,0x68 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void plutovg_path_add_arc (float param_1,float param_2,float param_3,float param_4,float param_5,long param_6, char param_7) { float *pfVar1; int iVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; float fVar11; param_5 = param_5 - param_4; fVar11 = DAT_0012300c; if ((float)(_DAT_00123290 & (uint)param_5) <= DAT_0012300c) { fVar11 = param_5; if (((param_5 != 0.0) || (NAN(param_5))) && (0.0 <= param_5 == (bool)param_7)) { fVar11 = DAT_00123d2c; if (param_7 == '\0') { fVar11 = DAT_0012300c; } fVar11 = fVar11 + param_5; } } fVar3 = ceilf((float)(_DAT_00123290 & (uint)fVar11) / _DAT_00123d40); iVar2 = (int)fVar3; if (iVar2 != 0) { fVar3 = cosf(param_4); fVar3 = fVar3 * param_3 + param_1; fVar4 = sinf(param_4); fVar4 = fVar4 * param_3 + param_2; fVar5 = sinf(param_4); fVar6 = cosf(param_4); plutovg_path_reserve(param_6,iVar2 * 4 + 2); if (*(int *)(param_6 + 0x20) == 0) { pfVar1 = (float *)plutovg_path_add_command(param_6,0,1); *pfVar1 = fVar3; pfVar1[1] = fVar4; *(float *)(param_6 + 0x10) = fVar3; *(float *)(param_6 + 0x14) = fVar4; *(int *)(param_6 + 8) = *(int *)(param_6 + 8) + 1; } else { plutovg_path_line_to(fVar3,fVar4,param_6); } if (0 < iVar2) { fVar9 = (float)iVar2; fVar10 = ((fVar11 / fVar9) / _DAT_00123d40) * DAT_00123d3c * param_3; fVar5 = (float)((uint)fVar5 ^ _DAT_00123280) * fVar10; fVar6 = fVar6 * fVar10; do { fVar8 = fVar6 + fVar4; fVar7 = fVar3 + fVar5; param_4 = param_4 + fVar11 / fVar9; fVar3 = cosf(param_4); fVar3 = fVar3 * param_3 + param_1; fVar4 = sinf(param_4); fVar4 = fVar4 * param_3 + param_2; fVar5 = sinf(param_4); fVar5 = (float)((uint)fVar5 ^ _DAT_00123280) * fVar10; fVar6 = cosf(param_4); fVar6 = fVar6 * fVar10; plutovg_path_cubic_to(fVar7,fVar8,fVar3 - fVar5,fVar4 - fVar6,param_6); iVar2 = iVar2 + -1; } while (iVar2 != 0); } } return; }
28,865
js_promise_finally
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_finally(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue onFinally = argv[0]; JSValue ctor, ret; JSValue then_funcs[2]; JSValue func_data[2]; int i; ctor = JS_SpeciesConstructor(ctx, this_val, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; if (!JS_IsFunction(ctx, onFinally)) { then_funcs[0] = js_dup(onFinally); then_funcs[1] = js_dup(onFinally); } else { func_data[0] = ctor; func_data[1] = onFinally; for(i = 0; i < 2; i++) { then_funcs[i] = JS_NewCFunctionData(ctx, js_promise_then_finally_func, 1, i, 2, func_data); if (JS_IsException(then_funcs[i])) { if (i == 1) JS_FreeValue(ctx, then_funcs[0]); JS_FreeValue(ctx, ctor); return JS_EXCEPTION; } } } JS_FreeValue(ctx, ctor); ret = JS_Invoke(ctx, this_val, JS_ATOM_then, 2, then_funcs); JS_FreeValue(ctx, then_funcs[0]); JS_FreeValue(ctx, then_funcs[1]); return ret; }
O0
c
js_promise_finally: subq $0x118, %rsp # imm = 0x118 movq %rsi, 0xf8(%rsp) movq %rdx, 0x100(%rsp) movq %rdi, 0xf0(%rsp) movl %ecx, 0xec(%rsp) movq %r8, 0xe0(%rsp) movq 0xe0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xd0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xd8(%rsp) movq 0xf0(%rsp), %rdi movl $0x0, 0x48(%rsp) movq $0x3, 0x50(%rsp) movq 0xf8(%rsp), %rsi movq 0x100(%rsp), %rdx movq 0x48(%rsp), %rcx movq 0x50(%rsp), %r8 callq 0x74810 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc0(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x930e8 movq 0xc0(%rsp), %rax movq %rax, 0x108(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x110(%rsp) jmp 0x93391 movq 0xf0(%rsp), %rdi movq 0xd0(%rsp), %rsi movq 0xd8(%rsp), %rdx callq 0x2e510 cmpl $0x0, %eax jne 0x93181 movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x216d0 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x216d0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x30(%rsp), %rax movq %rax, 0xa8(%rsp) jmp 0x932c6 movq 0xc0(%rsp), %rax movq %rax, 0x70(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x78(%rsp) movq 0xd0(%rsp), %rax movq %rax, 0x80(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x88(%rsp) movl $0x0, 0x6c(%rsp) cmpl $0x2, 0x6c(%rsp) jge 0x932c4 movslq 0x6c(%rsp), %rcx leaq 0x90(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movq %rax, (%rsp) movq 0xf0(%rsp), %rdi movl 0x6c(%rsp), %ecx leaq 0x70(%rsp), %r9 leaq 0x1b2(%rip), %rsi # 0x933b0 movl $0x1, %edx movl $0x2, %r8d callq 0x2a7b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rcx movq %rcx, (%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x8(%rax) movslq 0x6c(%rsp), %rcx leaq 0x90(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x932b2 cmpl $0x1, 0x6c(%rsp) jne 0x93279 movq 0xf0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x23c90 movq 0xf0(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x23c90 movl $0x0, 0x108(%rsp) movq $0x6, 0x110(%rsp) jmp 0x93391 jmp 0x932b4 movl 0x6c(%rsp), %eax addl $0x1, %eax movl %eax, 0x6c(%rsp) jmp 0x931c3 jmp 0x932c6 movq 0xf0(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x23c90 movq 0xf0(%rsp), %rdi leaq 0x90(%rsp), %r9 movq 0xf8(%rsp), %rsi movq 0x100(%rsp), %rdx movl $0x80, %ecx movl $0x2, %r8d callq 0x485c0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x10(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xf0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x23c90 movq 0xf0(%rsp), %rdi movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx callq 0x23c90 movq 0xb0(%rsp), %rax movq %rax, 0x108(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x108(%rsp), %rax movq 0x110(%rsp), %rdx addq $0x118, %rsp # imm = 0x118 retq nopl (%rax)
js_promise_finally: sub rsp, 118h mov [rsp+118h+var_20], rsi mov [rsp+118h+var_18], rdx mov [rsp+118h+var_28], rdi mov [rsp+118h+var_2C], ecx mov [rsp+118h+var_38], r8 mov rax, [rsp+118h+var_38] mov rcx, [rax] mov [rsp+118h+var_48], rcx mov rax, [rax+8] mov [rsp+118h+var_40], rax mov rdi, [rsp+118h+var_28] mov dword ptr [rsp+118h+var_D0], 0 mov [rsp+118h+var_C8], 3 mov rsi, [rsp+118h+var_20] mov rdx, [rsp+118h+var_18] mov rcx, [rsp+118h+var_D0] mov r8, [rsp+118h+var_C8] call JS_SpeciesConstructor mov [rsp+118h+var_C0], rax mov [rsp+118h+var_B8], rdx mov rax, [rsp+118h+var_C0] mov [rsp+118h+var_58], rax mov rax, [rsp+118h+var_B8] mov [rsp+118h+var_50], rax mov rdi, [rsp+118h+var_58] mov rsi, [rsp+118h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_930E8 mov rax, [rsp+118h+var_58] mov [rsp+118h+var_10], rax mov rax, [rsp+118h+var_50] mov [rsp+118h+var_8], rax jmp loc_93391 loc_930E8: mov rdi, [rsp+118h+var_28] mov rsi, [rsp+118h+var_48] mov rdx, [rsp+118h+var_40] call JS_IsFunction cmp eax, 0 jnz short loc_93181 mov rdi, [rsp+118h+var_48] mov rsi, [rsp+118h+var_40] call js_dup mov [rsp+118h+var_E0], rax mov [rsp+118h+var_D8], rdx mov rax, [rsp+118h+var_E0] mov [rsp+118h+var_88], rax mov rax, [rsp+118h+var_D8] mov [rsp+118h+var_80], rax mov rdi, [rsp+118h+var_48] mov rsi, [rsp+118h+var_40] call js_dup mov [rsp+118h+var_F0], rax mov [rsp+118h+var_E8], rdx mov rax, [rsp+118h+var_F0] mov [rsp+118h+var_78], rax mov rax, [rsp+118h+var_E8] mov [rsp+118h+var_70], rax jmp loc_932C6 loc_93181: mov rax, [rsp+118h+var_58] mov [rsp+118h+var_A8], rax mov rax, [rsp+118h+var_50] mov [rsp+118h+var_A0], rax mov rax, [rsp+118h+var_48] mov [rsp+118h+var_98], rax mov rax, [rsp+118h+var_40] mov [rsp+118h+var_90], rax mov [rsp+118h+var_AC], 0 loc_931C3: cmp [rsp+118h+var_AC], 2 jge loc_932C4 movsxd rcx, [rsp+118h+var_AC] lea rax, [rsp+118h+var_88] shl rcx, 4 add rax, rcx mov [rsp+118h+var_118], rax mov rdi, [rsp+118h+var_28] mov ecx, [rsp+118h+var_AC] lea r9, [rsp+118h+var_A8] lea rsi, js_promise_then_finally_func mov edx, 1 mov r8d, 2 call JS_NewCFunctionData mov rcx, rax mov rax, [rsp+118h+var_118] mov [rsp+118h+var_100], rcx mov [rsp+118h+var_F8], rdx mov rcx, [rsp+118h+var_100] mov [rax], rcx mov rcx, [rsp+118h+var_F8] mov [rax+8], rcx movsxd rcx, [rsp+118h+var_AC] lea rax, [rsp+118h+var_88] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call JS_IsException_1 cmp eax, 0 jz short loc_932B2 cmp [rsp+118h+var_AC], 1 jnz short loc_93279 mov rdi, [rsp+118h+var_28] mov rsi, [rsp+118h+var_88] mov rdx, [rsp+118h+var_80] call JS_FreeValue loc_93279: mov rdi, [rsp+118h+var_28] mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] call JS_FreeValue mov dword ptr [rsp+118h+var_10], 0 mov [rsp+118h+var_8], 6 jmp loc_93391 loc_932B2: jmp short $+2 loc_932B4: mov eax, [rsp+118h+var_AC] add eax, 1 mov [rsp+118h+var_AC], eax jmp loc_931C3 loc_932C4: jmp short $+2 loc_932C6: mov rdi, [rsp+118h+var_28] mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] call JS_FreeValue mov rdi, [rsp+118h+var_28] lea r9, [rsp+118h+var_88] mov rsi, [rsp+118h+var_20] mov rdx, [rsp+118h+var_18] mov ecx, 80h mov r8d, 2 call JS_Invoke mov [rsp+118h+var_110], rax mov [rsp+118h+var_108], rdx mov rax, [rsp+118h+var_110] mov [rsp+118h+var_68], rax mov rax, [rsp+118h+var_108] mov [rsp+118h+var_60], rax mov rdi, [rsp+118h+var_28] mov rsi, [rsp+118h+var_88] mov rdx, [rsp+118h+var_80] call JS_FreeValue mov rdi, [rsp+118h+var_28] mov rsi, [rsp+118h+var_78] mov rdx, [rsp+118h+var_70] call JS_FreeValue mov rax, [rsp+118h+var_68] mov [rsp+118h+var_10], rax mov rax, [rsp+118h+var_60] mov [rsp+118h+var_8], rax loc_93391: mov rax, [rsp+118h+var_10] mov rdx, [rsp+118h+var_8] add rsp, 118h retn
_DWORD * js_promise_finally( long long a1, long long a2, long long a3, int a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rdx long long v15; // rdx long long v16; // rdx long long v17; // rdx long long *v19; // [rsp+0h] [rbp-118h] _DWORD *v20; // [rsp+48h] [rbp-D0h] int i; // [rsp+6Ch] [rbp-ACh] _QWORD v22[4]; // [rsp+70h] [rbp-A8h] BYREF _DWORD *v23; // [rsp+90h] [rbp-88h] BYREF long long v24; // [rsp+98h] [rbp-80h] _DWORD *v25; // [rsp+A0h] [rbp-78h] long long v26; // [rsp+A8h] [rbp-70h] long long v27; // [rsp+B0h] [rbp-68h] long long v28; // [rsp+B8h] [rbp-60h] _DWORD *v29; // [rsp+C0h] [rbp-58h] long long v30; // [rsp+C8h] [rbp-50h] _DWORD *v31; // [rsp+D0h] [rbp-48h] long long v32; // [rsp+D8h] [rbp-40h] long long v33; // [rsp+E0h] [rbp-38h] int v34; // [rsp+ECh] [rbp-2Ch] long long v35; // [rsp+F0h] [rbp-28h] long long v36; // [rsp+F8h] [rbp-20h] long long v37; // [rsp+100h] [rbp-18h] _DWORD *v38; // [rsp+108h] [rbp-10h] long long v39; // [rsp+110h] [rbp-8h] v36 = a2; v37 = a3; v35 = a1; v34 = a4; v33 = a5; v31 = *(_DWORD **)a5; v32 = *(_QWORD *)(a5 + 8); LODWORD(v20) = 0; v29 = JS_SpeciesConstructor(a1, a2, a3, v20, 3u, a6, a7, a8, a9, a10, a11, a12, a13); v30 = v13; if ( JS_IsException_1((long long)v29, v13) ) { v38 = v29; v39 = v30; } else { if ( (unsigned int)JS_IsFunction(v35, (long long)v31, v32) ) { v22[0] = v29; v22[1] = v30; v22[2] = v31; v22[3] = v32; for ( i = 0; i < 2; ++i ) { v19 = (long long *)&(&v23)[2 * i]; *v19 = JS_NewCFunctionData(v35, (long long)js_promise_then_finally_func, 1u, i, 2, (long long)v22); v19[1] = v16; if ( JS_IsException_1(*v19, v19[1]) ) { if ( i == 1 ) JS_FreeValue(v35, (long long)v23, v24); JS_FreeValue(v35, (long long)v29, v30); LODWORD(v38) = 0; v39 = 6LL; return v38; } } } else { v23 = js_dup(v31, v32); v24 = v14; v25 = js_dup(v31, v32); v26 = v15; } JS_FreeValue(v35, (long long)v29, v30); v27 = JS_Invoke(v35, v36, v37, 128, 2, (long long)&v23); v28 = v17; JS_FreeValue(v35, (long long)v23, v24); JS_FreeValue(v35, (long long)v25, v26); v38 = (_DWORD *)v27; v39 = v28; } return v38; }
js_promise_finally: SUB RSP,0x118 MOV qword ptr [RSP + 0xf8],RSI MOV qword ptr [RSP + 0x100],RDX MOV qword ptr [RSP + 0xf0],RDI MOV dword ptr [RSP + 0xec],ECX MOV qword ptr [RSP + 0xe0],R8 MOV RAX,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xd0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0xf0] MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x3 MOV RSI,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] MOV RCX,qword ptr [RSP + 0x48] MOV R8,qword ptr [RSP + 0x50] CALL 0x00174810 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xc8] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001930e8 MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x110],RAX JMP 0x00193391 LAB_001930e8: MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] CALL 0x0012e510 CMP EAX,0x0 JNZ 0x00193181 MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x001216d0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x001216d0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0xa8],RAX JMP 0x001932c6 LAB_00193181: MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x88],RAX MOV dword ptr [RSP + 0x6c],0x0 LAB_001931c3: CMP dword ptr [RSP + 0x6c],0x2 JGE 0x001932c4 MOVSXD RCX,dword ptr [RSP + 0x6c] LEA RAX,[RSP + 0x90] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0xf0] MOV ECX,dword ptr [RSP + 0x6c] LEA R9,[RSP + 0x70] LEA RSI,[0x1933b0] MOV EDX,0x1 MOV R8D,0x2 CALL 0x0012a7b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x20],RDX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x8],RCX MOVSXD RCX,dword ptr [RSP + 0x6c] LEA RAX,[RSP + 0x90] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001932b2 CMP dword ptr [RSP + 0x6c],0x1 JNZ 0x00193279 MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x00123c90 LAB_00193279: MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x00123c90 MOV dword ptr [RSP + 0x108],0x0 MOV qword ptr [RSP + 0x110],0x6 JMP 0x00193391 LAB_001932b2: JMP 0x001932b4 LAB_001932b4: MOV EAX,dword ptr [RSP + 0x6c] ADD EAX,0x1 MOV dword ptr [RSP + 0x6c],EAX JMP 0x001931c3 LAB_001932c4: JMP 0x001932c6 LAB_001932c6: MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0xf0] LEA R9,[RSP + 0x90] MOV RSI,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] MOV ECX,0x80 MOV R8D,0x2 CALL 0x001485c0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x110],RAX LAB_00193391: MOV RAX,qword ptr [RSP + 0x108] MOV RDX,qword ptr [RSP + 0x110] ADD RSP,0x118 RET
int1 [16] js_promise_finally(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int iVar1; int1 auVar2 [16]; uint uStack_cc; int local_ac; int1 local_a8 [16]; int8 local_98; int8 local_90; int1 local_88 [16]; int1 local_78 [16]; int1 local_68 [16]; int1 local_58 [16]; int8 local_48; int8 local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_48 = *param_5; local_40 = param_5[1]; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_58 = JS_SpeciesConstructor(param_1,param_2,param_3,(ulong)uStack_cc << 0x20,3); iVar1 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar1 == 0) { iVar1 = JS_IsFunction(local_28,local_48,local_40); if (iVar1 == 0) { local_88 = js_dup(local_48,local_40); local_78 = js_dup(local_48,local_40); } else { local_98 = local_48; local_90 = local_40; local_ac = 0; local_a8 = local_58; while( true ) { if (1 < local_ac) break; auVar2 = JS_NewCFunctionData(local_28,js_promise_then_finally_func,1,local_ac,2,local_a8); *(long *)(local_88 + (long)local_ac * 0x10) = auVar2._0_8_; *(long *)(local_88 + (long)local_ac * 0x10 + 8) = auVar2._8_8_; iVar1 = JS_IsException(*(int8 *)(local_88 + (long)local_ac * 0x10), *(int8 *)(local_88 + (long)local_ac * 0x10 + 8)); if (iVar1 != 0) { if (local_ac == 1) { JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_); } JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_); local_10 = 0; local_8 = 6; goto LAB_00193391; } local_ac = local_ac + 1; } } JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_); local_68 = JS_Invoke(local_28,local_20,local_18,0x80,2,local_88); JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_); JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); local_10 = local_68._0_4_; uStack_c = local_68._4_4_; local_8 = local_68._8_8_; } else { local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } LAB_00193391: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
28,866
js_promise_finally
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_finally(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue onFinally = argv[0]; JSValue ctor, ret; JSValue then_funcs[2]; JSValue func_data[2]; int i; ctor = JS_SpeciesConstructor(ctx, this_val, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; if (!JS_IsFunction(ctx, onFinally)) { then_funcs[0] = js_dup(onFinally); then_funcs[1] = js_dup(onFinally); } else { func_data[0] = ctor; func_data[1] = onFinally; for(i = 0; i < 2; i++) { then_funcs[i] = JS_NewCFunctionData(ctx, js_promise_then_finally_func, 1, i, 2, func_data); if (JS_IsException(then_funcs[i])) { if (i == 1) JS_FreeValue(ctx, then_funcs[0]); JS_FreeValue(ctx, ctor); return JS_EXCEPTION; } } } JS_FreeValue(ctx, ctor); ret = JS_Invoke(ctx, this_val, JS_ATOM_then, 2, then_funcs); JS_FreeValue(ctx, then_funcs[0]); JS_FreeValue(ctx, then_funcs[1]); return ret; }
O1
c
js_promise_finally: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r13 movq %rdi, %r15 movq (%r8), %r12 movq 0x8(%r8), %rbp movl $0x3, %r8d movq %rsi, 0x38(%rsp) xorl %ecx, %ecx callq 0x440b7 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x535be movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx jmp 0x53713 movq %r15, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x22dbe testl %eax, %eax movq %r14, 0x8(%rsp) movq %r13, 0x30(%rsp) je 0x53639 leaq 0x40(%rsp), %r13 movq %r14, (%r13) movq %rbx, 0x8(%r13) movq %r12, 0x10(%r13) movq %rbp, 0x18(%r13) leaq 0x18(%rsp), %r14 xorl %r12d, %r12d leaq 0x12d(%rip), %rbp # 0x5372b movq %r15, %rdi movq %rbp, %rsi movl $0x1, %edx movl %r12d, %ecx movl $0x2, %r8d movq %r13, %r9 callq 0x210ea movq %rax, -0x8(%r14) movq %rdx, (%r14) cmpl $0x6, %edx je 0x536df incq %r12 addq $0x10, %r14 cmpq $0x1, %r12 je 0x535fe jmp 0x5366f movq %r12, 0x10(%rsp) cmpl $-0x9, %ebp jb 0x5364a movq 0x10(%rsp), %rax incl (%rax) movq %r12, 0x10(%rsp) movq %rbp, 0x18(%rsp) movq %r12, 0x40(%rsp) cmpl $-0x9, %ebp jb 0x53665 movq 0x40(%rsp), %rax incl (%rax) movq %r12, 0x20(%rsp) movq %rbp, 0x28(%rsp) movq 0x18(%r15), %rdi movq 0x8(%rsp), %rsi movq %rbx, %rdx callq 0x1d8c6 leaq 0x10(%rsp), %r12 movq %r15, %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx movl $0x80, %ecx movl $0x2, %r8d movq %r12, %r9 callq 0x2fc94 movq %rax, %r14 movq %rdx, %rbx movq (%r12), %rsi movq 0x8(%r12), %rdx movq 0x18(%r15), %rdi callq 0x1d8c6 movq 0x10(%r12), %rsi movq 0x18(%r12), %rdx movq 0x18(%r15), %rdi callq 0x1d8c6 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx jmp 0x53713 cmpq $0x1, %r12 jne 0x536f8 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x18(%r15), %rdi callq 0x1d8c6 movq 0x18(%r15), %rdi movq 0x8(%rsp), %rsi movq %rbx, %rdx callq 0x1d8c6 movl $0x6, %ebx xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_finally: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r13, rdx mov r15, rdi mov r12, [r8] mov rbp, [r8+8] mov r8d, 3 mov [rsp+98h+var_60], rsi xor ecx, ecx call JS_SpeciesConstructor mov r14, rax mov rbx, rdx cmp ebx, 6 jnz short loc_535BE mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax jmp loc_53713 loc_535BE: mov rdi, r15 mov rsi, r12 mov rdx, rbp call JS_IsFunction test eax, eax mov [rsp+98h+var_90], r14 mov [rsp+98h+var_68], r13 jz short loc_53639 lea r13, [rsp+98h+var_58] mov [r13+0], r14 mov [r13+8], rbx mov [r13+10h], r12 mov [r13+18h], rbp lea r14, [rsp+98h+var_80] xor r12d, r12d lea rbp, js_promise_then_finally_func loc_535FE: mov rdi, r15 mov rsi, rbp mov edx, 1 mov ecx, r12d mov r8d, 2 mov r9, r13 call JS_NewCFunctionData mov [r14-8], rax mov [r14], rdx cmp edx, 6 jz loc_536DF inc r12 add r14, 10h cmp r12, 1 jz short loc_535FE jmp short loc_5366F loc_53639: mov [rsp+98h+var_88], r12 cmp ebp, 0FFFFFFF7h jb short loc_5364A mov rax, [rsp+98h+var_88] inc dword ptr [rax] loc_5364A: mov [rsp+98h+var_88], r12 mov [rsp+98h+var_80], rbp mov [rsp+98h+var_58], r12 cmp ebp, 0FFFFFFF7h jb short loc_53665 mov rax, [rsp+98h+var_58] inc dword ptr [rax] loc_53665: mov [rsp+98h+var_78], r12 mov [rsp+98h+var_70], rbp loc_5366F: mov rdi, [r15+18h] mov rsi, [rsp+98h+var_90] mov rdx, rbx call JS_FreeValueRT lea r12, [rsp+98h+var_88] mov rdi, r15 mov rsi, [rsp+98h+var_60] mov rdx, [rsp+98h+var_68] mov ecx, 80h mov r8d, 2 mov r9, r12 call JS_Invoke mov r14, rax mov rbx, rdx mov rsi, [r12] mov rdx, [r12+8] mov rdi, [r15+18h] call JS_FreeValueRT mov rsi, [r12+10h] mov rdx, [r12+18h] mov rdi, [r15+18h] call JS_FreeValueRT mov rcx, 0FFFFFFFF00000000h and rcx, r14 jmp short loc_53713 loc_536DF: cmp r12, 1 jnz short loc_536F8 mov rsi, [rsp+98h+var_88] mov rdx, [rsp+98h+var_80] mov rdi, [r15+18h] call JS_FreeValueRT loc_536F8: mov rdi, [r15+18h] mov rsi, [rsp+98h+var_90] mov rdx, rbx call JS_FreeValueRT mov ebx, 6 xor r14d, r14d xor ecx, ecx loc_53713: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_promise_finally( long long *a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { _DWORD *v15; // r12 long long v16; // rbp unsigned long long v17; // r14 long long v18; // rdx long long v19; // rbx unsigned long long v20; // rcx long long *v21; // r14 long long v22; // r12 long long v23; // rdx _DWORD *v25; // [rsp+8h] [rbp-90h] _DWORD *v26; // [rsp+10h] [rbp-88h] BYREF long long v27; // [rsp+18h] [rbp-80h] BYREF _DWORD *v28; // [rsp+20h] [rbp-78h] long long v29; // [rsp+28h] [rbp-70h] long long v30; // [rsp+30h] [rbp-68h] long long v31; // [rsp+38h] [rbp-60h] _QWORD v32[11]; // [rsp+40h] [rbp-58h] BYREF v15 = *(_DWORD **)a13; v16 = *(_QWORD *)(a13 + 8); v31 = a2; v17 = (unsigned long long)JS_SpeciesConstructor((long long)a1, a2, a3, 0LL, 3LL, a14, a4, a5, a6, a7, a8, a9, a10, a11); v19 = v18; if ( (_DWORD)v18 == 6 ) { v20 = v17 & 0xFFFFFFFF00000000LL; } else { v25 = (_DWORD *)v17; v30 = a3; if ( (unsigned int)JS_IsFunction((long long)a1, (long long)v15, v16) ) { v32[0] = v17; v32[1] = v19; v32[2] = v15; v32[3] = v16; v21 = &v27; v22 = 0LL; while ( 1 ) { *(v21 - 1) = JS_NewCFunctionData(a1, (long long)js_promise_then_finally_func, 1u, v22, 2, (long long)v32); *v21 = v23; if ( (_DWORD)v23 == 6 ) break; ++v22; v21 += 2; if ( v22 != 1 ) goto LABEL_13; } if ( v22 == 1 ) JS_FreeValueRT(a1[3], v26, v27); JS_FreeValueRT(a1[3], v25, v19); LODWORD(v17) = 0; v20 = 0LL; } else { v26 = v15; if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*v26; v26 = v15; v27 = v16; v32[0] = v15; if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v32[0]; v28 = v15; v29 = v16; LABEL_13: JS_FreeValueRT(a1[3], v25, v19); v17 = (unsigned long long)JS_Invoke((long long)a1, v31, v30, 0x80u, 2, (long long)&v26); JS_FreeValueRT(a1[3], v26, v27); JS_FreeValueRT(a1[3], v28, v29); v20 = v17 & 0xFFFFFFFF00000000LL; } } return v20 | (unsigned int)v17; }
js_promise_finally: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R13,RDX MOV R15,RDI MOV R12,qword ptr [R8] MOV RBP,qword ptr [R8 + 0x8] MOV R8D,0x3 MOV qword ptr [RSP + 0x38],RSI XOR ECX,ECX CALL 0x001440b7 MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JNZ 0x001535be MOV RAX,-0x100000000 MOV RCX,R14 AND RCX,RAX JMP 0x00153713 LAB_001535be: MOV RDI,R15 MOV RSI,R12 MOV RDX,RBP CALL 0x00122dbe TEST EAX,EAX MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP + 0x30],R13 JZ 0x00153639 LEA R13,[RSP + 0x40] MOV qword ptr [R13],R14 MOV qword ptr [R13 + 0x8],RBX MOV qword ptr [R13 + 0x10],R12 MOV qword ptr [R13 + 0x18],RBP LEA R14,[RSP + 0x18] XOR R12D,R12D LEA RBP,[0x15372b] LAB_001535fe: MOV RDI,R15 MOV RSI,RBP MOV EDX,0x1 MOV ECX,R12D MOV R8D,0x2 MOV R9,R13 CALL 0x001210ea MOV qword ptr [R14 + -0x8],RAX MOV qword ptr [R14],RDX CMP EDX,0x6 JZ 0x001536df INC R12 ADD R14,0x10 CMP R12,0x1 JZ 0x001535fe JMP 0x0015366f LAB_00153639: MOV qword ptr [RSP + 0x10],R12 CMP EBP,-0x9 JC 0x0015364a MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0015364a: MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x18],RBP MOV qword ptr [RSP + 0x40],R12 CMP EBP,-0x9 JC 0x00153665 MOV RAX,qword ptr [RSP + 0x40] INC dword ptr [RAX] LAB_00153665: MOV qword ptr [RSP + 0x20],R12 MOV qword ptr [RSP + 0x28],RBP LAB_0015366f: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RBX CALL 0x0011d8c6 LEA R12,[RSP + 0x10] MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] MOV ECX,0x80 MOV R8D,0x2 MOV R9,R12 CALL 0x0012fc94 MOV R14,RAX MOV RBX,RDX MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,qword ptr [R15 + 0x18] CALL 0x0011d8c6 MOV RSI,qword ptr [R12 + 0x10] MOV RDX,qword ptr [R12 + 0x18] MOV RDI,qword ptr [R15 + 0x18] CALL 0x0011d8c6 MOV RCX,-0x100000000 AND RCX,R14 JMP 0x00153713 LAB_001536df: CMP R12,0x1 JNZ 0x001536f8 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [R15 + 0x18] CALL 0x0011d8c6 LAB_001536f8: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RBX CALL 0x0011d8c6 MOV EBX,0x6 XOR R14D,R14D XOR ECX,ECX LAB_00153713: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_promise_finally(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int *piVar1; int8 uVar2; int iVar3; ulong uVar4; ulong uVar5; int **ppiVar6; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; int *local_88 [5]; int8 local_60; int1 local_58 [16]; int *local_48; int8 local_40; piVar1 = (int *)*param_5; uVar2 = param_5[1]; local_60 = param_2; auVar7 = JS_SpeciesConstructor(); uVar4 = auVar7._0_8_; if (auVar7._8_4_ == 6) { uVar4 = uVar4 & 0xffffffff00000000; } else { iVar3 = JS_IsFunction(param_1,piVar1,uVar2); auVar8._8_8_ = local_58._8_8_; auVar8._0_8_ = piVar1; local_58._0_8_ = piVar1; local_88[4] = (int *)param_3; if (iVar3 == 0) { local_88[0] = piVar1; local_88[1] = (int *)uVar2; local_88[2] = piVar1; local_88[3] = (int *)uVar2; if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; *piVar1 = *piVar1 + 1; local_58 = auVar8; } } else { ppiVar6 = local_88 + 1; uVar5 = 0; local_48 = piVar1; local_40 = uVar2; local_58 = auVar7; do { auVar8 = JS_NewCFunctionData(param_1,js_promise_then_finally_func,1,uVar5 & 0xffffffff,2, local_58); ppiVar6[-1] = auVar8._0_8_; *ppiVar6 = auVar8._8_8_; if (auVar8._8_4_ == 6) { if (uVar5 == 1) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_88[0],local_88[1]); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,auVar7._8_8_); auVar7 = ZEXT816(6) << 0x40; uVar4 = 0; goto LAB_00153713; } uVar5 = uVar5 + 1; ppiVar6 = ppiVar6 + 2; } while (uVar5 == 1); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,auVar7._8_8_); auVar7 = JS_Invoke(param_1,local_60,local_88[4],0x80,2,local_88); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_88[0],local_88[1]); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_88[2],local_88[3]); uVar4 = auVar7._0_8_ & 0xffffffff00000000; } LAB_00153713: auVar9._0_8_ = auVar7._0_8_ & 0xffffffff | uVar4; auVar9._8_8_ = auVar7._8_8_; return auVar9; }
28,867
js_promise_finally
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_finally(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue onFinally = argv[0]; JSValue ctor, ret; JSValue then_funcs[2]; JSValue func_data[2]; int i; ctor = JS_SpeciesConstructor(ctx, this_val, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; if (!JS_IsFunction(ctx, onFinally)) { then_funcs[0] = js_dup(onFinally); then_funcs[1] = js_dup(onFinally); } else { func_data[0] = ctor; func_data[1] = onFinally; for(i = 0; i < 2; i++) { then_funcs[i] = JS_NewCFunctionData(ctx, js_promise_then_finally_func, 1, i, 2, func_data); if (JS_IsException(then_funcs[i])) { if (i == 1) JS_FreeValue(ctx, then_funcs[0]); JS_FreeValue(ctx, ctor); return JS_EXCEPTION; } } } JS_FreeValue(ctx, ctor); ret = JS_Invoke(ctx, this_val, JS_ATOM_then, 2, then_funcs); JS_FreeValue(ctx, then_funcs[0]); JS_FreeValue(ctx, then_funcs[1]); return ret; }
O2
c
js_promise_finally: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r13 movq %rdi, %r15 movq (%r8), %r12 movq 0x8(%r8), %rbp pushq $0x3 popq %r8 movq %rsi, 0x38(%rsp) xorl %ecx, %ecx callq 0x3bad8 movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d jne 0x478a1 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbx, %rcx andq %rax, %rcx jmp 0x479e9 movq %r15, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x1ce7d testl %eax, %eax movq %r14, 0x8(%rsp) movq %rbx, (%rsp) movq %r13, 0x30(%rsp) je 0x47920 leaq 0x40(%rsp), %r13 movq %rbx, (%r13) movq %r14, 0x8(%r13) movq %r12, 0x10(%r13) movq %rbp, 0x18(%r13) leaq 0x18(%rsp), %rbp xorl %r12d, %r12d pushq $0x1 popq %r14 pushq $0x2 popq %rbx cmpq $0x2, %r12 je 0x47980 movq %r15, %rdi leaq 0x107(%rip), %rsi # 0x47a00 movl %r14d, %edx movl %r12d, %ecx movl %ebx, %r8d movq %r13, %r9 callq 0x1b3ba movq %rax, -0x8(%rbp) movq %rdx, (%rbp) cmpl $0x6, %edx je 0x47939 incq %r12 addq $0x10, %rbp jmp 0x478e5 cmpl $-0xa, %ebp jbe 0x4796c incl (%r12) movq %r12, 0x10(%rsp) movq %rbp, 0x18(%rsp) incl (%r12) jmp 0x47976 cmpq $0x1, %r12 jne 0x47951 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r15, %rdi callq 0x1801e movq %r15, %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x1801e pushq $0x6 popq %r14 xorl %ebx, %ebx xorl %ecx, %ecx jmp 0x479e9 movq %r12, 0x10(%rsp) movq %rbp, 0x18(%rsp) movq %r12, 0x20(%rsp) movq %rbp, 0x28(%rsp) movq %r15, %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x1801e pushq $0x2 popq %r8 leaq 0x10(%rsp), %rbx movq %r15, %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx movl $0x80, %ecx movq %rbx, %r9 callq 0x2840b movq %rax, %r12 movq %rdx, %r14 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r15, %rdi callq 0x1801e movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq %r12, %rbx movq %r15, %rdi callq 0x1801e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_finally: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r13, rdx mov r15, rdi mov r12, [r8] mov rbp, [r8+8] push 3 pop r8 mov [rsp+98h+var_60], rsi xor ecx, ecx call JS_SpeciesConstructor mov rbx, rax mov r14, rdx cmp r14d, 6 jnz short loc_478A1 mov rax, 0FFFFFFFF00000000h mov rcx, rbx and rcx, rax jmp loc_479E9 loc_478A1: mov rdi, r15 mov rsi, r12 mov rdx, rbp call JS_IsFunction test eax, eax mov [rsp+98h+var_90], r14 mov [rsp+98h+var_98], rbx mov [rsp+98h+var_68], r13 jz short loc_47920 lea r13, [rsp+98h+var_58] mov [r13+0], rbx mov [r13+8], r14 mov [r13+10h], r12 mov [r13+18h], rbp lea rbp, [rsp+98h+var_80] xor r12d, r12d push 1 pop r14 push 2 pop rbx loc_478E5: cmp r12, 2 jz loc_47980 mov rdi, r15 lea rsi, js_promise_then_finally_func mov edx, r14d mov ecx, r12d mov r8d, ebx mov r9, r13 call JS_NewCFunctionData mov [rbp-8], rax mov [rbp+0], rdx cmp edx, 6 jz short loc_47939 inc r12 add rbp, 10h jmp short loc_478E5 loc_47920: cmp ebp, 0FFFFFFF6h jbe short loc_4796C inc dword ptr [r12] mov [rsp+98h+var_88], r12 mov [rsp+98h+var_80], rbp inc dword ptr [r12] jmp short loc_47976 loc_47939: cmp r12, 1 jnz short loc_47951 mov rsi, [rsp+98h+var_88] mov rdx, [rsp+98h+var_80] mov rdi, r15 call JS_FreeValue loc_47951: mov rdi, r15 mov rsi, [rsp+98h+var_98] mov rdx, [rsp+98h+var_90] call JS_FreeValue push 6 pop r14 xor ebx, ebx xor ecx, ecx jmp short loc_479E9 loc_4796C: mov [rsp+98h+var_88], r12 mov [rsp+98h+var_80], rbp loc_47976: mov [rsp+98h+var_78], r12 mov [rsp+98h+var_70], rbp loc_47980: mov rdi, r15 mov rsi, [rsp+98h+var_98] mov rdx, [rsp+98h+var_90] call JS_FreeValue push 2 pop r8 lea rbx, [rsp+98h+var_88] mov rdi, r15 mov rsi, [rsp+98h+var_60] mov rdx, [rsp+98h+var_68] mov ecx, 80h mov r9, rbx call JS_Invoke mov r12, rax mov r14, rdx mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r15 call JS_FreeValue mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rbx, r12 mov rdi, r15 call JS_FreeValue mov rcx, 0FFFFFFFF00000000h and rcx, r12 loc_479E9: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_promise_finally( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { _DWORD *v15; // r12 long long v16; // rbp long long v17; // rbx long long v18; // rdx long long v19; // r14 unsigned long long v20; // rcx long long *v21; // rbp long long i; // r12 long long v23; // rdx long long v24; // r12 _DWORD *v26; // [rsp+10h] [rbp-88h] BYREF long long v27; // [rsp+18h] [rbp-80h] BYREF _DWORD *v28; // [rsp+20h] [rbp-78h] long long v29; // [rsp+28h] [rbp-70h] long long v30; // [rsp+30h] [rbp-68h] long long v31; // [rsp+38h] [rbp-60h] _QWORD v32[11]; // [rsp+40h] [rbp-58h] BYREF v15 = *(_DWORD **)a13; v16 = *(_QWORD *)(a13 + 8); v31 = a2; v17 = (long long)JS_SpeciesConstructor(a1, a2, a3, 0LL, 3LL, a14, a4, a5, a6, a7, a8, a9, a10, a11); v19 = v18; if ( (_DWORD)v18 == 6 ) { v20 = v17 & 0xFFFFFFFF00000000LL; } else { v30 = a3; if ( (unsigned int)JS_IsFunction(a1, (long long)v15, v16) ) { v32[0] = v17; v32[1] = v19; v32[2] = v15; v32[3] = v16; v21 = &v27; for ( i = 0LL; i != 2; ++i ) { *(v21 - 1) = JS_NewCFunctionData(a1, (long long)js_promise_then_finally_func, 1u, i, 2u, (long long)v32); *v21 = v23; if ( (_DWORD)v23 == 6 ) { if ( i == 1 ) JS_FreeValue(a1, (long long)v26, v27); JS_FreeValue(a1, v17, v19); LODWORD(v17) = 0; v20 = 0LL; return v20 | (unsigned int)v17; } v21 += 2; } } else { if ( (unsigned int)v16 <= 0xFFFFFFF6 ) { v26 = v15; v27 = v16; } else { ++*v15; v26 = v15; v27 = v16; ++*v15; } v28 = v15; v29 = v16; } JS_FreeValue(a1, v17, v19); v24 = JS_Invoke(a1, v31, v30, 128, 2, (long long)&v26); JS_FreeValue(a1, (long long)v26, v27); LODWORD(v17) = v24; JS_FreeValue(a1, (long long)v28, v29); v20 = v24 & 0xFFFFFFFF00000000LL; } return v20 | (unsigned int)v17; }
js_promise_finally: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R13,RDX MOV R15,RDI MOV R12,qword ptr [R8] MOV RBP,qword ptr [R8 + 0x8] PUSH 0x3 POP R8 MOV qword ptr [RSP + 0x38],RSI XOR ECX,ECX CALL 0x0013bad8 MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x001478a1 MOV RAX,-0x100000000 MOV RCX,RBX AND RCX,RAX JMP 0x001479e9 LAB_001478a1: MOV RDI,R15 MOV RSI,R12 MOV RDX,RBP CALL 0x0011ce7d TEST EAX,EAX MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP],RBX MOV qword ptr [RSP + 0x30],R13 JZ 0x00147920 LEA R13,[RSP + 0x40] MOV qword ptr [R13],RBX MOV qword ptr [R13 + 0x8],R14 MOV qword ptr [R13 + 0x10],R12 MOV qword ptr [R13 + 0x18],RBP LEA RBP,[RSP + 0x18] XOR R12D,R12D PUSH 0x1 POP R14 PUSH 0x2 POP RBX LAB_001478e5: CMP R12,0x2 JZ 0x00147980 MOV RDI,R15 LEA RSI,[0x147a00] MOV EDX,R14D MOV ECX,R12D MOV R8D,EBX MOV R9,R13 CALL 0x0011b3ba MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP],RDX CMP EDX,0x6 JZ 0x00147939 INC R12 ADD RBP,0x10 JMP 0x001478e5 LAB_00147920: CMP EBP,-0xa JBE 0x0014796c INC dword ptr [R12] MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x18],RBP INC dword ptr [R12] JMP 0x00147976 LAB_00147939: CMP R12,0x1 JNZ 0x00147951 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,R15 CALL 0x0011801e LAB_00147951: MOV RDI,R15 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0011801e PUSH 0x6 POP R14 XOR EBX,EBX XOR ECX,ECX JMP 0x001479e9 LAB_0014796c: MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x18],RBP LAB_00147976: MOV qword ptr [RSP + 0x20],R12 MOV qword ptr [RSP + 0x28],RBP LAB_00147980: MOV RDI,R15 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0011801e PUSH 0x2 POP R8 LEA RBX,[RSP + 0x10] MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] MOV ECX,0x80 MOV R9,RBX CALL 0x0012840b MOV R12,RAX MOV R14,RDX MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R15 CALL 0x0011801e MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RBX,R12 MOV RDI,R15 CALL 0x0011801e MOV RCX,-0x100000000 AND RCX,R12 LAB_001479e9: MOV EAX,EBX OR RAX,RCX MOV RDX,R14 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_promise_finally(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int *piVar1; int8 uVar2; int iVar3; ulong uVar4; int **ppiVar5; ulong uVar6; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; int *local_88 [5]; int8 local_60; int1 local_58 [16]; int *local_48; int8 local_40; piVar1 = (int *)*param_5; uVar2 = param_5[1]; local_60 = param_2; auVar7 = JS_SpeciesConstructor(); uVar4 = auVar7._0_8_; if (auVar7._8_4_ == 6) { uVar4 = uVar4 & 0xffffffff00000000; } else { iVar3 = JS_IsFunction(param_1,piVar1,uVar2); auVar8._8_8_ = local_58._8_8_; auVar8._0_8_ = local_58._0_8_; local_88[4] = (int *)param_3; if (iVar3 == 0) { local_88[0] = piVar1; local_88[1] = (int *)uVar2; local_88[2] = piVar1; local_88[3] = (int *)uVar2; if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; *piVar1 = *piVar1 + 1; local_58 = auVar8; } } else { ppiVar5 = local_88 + 1; local_48 = piVar1; local_40 = uVar2; local_58 = auVar7; for (uVar6 = 0; uVar6 != 2; uVar6 = uVar6 + 1) { auVar8 = JS_NewCFunctionData(param_1,js_promise_then_finally_func,1,uVar6 & 0xffffffff,2, local_58); ppiVar5[-1] = auVar8._0_8_; *ppiVar5 = auVar8._8_8_; if (auVar8._8_4_ == 6) { if (uVar6 == 1) { JS_FreeValue(param_1,local_88[0],local_88[1]); } JS_FreeValue(param_1,uVar4,auVar7._8_8_); auVar7 = ZEXT816(6) << 0x40; uVar4 = 0; goto LAB_001479e9; } ppiVar5 = ppiVar5 + 2; } } JS_FreeValue(param_1,uVar4,auVar7._8_8_); auVar7 = JS_Invoke(param_1,local_60,local_88[4],0x80,2,local_88); JS_FreeValue(param_1,local_88[0],local_88[1]); JS_FreeValue(param_1,local_88[2],local_88[3]); uVar4 = auVar7._0_8_ & 0xffffffff00000000; } LAB_001479e9: auVar9._0_8_ = auVar7._0_8_ & 0xffffffff | uVar4; auVar9._8_8_ = auVar7._8_8_; return auVar9; }
28,868
mi_calc_bin_pack_key_length
eloqsql/storage/myisam/mi_search.c
int _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, uchar *org_key, uchar *prev_key, uchar *key, MI_KEY_PARAM *s_temp) { uint length,key_length,ref_length; s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag; #ifdef HAVE_valgrind s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */ #endif s_temp->key=key; s_temp->prev_key=org_key; if (prev_key) /* If not first key in block */ { /* pack key against previous key */ /* As keys may be identical when running a sort in myisamchk, we have to guard against the case where keys may be identical */ uchar *end; end=key+key_length; for ( ; *key == *prev_key && key < end; key++,prev_key++) ; s_temp->ref_length= ref_length=(uint) (key-s_temp->key); length=key_length - ref_length + get_pack_length(ref_length); } else { /* No previous key */ s_temp->ref_length=ref_length=0; length=key_length+1; } if ((s_temp->next_key_pos=next_key)) /* If another key after */ { /* pack key against next key */ uint next_length,next_length_pack; get_key_pack_length(next_length,next_length_pack,next_key); /* If first key and next key is packed (only on delete) */ if (!prev_key && org_key && next_length) { uchar *end; for (key= s_temp->key, end=key+next_length ; *key == *org_key && key < end; key++,org_key++) ; ref_length= (uint) (key - s_temp->key); } if (next_length > ref_length) { /* We put a key with different case between two keys with the same prefix Extend next key to have same prefix as this key */ s_temp->n_ref_length= ref_length; s_temp->prev_length= next_length-ref_length; s_temp->prev_key+= ref_length; return (int) (length+ s_temp->prev_length - next_length_pack + get_pack_length(ref_length)); } /* Check how many characters are identical to next key */ key= s_temp->key+next_length; s_temp->prev_length= 0; while (*key++ == *next_key++) ; if ((ref_length= (uint) (key - s_temp->key)-1) == next_length) { s_temp->next_key_pos=0; return length; /* can't pack next key */ } s_temp->n_ref_length=ref_length; return (int) (length-(ref_length - next_length) - next_length_pack + get_pack_length(ref_length)); } return (int) length; }
O3
c
mi_calc_bin_pack_key_length: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r14 movl %esi, %r13d movq %r9, %rsi callq 0x39548 addl %r13d, %eax movq 0x10(%rbp), %r13 movl %eax, 0x10(%r13) movq %rbx, 0x20(%r13) movq %r12, 0x28(%r13) testq %r15, %r15 je 0x3a2a7 movb (%rbx), %cl cmpb (%r15), %cl sete %cl testl %eax, %eax setne %sil andb %cl, %sil movq %rbx, %rdx cmpb $0x1, %sil jne 0x3a28d movl %eax, %ecx addq %rbx, %rcx leaq 0x1(%r15), %rsi leaq 0x1(%rbx), %rdi movb (%rdi), %r8b leaq 0x1(%rdi), %rdx cmpb (%rsi), %r8b jne 0x3a28a incq %rsi cmpq %rcx, %rdi movq %rdx, %rdi jb 0x3a273 decq %rdx subl %ebx, %edx movl %edx, (%r13) subl %edx, %eax xorl %ecx, %ecx cmpl $0xff, %edx setae %cl leal (%rax,%rcx,2), %eax incl %eax jmp 0x3a2b3 movl $0x0, (%r13) incl %eax xorl %edx, %edx movq %r14, 0x30(%r13) testq %r14, %r14 je 0x3a3b5 movzbl (%r14), %esi cmpl $0xff, %esi je 0x3a2d8 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0x1, %edi jmp 0x3a2ee movzwl 0x1(%r14), %ecx rolw $0x8, %cx movzwl %cx, %esi movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD movl $0x3, %edi testq %r12, %r12 je 0x3a333 testq %r15, %r15 jne 0x3a333 testl %esi, %esi je 0x3a333 movb (%rbx), %r8b movq %rbx, %rdx cmpb (%r12), %r8b jne 0x3a331 movl %esi, %r8d addq %rbx, %r8 leaq 0x1(%r12), %r9 leaq 0x1(%rbx), %r10 movb (%r10), %r11b leaq 0x1(%r10), %rdx cmpb (%r9), %r11b jne 0x3a32e incq %r9 cmpq %r8, %r10 movq %rdx, %r10 jb 0x3a317 decq %rdx subl %ebx, %edx movl %esi, %r8d subl %edx, %r8d jbe 0x3a364 movl %edx, 0x8(%r13) movl %r8d, 0x18(%r13) movl %edx, %esi addq %rsi, %r12 movq %r12, 0x28(%r13) xorl %esi, %esi cmpl $0xff, %edx setae %sil addl %eax, %ecx addl %r8d, %ecx leal (%rcx,%rsi,2), %eax incl %eax jmp 0x3a3b5 addq %rdi, %r14 movl %esi, %esi addq %rsi, %rbx movl $0x0, 0x18(%r13) xorl %edx, %edx movq %rdx, %rdi movb (%rbx,%rdx), %r8b incq %rdx cmpb (%r14,%rdi), %r8b je 0x3a376 cmpl $0x1, %edx jne 0x3a395 movq $0x0, 0x30(%r13) jmp 0x3a3b5 addq %rdx, %rsi decq %rsi movl %esi, 0x8(%r13) xorl %edi, %edi cmpl $0xff, %esi setae %dil addl %ecx, %eax leal (%rax,%rdi,2), %eax subl %edx, %eax addl $0x2, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_calc_bin_pack_key_length: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r15, r8 mov r12, rcx mov r14, rdx mov r13d, esi mov rsi, r9 call _mi_keylength add eax, r13d mov r13, [rbp+arg_0] mov [r13+10h], eax mov [r13+20h], rbx mov [r13+28h], r12 test r15, r15 jz short loc_3A2A7 mov cl, [rbx] cmp cl, [r15] setz cl test eax, eax setnz sil and sil, cl mov rdx, rbx cmp sil, 1 jnz short loc_3A28D mov ecx, eax add rcx, rbx lea rsi, [r15+1] lea rdi, [rbx+1] loc_3A273: mov r8b, [rdi] lea rdx, [rdi+1] cmp r8b, [rsi] jnz short loc_3A28A inc rsi cmp rdi, rcx mov rdi, rdx jb short loc_3A273 loc_3A28A: dec rdx loc_3A28D: sub edx, ebx mov [r13+0], edx sub eax, edx xor ecx, ecx cmp edx, 0FFh setnb cl lea eax, [rax+rcx*2] inc eax jmp short loc_3A2B3 loc_3A2A7: mov dword ptr [r13+0], 0 inc eax xor edx, edx loc_3A2B3: mov [r13+30h], r14 test r14, r14 jz loc_3A3B5 movzx esi, byte ptr [r14] cmp esi, 0FFh jz short loc_3A2D8 mov ecx, 0FFFFFFFFh mov edi, 1 jmp short loc_3A2EE loc_3A2D8: movzx ecx, word ptr [r14+1] rol cx, 8 movzx esi, cx mov ecx, 0FFFFFFFDh mov edi, 3 loc_3A2EE: test r12, r12 jz short loc_3A333 test r15, r15 jnz short loc_3A333 test esi, esi jz short loc_3A333 mov r8b, [rbx] mov rdx, rbx cmp r8b, [r12] jnz short loc_3A331 mov r8d, esi add r8, rbx lea r9, [r12+1] lea r10, [rbx+1] loc_3A317: mov r11b, [r10] lea rdx, [r10+1] cmp r11b, [r9] jnz short loc_3A32E inc r9 cmp r10, r8 mov r10, rdx jb short loc_3A317 loc_3A32E: dec rdx loc_3A331: sub edx, ebx loc_3A333: mov r8d, esi sub r8d, edx jbe short loc_3A364 mov [r13+8], edx mov [r13+18h], r8d mov esi, edx add r12, rsi mov [r13+28h], r12 xor esi, esi cmp edx, 0FFh setnb sil add ecx, eax add ecx, r8d lea eax, [rcx+rsi*2] inc eax jmp short loc_3A3B5 loc_3A364: add r14, rdi mov esi, esi add rbx, rsi mov dword ptr [r13+18h], 0 xor edx, edx loc_3A376: mov rdi, rdx mov r8b, [rbx+rdx] inc rdx cmp r8b, [r14+rdi] jz short loc_3A376 cmp edx, 1 jnz short loc_3A395 mov qword ptr [r13+30h], 0 jmp short loc_3A3B5 loc_3A395: add rsi, rdx dec rsi mov [r13+8], esi xor edi, edi cmp esi, 0FFh setnb dil add eax, ecx lea eax, [rax+rdi*2] sub eax, edx add eax, 2 loc_3A3B5: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_calc_bin_pack_key_length( long long a1, int a2, unsigned __int8 *a3, _BYTE *a4, _BYTE *a5, unsigned __int8 *a6, long long a7) { int v11; // eax int v12; // edx _BYTE *v13; // rsi unsigned __int8 *v14; // rdi int v15; // edx bool v16; // cf unsigned int v17; // edx long long result; // rax unsigned int v19; // esi int v20; // ecx long long v21; // rdi int v22; // edx _BYTE *v23; // r9 unsigned __int8 *v24; // r10 int v25; // edx int v26; // r8d unsigned __int8 *v27; // r14 unsigned __int8 *v28; // rbx long long v29; // rdx long long v30; // rdi unsigned __int8 v31; // r8 unsigned int v32; // esi v11 = a2 + mi_keylength(a1, a6); *(_DWORD *)(a7 + 16) = v11; *(_QWORD *)(a7 + 32) = a6; *(_QWORD *)(a7 + 40) = a4; if ( a5 ) { v12 = (int)a6; if ( *a6 == *a5 && v11 != 0 ) { v13 = a5 + 1; v14 = a6 + 1; do { v15 = (_DWORD)v14 + 1; if ( *v14 != *v13 ) break; ++v13; v16 = v14++ < &a6[v11]; } while ( v16 ); v12 = v15 - 1; } v17 = v12 - (_DWORD)a6; *(_DWORD *)a7 = v17; result = v11 - v17 + 2 * (v17 >= 0xFF) + 1; } else { *(_DWORD *)a7 = 0; result = (unsigned int)(v11 + 1); v17 = 0; } *(_QWORD *)(a7 + 48) = a3; if ( a3 ) { v19 = *a3; if ( v19 == 255 ) { v19 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8); v20 = -3; v21 = 3LL; } else { v20 = -1; v21 = 1LL; } if ( a4 && !a5 && v19 ) { v22 = (int)a6; if ( *a6 == *a4 ) { v23 = a4 + 1; v24 = a6 + 1; do { v25 = (_DWORD)v24 + 1; if ( *v24 != *v23 ) break; ++v23; v16 = v24++ < &a6[v19]; } while ( v16 ); v22 = v25 - 1; } v17 = v22 - (_DWORD)a6; } v26 = v19 - v17; if ( v19 <= v17 ) { v27 = &a3[v21]; v28 = &a6[v19]; *(_DWORD *)(a7 + 24) = 0; v29 = 0LL; do { v30 = v29; v31 = v28[v29++]; } while ( v31 == v27[v30] ); if ( (_DWORD)v29 == 1 ) { *(_QWORD *)(a7 + 48) = 0LL; } else { v32 = v29 + v19 - 1; *(_DWORD *)(a7 + 8) = v32; return v20 + (_DWORD)result + 2 * (v32 >= 0xFF) - (unsigned int)v29 + 2; } } else { *(_DWORD *)(a7 + 8) = v17; *(_DWORD *)(a7 + 24) = v26; *(_QWORD *)(a7 + 40) = &a4[v17]; return v26 + (_DWORD)result + v20 + 2 * (unsigned int)(v17 >= 0xFF) + 1; } } return result; }
_mi_calc_bin_pack_key_length: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R15,R8 MOV R12,RCX MOV R14,RDX MOV R13D,ESI MOV RSI,R9 CALL 0x00139548 ADD EAX,R13D MOV R13,qword ptr [RBP + 0x10] MOV dword ptr [R13 + 0x10],EAX MOV qword ptr [R13 + 0x20],RBX MOV qword ptr [R13 + 0x28],R12 TEST R15,R15 JZ 0x0013a2a7 MOV CL,byte ptr [RBX] CMP CL,byte ptr [R15] SETZ CL TEST EAX,EAX SETNZ SIL AND SIL,CL MOV RDX,RBX CMP SIL,0x1 JNZ 0x0013a28d MOV ECX,EAX ADD RCX,RBX LEA RSI,[R15 + 0x1] LEA RDI,[RBX + 0x1] LAB_0013a273: MOV R8B,byte ptr [RDI] LEA RDX,[RDI + 0x1] CMP R8B,byte ptr [RSI] JNZ 0x0013a28a INC RSI CMP RDI,RCX MOV RDI,RDX JC 0x0013a273 LAB_0013a28a: DEC RDX LAB_0013a28d: SUB EDX,EBX MOV dword ptr [R13],EDX SUB EAX,EDX XOR ECX,ECX CMP EDX,0xff SETNC CL LEA EAX,[RAX + RCX*0x2] INC EAX JMP 0x0013a2b3 LAB_0013a2a7: MOV dword ptr [R13],0x0 INC EAX XOR EDX,EDX LAB_0013a2b3: MOV qword ptr [R13 + 0x30],R14 TEST R14,R14 JZ 0x0013a3b5 MOVZX ESI,byte ptr [R14] CMP ESI,0xff JZ 0x0013a2d8 MOV ECX,0xffffffff MOV EDI,0x1 JMP 0x0013a2ee LAB_0013a2d8: MOVZX ECX,word ptr [R14 + 0x1] ROL CX,0x8 MOVZX ESI,CX MOV ECX,0xfffffffd MOV EDI,0x3 LAB_0013a2ee: TEST R12,R12 JZ 0x0013a333 TEST R15,R15 JNZ 0x0013a333 TEST ESI,ESI JZ 0x0013a333 MOV R8B,byte ptr [RBX] MOV RDX,RBX CMP R8B,byte ptr [R12] JNZ 0x0013a331 MOV R8D,ESI ADD R8,RBX LEA R9,[R12 + 0x1] LEA R10,[RBX + 0x1] LAB_0013a317: MOV R11B,byte ptr [R10] LEA RDX,[R10 + 0x1] CMP R11B,byte ptr [R9] JNZ 0x0013a32e INC R9 CMP R10,R8 MOV R10,RDX JC 0x0013a317 LAB_0013a32e: DEC RDX LAB_0013a331: SUB EDX,EBX LAB_0013a333: MOV R8D,ESI SUB R8D,EDX JBE 0x0013a364 MOV dword ptr [R13 + 0x8],EDX MOV dword ptr [R13 + 0x18],R8D MOV ESI,EDX ADD R12,RSI MOV qword ptr [R13 + 0x28],R12 XOR ESI,ESI CMP EDX,0xff SETNC SIL ADD ECX,EAX ADD ECX,R8D LEA EAX,[RCX + RSI*0x2] INC EAX JMP 0x0013a3b5 LAB_0013a364: ADD R14,RDI MOV ESI,ESI ADD RBX,RSI MOV dword ptr [R13 + 0x18],0x0 XOR EDX,EDX LAB_0013a376: MOV RDI,RDX MOV R8B,byte ptr [RBX + RDX*0x1] INC RDX CMP R8B,byte ptr [R14 + RDI*0x1] JZ 0x0013a376 CMP EDX,0x1 JNZ 0x0013a395 MOV qword ptr [R13 + 0x30],0x0 JMP 0x0013a3b5 LAB_0013a395: ADD RSI,RDX DEC RSI MOV dword ptr [R13 + 0x8],ESI XOR EDI,EDI CMP ESI,0xff SETNC DIL ADD EAX,ECX LEA EAX,[RAX + RDI*0x2] SUB EAX,EDX ADD EAX,0x2 LAB_0013a3b5: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _mi_calc_bin_pack_key_length (int8 param_1,int param_2,byte *param_3,char *param_4,char *param_5, char *param_6,uint *param_7) { char *pcVar1; long lVar2; long lVar3; int iVar4; uint uVar5; int iVar6; int iVar7; uint uVar8; int iVar9; long lVar10; long lVar11; char *pcVar12; char *pcVar13; long lVar14; uint uVar15; bool bVar16; iVar4 = _mi_keylength(param_1,param_6); uVar5 = iVar4 + param_2; param_7[4] = uVar5; *(char **)(param_7 + 8) = param_6; *(char **)(param_7 + 10) = param_4; iVar4 = (int)param_6; if (param_5 == (char *)0x0) { *param_7 = 0; uVar8 = 0; } else { iVar7 = iVar4; if (uVar5 != 0 && *param_6 == *param_5) { pcVar12 = param_5 + 1; pcVar13 = param_6 + 1; do { pcVar1 = pcVar13 + 1; if (*pcVar13 != *pcVar12) break; pcVar12 = pcVar12 + 1; bVar16 = pcVar13 < param_6 + uVar5; pcVar13 = pcVar1; } while (bVar16); iVar7 = (int)pcVar1 + -1; } uVar8 = iVar7 - iVar4; *param_7 = uVar8; uVar5 = (uVar5 - uVar8) + (uint)(0xfe < uVar8) * 2; } iVar7 = uVar5 + 1; *(byte **)(param_7 + 0xc) = param_3; if (param_3 != (byte *)0x0) { uVar5 = (uint)*param_3; if (*param_3 == 0xff) { uVar5 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8); iVar6 = -3; lVar14 = 3; } else { iVar6 = -1; lVar14 = 1; } if (((param_4 != (char *)0x0) && (param_5 == (char *)0x0)) && (uVar5 != 0)) { iVar9 = iVar4; if (*param_6 == *param_4) { pcVar12 = param_4 + 1; pcVar13 = param_6 + 1; do { pcVar1 = pcVar13 + 1; if (*pcVar13 != *pcVar12) break; pcVar12 = pcVar12 + 1; bVar16 = pcVar13 < param_6 + uVar5; pcVar13 = pcVar1; } while (bVar16); iVar9 = (int)pcVar1 + -1; } uVar8 = iVar9 - iVar4; } uVar15 = uVar5 - uVar8; if (uVar5 < uVar8 || uVar15 == 0) { param_7[6] = 0; lVar10 = 0; do { lVar3 = lVar10 + (ulong)uVar5; lVar11 = lVar10 + 1; lVar2 = lVar10 + lVar14; lVar10 = lVar11; } while (param_6[lVar3] == param_3[lVar2]); iVar4 = (int)lVar11; if (iVar4 == 1) { param_7[0xc] = 0; param_7[0xd] = 0; } else { uVar5 = (uVar5 + iVar4) - 1; param_7[2] = uVar5; iVar7 = ((iVar7 + iVar6 + (uint)(0xfe < uVar5) * 2) - iVar4) + 2; } } else { param_7[2] = uVar8; param_7[6] = uVar15; *(char **)(param_7 + 10) = param_4 + uVar8; iVar7 = iVar6 + iVar7 + uVar15 + (uint)(0xfe < uVar8) * 2 + 1; } } return iVar7; }
28,869
my_mb_wc_cp932
eloqsql/strings/ctype-cp932.c
static int my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00-7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= cp932_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]])) return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O3
c
my_mb_wc_cp932: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xacc13 movzbl (%rdx), %edi testb %dil, %dil js 0xacbf9 movq %rdi, (%rsi) jmp 0xacc0e leal 0x5f(%rdi), %eax cmpb $0x3e, %al ja 0xacc15 leaq 0x4dc29(%rip), %rax # 0xfa830 movzwl (%rax,%rdi,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xacc13 movzbl 0x1(%rdx), %eax movl %edi, %ecx shll $0x9, %ecx leal (%rcx,%rax,2), %eax leaq 0x4dbfa(%rip), %rcx # 0xfa830 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xacc13 cmpb $-0x80, %dil setne %al cmpb $-0x60, %dil setb %cl andb %al, %cl addb $0x20, %dil cmpb $0x1d, %dil setb %sil orb %cl, %sil xorl %eax, %eax cmpb $0x1, %sil jne 0xacc13 movb 0x1(%rdx), %cl leal -0x40(%rcx), %edx movl $0xfffffffe, %eax # imm = 0xFFFFFFFE cmpb $0x3f, %dl jb 0xacc13 movl $0x0, %eax testb %cl, %cl jns 0xacc13 xorl %eax, %eax cmpb $-0x3, %cl setae %al leal -0x2(,%rax,2), %eax jmp 0xacc13
my_mb_wc_cp932: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_ACC13 movzx edi, byte ptr [rdx] test dil, dil js short loc_ACBF9 mov [rsi], rdi jmp short loc_ACC0E loc_ACBF9: lea eax, [rdi+5Fh] cmp al, 3Eh ; '>' ja short loc_ACC15 lea rax, cp932_to_unicode movzx eax, word ptr [rax+rdi*2] mov [rsi], rax loc_ACC0E: mov eax, 1 loc_ACC13: pop rbp retn loc_ACC15: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_ACC13 movzx eax, byte ptr [rdx+1] mov ecx, edi shl ecx, 9 lea eax, [rcx+rax*2] lea rcx, cp932_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_ACC13 cmp dil, 80h setnz al cmp dil, 0A0h setb cl and cl, al add dil, 20h ; ' ' cmp dil, 1Dh setb sil or sil, cl xor eax, eax cmp sil, 1 jnz short loc_ACC13 mov cl, [rdx+1] lea edx, [rcx-40h] mov eax, 0FFFFFFFEh cmp dl, 3Fh ; '?' jb short loc_ACC13 mov eax, 0 test cl, cl jns short loc_ACC13 xor eax, eax cmp cl, 0FDh setnb al lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2] jmp loc_ACC13
long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx char v7; // cl result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x3Eu ) { *a2 = cp932_to_unicode[v5]; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = cp932_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) { result = 0LL; if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du ) { v7 = a3[1]; result = 4294967294LL; if ( (unsigned __int8)(v7 - 64) >= 0x3Fu ) { result = 0LL; if ( v7 < 0 ) return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2; } } } } } return result; }
my_mb_wc_cp932: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001acc13 MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001acbf9 MOV qword ptr [RSI],RDI JMP 0x001acc0e LAB_001acbf9: LEA EAX,[RDI + 0x5f] CMP AL,0x3e JA 0x001acc15 LEA RAX,[0x1fa830] MOVZX EAX,word ptr [RAX + RDI*0x2] MOV qword ptr [RSI],RAX LAB_001acc0e: MOV EAX,0x1 LAB_001acc13: POP RBP RET LAB_001acc15: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001acc13 MOVZX EAX,byte ptr [RDX + 0x1] MOV ECX,EDI SHL ECX,0x9 LEA EAX,[RCX + RAX*0x2] LEA RCX,[0x1fa830] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001acc13 CMP DIL,0x80 SETNZ AL CMP DIL,0xa0 SETC CL AND CL,AL ADD DIL,0x20 CMP DIL,0x1d SETC SIL OR SIL,CL XOR EAX,EAX CMP SIL,0x1 JNZ 0x001acc13 MOV CL,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x40] MOV EAX,0xfffffffe CMP DL,0x3f JC 0x001acc13 MOV EAX,0x0 TEST CL,CL JNS 0x001acc13 XOR EAX,EAX CMP CL,0xfd SETNC AL LEA EAX,[-0x2 + RAX*0x2] JMP 0x001acc13
int my_mb_wc_cp932(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if (0x3e < (byte)(bVar1 + 0x5f)) { if (param_4 < param_3 + 2) { return -0x66; } uVar2 = *(ushort *)(cp932_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 2; } if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) { return 0; } bVar1 = param_3[1]; if ((byte)(bVar1 - 0x40) < 0x3f) { return -2; } if (-1 < (char)bVar1) { return 0; } return (uint)(0xfc < bVar1) * 2 + -2; } *param_2 = (ulong)*(ushort *)(cp932_to_unicode + (ulong)bVar1 * 2); } else { *param_2 = (ulong)bVar1; } iVar3 = 1; } return iVar3; }
28,870
set_prealloc_root
eloqsql/mysys/my_alloc.c
void set_prealloc_root(MEM_ROOT *root, char *ptr) { USED_MEM *next; for (next=root->used; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } for (next=root->free ; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } }
O3
c
set_prealloc_root: pushq %rbp movq %rsp, %rbp movq 0x8(%rdi), %rax testq %rax, %rax je 0x2ccaa cmpq %rsi, %rax ja 0x2cca5 movq 0x10(%rax), %rcx addq %rax, %rcx cmpq %rsi, %rcx ja 0x2ccc8 movq (%rax), %rax jmp 0x2cc8f movq (%rdi), %rax testq %rax, %rax je 0x2cccc cmpq %rsi, %rax ja 0x2ccc3 movq 0x10(%rax), %rcx addq %rax, %rcx cmpq %rsi, %rcx ja 0x2ccc8 movq (%rax), %rax jmp 0x2ccad movq %rax, 0x10(%rdi) popq %rbp retq
set_prealloc_root: push rbp mov rbp, rsp mov rax, [rdi+8] loc_2CC8F: test rax, rax jz short loc_2CCAA cmp rax, rsi ja short loc_2CCA5 mov rcx, [rax+10h] add rcx, rax cmp rcx, rsi ja short loc_2CCC8 loc_2CCA5: mov rax, [rax] jmp short loc_2CC8F loc_2CCAA: mov rax, [rdi] loc_2CCAD: test rax, rax jz short loc_2CCCC cmp rax, rsi ja short loc_2CCC3 mov rcx, [rax+10h] add rcx, rax cmp rcx, rsi ja short loc_2CCC8 loc_2CCC3: mov rax, [rax] jmp short loc_2CCAD loc_2CCC8: mov [rdi+10h], rax loc_2CCCC: pop rbp retn
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2) { _QWORD *result; // rax for ( result = (_QWORD *)a1[1]; result; result = (_QWORD *)*result ) { if ( (unsigned long long)result <= a2 && (unsigned long long)result + result[2] > a2 ) { LABEL_11: a1[2] = result; return result; } } for ( result = (_QWORD *)*a1; result; result = (_QWORD *)*result ) { if ( (unsigned long long)result <= a2 && (unsigned long long)result + result[2] > a2 ) goto LABEL_11; } return result; }
set_prealloc_root: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x8] LAB_0012cc8f: TEST RAX,RAX JZ 0x0012ccaa CMP RAX,RSI JA 0x0012cca5 MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RAX CMP RCX,RSI JA 0x0012ccc8 LAB_0012cca5: MOV RAX,qword ptr [RAX] JMP 0x0012cc8f LAB_0012ccaa: MOV RAX,qword ptr [RDI] LAB_0012ccad: TEST RAX,RAX JZ 0x0012cccc CMP RAX,RSI JA 0x0012ccc3 MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RAX CMP RCX,RSI JA 0x0012ccc8 LAB_0012ccc3: MOV RAX,qword ptr [RAX] JMP 0x0012ccad LAB_0012ccc8: MOV qword ptr [RDI + 0x10],RAX LAB_0012cccc: POP RBP RET
void set_prealloc_root(int8 *param_1,int8 *param_2) { int8 *puVar1; for (puVar1 = (int8 *)param_1[1]; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { if ((puVar1 <= param_2) && (param_2 < (int8 *)(puVar1[2] + (long)puVar1))) goto LAB_0012ccc8; } puVar1 = (int8 *)*param_1; while( true ) { if (puVar1 == (int8 *)0x0) { return; } if ((puVar1 <= param_2) && (param_2 < (int8 *)(puVar1[2] + (long)puVar1))) break; puVar1 = (int8 *)*puVar1; } LAB_0012ccc8: param_1[2] = puVar1; return; }
28,871
mbr_join_square
eloqsql/storage/myisam/rt_split.c
static double mbr_join_square(const double *a, const double *b, int n_dim) { const double *end = a + n_dim * 2; double square = 1.0; do { square *= ((a[1] < b[1]) ? b[1] : a[1]) - ((a[0] > b[0]) ? b[0] : a[0]); a += 2; b += 2; }while (a != end); /* Check if not finite (i.e. infinity or NaN) */ if (!isfinite(square)) square = DBL_MAX; return square; }
O0
c
mbr_join_square: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movl -0x14(%rbp), %ecx shll %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movsd 0x8aff2(%rip), %xmm0 # 0x162230 movsd %xmm0, -0x28(%rbp) movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm1 movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm0 ucomisd %xmm1, %xmm0 jbe 0xd726b movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm0 movsd %xmm0, -0x30(%rbp) jmp 0xd7279 movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm0 movsd %xmm0, -0x30(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) movq -0x8(%rbp), %rax movsd (%rax), %xmm0 movq -0x10(%rbp), %rax ucomisd (%rax), %xmm0 jbe 0xd72a4 movq -0x10(%rbp), %rax movsd (%rax), %xmm0 movsd %xmm0, -0x40(%rbp) jmp 0xd72b1 movq -0x8(%rbp), %rax movsd (%rax), %xmm0 movsd %xmm0, -0x40(%rbp) movsd -0x38(%rbp), %xmm0 movsd -0x40(%rbp), %xmm1 subsd %xmm1, %xmm0 mulsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x28(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax addq $0x10, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0xd7243 movsd -0x28(%rbp), %xmm0 movq %xmm0, %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF andq %rcx, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 subq %rcx, %rax setl %al testb $0x1, %al jne 0xd7327 movsd 0x8af26(%rip), %xmm0 # 0x162248 movsd %xmm0, -0x28(%rbp) movsd -0x28(%rbp), %xmm0 popq %rbp retq nop
mbr_join_square_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov ecx, [rbp+var_14] shl ecx, 1 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_20], rax movsd xmm0, cs:qword_162230 movsd [rbp+var_28], xmm0 loc_D7243: mov rax, [rbp+var_8] movsd xmm1, qword ptr [rax+8] mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+8] ucomisd xmm0, xmm1 jbe short loc_D726B mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+8] movsd [rbp+var_30], xmm0 jmp short loc_D7279 loc_D726B: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax+8] movsd [rbp+var_30], xmm0 loc_D7279: movsd xmm0, [rbp+var_30] movsd [rbp+var_38], xmm0 mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_10] ucomisd xmm0, qword ptr [rax] jbe short loc_D72A4 mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax] movsd [rbp+var_40], xmm0 jmp short loc_D72B1 loc_D72A4: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax] movsd [rbp+var_40], xmm0 loc_D72B1: movsd xmm0, [rbp+var_38] movsd xmm1, [rbp+var_40] subsd xmm0, xmm1 mulsd xmm0, [rbp+var_28] movsd [rbp+var_28], xmm0 mov rax, [rbp+var_8] add rax, 10h mov [rbp+var_8], rax mov rax, [rbp+var_10] add rax, 10h mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp rax, [rbp+var_20] jnz loc_D7243 movsd xmm0, [rbp+var_28] movq rax, xmm0 mov rcx, 7FFFFFFFFFFFFFFFh and rax, rcx mov rcx, 7FF0000000000000h sub rax, rcx setl al test al, 1 jnz short loc_D7327 movsd xmm0, cs:qword_162248 movsd [rbp+var_28], xmm0 loc_D7327: movsd xmm0, [rbp+var_28] pop rbp retn
double mbr_join_square_0(double *a1, double *a2, int a3) { double v4; // [rsp+0h] [rbp-40h] double v5; // [rsp+10h] [rbp-30h] double v6; // [rsp+18h] [rbp-28h] double *v8; // [rsp+38h] [rbp-8h] v8 = a1; v6 = 1.0; do { if ( a2[1] <= v8[1] ) v5 = v8[1]; else v5 = a2[1]; if ( *v8 <= *a2 ) v4 = *v8; else v4 = *a2; v6 = (v5 - v4) * v6; v8 += 2; a2 += 2; } while ( v8 != &a1[2 * a3] ); if ( (*(_QWORD *)&v6 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return 1.797693134862316e308; return v6; }
mbr_join_square: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x14] SHL ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVSD XMM0,qword ptr [0x00262230] MOVSD qword ptr [RBP + -0x28],XMM0 LAB_001d7243: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x8] UCOMISD XMM0,XMM1 JBE 0x001d726b MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x8] MOVSD qword ptr [RBP + -0x30],XMM0 JMP 0x001d7279 LAB_001d726b: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX + 0x8] MOVSD qword ptr [RBP + -0x30],XMM0 LAB_001d7279: MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD qword ptr [RBP + -0x38],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] UCOMISD XMM0,qword ptr [RAX] JBE 0x001d72a4 MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x40],XMM0 JMP 0x001d72b1 LAB_001d72a4: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x40],XMM0 LAB_001d72b1: MOVSD XMM0,qword ptr [RBP + -0x38] MOVSD XMM1,qword ptr [RBP + -0x40] SUBSD XMM0,XMM1 MULSD XMM0,qword ptr [RBP + -0x28] MOVSD qword ptr [RBP + -0x28],XMM0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x10 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001d7243 MOVSD XMM0,qword ptr [RBP + -0x28] MOVQ RAX,XMM0 MOV RCX,0x7fffffffffffffff AND RAX,RCX MOV RCX,0x7ff0000000000000 SUB RAX,RCX SETL AL TEST AL,0x1 JNZ 0x001d7327 MOVSD XMM0,qword ptr [0x00262248] MOVSD qword ptr [RBP + -0x28],XMM0 LAB_001d7327: MOVSD XMM0,qword ptr [RBP + -0x28] POP RBP RET
double mbr_join_square(double *param_1,double *param_2,int param_3) { double local_48; double local_38; double local_30; double *local_18; double *local_10; local_30 = DAT_00262230; local_18 = param_2; local_10 = param_1; do { if (local_18[1] <= local_10[1]) { local_38 = local_10[1]; } else { local_38 = local_18[1]; } if (*local_10 < *local_18 || *local_10 == *local_18) { local_48 = *local_10; } else { local_48 = *local_18; } local_30 = (local_38 - local_48) * local_30; local_10 = local_10 + 2; local_18 = local_18 + 2; } while (local_10 != param_1 + (param_3 << 1)); if (0x7fefffffffffffff < (ulong)ABS(local_30)) { local_30 = DAT_00262248; } return local_30; }
28,872
convert_to_datetime
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void convert_to_datetime(MYSQL_TIME *t, unsigned char **row, uint len, enum enum_field_types type) { memset(t, 0, sizeof(MYSQL_TIME)); /* binary protocol for datetime: 4-bytes: DATE 7-bytes: DATE + TIME >7 bytes: DATE + TIME with second_part */ if (len) { unsigned char *to= *row; int has_date= 0; uint offset= 7; if (type == MYSQL_TYPE_TIME) { t->neg= to[0]; t->day= (ulong) sint4korr(to + 1); t->time_type= MYSQL_TIMESTAMP_TIME; offset= 8; to++; } else { t->year= (uint) sint2korr(to); t->month= (uint) to[2]; t->day= (uint) to[3]; t->time_type= MYSQL_TIMESTAMP_DATE; if (type == MYSQL_TYPE_DATE) return; has_date= 1; } if (len > 4) { t->hour= (uint) to[4]; if (type == MYSQL_TYPE_TIME) t->hour+= t->day * 24; t->minute= (uint) to[5]; t->second= (uint) to[6]; if (has_date) t->time_type= MYSQL_TIMESTAMP_DATETIME; } if (len > offset) { t->second_part= (ulong)sint4korr(to+7); } } }
O0
c
convert_to_datetime: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x28, %edx callq 0x13250 cmpl $0x0, -0x14(%rbp) je 0x325ba movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl $0x7, -0x28(%rbp) cmpl $0xb, -0x18(%rbp) jne 0x324b9 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x20(%rax) movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x4(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax cltq movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x2, 0x24(%rax) movl $0x8, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x32515 movq -0x20(%rbp), %rax movzbl (%rax), %eax cwtl movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movswl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movswl %ax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x20(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x24(%rax) cmpl $0xa, -0x18(%rbp) jne 0x3250e jmp 0x325ba movl $0x1, -0x24(%rbp) cmpl $0x4, -0x14(%rbp) jbe 0x32573 movq -0x20(%rbp), %rax movzbl 0x4(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) cmpl $0xb, -0x18(%rbp) jne 0x32542 movq -0x8(%rbp), %rax imull $0x18, 0x8(%rax), %ecx movq -0x8(%rbp), %rax addl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x20(%rbp), %rax movzbl 0x5(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movzbl 0x6(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) cmpl $0x0, -0x24(%rbp) je 0x32571 movq -0x8(%rbp), %rax movl $0x1, 0x24(%rax) jmp 0x32573 movl -0x14(%rbp), %eax cmpl -0x28(%rbp), %eax jbe 0x325b8 movq -0x20(%rbp), %rax movzbl 0x7(%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x8(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x9(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0xa(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) jmp 0x325ba addq $0x30, %rsp popq %rbp retq
convert_to_datetime: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov rdi, [rbp+var_8] xor esi, esi mov edx, 28h ; '(' call _memset cmp [rbp+var_14], 0 jz loc_325BA mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov [rbp+var_24], 0 mov [rbp+var_28], 7 cmp [rbp+var_18], 0Bh jnz short loc_324B9 mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_8] mov [rax+20h], cl mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+3] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+4] movsx ecx, cx shl ecx, 18h add eax, ecx cdqe mov ecx, eax mov rax, [rbp+var_8] mov [rax+8], ecx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 2 mov [rbp+var_28], 8 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_32515 loc_324B9: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cwde mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movsx ecx, cx shl ecx, 8 add eax, ecx movsx ecx, ax mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+2] mov rax, [rbp+var_8] mov [rax+4], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] mov [rax+8], ecx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 0 cmp [rbp+var_18], 0Ah jnz short loc_3250E jmp loc_325BA loc_3250E: mov [rbp+var_24], 1 loc_32515: cmp [rbp+var_14], 4 jbe short loc_32573 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+4] mov rax, [rbp+var_8] mov [rax+0Ch], ecx cmp [rbp+var_18], 0Bh jnz short loc_32542 mov rax, [rbp+var_8] imul ecx, [rax+8], 18h mov rax, [rbp+var_8] add ecx, [rax+0Ch] mov [rax+0Ch], ecx loc_32542: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+5] mov rax, [rbp+var_8] mov [rax+10h], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+6] mov rax, [rbp+var_8] mov [rax+14h], ecx cmp [rbp+var_24], 0 jz short loc_32571 mov rax, [rbp+var_8] mov dword ptr [rax+24h], 1 loc_32571: jmp short $+2 loc_32573: mov eax, [rbp+var_14] cmp eax, [rbp+var_28] jbe short loc_325B8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+7] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+8] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+9] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+0Ah] movsx ecx, cx shl ecx, 18h add eax, ecx movsxd rcx, eax mov rax, [rbp+var_8] mov [rax+18h], rcx loc_325B8: jmp short $+2 loc_325BA: add rsp, 30h pop rbp retn
long long convert_to_datetime(long long a1, unsigned __int8 **a2, unsigned int a3, int a4) { long long result; // rax unsigned int v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+Ch] [rbp-24h] unsigned __int8 *v7; // [rsp+10h] [rbp-20h] result = memset(a1, 0LL, 40LL); if ( a3 ) { v7 = *a2; v6 = 0; v5 = 7; if ( a4 == 11 ) { *(_BYTE *)(a1 + 32) = *v7; *(_DWORD *)(a1 + 8) = (v7[4] << 24) + (v7[3] << 16) + (v7[2] << 8) + v7[1]; *(_DWORD *)(a1 + 36) = 2; v5 = 8; ++v7; } else { *(_DWORD *)a1 = (__int16)((v7[1] << 8) + *v7); *(_DWORD *)(a1 + 4) = v7[2]; *(_DWORD *)(a1 + 8) = v7[3]; result = a1; *(_DWORD *)(a1 + 36) = 0; if ( a4 == 10 ) return result; v6 = 1; } if ( a3 > 4 ) { *(_DWORD *)(a1 + 12) = v7[4]; if ( a4 == 11 ) *(_DWORD *)(a1 + 12) += 24 * *(_DWORD *)(a1 + 8); *(_DWORD *)(a1 + 16) = v7[5]; *(_DWORD *)(a1 + 20) = v7[6]; if ( v6 ) *(_DWORD *)(a1 + 36) = 1; } result = a3; if ( a3 > v5 ) { result = a1; *(_QWORD *)(a1 + 24) = (v7[10] << 24) + (v7[9] << 16) + (v7[8] << 8) + v7[7]; } } return result; }
convert_to_datetime: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x28 CALL 0x00113250 CMP dword ptr [RBP + -0x14],0x0 JZ 0x001325ba MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x28],0x7 CMP dword ptr [RBP + -0x18],0xb JNZ 0x001324b9 MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x20],CL MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x4] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX CDQE MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x2 MOV dword ptr [RBP + -0x28],0x8 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00132515 LAB_001324b9: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CWDE MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVSX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVSX ECX,AX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x0 CMP dword ptr [RBP + -0x18],0xa JNZ 0x0013250e JMP 0x001325ba LAB_0013250e: MOV dword ptr [RBP + -0x24],0x1 LAB_00132515: CMP dword ptr [RBP + -0x14],0x4 JBE 0x00132573 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX CMP dword ptr [RBP + -0x18],0xb JNZ 0x00132542 MOV RAX,qword ptr [RBP + -0x8] IMUL ECX,dword ptr [RAX + 0x8],0x18 MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX LAB_00132542: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x5] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x6] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x00132571 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x1 LAB_00132571: JMP 0x00132573 LAB_00132573: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x28] JBE 0x001325b8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x8] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x9] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0xa] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX LAB_001325b8: JMP 0x001325ba LAB_001325ba: ADD RSP,0x30 POP RBP RET
void convert_to_datetime(int *param_1,int8 *param_2,uint param_3,int param_4) { bool bVar1; uint local_30; byte *local_28; memset(param_1,0,0x28); if (param_3 != 0) { local_28 = (byte *)*param_2; bVar1 = false; local_30 = 7; if (param_4 == 0xb) { *(byte *)(param_1 + 8) = *local_28; param_1[2] = (uint)local_28[1] + (uint)local_28[2] * 0x100 + (uint)local_28[3] * 0x10000 + (short)(ushort)local_28[4] * 0x1000000; param_1[9] = 2; local_30 = 8; local_28 = local_28 + 1; } else { *param_1 = (int)(short)((ushort)*local_28 + (short)((int)(short)(ushort)local_28[1] << 8)); param_1[1] = (uint)local_28[2]; param_1[2] = (uint)local_28[3]; param_1[9] = 0; if (param_4 == 10) { return; } bVar1 = true; } if (4 < param_3) { param_1[3] = (uint)local_28[4]; if (param_4 == 0xb) { param_1[3] = param_1[2] * 0x18 + param_1[3]; } param_1[4] = (uint)local_28[5]; param_1[5] = (uint)local_28[6]; if (bVar1) { param_1[9] = 1; } } if (local_30 < param_3) { *(long *)(param_1 + 6) = (long)(int)((uint)local_28[7] + (uint)local_28[8] * 0x100 + (uint)local_28[9] * 0x10000 + (short)(ushort)local_28[10] * 0x1000000); } } return; }
28,873
maria_ft_simple_get_word
eloqsql/storage/maria/ma_ft_parser.c
uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, FT_WORD *word, my_bool skip_stopwords) { uchar *doc= *start; uint mwc, length; int ctype, mbl; DBUG_ENTER("maria_ft_simple_get_word"); do { for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { if (doc >= end) DBUG_RETURN(0); mbl= my_ci_ctype(cs, &ctype, doc, end); if (true_word_char(ctype, *doc)) break; } mwc= length= 0; for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, doc, end); if (true_word_char(ctype, *doc)) mwc= 0; else if (!misc_word_char(*doc) || mwc) break; else mwc++; } word->len= (uint)(doc-word->pos) - mwc; if (skip_stopwords == FALSE || (length >= ft_min_word_len && length < ft_max_word_len && !is_stopword((char *) word->pos, word->len))) { *start= doc; DBUG_RETURN(1); } } while (doc < end); DBUG_RETURN(0); }
O0
c
maria_ft_simple_get_word: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %r8b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movb %al, -0x29(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x4badb movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x4baf0 jmp 0x4bae7 movb $0x0, -0x1(%rbp) jmp 0x4bcb1 movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x38(%rax), %rax movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x44(%rbp), %rsi callq *%rax movl %eax, -0x48(%rbp) movl -0x44(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax jne 0x4bb2b movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x5f, %eax jne 0x4bb2d jmp 0x4bb73 jmp 0x4bb2f cmpl $0x0, -0x48(%rbp) jle 0x4bb3d movl -0x48(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x4bb5d cmpl $0x0, -0x48(%rbp) jge 0x4bb4d xorl %eax, %eax subl -0x48(%rbp), %eax movl %eax, -0x50(%rbp) jmp 0x4bb57 movl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x4bb57 movl -0x50(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %ecx movq -0x38(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0x4badb movl $0x0, -0x40(%rbp) movl $0x0, -0x3c(%rbp) movq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x4bc2f movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x38(%rax), %rax movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x44(%rbp), %rsi callq *%rax movl %eax, -0x48(%rbp) movl -0x44(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax jne 0x4bbd5 movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x5f, %eax jne 0x4bbde movl $0x0, -0x3c(%rbp) jmp 0x4bbe0 jmp 0x4bc2f jmp 0x4bbe2 movl -0x40(%rbp), %eax addl $0x1, %eax movl %eax, -0x40(%rbp) cmpl $0x0, -0x48(%rbp) jle 0x4bbf9 movl -0x48(%rbp), %eax movl %eax, -0x54(%rbp) jmp 0x4bc19 cmpl $0x0, -0x48(%rbp) jge 0x4bc09 xorl %eax, %eax subl -0x48(%rbp), %eax movl %eax, -0x58(%rbp) jmp 0x4bc13 movl $0x1, %eax movl %eax, -0x58(%rbp) jmp 0x4bc13 movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %ecx movq -0x38(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0x4bb8c movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax movl %eax, %ecx subl -0x3c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x8(%rax) movsbl -0x29(%rbp), %eax cmpl $0x0, %eax je 0x4bc8a movl -0x40(%rbp), %eax leaq 0x272404(%rip), %rcx # 0x2be060 cmpq (%rcx), %rax jb 0x4bc9b movl -0x40(%rbp), %eax leaq 0x2723fd(%rip), %rcx # 0x2be068 cmpq (%rcx), %rax jae 0x4bc9b movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rax movl 0x8(%rax), %eax movl %eax, %esi callq 0x9e040 cmpl $0x0, %eax jne 0x4bc9b movq -0x38(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x4bcb1 jmp 0x4bc9d movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x4bad9 jmp 0x4bcad movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
maria_ft_simple_get_word: push rbp mov rbp, rsp sub rsp, 60h mov al, r8b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_29], al mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_38], rax loc_4BAD9: jmp short $+2 loc_4BADB: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jb short loc_4BAF0 jmp short $+2 loc_4BAE7: mov [rbp+var_1], 0 jmp loc_4BCB1 loc_4BAF0: mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+38h] mov rdi, [rbp+var_10] mov rdx, [rbp+var_38] mov rcx, [rbp+var_20] lea rsi, [rbp+var_44] call rax mov [rbp+var_48], eax mov eax, [rbp+var_44] and eax, 7 cmp eax, 0 jnz short loc_4BB2B mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 5Fh ; '_' jnz short loc_4BB2D loc_4BB2B: jmp short loc_4BB73 loc_4BB2D: jmp short $+2 loc_4BB2F: cmp [rbp+var_48], 0 jle short loc_4BB3D mov eax, [rbp+var_48] mov [rbp+var_4C], eax jmp short loc_4BB5D loc_4BB3D: cmp [rbp+var_48], 0 jge short loc_4BB4D xor eax, eax sub eax, [rbp+var_48] mov [rbp+var_50], eax jmp short loc_4BB57 loc_4BB4D: mov eax, 1 mov [rbp+var_50], eax jmp short $+2 loc_4BB57: mov eax, [rbp+var_50] mov [rbp+var_4C], eax loc_4BB5D: mov ecx, [rbp+var_4C] mov rax, [rbp+var_38] movsxd rcx, ecx add rax, rcx mov [rbp+var_38], rax jmp loc_4BADB loc_4BB73: mov [rbp+var_40], 0 mov [rbp+var_3C], 0 mov rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx loc_4BB8C: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jnb loc_4BC2F mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+38h] mov rdi, [rbp+var_10] mov rdx, [rbp+var_38] mov rcx, [rbp+var_20] lea rsi, [rbp+var_44] call rax mov [rbp+var_48], eax mov eax, [rbp+var_44] and eax, 7 cmp eax, 0 jnz short loc_4BBD5 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 5Fh ; '_' jnz short loc_4BBDE loc_4BBD5: mov [rbp+var_3C], 0 jmp short loc_4BBE0 loc_4BBDE: jmp short loc_4BC2F loc_4BBE0: jmp short $+2 loc_4BBE2: mov eax, [rbp+var_40] add eax, 1 mov [rbp+var_40], eax cmp [rbp+var_48], 0 jle short loc_4BBF9 mov eax, [rbp+var_48] mov [rbp+var_54], eax jmp short loc_4BC19 loc_4BBF9: cmp [rbp+var_48], 0 jge short loc_4BC09 xor eax, eax sub eax, [rbp+var_48] mov [rbp+var_58], eax jmp short loc_4BC13 loc_4BC09: mov eax, 1 mov [rbp+var_58], eax jmp short $+2 loc_4BC13: mov eax, [rbp+var_58] mov [rbp+var_54], eax loc_4BC19: mov ecx, [rbp+var_54] mov rax, [rbp+var_38] movsxd rcx, ecx add rax, rcx mov [rbp+var_38], rax jmp loc_4BB8C loc_4BC2F: mov rax, [rbp+var_38] mov rcx, [rbp+var_28] mov rcx, [rcx] sub rax, rcx mov ecx, eax sub ecx, [rbp+var_3C] mov rax, [rbp+var_28] mov [rax+8], ecx movsx eax, [rbp+var_29] cmp eax, 0 jz short loc_4BC8A mov eax, [rbp+var_40] lea rcx, ft_min_word_len cmp rax, [rcx] jb short loc_4BC9B mov eax, [rbp+var_40] lea rcx, ft_max_word_len cmp rax, [rcx] jnb short loc_4BC9B mov rax, [rbp+var_28] mov rdi, [rax] mov rax, [rbp+var_28] mov eax, [rax+8] mov esi, eax call is_stopword cmp eax, 0 jnz short loc_4BC9B loc_4BC8A: mov rcx, [rbp+var_38] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_1], 1 jmp short loc_4BCB1 loc_4BC9B: jmp short $+2 loc_4BC9D: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jb loc_4BAD9 jmp short $+2 loc_4BCAD: mov [rbp+var_1], 0 loc_4BCB1: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char maria_ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long a4, char a5) { int v6; // [rsp+8h] [rbp-58h] int v7; // [rsp+Ch] [rbp-54h] int v8; // [rsp+10h] [rbp-50h] int v9; // [rsp+14h] [rbp-4Ch] int v10; // [rsp+18h] [rbp-48h] int v11; // [rsp+18h] [rbp-48h] int v12; // [rsp+1Ch] [rbp-44h] BYREF unsigned int v13; // [rsp+20h] [rbp-40h] int v14; // [rsp+24h] [rbp-3Ch] _BYTE *v15; // [rsp+28h] [rbp-38h] char v16; // [rsp+37h] [rbp-29h] long long v17; // [rsp+38h] [rbp-28h] unsigned long long v18; // [rsp+40h] [rbp-20h] _QWORD *v19; // [rsp+48h] [rbp-18h] long long v20; // [rsp+50h] [rbp-10h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = *a2; do { while ( 1 ) { if ( (unsigned long long)v15 >= v18 ) return 0; v10 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v20 + 184) + 56LL))( v20, &v12, v15, v18); if ( (v12 & 7) != 0 || *v15 == 95 ) break; if ( v10 <= 0 ) { if ( v10 >= 0 ) v8 = 1; else v8 = -v10; v9 = v8; } else { v9 = v10; } v15 += v9; } v13 = 0; v14 = 0; *(_QWORD *)v17 = v15; while ( (unsigned long long)v15 < v18 ) { v11 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v20 + 184) + 56LL))( v20, &v12, v15, v18); if ( (v12 & 7) == 0 && *v15 != 95 ) break; v14 = 0; ++v13; if ( v11 <= 0 ) { if ( v11 >= 0 ) v6 = 1; else v6 = -v11; v7 = v6; } else { v7 = v11; } v15 += v7; } *(_DWORD *)(v17 + 8) = (_DWORD)v15 - *(_QWORD *)v17 - v14; if ( !v16 || (unsigned long long)v13 >= ft_min_word_len && (unsigned long long)v13 < ft_max_word_len && !(unsigned int)is_stopword(*(_QWORD *)v17, *(unsigned int *)(v17 + 8)) ) { *v19 = v15; return 1; } } while ( (unsigned long long)v15 < v18 ); return 0; }
maria_ft_simple_get_word: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,R8B 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 byte ptr [RBP + -0x29],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_0014bad9: JMP 0x0014badb LAB_0014badb: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JC 0x0014baf0 JMP 0x0014bae7 LAB_0014bae7: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014bcb1 LAB_0014baf0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x44] CALL RAX MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x44] AND EAX,0x7 CMP EAX,0x0 JNZ 0x0014bb2b MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x5f JNZ 0x0014bb2d LAB_0014bb2b: JMP 0x0014bb73 LAB_0014bb2d: JMP 0x0014bb2f LAB_0014bb2f: CMP dword ptr [RBP + -0x48],0x0 JLE 0x0014bb3d MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x4c],EAX JMP 0x0014bb5d LAB_0014bb3d: CMP dword ptr [RBP + -0x48],0x0 JGE 0x0014bb4d XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x50],EAX JMP 0x0014bb57 LAB_0014bb4d: MOV EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x0014bb57 LAB_0014bb57: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4c],EAX LAB_0014bb5d: MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x0014badb LAB_0014bb73: MOV dword ptr [RBP + -0x40],0x0 MOV dword ptr [RBP + -0x3c],0x0 MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX LAB_0014bb8c: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0014bc2f MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x44] CALL RAX MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x44] AND EAX,0x7 CMP EAX,0x0 JNZ 0x0014bbd5 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x5f JNZ 0x0014bbde LAB_0014bbd5: MOV dword ptr [RBP + -0x3c],0x0 JMP 0x0014bbe0 LAB_0014bbde: JMP 0x0014bc2f LAB_0014bbe0: JMP 0x0014bbe2 LAB_0014bbe2: MOV EAX,dword ptr [RBP + -0x40] ADD EAX,0x1 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x48],0x0 JLE 0x0014bbf9 MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x54],EAX JMP 0x0014bc19 LAB_0014bbf9: CMP dword ptr [RBP + -0x48],0x0 JGE 0x0014bc09 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x58],EAX JMP 0x0014bc13 LAB_0014bc09: MOV EAX,0x1 MOV dword ptr [RBP + -0x58],EAX JMP 0x0014bc13 LAB_0014bc13: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX LAB_0014bc19: MOV ECX,dword ptr [RBP + -0x54] MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x0014bb8c LAB_0014bc2f: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] SUB RAX,RCX MOV ECX,EAX SUB ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x8],ECX MOVSX EAX,byte ptr [RBP + -0x29] CMP EAX,0x0 JZ 0x0014bc8a MOV EAX,dword ptr [RBP + -0x40] LEA RCX,[0x3be060] CMP RAX,qword ptr [RCX] JC 0x0014bc9b MOV EAX,dword ptr [RBP + -0x40] LEA RCX,[0x3be068] CMP RAX,qword ptr [RCX] JNC 0x0014bc9b MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x8] MOV ESI,EAX CALL 0x0019e040 CMP EAX,0x0 JNZ 0x0014bc9b LAB_0014bc8a: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014bcb1 LAB_0014bc9b: JMP 0x0014bc9d LAB_0014bc9d: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JC 0x0014bad9 JMP 0x0014bcad LAB_0014bcad: MOV byte ptr [RBP + -0x1],0x0 LAB_0014bcb1: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 maria_ft_simple_get_word (long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5) { int iVar1; int local_60; int local_5c; int local_58; int local_54; uint local_4c; uint local_48; int local_44; char *local_40; char local_31; int8 *local_30; char *local_28; int8 *local_20; long local_18; local_40 = (char *)*param_2; local_31 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; while( true ) { while( true ) { if (local_28 <= local_40) { return 0; } local_54 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38)) (local_18,&local_4c,local_40,local_28); if (((local_4c & 7) != 0) || (*local_40 == '_')) break; if (local_54 < 1) { if (local_54 < 0) { local_58 = -local_54; } else { local_58 = 1; } local_54 = local_58; } local_40 = local_40 + local_54; } local_48 = 0; *local_30 = local_40; while ((local_44 = 0, local_40 < local_28 && ((local_5c = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38)) (local_18,&local_4c,local_40,local_28), (local_4c & 7) != 0 || (*local_40 == '_'))))) { local_48 = local_48 + 1; if (local_5c < 1) { if (local_5c < 0) { local_60 = -local_5c; } else { local_60 = 1; } local_5c = local_60; } local_40 = local_40 + local_5c; } *(int *)(local_30 + 1) = ((int)local_40 - (int)*local_30) - local_44; if ((local_31 == '\0') || (((ft_min_word_len <= local_48 && (local_48 < ft_max_word_len)) && (iVar1 = is_stopword(*local_30,*(int4 *)(local_30 + 1)), iVar1 == 0)))) break; if (local_28 <= local_40) { return 0; } } *local_20 = local_40; return 1; }
28,874
JS_EvalObject
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_EvalObject(JSContext *ctx, JSValue this_obj, JSValue val, int flags, int scope_idx) { JSValue ret; const char *str; size_t len; if (!JS_IsString(val)) return js_dup(val); str = JS_ToCStringLen(ctx, &len, val); if (!str) return JS_EXCEPTION; ret = JS_EvalInternal(ctx, this_obj, str, len, "<input>", flags, scope_idx); JS_FreeCString(ctx, str); return ret; }
O0
c
JS_EvalObject: subq $0x88, %rsp movl 0x90(%rsp), %eax movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x58(%rsp) movq %r8, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %r9d, 0x4c(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x4f450 cmpl $0x0, %eax jne 0x64791 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x20410 movq %rax, 0x78(%rsp) movq %rdx, 0x80(%rsp) jmp 0x6484a movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rdx movq 0x60(%rsp), %rcx leaq 0x28(%rsp), %rsi callq 0x61c10 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x647cd movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x6484a movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rcx movq 0x28(%rsp), %r8 movl 0x4c(%rsp), %r10d movl 0x90(%rsp), %eax movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0xa8516(%rip), %r9 # 0x10cd0f movl %r10d, (%rsp) movl %eax, 0x8(%rsp) callq 0x49970 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x28b90 movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nop
JS_EvalObject: sub rsp, 88h mov eax, [rsp+88h+arg_0] mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_30], rcx mov [rsp+88h+var_28], r8 mov [rsp+88h+var_38], rdi mov [rsp+88h+var_3C], r9d mov rdi, [rsp+88h+var_30] mov rsi, [rsp+88h+var_28] call JS_IsString_0 cmp eax, 0 jnz short loc_64791 mov rdi, [rsp+88h+var_30] mov rsi, [rsp+88h+var_28] call js_dup mov [rsp+88h+var_10], rax mov [rsp+88h+var_8], rdx jmp loc_6484A loc_64791: mov rdi, [rsp+88h+var_38] mov rdx, [rsp+88h+var_30] mov rcx, [rsp+88h+var_28] lea rsi, [rsp+88h+var_60] call JS_ToCStringLen_0 mov [rsp+88h+var_58], rax cmp [rsp+88h+var_58], 0 jnz short loc_647CD mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp short loc_6484A loc_647CD: mov rdi, [rsp+88h+var_38] mov rcx, [rsp+88h+var_58] mov r8, [rsp+88h+var_60] mov r10d, [rsp+88h+var_3C] mov eax, [rsp+88h+arg_0] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] lea r9, aInput; "<input>" mov [rsp+88h+var_88], r10d mov [rsp+88h+var_80], eax call JS_EvalInternal mov [rsp+88h+var_70], rax mov [rsp+88h+var_68], rdx mov rax, [rsp+88h+var_70] mov [rsp+88h+var_50], rax mov rax, [rsp+88h+var_68] mov [rsp+88h+var_48], rax mov rdi, [rsp+88h+var_38] mov rsi, [rsp+88h+var_58] call JS_FreeCString mov rax, [rsp+88h+var_50] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_48] mov [rsp+88h+var_8], rax loc_6484A: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
_DWORD * JS_EvalObject( long long a1, long long a2, long long a3, _DWORD *a4, long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, int a15) { long long v15; // rdx __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rdx long long v20; // [rsp+28h] [rbp-60h] BYREF _DWORD *v21; // [rsp+30h] [rbp-58h] long long v22; // [rsp+38h] [rbp-50h] long long v23; // [rsp+40h] [rbp-48h] int v24; // [rsp+4Ch] [rbp-3Ch] long long v25; // [rsp+50h] [rbp-38h] _DWORD *v26; // [rsp+58h] [rbp-30h] long long v27; // [rsp+60h] [rbp-28h] long long v28; // [rsp+68h] [rbp-20h] long long v29; // [rsp+70h] [rbp-18h] _DWORD *v30; // [rsp+78h] [rbp-10h] long long v31; // [rsp+80h] [rbp-8h] v28 = a2; v29 = a3; v26 = a4; v27 = a5; v25 = a1; v24 = a6; if ( JS_IsString_0((long long)a4, a5) ) { v21 = JS_ToCStringLen_0(v25, &v20, (long long)v26, v27); if ( v21 ) { v22 = JS_EvalInternal( v25, v28, v29, (long long)v21, v20, (long long)"<input>", a7, a8, a9, a10, v16, v17, a13, a14, v24, a15); v23 = v18; JS_FreeCString(v25, (long long)v21); v30 = (_DWORD *)v22; v31 = v23; } else { LODWORD(v30) = 0; v31 = 6LL; } } else { v30 = js_dup(v26, v27); v31 = v15; } return v30; }
JS_EvalObject: SUB RSP,0x88 MOV EAX,dword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],R8 MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],R9D MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x0014f450 CMP EAX,0x0 JNZ 0x00164791 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x00120410 MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RDX JMP 0x0016484a LAB_00164791: MOV RDI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x60] LEA RSI,[RSP + 0x28] CALL 0x00161c10 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x001647cd MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0016484a LAB_001647cd: MOV RDI,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x28] MOV R10D,dword ptr [RSP + 0x4c] MOV EAX,dword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA R9,[0x20cd0f] MOV dword ptr [RSP],R10D MOV dword ptr [RSP + 0x8],EAX CALL 0x00149970 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00128b90 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x80],RAX LAB_0016484a: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] JS_EvalObject(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int4 param_6,int4 param_7) { int iVar1; int1 auVar2 [16]; int8 local_60; long local_58; int1 local_50 [16]; int4 local_3c; int8 local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_3c = param_6; local_38 = param_1; local_30 = param_4; local_28 = param_5; local_20 = param_2; local_18 = param_3; iVar1 = JS_IsString(param_4,param_5); if (iVar1 == 0) { auVar2 = js_dup(local_30,local_28); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { local_58 = JS_ToCStringLen(local_38,&local_60,local_30,local_28); if (local_58 == 0) { local_10 = 0; local_8 = 6; } else { local_50 = JS_EvalInternal(local_38,local_20,local_18,local_58,local_60,"<input>",local_3c, param_7); JS_FreeCString(local_38,local_58); local_10 = local_50._0_4_; uStack_c = local_50._4_4_; local_8 = local_50._8_8_; } } auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
28,875
JS_EvalObject
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_EvalObject(JSContext *ctx, JSValue this_obj, JSValue val, int flags, int scope_idx) { JSValue ret; const char *str; size_t len; if (!JS_IsString(val)) return js_dup(val); str = JS_ToCStringLen(ctx, &len, val); if (!str) return JS_EXCEPTION; ret = JS_EvalInternal(ctx, this_obj, str, len, "<input>", flags, scope_idx); JS_FreeCString(ctx, str); return ret; }
O1
c
JS_EvalObject: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rcx, %r14 cmpl $-0x7, %ebx jne 0x3e8eb movq %rsi, %r13 movq %rdi, %r15 movq %rdx, 0x8(%rsp) movq %r9, 0x10(%rsp) movq %rsp, %rsi xorl %ebp, %ebp movq %r14, %rdx movq %rbx, %rcx xorl %r8d, %r8d callq 0x1ffe3 testq %rax, %rax je 0x3e91f movq %rax, %r12 movq 0x1f8(%r15), %rax testq %rax, %rax je 0x3e929 movl 0x50(%rsp), %r10d movq (%rsp), %r8 leaq 0x5f473(%rip), %r9 # 0x9dd13 movq %r15, %rdi movq %r13, %rsi movq 0x8(%rsp), %rdx movq %r12, %rcx pushq %r10 pushq 0x18(%rsp) callq *%rax addq $0x10, %rsp movq %rax, %r14 movq %rdx, %rbx movq 0x18(%r15), %rdi movl -0x18(%r12), %eax leal -0x1(%rax), %ecx movl %ecx, -0x18(%r12) cmpl $0x1, %eax jg 0x3e8fa addq $-0x18, %r12 movq %r12, %rsi movq $-0x7, %rdx callq 0x20652 jmp 0x3e8fa movq %r14, (%rsp) cmpl $-0x9, %ebx jb 0x3e8fa movq (%rsp), %rax incl (%rax) movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000 andq %r14, %rbp movl %r14d, %eax orq %rbp, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x6, %ebx xorl %r14d, %r14d jmp 0x3e907 leaq 0x5f7f3(%rip), %rsi # 0x9e123 xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x21953 movl $0x6, %ebx jmp 0x3e8c0
JS_EvalObject: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, r8 mov r14, rcx cmp ebx, 0FFFFFFF9h jnz loc_3E8EB mov r13, rsi mov r15, rdi mov [rsp+48h+var_40], rdx mov [rsp+48h+var_38], r9 mov rsi, rsp xor ebp, ebp mov rdx, r14 mov rcx, rbx xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz loc_3E91F mov r12, rax mov rax, [r15+1F8h] test rax, rax jz loc_3E929 mov r10d, [rsp+48h+arg_0] mov r8, [rsp+48h+var_48] lea r9, aInput; "<input>" mov rdi, r15 mov rsi, r13 mov rdx, [rsp+48h+var_40] mov rcx, r12 push r10 push [rsp+50h+var_38] call rax add rsp, 10h mov r14, rax mov rbx, rdx loc_3E8C0: mov rdi, [r15+18h] mov eax, [r12-18h] lea ecx, [rax-1] mov [r12-18h], ecx cmp eax, 1 jg short loc_3E8FA add r12, 0FFFFFFFFFFFFFFE8h mov rsi, r12 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt jmp short loc_3E8FA loc_3E8EB: mov [rsp+48h+var_48], r14 cmp ebx, 0FFFFFFF7h jb short loc_3E8FA mov rax, [rsp+48h+var_48] inc dword ptr [rax] loc_3E8FA: mov rbp, 0FFFFFFFF00000000h and rbp, r14 loc_3E907: mov eax, r14d or rax, rbp mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3E91F: mov ebx, 6 xor r14d, r14d jmp short loc_3E907 loc_3E929: lea rsi, aEvalIsNotSuppo; "eval is not supported" xor r14d, r14d mov rdi, r15 xor eax, eax call JS_ThrowTypeError mov ebx, 6 jmp loc_3E8C0
unsigned long long JS_EvalObject( 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, double a11, double a12, __m128 a13, __m128 a14, unsigned int a15) { long long v15; // r14 unsigned long long v16; // rbp long long v17; // rax long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // r12 long long ( *v25)(long long, long long, long long, long long, _DWORD *, const char *, long long, _QWORD); // rax long long v26; // r8 long long v27; // r9 long long v28; // rdi int v29; // eax long long v30; // rcx _DWORD *v32; // [rsp+0h] [rbp-48h] BYREF long long v33; // [rsp+8h] [rbp-40h] long long v34; // [rsp+10h] [rbp-38h] v15 = a4; if ( (_DWORD)a5 == -7 ) { v33 = a3; v34 = a6; v16 = 0LL; v17 = JS_ToCStringLen2(a1, (long long *)&v32, a4, a5, 0); if ( !v17 ) { LODWORD(v15) = 0; return v16 | (unsigned int)v15; } v24 = v17; v25 = *(long long ( **)(long long, long long, long long, long long, _DWORD *, const char *, long long, _QWORD))(a1 + 504); if ( v25 ) { v15 = v25(a1, a2, v33, v24, v32, "<input>", v34, a15); } else { v15 = 0LL; JS_ThrowTypeError( a1, (long long)"eval is not supported", v18, v19, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14, (char)v32); } v28 = *(_QWORD *)(a1 + 24); v29 = *(_DWORD *)(v24 - 24); v30 = (unsigned int)(v29 - 1); *(_DWORD *)(v24 - 24) = v30; if ( v29 <= 1 ) js_free_value_rt(v28, (_QWORD *)(v24 - 24), -7LL, v30, v26, v27); } else { v32 = (_DWORD *)a4; if ( (unsigned int)a5 >= 0xFFFFFFF7 ) ++*v32; } v16 = v15 & 0xFFFFFFFF00000000LL; return v16 | (unsigned int)v15; }
JS_EvalObject: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,R8 MOV R14,RCX CMP EBX,-0x7 JNZ 0x0013e8eb MOV R13,RSI MOV R15,RDI MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x10],R9 MOV RSI,RSP XOR EBP,EBP MOV RDX,R14 MOV RCX,RBX XOR R8D,R8D CALL 0x0011ffe3 TEST RAX,RAX JZ 0x0013e91f MOV R12,RAX MOV RAX,qword ptr [R15 + 0x1f8] TEST RAX,RAX JZ 0x0013e929 MOV R10D,dword ptr [RSP + 0x50] MOV R8,qword ptr [RSP] LEA R9,[0x19dd13] MOV RDI,R15 MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x8] MOV RCX,R12 PUSH R10 PUSH qword ptr [RSP + 0x18] CALL RAX ADD RSP,0x10 MOV R14,RAX MOV RBX,RDX LAB_0013e8c0: MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R12 + -0x18] LEA ECX,[RAX + -0x1] MOV dword ptr [R12 + -0x18],ECX CMP EAX,0x1 JG 0x0013e8fa ADD R12,-0x18 MOV RSI,R12 MOV RDX,-0x7 CALL 0x00120652 JMP 0x0013e8fa LAB_0013e8eb: MOV qword ptr [RSP],R14 CMP EBX,-0x9 JC 0x0013e8fa MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_0013e8fa: MOV RBP,-0x100000000 AND RBP,R14 LAB_0013e907: MOV EAX,R14D OR RAX,RBP MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013e91f: MOV EBX,0x6 XOR R14D,R14D JMP 0x0013e907 LAB_0013e929: LEA RSI,[0x19e123] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x00121953 MOV EBX,0x6 JMP 0x0013e8c0
int1 [16] JS_EvalObject(long param_1,int8 param_2,int8 param_3,int *param_4,int8 param_5, int8 param_6,int4 param_7) { int iVar1; int8 uVar2; int1 auVar3 [16]; long lVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; int8 local_48; int8 local_40; int8 local_38; auVar3._8_8_ = param_5; auVar3._0_8_ = param_4; auVar6._8_8_ = param_5; auVar6._0_8_ = param_4; if ((uint)param_5 == 0xfffffff9) { uVar5 = 0; local_40 = param_3; local_38 = param_6; lVar4 = JS_ToCStringLen2(param_1,&local_48,param_4,param_5,0); if (lVar4 == 0) { auVar6 = ZEXT816(6) << 0x40; goto LAB_0013e907; } if (*(code **)(param_1 + 0x1f8) == (code *)0x0) { JS_ThrowTypeError(param_1,"eval is not supported"); auVar6 = ZEXT816(6) << 0x40; } else { auVar6 = (**(code **)(param_1 + 0x1f8)) (param_1,param_2,local_40,lVar4,local_48,"<input>",local_38,param_7); } uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *(int *)(lVar4 + -0x18); *(int *)(lVar4 + -0x18) = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,lVar4 + -0x18,0xfffffffffffffff9); } } else if (0xfffffff6 < (uint)param_5) { *param_4 = *param_4 + 1; auVar6 = auVar3; } uVar5 = auVar6._0_8_ & 0xffffffff00000000; LAB_0013e907: auVar7._0_8_ = auVar6._0_8_ & 0xffffffff | uVar5; auVar7._8_8_ = auVar6._8_8_; return auVar7; }
28,876
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) }
O3
c
mysql_commit_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x20e3e movb %al, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_commit_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_commit mov [rbx+8], al mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_commit_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_commit(v1); *(_BYTE *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_commit_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x00120e3e MOV byte ptr [RBX + 0x8],AL MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX 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(); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
28,877
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O0
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x30cec movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0x30cec xorl %eax, %eax leaq 0x35bd8a(%rip), %rcx # 0x38ca48 cmpq $0x0, (%rcx) movb %al, -0x11(%rbp) je 0x30cdf leaq 0x35bd7a(%rip), %rax # 0x38ca48 movq (%rax), %rdi callq 0x30c90 cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x30d08 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x30d01 movl $0x1, -0x4(%rbp) jmp 0x30d08 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_if_hard_path: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz short loc_30CEC mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_30CEC xor eax, eax lea rcx, home_dir cmp qword ptr [rcx], 0 mov [rbp+var_11], al jz short loc_30CDF lea rax, home_dir mov rdi, [rax] call test_if_hard_path cmp eax, 0 setnz al mov [rbp+var_11], al loc_30CDF: mov al, [rbp+var_11] and al, 1 movzx eax, al mov [rbp+var_4], eax jmp short loc_30D08 loc_30CEC: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_30D01 mov [rbp+var_4], 1 jmp short loc_30D08 loc_30D01: mov [rbp+var_4], 0 loc_30D08: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 test_if_hard_path(char *a1) { bool v2; // [rsp+Fh] [rbp-11h] if ( *a1 == 126 && a1[1] == 47 ) { v2 = 0; if ( home_dir ) return (unsigned int)test_if_hard_path(home_dir) != 0; return v2; } else { return *a1 == 47; } }
test_if_hard_path: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x00130cec MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x00130cec XOR EAX,EAX LEA RCX,[0x48ca48] CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x00130cdf LEA RAX,[0x48ca48] MOV RDI,qword ptr [RAX] CALL 0x00130c90 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_00130cdf: MOV AL,byte ptr [RBP + -0x11] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x00130d08 LAB_00130cec: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x00130d01 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00130d08 LAB_00130d01: MOV dword ptr [RBP + -0x4],0x0 LAB_00130d08: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool test_if_hard_path(char *param_1) { int iVar1; bool local_19; if ((*param_1 == '~') && (param_1[1] == '/')) { local_19 = false; if (home_dir != 0) { iVar1 = test_if_hard_path(home_dir); local_19 = iVar1 != 0; } } else if (*param_1 == '/') { local_19 = true; } else { local_19 = false; } return local_19; }
28,878
my_strtoll
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static long long my_strtoll(const char *str, size_t len, const char **end, int *err) { unsigned long long uval = 0; const char *p = str; const char *end_str = p + len; int neg; while (p < end_str && isspace(*p)) p++; if (p == end_str) { *end = p; *err = ERANGE; return 0; } neg = *p == '-'; if (neg) p++; uval = my_strtoull(p, (end_str - p), &p, err); *end = p; if (*err) return uval; if (!neg) { /* Overflow of the long long range. */ if (uval > LONGLONG_MAX) { *end = p - 1; uval = LONGLONG_MAX; *err = ERANGE; } return uval; } if (uval == (unsigned long long) LONGLONG_MIN) return LONGLONG_MIN; if (uval > LONGLONG_MAX) { *end = p - 1; uval = LONGLONG_MIN; *err = ERANGE; } return -1LL * uval; }
O0
c
my_strtoll: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq $0x0, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x45(%rbp) jae 0x55ae7 callq 0x36120 movq (%rax), %rax movq -0x38(%rbp), %rcx movsbl (%rcx), %ecx movslq %ecx, %rcx movzwl (%rax,%rcx,2), %eax andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax setne %al movb %al, -0x45(%rbp) movb -0x45(%rbp), %al testb $0x1, %al jne 0x55af0 jmp 0x55afe movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x55ab4 movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x55b2a movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x55c39 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax sete %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x44(%rbp) cmpl $0x0, -0x44(%rbp) je 0x55b51 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rax subq %rax, %rsi movq -0x28(%rbp), %rcx leaq -0x38(%rbp), %rdx callq 0x54a50 movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax cmpl $0x0, (%rax) je 0x55b92 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x55c39 cmpl $0x0, -0x44(%rbp) jne 0x55bd9 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x30(%rbp) jbe 0x55bcf movq -0x38(%rbp), %rcx addq $-0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movl $0x22, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x55c39 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 cmpq %rax, -0x30(%rbp) jne 0x55bf9 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, -0x8(%rbp) jmp 0x55c39 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x30(%rbp) jbe 0x55c30 movq -0x38(%rbp), %rcx addq $-0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movl $0x22, (%rax) imulq $-0x1, -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strtoll: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], 0 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] add rax, [rbp+var_18] mov [rbp+var_40], rax loc_55AB4: mov rcx, [rbp+var_38] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_45], al jnb short loc_55AE7 call ___ctype_b_loc mov rax, [rax] mov rcx, [rbp+var_38] movsx ecx, byte ptr [rcx] movsxd rcx, ecx movzx eax, word ptr [rax+rcx*2] and eax, 2000h cmp eax, 0 setnz al mov [rbp+var_45], al loc_55AE7: mov al, [rbp+var_45] test al, 1 jnz short loc_55AF0 jmp short loc_55AFE loc_55AF0: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_55AB4 loc_55AFE: mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnz short loc_55B2A mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_28] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_55C39 loc_55B2A: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' setz al and al, 1 movzx eax, al mov [rbp+var_44], eax cmp [rbp+var_44], 0 jz short loc_55B51 mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax loc_55B51: mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] mov rax, [rbp+var_38] sub rsi, rax mov rcx, [rbp+var_28] lea rdx, [rbp+var_38] call my_strtoull mov [rbp+var_30], rax mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_28] cmp dword ptr [rax], 0 jz short loc_55B92 mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp loc_55C39 loc_55B92: cmp [rbp+var_44], 0 jnz short loc_55BD9 mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_30], rax jbe short loc_55BCF mov rcx, [rbp+var_38] add rcx, 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_20] mov [rax], rcx mov rax, 7FFFFFFFFFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_28] mov dword ptr [rax], 22h ; '"' loc_55BCF: mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp short loc_55C39 loc_55BD9: mov rax, 8000000000000000h cmp [rbp+var_30], rax jnz short loc_55BF9 mov rax, 8000000000000000h mov [rbp+var_8], rax jmp short loc_55C39 loc_55BF9: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_30], rax jbe short loc_55C30 mov rcx, [rbp+var_38] add rcx, 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_20] mov [rax], rcx mov rax, 8000000000000000h mov [rbp+var_30], rax mov rax, [rbp+var_28] mov dword ptr [rax], 22h ; '"' loc_55C30: imul rax, [rbp+var_30], -1 mov [rbp+var_8], rax loc_55C39: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
unsigned long long my_strtoll(char *a1, long long a2, _QWORD *a3, _DWORD *a4) { bool v5; // [rsp+Bh] [rbp-45h] BOOL v6; // [rsp+Ch] [rbp-44h] char *v7; // [rsp+10h] [rbp-40h] char *v8; // [rsp+18h] [rbp-38h] BYREF unsigned long long v9; // [rsp+20h] [rbp-30h] _DWORD *v10; // [rsp+28h] [rbp-28h] _QWORD *v11; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] char *v13; // [rsp+40h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = 0LL; v8 = a1; v7 = &a1[a2]; while ( 1 ) { v5 = 0; if ( v8 < v7 ) v5 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *v8) & 0x2000) != 0; if ( !v5 ) break; ++v8; } if ( v8 == v7 ) { *v11 = v8; *v10 = 34; return 0LL; } else { v6 = *v8 == 45; if ( *v8 == 45 ) ++v8; v9 = my_strtoull(v8, v7 - v8, &v8, v10); *v11 = v8; if ( *v10 ) { return v9; } else if ( v6 ) { if ( v9 == 0x8000000000000000LL ) { return 0x8000000000000000LL; } else { if ( v9 > 0x7FFFFFFFFFFFFFFFLL ) { *v11 = v8 - 1; v9 = 0x8000000000000000LL; *v10 = 34; } return -(long long)v9; } } else { if ( v9 > 0x7FFFFFFFFFFFFFFFLL ) { *v11 = v8 - 1; v9 = 0x7FFFFFFFFFFFFFFFLL; *v10 = 34; } return v9; } } }
my_strtoll: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX LAB_00155ab4: MOV RCX,qword ptr [RBP + -0x38] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x45],AL JNC 0x00155ae7 CALL 0x00136120 MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x38] MOVSX ECX,byte ptr [RCX] MOVSXD RCX,ECX MOVZX EAX,word ptr [RAX + RCX*0x2] AND EAX,0x2000 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x45],AL LAB_00155ae7: MOV AL,byte ptr [RBP + -0x45] TEST AL,0x1 JNZ 0x00155af0 JMP 0x00155afe LAB_00155af0: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00155ab4 LAB_00155afe: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x00155b2a MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00155c39 LAB_00155b2a: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d SETZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x0 JZ 0x00155b51 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX LAB_00155b51: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] SUB RSI,RAX MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x38] CALL 0x00154a50 MOV qword ptr [RBP + -0x30],RAX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x0 JZ 0x00155b92 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x00155c39 LAB_00155b92: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x00155bd9 MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0x30],RAX JBE 0x00155bcf MOV RCX,qword ptr [RBP + -0x38] ADD RCX,-0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,0x7fffffffffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x22 LAB_00155bcf: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x00155c39 LAB_00155bd9: MOV RAX,-0x8000000000000000 CMP qword ptr [RBP + -0x30],RAX JNZ 0x00155bf9 MOV RAX,-0x8000000000000000 MOV qword ptr [RBP + -0x8],RAX JMP 0x00155c39 LAB_00155bf9: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0x30],RAX JBE 0x00155c30 MOV RCX,qword ptr [RBP + -0x38] ADD RCX,-0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,-0x8000000000000000 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x22 LAB_00155c30: IMUL RAX,qword ptr [RBP + -0x30],-0x1 MOV qword ptr [RBP + -0x8],RAX LAB_00155c39: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
ulong my_strtoll(char *param_1,long param_2,int8 *param_3,int *param_4) { char cVar1; char *pcVar2; ushort **ppuVar3; bool bVar4; char *local_40; ulong local_38; int *local_30; int8 *local_28; long local_20; char *local_18; ulong local_10; local_38 = 0; pcVar2 = param_1 + param_2; local_40 = param_1; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; while( true ) { bVar4 = false; if (local_40 < pcVar2) { ppuVar3 = __ctype_b_loc(); bVar4 = ((*ppuVar3)[(int)*local_40] & 0x2000) != 0; } if (!bVar4) break; local_40 = local_40 + 1; } if (local_40 == pcVar2) { *local_28 = local_40; *local_30 = 0x22; local_10 = 0; } else { cVar1 = *local_40; if (cVar1 == '-') { local_40 = local_40 + 1; } local_38 = my_strtoull(local_40,(long)pcVar2 - (long)local_40,&local_40,local_30); *local_28 = local_40; local_10 = local_38; if (*local_30 == 0) { if (cVar1 == '-') { if (local_38 == 0x8000000000000000) { local_10 = 0x8000000000000000; } else { if (0x7fffffffffffffff < local_38) { *local_28 = local_40 + -1; local_38 = 0x8000000000000000; *local_30 = 0x22; } local_10 = -local_38; } } else { if (0x7fffffffffffffff < local_38) { *local_28 = local_40 + -1; local_38 = 0x7fffffffffffffff; *local_30 = 0x22; } local_10 = local_38; } } } return local_10; }
28,879
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
eloqsql/mysys_ssl/my_crypt.cc
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) { compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad)); this->key= key; this->klen= klen; this->source_tail_len= 0; if (ivlen) memcpy(oiv, iv, ivlen); DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv)); int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen); EVP_CIPHER_CTX_set_padding(ctx, 0); return res; }
O3
cpp
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %rcx, %r12 movl %edx, %r15d movq %rsi, %r13 movq %rdi, %rbx movl 0x10(%rbp), %eax movq %rcx, 0xd0(%rdi) movl %r8d, 0xd8(%rdi) andl $0x0, 0xdc(%rdi) testl %eax, %eax je 0x2ffbe leaq 0xe0(%rbx), %rdi movl %eax, %edx movq %r14, %rsi callq 0x29080 testq %r13, %r13 je 0x3000d movq 0xc8(%rbx), %rdi movq %r13, %rsi xorl %edx, %edx movq %r12, %rcx movq %r14, %r8 movl %r15d, %r9d callq 0x29730 cmpl $0x1, %eax pushq $-0x65 popq %r14 movl $0x0, %eax cmovel %eax, %r14d movq 0xc8(%rbx), %rdi xorl %esi, %esi callq 0x293b0 movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x66 popq %r14 jmp 0x2ffed
_ZN11MyCTX_nopad4initEPK13evp_cipher_stiPKhjS4_j: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov r12, rcx mov r15d, edx mov r13, rsi mov rbx, rdi mov eax, [rbp+arg_0] mov [rdi+0D0h], rcx mov [rdi+0D8h], r8d and dword ptr [rdi+0DCh], 0 test eax, eax jz short loc_2FFBE lea rdi, [rbx+0E0h] mov edx, eax mov rsi, r14 call _memcpy loc_2FFBE: test r13, r13 jz short loc_3000D mov rdi, [rbx+0C8h] mov rsi, r13 xor edx, edx mov rcx, r12 mov r8, r14 mov r9d, r15d call _EVP_CipherInit_ex cmp eax, 1 push 0FFFFFFFFFFFFFF9Bh pop r14 mov eax, 0 cmovz r14d, eax loc_2FFED: mov rdi, [rbx+0C8h] xor esi, esi call _EVP_CIPHER_CTX_set_padding mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3000D: push 0FFFFFFFFFFFFFF9Ah pop r14 jmp short loc_2FFED
long long MyCTX_nopad::init( long long a1, long long a2, unsigned int a3, long long a4, int a5, long long a6, unsigned int a7) { long long v7; // rax bool v11; // zf unsigned int v12; // r14d long long v14; // [rsp-8h] [rbp-30h] v14 = v7; *(_QWORD *)(a1 + 208) = a4; *(_DWORD *)(a1 + 216) = a5; *(_DWORD *)(a1 + 220) = 0; if ( a7 ) memcpy(a1 + 224, a6, a7); if ( a2 ) { v11 = (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v14) == 1; v12 = -101; if ( v11 ) v12 = 0; } else { v12 = -102; } EVP_CIPHER_CTX_set_padding(*(_QWORD *)(a1 + 200), 0LL); return v12; }
init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV R12,RCX MOV R15D,EDX MOV R13,RSI MOV RBX,RDI MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RDI + 0xd0],RCX MOV dword ptr [RDI + 0xd8],R8D AND dword ptr [RDI + 0xdc],0x0 TEST EAX,EAX JZ 0x0012ffbe LEA RDI,[RBX + 0xe0] MOV EDX,EAX MOV RSI,R14 CALL 0x00129080 LAB_0012ffbe: TEST R13,R13 JZ 0x0013000d MOV RDI,qword ptr [RBX + 0xc8] MOV RSI,R13 XOR EDX,EDX MOV RCX,R12 MOV R8,R14 MOV R9D,R15D CALL 0x00129730 CMP EAX,0x1 PUSH -0x65 POP R14 MOV EAX,0x0 CMOVZ R14D,EAX LAB_0012ffed: MOV RDI,qword ptr [RBX + 0xc8] XOR ESI,ESI CALL 0x001293b0 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013000d: PUSH -0x66 POP R14 JMP 0x0012ffed
/* MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int) */ int4 __thiscall MyCTX_nopad::init(MyCTX_nopad *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4, uchar *param_5,uint param_6) { int iVar1; int4 uVar2; *(uchar **)(this + 0xd0) = param_3; *(uint *)(this + 0xd8) = param_4; *(int4 *)(this + 0xdc) = 0; if (param_6 != 0) { memcpy(this + 0xe0,param_5,(ulong)param_6); } if (param_1 == (evp_cipher_st *)0x0) { uVar2 = 0xffffff9a; } else { iVar1 = EVP_CipherInit_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,(ENGINE *)0x0,param_3,param_5 ,param_2); uVar2 = 0xffffff9b; if (iVar1 == 1) { uVar2 = 0; } } EVP_CIPHER_CTX_set_padding(*(EVP_CIPHER_CTX **)(this + 200),0); return uVar2; }
28,880
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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0xa670e cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0x83a53 cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x83afe andb %al, %cl testb %cl, %cl je 0x83ac8 movb $0x1, (%rbx) movl $0x20, %edi callq 0x1b8f0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0x83ae2 shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0xa6668 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x63a58 movq %r15, %rdi xorl %esi, %esi callq 0x5cc1e movq %r15, %rdi callq 0x62398 addq $0x18, %r14 addq $-0x18, %r12 jne 0x83a86 jmp 0x83ae2 movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0xa66ba movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x5cc1e addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b460 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x7381f(%rip), %rsi # 0xf733b leaq 0x73842(%rip), %rdx # 0xf7365 movq %rsp, %rdi callq 0x24db0 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0xa6498 xorl %ebp, %ebp leaq 0xad3bf(%rip), %rsi # 0x130f08 leaq -0x2462c(%rip), %rdx # 0x5f524 movq %r14, %rdi callq 0x1bfb0 jmp 0x83b5e jmp 0x83b5e jmp 0x83b5e movq %rax, %r15 jmp 0x83bab movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5cc1e movq %r14, %rdi callq 0x62398 jmp 0x83bab movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x83b9e movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x83b9e movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x83bab movq %r14, %rdi callq 0x1b6a0 movq %rbx, %rdi callq 0x62398 movq %r15, %rdi callq 0x1c030 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; int push r14; char push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_83A53 cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_83AFE and cl, al loc_83A53: test cl, cl jz short loc_83AC8 mov byte ptr [rbx], 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 [rbx+8], rax test r15, r15 jz short loc_83AE2 shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_83A86: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_83A86 jmp short loc_83AE2 loc_83AC8: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_83AE2: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83AFE: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" mov rdi, rsp 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 bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_83B5E jmp short loc_83B5E jmp short $+2 loc_83B5E: mov r15, rax jmp short loc_83BAB mov r15, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_83BAB mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_83B9E mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_83B9E mov r15, rax mov bpl, 1 loc_83B9E: test bpl, bpl jz short loc_83BAB mov rdi, r14; void * call ___cxa_free_exception loc_83BAB: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00183a1f: MOV RDI,RSI MOV RSI,R12 CALL 0x001a670e CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x00183a53 CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x00183afe AND CL,AL LAB_00183a53: TEST CL,CL JZ 0x00183ac8 MOV byte ptr [RBX],0x1 LAB_00183a5a: MOV EDI,0x20 CALL 0x0011b8f0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x00183ae2 SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_00183a86: MOV RDI,R15 MOV RSI,R14 CALL 0x001a6668 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_00183aa5: CALL 0x00163a58 MOV RDI,R15 XOR ESI,ESI CALL 0x0015cc1e MOV RDI,R15 CALL 0x00162398 ADD R14,0x18 ADD R12,-0x18 JNZ 0x00183a86 JMP 0x00183ae2 LAB_00183ac8: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_00183ad9: CALL 0x001a66ba LAB_00183ade: MOV qword ptr [RBX + 0x8],RAX LAB_00183ae2: MOV RDI,RBX MOV ESI,0x1 CALL 0x0015cc1e ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183afe: MOV EDI,0x20 CALL 0x0011b460 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00183b15: LEA RSI,[0x1f733b] LEA RDX,[0x1f7365] MOV RDI,RSP CALL 0x00124db0 MOV BPL,0x1 LAB_00183b2e: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x001a6498 XOR EBP,EBP LEA RSI,[0x230f08] LEA RDX,[0x15f524] MOV RDI,R14 CALL 0x0011bfb0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 00183a1f to 00183a29 has its CatchHandler @ 00183b5c */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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*,__gnu_cxx::__ops::_Iter_negate<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>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 00183b15 to 00183b2a has its CatchHandler @ 00183b98 */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 00183b2e to 00183b57 has its CatchHandler @ 00183b7d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 00183a5a to 00183a63 has its CatchHandler @ 00183b5a */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 00183a86 to 00183a90 has its CatchHandler @ 00183b5e */ detail:: json_ref<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>> ::moved_or_copied(); /* try { // try from 00183aa5 to 00183aa9 has its CatchHandler @ 00183b63 */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((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>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 00183ad9 to 00183add has its CatchHandler @ 00183b58 */ pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
28,881
js_object_create
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_create(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue proto, props; JSValue obj; proto = argv[0]; if (!JS_IsObject(proto) && !JS_IsNull(proto)) return JS_ThrowTypeError(ctx, "object prototype may only be an Object or null"); obj = JS_NewObjectProto(ctx, proto); if (JS_IsException(obj)) return JS_EXCEPTION; props = argv[1]; if (!JS_IsUndefined(props)) { if (JS_ObjectDefineProperties(ctx, obj, props)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } } return obj; }
O1
c
js_object_create: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %r12 movq %rdi, %r14 movq 0x8(%r8), %rdx cmpl $-0x1, %edx je 0x6fe4a cmpl $0x2, %edx jne 0x6fea3 movq (%r12), %rsi movq %r14, %rdi movl $0x1, %ecx callq 0x20f05 movq %rdx, %rbx cmpl $0x6, %ebx je 0x6fe97 movq %rax, %r15 movq 0x18(%r12), %r8 cmpl $0x3, %r8d je 0x6fec0 movq 0x10(%r12), %rcx movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x710f1 testl %eax, %eax je 0x6fec0 movq 0x18(%r14), %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1d8c6 xorl %r15d, %r15d xorl %eax, %eax movl $0x6, %ebx jmp 0x6fed3 leaq 0x31b16(%rip), %rsi # 0xa19c0 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %ebx xorl %eax, %eax jmp 0x6fed3 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r15, %rax andq %rcx, %rax movl %r15d, %r15d orq %rax, %r15 movq %r15, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_object_create: push r15 push r14 push r12 push rbx push rax mov r12, r8 mov r14, rdi mov rdx, [r8+8] cmp edx, 0FFFFFFFFh jz short loc_6FE4A cmp edx, 2 jnz short loc_6FEA3 loc_6FE4A: mov rsi, [r12] mov rdi, r14 mov ecx, 1 call JS_NewObjectProtoClass mov rbx, rdx cmp ebx, 6 jz short loc_6FE97 mov r15, rax mov r8, [r12+18h] cmp r8d, 3 jz short loc_6FEC0 mov rcx, [r12+10h] mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_ObjectDefineProperties test eax, eax jz short loc_6FEC0 mov rdi, [r14+18h] mov rsi, r15 mov rdx, rbx call JS_FreeValueRT loc_6FE97: xor r15d, r15d xor eax, eax mov ebx, 6 jmp short loc_6FED3 loc_6FEA3: lea rsi, aObjectPrototyp; "object prototype may only be an Object "... xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov ebx, 6 xor eax, eax jmp short loc_6FED3 loc_6FEC0: mov rcx, 0FFFFFFFF00000000h mov rax, r15 and rax, rcx mov r15d, r15d loc_6FED3: or r15, rax mov rax, r15 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
unsigned long long js_object_create( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13, long long a14) { char v14; // al long long v16; // rdx long long v17; // rax long long v18; // rdx long long v19; // rbx long long v20; // r15 unsigned long long v21; // rax v16 = a13[1]; if ( (_DWORD)v16 == -1 || (_DWORD)v16 == 2 ) { v17 = JS_NewObjectProtoClass(a1, *a13, v16, 1u); v19 = v18; if ( (_DWORD)v18 != 6 ) { v20 = v17; if ( (unsigned int)a13[3] == 3 || !(unsigned int)JS_ObjectDefineProperties(a1, v17, v18, a13[2]) ) { v21 = v20 & 0xFFFFFFFF00000000LL; v20 = (unsigned int)v20; return v21 | v20; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v20, v19); } v20 = 0LL; v21 = 0LL; } else { v20 = 0LL; JS_ThrowTypeError( a1, (long long)"object prototype may only be an Object or null", v16, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v14); v21 = 0LL; } return v21 | v20; }
28,882
js_object_create
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_create(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue proto, props; JSValue obj; proto = argv[0]; if (!JS_IsObject(proto) && !JS_IsNull(proto)) return JS_ThrowTypeError(ctx, "object prototype may only be an Object or null"); obj = JS_NewObjectProto(ctx, proto); if (JS_IsException(obj)) return JS_EXCEPTION; props = argv[1]; if (!JS_IsUndefined(props)) { if (JS_ObjectDefineProperties(ctx, obj, props)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } } return obj; }
O2
c
js_object_create: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r8, %r12 movq %rdi, %r14 movq 0x8(%r8), %rdx cmpl $-0x1, %edx je 0x5e139 cmpl $0x2, %edx jne 0x5e18e movq (%r12), %rsi movq %r14, %rdi callq 0x1b2b3 movq %rdx, %rbx pushq $0x6 popq %r13 cmpl $0x6, %ebx je 0x5e184 movq %rax, %r15 movq 0x18(%r12), %r8 cmpl $0x3, %r8d je 0x5e1a9 movq 0x10(%r12), %rcx movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x5f226 testl %eax, %eax je 0x5e1a9 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1801e xorl %r15d, %r15d xorl %eax, %eax movq %r13, %rbx jmp 0x5e1bc leaq 0x2a765(%rip), %rsi # 0x888fa xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x1c64d pushq $0x6 popq %rbx xorl %eax, %eax jmp 0x5e1bc movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r15, %rax andq %rcx, %rax movl %r15d, %r15d orq %rax, %r15 movq %r15, %rax movq %rbx, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_object_create: push r15 push r14 push r13 push r12 push rbx mov r12, r8 mov r14, rdi mov rdx, [r8+8] cmp edx, 0FFFFFFFFh jz short loc_5E139 cmp edx, 2 jnz short loc_5E18E loc_5E139: mov rsi, [r12] mov rdi, r14 call JS_NewObjectProto mov rbx, rdx push 6 pop r13 cmp ebx, 6 jz short loc_5E184 mov r15, rax mov r8, [r12+18h] cmp r8d, 3 jz short loc_5E1A9 mov rcx, [r12+10h] mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_ObjectDefineProperties test eax, eax jz short loc_5E1A9 mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_FreeValue loc_5E184: xor r15d, r15d xor eax, eax mov rbx, r13 jmp short loc_5E1BC loc_5E18E: lea rsi, aObjectPrototyp; "object prototype may only be an Object "... xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError push 6 pop rbx xor eax, eax jmp short loc_5E1BC loc_5E1A9: mov rcx, 0FFFFFFFF00000000h mov rax, r15 and rax, rcx mov r15d, r15d loc_5E1BC: or r15, rax mov rax, r15 mov rdx, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
unsigned long long js_object_create( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13, long long a14) { long long v15; // rdx long long v16; // rax long long v17; // rdx long long v18; // rbx long long v19; // r15 unsigned long long v20; // rax char v22; // [rsp+0h] [rbp-28h] v15 = a13[1]; if ( (_DWORD)v15 == -1 || (_DWORD)v15 == 2 ) { v16 = JS_NewObjectProto(a1, *a13, v15); v18 = v17; if ( (_DWORD)v17 != 6 ) { v19 = v16; if ( (unsigned int)a13[3] == 3 || !(unsigned int)JS_ObjectDefineProperties(a1, v16, v17, a13[2]) ) { v20 = v19 & 0xFFFFFFFF00000000LL; v19 = (unsigned int)v19; return v20 | v19; } JS_FreeValue(a1, v19, v18); } v19 = 0LL; v20 = 0LL; } else { v19 = 0LL; JS_ThrowTypeError( a1, (long long)"object prototype may only be an Object or null", v15, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v22); v20 = 0LL; } return v20 | v19; }
js_object_create: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,R8 MOV R14,RDI MOV RDX,qword ptr [R8 + 0x8] CMP EDX,-0x1 JZ 0x0015e139 CMP EDX,0x2 JNZ 0x0015e18e LAB_0015e139: MOV RSI,qword ptr [R12] MOV RDI,R14 CALL 0x0011b2b3 MOV RBX,RDX PUSH 0x6 POP R13 CMP EBX,0x6 JZ 0x0015e184 MOV R15,RAX MOV R8,qword ptr [R12 + 0x18] CMP R8D,0x3 JZ 0x0015e1a9 MOV RCX,qword ptr [R12 + 0x10] MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0015f226 TEST EAX,EAX JZ 0x0015e1a9 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011801e LAB_0015e184: XOR R15D,R15D XOR EAX,EAX MOV RBX,R13 JMP 0x0015e1bc LAB_0015e18e: LEA RSI,[0x1888fa] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0011c64d PUSH 0x6 POP RBX XOR EAX,EAX JMP 0x0015e1bc LAB_0015e1a9: MOV RCX,-0x100000000 MOV RAX,R15 AND RAX,RCX MOV R15D,R15D LAB_0015e1bc: OR R15,RAX MOV RAX,R15 MOV RDX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_object_create(int8 param_1) { int iVar1; ulong uVar2; int8 uVar3; int8 *in_R8; ulong uVar4; int1 auVar5 [16]; if (((int)in_R8[1] != -1) && ((int)in_R8[1] != 2)) { uVar4 = 0; JS_ThrowTypeError(param_1,"object prototype may only be an Object or null"); uVar3 = 6; uVar2 = 0; goto LAB_0015e1bc; } auVar5 = JS_NewObjectProto(param_1,*in_R8); uVar3 = auVar5._8_8_; uVar4 = auVar5._0_8_; if (auVar5._8_4_ == 6) { LAB_0015e184: uVar4 = 0; uVar2 = 0; uVar3 = 6; } else { if ((int)in_R8[3] != 3) { iVar1 = JS_ObjectDefineProperties(param_1,uVar4,uVar3,in_R8[2]); if (iVar1 != 0) { JS_FreeValue(param_1,uVar4,uVar3); goto LAB_0015e184; } } uVar2 = uVar4 & 0xffffffff00000000; uVar4 = uVar4 & 0xffffffff; } LAB_0015e1bc: auVar5._8_8_ = uVar3; auVar5._0_8_ = uVar4 | uVar2; return auVar5; }
28,883
Cache::getReplacementBlockId(unsigned int, unsigned int)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getReplacementBlockId(uint32_t begin, uint32_t end) { // Find invalid block first for (uint32_t i = begin; i < end; ++i) { if (!this->blocks[i].valid) return i; } // Otherwise use LRU uint32_t resultId = begin; uint32_t min = this->blocks[begin].lastReference; for (uint32_t i = begin; i < end; ++i) { if (this->blocks[i].lastReference < min) { resultId = i; min = this->blocks[i].lastReference; } } return resultId; }
O0
cpp
Cache::getReplacementBlockId(unsigned int, unsigned int): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movl %edx, 0x20(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x24(%rsp), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x20(%rsp), %eax jae 0x9502 movq 0x8(%rsp), %rdi addq $0x48, %rdi movl 0x1c(%rsp), %eax movl %eax, %esi callq 0x9620 testb $0x1, (%rax) jne 0x94f3 movl 0x1c(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0x958e jmp 0x94f5 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x94c3 movq 0x8(%rsp), %rdi movl 0x24(%rsp), %eax movl %eax, 0x18(%rsp) addq $0x48, %rdi movl 0x24(%rsp), %eax movl %eax, %esi callq 0x9620 movl 0x10(%rax), %eax movl %eax, 0x14(%rsp) movl 0x24(%rsp), %eax movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax cmpl 0x20(%rsp), %eax jae 0x9586 movq 0x8(%rsp), %rdi addq $0x48, %rdi movl 0x10(%rsp), %eax movl %eax, %esi callq 0x9620 movl 0x10(%rax), %eax cmpl 0x14(%rsp), %eax jae 0x9577 movq 0x8(%rsp), %rdi movl 0x10(%rsp), %eax movl %eax, 0x18(%rsp) addq $0x48, %rdi movl 0x10(%rsp), %eax movl %eax, %esi callq 0x9620 movl 0x10(%rax), %eax movl %eax, 0x14(%rsp) jmp 0x9579 movl 0x10(%rsp), %eax addl $0x1, %eax movl %eax, 0x10(%rsp) jmp 0x952d movl 0x18(%rsp), %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw (%rax,%rax)
_ZN5Cache21getReplacementBlockIdEjj: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov [rsp+38h+var_18], edx mov rax, [rsp+38h+var_10] mov [rsp+38h+var_30], rax mov eax, [rsp+38h+var_14] mov [rsp+38h+var_1C], eax loc_94C3: mov eax, [rsp+38h+var_1C] cmp eax, [rsp+38h+var_18] jnb short loc_9502 mov rdi, [rsp+38h+var_30] add rdi, 48h ; 'H' mov eax, [rsp+38h+var_1C] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) test byte ptr [rax], 1 jnz short loc_94F3 mov eax, [rsp+38h+var_1C] mov [rsp+38h+var_4], eax jmp loc_958E loc_94F3: jmp short $+2 loc_94F5: mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp short loc_94C3 loc_9502: mov rdi, [rsp+38h+var_30] mov eax, [rsp+38h+var_14] mov [rsp+38h+var_20], eax add rdi, 48h ; 'H' mov eax, [rsp+38h+var_14] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+10h] mov [rsp+38h+var_24], eax mov eax, [rsp+38h+var_14] mov [rsp+38h+var_28], eax loc_952D: mov eax, [rsp+38h+var_28] cmp eax, [rsp+38h+var_18] jnb short loc_9586 mov rdi, [rsp+38h+var_30] add rdi, 48h ; 'H' mov eax, [rsp+38h+var_28] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+10h] cmp eax, [rsp+38h+var_24] jnb short loc_9577 mov rdi, [rsp+38h+var_30] mov eax, [rsp+38h+var_28] mov [rsp+38h+var_20], eax add rdi, 48h ; 'H' mov eax, [rsp+38h+var_28] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+10h] mov [rsp+38h+var_24], eax loc_9577: jmp short $+2 loc_9579: mov eax, [rsp+38h+var_28] add eax, 1 mov [rsp+38h+var_28], eax jmp short loc_952D loc_9586: mov eax, [rsp+38h+var_20] mov [rsp+38h+var_4], eax loc_958E: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long Cache::getReplacementBlockId(Cache *this, unsigned int a2, unsigned int a3) { unsigned int j; // [rsp+10h] [rbp-28h] unsigned int v5; // [rsp+14h] [rbp-24h] unsigned int v6; // [rsp+18h] [rbp-20h] unsigned int i; // [rsp+1Ch] [rbp-1Ch] for ( i = a2; i < a3; ++i ) { if ( (*(_BYTE *)std::vector<Cache::Block>::operator[]((char *)this + 72, i) & 1) == 0 ) return i; } v6 = a2; v5 = *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, a2) + 16); for ( j = a2; j < a3; ++j ) { if ( *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, j) + 16) < v5 ) { v6 = j; v5 = *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, j) + 16); } } return v6; }
getReplacementBlockId: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],ESI MOV dword ptr [RSP + 0x20],EDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RAX MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x1c],EAX LAB_001094c3: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x20] JNC 0x00109502 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x1c] MOV ESI,EAX CALL 0x00109620 TEST byte ptr [RAX],0x1 JNZ 0x001094f3 MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x34],EAX JMP 0x0010958e LAB_001094f3: JMP 0x001094f5 LAB_001094f5: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001094c3 LAB_00109502: MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x18],EAX ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x24] MOV ESI,EAX CALL 0x00109620 MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RSP + 0x14],EAX MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x10],EAX LAB_0010952d: MOV EAX,dword ptr [RSP + 0x10] CMP EAX,dword ptr [RSP + 0x20] JNC 0x00109586 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x10] MOV ESI,EAX CALL 0x00109620 MOV EAX,dword ptr [RAX + 0x10] CMP EAX,dword ptr [RSP + 0x14] JNC 0x00109577 MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x18],EAX ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x10] MOV ESI,EAX CALL 0x00109620 MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RSP + 0x14],EAX LAB_00109577: JMP 0x00109579 LAB_00109579: MOV EAX,dword ptr [RSP + 0x10] ADD EAX,0x1 MOV dword ptr [RSP + 0x10],EAX JMP 0x0010952d LAB_00109586: MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x34],EAX LAB_0010958e: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
/* Cache::getReplacementBlockId(unsigned int, unsigned int) */ uint __thiscall Cache::getReplacementBlockId(Cache *this,uint param_1,uint param_2) { byte *pbVar1; long lVar2; uint local_28; uint local_24; uint local_20; uint local_1c; local_1c = param_1; while( true ) { if (param_2 <= local_1c) { lVar2 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)param_1); local_24 = *(uint *)(lVar2 + 0x10); local_20 = param_1; for (local_28 = param_1; local_28 < param_2; local_28 = local_28 + 1) { lVar2 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_28); if (*(uint *)(lVar2 + 0x10) < local_24) { local_20 = local_28; lVar2 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_28); local_24 = *(uint *)(lVar2 + 0x10); } } return local_20; } pbVar1 = (byte *)std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_1c); if ((*pbVar1 & 1) == 0) break; local_1c = local_1c + 1; } return local_1c; }
28,884
lunasvg::Bitmap::operator=(lunasvg::Bitmap const&)
dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp
Bitmap& Bitmap::operator=(const Bitmap& bitmap) { Bitmap(bitmap).swap(*this); return *this; }
O1
cpp
lunasvg::Bitmap::operator=(lunasvg::Bitmap const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsp, %r14 movq %r14, %rdi callq 0xb150 movq (%r14), %rax movq (%rbx), %rcx movq %rcx, (%r14) movq %rax, (%rbx) movq %r14, %rdi callq 0xb17c movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN7lunasvg6BitmapaSERKS0_: push r14 push rbx push rax mov rbx, rdi mov r14, rsp mov rdi, r14; this call _ZN7lunasvg6BitmapC2ERKS0_; lunasvg::Bitmap::Bitmap(lunasvg::Bitmap const&) mov rax, [r14] mov rcx, [rbx] mov [r14], rcx mov [rbx], rax mov rdi, r14; this call _ZN7lunasvg6BitmapD2Ev; lunasvg::Bitmap::~Bitmap() mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_QWORD * lunasvg::Bitmap::operator=(_QWORD *a1, const lunasvg::Bitmap *a2) { long long v2; // rax long long v3; // rax _QWORD v5[3]; // [rsp-8h] [rbp-18h] BYREF v5[0] = v2; lunasvg::Bitmap::Bitmap((lunasvg::Bitmap *)v5, a2); v3 = v5[0]; v5[0] = *a1; *a1 = v3; lunasvg::Bitmap::~Bitmap((lunasvg::Bitmap *)v5); return a1; }
operator=: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14,RSP MOV RDI,R14 CALL 0x0010b150 MOV RAX,qword ptr [R14] MOV RCX,qword ptr [RBX] MOV qword ptr [R14],RCX MOV qword ptr [RBX],RAX MOV RDI,R14 CALL 0x0010b17c MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* lunasvg::Bitmap::TEMPNAMEPLACEHOLDERVALUE(lunasvg::Bitmap const&) */ Bitmap * __thiscall lunasvg::Bitmap::operator=(Bitmap *this,Bitmap *param_1) { int8 uVar1; int8 in_RAX; int8 local_18; local_18 = in_RAX; Bitmap((Bitmap *)&local_18,param_1); uVar1 = *(int8 *)this; *(int8 *)this = local_18; local_18 = uVar1; ~Bitmap((Bitmap *)&local_18); return this; }
28,885
lunasvg::Bitmap::operator=(lunasvg::Bitmap const&)
dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp
Bitmap& Bitmap::operator=(const Bitmap& bitmap) { Bitmap(bitmap).swap(*this); return *this; }
O2
cpp
lunasvg::Bitmap::operator=(lunasvg::Bitmap const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsp, %r14 movq %r14, %rdi callq 0xac2c movq (%r14), %rax movq (%rbx), %rcx movq %rcx, (%r14) movq %rax, (%rbx) movq %r14, %rdi callq 0xac52 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN7lunasvg6BitmapaSERKS0_: push r14 push rbx push rax mov rbx, rdi mov r14, rsp mov rdi, r14; this call _ZN7lunasvg6BitmapC2ERKS0_; lunasvg::Bitmap::Bitmap(lunasvg::Bitmap const&) mov rax, [r14] mov rcx, [rbx] mov [r14], rcx mov [rbx], rax mov rdi, r14; this call _ZN7lunasvg6BitmapD2Ev; lunasvg::Bitmap::~Bitmap() mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_QWORD * lunasvg::Bitmap::operator=(_QWORD *a1, const lunasvg::Bitmap *a2) { long long v2; // rax long long v3; // rax _QWORD v5[3]; // [rsp-8h] [rbp-18h] BYREF v5[0] = v2; lunasvg::Bitmap::Bitmap((lunasvg::Bitmap *)v5, a2); v3 = v5[0]; v5[0] = *a1; *a1 = v3; lunasvg::Bitmap::~Bitmap((lunasvg::Bitmap *)v5); return a1; }
operator=: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14,RSP MOV RDI,R14 CALL 0x0010ac2c MOV RAX,qword ptr [R14] MOV RCX,qword ptr [RBX] MOV qword ptr [R14],RCX MOV qword ptr [RBX],RAX MOV RDI,R14 CALL 0x0010ac52 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* lunasvg::Bitmap::TEMPNAMEPLACEHOLDERVALUE(lunasvg::Bitmap const&) */ Bitmap * __thiscall lunasvg::Bitmap::operator=(Bitmap *this,Bitmap *param_1) { int8 uVar1; int8 in_RAX; int8 local_18; local_18 = in_RAX; Bitmap((Bitmap *)&local_18,param_1); uVar1 = *(int8 *)this; *(int8 *)this = local_18; local_18 = uVar1; ~Bitmap((Bitmap *)&local_18); return this; }
28,886
ImPlot3D::CreateContext()
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
ImPlot3DContext* CreateContext() { ImPlot3DContext* ctx = IM_NEW(ImPlot3DContext)(); if (GImPlot3D == nullptr) SetCurrentContext(ctx); InitializeContext(ctx); return ctx; }
O0
cpp
ImPlot3D::CreateContext(): subq $0x48, %rsp movl $0x2b0, %edi # imm = 0x2B0 movq %rdi, 0x10(%rsp) callq 0x4f2a80 movq 0x10(%rsp), %rdi movq %rax, %rsi movq %rsi, %rax movq %rax, 0x8(%rsp) callq 0xd87b0 movq 0x10(%rsp), %rdx movq %rax, %rdi movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) xorl %esi, %esi callq 0x126a0 movq 0x20(%rsp), %rdi callq 0xd87c0 jmp 0xc8350 movq 0x18(%rsp), %rax movq %rax, 0x40(%rsp) cmpq $0x0, 0x5c72d6(%rip) # 0x68f638 jne 0xc838f movq 0x40(%rsp), %rdi callq 0xc83b0 jmp 0xc838f movq 0x8(%rsp), %rsi movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) callq 0xd88e0 jmp 0xc83a3 movq 0x40(%rsp), %rdi callq 0xc83d0 movq 0x40(%rsp), %rax addq $0x48, %rsp retq movq 0x30(%rsp), %rdi callq 0x13540 nopl (%rax)
_ZN8ImPlot3D13CreateContextEv: sub rsp, 48h mov edi, offset qword_2B0; this mov [rsp+48h+var_38], rdi call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong) mov rdi, [rsp+48h+var_38] mov rsi, rax mov rax, rsi mov [rsp+48h+var_40], rax call _Znwm12ImNewWrapperPv; operator new(ulong,ImNewWrapper,void *) mov rdx, [rsp+48h+var_38] mov rdi, rax mov [rsp+48h+var_28], rdi mov rax, rdi mov [rsp+48h+var_30], rax xor esi, esi; ImPlot3DContext * call _memset mov rdi, [rsp+48h+var_28]; this call _ZN15ImPlot3DContextC2Ev; ImPlot3DContext::ImPlot3DContext(void) jmp short $+2 loc_C8350: mov rax, [rsp+48h+var_30] mov [rsp+48h+var_8], rax cmp cs:_ZN8ImPlot3D9GImPlot3DE, 0; ImPlot3D::GImPlot3D jnz short loc_C838F mov rdi, [rsp+48h+var_8] call _ZN8ImPlot3D17SetCurrentContextEP15ImPlot3DContext; ImPlot3D::SetCurrentContext(ImPlot3DContext *) jmp short loc_C838F mov rsi, [rsp+arg_0] mov rdi, [rsp+arg_10] mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax call _ZdlPv12ImNewWrapperS_; operator delete(void *,ImNewWrapper,void *) jmp short loc_C83A3 loc_C838F: mov rdi, [rsp+48h+var_8]; this call _ZN8ImPlot3D17InitializeContextEP15ImPlot3DContext; ImPlot3D::InitializeContext(ImPlot3DContext *) mov rax, [rsp+48h+var_8] add rsp, 48h retn loc_C83A3: mov rdi, [rsp+arg_28] call __Unwind_Resume
ImPlot3DContext * ImPlot3D::CreateContext(ImPlot3D *this, unsigned long long a2) { ImPlot3DContext *v3; // [rsp+18h] [rbp-30h] ImGui::MemAlloc((ImGui *)&qword_2B0, a2); v3 = (ImPlot3DContext *)operator new(&qword_2B0); memset(v3, 0LL, &qword_2B0); ImPlot3DContext::ImPlot3DContext(v3); if ( !ImPlot3D::GImPlot3D ) ImPlot3D::SetCurrentContext(v3, 0LL); ImPlot3D::InitializeContext(v3, 0LL); return v3; }
CreateContext: SUB RSP,0x48 MOV EDI,0x2b0 MOV qword ptr [RSP + 0x10],RDI CALL 0x005f2a80 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX MOV RAX,RSI MOV qword ptr [RSP + 0x8],RAX CALL 0x001d87b0 MOV RDX,qword ptr [RSP + 0x10] MOV RDI,RAX MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX XOR ESI,ESI CALL 0x001126a0 MOV RDI,qword ptr [RSP + 0x20] LAB_001c8349: CALL 0x001d87c0 LAB_001c834e: JMP 0x001c8350 LAB_001c8350: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [0x0078f638],0x0 JNZ 0x001c838f MOV RDI,qword ptr [RSP + 0x40] CALL 0x001c83b0 JMP 0x001c838f LAB_001c838f: MOV RDI,qword ptr [RSP + 0x40] CALL 0x001c83d0 MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
/* ImPlot3D::CreateContext() */ ImPlot3DContext * ImPlot3D::CreateContext(void) { ImPlot3DContext *this; ImGui::MemAlloc(0x2b0); this = (ImPlot3DContext *)operator_new(0x2b0); memset(this,0,0x2b0); /* try { // try from 001c8349 to 001c834d has its CatchHandler @ 001c8370 */ ImPlot3DContext::ImPlot3DContext(this); if (GImPlot3D == 0) { SetCurrentContext(this); } InitializeContext(this); return this; }
28,887
eth_get_block_roots
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
static inline c4_status_t eth_get_block_roots(proofer_ctx_t* ctx, json_t block, bytes32_t sig_root, bytes32_t data_root) { #ifdef PROOFER_CACHE beacon_head_t* cached = c4_beacon_cache_get_slot(ctx, block); if (cached) { memcpy(data_root, cached->root, 32); return C4_SUCCESS; } #endif if (strncmp(block.start, "\"latest\"", 8) == 0) return C4_SUCCESS; // latest - we do nothing since 2 empty root_hashes are returned, which will trigger head-requests else if (strncmp(block.start, "\"safe\"", 6) == 0) TRY_ASYNC(eth_get_final_hash(ctx, true, data_root)); else if (strncmp(block.start, "\"finalized\"", 12) == 0) TRY_ASYNC(eth_get_final_hash(ctx, false, data_root)); else if (block.type == JSON_TYPE_STRING && block.len == 68) // blockhash TRY_ASYNC(eth_get_by_hash(ctx, block, data_root)); else if (block.type == JSON_TYPE_STRING && block.len > 4 && block.start[1] == '0' && block.start[2] == 'x') // blocknumber TRY_ASYNC(eth_get_by_number(ctx, json_as_uint64(block), sig_root, data_root)); else THROW_ERROR("Invalid block!"); return C4_SUCCESS; }
O0
c
eth_get_block_roots: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq (%rax), %rdi leaq 0x477f2(%rip), %rsi # 0x528f8 movl $0x8, %edx callq 0x50f0 cmpl $0x0, %eax jne 0xb121 movl $0x0, -0x4(%rbp) jmp 0xb2c8 movq -0x38(%rbp), %rax movq (%rax), %rdi leaq 0x477d2(%rip), %rsi # 0x52901 movl $0x6, %edx callq 0x50f0 cmpl $0x0, %eax jne 0xb16d jmp 0xb140 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx movl $0x1, %esi callq 0xb970 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0xb166 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb2c8 jmp 0xb168 jmp 0xb2bf movq -0x38(%rbp), %rax movq (%rax), %rdi leaq 0x4778d(%rip), %rsi # 0x52908 movl $0xc, %edx callq 0x50f0 cmpl $0x0, %eax jne 0xb1b6 jmp 0xb18c movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx xorl %esi, %esi callq 0xb970 movl %eax, -0x28(%rbp) cmpl $0x0, -0x28(%rbp) je 0xb1af movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb2c8 jmp 0xb1b1 jmp 0xb2bd movq -0x38(%rbp), %rax cmpl $0x1, 0x10(%rax) jne 0xb212 movq -0x38(%rbp), %rax cmpq $0x44, 0x8(%rax) jne 0xb212 jmp 0xb1cd movq -0x38(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xbbc0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0xb20b movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb2c8 jmp 0xb20d jmp 0xb2bb movq -0x38(%rbp), %rax cmpl $0x1, 0x10(%rax) jne 0xb2a0 movq -0x38(%rbp), %rax cmpq $0x4, 0x8(%rax) jbe 0xb2a0 movq -0x38(%rbp), %rax movq (%rax), %rax movsbl 0x1(%rax), %eax cmpl $0x30, %eax jne 0xb2a0 movq -0x38(%rbp), %rax movq (%rax), %rax movsbl 0x2(%rax), %eax cmpl $0x78, %eax jne 0xb2a0 jmp 0xb24d movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, -0x40(%rbp) movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x20920 movq -0x40(%rbp), %rdi movq %rax, %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbc90 movl %eax, -0x30(%rbp) cmpl $0x0, -0x30(%rbp) je 0xb29c movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb2c8 jmp 0xb29e jmp 0xb2b9 movq -0x10(%rbp), %rdi addq $0x38, %rdi leaq 0x47665(%rip), %rsi # 0x52914 callq 0x22510 movl %eax, -0x4(%rbp) jmp 0xb2c8 jmp 0xb2bb jmp 0xb2bd jmp 0xb2bf jmp 0xb2c1 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
eth_get_block_roots: push rbp mov rbp, rsp sub rsp, 60h lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rax] lea rsi, aLatest; "\"latest\"" mov edx, 8 call _strncmp cmp eax, 0 jnz short loc_B121 mov [rbp+var_4], 0 jmp loc_B2C8 loc_B121: mov rax, [rbp+var_38] mov rdi, [rax] lea rsi, aSafe; "\"safe\"" mov edx, 6 call _strncmp cmp eax, 0 jnz short loc_B16D jmp short $+2 loc_B140: mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] mov esi, 1 call eth_get_final_hash mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_B166 mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp loc_B2C8 loc_B166: jmp short $+2 loc_B168: jmp loc_B2BF loc_B16D: mov rax, [rbp+var_38] mov rdi, [rax] lea rsi, aFinalized; "\"finalized\"" mov edx, 0Ch call _strncmp cmp eax, 0 jnz short loc_B1B6 jmp short $+2 loc_B18C: mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] xor esi, esi call eth_get_final_hash mov [rbp+var_28], eax cmp [rbp+var_28], 0 jz short loc_B1AF mov eax, [rbp+var_28] mov [rbp+var_4], eax jmp loc_B2C8 loc_B1AF: jmp short $+2 loc_B1B1: jmp loc_B2BD loc_B1B6: mov rax, [rbp+var_38] cmp dword ptr [rax+10h], 1 jnz short loc_B212 mov rax, [rbp+var_38] cmp qword ptr [rax+8], 44h ; 'D' jnz short loc_B212 jmp short $+2 loc_B1CD: mov rax, [rbp+var_38] mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rax] mov [rsp+60h+var_60], rcx mov rcx, [rax+8] mov [rsp+60h+var_58], rcx mov rax, [rax+10h] mov [rsp+60h+var_50], rax call eth_get_by_hash mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_B20B mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp loc_B2C8 loc_B20B: jmp short $+2 loc_B20D: jmp loc_B2BB loc_B212: mov rax, [rbp+var_38] cmp dword ptr [rax+10h], 1 jnz loc_B2A0 mov rax, [rbp+var_38] cmp qword ptr [rax+8], 4 jbe short loc_B2A0 mov rax, [rbp+var_38] mov rax, [rax] movsx eax, byte ptr [rax+1] cmp eax, 30h ; '0' jnz short loc_B2A0 mov rax, [rbp+var_38] mov rax, [rax] movsx eax, byte ptr [rax+2] cmp eax, 78h ; 'x' jnz short loc_B2A0 jmp short $+2 loc_B24D: mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov [rbp+var_40], rcx mov rcx, [rax] mov [rsp+60h+var_60], rcx mov rcx, [rax+8] mov [rsp+60h+var_58], rcx mov rax, [rax+10h] mov [rsp+60h+var_50], rax call json_as_uint64 mov rdi, [rbp+var_40] mov rsi, rax mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call eth_get_by_number mov [rbp+var_30], eax cmp [rbp+var_30], 0 jz short loc_B29C mov eax, [rbp+var_30] mov [rbp+var_4], eax jmp short loc_B2C8 loc_B29C: jmp short $+2 loc_B29E: jmp short loc_B2B9 loc_B2A0: mov rdi, [rbp+var_10] add rdi, 38h ; '8' lea rsi, aInvalidBlock; "Invalid block!" call c4_state_add_error mov [rbp+var_4], eax jmp short loc_B2C8 loc_B2B9: jmp short $+2 loc_B2BB: jmp short $+2 loc_B2BD: jmp short $+2 loc_B2BF: jmp short $+2 loc_B2C1: mov [rbp+var_4], 0 loc_B2C8: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long eth_get_block_roots( long long a1, long long a2, long long a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, unsigned long long a8, long long a9) { int v9; // edx int v10; // r8d int v11; // r9d long long v12; // rax unsigned int v14; // [rsp+30h] [rbp-30h] unsigned int v15; // [rsp+34h] [rbp-2Ch] unsigned int v16; // [rsp+38h] [rbp-28h] unsigned int final_hash; // [rsp+3Ch] [rbp-24h] if ( (unsigned int)strncmp(a7, "\"latest\"", 8LL) ) { if ( !(unsigned int)strncmp(a7, "\"safe\"", 6LL) ) { final_hash = eth_get_final_hash(a1, 1LL, a3); if ( final_hash ) return final_hash; } else if ( !(unsigned int)strncmp(a7, "\"finalized\"", 12LL) ) { v16 = eth_get_final_hash(a1, 0LL, a3); if ( v16 ) return v16; } else if ( (_DWORD)a9 == 1 && a8 == 68 ) { v15 = eth_get_by_hash(a1, a3, v9, 68, v10, v11, a7, 68LL, a9); if ( v15 ) return v15; } else { if ( (_DWORD)a9 != 1 || a8 <= 4 || *(_BYTE *)(a7 + 1) != 48 || *(_BYTE *)(a7 + 2) != 120 ) return (unsigned int)c4_state_add_error(a1 + 56, "Invalid block!"); v12 = json_as_uint64(a7, (unsigned int)"\"finalized\"", v9, a8, v10, v11, a7, a8, a9); v14 = eth_get_by_number(a1, v12, a2, a3); if ( v14 ) return v14; } return 0; } return 0; }
eth_get_block_roots: PUSH RBP MOV RBP,RSP SUB RSP,0x60 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RAX] LEA RSI,[0x1528f8] MOV EDX,0x8 CALL 0x001050f0 CMP EAX,0x0 JNZ 0x0010b121 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010b2c8 LAB_0010b121: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] LEA RSI,[0x152901] MOV EDX,0x6 CALL 0x001050f0 CMP EAX,0x0 JNZ 0x0010b16d JMP 0x0010b140 LAB_0010b140: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] MOV ESI,0x1 CALL 0x0010b970 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0010b166 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010b2c8 LAB_0010b166: JMP 0x0010b168 LAB_0010b168: JMP 0x0010b2bf LAB_0010b16d: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] LEA RSI,[0x152908] MOV EDX,0xc CALL 0x001050f0 CMP EAX,0x0 JNZ 0x0010b1b6 JMP 0x0010b18c LAB_0010b18c: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x0010b970 MOV dword ptr [RBP + -0x28],EAX CMP dword ptr [RBP + -0x28],0x0 JZ 0x0010b1af MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010b2c8 LAB_0010b1af: JMP 0x0010b1b1 LAB_0010b1b1: JMP 0x0010b2bd LAB_0010b1b6: MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x10],0x1 JNZ 0x0010b212 MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + 0x8],0x44 JNZ 0x0010b212 JMP 0x0010b1cd LAB_0010b1cd: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0010bbc0 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0010b20b MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010b2c8 LAB_0010b20b: JMP 0x0010b20d LAB_0010b20d: JMP 0x0010b2bb LAB_0010b212: MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x10],0x1 JNZ 0x0010b2a0 MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + 0x8],0x4 JBE 0x0010b2a0 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x30 JNZ 0x0010b2a0 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX + 0x2] CMP EAX,0x78 JNZ 0x0010b2a0 JMP 0x0010b24d LAB_0010b24d: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00120920 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0010bc90 MOV dword ptr [RBP + -0x30],EAX CMP dword ptr [RBP + -0x30],0x0 JZ 0x0010b29c MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010b2c8 LAB_0010b29c: JMP 0x0010b29e LAB_0010b29e: JMP 0x0010b2b9 LAB_0010b2a0: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 LEA RSI,[0x152914] CALL 0x00122510 MOV dword ptr [RBP + -0x4],EAX JMP 0x0010b2c8 LAB_0010b2b9: JMP 0x0010b2bb LAB_0010b2bb: JMP 0x0010b2bd LAB_0010b2bd: JMP 0x0010b2bf LAB_0010b2bf: JMP 0x0010b2c1 LAB_0010b2c1: MOV dword ptr [RBP + -0x4],0x0 LAB_0010b2c8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ int eth_get_block_roots(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,char *param_7,ulong param_8,int param_9 ) { int iVar1; int8 uVar2; int8 uVar3; int local_c; iVar1 = strncmp(param_7,"\"latest\"",8); if (iVar1 == 0) { local_c = 0; } else { iVar1 = strncmp(param_7,"\"safe\"",6); if (iVar1 == 0) { local_c = eth_get_final_hash(param_1,1,param_3); } else { iVar1 = strncmp(param_7,"\"finalized\"",0xc); if (iVar1 == 0) { local_c = eth_get_final_hash(param_1,0,param_3); } else if ((param_9 == 1) && (param_8 == 0x44)) { local_c = eth_get_by_hash(param_1,param_3); } else { if ((param_9 != 1) || (((param_8 < 5 || (param_7[1] != '0')) || (param_7[2] != 'x')))) { iVar1 = c4_state_add_error(param_1 + 0x38,"Invalid block!"); return iVar1; } uVar3 = 1; uVar2 = json_as_uint64(); local_c = eth_get_by_number(param_1,uVar2,param_2,param_3,param_5,param_6,param_7,param_8, uVar3); } } if (local_c == 0) { local_c = 0; } } return local_c; }
28,888
spdlog::details::circular_q<spdlog::details::async_msg>::push_back(spdlog::details::async_msg&&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/circular_q.h
void push_back(T &&item) { if (max_items_ > 0) { v_[tail_] = std::move(item); tail_ = (tail_ + 1) % max_items_; if (tail_ == head_) // overrun last item if full { head_ = (head_ + 1) % max_items_; ++overrun_counter_; } } }
O0
c
spdlog::details::circular_q<spdlog::details::async_msg>::push_back(spdlog::details::async_msg&&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) cmpq $0x0, (%rax) jbe 0xc5db3 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x8(%rsp) movq %rax, %rdi addq $0x20, %rdi movq 0x10(%rax), %rsi callq 0xc5e30 movq 0x8(%rsp), %rsi movq %rax, %rdi callq 0xc5e50 movq 0x10(%rsp), %rcx movq 0x10(%rcx), %rax addq $0x1, %rax xorl %edx, %edx divq (%rcx) movq %rdx, 0x10(%rcx) movq 0x10(%rcx), %rax cmpq 0x8(%rcx), %rax jne 0xc5db1 movq 0x10(%rsp), %rcx movq 0x8(%rcx), %rax addq $0x1, %rax xorl %edx, %edx divq (%rcx) movq 0x10(%rsp), %rax movq %rdx, 0x8(%rax) movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0xc5db3 addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN6spdlog7details10circular_qINS0_9async_msgEE9push_backEOS2_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_18], rax cmp qword ptr [rax], 0 jbe short loc_C5DB3 mov rax, [rsp+28h+var_18] mov rcx, [rsp+28h+var_10] mov [rsp+28h+var_20], rcx mov rdi, rax add rdi, 20h ; ' ' mov rsi, [rax+10h] call _ZNSt6vectorIN6spdlog7details9async_msgESaIS2_EEixEm; std::vector<spdlog::details::async_msg>::operator[](ulong) mov rsi, [rsp+28h+var_20] mov rdi, rax call _ZN6spdlog7details9async_msgaSEOS1_; spdlog::details::async_msg::operator=(spdlog::details::async_msg&&) mov rcx, [rsp+28h+var_18] mov rax, [rcx+10h] add rax, 1 xor edx, edx div qword ptr [rcx] mov [rcx+10h], rdx mov rax, [rcx+10h] cmp rax, [rcx+8] jnz short loc_C5DB1 mov rcx, [rsp+28h+var_18] mov rax, [rcx+8] add rax, 1 xor edx, edx div qword ptr [rcx] mov rax, [rsp+28h+var_18] mov [rax+8], rdx mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx loc_C5DB1: jmp short $+2 loc_C5DB3: add rsp, 28h retn
_QWORD * spdlog::details::circular_q<spdlog::details::async_msg>::push_back(_QWORD *a1, long long a2) { _QWORD *result; // rax long long v3; // rax result = a1; if ( *a1 ) { v3 = std::vector<spdlog::details::async_msg>::operator[](a1 + 4, a1[2]); spdlog::details::async_msg::operator=(v3, a2); a1[2] = (unsigned long long)(a1[2] + 1LL) % *a1; result = (_QWORD *)a1[2]; if ( result == (_QWORD *)a1[1] ) { result = a1; a1[1] = (unsigned long long)(a1[1] + 1LL) % *a1; ++a1[3]; } } return result; }
push_back: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RAX],0x0 JBE 0x001c5db3 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RCX MOV RDI,RAX ADD RDI,0x20 MOV RSI,qword ptr [RAX + 0x10] CALL 0x001c5e30 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RAX CALL 0x001c5e50 MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RCX + 0x10] ADD RAX,0x1 XOR EDX,EDX DIV qword ptr [RCX] MOV qword ptr [RCX + 0x10],RDX MOV RAX,qword ptr [RCX + 0x10] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x001c5db1 MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RCX + 0x8] ADD RAX,0x1 XOR EDX,EDX DIV qword ptr [RCX] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX LAB_001c5db1: JMP 0x001c5db3 LAB_001c5db3: ADD RSP,0x28 RET
/* spdlog::details::circular_q<spdlog::details::async_msg>::push_back(spdlog::details::async_msg&&) */ void __thiscall spdlog::details::circular_q<spdlog::details::async_msg>::push_back (circular_q<spdlog::details::async_msg> *this,async_msg *param_1) { async_msg *this_00; if (*(long *)this != 0) { this_00 = (async_msg *) std::vector<spdlog::details::async_msg,std::allocator<spdlog::details::async_msg>>:: operator[]((vector<spdlog::details::async_msg,std::allocator<spdlog::details::async_msg>> *)(this + 0x20),*(ulong *)(this + 0x10)); async_msg::operator=(this_00,param_1); *(ulong *)(this + 0x10) = (*(long *)(this + 0x10) + 1U) % *(ulong *)this; if (*(long *)(this + 0x10) == *(long *)(this + 8)) { *(ulong *)(this + 8) = (*(long *)(this + 8) + 1U) % *(ulong *)this; *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } } return; }
28,889
httplib::Request::is_multipart_form_data() const
nickolajgrishuk[P]metricz-cpp/build_O3/_deps/httplib-src/httplib.h
inline bool Request::is_multipart_form_data() const { const auto &content_type = get_header_value("Content-Type"); return !content_type.rfind("multipart/form-data", 0); }
O3
c
httplib::Request::is_multipart_form_data() const: pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x7048(%rip), %rsi # 0x2de50 leaq 0x704d(%rip), %rdx # 0x2de5c leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x10898 addq $0x40, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x1dbe0 cmpq %rdx, %rax je 0x26e36 movq 0x40(%rax), %rsi jmp 0x26e3d leaq 0x75d7(%rip), %rsi # 0x2e414 leaq 0x30(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x8210 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x26e5b callq 0x8520 leaq 0x7c65(%rip), %rsi # 0x2eac7 leaq 0x30(%rsp), %r14 movl $0x13, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x8760 movq %rax, %rbx movq (%r14), %rdi leaq 0x40(%rsp), %rax cmpq %rax, %rdi je 0x26e8b callq 0x8520 testq %rbx, %rbx sete %al addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x26ead callq 0x8520 movq %rbx, %rdi callq 0x8980
_ZNK7httplib7Request22is_multipart_form_dataEv: push r15 push r14 push rbx sub rsp, 50h mov rbx, rdi lea r15, [rsp+68h+var_48] mov [r15-10h], r15 lea rsi, aContentType; "Content-Type" lea rdx, aContentType+0Ch; "" lea r14, [rsp+68h+var_58] 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) add rbx, 40h ; '@' mov rdi, rbx mov rsi, r14 call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN7httplib6detail2ciESaIS8_EE11equal_rangeERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::equal_range(std::string const&) cmp rax, rdx jz short loc_26E36 mov rsi, [rax+40h] jmp short loc_26E3D loc_26E36: lea rsi, a0+5; "" loc_26E3D: lea rdi, [rsp+68h+var_38] lea rdx, [rsp+68h+var_59] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) mov rdi, [rsp+68h+var_58]; void * cmp rdi, r15 jz short loc_26E5B call __ZdlPv; operator delete(void *) loc_26E5B: lea rsi, aMultipartFormD; "multipart/form-data" lea r14, [rsp+68h+var_38] mov ecx, 13h mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEPKcmm; std::string::rfind(char const*,ulong,ulong) mov rbx, rax mov rdi, [r14]; void * lea rax, [rsp+68h+var_28] cmp rdi, rax jz short loc_26E8B call __ZdlPv; operator delete(void *) loc_26E8B: test rbx, rbx setz al add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_8]; void * cmp rdi, r15 jz short loc_26EAD call __ZdlPv; operator delete(void *) loc_26EAD: mov rdi, rbx call __Unwind_Resume
bool httplib::Request::is_multipart_form_data(httplib::Request *this) { long long v1; // rax long long v2; // rdx char *v3; // rsi long long v4; // rbx char v6; // [rsp+Fh] [rbp-59h] BYREF void *v7[2]; // [rsp+10h] [rbp-58h] BYREF _BYTE v8[16]; // [rsp+20h] [rbp-48h] BYREF void *v9[2]; // [rsp+30h] [rbp-38h] BYREF char v10; // [rsp+40h] [rbp-28h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "Content-Type", (long long)""); v1 = std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::equal_range( (long long)this + 64, (long long)v7); if ( v1 == v2 ) v3 = ""; else v3 = *(char **)(v1 + 64); std::string::basic_string(v9, v3, &v6); if ( v7[0] != v8 ) operator delete(v7[0]); v4 = std::string::rfind(v9, "multipart/form-data", 0LL, 19LL); if ( v9[0] != &v10 ) operator delete(v9[0]); return v4 == 0; }
is_multipart_form_data: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDI LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x12de50] LEA RDX,[0x12de5c] LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x00110898 ADD RBX,0x40 LAB_00126e20: MOV RDI,RBX MOV RSI,R14 CALL 0x0011dbe0 CMP RAX,RDX JZ 0x00126e36 MOV RSI,qword ptr [RAX + 0x40] JMP 0x00126e3d LAB_00126e36: LEA RSI,[0x12e414] LAB_00126e3d: LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0xf] CALL 0x00108210 LAB_00126e4c: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x00126e5b CALL 0x00108520 LAB_00126e5b: LEA RSI,[0x12eac7] LEA R14,[RSP + 0x30] MOV ECX,0x13 MOV RDI,R14 XOR EDX,EDX CALL 0x00108760 MOV RBX,RAX MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x40] CMP RDI,RAX JZ 0x00126e8b CALL 0x00108520 LAB_00126e8b: TEST RBX,RBX SETZ AL ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* httplib::Request::is_multipart_form_data() const */ bool __thiscall httplib::Request::is_multipart_form_data(Request *this) { long lVar1; char *pcVar2; int1 auVar3 [16]; allocator local_59; int1 *local_58 [2]; int1 local_48 [16]; int1 *local_38 [2]; int1 local_28 [16]; local_58[0] = local_48; std::__cxx11::string::_M_construct<char_const*>((string *)local_58,"Content-Type",""); /* try { // try from 00126e20 to 00126e4b has its CatchHandler @ 00126e9b */ auVar3 = std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::equal_range((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 0x40),(string *)local_58); if (auVar3._0_8_ == auVar3._8_8_) { pcVar2 = ""; } else { pcVar2 = *(char **)(auVar3._0_8_ + 0x40); } std::__cxx11::string::string((string *)local_38,pcVar2,&local_59); if (local_58[0] != local_48) { operator_delete(local_58[0]); } lVar1 = std::__cxx11::string::rfind((char *)local_38,0x12eac7,0); if (local_38[0] != local_28) { operator_delete(local_38[0]); } return lVar1 == 0; }
28,890
Catch::replaceInPlace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, 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&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) { bool replaced = false; std::size_t i = str.find( replaceThis ); while( i != std::string::npos ) { replaced = true; str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() ); if( i < str.size()-withThis.size() ) i = str.find( replaceThis, i+withThis.size() ); else i = std::string::npos; } return replaced; }
O3
cpp
Catch::replaceInPlace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, 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 %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rsi), %rsi movq 0x8(%r14), %rcx xorl %edx, %edx callq 0x868e2 movq %rax, 0x40(%rsp) cmpq $-0x1, %rax je 0x6126c leaq 0x30(%rsp), %r13 movq 0x40(%rsp), %r12 movq %r13, %rbp leaq 0x68(%rsp), %r13 movq %r13, %rdi movq %r15, %rsi xorl %edx, %edx movq %r12, %rcx callq 0x77522 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r13, %rdi callq 0x82008 movq %rbp, %r13 movq %rbp, 0x20(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x610e3 movups (%rcx), %xmm0 movups %xmm0, (%r13) jmp 0x610f0 movq %rdx, 0x20(%rsp) movq (%rcx), %rdx movq %rdx, 0x30(%rsp) movq 0x8(%rax), %rdx movq %rdx, 0x28(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%r14), %rdx addq %r12, %rdx leaq 0x48(%rsp), %rdi movq %r15, %rsi movq $-0x1, %rcx callq 0x77522 movq 0x20(%rsp), %rcx movl $0xf, %edi cmpq %r13, %rcx je 0x61137 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %r8 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax cmpq %rdi, %rax jbe 0x61168 movl $0xf, %edi leaq 0x58(%rsp), %r9 cmpq %r9, %rsi je 0x61163 movq 0x58(%rsp), %rdi cmpq %rdi, %rax jbe 0x61174 leaq 0x20(%rsp), %rdi callq 0x82008 jmp 0x61182 leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x8064e leaq 0x10(%rsp), %rsi movq %rsi, (%rsp) movq (%rax), %rdx leaq 0x10(%rax), %rcx cmpq %rcx, %rdx jne 0x6119f movups (%rcx), %xmm0 movups %xmm0, (%rsi) jmp 0x611ab movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x8(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) movq %r15, %rdi movq %rsp, %rsi callq 0x1816c movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x611ee movq 0x10(%rsp), %rsi incq %rsi callq 0x17150 movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rax cmpq %rax, %rdi je 0x6120a movq 0x58(%rsp), %rsi incq %rsi callq 0x17150 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x61221 movq 0x30(%rsp), %rsi incq %rsi callq 0x17150 movq 0x68(%rsp), %rdi leaq 0x78(%rsp), %rax cmpq %rax, %rdi je 0x6123d movq 0x78(%rsp), %rsi incq %rsi callq 0x17150 movq 0x8(%r15), %rax movq 0x8(%rbx), %rdx subq %rdx, %rax cmpq %rax, %r12 jae 0x6126c addq %r12, %rdx movq (%r14), %rsi movq 0x8(%r14), %rcx movq %r15, %rdi callq 0x868e2 movq %rax, %r12 cmpq $-0x1, %rax jne 0x6109b cmpq $-0x1, 0x40(%rsp) setne %al addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rax cmpq %rax, %rdi je 0x612ab movq 0x58(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x612ab movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x612c7 movq 0x30(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x612c7 movq %rax, %rbx movq 0x68(%rsp), %rdi leaq 0x78(%rsp), %rax cmpq %rax, %rdi je 0x612e3 movq 0x78(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, %rdi callq 0x17740
_ZN5Catch14replaceInPlaceERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S8_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r14, rsi mov r15, rdi mov rsi, [rsi] mov rcx, [r14+8] xor edx, edx call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov [rsp+0B8h+var_78], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_6126C lea r13, [rsp+0B8h+var_88] mov r12, [rsp+0B8h+var_78] loc_6109B: mov rbp, r13 lea r13, [rsp+0B8h+var_50] mov rdi, r13 mov rsi, r15 xor edx, edx mov rcx, r12 call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov r13, rbp mov [rsp+0B8h+var_98], rbp mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_610E3 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 jmp short loc_610F0 loc_610E3: mov [rsp+0B8h+var_98], rdx mov rdx, [rcx] mov [rsp+0B8h+var_88], rdx loc_610F0: mov rdx, [rax+8] mov [rsp+0B8h+var_90], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdx, [r14+8] add rdx, r12 lea rdi, [rsp+0B8h+var_70] mov rsi, r15 mov rcx, 0FFFFFFFFFFFFFFFFh call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rcx, [rsp+0B8h+var_98] mov edi, 0Fh cmp rcx, r13 jz short loc_61137 mov rdi, [rsp+0B8h+var_88] loc_61137: mov r8, [rsp+0B8h+var_90] mov rsi, [rsp+0B8h+var_70] mov rdx, [rsp+0B8h+var_68] lea rax, [rdx+r8] cmp rax, rdi jbe short loc_61168 mov edi, 0Fh lea r9, [rsp+0B8h+var_60] cmp rsi, r9 jz short loc_61163 mov rdi, [rsp+0B8h+var_60] loc_61163: cmp rax, rdi jbe short loc_61174 loc_61168: lea rdi, [rsp+0B8h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_61182 loc_61174: lea rdi, [rsp+0B8h+var_70] xor esi, esi xor edx, edx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_61182: lea rsi, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_B8], rsi mov rdx, [rax] lea rcx, [rax+10h] cmp rdx, rcx jnz short loc_6119F movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi], xmm0 jmp short loc_611AB loc_6119F: mov [rsp+0B8h+var_B8], rdx mov rdx, [rcx] mov [rsp+0B8h+var_A8], rdx loc_611AB: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0B8h+var_B0], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rdi, r15 mov rsi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+0B8h+var_B8]; void * lea rax, [rsp+0B8h+var_A8] cmp rdi, rax jz short loc_611EE mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_611EE: mov rdi, [rsp+0B8h+var_70]; void * lea rax, [rsp+0B8h+var_60] cmp rdi, rax jz short loc_6120A mov rsi, [rsp+0B8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6120A: mov rdi, [rsp+0B8h+var_98]; void * cmp rdi, r13 jz short loc_61221 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61221: mov rdi, [rsp+0B8h+var_50]; void * lea rax, [rsp+0B8h+var_40] cmp rdi, rax jz short loc_6123D mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6123D: mov rax, [r15+8] mov rdx, [rbx+8] sub rax, rdx cmp r12, rax jnb short loc_6126C add rdx, r12 mov rsi, [r14] mov rcx, [r14+8] mov rdi, r15 call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r12, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_6109B loc_6126C: cmp [rsp+0B8h+var_78], 0FFFFFFFFFFFFFFFFh setnz al add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_40]; void * lea rax, [rsp+arg_50] cmp rdi, rax jz short loc_612AB mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_612AB mov rbx, rax loc_612AB: mov rdi, [rsp+arg_18]; void * cmp rdi, rbp jz short loc_612C7 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_612C7 mov rbx, rax loc_612C7: mov rdi, [rsp+arg_60]; void * lea rax, [rsp+arg_70] cmp rdi, rax jz short loc_612E3 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_612E3: mov rdi, rbx call __Unwind_Resume
bool Catch::replaceInPlace(_QWORD *a1, _QWORD *a2, _QWORD *a3) { unsigned long long i; // r12 long long v6; // rax __int128 *v7; // rcx unsigned long long v8; // rdi unsigned long long v9; // rdi void **v10; // rax __int128 *v11; // rcx long long v12; // rdx void *v14[2]; // [rsp+0h] [rbp-B8h] BYREF __int128 v15; // [rsp+10h] [rbp-A8h] BYREF void *v16; // [rsp+20h] [rbp-98h] BYREF long long v17; // [rsp+28h] [rbp-90h] __int128 v18; // [rsp+30h] [rbp-88h] BYREF long long v19; // [rsp+40h] [rbp-78h] void *v20; // [rsp+48h] [rbp-70h] BYREF long long v21; // [rsp+50h] [rbp-68h] _QWORD v22[2]; // [rsp+58h] [rbp-60h] BYREF void *v23[2]; // [rsp+68h] [rbp-50h] BYREF long long v24; // [rsp+78h] [rbp-40h] BYREF v19 = std::string::find(a1, *a2, 0LL, a2[1]); if ( v19 != -1 ) { for ( i = v19; i != -1LL; i = std::string::find(a1, *a2, i + v12, a2[1]) ) { std::string::substr(v23, a1, 0LL, i); v6 = std::string::_M_append(v23, *a3, a3[1]); v16 = &v18; v7 = (__int128 *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { v18 = *v7; } else { v16 = *(void **)v6; *(_QWORD *)&v18 = *(_QWORD *)v7; } v17 = *(_QWORD *)(v6 + 8); *(_QWORD *)v6 = v7; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; std::string::substr(&v20, a1, i + a2[1], -1LL); v8 = 15LL; if ( v16 != &v18 ) v8 = v18; if ( v21 + v17 <= v8 ) goto LABEL_12; v9 = 15LL; if ( v20 != v22 ) v9 = v22[0]; if ( v21 + v17 <= v9 ) v10 = (void **)std::string::replace(&v20, 0LL, 0LL, v16, v17); else LABEL_12: v10 = (void **)std::string::_M_append(&v16, v20, v21); v14[0] = &v15; v11 = (__int128 *)(v10 + 2); if ( *v10 == v10 + 2 ) { v15 = *v11; } else { v14[0] = *v10; *(_QWORD *)&v15 = *(_QWORD *)v11; } v14[1] = v10[1]; *v10 = v11; v10[1] = 0LL; *(_BYTE *)v11 = 0; std::string::operator=(a1, (long long)v14); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); if ( v20 != v22 ) operator delete(v20, v22[0] + 1LL); if ( v16 != &v18 ) operator delete(v16, v18 + 1); if ( v23[0] != &v24 ) operator delete(v23[0], v24 + 1); v12 = a3[1]; if ( i >= a1[1] - v12 ) break; } } return v19 != -1; }
replaceInPlace: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RSI,qword ptr [RSI] MOV RCX,qword ptr [R14 + 0x8] XOR EDX,EDX CALL 0x001868e2 MOV qword ptr [RSP + 0x40],RAX CMP RAX,-0x1 JZ 0x0016126c LEA R13,[RSP + 0x30] MOV R12,qword ptr [RSP + 0x40] LAB_0016109b: MOV RBP,R13 LEA R13,[RSP + 0x68] MOV RDI,R13 MOV RSI,R15 XOR EDX,EDX MOV RCX,R12 CALL 0x00177522 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] LAB_001610ba: MOV RDI,R13 CALL 0x00182008 MOV R13,RBP MOV qword ptr [RSP + 0x20],RBP MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JNZ 0x001610e3 MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 JMP 0x001610f0 LAB_001610e3: MOV qword ptr [RSP + 0x20],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x30],RDX LAB_001610f0: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDX,qword ptr [R14 + 0x8] ADD RDX,R12 LAB_0016110f: LEA RDI,[RSP + 0x48] MOV RSI,R15 MOV RCX,-0x1 CALL 0x00177522 MOV RCX,qword ptr [RSP + 0x20] MOV EDI,0xf CMP RCX,R13 JZ 0x00161137 MOV RDI,qword ptr [RSP + 0x30] LAB_00161137: MOV R8,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RAX,[RDX + R8*0x1] CMP RAX,RDI JBE 0x00161168 MOV EDI,0xf LEA R9,[RSP + 0x58] CMP RSI,R9 JZ 0x00161163 MOV RDI,qword ptr [RSP + 0x58] LAB_00161163: CMP RAX,RDI JBE 0x00161174 LAB_00161168: LEA RDI,[RSP + 0x20] CALL 0x00182008 JMP 0x00161182 LAB_00161174: LEA RDI,[RSP + 0x48] XOR ESI,ESI XOR EDX,EDX CALL 0x0018064e LAB_00161182: LEA RSI,[RSP + 0x10] MOV qword ptr [RSP],RSI MOV RDX,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RDX,RCX JNZ 0x0016119f MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI],XMM0 JMP 0x001611ab LAB_0016119f: MOV qword ptr [RSP],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RDX LAB_001611ab: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 MOV RDI,R15 MOV RSI,RSP CALL 0x0011816c MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001611ee MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00117150 LAB_001611ee: MOV RDI,qword ptr [RSP + 0x48] LEA RAX,[RSP + 0x58] CMP RDI,RAX JZ 0x0016120a MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00117150 LAB_0016120a: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x00161221 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00117150 LAB_00161221: MOV RDI,qword ptr [RSP + 0x68] LEA RAX,[RSP + 0x78] CMP RDI,RAX JZ 0x0016123d MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00117150 LAB_0016123d: MOV RAX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [RBX + 0x8] SUB RAX,RDX CMP R12,RAX JNC 0x0016126c ADD RDX,R12 MOV RSI,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x001868e2 MOV R12,RAX CMP RAX,-0x1 JNZ 0x0016109b LAB_0016126c: CMP qword ptr [RSP + 0x40],-0x1 SETNZ AL ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Catch::replaceInPlace(std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string const&) */ bool Catch::replaceInPlace(string *param_1,string *param_2,string *param_3) { ulong uVar1; long *plVar2; int8 *puVar3; ulong *puVar4; ulong uVar5; long *local_b8; int8 local_b0; long local_a8; int8 uStack_a0; ulong *local_98; ulong local_90; ulong local_88; long lStack_80; ulong local_78; ulong *local_70; ulong local_68; ulong local_60 [2]; long *local_50 [2]; long local_40 [2]; uVar1 = std::__cxx11::string::find(param_1,*(char **)param_2,0,*(ulong *)(param_2 + 8)); local_78 = uVar1; if (uVar1 != 0xffffffffffffffff) { do { std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 001610ba to 001610c1 has its CatchHandler @ 001612c4 */ plVar2 = (long *)std::__cxx11::string::_M_append ((string *)local_50,*(char **)param_3,*(ulong *)(param_3 + 8)); local_98 = (ulong *)*plVar2; puVar4 = (ulong *)(plVar2 + 2); if (local_98 == puVar4) { local_88 = *puVar4; lStack_80 = plVar2[3]; local_98 = &local_88; } else { local_88 = *puVar4; } local_90 = plVar2[1]; *plVar2 = (long)puVar4; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; /* try { // try from 0016110f to 00161122 has its CatchHandler @ 001612a8 */ std::__cxx11::string::substr((ulong)&local_70,(ulong)param_1); uVar5 = 0xf; if (local_98 != &local_88) { uVar5 = local_88; } if (uVar5 < local_68 + local_90) { uVar5 = 0xf; if (local_70 != local_60) { uVar5 = local_60[0]; } if (uVar5 < local_68 + local_90) goto LAB_00161168; puVar3 = (int8 *) std::__cxx11::string::replace((string *)&local_70,0,0,(char *)local_98,local_90); } else { LAB_00161168: /* try { // try from 00161168 to 00161181 has its CatchHandler @ 00161287 */ puVar3 = (int8 *) std::__cxx11::string::_M_append((string *)&local_98,(char *)local_70,local_68); } local_b8 = (long *)*puVar3; plVar2 = puVar3 + 2; if (local_b8 == plVar2) { local_a8 = *plVar2; uStack_a0 = puVar3[3]; local_b8 = &local_a8; } else { local_a8 = *plVar2; } local_b0 = puVar3[1]; *puVar3 = plVar2; puVar3[1] = 0; *(int1 *)plVar2 = 0; std::__cxx11::string::operator=(param_1,(string *)&local_b8); if (local_b8 != &local_a8) { operator_delete(local_b8,local_a8 + 1); } if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } if (local_98 != &local_88) { operator_delete(local_98,local_88 + 1); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if ((ulong)(*(long *)(param_1 + 8) - *(long *)(param_3 + 8)) <= uVar1) break; uVar1 = std::__cxx11::string::find (param_1,*(char **)param_2,*(long *)(param_3 + 8) + uVar1, *(ulong *)(param_2 + 8)); } while (uVar1 != 0xffffffffffffffff); } return local_78 != 0xffffffffffffffff; }
28,891
LefDefParser::lefwStartCorrectTable(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwStartCorrectTable(int num) { lefwObsoleteNum = LEFW_CORRECTTABLE_START; if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState == LEFW_CORRECTTABLE_START || lefwState == LEFW_CORRECTTABLE) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (versionNum >= 5.4) return LEFW_OBSOLETE; if (lefwSynArray[LEFW_CORRECTTABLE_START]) return LEFW_ALREADY_DEFINED; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "CORRECTIONTABLE %d ;\n", num); else fprintf(lefwFile, "CORRECTIONTABLE %d ;\n", num); lefwLines++; lefwState = LEFW_CORRECTTABLE_START; lefwIsCorrectTable = 1; lefwIsEdgerate = 0; lefwSynArray[LEFW_CORRECTTABLE_START] = 1; return LEFW_OK; }
O0
cpp
LefDefParser::lefwStartCorrectTable(int): pushq %rax movl %edi, (%rsp) movl $0x4, 0x1740a(%rip) # 0x32d48 leaq 0x174bb(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x1b958 movl $0x1, 0x4(%rsp) jmp 0x1ba8b leaq 0x176f5(%rip), %rax # 0x33054 cmpl $0x0, (%rax) jne 0x1b971 movl $0x2, 0x4(%rsp) jmp 0x1ba8b leaq 0x176d8(%rip), %rax # 0x33050 cmpl $0x4, (%rax) je 0x1b989 leaq 0x176cc(%rip), %rax # 0x33050 cmpl $0x17, (%rax) jne 0x1b996 movl $0x2, 0x4(%rsp) jmp 0x1ba8b leaq 0x176b3(%rip), %rax # 0x33050 cmpl $0x1, (%rax) je 0x1b9bb leaq 0x176a7(%rip), %rax # 0x33050 cmpl $0x4f, (%rax) jge 0x1b9bb movl $0x2, 0x4(%rsp) jmp 0x1ba8b movsd 0x1737d(%rip), %xmm0 # 0x32d40 movsd 0xd835(%rip), %xmm1 # 0x29200 ucomisd %xmm1, %xmm0 jb 0x1b9de movl $0x7, 0x4(%rsp) jmp 0x1ba8b leaq 0x1742b(%rip), %rax # 0x32e10 cmpl $0x0, 0x10(%rax) je 0x1b9f8 movl $0x4, 0x4(%rsp) jmp 0x1ba8b cmpl $0x0, 0x176ed(%rip) # 0x330ec je 0x1ba1e leaq 0x173f8(%rip), %rax # 0x32e00 movq (%rax), %rdi movl (%rsp), %edx leaq 0xf931(%rip), %rsi # 0x2b346 movb $0x0, %al callq 0x289b0 jmp 0x1ba39 leaq 0x173db(%rip), %rax # 0x32e00 movq (%rax), %rdi movl (%rsp), %edx leaq 0xf914(%rip), %rsi # 0x2b346 movb $0x0, %al callq 0x1100 leaq 0x1760c(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x17600(%rip), %rax # 0x3304c movl %ecx, (%rax) leaq 0x175fb(%rip), %rax # 0x33050 movl $0x4, (%rax) leaq 0x1761e(%rip), %rax # 0x33080 movl $0x1, (%rax) leaq 0x17619(%rip), %rax # 0x33088 movl $0x0, (%rax) leaq 0x17394(%rip), %rax # 0x32e10 movl $0x1, 0x10(%rax) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax popq %rcx retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser21lefwStartCorrectTableEi: push rax mov [rsp+8+var_8], edi mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 4; LefDefParser::lefwObsoleteNum lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_1B958 mov [rsp+8+var_4], 1 jmp loc_1BA8B loc_1B958: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_1B971 mov [rsp+8+var_4], 2 jmp loc_1BA8B loc_1B971: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 4 jz short loc_1B989 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 17h jnz short loc_1B996 loc_1B989: mov [rsp+8+var_4], 2 jmp loc_1BA8B loc_1B996: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1 jz short loc_1B9BB lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 4Fh ; 'O' jge short loc_1B9BB mov [rsp+8+var_4], 2 jmp loc_1BA8B loc_1B9BB: movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum movsd xmm1, cs:dbl_29200 ucomisd xmm0, xmm1 jb short loc_1B9DE mov [rsp+8+var_4], 7 jmp loc_1BA8B loc_1B9DE: lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray cmp dword ptr [rax+10h], 0 jz short loc_1B9F8 mov [rsp+8+var_4], 4 jmp loc_1BA8B loc_1B9F8: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1BA1E lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov edx, [rsp+8+var_8] lea rsi, aCorrectiontabl; "CORRECTIONTABLE %d ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1BA39 loc_1BA1E: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov edx, [rsp+8+var_8] lea rsi, aCorrectiontabl; "CORRECTIONTABLE %d ;\n" mov al, 0 call _fprintf loc_1BA39: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 4 lea rax, _ZN12LefDefParser18lefwIsCorrectTableE; LefDefParser::lefwIsCorrectTable mov dword ptr [rax], 1 lea rax, _ZN12LefDefParser14lefwIsEdgerateE; LefDefParser::lefwIsEdgerate mov dword ptr [rax], 0 lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov dword ptr [rax+10h], 1 mov [rsp+8+var_4], 0 loc_1BA8B: mov eax, [rsp+8+var_4] pop rcx retn
long long LefDefParser::lefwStartCorrectTable(LefDefParser *this, int a2, long long a3, int a4, int a5, int a6) { LefDefParser::lefwObsoleteNum = 4; if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 4 || LefDefParser::lefwState == 23 ) { return 2; } else if ( LefDefParser::lefwState == 1 || LefDefParser::lefwState >= 79 ) { if ( *(double *)&LefDefParser::versionNum < 5.4 ) { if ( LefDefParser::lefwSynArray[4] ) { return 4; } else { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"CORRECTIONTABLE %d ;\n", (_DWORD)this, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "CORRECTIONTABLE %d ;\n", (_DWORD)this); ++LefDefParser::lefwLines; LefDefParser::lefwState = 4; LefDefParser::lefwIsCorrectTable = 1; LefDefParser::lefwIsEdgerate = 0; LefDefParser::lefwSynArray[4] = 1; return 0; } } else { return 7; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwStartCorrectTable: PUSH RAX MOV dword ptr [RSP],EDI MOV dword ptr [0x00132d48],0x4 LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x0011b958 MOV dword ptr [RSP + 0x4],0x1 JMP 0x0011ba8b LAB_0011b958: LEA RAX,[0x133054] CMP dword ptr [RAX],0x0 JNZ 0x0011b971 MOV dword ptr [RSP + 0x4],0x2 JMP 0x0011ba8b LAB_0011b971: LEA RAX,[0x133050] CMP dword ptr [RAX],0x4 JZ 0x0011b989 LEA RAX,[0x133050] CMP dword ptr [RAX],0x17 JNZ 0x0011b996 LAB_0011b989: MOV dword ptr [RSP + 0x4],0x2 JMP 0x0011ba8b LAB_0011b996: LEA RAX,[0x133050] CMP dword ptr [RAX],0x1 JZ 0x0011b9bb LEA RAX,[0x133050] CMP dword ptr [RAX],0x4f JGE 0x0011b9bb MOV dword ptr [RSP + 0x4],0x2 JMP 0x0011ba8b LAB_0011b9bb: MOVSD XMM0,qword ptr [0x00132d40] MOVSD XMM1,qword ptr [0x00129200] UCOMISD XMM0,XMM1 JC 0x0011b9de MOV dword ptr [RSP + 0x4],0x7 JMP 0x0011ba8b LAB_0011b9de: LEA RAX,[0x132e10] CMP dword ptr [RAX + 0x10],0x0 JZ 0x0011b9f8 MOV dword ptr [RSP + 0x4],0x4 JMP 0x0011ba8b LAB_0011b9f8: CMP dword ptr [0x001330ec],0x0 JZ 0x0011ba1e LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP] LEA RSI,[0x12b346] MOV AL,0x0 CALL 0x001289b0 JMP 0x0011ba39 LAB_0011ba1e: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP] LEA RSI,[0x12b346] MOV AL,0x0 CALL 0x00101100 LAB_0011ba39: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX LEA RAX,[0x133050] MOV dword ptr [RAX],0x4 LEA RAX,[0x133080] MOV dword ptr [RAX],0x1 LEA RAX,[0x133088] MOV dword ptr [RAX],0x0 LEA RAX,[0x132e10] MOV dword ptr [RAX + 0x10],0x1 MOV dword ptr [RSP + 0x4],0x0 LAB_0011ba8b: MOV EAX,dword ptr [RSP + 0x4] POP RCX RET
/* LefDefParser::lefwStartCorrectTable(int) */ int4 LefDefParser::lefwStartCorrectTable(int param_1) { int4 local_4; lefwObsoleteNum = 4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 4) || (lefwState == 0x17)) { local_4 = 2; } else if ((lefwState == 1) || (0x4e < lefwState)) { if (versionNum < DAT_00129200) { if (lefwSynArray._16_4_ == 0) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"CORRECTIONTABLE %d ;\n",param_1); } else { encPrint(lefwFile,"CORRECTIONTABLE %d ;\n",param_1); } lefwLines = lefwLines + 1; lefwState = 4; lefwIsCorrectTable = 1; lefwIsEdgerate = 0; lefwSynArray._16_4_ = 1; local_4 = 0; } else { local_4 = 4; } } else { local_4 = 7; } } else { local_4 = 2; } return local_4; }
28,892
LefDefParser::lefwStartCorrectTable(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwStartCorrectTable(int num) { lefwObsoleteNum = LEFW_CORRECTTABLE_START; if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState == LEFW_CORRECTTABLE_START || lefwState == LEFW_CORRECTTABLE) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (versionNum >= 5.4) return LEFW_OBSOLETE; if (lefwSynArray[LEFW_CORRECTTABLE_START]) return LEFW_ALREADY_DEFINED; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "CORRECTIONTABLE %d ;\n", num); else fprintf(lefwFile, "CORRECTIONTABLE %d ;\n", num); lefwLines++; lefwState = LEFW_CORRECTTABLE_START; lefwIsCorrectTable = 1; lefwIsEdgerate = 0; lefwSynArray[LEFW_CORRECTTABLE_START] = 1; return LEFW_OK; }
O3
cpp
LefDefParser::lefwStartCorrectTable(int): pushq %r14 pushq %rbx pushq %rax movl %edi, %edx movl $0x4, 0x13fa3(%rip) # 0x24d48 leaq 0x14054(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0x10e2d leaq 0x14299(%rip), %rcx # 0x25054 movl $0x2, %eax cmpl $0x0, (%rcx) je 0x10e32 leaq 0x14284(%rip), %rbx # 0x25050 movl (%rbx), %ecx cmpl $0x4, %ecx je 0x10e32 cmpl $0x17, %ecx je 0x10e32 cmpl $0x1, %ecx setne %sil cmpl $0x4f, %ecx setl %cl testb %cl, %sil jne 0x10e32 movsd 0x13f4e(%rip), %xmm0 # 0x24d40 movl $0x7, %eax ucomisd 0x8319(%rip), %xmm0 # 0x19118 jae 0x10e32 leaq 0x14008(%rip), %r14 # 0x24e10 movl $0x4, %eax cmpl $0x0, 0x10(%r14) jne 0x10e32 cmpb $0x1, 0x142d1(%rip) # 0x250ec jne 0x10e3a leaq 0xa7de(%rip), %rsi # 0x1b602 xorl %eax, %eax callq 0x18c35 jmp 0x10e48 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0xa7c1(%rip), %rsi # 0x1b602 xorl %eax, %eax callq 0x10f0 leaq 0x141fd(%rip), %rax # 0x2504c incl (%rax) movl $0x4, (%rbx) leaq 0x14222(%rip), %rax # 0x25080 movl $0x1, %ecx movl %ecx, (%rax) leaq 0x1421c(%rip), %rax # 0x25088 movl $0x0, (%rax) movl %ecx, 0x10(%r14) xorl %eax, %eax jmp 0x10e32
_ZN12LefDefParser21lefwStartCorrectTableEi: push r14 push rbx push rax mov edx, edi mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 4; LefDefParser::lefwObsoleteNum lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_10E2D lea rcx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov eax, 2 cmp dword ptr [rcx], 0 jz short loc_10E32 lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rbx] cmp ecx, 4 jz short loc_10E32 cmp ecx, 17h jz short loc_10E32 cmp ecx, 1 setnz sil cmp ecx, 4Fh ; 'O' setl cl test sil, cl jnz short loc_10E32 movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum mov eax, 7 ucomisd xmm0, cs:dbl_19118 jnb short loc_10E32 lea r14, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov eax, 4 cmp dword ptr [r14+10h], 0 jnz short loc_10E32 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_10E3A lea rsi, aCorrectiontabl; "CORRECTIONTABLE %d ;\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_10E48 loc_10E2D: mov eax, 1 loc_10E32: add rsp, 8 pop rbx pop r14 retn loc_10E3A: lea rsi, aCorrectiontabl; "CORRECTIONTABLE %d ;\n" xor eax, eax call _fprintf loc_10E48: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx], 4 lea rax, _ZN12LefDefParser18lefwIsCorrectTableE; LefDefParser::lefwIsCorrectTable mov ecx, 1 mov [rax], ecx lea rax, _ZN12LefDefParser14lefwIsEdgerateE; LefDefParser::lefwIsEdgerate mov dword ptr [rax], 0 mov [r14+10h], ecx xor eax, eax jmp short loc_10E32
long long LefDefParser::lefwStartCorrectTable( LefDefParser *this, int a2, long long a3, long long a4, int a5, int a6) { long long result; // rax unsigned int v7; // ecx LefDefParser::lefwObsoleteNum = 4; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit ) { v7 = LefDefParser::lefwState; if ( LefDefParser::lefwState != 4 && LefDefParser::lefwState != 23 && ((int)LefDefParser::lefwState >= 79 || LefDefParser::lefwState == 1) ) { result = 7LL; if ( *(double *)&LefDefParser::versionNum < 5.4 ) { result = 4LL; if ( !LefDefParser::lefwSynArray[4] ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) { LOBYTE(v7) = (int)LefDefParser::lefwState < 79; LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"CORRECTIONTABLE %d ;\n", (_DWORD)this, v7, a5, a6); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "CORRECTIONTABLE %d ;\n", (_DWORD)this); } ++LefDefParser::lefwLines; LefDefParser::lefwState = 4; LefDefParser::lefwIsCorrectTable = 1; LefDefParser::lefwIsEdgerate = 0; LefDefParser::lefwSynArray[4] = 1; return 0LL; } } } } return result; }
lefwStartCorrectTable: PUSH R14 PUSH RBX PUSH RAX MOV EDX,EDI MOV dword ptr [0x00124d48],0x4 LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00110e2d LEA RCX,[0x125054] MOV EAX,0x2 CMP dword ptr [RCX],0x0 JZ 0x00110e32 LEA RBX,[0x125050] MOV ECX,dword ptr [RBX] CMP ECX,0x4 JZ 0x00110e32 CMP ECX,0x17 JZ 0x00110e32 CMP ECX,0x1 SETNZ SIL CMP ECX,0x4f SETL CL TEST SIL,CL JNZ 0x00110e32 MOVSD XMM0,qword ptr [0x00124d40] MOV EAX,0x7 UCOMISD XMM0,qword ptr [0x00119118] JNC 0x00110e32 LEA R14,[0x124e10] MOV EAX,0x4 CMP dword ptr [R14 + 0x10],0x0 JNZ 0x00110e32 CMP byte ptr [0x001250ec],0x1 JNZ 0x00110e3a LEA RSI,[0x11b602] XOR EAX,EAX CALL 0x00118c35 JMP 0x00110e48 LAB_00110e2d: MOV EAX,0x1 LAB_00110e32: ADD RSP,0x8 POP RBX POP R14 RET LAB_00110e3a: LEA RSI,[0x11b602] XOR EAX,EAX CALL 0x001010f0 LAB_00110e48: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [RBX],0x4 LEA RAX,[0x125080] MOV ECX,0x1 MOV dword ptr [RAX],ECX LEA RAX,[0x125088] MOV dword ptr [RAX],0x0 MOV dword ptr [R14 + 0x10],ECX XOR EAX,EAX JMP 0x00110e32
/* LefDefParser::lefwStartCorrectTable(int) */ int8 LefDefParser::lefwStartCorrectTable(int param_1) { int8 uVar1; lefwObsoleteNum = 4; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if ((((lefwDidInit != 0) && (lefwState != 4)) && (lefwState != 0x17)) && (lefwState == 1 || 0x4e < lefwState)) { uVar1 = 7; if ((versionNum < DAT_00119118) && (uVar1 = 4, lefwSynArray._16_4_ == 0)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"CORRECTIONTABLE %d ;\n"); } else { fprintf(lefwFile,"CORRECTIONTABLE %d ;\n",param_1); } lefwLines = lefwLines + 1; lefwState = 4; lefwIsCorrectTable = 1; lefwIsEdgerate = 0; lefwSynArray._16_4_ = 1; uVar1 = 0; } } } return uVar1; }
28,893
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&)
llama.cpp/common/chat.cpp
static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct templates_params & inputs) { // https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt common_chat_params data; json tools = inputs.tools.is_null() ? inputs.tools : json::array(); std::string python_code_argument_name; auto has_raw_python = false; data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED; data.grammar = build_grammar([&](const common_grammar_builder & builder) { std::vector<std::string> tool_rules; foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool.at("function"); const auto & parameters = function.at("parameters"); std::string name = function.at("name"); if (name == "python" || name == "ipython") { if (!parameters.contains("type")) { throw std::runtime_error("Missing type in python tool"); } has_raw_python = true; const auto & type = parameters.at("type"); if (type == "object") { auto properties = parameters.at("properties"); for (auto it = properties.begin(); it != properties.end(); ++it) { if (it.value().at("type") == "string") { if (!python_code_argument_name.empty()) { throw std::runtime_error("Multiple string arguments found in python tool"); } python_code_argument_name = it.key(); } } if (python_code_argument_name.empty()) { throw std::runtime_error("No string argument found in python tool"); } } else if (type != "string") { throw std::runtime_error("Invalid type in python tool: " + type.dump()); } } tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space")); }); if (has_raw_python) { tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*")); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "<|python_tag|>"}); data.preserved_tokens.push_back("<|python_tag|>"); } auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space"; builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "<function="}); }); data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); // TODO: if (has_raw_python) data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1; return data; }
O3
cpp
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %rbx movl $0x0, (%rdi) leaq 0x18(%rdi), %rax movq %rax, 0x8(%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movb %al, 0x18(%rdi) leaq 0x38(%rdi), %rcx movq %rcx, 0x28(%rdi) movq %rax, 0x30(%rdi) movb %al, 0x38(%rdi) movb %al, 0x48(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movups %xmm0, 0x80(%rdi) movq %rax, 0x90(%rdi) leaq 0x10(%rdx), %r12 cmpb %al, 0x10(%rdx) je 0xa6105 leaq 0x58(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx movl $0x2, %r8d callq 0x46738 jmp 0xa6112 leaq 0x58(%rsp), %rdi movq %r12, %rsi callq 0x2d2fe leaq 0x78(%rsp), %r15 movq %r15, -0x10(%r15) xorl %eax, %eax movq %rax, -0x8(%r15) movb %al, (%r15) movb %al, 0x7(%rsp) cmpl $0x1, 0x20(%r14) setne 0x48(%rbx) movq %rax, 0x10(%rsp) movl $0x20, %edi callq 0x21220 movq %r14, (%rax) leaq 0x7(%rsp), %rcx movq %rcx, 0x8(%rax) leaq 0x68(%rsp), %rcx movq %rcx, 0x10(%rax) movq %rbx, 0x18(%rax) leaq 0x8(%rsp), %rsi movq %rax, (%rsi) leaq 0xb360(%rip), %rax # 0xb14c8 movq %rax, 0x18(%rsi) leaq 0xbb25(%rip), %rax # 0xb1c98 movq %rax, 0x10(%rsi) leaq 0x28(%rsp), %rdx movb $0x0, (%rdx) leaq 0x38(%rsp), %rdi callq 0x10511a leaq 0x28(%rbx), %rdi leaq 0x38(%rsp), %r13 movq %r13, %rsi callq 0x218f0 movq (%r13), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0xa61b5 movq 0x48(%rsp), %rsi incq %rsi callq 0x21180 movq 0x18(%rsp), %rax testq %rax, %rax je 0xa61ce leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movzbl (%r12), %eax testl %eax, %eax je 0xa6200 cmpl $0x2, %eax je 0xa61e1 cmpl $0x1, %eax jne 0xa61ee movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xa6200 movq %rbp, %r13 leaq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x2d2fe jmp 0xa6230 movq %rbp, %r13 leaq 0x8(%rsp), %r12 movb $0x0, (%r12) movq $0x0, 0x8(%r12) movq %r12, %rdi movl $0x1, %esi callq 0x9524a movq %r12, %rdi movl $0x1, %esi callq 0x9524a movzbl 0x60(%r14), %ebp leaq 0x28(%rsp), %r12 movb $0x0, (%r12) movq $0x0, 0x8(%r12) movq %r12, %rdi movl $0x1, %esi callq 0x9524a movq %r12, %rdi movl $0x1, %esi callq 0x9524a leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %r13, %rsi movq %r14, %rdx movl %ebp, %r8d movq %r12, %r9 callq 0xa6d75 leaq 0x8(%rbx), %rdi leaq 0x38(%rsp), %r14 movq %r14, %rsi callq 0x218f0 movq (%r14), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0xa62a8 movq 0x48(%rsp), %rsi incq %rsi callq 0x21180 leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x9524a movq %r14, %rdi callq 0x3488a leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x9524a movq %r14, %rdi callq 0x3488a movl $0x9, (%rbx) movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0xa62f3 movq 0x78(%rsp), %rsi incq %rsi callq 0x21180 leaq 0x58(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x9524a movq %rbx, %rdi callq 0x3488a addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xa6379 jmp 0xa6371 movq %rax, %r14 leaq 0x28(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x9524a movq %r12, %rdi callq 0x3488a leaq 0x8(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x9524a movq %r12, %rdi callq 0x3488a jmp 0xa637c movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0xa637c leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xa637c movq %rax, %rdi callq 0x2dbeb movq %rax, %r14 movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0xa6393 movq 0x78(%rsp), %rsi incq %rsi callq 0x21180 leaq 0x58(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x9524a movq %r15, %rdi callq 0x3488a jmp 0xa63af movq %rax, %r14 movq %rbx, %rdi callq 0xbbda8 movq %r14, %rdi callq 0x21b20
_ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_params: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rdx mov rbp, rsi mov rbx, rdi mov dword ptr [rdi], 0 lea rax, [rdi+18h] mov [rdi+8], rax xor eax, eax mov [rdi+10h], rax mov [rdi+18h], al lea rcx, [rdi+38h] mov [rdi+28h], rcx mov [rdi+30h], rax mov [rdi+38h], al mov [rdi+48h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 movups xmmword ptr [rdi+80h], xmm0 mov [rdi+90h], rax lea r12, [rdx+10h] cmp [rdx+10h], al jz short loc_A6105 lea rdi, [rsp+0B8h+var_60] xor esi, esi xor edx, edx xor ecx, ecx mov r8d, 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) jmp short loc_A6112 loc_A6105: lea rdi, [rsp+0B8h+var_60] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_A6112: lea r15, [rsp+0B8h+var_40] mov [r15-10h], r15 xor eax, eax mov [r15-8], rax mov [r15], al mov [rsp+0B8h+var_B1], al cmp dword ptr [r14+20h], 1 setnz byte ptr [rbx+48h] mov [rsp+0B8h+var_A8], rax mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r14 lea rcx, [rsp+0B8h+var_B1] mov [rax+8], rcx lea rcx, [rsp+0B8h+var_50] mov [rax+10h], rcx mov [rax+18h], rbx lea rsi, [rsp+0B8h+var_B0] mov [rsi], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_paramsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_paramsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, [rsp+0B8h+var_90] mov byte ptr [rdx], 0 lea rdi, [rsp+0B8h+var_80] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+28h] lea r13, [rsp+0B8h+var_80] mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r13+0]; void * lea rax, [rsp+0B8h+var_70] cmp rdi, rax jz short loc_A61B5 mov rsi, [rsp+0B8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A61B5: mov rax, [rsp+0B8h+var_A0] test rax, rax jz short loc_A61CE lea rdi, [rsp+0B8h+var_B0] mov rsi, rdi mov edx, 3 call rax loc_A61CE: movzx eax, byte ptr [r12] test eax, eax jz short loc_A6200 cmp eax, 2 jz short loc_A61E1 cmp eax, 1 jnz short loc_A61EE loc_A61E1: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_A6200 loc_A61EE: mov r13, rbp lea rdi, [rsp+0B8h+var_B0] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_A6230 loc_A6200: mov r13, rbp lea r12, [rsp+0B8h+var_B0] mov byte ptr [r12], 0 mov qword ptr [r12+8], 0 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_A6230: movzx ebp, byte ptr [r14+60h] lea r12, [rsp+0B8h+var_90] mov byte ptr [r12], 0 mov qword ptr [r12+8], 0 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 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) lea rdi, [rsp+0B8h+var_80] lea rcx, [rsp+0B8h+var_B0] mov rsi, r13 mov rdx, r14 mov r8d, ebp mov r9, r12 call _ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_; apply(minja::chat_template 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&,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&,bool,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&) lea rdi, [rbx+8] lea r14, [rsp+0B8h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+0B8h+var_70] cmp rdi, rax jz short loc_A62A8 mov rsi, [rsp+0B8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A62A8: lea r14, [rsp+0B8h+var_90] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea r14, [rsp+0B8h+var_B0] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 9 mov rdi, [rsp+0B8h+var_50]; void * cmp rdi, r15 jz short loc_A62F3 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A62F3: lea rbx, [rsp+0B8h+var_60] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_A6379 jmp short loc_A6371 mov r14, rax lea r12, [rsp+0B8h+var_90] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea r12, [rsp+0B8h+var_B0] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_A637C mov r14, rax mov rax, [rsp+0B8h+var_A0] test rax, rax jz short loc_A637C lea rdi, [rsp+0B8h+var_B0] mov rsi, rdi mov edx, 3 call rax jmp short loc_A637C loc_A6371: mov rdi, rax call __clang_call_terminate loc_A6379: mov r14, rax loc_A637C: mov rdi, [rsp+0B8h+var_50]; void * cmp rdi, r15 jz short loc_A6393 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A6393: lea r15, [rsp+0B8h+var_60] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_A63AF mov r14, rax loc_A63AF: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume
long long common_chat_params_init_functionary_v3_1_llama_3_1(long long a1, int a2, long long a3) { unsigned __int8 *v4; // r12 _QWORD *v5; // rax int v6; // eax int v7; // r13d int v8; // ebp char v10; // [rsp+7h] [rbp-B1h] BYREF _QWORD *v11; // [rsp+8h] [rbp-B0h] BYREF long long v12; // [rsp+10h] [rbp-A8h] long long ( *v13)(); // [rsp+18h] [rbp-A0h] long long ( *v14)(); // [rsp+20h] [rbp-98h] char v15[8]; // [rsp+28h] [rbp-90h] BYREF long long v16; // [rsp+30h] [rbp-88h] void *v17[2]; // [rsp+38h] [rbp-80h] BYREF _QWORD v18[2]; // [rsp+48h] [rbp-70h] BYREF char v19[16]; // [rsp+58h] [rbp-60h] BYREF void *v20[2]; // [rsp+68h] [rbp-50h] BYREF _QWORD v21[8]; // [rsp+78h] [rbp-40h] BYREF *(_DWORD *)a1 = 0; *(_QWORD *)(a1 + 8) = a1 + 24; *(_QWORD *)(a1 + 16) = 0LL; *(_BYTE *)(a1 + 24) = 0; *(_QWORD *)(a1 + 40) = a1 + 56; *(_QWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 56) = 0; *(_BYTE *)(a1 + 72) = 0; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; *(_OWORD *)(a1 + 112) = 0LL; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = 0LL; v4 = (unsigned __int8 *)(a3 + 16); if ( *(_BYTE *)(a3 + 16) ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v19, 0LL, 0LL, 0LL, 2LL); else nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)v19, (unsigned __int8 *)(a3 + 16)); v20[0] = v21; v20[1] = 0LL; LOBYTE(v21[0]) = 0; v10 = 0; *(_BYTE *)(a1 + 72) = *(_DWORD *)(a3 + 32) != 1; v12 = 0LL; v5 = (_QWORD *)operator new(0x20uLL); *v5 = a3; v5[1] = &v10; v5[2] = v20; v5[3] = a1; v11 = v5; v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke; v13 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_manager; v15[0] = 0; build_grammar[abi:cxx11](v17, &v11, v15); std::string::operator=(a1 + 40, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); if ( v13 ) ((void ( *)(_QWORD **, _QWORD **, long long))v13)(&v11, &v11, 3LL); v6 = *v4; if ( !*v4 || (v6 == 2 || v6 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { v7 = a2; LOBYTE(v11) = 0; v12 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11); } else { v7 = a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)&v11, v4); } v8 = *(unsigned __int8 *)(a3 + 96); v15[0] = 0; v16 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v15); 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(v15); apply((unsigned int)v17, v7, a3, (unsigned int)&v11, v8, (unsigned int)v15); std::string::operator=(a1 + 8, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); 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(v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v11); *(_DWORD *)a1 = 9; if ( v20[0] != v21 ) operator delete(v20[0], v21[0] + 1LL); 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(v19); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); }
common_chat_params_init_functionary_v3_1_llama_3_1: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV RBP,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 LEA RAX,[RDI + 0x18] MOV qword ptr [RDI + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOV byte ptr [RDI + 0x18],AL LEA RCX,[RDI + 0x38] MOV qword ptr [RDI + 0x28],RCX MOV qword ptr [RDI + 0x30],RAX MOV byte ptr [RDI + 0x38],AL MOV byte ptr [RDI + 0x48],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOVUPS xmmword ptr [RDI + 0x80],XMM0 MOV qword ptr [RDI + 0x90],RAX LEA R12,[RDX + 0x10] CMP byte ptr [RDX + 0x10],AL JZ 0x001a6105 LAB_001a60ed: LEA RDI,[RSP + 0x58] XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX MOV R8D,0x2 CALL 0x00146738 JMP 0x001a6112 LAB_001a6105: LEA RDI,[RSP + 0x58] MOV RSI,R12 CALL 0x0012d2fe LAB_001a6112: LEA R15,[RSP + 0x78] MOV qword ptr [R15 + -0x10],R15 XOR EAX,EAX MOV qword ptr [R15 + -0x8],RAX MOV byte ptr [R15],AL MOV byte ptr [RSP + 0x7],AL CMP dword ptr [R14 + 0x20],0x1 SETNZ byte ptr [RBX + 0x48] MOV qword ptr [RSP + 0x10],RAX LAB_001a6136: MOV EDI,0x20 CALL 0x00121220 MOV qword ptr [RAX],R14 LEA RCX,[RSP + 0x7] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[RSP + 0x68] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x18],RBX LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX LEA RAX,[0x1b14c8] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1b1c98] MOV qword ptr [RSI + 0x10],RAX LEA RDX,[RSP + 0x28] MOV byte ptr [RDX],0x0 LAB_001a617f: LEA RDI,[RSP + 0x38] CALL 0x0020511a LEA RDI,[RBX + 0x28] LEA R13,[RSP + 0x38] MOV RSI,R13 CALL 0x001218f0 MOV RDI,qword ptr [R13] LEA RAX,[RSP + 0x48] CMP RDI,RAX JZ 0x001a61b5 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00121180 LAB_001a61b5: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x001a61ce LAB_001a61bf: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a61ce: MOVZX EAX,byte ptr [R12] TEST EAX,EAX JZ 0x001a6200 CMP EAX,0x2 JZ 0x001a61e1 CMP EAX,0x1 JNZ 0x001a61ee LAB_001a61e1: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001a6200 LAB_001a61ee: MOV R13,RBP LEA RDI,[RSP + 0x8] MOV RSI,R12 CALL 0x0012d2fe JMP 0x001a6230 LAB_001a6200: MOV R13,RBP LEA R12,[RSP + 0x8] MOV byte ptr [R12],0x0 MOV qword ptr [R12 + 0x8],0x0 MOV RDI,R12 MOV ESI,0x1 CALL 0x0019524a MOV RDI,R12 MOV ESI,0x1 CALL 0x0019524a LAB_001a6230: MOVZX EBP,byte ptr [R14 + 0x60] LEA R12,[RSP + 0x28] MOV byte ptr [R12],0x0 MOV qword ptr [R12 + 0x8],0x0 MOV RDI,R12 MOV ESI,0x1 CALL 0x0019524a MOV RDI,R12 MOV ESI,0x1 CALL 0x0019524a LAB_001a6262: LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x8] MOV RSI,R13 MOV RDX,R14 MOV R8D,EBP MOV R9,R12 CALL 0x001a6d75 LEA RDI,[RBX + 0x8] LEA R14,[RSP + 0x38] MOV RSI,R14 CALL 0x001218f0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x48] CMP RDI,RAX JZ 0x001a62a8 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00121180 LAB_001a62a8: LEA R14,[RSP + 0x28] MOV RDI,R14 XOR ESI,ESI CALL 0x0019524a MOV RDI,R14 CALL 0x0013488a LEA R14,[RSP + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x0019524a MOV RDI,R14 CALL 0x0013488a MOV dword ptr [RBX],0x9 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R15 JZ 0x001a62f3 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00121180 LAB_001a62f3: LEA RBX,[RSP + 0x58] MOV RDI,RBX XOR ESI,ESI CALL 0x0019524a MOV RDI,RBX CALL 0x0013488a ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&) */ void common_chat_params_init_functionary_v3_1_llama_3_1 (chat_template *param_1,templates_params *param_2) { basic_json *pbVar1; basic_json bVar2; basic_json *in_RDX; int1 local_b1; int8 *local_b0; int8 local_a8; code *local_a0; code *local_98; data local_90 [8]; int8 local_88; long *local_80 [2]; long local_70 [2]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_60 [16]; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; *(int4 *)param_1 = 0; *(chat_template **)(param_1 + 8) = param_1 + 0x18; *(int8 *)(param_1 + 0x10) = 0; param_1[0x18] = (chat_template)0x0; *(chat_template **)(param_1 + 0x28) = param_1 + 0x38; *(int8 *)(param_1 + 0x30) = 0; param_1[0x38] = (chat_template)0x0; param_1[0x48] = (chat_template)0x0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; *(int8 *)(param_1 + 0x88) = 0; *(int8 *)(param_1 + 0x90) = 0; pbVar1 = in_RDX + 0x10; if (in_RDX[0x10] == (basic_json)0x0) { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_60,pbVar1); } else { /* try { // try from 001a60ed to 001a6111 has its CatchHandler @ 001a63ac */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_60,0,0,0,2); } local_48 = 0; local_40 = 0; local_b1 = 0; param_1[0x48] = (chat_template)(*(int *)(in_RDX + 0x20) != 1); local_a8 = 0; local_50 = &local_40; /* try { // try from 001a6136 to 001a613f has its CatchHandler @ 001a6379 */ local_b0 = (int8 *)operator_new(0x20); *local_b0 = in_RDX; local_b0[1] = &local_b1; local_b0[2] = &local_50; local_b0[3] = param_1; local_98 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,templates_params_const&)::$_0> ::_M_invoke; local_a0 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,templates_params_const&)::$_0> ::_M_manager; local_90[0] = (data)0x0; /* try { // try from 001a617f to 001a6188 has its CatchHandler @ 001a6353 */ build_grammar_abi_cxx11_((function *)local_80,(common_grammar_options *)&local_b0); std::__cxx11::string::operator=((string *)(param_1 + 0x28),(string *)local_80); if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0 != (code *)0x0) { /* try { // try from 001a61bf to 001a61cd has its CatchHandler @ 001a631e */ (*local_a0)(&local_b0,&local_b0,3); } bVar2 = *pbVar1; if ((bVar2 == (basic_json)0x0) || (((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_b0 = (int8 *)((ulong)local_b0 & 0xffffffffffffff00); local_a8 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_b0,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_b0,0)); } else { /* try { // try from 001a61ee to 001a61fd has its CatchHandler @ 001a631c */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_b0,pbVar1); } bVar2 = in_RDX[0x60]; local_90[0] = (data)0x0; local_88 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); /* try { // try from 001a6262 to 001a627c has its CatchHandler @ 001a6320 */ apply((chat_template *)local_80,(basic_json *)param_2,in_RDX,SUB81(&local_b0,0), (basic_json *)(ulong)(byte)bVar2); std::__cxx11::string::operator=((string *)(param_1 + 8),(string *)local_80); if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_b0,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_b0); *(int4 *)param_1 = 9; if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_60,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_60); return; }
28,894
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void convertToLoop(SourcePatch const & sourcePatch, SparseMatrix<REAL> & matrix) { // // Unlike quads, there are not enough degrees of freedom in the regular patch // to enforce interpolation of the limit point and tangent at the corner while // preserving the two adjoining boundary curves. Since we end up destroying // neighboring conintuity in doing so, we use a fully constructed Gregory // patch here for the isolated corner case as well as the general case. // // Unfortunately, the regular patch here -- a quartic Box-spline triangle -- // is not as flexible as the BSpline patches for Catmark. Unlike BSplines // and Bezier patches, the Box-splines do not span the full space of possible // shapes (only 12 control points in a space spanned by 15 polynomials for // the quartic case). So it is possible to construct shapes with a Gregory // or Bezier triangle that cannot be represented by the Box-spline. // // The solution fits a Box-spline patch to the constructed Gregory patch with // a set of constraints. With quartic boundary curves, 12 constraints on the // boundary curve make this tightly constrained. Such a set of constraints // is rank deficient (11 instead of 12) so an additional constraint on the // midpoint of the patch is included and a conversion matrix is constructed // from the pseudo-inverse of the 13 constraints. // // For the full 12x15 conversion matrix from 15-point quartic Bezier patch // back to a Box spline patch, the matrix rows and columns are ordered // according to control point orientations used elsewhere. Correllation of // points between the Bezier and Gregory points is as follows: // // Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 // G0 G1 G15 G7 G5 G2 G3,4 G8,9 G6 G17 G13,14 G16 G11 G12 G10 // // As with conversion from Gregory to BSpline for Catmark, one of the face // points is chosen as a Bezier point in the conversion rather than combining // the pair (which would avoid slight asymmetric artefacts of the choice). // And given the solution now depends primarily on the boundary, its not // necessary to construct a full Gregory patch with enforced continuity. // REAL const gregoryToLoopMatrix[12][15] = { { 8.214411f, 7.571190f, -7.690082f, 2.237840f, -1.118922f,-16.428828f, 0.666666f, 0.666666f, 2.237835f, 6.309870f, 0.666666f, -1.690100f, -0.428812f, -0.428805f, 0.214407f }, { -0.304687f, 0.609374f, 6.752593f, 0.609374f, -0.304687f, 0.609378f, -3.333333f, -3.333333f, 0.609378f, -1.247389f, -3.333333f, -1.247389f, 3.276037f, 3.276037f, -1.638020f }, { -1.118922f, 2.237840f, -7.690082f, 7.571190f, 8.214411f, 2.237835f, 0.666666f, 0.666666f, -16.428828f, -1.690100f, 0.666666f, 6.309870f, -0.428805f, -0.428812f, 0.214407f }, { 8.214411f,-16.428828f, 6.309870f, -0.428812f, 0.214407f, 7.571190f, 0.666666f, 0.666666f, -0.428805f, -7.690082f, 0.666666f, -1.690100f, 2.237840f, 2.237835f, -1.118922f }, { -0.813368f, 1.626735f, -0.773435f, -1.039929f, 0.519965f, 1.626735f, 0.666666f, 0.666666f, -1.039930f, -0.773435f, 0.666666f, 1.226558f, -1.039929f, -1.039930f, 0.519965f }, { 0.519965f, -1.039929f, -0.773435f, 1.626735f, -0.813368f, -1.039930f, 0.666666f, 0.666666f, 1.626735f, 1.226558f, 0.666666f, -0.773435f, -1.039930f, -1.039929f, 0.519965f }, { 0.214407f, -0.428812f, 6.309870f,-16.428828f, 8.214411f, -0.428805f, 0.666666f, 0.666666f, 7.571190f, -1.690100f, 0.666666f, -7.690082f, 2.237835f, 2.237840f, -1.118922f }, { -0.304687f, 0.609378f, -1.247389f, 3.276037f, -1.638020f, 0.609374f, -3.333333f, -3.333333f, 3.276037f, 6.752593f, -3.333333f, -1.247389f, 0.609374f, 0.609378f, -0.304687f }, { 0.519965f, -1.039930f, 1.226558f, -1.039930f, 0.519965f, -1.039929f, 0.666666f, 0.666666f, -1.039929f, -0.773435f, 0.666666f, -0.773435f, 1.626735f, 1.626735f, -0.813368f }, { -1.638020f, 3.276037f, -1.247389f, 0.609378f, -0.304687f, 3.276037f, -3.333333f, -3.333333f, 0.609374f, -1.247389f, -3.333333f, 6.752593f, 0.609378f, 0.609374f, -0.304687f }, { -1.118922f, 2.237835f, -1.690100f, -0.428805f, 0.214407f, 2.237840f, 0.666666f, 0.666666f, -0.428812f, -7.690082f, 0.666666f, 6.309870f, 7.571190f,-16.428828f, 8.214411f }, { 0.214407f, -0.428805f, -1.690100f, 2.237835f, -1.118922f, -0.428812f, 0.666666f, 0.666666f, 2.237840f, 6.309870f, 0.666666f, -7.690082f,-16.428828f, 7.571190f, 8.214411f } }; int const gRowIndices[15] = { 0,1,15,7,5, 2,4,8,6, 17,14,16, 11,12, 10 }; SparseMatrix<REAL> G; convertToGregory<REAL>(sourcePatch, G); _initializeFullMatrix(matrix, 12, G.GetNumColumns()); for (int i = 0; i < 12; ++i) { REAL const * gRowWeights = gregoryToLoopMatrix[i]; _combineSparseMatrixRowsInFull(matrix, i, G, 15, gRowIndices, gRowWeights); } }
O0
cpp
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&): pushq %rbp movq %rsp, %rbp subq $0x3b0, %rsp # imm = 0x3B0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq 0xd0ac6(%rip), %rsi # 0x1ee100 leaq -0x2e0(%rbp), %rdi movl $0x2d0, %edx # imm = 0x2D0 callq 0xcb1d0 movups 0xd0daa(%rip), %xmm0 # 0x1ee3fc movups %xmm0, -0x2f4(%rbp) movaps 0xd0d90(%rip), %xmm0 # 0x1ee3f0 movaps %xmm0, -0x300(%rbp) movaps 0xd0d72(%rip), %xmm0 # 0x1ee3e0 movaps %xmm0, -0x310(%rbp) movaps 0xd0d54(%rip), %xmm0 # 0x1ee3d0 movaps %xmm0, -0x320(%rbp) leaq -0x378(%rbp), %rdi movq %rdi, -0x398(%rbp) callq 0xc6270 movq -0x398(%rbp), %rsi movq -0x8(%rbp), %rdi callq 0xcc560 jmp 0x11d6a8 movq -0x10(%rbp), %rax movq %rax, -0x3a8(%rbp) leaq -0x378(%rbp), %rdi callq 0xcc9a0 movl %eax, -0x39c(%rbp) jmp 0x11d6c7 movl -0x39c(%rbp), %edx movq -0x3a8(%rbp), %rdi movl $0xc, %esi callq 0x11a9d0 jmp 0x11d6e0 movl $0x0, -0x388(%rbp) cmpl $0xc, -0x388(%rbp) jge 0x11d76b movslq -0x388(%rbp), %rax imulq $0x3c, %rax, %rax leaq -0x2e0(%rbp,%rax), %rax movq %rax, -0x390(%rbp) movq -0x10(%rbp), %rdi movl -0x388(%rbp), %esi movq -0x390(%rbp), %r9 leaq -0x378(%rbp), %rdx movl $0xf, %ecx leaq -0x320(%rbp), %r8 callq 0x11aae0 jmp 0x11d738 jmp 0x11d73a movl -0x388(%rbp), %eax addl $0x1, %eax movl %eax, -0x388(%rbp) jmp 0x11d6ea movq %rax, %rcx movl %edx, %eax movq %rcx, -0x380(%rbp) movl %eax, -0x384(%rbp) leaq -0x378(%rbp), %rdi callq 0xcd7c0 jmp 0x11d780 leaq -0x378(%rbp), %rdi callq 0xcd7c0 addq $0x3b0, %rsp # imm = 0x3B0 popq %rbp retq movq -0x380(%rbp), %rdi callq 0xd58b0 nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Far13convertToLoopIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE: push rbp mov rbp, rsp sub rsp, 3B0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rsi, unk_1EE100 lea rdi, [rbp+var_2E0] mov edx, 2D0h call _memcpy movups xmm0, cs:xmmword_1EE3F0+0Ch movups [rbp+var_2F4], xmm0 movaps xmm0, cs:xmmword_1EE3F0 movaps xmmword ptr [rbp-300h], xmm0 movaps xmm0, cs:xmmword_1EE3E0 movaps [rbp+var_310], xmm0 movaps xmm0, cs:xmmword_1EE3D0 movaps [rbp+var_320], xmm0 lea rdi, [rbp+var_378] mov [rbp+var_398], rdi call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfEC2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SparseMatrix(void) mov rsi, [rbp+var_398] mov rdi, [rbp+var_8] call __ZN10OpenSubdiv6v3_6_03Far16convertToGregoryIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) jmp short $+2 loc_11D6A8: mov rax, [rbp+var_10] mov [rbp+var_3A8], rax lea rdi, [rbp+var_378] call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIfE13GetNumColumnsEv; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::GetNumColumns(void) mov [rbp+var_39C], eax jmp short $+2 loc_11D6C7: mov edx, [rbp+var_39C] mov rdi, [rbp+var_3A8] mov esi, 0Ch call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_121_initializeFullMatrixIfEEvRNS1_12SparseMatrixIT_EEii_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_initializeFullMatrix<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,int,int) jmp short $+2 loc_11D6E0: mov [rbp+var_388], 0 loc_11D6EA: cmp [rbp+var_388], 0Ch jge short loc_11D76B movsxd rax, [rbp+var_388] imul rax, 3Ch ; '<' lea rax, [rbp+rax+var_2E0] mov [rbp+var_390], rax mov rdi, [rbp+var_10] mov esi, [rbp+var_388] mov r9, [rbp+var_390] lea rdx, [rbp+var_378] mov ecx, 0Fh lea r8, [rbp+var_320] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_130_combineSparseMatrixRowsInFullIfEEvRNS1_12SparseMatrixIT_EEiRKS6_iPKiPKS5__0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparseMatrixRowsInFull<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,float const*) jmp short $+2 loc_11D738: jmp short $+2 loc_11D73A: mov eax, [rbp+var_388] add eax, 1 mov [rbp+var_388], eax jmp short loc_11D6EA mov rcx, rax mov eax, edx mov [rbp+var_380], rcx mov [rbp+var_384], eax lea rdi, [rbp+var_378] call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix() jmp short loc_11D780 loc_11D76B: lea rdi, [rbp+var_378] call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix() add rsp, 3B0h pop rbp retn loc_11D780: mov rdi, [rbp+var_380] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::convertToLoop<float>(long long a1, long long a2) { long long v3; // [rsp+8h] [rbp-3A8h] unsigned int NumColumns; // [rsp+14h] [rbp-39Ch] signed int i; // [rsp+28h] [rbp-388h] _BYTE v6[88]; // [rsp+38h] [rbp-378h] BYREF _OWORD v7[2]; // [rsp+90h] [rbp-320h] BYREF _BYTE v8[28]; // [rsp+B0h] [rbp-300h] _DWORD v9[180]; // [rsp+D0h] [rbp-2E0h] BYREF long long v10; // [rsp+3A0h] [rbp-10h] long long v11; // [rsp+3A8h] [rbp-8h] v11 = a1; v10 = a2; memcpy(v9, &unk_1EE100, sizeof(v9)); *(_OWORD *)&v8[12] = *(__int128 *)((char *)&xmmword_1EE3F0 + 12); *(_OWORD *)v8 = xmmword_1EE3F0; v7[1] = xmmword_1EE3E0; v7[0] = xmmword_1EE3D0; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SparseMatrix(v6); OpenSubdiv::v3_6_0::Far::convertToGregory<float>(v11, v6); v3 = v10; NumColumns = OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::GetNumColumns(v6); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_initializeFullMatrix<float>(v3, 0xCu, NumColumns); for ( i = 0; i < 12; ++i ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparseMatrixRowsInFull<float>( v10, i, (long long)v6, 15, (long long)v7, (long long)&v9[15 * i]); return OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix(v6); }
28,895
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void convertToLoop(SourcePatch const & sourcePatch, SparseMatrix<REAL> & matrix) { // // Unlike quads, there are not enough degrees of freedom in the regular patch // to enforce interpolation of the limit point and tangent at the corner while // preserving the two adjoining boundary curves. Since we end up destroying // neighboring conintuity in doing so, we use a fully constructed Gregory // patch here for the isolated corner case as well as the general case. // // Unfortunately, the regular patch here -- a quartic Box-spline triangle -- // is not as flexible as the BSpline patches for Catmark. Unlike BSplines // and Bezier patches, the Box-splines do not span the full space of possible // shapes (only 12 control points in a space spanned by 15 polynomials for // the quartic case). So it is possible to construct shapes with a Gregory // or Bezier triangle that cannot be represented by the Box-spline. // // The solution fits a Box-spline patch to the constructed Gregory patch with // a set of constraints. With quartic boundary curves, 12 constraints on the // boundary curve make this tightly constrained. Such a set of constraints // is rank deficient (11 instead of 12) so an additional constraint on the // midpoint of the patch is included and a conversion matrix is constructed // from the pseudo-inverse of the 13 constraints. // // For the full 12x15 conversion matrix from 15-point quartic Bezier patch // back to a Box spline patch, the matrix rows and columns are ordered // according to control point orientations used elsewhere. Correllation of // points between the Bezier and Gregory points is as follows: // // Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 // G0 G1 G15 G7 G5 G2 G3,4 G8,9 G6 G17 G13,14 G16 G11 G12 G10 // // As with conversion from Gregory to BSpline for Catmark, one of the face // points is chosen as a Bezier point in the conversion rather than combining // the pair (which would avoid slight asymmetric artefacts of the choice). // And given the solution now depends primarily on the boundary, its not // necessary to construct a full Gregory patch with enforced continuity. // REAL const gregoryToLoopMatrix[12][15] = { { 8.214411f, 7.571190f, -7.690082f, 2.237840f, -1.118922f,-16.428828f, 0.666666f, 0.666666f, 2.237835f, 6.309870f, 0.666666f, -1.690100f, -0.428812f, -0.428805f, 0.214407f }, { -0.304687f, 0.609374f, 6.752593f, 0.609374f, -0.304687f, 0.609378f, -3.333333f, -3.333333f, 0.609378f, -1.247389f, -3.333333f, -1.247389f, 3.276037f, 3.276037f, -1.638020f }, { -1.118922f, 2.237840f, -7.690082f, 7.571190f, 8.214411f, 2.237835f, 0.666666f, 0.666666f, -16.428828f, -1.690100f, 0.666666f, 6.309870f, -0.428805f, -0.428812f, 0.214407f }, { 8.214411f,-16.428828f, 6.309870f, -0.428812f, 0.214407f, 7.571190f, 0.666666f, 0.666666f, -0.428805f, -7.690082f, 0.666666f, -1.690100f, 2.237840f, 2.237835f, -1.118922f }, { -0.813368f, 1.626735f, -0.773435f, -1.039929f, 0.519965f, 1.626735f, 0.666666f, 0.666666f, -1.039930f, -0.773435f, 0.666666f, 1.226558f, -1.039929f, -1.039930f, 0.519965f }, { 0.519965f, -1.039929f, -0.773435f, 1.626735f, -0.813368f, -1.039930f, 0.666666f, 0.666666f, 1.626735f, 1.226558f, 0.666666f, -0.773435f, -1.039930f, -1.039929f, 0.519965f }, { 0.214407f, -0.428812f, 6.309870f,-16.428828f, 8.214411f, -0.428805f, 0.666666f, 0.666666f, 7.571190f, -1.690100f, 0.666666f, -7.690082f, 2.237835f, 2.237840f, -1.118922f }, { -0.304687f, 0.609378f, -1.247389f, 3.276037f, -1.638020f, 0.609374f, -3.333333f, -3.333333f, 3.276037f, 6.752593f, -3.333333f, -1.247389f, 0.609374f, 0.609378f, -0.304687f }, { 0.519965f, -1.039930f, 1.226558f, -1.039930f, 0.519965f, -1.039929f, 0.666666f, 0.666666f, -1.039929f, -0.773435f, 0.666666f, -0.773435f, 1.626735f, 1.626735f, -0.813368f }, { -1.638020f, 3.276037f, -1.247389f, 0.609378f, -0.304687f, 3.276037f, -3.333333f, -3.333333f, 0.609374f, -1.247389f, -3.333333f, 6.752593f, 0.609378f, 0.609374f, -0.304687f }, { -1.118922f, 2.237835f, -1.690100f, -0.428805f, 0.214407f, 2.237840f, 0.666666f, 0.666666f, -0.428812f, -7.690082f, 0.666666f, 6.309870f, 7.571190f,-16.428828f, 8.214411f }, { 0.214407f, -0.428805f, -1.690100f, 2.237835f, -1.118922f, -0.428812f, 0.666666f, 0.666666f, 2.237840f, 6.309870f, 0.666666f, -7.690082f,-16.428828f, 7.571190f, 8.214411f } }; int const gRowIndices[15] = { 0,1,15,7,5, 2,4,8,6, 17,14,16, 11,12, 10 }; SparseMatrix<REAL> G; convertToGregory<REAL>(sourcePatch, G); _initializeFullMatrix(matrix, 12, G.GetNumColumns()); for (int i = 0; i < 12; ++i) { REAL const * gRowWeights = gregoryToLoopMatrix[i]; _combineSparseMatrixRowsInFull(matrix, i, G, 15, gRowIndices, gRowWeights); } }
O1
cpp
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx xorl %eax, %eax leaq 0x20(%rsp), %rsi movq %rax, (%rsi) movl $0x0, 0x8(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) movups %xmm0, 0x20(%rsi) movups %xmm0, 0x30(%rsi) movups %xmm0, 0x40(%rsi) movq %rax, 0x50(%rsi) callq 0x39fd0 movl 0x24(%rsp), %r12d movl $0xc, (%rbx) movl %r12d, 0x4(%rbx) movl $0x0, 0x8(%rbx) leaq 0x10(%rbx), %rdi movq %rdi, 0x8(%rsp) xorl %esi, %esi callq 0x39690 movslq (%rbx), %rsi incq %rsi leaq 0x1c(%rsp), %rdx movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF movq 0x8(%rsp), %rdi callq 0x38f90 movslq %r12d, %rax shlq $0x2, %rax movq %rax, 0x10(%rsp) leaq (%rax,%rax,2), %r13 movq 0x10(%rbx), %rax movl $0x0, (%rax) leaq 0x40(%rbx), %rax movq %rax, (%rsp) movq 0x48(%rbx), %rax subq 0x40(%rbx), %rax shrq $0x2, %rax cmpl %eax, %r13d jle 0x5596c leaq 0x28(%rbx), %rdi movq %r13, %rsi callq 0x39690 movq (%rsp), %rdi movq %r13, %rsi callq 0x39a00 movq 0x10(%rbx), %r14 movl (%r14), %eax cmpl 0x8(%rbx), %eax jne 0x55b55 addl %r12d, %eax movl %eax, 0x4(%r14) movl %eax, 0x8(%rbx) movslq 0x4(%r14), %rsi movq 0x48(%rbx), %rax subq 0x40(%rbx), %rax shrq $0x2, %rax cmpl %eax, %esi jle 0x559b0 leaq 0x28(%rbx), %rdi callq 0x39690 movslq 0x4(%r14), %rsi movq (%rsp), %rdi callq 0x39a00 movq 0x10(%rbx), %rax movslq (%rax), %r13 shlq $0x2, %r13 addq 0x28(%rbx), %r13 testl %r12d, %r12d jle 0x559d3 xorl %eax, %eax movl %eax, (%r13,%rax,4) incq %rax cmpq %rax, %r12 jne 0x559c6 leaq 0x28(%rbx), %rbp xorl %r14d, %r14d movq 0x10(%rbx), %r15 movl 0x4(%r15,%r14,4), %eax cmpl 0x8(%rbx), %eax jne 0x55b55 addl %r12d, %eax movl %eax, 0x8(%r15,%r14,4) movl %eax, 0x8(%rbx) movslq 0x8(%r15,%r14,4), %rsi movq 0x48(%rbx), %rax subq 0x40(%rbx), %rax shrq $0x2, %rax cmpl %eax, %esi jle 0x55a22 movq %rbp, %rdi callq 0x39690 movslq 0x8(%r15,%r14,4), %rsi movq (%rsp), %rdi callq 0x39a00 movq 0x8(%rsp), %rax movq (%rax), %rax movslq 0x4(%rax,%r14,4), %rdi shlq $0x2, %rdi addq (%rbp), %rdi movq %r13, %rsi movq 0x10(%rsp), %rdx callq 0x39ad0 incq %r14 cmpq $0xb, %r14 jne 0x559da xorl %r15d, %r15d leaq 0x60589(%rip), %r12 # 0xb5fe0 leaq 0x60e42(%rip), %r13 # 0xb68a0 imulq $0x3c, %r15, %rbp addq %r12, %rbp movq 0x10(%rbx), %rax movslq (%rax,%r15,4), %r14 shlq $0x2, %r14 addq 0x40(%rbx), %r14 movslq 0x4(%rbx), %rdx shlq $0x2, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x391b0 xorps %xmm2, %xmm2 movq 0x30(%rsp), %rax movq 0x48(%rsp), %rcx movq 0x60(%rsp), %rdx xorl %esi, %esi movss (%rbp,%rsi,4), %xmm0 ucomiss %xmm2, %xmm0 jne 0x55aa8 jnp 0x55aeb movslq (%r13,%rsi,4), %rdi movslq (%rax,%rdi,4), %r8 movl 0x4(%rax,%rdi,4), %r9d subl %r8d, %r9d jle 0x55aeb leaq (%rcx,%r8,4), %rdi leaq (%rdx,%r8,4), %r8 movl %r9d, %r9d xorl %r10d, %r10d movslq (%rdi,%r10,4), %r11 movss (%r8,%r10,4), %xmm1 mulss %xmm0, %xmm1 addss (%r14,%r11,4), %xmm1 movss %xmm1, (%r14,%r11,4) incq %r10 cmpq %r10, %r9 jne 0x55ac9 incq %rsi cmpq $0xf, %rsi jne 0x55a9b incq %r15 cmpq $0xc, %r15 jne 0x55a5e movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x55b18 movq 0x70(%rsp), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x55b2f movq 0x58(%rsp), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x55b46 movq 0x40(%rsp), %rsi subq %rdi, %rsi callq 0x3a2d0 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5ec7f(%rip), %rdi # 0xb47db leaq 0x5ec9e(%rip), %rsi # 0xb4801 leaq 0x5ed08(%rip), %rcx # 0xb4872 movl $0x98, %edx callq 0x39560 jmp 0x55b76 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x3a3b0 movq %rbx, %rdi callq 0x3bd70
_ZN10OpenSubdiv6v3_6_03Far13convertToLoopIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rsi xor eax, eax lea rsi, [rsp+0A8h+var_88] mov [rsi], rax mov dword ptr [rsi+8], 0 xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 movups xmmword ptr [rsi+20h], xmm0 movups xmmword ptr [rsi+30h], xmm0 movups xmmword ptr [rsi+40h], xmm0 mov [rsi+50h], rax call __ZN10OpenSubdiv6v3_6_03Far16convertToGregoryIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) mov r12d, [rsp+0A8h+var_84] mov dword ptr [rbx], 0Ch mov [rbx+4], r12d mov dword ptr [rbx+8], 0 lea rdi, [rbx+10h] mov [rsp+0A8h+var_A0], rdi xor esi, esi call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [rbx] inc rsi lea rdx, [rsp+0A8h+var_8C] mov dword ptr [rdx], 0FFFFFFFFh mov rdi, [rsp+0A8h+var_A0] call __ZNSt6vectorIiSaIiEE6resizeEmRKi; std::vector<int>::resize(ulong,int const&) movsxd rax, r12d shl rax, 2 mov [rsp+0A8h+var_98], rax lea r13, [rax+rax*2] mov rax, [rbx+10h] mov dword ptr [rax], 0 lea rax, [rbx+40h] mov [rsp+0A8h+var_A8], rax mov rax, [rbx+48h] sub rax, [rbx+40h] shr rax, 2 cmp r13d, eax jle short loc_5596C lea rdi, [rbx+28h] mov rsi, r13 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rdi, [rsp+0A8h+var_A8] mov rsi, r13 call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) loc_5596C: mov r14, [rbx+10h] mov eax, [r14] cmp eax, [rbx+8] jnz loc_55B55 add eax, r12d mov [r14+4], eax mov [rbx+8], eax movsxd rsi, dword ptr [r14+4] mov rax, [rbx+48h] sub rax, [rbx+40h] shr rax, 2 cmp esi, eax jle short loc_559B0 lea rdi, [rbx+28h] call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [r14+4] mov rdi, [rsp+0A8h+var_A8] call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) loc_559B0: mov rax, [rbx+10h] movsxd r13, dword ptr [rax] shl r13, 2 add r13, [rbx+28h] test r12d, r12d jle short loc_559D3 xor eax, eax loc_559C6: mov [r13+rax*4+0], eax inc rax cmp r12, rax jnz short loc_559C6 loc_559D3: lea rbp, [rbx+28h] xor r14d, r14d loc_559DA: mov r15, [rbx+10h] mov eax, [r15+r14*4+4] cmp eax, [rbx+8] jnz loc_55B55 add eax, r12d mov [r15+r14*4+8], eax mov [rbx+8], eax movsxd rsi, dword ptr [r15+r14*4+8] mov rax, [rbx+48h] sub rax, [rbx+40h] shr rax, 2 cmp esi, eax jle short loc_55A22 mov rdi, rbp call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [r15+r14*4+8] mov rdi, [rsp+0A8h+var_A8] call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) loc_55A22: mov rax, [rsp+0A8h+var_A0] mov rax, [rax] movsxd rdi, dword ptr [rax+r14*4+4] shl rdi, 2 add rdi, [rbp+0] mov rsi, r13 mov rdx, [rsp+0A8h+var_98] call _memcpy inc r14 cmp r14, 0Bh jnz short loc_559DA xor r15d, r15d lea r12, unk_B5FE0 lea r13, unk_B68A0 loc_55A5E: imul rbp, r15, 3Ch ; '<' add rbp, r12 mov rax, [rbx+10h] movsxd r14, dword ptr [rax+r15*4] shl r14, 2 add r14, [rbx+40h] movsxd rdx, dword ptr [rbx+4] shl rdx, 2 mov rdi, r14 xor esi, esi call _memset xorps xmm2, xmm2 mov rax, [rsp+0A8h+var_78] mov rcx, [rsp+0A8h+var_60] mov rdx, [rsp+0A8h+var_48] xor esi, esi loc_55A9B: movss xmm0, dword ptr [rbp+rsi*4+0] ucomiss xmm0, xmm2 jnz short loc_55AA8 jnp short loc_55AEB loc_55AA8: movsxd rdi, dword ptr [r13+rsi*4+0] movsxd r8, dword ptr [rax+rdi*4] mov r9d, [rax+rdi*4+4] sub r9d, r8d jle short loc_55AEB lea rdi, [rcx+r8*4] lea r8, [rdx+r8*4] mov r9d, r9d xor r10d, r10d loc_55AC9: movsxd r11, dword ptr [rdi+r10*4] movss xmm1, dword ptr [r8+r10*4] mulss xmm1, xmm0 addss xmm1, dword ptr [r14+r11*4] movss dword ptr [r14+r11*4], xmm1 inc r10 cmp r9, r10 jnz short loc_55AC9 loc_55AEB: inc rsi cmp rsi, 0Fh jnz short loc_55A9B inc r15 cmp r15, 0Ch jnz loc_55A5E mov rdi, [rsp+0A8h+var_48]; void * test rdi, rdi jz short loc_55B18 mov rsi, [rsp+0A8h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_55B18: mov rdi, [rsp+0A8h+var_60]; void * test rdi, rdi jz short loc_55B2F mov rsi, [rsp+0A8h+var_50] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_55B2F: mov rdi, [rsp+0A8h+var_78]; void * test rdi, rdi jz short loc_55B46 mov rsi, [rsp+0A8h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_55B46: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55B55: lea rdi, aRowoffsetsRowi; "_rowOffsets[rowIndex] == _numElements" lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_15; "void OpenSubdiv::v3_6_0::Far::SparseMat"... mov edx, 98h call ___assert_fail jmp short $+2 loc_55B76: mov rbx, rax lea rdi, [rsp+0A8h+var_88] call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix() mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(long long a1, int *a2) { long long v3; // r12 long long v4; // rsi long long v5; // rcx long long v6; // r8 long long v7; // r9 _DWORD *v8; // r14 int v9; // eax long long v10; // rsi long long v11; // r13 long long i; // rax long long j; // r14 long long v14; // r15 int v15; // eax int v16; // eax long long v17; // rsi long long k; // r15 long long v19; // r14 long long v20; // rax long long v21; // rcx long long v22; // rdx long long m; // rsi float v24; // xmm0_4 long long v25; // rdi long long v26; // r8 int v27; // r9d bool v28; // cc int v29; // r9d long long v30; // rdi long long v31; // r8 long long v32; // r10 int *v33; // [rsp+0h] [rbp-A8h] _QWORD *v34; // [rsp+8h] [rbp-A0h] int v35; // [rsp+1Ch] [rbp-8Ch] BYREF long long v36; // [rsp+20h] [rbp-88h] BYREF int v37; // [rsp+28h] [rbp-80h] __int128 v38; // [rsp+30h] [rbp-78h] __int128 v39; // [rsp+40h] [rbp-68h] __int128 v40; // [rsp+50h] [rbp-58h] __int128 v41; // [rsp+60h] [rbp-48h] long long v42; // [rsp+70h] [rbp-38h] v36 = 0LL; v37 = 0; v38 = 0LL; v39 = 0LL; v40 = 0LL; v41 = 0LL; v42 = 0LL; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(a1, &v36); v3 = HIDWORD(v36); *a2 = 12; *(_QWORD *)(a2 + 1) = (unsigned int)v3; v34 = a2 + 4; std::vector<int>::resize(a2 + 4, 0LL); v4 = *a2 + 1LL; v35 = -1; std::vector<int>::resize(v34, v4, &v35); **((_DWORD **)a2 + 2) = 0; v33 = a2 + 16; if ( 12 * (int)v3 > (int)((*((_QWORD *)a2 + 9) - *((_QWORD *)a2 + 8)) >> 2) ) { std::vector<int>::resize(a2 + 10, 12LL * (int)v3); std::vector<float>::resize(v33, 12LL * (int)v3); } v8 = (_DWORD *)*((_QWORD *)a2 + 2); if ( *v8 != a2[2] ) LABEL_29: __assert_fail( "_rowOffsets[rowIndex] == _numElements", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h", 152LL, "void OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int, int) [REAL = float]"); v9 = v3 + *v8; v8[1] = v9; a2[2] = v9; v10 = (int)v8[1]; if ( (int)v10 > (int)((*((_QWORD *)a2 + 9) - *((_QWORD *)a2 + 8)) >> 2) ) { std::vector<int>::resize(a2 + 10, v10); std::vector<float>::resize(v33, (int)v8[1]); } v11 = *((_QWORD *)a2 + 5) + 4LL * **((int **)a2 + 2); if ( (int)v3 > 0 ) { for ( i = 0LL; i != v3; ++i ) *(_DWORD *)(v11 + 4 * i) = i; } for ( j = 0LL; j != 11; ++j ) { v14 = *((_QWORD *)a2 + 2); v15 = *(_DWORD *)(v14 + 4 * j + 4); if ( v15 != a2[2] ) goto LABEL_29; v16 = v3 + v15; *(_DWORD *)(v14 + 4 * j + 8) = v16; a2[2] = v16; v17 = *(int *)(v14 + 4 * j + 8); if ( (int)v17 > (int)((*((_QWORD *)a2 + 9) - *((_QWORD *)a2 + 8)) >> 2) ) { std::vector<int>::resize(a2 + 10, v17); std::vector<float>::resize(v33, *(int *)(v14 + 4 * j + 8)); } memcpy(*((_QWORD *)a2 + 5) + 4LL * *(int *)(*v34 + 4 * j + 4), v11, 4LL * (int)v3, v5, v6, v7); } for ( k = 0LL; k != 12; ++k ) { v19 = *((_QWORD *)a2 + 8) + 4LL * *(int *)(*((_QWORD *)a2 + 2) + 4 * k); memset(v19, 0LL, 4LL * a2[1]); v20 = v38; v21 = *((_QWORD *)&v39 + 1); v22 = v41; for ( m = 0LL; m != 15; ++m ) { v24 = flt_B5FE0[15 * k + m]; if ( v24 != 0.0 ) { v25 = dword_B68A0[m]; v26 = *(int *)(v20 + 4 * v25); v27 = *(_DWORD *)(v20 + 4 * v25 + 4); v28 = v27 <= (int)v26; v29 = v27 - v26; if ( !v28 ) { v30 = v21 + 4 * v26; v31 = v22 + 4 * v26; v32 = 0LL; do { *(float *)(v19 + 4LL * *(int *)(v30 + 4 * v32)) = (float)(*(float *)(v31 + 4 * v32) * v24) + *(float *)(v19 + 4LL * *(int *)(v30 + 4 * v32)); ++v32; } while ( v29 != v32 ); } } } } if ( (_QWORD)v41 ) operator delete((void *)v41, v42 - v41); if ( *((_QWORD *)&v39 + 1) ) operator delete(*((void **)&v39 + 1), *((_QWORD *)&v40 + 1) - *((_QWORD *)&v39 + 1)); if ( (_QWORD)v38 ) operator delete((void *)v38, v39 - v38); }
convertToLoop<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RSI XOR EAX,EAX LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],RAX MOV dword ptr [RSI + 0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOVUPS xmmword ptr [RSI + 0x20],XMM0 MOVUPS xmmword ptr [RSI + 0x30],XMM0 MOVUPS xmmword ptr [RSI + 0x40],XMM0 MOV qword ptr [RSI + 0x50],RAX LAB_001558db: CALL 0x00139fd0 MOV R12D,dword ptr [RSP + 0x24] MOV dword ptr [RBX],0xc MOV dword ptr [RBX + 0x4],R12D MOV dword ptr [RBX + 0x8],0x0 LEA RDI,[RBX + 0x10] MOV qword ptr [RSP + 0x8],RDI XOR ESI,ESI CALL 0x00139690 MOVSXD RSI,dword ptr [RBX] INC RSI LEA RDX,[RSP + 0x1c] MOV dword ptr [RDX],0xffffffff MOV RDI,qword ptr [RSP + 0x8] CALL 0x00138f90 MOVSXD RAX,R12D SHL RAX,0x2 MOV qword ptr [RSP + 0x10],RAX LEA R13,[RAX + RAX*0x2] MOV RAX,qword ptr [RBX + 0x10] MOV dword ptr [RAX],0x0 LEA RAX,[RBX + 0x40] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RBX + 0x48] SUB RAX,qword ptr [RBX + 0x40] SHR RAX,0x2 CMP R13D,EAX JLE 0x0015596c LEA RDI,[RBX + 0x28] MOV RSI,R13 CALL 0x00139690 MOV RDI,qword ptr [RSP] MOV RSI,R13 CALL 0x00139a00 LAB_0015596c: MOV R14,qword ptr [RBX + 0x10] MOV EAX,dword ptr [R14] CMP EAX,dword ptr [RBX + 0x8] JNZ 0x00155b55 ADD EAX,R12D MOV dword ptr [R14 + 0x4],EAX MOV dword ptr [RBX + 0x8],EAX MOVSXD RSI,dword ptr [R14 + 0x4] MOV RAX,qword ptr [RBX + 0x48] SUB RAX,qword ptr [RBX + 0x40] SHR RAX,0x2 CMP ESI,EAX JLE 0x001559b0 LEA RDI,[RBX + 0x28] CALL 0x00139690 MOVSXD RSI,dword ptr [R14 + 0x4] MOV RDI,qword ptr [RSP] CALL 0x00139a00 LAB_001559b0: MOV RAX,qword ptr [RBX + 0x10] MOVSXD R13,dword ptr [RAX] SHL R13,0x2 ADD R13,qword ptr [RBX + 0x28] TEST R12D,R12D JLE 0x001559d3 XOR EAX,EAX LAB_001559c6: MOV dword ptr [R13 + RAX*0x4],EAX INC RAX CMP R12,RAX JNZ 0x001559c6 LAB_001559d3: LEA RBP,[RBX + 0x28] XOR R14D,R14D LAB_001559da: MOV R15,qword ptr [RBX + 0x10] MOV EAX,dword ptr [R15 + R14*0x4 + 0x4] CMP EAX,dword ptr [RBX + 0x8] JNZ 0x00155b55 ADD EAX,R12D MOV dword ptr [R15 + R14*0x4 + 0x8],EAX MOV dword ptr [RBX + 0x8],EAX MOVSXD RSI,dword ptr [R15 + R14*0x4 + 0x8] MOV RAX,qword ptr [RBX + 0x48] SUB RAX,qword ptr [RBX + 0x40] SHR RAX,0x2 CMP ESI,EAX JLE 0x00155a22 LAB_00155a0c: MOV RDI,RBP CALL 0x00139690 MOVSXD RSI,dword ptr [R15 + R14*0x4 + 0x8] MOV RDI,qword ptr [RSP] CALL 0x00139a00 LAB_00155a22: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOVSXD RDI,dword ptr [RAX + R14*0x4 + 0x4] SHL RDI,0x2 ADD RDI,qword ptr [RBP] MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x10] CALL 0x00139ad0 INC R14 CMP R14,0xb JNZ 0x001559da XOR R15D,R15D LEA R12,[0x1b5fe0] LEA R13,[0x1b68a0] LAB_00155a5e: IMUL RBP,R15,0x3c ADD RBP,R12 MOV RAX,qword ptr [RBX + 0x10] MOVSXD R14,dword ptr [RAX + R15*0x4] SHL R14,0x2 ADD R14,qword ptr [RBX + 0x40] MOVSXD RDX,dword ptr [RBX + 0x4] SHL RDX,0x2 MOV RDI,R14 XOR ESI,ESI CALL 0x001391b0 XORPS XMM2,XMM2 MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x60] XOR ESI,ESI LAB_00155a9b: MOVSS XMM0,dword ptr [RBP + RSI*0x4] UCOMISS XMM0,XMM2 JNZ 0x00155aa8 JNP 0x00155aeb LAB_00155aa8: MOVSXD RDI,dword ptr [R13 + RSI*0x4] MOVSXD R8,dword ptr [RAX + RDI*0x4] MOV R9D,dword ptr [RAX + RDI*0x4 + 0x4] SUB R9D,R8D JLE 0x00155aeb LEA RDI,[RCX + R8*0x4] LEA R8,[RDX + R8*0x4] MOV R9D,R9D XOR R10D,R10D LAB_00155ac9: MOVSXD R11,dword ptr [RDI + R10*0x4] MOVSS XMM1,dword ptr [R8 + R10*0x4] MULSS XMM1,XMM0 ADDSS XMM1,dword ptr [R14 + R11*0x4] MOVSS dword ptr [R14 + R11*0x4],XMM1 INC R10 CMP R9,R10 JNZ 0x00155ac9 LAB_00155aeb: INC RSI CMP RSI,0xf JNZ 0x00155a9b INC R15 CMP R15,0xc JNZ 0x00155a5e MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x00155b18 MOV RSI,qword ptr [RSP + 0x70] SUB RSI,RDI CALL 0x0013a2d0 LAB_00155b18: MOV RDI,qword ptr [RSP + 0x48] TEST RDI,RDI JZ 0x00155b2f MOV RSI,qword ptr [RSP + 0x58] SUB RSI,RDI CALL 0x0013a2d0 LAB_00155b2f: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00155b46 MOV RSI,qword ptr [RSP + 0x40] SUB RSI,RDI CALL 0x0013a2d0 LAB_00155b46: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155b55: LEA RDI,[0x1b47db] LEA RSI,[0x1b4801] LEA RCX,[0x1b4872] MOV EDX,0x98 CALL 0x00139560
/* void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) */ void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(SourcePatch *param_1,SparseMatrix *param_2) { vector<int,std::allocator<int>> *this; vector<float,std::allocator<float>> *this_00; float fVar1; int iVar2; int *piVar3; int iVar4; ulong uVar5; long lVar6; uint uVar7; long lVar8; ulong uVar9; void *pvVar10; long lVar11; int local_8c; int8 local_88; int4 local_80; void *local_78; int8 uStack_70; long local_68; void *pvStack_60; int8 local_58; long lStack_50; void *local_48; int8 uStack_40; long local_38; local_88 = 0; local_80 = 0; local_78 = (void *)0x0; uStack_70 = 0; local_68 = 0; pvStack_60 = (void *)0x0; local_58 = 0; lStack_50 = 0; local_48 = (void *)0x0; uStack_40 = 0; local_38 = 0; /* try { // try from 001558db to 001559af has its CatchHandler @ 00155b74 */ convertToGregory<float>(param_1,(SparseMatrix *)&local_88); uVar7 = local_88._4_4_; uVar9 = (ulong)local_88._4_4_; *(int4 *)param_2 = 0xc; *(uint *)(param_2 + 4) = local_88._4_4_; *(int4 *)(param_2 + 8) = 0; this = (vector<int,std::allocator<int>> *)(param_2 + 0x10); std::vector<int,std::allocator<int>>::resize(this,0); local_8c = -1; std::vector<int,std::allocator<int>>::resize(this,(long)*(int *)param_2 + 1,&local_8c); uVar5 = (long)(int)uVar7 * 0xc; **(int4 **)(param_2 + 0x10) = 0; this_00 = (vector<float,std::allocator<float>> *)(param_2 + 0x40); if ((int)((ulong)(*(long *)(param_2 + 0x48) - *(long *)(param_2 + 0x40)) >> 2) < (int)uVar5) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(param_2 + 0x28),uVar5); std::vector<float,std::allocator<float>>::resize(this_00,uVar5); } piVar3 = *(int **)(param_2 + 0x10); if (*piVar3 == *(int *)(param_2 + 8)) { iVar4 = *piVar3 + uVar7; piVar3[1] = iVar4; *(int *)(param_2 + 8) = iVar4; if ((int)((ulong)(*(long *)(param_2 + 0x48) - *(long *)(param_2 + 0x40)) >> 2) < piVar3[1]) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(param_2 + 0x28),(long)piVar3[1]); std::vector<float,std::allocator<float>>::resize(this_00,(long)piVar3[1]); } pvVar10 = (void *)((long)**(int **)(param_2 + 0x10) * 4 + *(long *)(param_2 + 0x28)); if (0 < (int)uVar7) { uVar5 = 0; do { *(int *)((long)pvVar10 + uVar5 * 4) = (int)uVar5; uVar5 = uVar5 + 1; } while (uVar9 != uVar5); } lVar11 = 0; while( true ) { lVar6 = *(long *)(param_2 + 0x10); iVar4 = *(int *)(lVar6 + 4 + lVar11 * 4); if (iVar4 != *(int *)(param_2 + 8)) break; iVar4 = iVar4 + uVar7; *(int *)(lVar6 + 8 + lVar11 * 4) = iVar4; *(int *)(param_2 + 8) = iVar4; iVar4 = *(int *)(lVar6 + 8 + lVar11 * 4); if ((int)((ulong)(*(long *)(param_2 + 0x48) - *(long *)(param_2 + 0x40)) >> 2) < iVar4) { /* try { // try from 00155a0c to 00155a21 has its CatchHandler @ 00155b76 */ std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(param_2 + 0x28),(long)iVar4); std::vector<float,std::allocator<float>>::resize (this_00,(long)*(int *)(lVar6 + 8 + lVar11 * 4)); } memcpy((void *)((long)*(int *)(*(long *)this + 4 + lVar11 * 4) * 4 + *(long *)(param_2 + 0x28) ),pvVar10,(long)(int)uVar7 * 4); lVar11 = lVar11 + 1; if (lVar11 == 0xb) { lVar11 = 0; do { pvVar10 = (void *)((long)*(int *)(*(long *)(param_2 + 0x10) + lVar11 * 4) * 4 + *(long *)(param_2 + 0x40)); memset(pvVar10,0,(long)*(int *)(param_2 + 4) << 2); lVar6 = 0; do { fVar1 = (float)(&DAT_001b5fe0)[lVar11 * 0xf + lVar6]; if ((fVar1 != 0.0) || (NAN(fVar1))) { iVar4 = *(int *)((long)local_78 + (long)(int)(&DAT_001b68a0)[lVar6] * 4); iVar2 = *(int *)((long)local_78 + (long)(int)(&DAT_001b68a0)[lVar6] * 4 + 4); uVar7 = iVar2 - iVar4; if (uVar7 != 0 && iVar4 <= iVar2) { uVar5 = 0; do { lVar8 = (long)*(int *)((long)pvStack_60 + uVar5 * 4 + (long)iVar4 * 4); *(float *)((long)pvVar10 + lVar8 * 4) = *(float *)((long)local_48 + uVar5 * 4 + (long)iVar4 * 4) * fVar1 + *(float *)((long)pvVar10 + lVar8 * 4); uVar5 = uVar5 + 1; } while (uVar7 != uVar5); } } lVar6 = lVar6 + 1; } while (lVar6 != 0xf); lVar11 = lVar11 + 1; } while (lVar11 != 0xc); if (local_48 != (void *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } if (pvStack_60 != (void *)0x0) { operator_delete(pvStack_60,lStack_50 - (long)pvStack_60); } if (local_78 != (void *)0x0) { operator_delete(local_78,local_68 - (long)local_78); } return; } } } /* WARNING: Subroutine does not return */ __assert_fail("_rowOffsets[rowIndex] == _numElements", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h" ,0x98, "void OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int, int) [REAL = float]" ); }
28,896
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void convertToLoop(SourcePatch const & sourcePatch, SparseMatrix<REAL> & matrix) { // // Unlike quads, there are not enough degrees of freedom in the regular patch // to enforce interpolation of the limit point and tangent at the corner while // preserving the two adjoining boundary curves. Since we end up destroying // neighboring conintuity in doing so, we use a fully constructed Gregory // patch here for the isolated corner case as well as the general case. // // Unfortunately, the regular patch here -- a quartic Box-spline triangle -- // is not as flexible as the BSpline patches for Catmark. Unlike BSplines // and Bezier patches, the Box-splines do not span the full space of possible // shapes (only 12 control points in a space spanned by 15 polynomials for // the quartic case). So it is possible to construct shapes with a Gregory // or Bezier triangle that cannot be represented by the Box-spline. // // The solution fits a Box-spline patch to the constructed Gregory patch with // a set of constraints. With quartic boundary curves, 12 constraints on the // boundary curve make this tightly constrained. Such a set of constraints // is rank deficient (11 instead of 12) so an additional constraint on the // midpoint of the patch is included and a conversion matrix is constructed // from the pseudo-inverse of the 13 constraints. // // For the full 12x15 conversion matrix from 15-point quartic Bezier patch // back to a Box spline patch, the matrix rows and columns are ordered // according to control point orientations used elsewhere. Correllation of // points between the Bezier and Gregory points is as follows: // // Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 // G0 G1 G15 G7 G5 G2 G3,4 G8,9 G6 G17 G13,14 G16 G11 G12 G10 // // As with conversion from Gregory to BSpline for Catmark, one of the face // points is chosen as a Bezier point in the conversion rather than combining // the pair (which would avoid slight asymmetric artefacts of the choice). // And given the solution now depends primarily on the boundary, its not // necessary to construct a full Gregory patch with enforced continuity. // REAL const gregoryToLoopMatrix[12][15] = { { 8.214411f, 7.571190f, -7.690082f, 2.237840f, -1.118922f,-16.428828f, 0.666666f, 0.666666f, 2.237835f, 6.309870f, 0.666666f, -1.690100f, -0.428812f, -0.428805f, 0.214407f }, { -0.304687f, 0.609374f, 6.752593f, 0.609374f, -0.304687f, 0.609378f, -3.333333f, -3.333333f, 0.609378f, -1.247389f, -3.333333f, -1.247389f, 3.276037f, 3.276037f, -1.638020f }, { -1.118922f, 2.237840f, -7.690082f, 7.571190f, 8.214411f, 2.237835f, 0.666666f, 0.666666f, -16.428828f, -1.690100f, 0.666666f, 6.309870f, -0.428805f, -0.428812f, 0.214407f }, { 8.214411f,-16.428828f, 6.309870f, -0.428812f, 0.214407f, 7.571190f, 0.666666f, 0.666666f, -0.428805f, -7.690082f, 0.666666f, -1.690100f, 2.237840f, 2.237835f, -1.118922f }, { -0.813368f, 1.626735f, -0.773435f, -1.039929f, 0.519965f, 1.626735f, 0.666666f, 0.666666f, -1.039930f, -0.773435f, 0.666666f, 1.226558f, -1.039929f, -1.039930f, 0.519965f }, { 0.519965f, -1.039929f, -0.773435f, 1.626735f, -0.813368f, -1.039930f, 0.666666f, 0.666666f, 1.626735f, 1.226558f, 0.666666f, -0.773435f, -1.039930f, -1.039929f, 0.519965f }, { 0.214407f, -0.428812f, 6.309870f,-16.428828f, 8.214411f, -0.428805f, 0.666666f, 0.666666f, 7.571190f, -1.690100f, 0.666666f, -7.690082f, 2.237835f, 2.237840f, -1.118922f }, { -0.304687f, 0.609378f, -1.247389f, 3.276037f, -1.638020f, 0.609374f, -3.333333f, -3.333333f, 3.276037f, 6.752593f, -3.333333f, -1.247389f, 0.609374f, 0.609378f, -0.304687f }, { 0.519965f, -1.039930f, 1.226558f, -1.039930f, 0.519965f, -1.039929f, 0.666666f, 0.666666f, -1.039929f, -0.773435f, 0.666666f, -0.773435f, 1.626735f, 1.626735f, -0.813368f }, { -1.638020f, 3.276037f, -1.247389f, 0.609378f, -0.304687f, 3.276037f, -3.333333f, -3.333333f, 0.609374f, -1.247389f, -3.333333f, 6.752593f, 0.609378f, 0.609374f, -0.304687f }, { -1.118922f, 2.237835f, -1.690100f, -0.428805f, 0.214407f, 2.237840f, 0.666666f, 0.666666f, -0.428812f, -7.690082f, 0.666666f, 6.309870f, 7.571190f,-16.428828f, 8.214411f }, { 0.214407f, -0.428805f, -1.690100f, 2.237835f, -1.118922f, -0.428812f, 0.666666f, 0.666666f, 2.237840f, 6.309870f, 0.666666f, -7.690082f,-16.428828f, 7.571190f, 8.214411f } }; int const gRowIndices[15] = { 0,1,15,7,5, 2,4,8,6, 17,14,16, 11,12, 10 }; SparseMatrix<REAL> G; convertToGregory<REAL>(sourcePatch, G); _initializeFullMatrix(matrix, 12, G.GetNumColumns()); for (int i = 0; i < 12; ++i) { REAL const * gRowWeights = gregoryToLoopMatrix[i]; _combineSparseMatrixRowsInFull(matrix, i, G, 15, gRowIndices, gRowWeights); } }
O2
cpp
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %rbx movq %rsp, %rsi andq $0x0, (%rsi) andl $0x0, 0x8(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) movups %xmm0, 0x20(%rsi) movups %xmm0, 0x30(%rsi) movups %xmm0, 0x40(%rsi) andq $0x0, 0x50(%rsi) callq 0x523b0 movl 0x4(%rsp), %ebp imull $0xc, %ebp, %ecx pushq $0xc popq %rsi movq %rbx, %rdi movl %ebp, %edx callq 0x55710 xorl %r12d, %r12d movq %rbx, %rdi xorl %esi, %esi movl %ebp, %edx callq 0x54140 movslq %ebp, %r14 movq 0x10(%rbx), %rax movslq (%rax), %r15 shlq $0x2, %r15 addq 0x28(%rbx), %r15 testl %ebp, %ebp movl $0x0, %eax cmovgl %ebp, %eax cmpq %r12, %rax je 0x6bef2 movl %r12d, (%r15,%r12,4) incq %r12 jmp 0x6bee4 shlq $0x2, %r14 pushq $0x1 popq %r12 cmpq $0xc, %r12 je 0x6bf2d movq %rbx, %rdi movl %r12d, %esi movl %ebp, %edx callq 0x54140 movq 0x10(%rbx), %rax movslq (%rax,%r12,4), %rdi shlq $0x2, %rdi addq 0x28(%rbx), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x51bd0 incq %r12 jmp 0x6befa xorl %r15d, %r15d leaq 0x54d19(%rip), %r13 # 0xc0c50 xorl %ebp, %ebp cmpq $0xc, %rbp je 0x6bfee imulq $0x3c, %rbp, %r12 leaq 0x54442(%rip), %rax # 0xc0390 addq %rax, %r12 movq 0x10(%rbx), %rax movslq (%rax,%rbp,4), %r14 shlq $0x2, %r14 addq 0x40(%rbx), %r14 movslq 0x4(%rbx), %rdx shlq $0x2, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x50c10 xorps %xmm2, %xmm2 movq 0x10(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x40(%rsp), %rdx xorl %esi, %esi cmpq $0xf, %rsi je 0x6bfe6 movss (%r12,%rsi,4), %xmm0 ucomiss %xmm2, %xmm0 jne 0x6bf9f jp 0x6bf9f incq %rsi jmp 0x6bf87 movslq (%r13,%rsi,4), %r8 movslq (%rax,%r8,4), %r9 leaq (%rcx,%r9,4), %rdi movl 0x4(%rax,%r8,4), %r8d subl %r9d, %r8d leaq (%rdx,%r9,4), %r9 testl %r8d, %r8d cmovlel %r15d, %r8d xorl %r10d, %r10d cmpq %r10, %r8 je 0x6bf9a movslq (%rdi,%r10,4), %r11 movss (%r9,%r10,4), %xmm1 mulss %xmm0, %xmm1 addss (%r14,%r11,4), %xmm1 movss %xmm1, (%r14,%r11,4) incq %r10 jmp 0x6bfc2 incq %rbp jmp 0x6bf39 movq %rsp, %rdi callq 0x529e0 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x6c007 movq %rax, %rbx movq %rsp, %rdi callq 0x529e0 movq %rbx, %rdi callq 0x55300
_ZN10OpenSubdiv6v3_6_03Far13convertToLoopIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rsi mov rsi, rsp and qword ptr [rsi], 0 and dword ptr [rsi+8], 0 xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 movups xmmword ptr [rsi+20h], xmm0 movups xmmword ptr [rsi+30h], xmm0 movups xmmword ptr [rsi+40h], xmm0 and qword ptr [rsi+50h], 0 call __ZN10OpenSubdiv6v3_6_03Far16convertToGregoryIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) mov ebp, [rsp+88h+var_84] imul ecx, ebp, 0Ch push 0Ch pop rsi mov rdi, rbx mov edx, ebp call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfE6ResizeEiii; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::Resize(int,int,int) xor r12d, r12d mov rdi, rbx xor esi, esi mov edx, ebp call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfE10SetRowSizeEii; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int,int) movsxd r14, ebp mov rax, [rbx+10h] movsxd r15, dword ptr [rax] shl r15, 2 add r15, [rbx+28h] test ebp, ebp mov eax, 0 cmovg eax, ebp loc_6BEE4: cmp rax, r12 jz short loc_6BEF2 mov [r15+r12*4], r12d inc r12 jmp short loc_6BEE4 loc_6BEF2: shl r14, 2 push 1 pop r12 loc_6BEFA: cmp r12, 0Ch jz short loc_6BF2D mov rdi, rbx mov esi, r12d mov edx, ebp call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfE10SetRowSizeEii; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int,int) mov rax, [rbx+10h] movsxd rdi, dword ptr [rax+r12*4] shl rdi, 2 add rdi, [rbx+28h] mov rsi, r15 mov rdx, r14 call _memcpy inc r12 jmp short loc_6BEFA loc_6BF2D: xor r15d, r15d lea r13, unk_C0C50 xor ebp, ebp loc_6BF39: cmp rbp, 0Ch jz loc_6BFEE imul r12, rbp, 3Ch ; '<' lea rax, unk_C0390 add r12, rax mov rax, [rbx+10h] movsxd r14, dword ptr [rax+rbp*4] shl r14, 2 add r14, [rbx+40h] movsxd rdx, dword ptr [rbx+4] shl rdx, 2 mov rdi, r14 xor esi, esi call _memset xorps xmm2, xmm2 mov rax, [rsp+88h+var_78] mov rcx, [rsp+88h+var_60] mov rdx, [rsp+88h+var_48] xor esi, esi loc_6BF87: cmp rsi, 0Fh jz short loc_6BFE6 movss xmm0, dword ptr [r12+rsi*4] ucomiss xmm0, xmm2 jnz short loc_6BF9F jp short loc_6BF9F loc_6BF9A: inc rsi jmp short loc_6BF87 loc_6BF9F: movsxd r8, dword ptr [r13+rsi*4+0] movsxd r9, dword ptr [rax+r8*4] lea rdi, [rcx+r9*4] mov r8d, [rax+r8*4+4] sub r8d, r9d lea r9, [rdx+r9*4] test r8d, r8d cmovle r8d, r15d xor r10d, r10d loc_6BFC2: cmp r8, r10 jz short loc_6BF9A movsxd r11, dword ptr [rdi+r10*4] movss xmm1, dword ptr [r9+r10*4] mulss xmm1, xmm0 addss xmm1, dword ptr [r14+r11*4] movss dword ptr [r14+r11*4], xmm1 inc r10 jmp short loc_6BFC2 loc_6BFE6: inc rbp jmp loc_6BF39 loc_6BFEE: mov rdi, rsp call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix() add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_6C007: mov rbx, rax mov rdi, rsp call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix() mov rdi, rbx call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::convertToLoop<float>(long long a1, long long a2) { int v3; // ebp long long v4; // r12 long long v5; // r15 long long v6; // rax long long i; // r12 long long v8; // rcx long long v9; // r8 long long v10; // r9 long long j; // rbp long long v12; // r14 long long v13; // rax long long v14; // rcx long long v15; // rdx long long k; // rsi float v17; // xmm0_4 long long v18; // r8 long long v19; // r9 long long v20; // rdi long long v21; // r8 long long v22; // r9 long long m; // r10 long long v25; // [rsp+0h] [rbp-88h] BYREF int v26; // [rsp+8h] [rbp-80h] __int128 v27; // [rsp+10h] [rbp-78h] __int128 v28; // [rsp+20h] [rbp-68h] __int128 v29; // [rsp+30h] [rbp-58h] __int128 v30; // [rsp+40h] [rbp-48h] long long v31; // [rsp+50h] [rbp-38h] v25 = 0LL; v26 = 0; v27 = 0LL; v28 = 0LL; v29 = 0LL; v30 = 0LL; v31 = 0LL; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(a1, &v25); v3 = HIDWORD(v25); OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::Resize(a2, 12LL, HIDWORD(v25), (unsigned int)(12 * HIDWORD(v25))); v4 = 0LL; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(a2, 0LL, (unsigned int)v3); v5 = *(_QWORD *)(a2 + 40) + 4LL * **(int **)(a2 + 16); v6 = 0LL; if ( v3 > 0 ) v6 = (unsigned int)v3; while ( v6 != v4 ) { *(_DWORD *)(v5 + 4 * v4) = v4; ++v4; } for ( i = 1LL; i != 12; ++i ) { OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(a2, (unsigned int)i, (unsigned int)v3); memcpy(*(_QWORD *)(a2 + 40) + 4LL * *(int *)(*(_QWORD *)(a2 + 16) + 4 * i), v5, 4LL * v3, v8, v9, v10); } for ( j = 0LL; j != 12; ++j ) { v12 = *(_QWORD *)(a2 + 64) + 4LL * *(int *)(*(_QWORD *)(a2 + 16) + 4 * j); memset(v12, 0LL, 4LL * *(int *)(a2 + 4)); v13 = v27; v14 = *((_QWORD *)&v28 + 1); v15 = v30; for ( k = 0LL; k != 15; ++k ) { v17 = flt_C0390[15 * j + k]; if ( v17 != 0.0 ) { v18 = dword_C0C50[k]; v19 = *(int *)(v13 + 4 * v18); v20 = v14 + 4 * v19; v21 = (unsigned int)(*(_DWORD *)(v13 + 4 * v18 + 4) - v19); v22 = v15 + 4 * v19; if ( (int)v21 <= 0 ) v21 = 0LL; for ( m = 0LL; v21 != m; ++m ) *(float *)(v12 + 4LL * *(int *)(v20 + 4 * m)) = (float)(*(float *)(v22 + 4 * m) * v17) + *(float *)(v12 + 4LL * *(int *)(v20 + 4 * m)); } } } return OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix(&v25); }
convertToLoop<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RSI MOV RSI,RSP AND qword ptr [RSI],0x0 AND dword ptr [RSI + 0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOVUPS xmmword ptr [RSI + 0x20],XMM0 MOVUPS xmmword ptr [RSI + 0x30],XMM0 MOVUPS xmmword ptr [RSI + 0x40],XMM0 AND qword ptr [RSI + 0x50],0x0 LAB_0016bea0: CALL 0x001523b0 MOV EBP,dword ptr [RSP + 0x4] IMUL ECX,EBP,0xc PUSH 0xc POP RSI MOV RDI,RBX MOV EDX,EBP CALL 0x00155710 XOR R12D,R12D MOV RDI,RBX XOR ESI,ESI MOV EDX,EBP CALL 0x00154140 MOVSXD R14,EBP MOV RAX,qword ptr [RBX + 0x10] MOVSXD R15,dword ptr [RAX] SHL R15,0x2 ADD R15,qword ptr [RBX + 0x28] TEST EBP,EBP MOV EAX,0x0 CMOVG EAX,EBP LAB_0016bee4: CMP RAX,R12 JZ 0x0016bef2 MOV dword ptr [R15 + R12*0x4],R12D INC R12 JMP 0x0016bee4 LAB_0016bef2: SHL R14,0x2 PUSH 0x1 POP R12 LAB_0016befa: CMP R12,0xc JZ 0x0016bf2d LAB_0016bf00: MOV RDI,RBX MOV ESI,R12D MOV EDX,EBP CALL 0x00154140 LAB_0016bf0d: MOV RAX,qword ptr [RBX + 0x10] MOVSXD RDI,dword ptr [RAX + R12*0x4] SHL RDI,0x2 ADD RDI,qword ptr [RBX + 0x28] MOV RSI,R15 MOV RDX,R14 CALL 0x00151bd0 INC R12 JMP 0x0016befa LAB_0016bf2d: XOR R15D,R15D LEA R13,[0x1c0c50] XOR EBP,EBP LAB_0016bf39: CMP RBP,0xc JZ 0x0016bfee IMUL R12,RBP,0x3c LEA RAX,[0x1c0390] ADD R12,RAX MOV RAX,qword ptr [RBX + 0x10] MOVSXD R14,dword ptr [RAX + RBP*0x4] SHL R14,0x2 ADD R14,qword ptr [RBX + 0x40] MOVSXD RDX,dword ptr [RBX + 0x4] SHL RDX,0x2 MOV RDI,R14 XOR ESI,ESI CALL 0x00150c10 XORPS XMM2,XMM2 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x40] XOR ESI,ESI LAB_0016bf87: CMP RSI,0xf JZ 0x0016bfe6 MOVSS XMM0,dword ptr [R12 + RSI*0x4] UCOMISS XMM0,XMM2 JNZ 0x0016bf9f JP 0x0016bf9f LAB_0016bf9a: INC RSI JMP 0x0016bf87 LAB_0016bf9f: MOVSXD R8,dword ptr [R13 + RSI*0x4] MOVSXD R9,dword ptr [RAX + R8*0x4] LEA RDI,[RCX + R9*0x4] MOV R8D,dword ptr [RAX + R8*0x4 + 0x4] SUB R8D,R9D LEA R9,[RDX + R9*0x4] TEST R8D,R8D CMOVLE R8D,R15D XOR R10D,R10D LAB_0016bfc2: CMP R8,R10 JZ 0x0016bf9a MOVSXD R11,dword ptr [RDI + R10*0x4] MOVSS XMM1,dword ptr [R9 + R10*0x4] MULSS XMM1,XMM0 ADDSS XMM1,dword ptr [R14 + R11*0x4] MOVSS dword ptr [R14 + R11*0x4],XMM1 INC R10 JMP 0x0016bfc2 LAB_0016bfe6: INC RBP JMP 0x0016bf39 LAB_0016bfee: MOV RDI,RSP CALL 0x001529e0 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) */ void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(SourcePatch *param_1,SparseMatrix *param_2) { float fVar1; int iVar2; ulong uVar3; long lVar4; uint uVar5; long lVar6; ulong uVar7; long lVar8; void *pvVar9; int8 local_88; int4 local_80; long local_78; int8 uStack_70; int8 local_68; long lStack_60; int8 local_58; int8 uStack_50; long local_48; int8 uStack_40; int8 local_38; local_88 = 0; local_80 = 0; local_78 = 0; uStack_70 = 0; local_68 = 0; lStack_60 = 0; local_58 = 0; uStack_50 = 0; local_48 = 0; uStack_40 = 0; local_38 = 0; /* try { // try from 0016bea0 to 0016bec7 has its CatchHandler @ 0016c005 */ convertToGregory<float>(param_1,(SparseMatrix *)&local_88); uVar5 = local_88._4_4_; SparseMatrix<float>::Resize ((SparseMatrix<float> *)param_2,0xc,local_88._4_4_,local_88._4_4_ * 0xc); uVar7 = 0; SparseMatrix<float>::SetRowSize((SparseMatrix<float> *)param_2,0,uVar5); pvVar9 = (void *)((long)**(int **)(param_2 + 0x10) * 4 + *(long *)(param_2 + 0x28)); uVar3 = 0; if (0 < (int)uVar5) { uVar3 = (ulong)uVar5; } for (; uVar3 != uVar7; uVar7 = uVar7 + 1) { *(int *)((long)pvVar9 + uVar7 * 4) = (int)uVar7; } for (lVar8 = 1; lVar8 != 0xc; lVar8 = lVar8 + 1) { /* try { // try from 0016bf00 to 0016bf0c has its CatchHandler @ 0016c007 */ SparseMatrix<float>::SetRowSize((SparseMatrix<float> *)param_2,(int)lVar8,uVar5); memcpy((void *)((long)*(int *)(*(long *)(param_2 + 0x10) + lVar8 * 4) * 4 + *(long *)(param_2 + 0x28)),pvVar9,(long)(int)uVar5 << 2); } for (lVar8 = 0; lVar8 != 0xc; lVar8 = lVar8 + 1) { pvVar9 = (void *)((long)*(int *)(*(long *)(param_2 + 0x10) + lVar8 * 4) * 4 + *(long *)(param_2 + 0x40)); memset(pvVar9,0,(long)*(int *)(param_2 + 4) << 2); for (lVar4 = 0; lVar4 != 0xf; lVar4 = lVar4 + 1) { fVar1 = (float)(&DAT_001c0390)[lVar8 * 0xf + lVar4]; if ((fVar1 != 0.0) || (NAN(fVar1))) { iVar2 = *(int *)(local_78 + (long)(int)(&DAT_001c0c50)[lVar4] * 4); uVar5 = *(int *)(local_78 + 4 + (long)(int)(&DAT_001c0c50)[lVar4] * 4) - iVar2; uVar3 = (ulong)uVar5; if ((int)uVar5 < 1) { uVar3 = 0; } for (uVar7 = 0; uVar3 != uVar7; uVar7 = uVar7 + 1) { lVar6 = (long)*(int *)(lStack_60 + (long)iVar2 * 4 + uVar7 * 4); *(float *)((long)pvVar9 + lVar6 * 4) = *(float *)(local_48 + (long)iVar2 * 4 + uVar7 * 4) * fVar1 + *(float *)((long)pvVar9 + lVar6 * 4); } } } } SparseMatrix<float>::~SparseMatrix((SparseMatrix<float> *)&local_88); return; }
28,897
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void convertToLoop(SourcePatch const & sourcePatch, SparseMatrix<REAL> & matrix) { // // Unlike quads, there are not enough degrees of freedom in the regular patch // to enforce interpolation of the limit point and tangent at the corner while // preserving the two adjoining boundary curves. Since we end up destroying // neighboring conintuity in doing so, we use a fully constructed Gregory // patch here for the isolated corner case as well as the general case. // // Unfortunately, the regular patch here -- a quartic Box-spline triangle -- // is not as flexible as the BSpline patches for Catmark. Unlike BSplines // and Bezier patches, the Box-splines do not span the full space of possible // shapes (only 12 control points in a space spanned by 15 polynomials for // the quartic case). So it is possible to construct shapes with a Gregory // or Bezier triangle that cannot be represented by the Box-spline. // // The solution fits a Box-spline patch to the constructed Gregory patch with // a set of constraints. With quartic boundary curves, 12 constraints on the // boundary curve make this tightly constrained. Such a set of constraints // is rank deficient (11 instead of 12) so an additional constraint on the // midpoint of the patch is included and a conversion matrix is constructed // from the pseudo-inverse of the 13 constraints. // // For the full 12x15 conversion matrix from 15-point quartic Bezier patch // back to a Box spline patch, the matrix rows and columns are ordered // according to control point orientations used elsewhere. Correllation of // points between the Bezier and Gregory points is as follows: // // Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 // G0 G1 G15 G7 G5 G2 G3,4 G8,9 G6 G17 G13,14 G16 G11 G12 G10 // // As with conversion from Gregory to BSpline for Catmark, one of the face // points is chosen as a Bezier point in the conversion rather than combining // the pair (which would avoid slight asymmetric artefacts of the choice). // And given the solution now depends primarily on the boundary, its not // necessary to construct a full Gregory patch with enforced continuity. // REAL const gregoryToLoopMatrix[12][15] = { { 8.214411f, 7.571190f, -7.690082f, 2.237840f, -1.118922f,-16.428828f, 0.666666f, 0.666666f, 2.237835f, 6.309870f, 0.666666f, -1.690100f, -0.428812f, -0.428805f, 0.214407f }, { -0.304687f, 0.609374f, 6.752593f, 0.609374f, -0.304687f, 0.609378f, -3.333333f, -3.333333f, 0.609378f, -1.247389f, -3.333333f, -1.247389f, 3.276037f, 3.276037f, -1.638020f }, { -1.118922f, 2.237840f, -7.690082f, 7.571190f, 8.214411f, 2.237835f, 0.666666f, 0.666666f, -16.428828f, -1.690100f, 0.666666f, 6.309870f, -0.428805f, -0.428812f, 0.214407f }, { 8.214411f,-16.428828f, 6.309870f, -0.428812f, 0.214407f, 7.571190f, 0.666666f, 0.666666f, -0.428805f, -7.690082f, 0.666666f, -1.690100f, 2.237840f, 2.237835f, -1.118922f }, { -0.813368f, 1.626735f, -0.773435f, -1.039929f, 0.519965f, 1.626735f, 0.666666f, 0.666666f, -1.039930f, -0.773435f, 0.666666f, 1.226558f, -1.039929f, -1.039930f, 0.519965f }, { 0.519965f, -1.039929f, -0.773435f, 1.626735f, -0.813368f, -1.039930f, 0.666666f, 0.666666f, 1.626735f, 1.226558f, 0.666666f, -0.773435f, -1.039930f, -1.039929f, 0.519965f }, { 0.214407f, -0.428812f, 6.309870f,-16.428828f, 8.214411f, -0.428805f, 0.666666f, 0.666666f, 7.571190f, -1.690100f, 0.666666f, -7.690082f, 2.237835f, 2.237840f, -1.118922f }, { -0.304687f, 0.609378f, -1.247389f, 3.276037f, -1.638020f, 0.609374f, -3.333333f, -3.333333f, 3.276037f, 6.752593f, -3.333333f, -1.247389f, 0.609374f, 0.609378f, -0.304687f }, { 0.519965f, -1.039930f, 1.226558f, -1.039930f, 0.519965f, -1.039929f, 0.666666f, 0.666666f, -1.039929f, -0.773435f, 0.666666f, -0.773435f, 1.626735f, 1.626735f, -0.813368f }, { -1.638020f, 3.276037f, -1.247389f, 0.609378f, -0.304687f, 3.276037f, -3.333333f, -3.333333f, 0.609374f, -1.247389f, -3.333333f, 6.752593f, 0.609378f, 0.609374f, -0.304687f }, { -1.118922f, 2.237835f, -1.690100f, -0.428805f, 0.214407f, 2.237840f, 0.666666f, 0.666666f, -0.428812f, -7.690082f, 0.666666f, 6.309870f, 7.571190f,-16.428828f, 8.214411f }, { 0.214407f, -0.428805f, -1.690100f, 2.237835f, -1.118922f, -0.428812f, 0.666666f, 0.666666f, 2.237840f, 6.309870f, 0.666666f, -7.690082f,-16.428828f, 7.571190f, 8.214411f } }; int const gRowIndices[15] = { 0,1,15,7,5, 2,4,8,6, 17,14,16, 11,12, 10 }; SparseMatrix<REAL> G; convertToGregory<REAL>(sourcePatch, G); _initializeFullMatrix(matrix, 12, G.GetNumColumns()); for (int i = 0; i < 12; ++i) { REAL const * gRowWeights = gregoryToLoopMatrix[i]; _combineSparseMatrixRowsInFull(matrix, i, G, 15, gRowIndices, gRowWeights); } }
O3
cpp
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx xorl %eax, %eax leaq 0x20(%rsp), %rsi movq %rax, (%rsi) movl $0x0, 0x8(%rsi) pxor %xmm0, %xmm0 movdqu %xmm0, 0x10(%rsi) movdqu %xmm0, 0x20(%rsi) movdqu %xmm0, 0x30(%rsi) movdqu %xmm0, 0x40(%rsi) movq %rax, 0x50(%rsi) callq 0x39fb0 movl 0x24(%rsp), %eax movl $0xc, (%rbx) movq %rax, (%rsp) movl %eax, 0x4(%rbx) movl $0x0, 0x8(%rbx) leaq 0x10(%rbx), %rdi movq %rdi, 0x8(%rsp) xorl %esi, %esi callq 0x39670 movslq (%rbx), %rsi incq %rsi leaq 0x1c(%rsp), %rdx movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF movq 0x8(%rsp), %rdi callq 0x38f80 movslq (%rsp), %r15 shlq $0x2, %r15 leaq (%r15,%r15,2), %r13 movq 0x10(%rbx), %r12 movl $0x0, (%r12) movq 0x48(%rbx), %rcx subq 0x40(%rbx), %rcx leaq 0x40(%rbx), %rax movq %rax, 0x10(%rsp) shrq $0x2, %rcx xorl %eax, %eax cmpl %ecx, %r13d jle 0x57f55 leaq 0x28(%rbx), %rdi movq %r13, %rsi callq 0x39670 movq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x399e0 movq 0x8(%rsp), %rax movq (%rax), %r12 movl (%r12), %eax cmpl 0x8(%rbx), %eax jne 0x581d2 addl (%rsp), %eax movl %eax, 0x4(%r12) movl %eax, 0x8(%rbx) movslq 0x4(%r12), %rsi movq 0x48(%rbx), %rax subq 0x40(%rbx), %rax shrq $0x2, %rax cmpl %eax, %esi jle 0x57f9e leaq 0x28(%rbx), %rdi callq 0x39670 movslq 0x4(%r12), %rsi movq 0x10(%rsp), %rdi callq 0x399e0 movq 0x8(%rsp), %rax movq (%rax), %r12 movslq (%r12), %rax movq 0x28(%rbx), %rcx cmpl $0x0, (%rsp) jle 0x5804e movq (%rsp), %rsi leal 0x1(%rsi), %edx andl $-0x2, %edx decq %rsi movq %rsi, %xmm0 pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1] leaq (%rcx,%rax,4), %rsi addq $0x4, %rsi movdqa 0x5d089(%rip), %xmm1 # 0xb5060 xorl %edi, %edi movdqa 0x5d08f(%rip), %xmm2 # 0xb5070 pxor %xmm2, %xmm0 pcmpeqd %xmm3, %xmm3 movdqa 0x5eb8f(%rip), %xmm4 # 0xb6b80 movdqa %xmm1, %xmm5 pxor %xmm2, %xmm5 movdqa %xmm5, %xmm6 pcmpgtd %xmm0, %xmm6 pcmpeqd %xmm0, %xmm5 pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3] pand %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3] por %xmm7, %xmm5 movd %xmm5, %r8d notl %r8d testb $0x1, %r8b je 0x58029 movl %edi, -0x4(%rsi,%rdi,4) pxor %xmm3, %xmm5 pextrw $0x4, %xmm5, %r8d testb $0x1, %r8b je 0x58041 leal 0x1(%rdi), %r8d movl %r8d, (%rsi,%rdi,4) addq $0x2, %rdi paddq %xmm4, %xmm1 cmpq %rdi, %rdx jne 0x57ff1 leaq 0x28(%rbx), %r13 leaq (%rcx,%rax,4), %rbp xorl %r12d, %r12d movq 0x10(%rbx), %r14 movl 0x4(%r14,%r12,4), %eax cmpl 0x8(%rbx), %eax jne 0x581d2 addl (%rsp), %eax movl %eax, 0x8(%r14,%r12,4) movl %eax, 0x8(%rbx) movslq 0x8(%r14,%r12,4), %rsi movq 0x48(%rbx), %rax subq 0x40(%rbx), %rax shrq $0x2, %rax cmpl %eax, %esi jle 0x580aa movq %r13, %rdi callq 0x39670 movslq 0x8(%r14,%r12,4), %rsi movq 0x10(%rsp), %rdi callq 0x399e0 movq 0x8(%rsp), %rax movq (%rax), %r14 movslq 0x4(%r14,%r12,4), %rdi shlq $0x2, %rdi addq (%r13), %rdi movq %rbp, %rsi movq %r15, %rdx callq 0x39ab0 incq %r12 cmpq $0xb, %r12 jne 0x58059 xorl %r15d, %r15d leaq 0x6139b(%rip), %r12 # 0xb9470 leaq 0x61c54(%rip), %r13 # 0xb9d30 imulq $0x3c, %r15, %rbp addq %r12, %rbp movq 0x10(%rbx), %rax movslq (%rax,%r15,4), %r14 shlq $0x2, %r14 addq 0x40(%rbx), %r14 movslq 0x4(%rbx), %rdx shlq $0x2, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x391a0 pxor %xmm2, %xmm2 movq 0x30(%rsp), %rcx movq 0x48(%rsp), %rdi movq 0x60(%rsp), %rax xorl %edx, %edx movss (%rbp,%rdx,4), %xmm0 ucomiss %xmm2, %xmm0 jne 0x58127 jnp 0x5816a movslq (%r13,%rdx,4), %rsi movslq (%rcx,%rsi,4), %r8 movl 0x4(%rcx,%rsi,4), %r9d subl %r8d, %r9d jle 0x5816a leaq (%rdi,%r8,4), %rsi leaq (%rax,%r8,4), %r8 movl %r9d, %r9d xorl %r10d, %r10d movslq (%rsi,%r10,4), %r11 movss (%r8,%r10,4), %xmm1 mulss %xmm0, %xmm1 addss (%r14,%r11,4), %xmm1 movss %xmm1, (%r14,%r11,4) incq %r10 cmpq %r10, %r9 jne 0x58148 incq %rdx cmpq $0xf, %rdx jne 0x5811a incq %r15 cmpq $0xc, %r15 jne 0x580dc testq %rax, %rax je 0x5819a movq 0x70(%rsp), %rsi subq %rax, %rsi movq %rax, %rdi callq 0x3a2b0 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x581ac movq 0x58(%rsp), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x581c3 movq 0x40(%rsp), %rsi subq %rdi, %rsi callq 0x3a2b0 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5f832(%rip), %rdi # 0xb7a0b leaq 0x5f851(%rip), %rsi # 0xb7a31 leaq 0x5f8bb(%rip), %rcx # 0xb7aa2 movl $0x98, %edx callq 0x39540 jmp 0x581f3 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x3a390 movq %rbx, %rdi callq 0x3bd30
_ZN10OpenSubdiv6v3_6_03Far13convertToLoopIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rsi xor eax, eax lea rsi, [rsp+0A8h+var_88] mov [rsi], rax mov dword ptr [rsi+8], 0 pxor xmm0, xmm0 movdqu xmmword ptr [rsi+10h], xmm0 movdqu xmmword ptr [rsi+20h], xmm0 movdqu xmmword ptr [rsi+30h], xmm0 movdqu xmmword ptr [rsi+40h], xmm0 mov [rsi+50h], rax call __ZN10OpenSubdiv6v3_6_03Far16convertToGregoryIfEEvRKNS1_11SourcePatchERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) mov eax, [rsp+0A8h+var_84] mov dword ptr [rbx], 0Ch mov [rsp+0A8h+var_A8], rax mov [rbx+4], eax mov dword ptr [rbx+8], 0 lea rdi, [rbx+10h] mov [rsp+0A8h+var_A0], rdi xor esi, esi call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [rbx] inc rsi lea rdx, [rsp+0A8h+var_8C] mov dword ptr [rdx], 0FFFFFFFFh mov rdi, [rsp+0A8h+var_A0] call __ZNSt6vectorIiSaIiEE6resizeEmRKi; std::vector<int>::resize(ulong,int const&) movsxd r15, dword ptr [rsp+0A8h+var_A8] shl r15, 2 lea r13, [r15+r15*2] mov r12, [rbx+10h] mov dword ptr [r12], 0 mov rcx, [rbx+48h] sub rcx, [rbx+40h] lea rax, [rbx+40h] mov [rsp+0A8h+var_98], rax shr rcx, 2 xor eax, eax cmp r13d, ecx jle short loc_57F55 lea rdi, [rbx+28h] mov rsi, r13 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rdi, [rsp+0A8h+var_98] mov rsi, r13 call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) mov rax, [rsp+0A8h+var_A0] mov r12, [rax] mov eax, [r12] loc_57F55: cmp eax, [rbx+8] jnz loc_581D2 add eax, dword ptr [rsp+0A8h+var_A8] mov [r12+4], eax mov [rbx+8], eax movsxd rsi, dword ptr [r12+4] mov rax, [rbx+48h] sub rax, [rbx+40h] shr rax, 2 cmp esi, eax jle short loc_57F9E lea rdi, [rbx+28h] call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [r12+4] mov rdi, [rsp+0A8h+var_98] call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) mov rax, [rsp+0A8h+var_A0] mov r12, [rax] loc_57F9E: movsxd rax, dword ptr [r12] mov rcx, [rbx+28h] cmp dword ptr [rsp+0A8h+var_A8], 0 jle loc_5804E mov rsi, [rsp+0A8h+var_A8] lea edx, [rsi+1] and edx, 0FFFFFFFEh dec rsi movq xmm0, rsi pshufd xmm0, xmm0, 44h ; 'D' lea rsi, [rcx+rax*4] add rsi, 4 movdqa xmm1, cs:xmmword_B5060 xor edi, edi movdqa xmm2, cs:xmmword_B5070 pxor xmm0, xmm2 pcmpeqd xmm3, xmm3 movdqa xmm4, cs:xmmword_B6B80 loc_57FF1: movdqa xmm5, xmm1 pxor xmm5, xmm2 movdqa xmm6, xmm5 pcmpgtd xmm6, xmm0 pcmpeqd xmm5, xmm0 pshufd xmm7, xmm5, 0F5h pand xmm7, xmm6 pshufd xmm5, xmm6, 0F5h por xmm5, xmm7 movd r8d, xmm5 not r8d test r8b, 1 jz short loc_58029 mov [rsi+rdi*4-4], edi loc_58029: pxor xmm5, xmm3 pextrw r8d, xmm5, 4 test r8b, 1 jz short loc_58041 lea r8d, [rdi+1] mov [rsi+rdi*4], r8d loc_58041: add rdi, 2 paddq xmm1, xmm4 cmp rdx, rdi jnz short loc_57FF1 loc_5804E: lea r13, [rbx+28h] lea rbp, [rcx+rax*4] xor r12d, r12d loc_58059: mov r14, [rbx+10h] mov eax, [r14+r12*4+4] cmp eax, [rbx+8] jnz loc_581D2 add eax, dword ptr [rsp+0A8h+var_A8] mov [r14+r12*4+8], eax mov [rbx+8], eax movsxd rsi, dword ptr [r14+r12*4+8] mov rax, [rbx+48h] sub rax, [rbx+40h] shr rax, 2 cmp esi, eax jle short loc_580AA mov rdi, r13 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) movsxd rsi, dword ptr [r14+r12*4+8] mov rdi, [rsp+0A8h+var_98] call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) mov rax, [rsp+0A8h+var_A0] mov r14, [rax] loc_580AA: movsxd rdi, dword ptr [r14+r12*4+4] shl rdi, 2 add rdi, [r13+0] mov rsi, rbp mov rdx, r15 call _memcpy inc r12 cmp r12, 0Bh jnz short loc_58059 xor r15d, r15d lea r12, unk_B9470 lea r13, unk_B9D30 loc_580DC: imul rbp, r15, 3Ch ; '<' add rbp, r12 mov rax, [rbx+10h] movsxd r14, dword ptr [rax+r15*4] shl r14, 2 add r14, [rbx+40h] movsxd rdx, dword ptr [rbx+4] shl rdx, 2 mov rdi, r14 xor esi, esi call _memset pxor xmm2, xmm2 mov rcx, [rsp+0A8h+var_78] mov rdi, [rsp+0A8h+var_60] mov rax, [rsp+0A8h+var_48] xor edx, edx loc_5811A: movss xmm0, dword ptr [rbp+rdx*4+0] ucomiss xmm0, xmm2 jnz short loc_58127 jnp short loc_5816A loc_58127: movsxd rsi, dword ptr [r13+rdx*4+0] movsxd r8, dword ptr [rcx+rsi*4] mov r9d, [rcx+rsi*4+4] sub r9d, r8d jle short loc_5816A lea rsi, [rdi+r8*4] lea r8, [rax+r8*4] mov r9d, r9d xor r10d, r10d loc_58148: movsxd r11, dword ptr [rsi+r10*4] movss xmm1, dword ptr [r8+r10*4] mulss xmm1, xmm0 addss xmm1, dword ptr [r14+r11*4] movss dword ptr [r14+r11*4], xmm1 inc r10 cmp r9, r10 jnz short loc_58148 loc_5816A: inc rdx cmp rdx, 0Fh jnz short loc_5811A inc r15 cmp r15, 0Ch jnz loc_580DC test rax, rax jz short loc_5819A mov rsi, [rsp+0A8h+var_38] sub rsi, rax; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [rsp+0A8h+var_60]; void * loc_5819A: test rdi, rdi jz short loc_581AC mov rsi, [rsp+0A8h+var_50] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_581AC: mov rdi, [rsp+0A8h+var_78]; void * test rdi, rdi jz short loc_581C3 mov rsi, [rsp+0A8h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_581C3: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_581D2: lea rdi, aRowoffsetsRowi; "_rowOffsets[rowIndex] == _numElements" lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_15; "void OpenSubdiv::v3_6_0::Far::SparseMat"... mov edx, 98h call ___assert_fail jmp short $+2 loc_581F3: mov rbx, rax lea rdi, [rsp+0A8h+var_88] call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix() mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(long long a1, int *a2) { long long v3; // rax long long v4; // rsi long long epi16; // r8 long long v6; // r9 long long v7; // r13 int *v8; // r12 int v9; // eax int v10; // eax long long v11; // rsi long long v12; // rax long long v13; // rcx __m128i si128; // xmm1 long long v15; // rdi __m128i v16; // xmm2 __m128i v17; // xmm0 __m128i v18; // xmm4 __m128i v19; // xmm5 __m128i v20; // xmm6 __m128i v21; // xmm5 long long v22; // rbp long long i; // r12 int *v24; // r14 int v25; // eax int v26; // eax long long v27; // rsi long long j; // r15 long long v29; // r14 long long v30; // rcx char *v31; // rdi char *v32; // rax long long k; // rdx float v34; // xmm0_4 long long v35; // rsi long long v36; // r8 int v37; // r9d bool v38; // cc int v39; // r9d char *v40; // rsi char *v41; // r8 long long v42; // r10 long long v43; // [rsp+0h] [rbp-A8h] int **v44; // [rsp+8h] [rbp-A0h] int *v45; // [rsp+10h] [rbp-98h] int v46; // [rsp+1Ch] [rbp-8Ch] BYREF long long v47; // [rsp+20h] [rbp-88h] BYREF int v48; // [rsp+28h] [rbp-80h] __int128 v49; // [rsp+30h] [rbp-78h] __int128 v50; // [rsp+40h] [rbp-68h] __int128 v51; // [rsp+50h] [rbp-58h] __int128 v52; // [rsp+60h] [rbp-48h] long long v53; // [rsp+70h] [rbp-38h] v47 = 0LL; v48 = 0; v49 = 0LL; v50 = 0LL; v51 = 0LL; v52 = 0LL; v53 = 0LL; OpenSubdiv::v3_6_0::Far::convertToGregory<float>(a1, &v47); v3 = HIDWORD(v47); *a2 = 12; v43 = v3; *(_QWORD *)(a2 + 1) = (unsigned int)v3; v44 = (int **)(a2 + 4); std::vector<int>::resize(a2 + 4, 0LL); v4 = *a2 + 1LL; v46 = -1; std::vector<int>::resize(v44, v4, &v46); v7 = 12LL * (int)v43; v8 = (int *)*((_QWORD *)a2 + 2); *v8 = 0; v45 = a2 + 16; v9 = 0; if ( (int)v7 > (int)((*((_QWORD *)a2 + 9) - *((_QWORD *)a2 + 8)) >> 2) ) { std::vector<int>::resize(a2 + 10, v7); std::vector<float>::resize(v45, v7); v8 = *v44; v9 = **v44; } if ( v9 != a2[2] ) LABEL_33: __assert_fail( "_rowOffsets[rowIndex] == _numElements", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h", 152LL, "void OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int, int) [REAL = float]"); v10 = v43 + v9; v8[1] = v10; a2[2] = v10; v11 = v8[1]; if ( (int)v11 > (int)((*((_QWORD *)a2 + 9) - *((_QWORD *)a2 + 8)) >> 2) ) { std::vector<int>::resize(a2 + 10, v11); std::vector<float>::resize(v45, v8[1]); v8 = *v44; } v12 = *v8; v13 = *((_QWORD *)a2 + 5); if ( (int)v43 > 0 ) { si128 = _mm_load_si128((const __m128i *)&xmmword_B5060); v15 = 0LL; v16 = _mm_load_si128((const __m128i *)&xmmword_B5070); v17 = _mm_xor_si128(_mm_shuffle_epi32((__m128i)(unsigned long long)(v43 - 1), 68), v16); v18 = _mm_load_si128((const __m128i *)&xmmword_B6B80); do { v19 = _mm_xor_si128(si128, v16); v20 = _mm_cmpgt_epi32(v19, v17); v21 = _mm_or_si128( _mm_shuffle_epi32(v20, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v19, v17), 245), v20)); if ( (~_mm_cvtsi128_si32(v21) & 1) != 0 ) *(_DWORD *)(v13 + 4 * v12 + 4 * v15) = v15; epi16 = (unsigned int)_mm_extract_epi16(_mm_xor_si128(v21, (__m128i)-1LL), 4); if ( (epi16 & 1) != 0 ) { epi16 = (unsigned int)(v15 + 1); *(_DWORD *)(v13 + 4 * v12 + 4 + 4 * v15) = epi16; } v15 += 2LL; si128 = _mm_add_epi64(si128, v18); } while ( (((_DWORD)v43 + 1) & 0xFFFFFFFE) != v15 ); } v22 = v13 + 4 * v12; for ( i = 0LL; i != 11; ++i ) { v24 = (int *)*((_QWORD *)a2 + 2); v25 = v24[i + 1]; if ( v25 != a2[2] ) goto LABEL_33; v26 = v43 + v25; v24[i + 2] = v26; a2[2] = v26; v27 = v24[i + 2]; if ( (int)v27 > (int)((*((_QWORD *)a2 + 9) - *((_QWORD *)a2 + 8)) >> 2) ) { std::vector<int>::resize(a2 + 10, v27); std::vector<float>::resize(v45, v24[i + 2]); v24 = *v44; } memcpy(*((_QWORD *)a2 + 5) + 4LL * v24[i + 1], v22, 4LL * (int)v43, v13, epi16, v6); } for ( j = 0LL; j != 12; ++j ) { v29 = *((_QWORD *)a2 + 8) + 4LL * *(int *)(*((_QWORD *)a2 + 2) + 4 * j); memset(v29, 0LL, 4LL * a2[1]); v30 = v49; v31 = (char *)*((_QWORD *)&v50 + 1); v32 = (char *)v52; for ( k = 0LL; k != 15; ++k ) { v34 = flt_B9470[15 * j + k]; if ( v34 != 0.0 ) { v35 = dword_B9D30[k]; v36 = *(int *)(v30 + 4 * v35); v37 = *(_DWORD *)(v30 + 4 * v35 + 4); v38 = v37 <= (int)v36; v39 = v37 - v36; if ( !v38 ) { v40 = &v31[4 * v36]; v41 = &v32[4 * v36]; v42 = 0LL; do { *(float *)(v29 + 4LL * *(int *)&v40[4 * v42]) = (float)(*(float *)&v41[4 * v42] * v34) + *(float *)(v29 + 4LL * *(int *)&v40[4 * v42]); ++v42; } while ( v39 != v42 ); } } } } if ( v32 ) { operator delete(v32, v53 - (_QWORD)v32); v31 = (char *)*((_QWORD *)&v50 + 1); } if ( v31 ) operator delete(v31, *((_QWORD *)&v51 + 1) - (_QWORD)v31); if ( (_QWORD)v49 ) operator delete((void *)v49, v50 - v49); }
convertToLoop<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RSI XOR EAX,EAX LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],RAX MOV dword ptr [RSI + 0x8],0x0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RSI + 0x10],XMM0 MOVDQU xmmword ptr [RSI + 0x20],XMM0 MOVDQU xmmword ptr [RSI + 0x30],XMM0 MOVDQU xmmword ptr [RSI + 0x40],XMM0 MOV qword ptr [RSI + 0x50],RAX LAB_00157eb4: CALL 0x00139fb0 MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RBX],0xc MOV qword ptr [RSP],RAX MOV dword ptr [RBX + 0x4],EAX MOV dword ptr [RBX + 0x8],0x0 LEA RDI,[RBX + 0x10] MOV qword ptr [RSP + 0x8],RDI XOR ESI,ESI CALL 0x00139670 MOVSXD RSI,dword ptr [RBX] INC RSI LEA RDX,[RSP + 0x1c] MOV dword ptr [RDX],0xffffffff MOV RDI,qword ptr [RSP + 0x8] CALL 0x00138f80 MOVSXD R15,dword ptr [RSP] SHL R15,0x2 LEA R13,[R15 + R15*0x2] MOV R12,qword ptr [RBX + 0x10] MOV dword ptr [R12],0x0 MOV RCX,qword ptr [RBX + 0x48] SUB RCX,qword ptr [RBX + 0x40] LEA RAX,[RBX + 0x40] MOV qword ptr [RSP + 0x10],RAX SHR RCX,0x2 XOR EAX,EAX CMP R13D,ECX JLE 0x00157f55 LEA RDI,[RBX + 0x28] MOV RSI,R13 CALL 0x00139670 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,R13 CALL 0x001399e0 MOV RAX,qword ptr [RSP + 0x8] MOV R12,qword ptr [RAX] MOV EAX,dword ptr [R12] LAB_00157f55: CMP EAX,dword ptr [RBX + 0x8] JNZ 0x001581d2 ADD EAX,dword ptr [RSP] MOV dword ptr [R12 + 0x4],EAX MOV dword ptr [RBX + 0x8],EAX MOVSXD RSI,dword ptr [R12 + 0x4] MOV RAX,qword ptr [RBX + 0x48] SUB RAX,qword ptr [RBX + 0x40] SHR RAX,0x2 CMP ESI,EAX JLE 0x00157f9e LEA RDI,[RBX + 0x28] CALL 0x00139670 MOVSXD RSI,dword ptr [R12 + 0x4] MOV RDI,qword ptr [RSP + 0x10] CALL 0x001399e0 MOV RAX,qword ptr [RSP + 0x8] MOV R12,qword ptr [RAX] LAB_00157f9e: MOVSXD RAX,dword ptr [R12] MOV RCX,qword ptr [RBX + 0x28] CMP dword ptr [RSP],0x0 JLE 0x0015804e MOV RSI,qword ptr [RSP] LEA EDX,[RSI + 0x1] AND EDX,0xfffffffe DEC RSI MOVQ XMM0,RSI PSHUFD XMM0,XMM0,0x44 LEA RSI,[RCX + RAX*0x4] ADD RSI,0x4 MOVDQA XMM1,xmmword ptr [0x001b5060] XOR EDI,EDI MOVDQA XMM2,xmmword ptr [0x001b5070] PXOR XMM0,XMM2 PCMPEQD XMM3,XMM3 MOVDQA XMM4,xmmword ptr [0x001b6b80] LAB_00157ff1: MOVDQA XMM5,XMM1 PXOR XMM5,XMM2 MOVDQA XMM6,XMM5 PCMPGTD XMM6,XMM0 PCMPEQD XMM5,XMM0 PSHUFD XMM7,XMM5,0xf5 PAND XMM7,XMM6 PSHUFD XMM5,XMM6,0xf5 POR XMM5,XMM7 MOVD R8D,XMM5 NOT R8D TEST R8B,0x1 JZ 0x00158029 MOV dword ptr [RSI + RDI*0x4 + -0x4],EDI LAB_00158029: PXOR XMM5,XMM3 PEXTRW R8D,XMM5,0x4 TEST R8B,0x1 JZ 0x00158041 LEA R8D,[RDI + 0x1] MOV dword ptr [RSI + RDI*0x4],R8D LAB_00158041: ADD RDI,0x2 PADDQ XMM1,XMM4 CMP RDX,RDI JNZ 0x00157ff1 LAB_0015804e: LEA R13,[RBX + 0x28] LEA RBP,[RCX + RAX*0x4] XOR R12D,R12D LAB_00158059: MOV R14,qword ptr [RBX + 0x10] MOV EAX,dword ptr [R14 + R12*0x4 + 0x4] CMP EAX,dword ptr [RBX + 0x8] JNZ 0x001581d2 ADD EAX,dword ptr [RSP] MOV dword ptr [R14 + R12*0x4 + 0x8],EAX MOV dword ptr [RBX + 0x8],EAX MOVSXD RSI,dword ptr [R14 + R12*0x4 + 0x8] MOV RAX,qword ptr [RBX + 0x48] SUB RAX,qword ptr [RBX + 0x40] SHR RAX,0x2 CMP ESI,EAX JLE 0x001580aa LAB_0015808b: MOV RDI,R13 CALL 0x00139670 MOVSXD RSI,dword ptr [R14 + R12*0x4 + 0x8] MOV RDI,qword ptr [RSP + 0x10] CALL 0x001399e0 LAB_001580a2: MOV RAX,qword ptr [RSP + 0x8] MOV R14,qword ptr [RAX] LAB_001580aa: MOVSXD RDI,dword ptr [R14 + R12*0x4 + 0x4] SHL RDI,0x2 ADD RDI,qword ptr [R13] MOV RSI,RBP MOV RDX,R15 CALL 0x00139ab0 INC R12 CMP R12,0xb JNZ 0x00158059 XOR R15D,R15D LEA R12,[0x1b9470] LEA R13,[0x1b9d30] LAB_001580dc: IMUL RBP,R15,0x3c ADD RBP,R12 MOV RAX,qword ptr [RBX + 0x10] MOVSXD R14,dword ptr [RAX + R15*0x4] SHL R14,0x2 ADD R14,qword ptr [RBX + 0x40] MOVSXD RDX,dword ptr [RBX + 0x4] SHL RDX,0x2 MOV RDI,R14 XOR ESI,ESI CALL 0x001391a0 PXOR XMM2,XMM2 MOV RCX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x60] XOR EDX,EDX LAB_0015811a: MOVSS XMM0,dword ptr [RBP + RDX*0x4] UCOMISS XMM0,XMM2 JNZ 0x00158127 JNP 0x0015816a LAB_00158127: MOVSXD RSI,dword ptr [R13 + RDX*0x4] MOVSXD R8,dword ptr [RCX + RSI*0x4] MOV R9D,dword ptr [RCX + RSI*0x4 + 0x4] SUB R9D,R8D JLE 0x0015816a LEA RSI,[RDI + R8*0x4] LEA R8,[RAX + R8*0x4] MOV R9D,R9D XOR R10D,R10D LAB_00158148: MOVSXD R11,dword ptr [RSI + R10*0x4] MOVSS XMM1,dword ptr [R8 + R10*0x4] MULSS XMM1,XMM0 ADDSS XMM1,dword ptr [R14 + R11*0x4] MOVSS dword ptr [R14 + R11*0x4],XMM1 INC R10 CMP R9,R10 JNZ 0x00158148 LAB_0015816a: INC RDX CMP RDX,0xf JNZ 0x0015811a INC R15 CMP R15,0xc JNZ 0x001580dc TEST RAX,RAX JZ 0x0015819a MOV RSI,qword ptr [RSP + 0x70] SUB RSI,RAX MOV RDI,RAX CALL 0x0013a2b0 MOV RDI,qword ptr [RSP + 0x48] LAB_0015819a: TEST RDI,RDI JZ 0x001581ac MOV RSI,qword ptr [RSP + 0x58] SUB RSI,RDI CALL 0x0013a2b0 LAB_001581ac: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x001581c3 MOV RSI,qword ptr [RSP + 0x40] SUB RSI,RDI CALL 0x0013a2b0 LAB_001581c3: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001581d2: LEA RDI,[0x1b7a0b] LEA RSI,[0x1b7a31] LEA RCX,[0x1b7aa2] MOV EDX,0x98 CALL 0x00139540
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(OpenSubdiv::v3_6_0::Far::SourcePatch const&, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) */ void OpenSubdiv::v3_6_0::Far::convertToLoop<float>(SourcePatch *param_1,SparseMatrix *param_2) { vector<int,std::allocator<int>> *this; vector<float,std::allocator<float>> *this_00; float fVar1; int1 auVar2 [16]; int iVar3; int iVar4; ulong uVar5; long lVar6; ulong uVar7; uint uVar8; long lVar9; int *piVar10; long lVar11; void *__s; long lVar12; int1 auVar13 [16]; int1 auVar14 [16]; int1 auVar16 [16]; int local_8c; int8 local_88; int4 local_80; int1 local_78 [16]; int1 local_68 [16]; int1 local_58 [16]; int1 local_48 [16]; long local_38; long lVar15; local_88 = 0; local_80 = 0; local_78 = (int1 [16])0x0; local_68 = (int1 [16])0x0; local_58 = (int1 [16])0x0; local_48 = (int1 [16])0x0; local_38 = 0; /* try { // try from 00157eb4 to 00157f95 has its CatchHandler @ 001581f1 */ convertToGregory<float>(param_1,(SparseMatrix *)&local_88); uVar8 = local_88._4_4_; uVar5 = (ulong)local_88._4_4_; *(int4 *)param_2 = 0xc; *(uint *)(param_2 + 4) = local_88._4_4_; *(int4 *)(param_2 + 8) = 0; this = (vector<int,std::allocator<int>> *)(param_2 + 0x10); std::vector<int,std::allocator<int>>::resize(this,0); local_8c = -1; std::vector<int,std::allocator<int>>::resize(this,(long)*(int *)param_2 + 1,&local_8c); uVar7 = (long)(int)uVar8 * 0xc; piVar10 = *(int **)(param_2 + 0x10); *piVar10 = 0; this_00 = (vector<float,std::allocator<float>> *)(param_2 + 0x40); iVar3 = 0; if ((int)((ulong)(*(long *)(param_2 + 0x48) - *(long *)(param_2 + 0x40)) >> 2) < (int)uVar7) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(param_2 + 0x28),uVar7); std::vector<float,std::allocator<float>>::resize(this_00,uVar7); piVar10 = *(int **)this; iVar3 = *piVar10; } if (iVar3 == *(int *)(param_2 + 8)) { piVar10[1] = iVar3 + uVar8; *(uint *)(param_2 + 8) = iVar3 + uVar8; if ((int)((ulong)(*(long *)(param_2 + 0x48) - *(long *)(param_2 + 0x40)) >> 2) < piVar10[1]) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(param_2 + 0x28),(long)piVar10[1]); std::vector<float,std::allocator<float>>::resize(this_00,(long)piVar10[1]); piVar10 = *(int **)this; } lVar9 = _UNK_001b6b88; lVar11 = _DAT_001b6b80; auVar2 = _DAT_001b5070; iVar3 = *piVar10; lVar12 = *(long *)(param_2 + 0x28); if (0 < (int)uVar8) { lVar6 = uVar5 - 1; auVar13._8_4_ = (int)lVar6; auVar13._0_8_ = lVar6; auVar13._12_4_ = (int)((ulong)lVar6 >> 0x20); lVar6 = lVar12 + (long)iVar3 * 4; uVar7 = 0; auVar13 = auVar13 ^ _DAT_001b5070; auVar14 = _DAT_001b5060; do { auVar16 = auVar14 ^ auVar2; if ((bool)(~(auVar16._4_4_ == auVar13._4_4_ && auVar13._0_4_ < auVar16._0_4_ || auVar13._4_4_ < auVar16._4_4_) & 1)) { *(int *)(lVar6 + uVar7 * 4) = (int)uVar7; } if ((auVar16._12_4_ != auVar13._12_4_ || auVar16._8_4_ <= auVar13._8_4_) && auVar16._12_4_ <= auVar13._12_4_) { *(int *)(lVar6 + 4 + uVar7 * 4) = (int)uVar7 + 1; } uVar7 = uVar7 + 2; lVar15 = auVar14._8_8_; auVar14._0_8_ = auVar14._0_8_ + lVar11; auVar14._8_8_ = lVar15 + lVar9; } while ((uVar8 + 1 & 0xfffffffe) != uVar7); } lVar11 = 0; while( true ) { lVar9 = *(long *)(param_2 + 0x10); iVar4 = *(int *)(lVar9 + 4 + lVar11 * 4); if (iVar4 != *(int *)(param_2 + 8)) break; iVar4 = iVar4 + uVar8; *(int *)(lVar9 + 8 + lVar11 * 4) = iVar4; *(int *)(param_2 + 8) = iVar4; iVar4 = *(int *)(lVar9 + 8 + lVar11 * 4); if ((int)((ulong)(*(long *)(param_2 + 0x48) - *(long *)(param_2 + 0x40)) >> 2) < iVar4) { /* try { // try from 0015808b to 001580a1 has its CatchHandler @ 001581f3 */ std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(param_2 + 0x28),(long)iVar4); std::vector<float,std::allocator<float>>::resize (this_00,(long)*(int *)(lVar9 + 8 + lVar11 * 4)); lVar9 = *(long *)this; } memcpy((void *)((long)*(int *)(lVar9 + 4 + lVar11 * 4) * 4 + *(long *)(param_2 + 0x28)), (void *)(lVar12 + (long)iVar3 * 4),(long)(int)uVar8 * 4); lVar11 = lVar11 + 1; if (lVar11 == 0xb) { lVar12 = 0; do { __s = (void *)((long)*(int *)(*(long *)(param_2 + 0x10) + lVar12 * 4) * 4 + *(long *)(param_2 + 0x40)); memset(__s,0,(long)*(int *)(param_2 + 4) << 2); lVar11 = 0; do { fVar1 = (float)(&DAT_001b9470)[lVar12 * 0xf + lVar11]; if ((fVar1 != 0.0) || (NAN(fVar1))) { iVar3 = *(int *)(local_78._0_8_ + (long)(int)(&DAT_001b9d30)[lVar11] * 4); iVar4 = *(int *)(local_78._0_8_ + 4 + (long)(int)(&DAT_001b9d30)[lVar11] * 4); uVar8 = iVar4 - iVar3; if (uVar8 != 0 && iVar3 <= iVar4) { uVar7 = 0; do { lVar9 = (long)*(int *)(local_68._8_8_ + uVar7 * 4 + (long)iVar3 * 4); *(float *)((long)__s + lVar9 * 4) = *(float *)(local_48._0_8_ + uVar7 * 4 + (long)iVar3 * 4) * fVar1 + *(float *)((long)__s + lVar9 * 4); uVar7 = uVar7 + 1; } while (uVar8 != uVar7); } } lVar11 = lVar11 + 1; } while (lVar11 != 0xf); lVar12 = lVar12 + 1; } while (lVar12 != 0xc); if ((void *)local_48._0_8_ != (void *)0x0) { operator_delete((void *)local_48._0_8_,local_38 - local_48._0_8_); } if ((void *)local_68._8_8_ != (void *)0x0) { operator_delete((void *)local_68._8_8_,local_58._8_8_ - local_68._8_8_); } if ((void *)local_78._0_8_ != (void *)0x0) { operator_delete((void *)local_78._0_8_,local_68._0_8_ - local_78._0_8_); } return; } } } /* WARNING: Subroutine does not return */ __assert_fail("_rowOffsets[rowIndex] == _numElements", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h" ,0x98, "void OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int, int) [REAL = float]" ); }
28,898
POINTonE1_times_minus_z
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/map_to_g1.c
static void POINTonE1_times_minus_z(POINTonE1 *out, const POINTonE1 *in) { POINTonE1_double(out, in); /* 1: 0x2 */ POINTonE1_add_n_dbl(out, in, 2); /* 2..4: 0x3..0xc */ POINTonE1_add_n_dbl(out, in, 3); /* 5..8: 0xd..0x68 */ POINTonE1_add_n_dbl(out, in, 9); /* 9..18: 0x69..0xd200 */ POINTonE1_add_n_dbl(out, in, 32); /* 19..51: ..0xd20100000000 */ POINTonE1_add_n_dbl(out, in, 16); /* 52..68: ..0xd201000000010000 */ }
O0
c
POINTonE1_times_minus_z: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x250c0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x2, %edx callq 0x36050 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x3, %edx callq 0x36050 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x9, %edx callq 0x36050 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x20, %edx callq 0x36050 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x10, %edx callq 0x36050 addq $0x10, %rsp popq %rbp retq nopl (%rax)
POINTonE1_times_minus_z: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call POINTonE1_double mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 2 call POINTonE1_add_n_dbl mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 3 call POINTonE1_add_n_dbl mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 9 call POINTonE1_add_n_dbl mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 20h ; ' ' call POINTonE1_add_n_dbl mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 10h call POINTonE1_add_n_dbl add rsp, 10h pop rbp retn
long long POINTonE1_times_minus_z(long long a1, long long a2) { POINTonE1_double(a1, a2); POINTonE1_add_n_dbl(a1, a2, 2LL); POINTonE1_add_n_dbl(a1, a2, 3LL); POINTonE1_add_n_dbl(a1, a2, 9LL); POINTonE1_add_n_dbl(a1, a2, 32LL); return POINTonE1_add_n_dbl(a1, a2, 16LL); }
POINTonE1_times_minus_z: 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 0x001250c0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x2 CALL 0x00136050 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x3 CALL 0x00136050 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x9 CALL 0x00136050 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x20 CALL 0x00136050 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x10 CALL 0x00136050 ADD RSP,0x10 POP RBP RET
void POINTonE1_times_minus_z(int8 param_1,int8 param_2) { POINTonE1_double(param_1,param_2); POINTonE1_add_n_dbl(param_1,param_2,2); POINTonE1_add_n_dbl(param_1,param_2,3); POINTonE1_add_n_dbl(param_1,param_2,9); POINTonE1_add_n_dbl(param_1,param_2,0x20); POINTonE1_add_n_dbl(param_1,param_2,0x10); return; }
28,899
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x33ffae(%rip), %rax # 0x36a540 cmpb $0x0, (%rax) je 0x2a59e xorl %eax, %eax jmp 0x2a686 leaq 0x33ff9f(%rip), %rcx # 0x36a544 incl (%rcx) movb $0x1, (%rax) leaq 0x2c9297(%rip), %r14 # 0x2f3848 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2c928d(%rip), %rbx # 0x2f384c movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0x34044c(%rip), %rax # 0x36aa18 movq $0x0, (%rax) leaq 0x35b6b(%rip), %rdi # 0x60145 callq 0x243f0 testq %rax, %rax je 0x2a5f4 movq %rax, %rdi callq 0x2a6c2 orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x35b50(%rip), %rdi # 0x6014b callq 0x243f0 testq %rax, %rax je 0x2a614 movq %rax, %rdi callq 0x2a6c2 orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0x2f02c movq 0x2c89a8(%rip), %rax # 0x2f2fc8 movq (%rax), %rax movq %rax, 0x33ff26(%rip) # 0x36a550 leaq 0x33ff1f(%rip), %rax # 0x36a550 movq $0x0, 0x33ff1c(%rip) # 0x36a558 leaq 0x33ff05(%rip), %rcx # 0x36a548 movq %rax, (%rcx) leaq 0x35b08(%rip), %rax # 0x60155 leaq 0x33ffa4(%rip), %r14 # 0x36a5f8 movq %rax, (%r14) leaq 0x33ff92(%rip), %rax # 0x36a5f0 movq (%rax), %rbx testq %rbx, %rbx je 0x2a674 movq %rbx, %rdi callq 0x2670c addq %rbx, %rax movq %rax, (%r14) callq 0x2c2b8 callq 0x2be80 movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0x2a68b popq %rbx popq %r14 popq %rbp retq leaq 0x353d0(%rip), %rdi # 0x5fa62 callq 0x243f0 leaq 0x33ff4a(%rip), %rbx # 0x36a5e8 movq %rax, (%rbx) testq %rax, %rax je 0x2a6b8 leaq 0x340153(%rip), %rdi # 0x36a800 movq %rax, %rsi callq 0x26dcd movq %rax, (%rbx) callq 0x30ad4 jmp 0x2a597
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_2A59E loc_2A597: xor eax, eax jmp loc_2A686 loc_2A59E: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_2A5F4 mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_2A5F4: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_2A614 mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_2A614: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_36A558, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_2A674 mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_2A674: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_2A68B loc_2A686: pop rbx pop r14 pop rbp retn loc_2A68B: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_2A6B8 lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_2A6B8: call my_time_init jmp loc_2A597
char my_init() { char result; // al long long v1; // rax long long v2; // rax const char *v3; // rbx char v4; // cl _BYTE *v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_36A558 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = &v3[dirname_length(my_progname)]; my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = (_BYTE *)getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename((long long)&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0x46a540] CMP byte ptr [RAX],0x0 JZ 0x0012a59e LAB_0012a597: XOR EAX,EAX JMP 0x0012a686 LAB_0012a59e: LEA RCX,[0x46a544] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x3f3848] MOV dword ptr [R14],0x1b0 LEA RBX,[0x3f384c] MOV dword ptr [RBX],0x1c0 LEA RAX,[0x46aa18] MOV qword ptr [RAX],0x0 LEA RDI,[0x160145] CALL 0x001243f0 TEST RAX,RAX JZ 0x0012a5f4 MOV RDI,RAX CALL 0x0012a6c2 OR EAX,0x180 MOV dword ptr [R14],EAX LAB_0012a5f4: LEA RDI,[0x16014b] CALL 0x001243f0 TEST RAX,RAX JZ 0x0012a614 MOV RDI,RAX CALL 0x0012a6c2 OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_0012a614: CALL 0x0012f02c MOV RAX,qword ptr [0x003f2fc8] MOV RAX,qword ptr [RAX] MOV qword ptr [0x0046a550],RAX LEA RAX,[0x46a550] MOV qword ptr [0x0046a558],0x0 LEA RCX,[0x46a548] MOV qword ptr [RCX],RAX LEA RAX,[0x160155] LEA R14,[0x46a5f8] MOV qword ptr [R14],RAX LEA RAX,[0x46a5f0] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x0012a674 MOV RDI,RBX CALL 0x0012670c ADD RAX,RBX MOV qword ptr [R14],RAX LAB_0012a674: CALL 0x0012c2b8 CALL 0x0012be80 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x0012a68b LAB_0012a686: POP RBX POP R14 POP RBP RET LAB_0012a68b: LEA RDI,[0x15fa62] CALL 0x001243f0 LEA RBX,[0x46a5e8] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x0012a6b8 LEA RDI,[0x46a800] MOV RSI,RAX CALL 0x00126dcd MOV qword ptr [RBX],RAX LAB_0012a6b8: CALL 0x00130ad4 JMP 0x0012a597
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_003f2fc8; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }