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
1,200
my_strnncoll_win1250ch
eloqsql/strings/ctype-win1250ch.c
static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) { int v1, v2; const uchar *p1, * p2; int pass1 = 0, pass2 = 0; int diff; if (s2_is_prefix && len1 > len2) len1=len2; p1 = s1; p2 = s2; do { NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1); NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2); if ((diff = v1 - v2)) return diff; } while (v1); return 0; }
O3
c
my_strnncoll_win1250ch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx cmpq %r8, %rdx movq %r8, %rax cmovbq %rdx, %rax testb %r9b, %r9b cmoveq %rdx, %rax movq %rax, -0x70(%rbp) movslq %eax, %rdx movq %r8, -0x78(%rbp) movslq %r8d, %r9 movl $0x1, %eax movl $0x1, %edi subq %rsi, %rdi movq %rdi, -0x60(%rbp) subq %rcx, %rax movq %rax, -0x68(%rbp) xorl %r13d, %r13d leaq 0x2844ea(%rip), %r14 # 0x2d7ac0 movq %rsi, %r15 movq %rcx, %r12 xorl %ebx, %ebx movq %rcx, -0x48(%rbp) movq %rsi, -0x58(%rbp) movq %r15, %rax subq %rsi, %rax cmpq %rdx, %rax jge 0x535fe testl %r13d, %r13d je 0x5362c movl $0x9, %r8d jmp 0x53627 testl %r13d, %r13d sete %r8b cmpl $0x0, -0x70(%rbp) setg %dil xorl %eax, %eax testb %r8b, %dil je 0x536f2 movl $0x1, %r13d movl $0x9, %r8d movq %rsi, %r15 movq %r14, %rax jmp 0x5363c xorl %r13d, %r13d movl $0x8, %r8d leaq 0x284384(%rip), %rax # 0x2d79c0 movzbl (%r15), %edi movb (%rax,%rdi), %al cmpb $-0x1, %al jne 0x536ec movq %r8, -0x50(%rbp) movq %r12, -0x38(%rbp) movl %ebx, -0x2c(%rbp) movq %r13, -0x40(%rbp) movq %r15, %r11 subq %rsi, %r11 movq -0x60(%rbp), %rax leaq (%rax,%r15), %rcx xorl %edi, %edi movq %r15, %r12 movq %rdi, %r8 shlq $0x4, %r8 leaq 0x299e95(%rip), %rax # 0x2ed510 movq (%r8,%rax), %r13 movb (%r13), %r10b testb %r10b, %r10b je 0x536b3 cmpq %rdx, %r11 jge 0x536b3 incq %r13 movq %rcx, %rbx cmpb (%r15), %r10b jne 0x536b8 incq %r15 movb (%r13), %r10b testb %r10b, %r10b je 0x536b3 leaq 0x1(%rbx), %rax incq %r13 cmpq %rdx, %rbx movq %rax, %rbx jl 0x53693 testb %r10b, %r10b je 0x536c8 incq %rdi cmpq $0x50, %rdi movq %r12, %r15 jne 0x5366d movb $-0x1, %al jmp 0x536dd leaq 0x299e41(%rip), %rax # 0x2ed510 addq %rax, %r8 movq -0x50(%rbp), %rax movb (%r8,%rax), %al decq %r15 movq -0x48(%rbp), %rcx movq -0x40(%rbp), %r13 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r12 movzbl %al, %eax incq %r15 movq %r12, %rdi subq %rcx, %rdi cmpq %r9, %rdi jge 0x53709 testl %ebx, %ebx je 0x53736 movl $0x9, %r10d jmp 0x53731 testl %ebx, %ebx sete %dil cmpl $0x0, -0x78(%rbp) setg %r8b xorl %r10d, %r10d testb %dil, %r8b je 0x53830 movl $0x1, %ebx movl $0x9, %r10d movq %rcx, %r12 movq %r14, %r8 jmp 0x53745 xorl %ebx, %ebx movl $0x8, %r10d leaq 0x28427b(%rip), %r8 # 0x2d79c0 movzbl (%r12), %edi movb (%r8,%rdi), %dil cmpb $-0x1, %dil jne 0x53829 movq %r10, -0x50(%rbp) movq %r15, -0x38(%rbp) movl %ebx, -0x2c(%rbp) movq %r13, -0x40(%rbp) movq %r12, %r14 subq %rcx, %r14 movq -0x68(%rbp), %rcx movq %r12, %r11 leaq (%rcx,%r12), %rsi xorl %r8d, %r8d movq %r8, %r15 shlq $0x4, %r15 leaq 0x299d87(%rip), %rcx # 0x2ed510 movq (%r15,%rcx), %rbx movb (%rbx), %r13b testb %r13b, %r13b je 0x537c4 cmpq %r9, %r14 jge 0x537c4 incq %rbx movq %rsi, %rdi movq %r11, %r10 cmpb (%r10), %r13b jne 0x537cc incq %r10 movb (%rbx), %r13b testb %r13b, %r13b je 0x537c7 leaq 0x1(%rdi), %r12 incq %rbx cmpq %r9, %rdi movq %r12, %rdi jl 0x537a3 jmp 0x537c7 movq %r11, %r10 testb %r13b, %r13b je 0x537f7 incq %r8 cmpq $0x50, %r8 jne 0x5377b movb $-0x1, %dil movq -0x48(%rbp), %rcx movq -0x58(%rbp), %rsi leaq 0x2842d9(%rip), %r14 # 0x2d7ac0 movq -0x40(%rbp), %r13 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r15 movq %r11, %r12 jmp 0x53829 leaq 0x299d12(%rip), %rcx # 0x2ed510 addq %rcx, %r15 movq -0x50(%rbp), %rcx movb (%r15,%rcx), %dil decq %r10 movq %r10, %r12 movq -0x48(%rbp), %rcx movq -0x58(%rbp), %rsi leaq 0x2842a2(%rip), %r14 # 0x2d7ac0 movq -0x40(%rbp), %r13 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r15 movzbl %dil, %r10d incq %r12 testl %eax, %eax je 0x5383d cmpl %r10d, %eax je 0x535e6 subl %r10d, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnncoll_win1250ch: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx cmp rdx, r8 mov rax, r8 cmovb rax, rdx test r9b, r9b cmovz rax, rdx mov [rbp+var_70], rax movsxd rdx, eax mov [rbp+var_78], r8 movsxd r9, r8d mov eax, 1 mov edi, 1 sub rdi, rsi mov [rbp+var_60], rdi sub rax, rcx mov [rbp+var_68], rax xor r13d, r13d lea r14, _sort_order_win1250ch2 mov r15, rsi mov r12, rcx xor ebx, ebx mov [rbp+var_48], rcx mov [rbp+var_58], rsi loc_535E6: mov rax, r15 sub rax, rsi cmp rax, rdx jge short loc_535FE test r13d, r13d jz short loc_5362C mov r8d, 9 jmp short loc_53627 loc_535FE: test r13d, r13d setz r8b cmp dword ptr [rbp+var_70], 0 setnle dil xor eax, eax test dil, r8b jz loc_536F2 mov r13d, 1 mov r8d, 9 mov r15, rsi loc_53627: mov rax, r14 jmp short loc_5363C loc_5362C: xor r13d, r13d mov r8d, 8 lea rax, _sort_order_win1250ch1 loc_5363C: movzx edi, byte ptr [r15] mov al, [rax+rdi] cmp al, 0FFh jnz loc_536EC mov [rbp+var_50], r8 mov [rbp+var_38], r12 mov [rbp+var_2C], ebx mov [rbp+var_40], r13 mov r11, r15 sub r11, rsi mov rax, [rbp+var_60] lea rcx, [rax+r15] xor edi, edi mov r12, r15 loc_5366D: mov r8, rdi shl r8, 4 lea rax, doubles_0 mov r13, [r8+rax] mov r10b, [r13+0] test r10b, r10b jz short loc_536B3 cmp r11, rdx jge short loc_536B3 inc r13 mov rbx, rcx loc_53693: cmp r10b, [r15] jnz short loc_536B8 inc r15 mov r10b, [r13+0] test r10b, r10b jz short loc_536B3 lea rax, [rbx+1] inc r13 cmp rbx, rdx mov rbx, rax jl short loc_53693 loc_536B3: test r10b, r10b jz short loc_536C8 loc_536B8: inc rdi cmp rdi, 50h ; 'P' mov r15, r12 jnz short loc_5366D mov al, 0FFh jmp short loc_536DD loc_536C8: lea rax, doubles_0 add r8, rax mov rax, [rbp+var_50] mov al, [r8+rax] dec r15 loc_536DD: mov rcx, [rbp+var_48] mov r13, [rbp+var_40] mov ebx, [rbp+var_2C] mov r12, [rbp+var_38] loc_536EC: movzx eax, al inc r15 loc_536F2: mov rdi, r12 sub rdi, rcx cmp rdi, r9 jge short loc_53709 test ebx, ebx jz short loc_53736 mov r10d, 9 jmp short loc_53731 loc_53709: test ebx, ebx setz dil cmp dword ptr [rbp+var_78], 0 setnle r8b xor r10d, r10d test r8b, dil jz loc_53830 mov ebx, 1 mov r10d, 9 mov r12, rcx loc_53731: mov r8, r14 jmp short loc_53745 loc_53736: xor ebx, ebx mov r10d, 8 lea r8, _sort_order_win1250ch1 loc_53745: movzx edi, byte ptr [r12] mov dil, [r8+rdi] cmp dil, 0FFh jnz loc_53829 mov [rbp+var_50], r10 mov [rbp+var_38], r15 mov [rbp+var_2C], ebx mov [rbp+var_40], r13 mov r14, r12 sub r14, rcx mov rcx, [rbp+var_68] mov r11, r12 lea rsi, [rcx+r12] xor r8d, r8d loc_5377B: mov r15, r8 shl r15, 4 lea rcx, doubles_0 mov rbx, [r15+rcx] mov r13b, [rbx] test r13b, r13b jz short loc_537C4 cmp r14, r9 jge short loc_537C4 inc rbx mov rdi, rsi mov r10, r11 loc_537A3: cmp r13b, [r10] jnz short loc_537CC inc r10 mov r13b, [rbx] test r13b, r13b jz short loc_537C7 lea r12, [rdi+1] inc rbx cmp rdi, r9 mov rdi, r12 jl short loc_537A3 jmp short loc_537C7 loc_537C4: mov r10, r11 loc_537C7: test r13b, r13b jz short loc_537F7 loc_537CC: inc r8 cmp r8, 50h ; 'P' jnz short loc_5377B mov dil, 0FFh mov rcx, [rbp+var_48] mov rsi, [rbp+var_58] lea r14, _sort_order_win1250ch2 mov r13, [rbp+var_40] mov ebx, [rbp+var_2C] mov r15, [rbp+var_38] mov r12, r11 jmp short loc_53829 loc_537F7: lea rcx, doubles_0 add r15, rcx mov rcx, [rbp+var_50] mov dil, [r15+rcx] dec r10 mov r12, r10 mov rcx, [rbp+var_48] mov rsi, [rbp+var_58] lea r14, _sort_order_win1250ch2 mov r13, [rbp+var_40] mov ebx, [rbp+var_2C] mov r15, [rbp+var_38] loc_53829: movzx r10d, dil inc r12 loc_53830: test eax, eax jz short loc_5383D cmp eax, r10d jz loc_535E6 loc_5383D: sub eax, r10d pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnncoll_win1250ch( long long a1, _BYTE *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { int v6; // eax long long v7; // rdx long long v8; // r9 long long v9; // r13 _BYTE *v10; // r15 unsigned __int8 *v11; // r12 int v12; // ebx long long v13; // r8 _BYTE *v14; // rax _BYTE *v15; // r11 _BYTE *v16; // rcx long long v17; // rdi _BYTE *v18; // r12 char *v19; // r13 char v20; // r10 char *v21; // r13 _BYTE *v22; // rbx bool v23; // cc long long v24; // r10 int v25; // r10d _BYTE *v26; // r8 unsigned __int8 v27; // di long long v28; // r8 char *v29; // rbx char v30; // r13 char *v31; // rbx unsigned __int8 *v32; // rdi _BYTE *v33; // r10 int v35; // [rsp+0h] [rbp-78h] int v36; // [rsp+8h] [rbp-70h] long long v37; // [rsp+10h] [rbp-68h] long long v38; // [rsp+18h] [rbp-60h] _BYTE *v39; // [rsp+20h] [rbp-58h] long long v40; // [rsp+28h] [rbp-50h] unsigned __int8 *v41; // [rsp+30h] [rbp-48h] long long v42; // [rsp+38h] [rbp-40h] long long v43; // [rsp+38h] [rbp-40h] unsigned __int8 *v44; // [rsp+40h] [rbp-38h] int v45; // [rsp+4Ch] [rbp-2Ch] int v46; // [rsp+4Ch] [rbp-2Ch] v6 = a5; if ( a3 < a5 ) v6 = a3; if ( !a6 ) v6 = a3; v36 = v6; v7 = v6; v35 = a5; v8 = (int)a5; v38 = 1LL - (_QWORD)a2; v37 = 1LL - (_QWORD)a4; v9 = 0LL; v10 = a2; v11 = a4; v12 = 0; v41 = a4; v39 = a2; do { if ( v10 - a2 >= v7 ) { LODWORD(v14) = 0; if ( (_DWORD)v9 != 0 || v36 <= 0 ) goto LABEL_27; v9 = 1LL; v13 = 9LL; v10 = a2; } else { if ( !(_DWORD)v9 ) { v9 = 0LL; v13 = 8LL; v14 = &sort_order_win1250ch1; goto LABEL_13; } v13 = 9LL; } v14 = &sort_order_win1250ch2; LABEL_13: LOBYTE(v14) = v14[(unsigned __int8)*v10]; if ( (_BYTE)v14 != 0xFF ) goto LABEL_26; v44 = v11; v45 = v12; v42 = v9; v15 = (_BYTE *)(v10 - a2); v16 = &v10[v38]; v17 = 0LL; v18 = v10; while ( 1 ) { v19 = (char *)*(&doubles_0 + 2 * v17); v20 = *v19; if ( *v19 && (long long)v15 < v7 ) { v21 = v19 + 1; v22 = v16; while ( v20 == *v10 ) { ++v10; v20 = *v21; if ( *v21 ) { ++v21; v23 = (long long)v22++ < v7; if ( v23 ) continue; } goto LABEL_21; } goto LABEL_22; } LABEL_21: if ( !v20 ) break; LABEL_22: ++v17; v10 = v18; if ( v17 == 80 ) { LOBYTE(v14) = -1; goto LABEL_25; } } LOBYTE(v14) = *((_BYTE *)&doubles_0 + 16 * v17 + v13); --v10; LABEL_25: a4 = v41; v9 = v42; v12 = v45; v11 = v44; LABEL_26: LODWORD(v14) = (unsigned __int8)v14; ++v10; LABEL_27: if ( v11 - a4 >= v8 ) { v25 = 0; if ( v12 != 0 || v35 <= 0 ) continue; v12 = 1; v24 = 9LL; v11 = a4; LABEL_32: v26 = &sort_order_win1250ch2; } else { if ( v12 ) { v24 = 9LL; goto LABEL_32; } v12 = 0; v24 = 8LL; v26 = &sort_order_win1250ch1; } v27 = v26[*v11]; if ( v27 != 0xFF ) goto LABEL_48; v40 = v24; v46 = v12; v43 = v9; v28 = 0LL; while ( 2 ) { v29 = (char *)*(&doubles_0 + 2 * v28); v30 = *v29; if ( *v29 && v11 - a4 < v8 ) { v31 = v29 + 1; v32 = &v11[v37]; v33 = v11; while ( v30 == *v33 ) { ++v33; v30 = *v31; if ( *v31 ) { ++v31; v23 = (long long)v32++ < v8; if ( v23 ) continue; } goto LABEL_44; } goto LABEL_45; } v33 = v11; LABEL_44: if ( v30 ) { LABEL_45: if ( ++v28 == 80 ) { v27 = -1; a4 = v41; a2 = v39; v9 = v43; v12 = v46; goto LABEL_48; } continue; } break; } v27 = *((_BYTE *)&doubles_0 + 16 * v28 + v40); v11 = v33 - 1; a4 = v41; a2 = v39; v9 = v43; v12 = v46; LABEL_48: v25 = v27; ++v11; } while ( (_DWORD)v14 && (_DWORD)v14 == v25 ); return (unsigned int)((_DWORD)v14 - v25); }
my_strnncoll_win1250ch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX CMP RDX,R8 MOV RAX,R8 CMOVC RAX,RDX TEST R9B,R9B CMOVZ RAX,RDX MOV qword ptr [RBP + -0x70],RAX MOVSXD RDX,EAX MOV qword ptr [RBP + -0x78],R8 MOVSXD R9,R8D MOV EAX,0x1 MOV EDI,0x1 SUB RDI,RSI MOV qword ptr [RBP + -0x60],RDI SUB RAX,RCX MOV qword ptr [RBP + -0x68],RAX XOR R13D,R13D LEA R14,[0x3d7ac0] MOV R15,RSI MOV R12,RCX XOR EBX,EBX MOV qword ptr [RBP + -0x48],RCX MOV qword ptr [RBP + -0x58],RSI LAB_001535e6: MOV RAX,R15 SUB RAX,RSI CMP RAX,RDX JGE 0x001535fe TEST R13D,R13D JZ 0x0015362c MOV R8D,0x9 JMP 0x00153627 LAB_001535fe: TEST R13D,R13D SETZ R8B CMP dword ptr [RBP + -0x70],0x0 SETG DIL XOR EAX,EAX TEST DIL,R8B JZ 0x001536f2 MOV R13D,0x1 MOV R8D,0x9 MOV R15,RSI LAB_00153627: MOV RAX,R14 JMP 0x0015363c LAB_0015362c: XOR R13D,R13D MOV R8D,0x8 LEA RAX,[0x3d79c0] LAB_0015363c: MOVZX EDI,byte ptr [R15] MOV AL,byte ptr [RAX + RDI*0x1] CMP AL,0xff JNZ 0x001536ec MOV qword ptr [RBP + -0x50],R8 MOV qword ptr [RBP + -0x38],R12 MOV dword ptr [RBP + -0x2c],EBX MOV qword ptr [RBP + -0x40],R13 MOV R11,R15 SUB R11,RSI MOV RAX,qword ptr [RBP + -0x60] LEA RCX,[RAX + R15*0x1] XOR EDI,EDI MOV R12,R15 LAB_0015366d: MOV R8,RDI SHL R8,0x4 LEA RAX,[0x3ed510] MOV R13,qword ptr [R8 + RAX*0x1] MOV R10B,byte ptr [R13] TEST R10B,R10B JZ 0x001536b3 CMP R11,RDX JGE 0x001536b3 INC R13 MOV RBX,RCX LAB_00153693: CMP R10B,byte ptr [R15] JNZ 0x001536b8 INC R15 MOV R10B,byte ptr [R13] TEST R10B,R10B JZ 0x001536b3 LEA RAX,[RBX + 0x1] INC R13 CMP RBX,RDX MOV RBX,RAX JL 0x00153693 LAB_001536b3: TEST R10B,R10B JZ 0x001536c8 LAB_001536b8: INC RDI CMP RDI,0x50 MOV R15,R12 JNZ 0x0015366d MOV AL,0xff JMP 0x001536dd LAB_001536c8: LEA RAX,[0x3ed510] ADD R8,RAX MOV RAX,qword ptr [RBP + -0x50] MOV AL,byte ptr [R8 + RAX*0x1] DEC R15 LAB_001536dd: MOV RCX,qword ptr [RBP + -0x48] MOV R13,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + -0x2c] MOV R12,qword ptr [RBP + -0x38] LAB_001536ec: MOVZX EAX,AL INC R15 LAB_001536f2: MOV RDI,R12 SUB RDI,RCX CMP RDI,R9 JGE 0x00153709 TEST EBX,EBX JZ 0x00153736 MOV R10D,0x9 JMP 0x00153731 LAB_00153709: TEST EBX,EBX SETZ DIL CMP dword ptr [RBP + -0x78],0x0 SETG R8B XOR R10D,R10D TEST R8B,DIL JZ 0x00153830 MOV EBX,0x1 MOV R10D,0x9 MOV R12,RCX LAB_00153731: MOV R8,R14 JMP 0x00153745 LAB_00153736: XOR EBX,EBX MOV R10D,0x8 LEA R8,[0x3d79c0] LAB_00153745: MOVZX EDI,byte ptr [R12] MOV DIL,byte ptr [R8 + RDI*0x1] CMP DIL,0xff JNZ 0x00153829 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x38],R15 MOV dword ptr [RBP + -0x2c],EBX MOV qword ptr [RBP + -0x40],R13 MOV R14,R12 SUB R14,RCX MOV RCX,qword ptr [RBP + -0x68] MOV R11,R12 LEA RSI,[RCX + R12*0x1] XOR R8D,R8D LAB_0015377b: MOV R15,R8 SHL R15,0x4 LEA RCX,[0x3ed510] MOV RBX,qword ptr [R15 + RCX*0x1] MOV R13B,byte ptr [RBX] TEST R13B,R13B JZ 0x001537c4 CMP R14,R9 JGE 0x001537c4 INC RBX MOV RDI,RSI MOV R10,R11 LAB_001537a3: CMP R13B,byte ptr [R10] JNZ 0x001537cc INC R10 MOV R13B,byte ptr [RBX] TEST R13B,R13B JZ 0x001537c7 LEA R12,[RDI + 0x1] INC RBX CMP RDI,R9 MOV RDI,R12 JL 0x001537a3 JMP 0x001537c7 LAB_001537c4: MOV R10,R11 LAB_001537c7: TEST R13B,R13B JZ 0x001537f7 LAB_001537cc: INC R8 CMP R8,0x50 JNZ 0x0015377b MOV DIL,0xff MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x58] LEA R14,[0x3d7ac0] MOV R13,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + -0x2c] MOV R15,qword ptr [RBP + -0x38] MOV R12,R11 JMP 0x00153829 LAB_001537f7: LEA RCX,[0x3ed510] ADD R15,RCX MOV RCX,qword ptr [RBP + -0x50] MOV DIL,byte ptr [R15 + RCX*0x1] DEC R10 MOV R12,R10 MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x58] LEA R14,[0x3d7ac0] MOV R13,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + -0x2c] MOV R15,qword ptr [RBP + -0x38] LAB_00153829: MOVZX R10D,DIL INC R12 LAB_00153830: TEST EAX,EAX JZ 0x0015383d CMP EAX,R10D JZ 0x001535e6 LAB_0015383d: SUB EAX,R10D POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_strnncoll_win1250ch (int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { bool bVar1; bool bVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; byte bVar6; int iVar7; ulong uVar9; int1 *puVar10; long lVar11; int iVar12; uint uVar13; long lVar14; byte *pbVar15; byte *pbVar16; byte *pbVar17; byte *pbVar18; uint uVar8; uVar9 = param_5; if (param_3 < param_5) { uVar9 = param_3; } if (param_6 == '\0') { uVar9 = param_3; } iVar7 = (int)uVar9; iVar12 = (int)param_5; bVar2 = false; bVar1 = false; pbVar15 = param_4; pbVar18 = param_2; do { if ((long)pbVar18 - (long)param_2 < (long)iVar7) { if (bVar2) { LAB_00153627: lVar14 = 9; puVar10 = _sort_order_win1250ch2; } else { bVar2 = false; lVar14 = 8; puVar10 = _sort_order_win1250ch1; } bVar6 = puVar10[*pbVar18]; if (bVar6 == 0xff) { lVar11 = 0; do { pbVar16 = (&doubles)[lVar11 * 2]; bVar6 = *pbVar16; pbVar17 = pbVar18; pbVar5 = pbVar18 + (1 - (long)param_2); pbVar4 = pbVar18 + -(long)param_2; if (bVar6 != 0) { while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar7) { pbVar16 = pbVar16 + 1; if (bVar6 != *pbVar17) goto LAB_001536b8; pbVar17 = pbVar17 + 1; bVar6 = *pbVar16; if (bVar6 == 0) break; pbVar5 = pbVar3 + 1; pbVar4 = pbVar3; } } if (bVar6 == 0) { bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar18 = pbVar17 + -1; goto LAB_001536ec; } LAB_001536b8: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); bVar6 = 0xff; } LAB_001536ec: uVar8 = (uint)bVar6; pbVar18 = pbVar18 + 1; } else { uVar8 = 0; if (0 < iVar7 && !bVar2) { bVar2 = true; pbVar18 = param_2; goto LAB_00153627; } } if ((long)pbVar15 - (long)param_4 < (long)iVar12) { if (bVar1) { LAB_00153731: lVar14 = 9; puVar10 = _sort_order_win1250ch2; } else { bVar1 = false; lVar14 = 8; puVar10 = _sort_order_win1250ch1; } bVar6 = puVar10[*pbVar15]; if (bVar6 == 0xff) { lVar11 = 0; do { pbVar16 = (&doubles)[lVar11 * 2]; bVar6 = *pbVar16; pbVar17 = pbVar15; pbVar5 = pbVar15 + (1 - (long)param_4); pbVar4 = pbVar15 + -(long)param_4; if (bVar6 != 0) { while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar12) { pbVar16 = pbVar16 + 1; if (bVar6 != *pbVar17) goto LAB_001537cc; pbVar17 = pbVar17 + 1; bVar6 = *pbVar16; if (bVar6 == 0) break; pbVar5 = pbVar3 + 1; pbVar4 = pbVar3; } } if (bVar6 == 0) { bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar15 = pbVar17 + -1; goto LAB_00153829; } LAB_001537cc: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); bVar6 = 0xff; } LAB_00153829: uVar13 = (uint)bVar6; pbVar15 = pbVar15 + 1; } else { uVar13 = 0; if (0 < iVar12 && !bVar1) { bVar1 = true; pbVar15 = param_4; goto LAB_00153731; } } if ((uVar8 == 0) || (uVar8 != uVar13)) { return uVar8 - uVar13; } } while( true ); }
1,201
llava_image_embed_make_with_filename
llama.cpp/examples/llava/llava.cpp
struct llava_image_embed * llava_image_embed_make_with_filename(struct clip_ctx * ctx_clip, int n_threads, const char * image_path) { unsigned char* image_bytes; long image_bytes_length; auto loaded = load_file_to_bytes(image_path, &image_bytes, &image_bytes_length); if (!loaded) { LOG_ERR("%s: failed to load %s\n", __func__, image_path); return NULL; } llava_image_embed *embed = llava_image_embed_make_with_bytes(ctx_clip, n_threads, image_bytes, image_bytes_length); free(image_bytes); return embed; }
O3
cpp
llava_image_embed_make_with_filename: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r15 leaq 0x10d389(%rip), %rsi # 0x13b6eb movq %rdx, %rdi callq 0x24b10 testq %rax, %rax je 0x2e423 movq %rax, %r14 movq %rax, %rdi xorl %esi, %esi movl $0x2, %edx callq 0x24ab0 movq %r14, %rdi callq 0x23520 movq %rax, %r12 movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x24ab0 movq %r12, %rdi callq 0x244c0 testq %rax, %rax je 0x2e447 movq %rax, %r13 movl %ebp, 0xc(%rsp) movq %rbx, 0x10(%rsp) callq 0x24730 movq %rax, %rbx movl $0x0, (%rax) movl $0x1, %esi movq %r13, %rdi movq %r12, %rdx movq %r14, %rcx callq 0x23bd0 movq %rax, %rbp movq %r14, %rdi callq 0x241b0 testl %eax, %eax jne 0x2e482 cmpq %r12, %rbp jne 0x2e492 movq %r14, %rdi callq 0x23940 movq %r15, %rdi movl 0xc(%rsp), %esi movq %r13, %rdx movl %r12d, %ecx callq 0x2e2a7 movq %rax, %rbx movq %r13, %rdi callq 0x23300 movq %rbx, %rax jmp 0x2e4c6 movq 0x160b16(%rip), %rax # 0x18ef40 movq (%rax), %rdi leaq 0x109684(%rip), %rsi # 0x137ab8 leaq 0x109695(%rip), %rdx # 0x137ad0 movq %rbx, %rcx xorl %eax, %eax callq 0x23390 jmp 0x2e4a2 movq 0x160af2(%rip), %rax # 0x18ef40 movq (%rax), %rdi leaq 0x10968b(%rip), %rsi # 0x137ae3 leaq 0x109671(%rip), %rdx # 0x137ad0 movq %r12, %rcx movq %rbx, %r8 xorl %eax, %eax callq 0x23390 leaq 0x10969b(%rip), %rdi # 0x137b0e callq 0x23600 movq %r14, %rdi callq 0x23940 jmp 0x2e4a2 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x24f72 jmp 0x2e49d movq %r13, %rdi movq %r14, %rsi callq 0x24fb7 movq 0x10(%rsp), %rbx movq 0x160a97(%rip), %rax # 0x18ef40 movq (%rax), %rdi leaq 0x10941c(%rip), %rsi # 0x1378cf leaq 0x10942c(%rip), %rdx # 0x1378e6 movq %rbx, %rcx xorl %eax, %eax callq 0x23390 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
llava_image_embed_make_with_filename: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov ebp, esi mov r15, rdi lea rsi, aCrb+2; "rb" mov rdi, rdx call _fopen test rax, rax jz loc_2E423 mov r14, rax mov rdi, rax xor esi, esi mov edx, 2 call _fseek mov rdi, r14 call _ftell mov r12, rax mov rdi, r14 xor esi, esi xor edx, edx call _fseek mov rdi, r12 call _malloc test rax, rax jz loc_2E447 mov r13, rax mov [rsp+48h+var_3C], ebp mov [rsp+48h+var_38], rbx call ___errno_location mov rbx, rax mov dword ptr [rax], 0 mov esi, 1 mov rdi, r13 mov rdx, r12 mov rcx, r14 call _fread mov rbp, rax mov rdi, r14 call _ferror test eax, eax jnz loc_2E482 cmp rbp, r12 jnz loc_2E492 mov rdi, r14 call _fclose mov rdi, r15; int mov esi, [rsp+48h+var_3C]; int mov rdx, r13 mov ecx, r12d call llava_image_embed_make_with_bytes mov rbx, rax mov rdi, r13 call _free mov rax, rbx jmp loc_2E4C6 loc_2E423: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSCanTReadFileS; "%s: can't read file %s\n" lea rdx, aLoadFileToByte; "load_file_to_bytes" mov rcx, rbx xor eax, eax call _fprintf jmp short loc_2E4A2 loc_2E447: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToAlloc; "%s: failed to alloc %ld bytes for file "... lea rdx, aLoadFileToByte; "load_file_to_bytes" mov rcx, r12 mov r8, rbx xor eax, eax call _fprintf lea rdi, aMemoryAllocati; "Memory allocation error" call _perror mov rdi, r14 call _fclose jmp short loc_2E4A2 loc_2E482: mov rdi, rbx mov rsi, r13 mov rdx, r14 call llava_image_embed_make_with_filename_cold_1 jmp short loc_2E49D loc_2E492: mov rdi, r13 mov rsi, r14 call llava_image_embed_make_with_filename_cold_2 loc_2E49D: mov rbx, [rsp+48h+var_38] loc_2E4A2: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToLoadS; "%s: failed to load %s\n" lea rdx, aLlavaImageEmbe_2; "llava_image_embed_make_with_filename" mov rcx, rbx xor eax, eax call _fprintf xor eax, eax loc_2E4C6: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long llava_image_embed_make_with_filename(long long a1, unsigned int a2, const char *a3) { const char *v3; // rbx long long v4; // rax long long v5; // r14 long long v6; // r12 long long v7; // rax long long v8; // r13 unsigned int *v9; // rbx long long v10; // rbp long long v11; // rbx const char *v13; // [rsp+10h] [rbp-38h] v3 = a3; v4 = fopen(a3, "rb"); if ( v4 ) { v5 = v4; fseek(v4, 0LL, 2LL); v6 = ftell(v5); fseek(v5, 0LL, 0LL); v7 = malloc(v6); if ( v7 ) { v8 = v7; v13 = v3; v9 = (unsigned int *)__errno_location(); *v9 = 0; v10 = fread(v8, 1LL, v6, v5); if ( (unsigned int)ferror(v5) ) { llava_image_embed_make_with_filename_cold_1(v9, v8, v5); } else { if ( v10 == v6 ) { fclose(v5); v11 = llava_image_embed_make_with_bytes(a1, a2, v8, v6); free(v8); return v11; } llava_image_embed_make_with_filename_cold_2(v8, v5); } v3 = v13; } else { fprintf(stderr, "%s: failed to alloc %ld bytes for file %s\n", "load_file_to_bytes", v6, v3); perror("Memory allocation error"); fclose(v5); } } else { fprintf(stderr, "%s: can't read file %s\n", "load_file_to_bytes", v3); } fprintf(stderr, "%s: failed to load %s\n", "llava_image_embed_make_with_filename", v3); return 0LL; }
llava_image_embed_make_with_filename: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV EBP,ESI MOV R15,RDI LEA RSI,[0x23b6eb] MOV RDI,RDX CALL 0x00124b10 TEST RAX,RAX JZ 0x0012e423 MOV R14,RAX MOV RDI,RAX XOR ESI,ESI MOV EDX,0x2 CALL 0x00124ab0 MOV RDI,R14 CALL 0x00123520 MOV R12,RAX MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x00124ab0 MOV RDI,R12 CALL 0x001244c0 TEST RAX,RAX JZ 0x0012e447 MOV R13,RAX MOV dword ptr [RSP + 0xc],EBP MOV qword ptr [RSP + 0x10],RBX CALL 0x00124730 MOV RBX,RAX MOV dword ptr [RAX],0x0 MOV ESI,0x1 MOV RDI,R13 MOV RDX,R12 MOV RCX,R14 CALL 0x00123bd0 MOV RBP,RAX MOV RDI,R14 CALL 0x001241b0 TEST EAX,EAX JNZ 0x0012e482 CMP RBP,R12 JNZ 0x0012e492 MOV RDI,R14 CALL 0x00123940 MOV RDI,R15 MOV ESI,dword ptr [RSP + 0xc] MOV RDX,R13 MOV ECX,R12D CALL 0x0012e2a7 MOV RBX,RAX MOV RDI,R13 CALL 0x00123300 MOV RAX,RBX JMP 0x0012e4c6 LAB_0012e423: MOV RAX,qword ptr [0x0028ef40] MOV RDI,qword ptr [RAX] LEA RSI,[0x237ab8] LEA RDX,[0x237ad0] MOV RCX,RBX XOR EAX,EAX CALL 0x00123390 JMP 0x0012e4a2 LAB_0012e447: MOV RAX,qword ptr [0x0028ef40] MOV RDI,qword ptr [RAX] LEA RSI,[0x237ae3] LEA RDX,[0x237ad0] MOV RCX,R12 MOV R8,RBX XOR EAX,EAX CALL 0x00123390 LEA RDI,[0x237b0e] CALL 0x00123600 MOV RDI,R14 CALL 0x00123940 JMP 0x0012e4a2 LAB_0012e482: MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x00124f72 JMP 0x0012e49d LAB_0012e492: MOV RDI,R13 MOV RSI,R14 CALL 0x00124fb7 LAB_0012e49d: MOV RBX,qword ptr [RSP + 0x10] LAB_0012e4a2: MOV RAX,qword ptr [0x0028ef40] MOV RDI,qword ptr [RAX] LEA RSI,[0x2378cf] LEA RDX,[0x2378e6] MOV RCX,RBX XOR EAX,EAX CALL 0x00123390 XOR EAX,EAX LAB_0012e4c6: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 llava_image_embed_make_with_filename(int8 param_1,int4 param_2,char *param_3) { int iVar1; FILE *__stream; size_t __size; void *__ptr; int *piVar2; size_t sVar3; int8 uVar4; __stream = fopen(param_3,"rb"); if (__stream == (FILE *)0x0) { fprintf(*(FILE **)PTR_stderr_0028ef40,"%s: can\'t read file %s\n","load_file_to_bytes",param_3); } else { fseek(__stream,0,2); __size = ftell(__stream); fseek(__stream,0,0); __ptr = malloc(__size); if (__ptr == (void *)0x0) { fprintf(*(FILE **)PTR_stderr_0028ef40,"%s: failed to alloc %ld bytes for file %s\n", "load_file_to_bytes",__size,param_3); perror("Memory allocation error"); fclose(__stream); } else { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = fread(__ptr,1,__size,__stream); iVar1 = ferror(__stream); if (iVar1 == 0) { if (sVar3 == __size) { fclose(__stream); uVar4 = llava_image_embed_make_with_bytes(param_1,param_2,__ptr,__size & 0xffffffff); free(__ptr); return uVar4; } llava_image_embed_make_with_filename_cold_2(__ptr,__stream); } else { llava_image_embed_make_with_filename_cold_1(piVar2,__ptr,__stream); } } } fprintf(*(FILE **)PTR_stderr_0028ef40,"%s: failed to load %s\n", "llava_image_embed_make_with_filename",param_3); return 0; }
1,202
mysql_stmt_execute_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_execute_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_execute, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If eg. mysql_change_user(), stmt->mysql will be NULL. In this case, we cannot block. */ if (!stmt->mysql) { *ret= mysql_stmt_execute(stmt); return 0; }) }
O0
c
mysql_stmt_execute_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x41848 movq -0x18(%rbp), %rdi callq 0x30a30 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x41959 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x41970 leaq -0x30(%rbp), %rdx callq 0x43fc0 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0x418b6 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x41959 cmpl $0x0, -0x1c(%rbp) jge 0x41945 jmp 0x418c2 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 0x22856(%rip), %rax # 0x64140 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x22834(%rip), %rax # 0x64150 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x41952 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_execute_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_41848 mov rdi, [rbp+var_18] call mysql_stmt_execute mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_41959 loc_41848: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_execute_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_418B6 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_41959 loc_418B6: cmp [rbp+var_1C], 0 jge loc_41945 jmp short $+2 loc_418C2: 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_41952 loc_41945: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_41952: mov [rbp+var_4], 0 loc_41959: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_execute_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_execute_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_execute(v6); return 0; } }
mysql_stmt_execute_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00141848 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00130a30 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00141959 LAB_00141848: 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 + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x141970] LEA RDX,[RBP + -0x30] CALL 0x00143fc0 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x001418b6 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00141959 LAB_001418b6: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x00141945 JMP 0x001418c2 LAB_001418c2: 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,[0x164140] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 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,[0x164150] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 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 0x00141952 LAB_00141945: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_00141952: MOV dword ptr [RBP + -0x4],0x0 LAB_00141959: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_execute_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_execute(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_execute_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 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_00164190, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
1,203
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O0
c
init_available_charsets: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0xbb0b51(%rip), %rdi # 0xcafb40 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x2a2f0 leaq 0xbb4bae(%rip), %rdi # 0xcb3bb0 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x2a2f0 leaq 0xbb9bb7(%rip), %rax # 0xcb8bcc movl (%rax), %edi leaq 0xbb4b22(%rip), %rsi # 0xcb3b40 movl $0x10, %edx leaq 0x29c946(%rip), %rcx # 0x39b970 movl $0x40, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1ab4(%rip), %rax # 0x100af0 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0x103930 xorl %eax, %eax movl %eax, %edi callq 0x12efc0 leaq 0xbb0ac8(%rip), %rax # 0xcafb40 movq %rax, -0x2d8(%rbp) leaq 0xbb0aba(%rip), %rax # 0xcafb40 addq $0x4000, %rax # imm = 0x4000 addq $-0x8, %rax cmpq %rax, -0x2d8(%rbp) jae 0xff0f6 movq -0x2d8(%rbp), %rax cmpq $0x0, (%rax) je 0xff0e0 jmp 0xff0a8 jmp 0xff0aa movq -0x2d8(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x40(%rax) je 0xff0de movq -0x2d8(%rbp), %rax movq (%rax), %rdi callq 0x100650 cmpb $0x0, %al je 0xff0dc movq -0x2d8(%rbp), %rax movq $0x0, (%rax) jmp 0xff0de jmp 0xff0e0 jmp 0xff0e2 movq -0x2d8(%rbp), %rax addq $0x8, %rax movq %rax, -0x2d8(%rbp) jmp 0xff07f leaq -0x2d0(%rbp), %rdi callq 0xfe5f0 leaq -0x220(%rbp), %rdi callq 0xfec90 movq %rax, %rdi leaq 0x852ca(%rip), %rsi # 0x1843e2 callq 0x2a7f0 leaq -0x220(%rbp), %rsi leaq -0x2d0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0x100b30 jmp 0xff136 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xff151 addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x2a290 nopw %cs:(%rax,%rax)
init_available_charsets: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, all_charsets xor esi, esi mov edx, 4000h call _memset lea rdi, my_collation_statistics xor esi, esi mov edx, 4000h call _memset lea rax, key_memory_charsets mov edi, [rax] lea rsi, charset_name_hash mov edx, 10h lea rcx, my_charset_latin1 mov r8d, 40h ; '@' xor eax, eax mov r9d, eax lea rax, get_charset_key mov [rsp+300h+var_300], 0 mov [rsp+300h+var_2F8], rax mov [rsp+300h+var_2F0], 0 mov [rsp+300h+var_2E8], 0 mov [rsp+300h+var_2E0], 1 call my_hash_init2 xor eax, eax mov edi, eax call init_compiled_charsets lea rax, all_charsets mov [rbp+var_2D8], rax loc_FF07F: lea rax, all_charsets add rax, 4000h add rax, 0FFFFFFFFFFFFFFF8h cmp [rbp+var_2D8], rax jnb short loc_FF0F6 mov rax, [rbp+var_2D8] cmp qword ptr [rax], 0 jz short loc_FF0E0 jmp short $+2 loc_FF0A8: jmp short $+2 loc_FF0AA: mov rax, [rbp+var_2D8] mov rax, [rax] cmp qword ptr [rax+40h], 0 jz short loc_FF0DE mov rax, [rbp+var_2D8] mov rdi, [rax] call init_state_maps cmp al, 0 jz short loc_FF0DC mov rax, [rbp+var_2D8] mov qword ptr [rax], 0 loc_FF0DC: jmp short $+2 loc_FF0DE: jmp short $+2 loc_FF0E0: jmp short $+2 loc_FF0E2: mov rax, [rbp+var_2D8] add rax, 8 mov [rbp+var_2D8], rax jmp short loc_FF07F loc_FF0F6: lea rdi, [rbp+var_2D0] call my_charset_loader_init_mysys lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy lea rsi, [rbp+var_220] lea rdi, [rbp+var_2D0] xor eax, eax mov edx, eax call my_read_charset_file jmp short $+2 loc_FF136: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_FF151 add rsp, 300h pop rbp retn loc_FF151: call ___stack_chk_fail
unsigned long long init_available_charsets() { long long charsets_dir; // rax _QWORD *i; // [rsp+28h] [rbp-2D8h] _BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF _BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF unsigned long long v5; // [rsp+2F8h] [rbp-8h] v5 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); for ( i = all_charsets; i < &all_charsets[2047]; ++i ) { if ( *i && *(_QWORD *)(*i + 64LL) ) { if ( (unsigned __int8)init_state_maps(*i) ) *i = 0LL; } } my_charset_loader_init_mysys((long long)v3); charsets_dir = get_charsets_dir((long long)v4); stpcpy(charsets_dir, "Index.xml"); my_read_charset_file(v3, v4, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0xdafb40] XOR ESI,ESI MOV EDX,0x4000 CALL 0x0012a2f0 LEA RDI,[0xdb3bb0] XOR ESI,ESI MOV EDX,0x4000 CALL 0x0012a2f0 LEA RAX,[0xdb8bcc] MOV EDI,dword ptr [RAX] LEA RSI,[0xdb3b40] MOV EDX,0x10 LEA RCX,[0x49b970] MOV R8D,0x40 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x200af0] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x00203930 XOR EAX,EAX MOV EDI,EAX CALL 0x0022efc0 LEA RAX,[0xdafb40] MOV qword ptr [RBP + -0x2d8],RAX LAB_001ff07f: LEA RAX,[0xdafb40] ADD RAX,0x4000 ADD RAX,-0x8 CMP qword ptr [RBP + -0x2d8],RAX JNC 0x001ff0f6 MOV RAX,qword ptr [RBP + -0x2d8] CMP qword ptr [RAX],0x0 JZ 0x001ff0e0 JMP 0x001ff0a8 LAB_001ff0a8: JMP 0x001ff0aa LAB_001ff0aa: MOV RAX,qword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001ff0de MOV RAX,qword ptr [RBP + -0x2d8] MOV RDI,qword ptr [RAX] CALL 0x00200650 CMP AL,0x0 JZ 0x001ff0dc MOV RAX,qword ptr [RBP + -0x2d8] MOV qword ptr [RAX],0x0 LAB_001ff0dc: JMP 0x001ff0de LAB_001ff0de: JMP 0x001ff0e0 LAB_001ff0e0: JMP 0x001ff0e2 LAB_001ff0e2: MOV RAX,qword ptr [RBP + -0x2d8] ADD RAX,0x8 MOV qword ptr [RBP + -0x2d8],RAX JMP 0x001ff07f LAB_001ff0f6: LEA RDI,[RBP + -0x2d0] CALL 0x001fe5f0 LEA RDI,[RBP + -0x220] CALL 0x001fec90 MOV RDI,RAX LEA RSI,[0x2843e2] CALL 0x0012a7f0 LEA RSI,[RBP + -0x220] LEA RDI,[RBP + -0x2d0] XOR EAX,EAX MOV EDX,EAX CALL 0x00200b30 JMP 0x001ff136 LAB_001ff136: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001ff151 ADD RSP,0x300 POP RBP RET LAB_001ff151: CALL 0x0012a290
void init_available_charsets(void) { char cVar1; char *__dest; long in_FS_OFFSET; long *local_2e0; int1 local_2d8 [176]; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); for (local_2e0 = &all_charsets; local_2e0 < (long *)0xdb3b38; local_2e0 = local_2e0 + 1) { if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) && (cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) { *local_2e0 = 0; } } my_charset_loader_init_mysys(local_2d8); __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_read_charset_file(local_2d8,local_228,0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
1,204
sessions::find(unsigned long)
untodesu[P]voxelius/game/server/sessions.cc
Session *sessions::find(std::uint64_t client_identity) { const auto it = identity_map.find(client_identity); if(it != identity_map.cend()) return it->second; return nullptr; }
O3
cpp
sessions::find(unsigned long): pushq %rax movq %rsp, %rsi movq %rdi, (%rsi) leaq 0xdf2b3(%rip), %rdi # 0x108ba0 callq 0x2df96 cmpl 0xdf2c8(%rip), %eax # 0x108bc0 jne 0x298fe xorl %eax, %eax jmp 0x29910 cltq movq 0xdf2a1(%rip), %rcx # 0x108ba8 shlq $0x4, %rax movq 0x8(%rcx,%rax), %rax popq %rcx retq
_ZN8sessions4findEm: push rax mov rsi, rsp mov [rsi], rdi lea rdi, _ZL12identity_map; identity_map call _ZNK7emhash87HashMapImP7SessionSt4hashImESt8equal_toImEE16find_filled_slotImEEjRKT_; emhash8::HashMap<ulong,Session *,std::hash<ulong>,std::equal_to<ulong>>::find_filled_slot<ulong>(ulong const&) cmp eax, dword ptr cs:xmmword_108BB4+0Ch jnz short loc_298FE xor eax, eax jmp short loc_29910 loc_298FE: cdqe mov rcx, qword ptr cs:_ZL12identity_map+8; identity_map shl rax, 4 mov rax, [rcx+rax+8] loc_29910: pop rcx retn
long long sessions::find(sessions *this) { int filled; // eax filled = emhash8::HashMap<unsigned long,Session *,std::hash<unsigned long>,std::equal_to<unsigned long>>::find_filled_slot<unsigned long>(&identity_map); if ( filled == HIDWORD(xmmword_108BB4) ) return 0LL; else return *(_QWORD *)(*((_QWORD *)&identity_map + 1) + 16LL * filled + 8); }
find: PUSH RAX MOV RSI,RSP MOV qword ptr [RSI],RDI LEA RDI,[0x208ba0] CALL 0x0012df96 CMP EAX,dword ptr [0x00208bc0] JNZ 0x001298fe XOR EAX,EAX JMP 0x00129910 LAB_001298fe: CDQE MOV RCX,qword ptr [0x00208ba8] SHL RAX,0x4 MOV RAX,qword ptr [RCX + RAX*0x1 + 0x8] LAB_00129910: POP RCX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* sessions::find(unsigned long) */ int8 sessions::find(ulong param_1) { uint uVar1; int8 uVar2; ulong local_8; local_8 = param_1; uVar1 = emhash8:: HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>>:: find_filled_slot<unsigned_long> ((HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>> *)&identity_map,&local_8); if (uVar1 == DAT_00208bc0) { uVar2 = 0; } else { uVar2 = *(int8 *)(_DAT_00208ba8 + 8 + (long)(int)uVar1 * 0x10); } return uVar2; }
1,205
ma_ft_del
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_del(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *record, my_off_t pos) { int error= -1; FT_WORD *wlist; DBUG_ENTER("_ma_ft_del"); DBUG_PRINT("enter",("keynr: %d",keynr)); if ((wlist= _ma_ft_parserecord(info, keynr, record, &info->ft_memroot))) error= _ma_ft_erase(info,keynr,keybuf,wlist,pos); free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_PRINT("exit",("Return: %d",error)); DBUG_RETURN(error); }
O0
c
ma_ft_del: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF jmp 0x8cf94 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x328, %rcx # imm = 0x328 callq 0x8c800 movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x8cfd4 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x38(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x8cdd0 movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rdi addq $0x328, %rdi # imm = 0x328 movl $0x2, %esi callq 0xeda10 jmp 0x8cfeb jmp 0x8cfed movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ma_ft_del: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], 0FFFFFFFFh jmp short $+2 loc_8CF94: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] mov rcx, [rbp+var_8] add rcx, 328h call _ma_ft_parserecord mov [rbp+var_38], rax cmp rax, 0 jz short loc_8CFD4 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_38] mov r8, [rbp+var_28] call _ma_ft_erase mov [rbp+var_2C], eax loc_8CFD4: mov rdi, [rbp+var_8] add rdi, 328h mov esi, 2 call free_root jmp short $+2 loc_8CFEB: jmp short $+2 loc_8CFED: mov eax, [rbp+var_2C] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add rsp, 40h pop rbp retn
long long ma_ft_del(long long *a1, unsigned int a2, _BYTE *a3, long long a4, long long a5) { _QWORD *v6; // [rsp+8h] [rbp-38h] unsigned int v7; // [rsp+14h] [rbp-2Ch] v7 = -1; v6 = (_QWORD *)ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101)); if ( v6 ) v7 = ma_ft_erase(a1, a2, a3, v6, a5); free_root(a1 + 101, 2LL); return v7; }
_ma_ft_del: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],0xffffffff JMP 0x0018cf94 LAB_0018cf94: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x328 CALL 0x0018c800 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x0018cfd4 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x28] CALL 0x0018cdd0 MOV dword ptr [RBP + -0x2c],EAX LAB_0018cfd4: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x328 MOV ESI,0x2 CALL 0x001eda10 JMP 0x0018cfeb LAB_0018cfeb: JMP 0x0018cfed LAB_0018cfed: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD RSP,0x40 POP RBP RET
int4 _ma_ft_del(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5) { long lVar1; int4 local_34; local_34 = 0xffffffff; lVar1 = _ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x328); if (lVar1 != 0) { local_34 = _ma_ft_erase(param_1,param_2,param_3,lVar1,param_5); } free_root(param_1 + 0x328,2); return local_34; }
1,206
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
hkr04[P]cpp-mcp/common/json.hpp
std::pair<iterator, bool> emplace(const key_type& key, T&& t) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return {it, false}; } } Container::emplace_back(key, std::forward<T>(t)); return {std::prev(this->end()), true}; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, (%rsp) movq %rsi, %r12 movq %rdi, %r14 movq (%rdi), %rbx movq 0x8(%rdi), %r15 cmpq %r15, %rbx je 0x1073e movq (%r12), %r13 movq 0x8(%r12), %rbp cmpq %rbp, 0x8(%rbx) jne 0x10735 testq %rbp, %rbp je 0x10759 movq (%rbx), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0xa670 testl %eax, %eax je 0x10759 addq $0x30, %rbx cmpq %r15, %rbx jne 0x10718 movq %r14, %rdi movq %r12, %rsi movq (%rsp), %rdx callq 0x10ad2 movq 0x8(%r14), %rbx addq $-0x30, %rbx movb $0x1, %dl jmp 0x1075b xorl %edx, %edx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], rdx mov r12, rsi mov r14, rdi mov rbx, [rdi] mov r15, [rdi+8] cmp rbx, r15 jz short loc_1073E mov r13, [r12] mov rbp, [r12+8] loc_10718: cmp [rbx+8], rbp jnz short loc_10735 test rbp, rbp jz short loc_10759 mov rdi, [rbx] mov rsi, r13 mov rdx, rbp call _bcmp test eax, eax jz short loc_10759 loc_10735: add rbx, 30h ; '0' cmp rbx, r15 jnz short loc_10718 loc_1073E: mov rdi, r14 mov rsi, r12 mov rdx, [rsp+38h+var_38] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::emplace_back<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>>(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rbx, [r14+8] add rbx, 0FFFFFFFFFFFFFFD0h mov dl, 1 jmp short loc_1075B loc_10759: xor edx, edx loc_1075B: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( _QWORD *a1, long long *a2, long long a3) { _QWORD *v3; // rbx _QWORD *v4; // r15 long long v5; // r13 long long v6; // rbp v3 = (_QWORD *)*a1; v4 = (_QWORD *)a1[1]; if ( (_QWORD *)*a1 == v4 ) { LABEL_7: std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( a1, a2, a3); return a1[1] - 48LL; } else { v5 = *a2; v6 = a2[1]; while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5, v6) ) { v3 += 6; if ( v3 == v4 ) goto LABEL_7; } } return (long long)v3; }
emplace: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],RDX MOV R12,RSI MOV R14,RDI MOV RBX,qword ptr [RDI] MOV R15,qword ptr [RDI + 0x8] CMP RBX,R15 JZ 0x0011073e MOV R13,qword ptr [R12] MOV RBP,qword ptr [R12 + 0x8] LAB_00110718: CMP qword ptr [RBX + 0x8],RBP JNZ 0x00110735 TEST RBP,RBP JZ 0x00110759 MOV RDI,qword ptr [RBX] MOV RSI,R13 MOV RDX,RBP CALL 0x0010a670 TEST EAX,EAX JZ 0x00110759 LAB_00110735: ADD RBX,0x30 CMP RBX,R15 JNZ 0x00110718 LAB_0011073e: MOV RDI,R14 MOV RSI,R12 MOV RDX,qword ptr [RSP] CALL 0x00110ad2 MOV RBX,qword ptr [R14 + 0x8] ADD RBX,-0x30 MOV DL,0x1 JMP 0x0011075b LAB_00110759: XOR EDX,EDX LAB_0011075b: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::emplace(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>&&) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::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>>>> *this,string *param_1,basic_json *param_2) { int8 *puVar1; void *__s2; size_t __n; int iVar2; int8 extraout_RDX; int8 uVar3; int8 *puVar4; int1 auVar5 [16]; puVar4 = *(int8 **)this; puVar1 = *(int8 **)(this + 8); if (puVar4 != puVar1) { __s2 = *(void **)param_1; __n = *(size_t *)(param_1 + 8); do { if (puVar4[1] == __n) { if (__n != 0) { iVar2 = bcmp((void *)*puVar4,__s2,__n); if (iVar2 != 0) goto LAB_00110735; } uVar3 = 0; goto LAB_0011075b; } LAB_00110735: puVar4 = puVar4 + 6; } while (puVar4 != puVar1); } std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> :: emplace_back<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>> ((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this,param_1,param_2); puVar4 = (int8 *)(*(long *)(this + 8) + -0x30); uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1); LAB_0011075b: auVar5._8_8_ = uVar3; auVar5._0_8_ = puVar4; return auVar5; }
1,207
init_alloc_root
eloqsql/mysys/my_alloc.c
void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused)), myf my_flags) { DBUG_ENTER("init_alloc_root"); DBUG_PRINT("enter",("root: %p prealloc: %zu", mem_root, pre_alloc_size)); mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= (block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1; if (my_flags & MY_THREAD_SPECIFIC) mem_root->block_size|= 1; mem_root->error_handler= 0; mem_root->block_num= 4; /* We shift this with >>2 */ mem_root->first_block_usage= 0; mem_root->m_psi_key= key; #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if ((mem_root->free= mem_root->pre_alloc= (USED_MEM*) my_malloc(key, size, MYF(my_flags)))) { mem_root->free->size= size; mem_root->free->left= pre_alloc_size; mem_root->free->next= 0; TRASH_MEM(mem_root->free); } } #endif DBUG_VOID_RETURN; }
O3
c
init_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rsi) xorl %eax, %eax movq %rax, 0x10(%rsi) movq $0x20, 0x18(%rsi) andq $-0x2, %rdx movl %r8d, %ecx shrl $0x10, %ecx andl $0x1, %ecx addq %rdx, %rcx addq $-0x28, %rcx movq %rcx, 0x20(%rsi) movq %rax, 0x30(%rsi) movq $0x4, 0x28(%rsi) movl %edi, 0x38(%rsi) testq %rbx, %rbx je 0x9eb40 movq %rsi, %r14 leaq 0x18(%rbx), %r15 movq %r15, %rsi movq %r8, %rdx callq 0xa46f9 movq %rax, 0x10(%r14) movq %rax, (%r14) testq %rax, %rax je 0x9eb40 movq %r15, 0x10(%rax) movq (%r14), %rax movq %rbx, 0x8(%rax) movq (%r14), %rax movq $0x0, (%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
init_alloc_root: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 xor eax, eax mov [rsi+10h], rax mov qword ptr [rsi+18h], 20h ; ' ' and rdx, 0FFFFFFFFFFFFFFFEh mov ecx, r8d shr ecx, 10h and ecx, 1 add rcx, rdx add rcx, 0FFFFFFFFFFFFFFD8h mov [rsi+20h], rcx mov [rsi+30h], rax mov qword ptr [rsi+28h], 4 mov [rsi+38h], edi test rbx, rbx jz short loc_9EB40 mov r14, rsi lea r15, [rbx+18h] mov rsi, r15 mov rdx, r8 call my_malloc mov [r14+10h], rax mov [r14], rax test rax, rax jz short loc_9EB40 mov [rax+10h], r15 mov rax, [r14] mov [rax+8], rbx mov rax, [r14] mov qword ptr [rax], 0 loc_9EB40: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long init_alloc_root(long long a1, long long *a2, long long a3, long long a4, long long a5) { long long result; // rax *(_OWORD *)a2 = 0LL; result = 0LL; a2[2] = 0LL; a2[3] = 32LL; a2[4] = (a3 & 0xFFFFFFFFFFFFFFFELL) + (WORD1(a5) & 1) - 40; a2[6] = 0LL; a2[5] = 4LL; *((_DWORD *)a2 + 14) = a1; if ( a4 ) { result = my_malloc(a1, a4 + 24, a5); a2[2] = result; *a2 = result; if ( result ) { *(_QWORD *)(result + 16) = a4 + 24; *(_QWORD *)(*a2 + 8) = a4; result = *a2; *(_QWORD *)*a2 = 0LL; } } return result; }
init_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 XOR EAX,EAX MOV qword ptr [RSI + 0x10],RAX MOV qword ptr [RSI + 0x18],0x20 AND RDX,-0x2 MOV ECX,R8D SHR ECX,0x10 AND ECX,0x1 ADD RCX,RDX ADD RCX,-0x28 MOV qword ptr [RSI + 0x20],RCX MOV qword ptr [RSI + 0x30],RAX MOV qword ptr [RSI + 0x28],0x4 MOV dword ptr [RSI + 0x38],EDI TEST RBX,RBX JZ 0x0019eb40 MOV R14,RSI LEA R15,[RBX + 0x18] MOV RSI,R15 MOV RDX,R8 CALL 0x001a46f9 MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14],RAX TEST RAX,RAX JZ 0x0019eb40 MOV qword ptr [RAX + 0x10],R15 MOV RAX,qword ptr [R14] MOV qword ptr [RAX + 0x8],RBX MOV RAX,qword ptr [R14] MOV qword ptr [RAX],0x0 LAB_0019eb40: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void init_alloc_root(int4 param_1,long *param_2,ulong param_3,long param_4,int8 param_5) { long lVar1; *param_2 = 0; param_2[1] = 0; param_2[2] = 0; param_2[3] = 0x20; param_2[4] = (ulong)((uint)param_5 >> 0x10 & 1) + (param_3 & 0xfffffffffffffffe) + -0x28; param_2[6] = 0; param_2[5] = 4; *(int4 *)(param_2 + 7) = param_1; if (param_4 != 0) { lVar1 = my_malloc(param_1,param_4 + 0x18,param_5); param_2[2] = lVar1; *param_2 = lVar1; if (lVar1 != 0) { *(long *)(lVar1 + 0x10) = param_4 + 0x18; *(long *)(*param_2 + 8) = param_4; *(int8 *)*param_2 = 0; } } return; }
1,208
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)); }
O0
c
ma_scan_init_block_record: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movsbl 0x7d9(%rax), %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax orl $0x10, %eax movl %eax, %eax movq %rax, -0x20(%rbp) jmp 0x591ea movq -0x10(%rbp), %rax cmpq $0x0, 0x220(%rax) jne 0x5922f movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax shll %eax movl %eax, %eax movl %eax, %esi movq -0x20(%rbp), %rdx xorl %edi, %edi callq 0xf39b0 movq -0x10(%rbp), %rcx movq %rax, 0x220(%rcx) cmpq $0x0, %rax jne 0x5922f jmp 0x59226 movb $0x1, -0x1(%rbp) jmp 0x592e5 movq -0x10(%rbp), %rax movq 0x220(%rax), %rcx movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x238(%rax) movq -0x10(%rbp), %rax movq 0x220(%rax), %rcx movq -0x18(%rbp), %rax movl 0xb3c(%rax), %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x230(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x268(%rax) movq -0x10(%rbp), %rax movq 0x230(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x228(%rax) movq -0x18(%rbp), %rax xorl %ecx, %ecx subq 0xb48(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x250(%rax) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x258(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x62570 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
_ma_scan_init_block_record: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] movsx edx, byte ptr [rax+7D9h] xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx or eax, 10h mov eax, eax mov [rbp+var_20], rax jmp short $+2 loc_591EA: mov rax, [rbp+var_10] cmp qword ptr [rax+220h], 0 jnz short loc_5922F mov rax, [rbp+var_18] mov eax, [rax+7BCh] shl eax, 1 mov eax, eax mov esi, eax mov rdx, [rbp+var_20] xor edi, edi call my_malloc mov rcx, [rbp+var_10] mov [rcx+220h], rax cmp rax, 0 jnz short loc_5922F jmp short $+2 loc_59226: mov [rbp+var_1], 1 jmp loc_592E5 loc_5922F: mov rax, [rbp+var_10] mov rcx, [rax+220h] mov rax, [rbp+var_18] mov eax, [rax+7BCh] add rcx, rax mov rax, [rbp+var_10] mov [rax+238h], rcx mov rax, [rbp+var_10] mov rcx, [rax+220h] mov rax, [rbp+var_18] mov eax, [rax+0B3Ch] add rcx, rax mov rax, [rbp+var_10] mov [rax+230h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+268h], 0 mov rax, [rbp+var_10] mov rcx, [rax+230h] mov rax, [rbp+var_10] mov [rax+228h], rcx mov rax, [rbp+var_18] xor ecx, ecx sub rcx, [rax+0B48h] mov rax, [rbp+var_10] mov [rax+250h], rcx mov rax, [rbp+var_18] mov rax, [rax+40h] mov rcx, [rbp+var_18] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_10] mov [rax+258h], rcx mov rax, [rbp+var_10] mov rdi, [rax] call _ma_bitmap_flush mov [rbp+var_1], al loc_592E5: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_scan_init_block_record(_QWORD *a1) { int v1; // eax long long v2; // rax long long v4; // [rsp+8h] [rbp-18h] v4 = *a1; v1 = 0; if ( *(_BYTE *)(*a1 + 2009LL) ) v1 = 0x10000; if ( !a1[68] ) { v2 = my_malloc(0LL, (unsigned int)(2 * *(_DWORD *)(v4 + 1980)), v1 | 0x10u); a1[68] = v2; if ( !v2 ) return 1; } a1[71] = *(unsigned int *)(v4 + 1980) + a1[68]; a1[70] = *(unsigned int *)(v4 + 2876) + a1[68]; *((_DWORD *)a1 + 154) = 0; a1[69] = a1[70]; a1[74] = -*(_QWORD *)(v4 + 2888); a1[75] = *(_QWORD *)(v4 + 64) / (unsigned long long)*(unsigned int *)(v4 + 1980); return ma_bitmap_flush(*a1); }
_ma_scan_init_block_record: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOVSX EDX,byte ptr [RAX + 0x7d9] XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,0x10 MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX JMP 0x001591ea LAB_001591ea: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x220],0x0 JNZ 0x0015922f MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] SHL EAX,0x1 MOV EAX,EAX MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x20] XOR EDI,EDI CALL 0x001f39b0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x220],RAX CMP RAX,0x0 JNZ 0x0015922f JMP 0x00159226 LAB_00159226: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001592e5 LAB_0015922f: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x220] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x238],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x220] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xb3c] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x230],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x268],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x230] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x228],RCX MOV RAX,qword ptr [RBP + -0x18] XOR ECX,ECX SUB RCX,qword ptr [RAX + 0xb48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x250],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x258],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00162570 MOV byte ptr [RBP + -0x1],AL LAB_001592e5: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 _ma_scan_init_block_record(long *param_1) { long lVar1; int1 uVar2; uint uVar3; long lVar4; lVar1 = *param_1; uVar3 = 0; if (*(char *)(lVar1 + 0x7d9) != '\0') { uVar3 = 0x10000; } if (param_1[0x44] == 0) { lVar4 = my_malloc(0,*(int *)(lVar1 + 0x7bc) << 1,uVar3 | 0x10); param_1[0x44] = lVar4; if (lVar4 == 0) { return 1; } } param_1[0x47] = param_1[0x44] + (ulong)*(uint *)(lVar1 + 0x7bc); param_1[0x46] = param_1[0x44] + (ulong)*(uint *)(lVar1 + 0xb3c); *(int4 *)(param_1 + 0x4d) = 0; param_1[0x45] = param_1[0x46]; param_1[0x4a] = -*(long *)(lVar1 + 0xb48); param_1[0x4b] = *(ulong *)(lVar1 + 0x40) / (ulong)*(uint *)(lVar1 + 0x7bc); uVar2 = _ma_bitmap_flush(*param_1); return uVar2; }
1,209
js_math_round
bluesky950520[P]quickjs/quickjs.c
static double js_math_round(double a) { JSFloat64Union u; uint64_t frac_mask, one; unsigned int e, s; u.d = a; e = (u.u64 >> 52) & 0x7ff; if (e < 1023) { /* abs(a) < 1 */ if (e == (1023 - 1) && u.u64 != 0xbfe0000000000000) { /* abs(a) > 0.5 or a = 0.5: return +/-1.0 */ u.u64 = (u.u64 & ((uint64_t)1 << 63)) | ((uint64_t)1023 << 52); } else { /* return +/-0.0 */ u.u64 &= (uint64_t)1 << 63; } } else if (e < (1023 + 52)) { s = u.u64 >> 63; one = (uint64_t)1 << (52 - (e - 1023)); frac_mask = one - 1; u.u64 += (one >> 1) - s; u.u64 &= ~frac_mask; /* truncate to an integer */ } /* otherwise: abs(a) >= 2^52, or NaN, +/-Infinity: no change */ return u.d; }
O2
c
js_math_round: movq %xmm0, %rax movq %rax, %rdx shrq $0x34, %rdx andl $0x7ff, %edx # imm = 0x7FF cmpl $0x3fe, %edx # imm = 0x3FE ja 0x6d70f setne %dl movabsq $-0x4020000000000000, %rcx # imm = 0xBFE0000000000000 cmpq %rcx, %rax sete %sil movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 andq %rax, %rcx orb %dl, %sil jne 0x6d709 movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 orq %rax, %rcx movq %rcx, %xmm0 retq cmpl $0x432, %edx # imm = 0x432 ja 0x6d73f movq %rax, %rsi movb $0x33, %cl subb %dl, %cl pushq $0x1 popq %rdx shlq %cl, %rdx sarq $0x3f, %rsi movq %rdx, %rcx shrq %rcx addq %rax, %rsi addq %rcx, %rsi negq %rdx andq %rsi, %rdx movq %rdx, %xmm0 retq
js_math_round: movq rax, xmm0 mov rdx, rax shr rdx, 34h and edx, 7FFh cmp edx, 3FEh ja short loc_6D70F setnz dl mov rcx, 0BFE0000000000000h cmp rax, rcx setz sil mov rcx, 8000000000000000h and rcx, rax or sil, dl jnz short loc_6D709 mov rax, 3FF0000000000000h or rcx, rax loc_6D709: movq xmm0, rcx retn loc_6D70F: cmp edx, 432h ja short locret_6D73F mov rsi, rax mov cl, 33h ; '3' sub cl, dl push 1 pop rdx shl rdx, cl sar rsi, 3Fh mov rcx, rdx shr rcx, 1 add rsi, rax add rsi, rcx neg rdx and rdx, rsi movq xmm0, rdx locret_6D73F: retn
double js_math_round(double result) { long long v1; // rdx double v2; // rcx v1 = (*(_QWORD *)&result >> 52) & 0x7FFLL; if ( (unsigned int)v1 > 0x3FE ) { if ( (unsigned int)v1 <= 0x432 ) *(_QWORD *)&result = (((unsigned long long)(1LL << (51 - (unsigned __int8)(*(_QWORD *)&result >> 52))) >> 1) + *(_QWORD *)&result + (*(long long *)&result >> 63)) & -(1LL << (51 - (unsigned __int8)(*(_QWORD *)&result >> 52))); } else { *(_QWORD *)&v2 = *(_QWORD *)&result & 0x8000000000000000LL; if ( (_DWORD)v1 == 1022 && *(_QWORD *)&result != 0xBFE0000000000000LL ) *(_QWORD *)&v2 |= 0x3FF0000000000000uLL; return v2; } return result; }
js_math_round: MOVQ RAX,XMM0 MOV RDX,RAX SHR RDX,0x34 AND EDX,0x7ff CMP EDX,0x3fe JA 0x0016d70f SETNZ DL MOV RCX,-0x4020000000000000 CMP RAX,RCX SETZ SIL MOV RCX,-0x8000000000000000 AND RCX,RAX OR SIL,DL JNZ 0x0016d709 MOV RAX,0x3ff0000000000000 OR RCX,RAX LAB_0016d709: MOVQ XMM0,RCX RET LAB_0016d70f: CMP EDX,0x432 JA 0x0016d73f MOV RSI,RAX MOV CL,0x33 SUB CL,DL PUSH 0x1 POP RDX SHL RDX,CL SAR RSI,0x3f MOV RCX,RDX SHR RCX,0x1 ADD RSI,RAX ADD RSI,RCX NEG RDX AND RDX,RSI MOVQ XMM0,RDX LAB_0016d73f: RET
ulong js_math_round(ulong param_1) { ulong uVar1; uint uVar2; uVar2 = (uint)(param_1 >> 0x34) & 0x7ff; if (uVar2 < 0x3ff) { uVar1 = param_1 & 0x8000000000000000; if (param_1 != 0xbfe0000000000000 && uVar2 == 0x3fe) { uVar1 = uVar1 | 0x3ff0000000000000; } return uVar1; } if (uVar2 < 0x433) { uVar1 = 1L << (0x33U - (char)uVar2 & 0x3f); param_1 = -uVar1 & ((long)param_1 >> 0x3f) + param_1 + (uVar1 >> 1); } return param_1; }
1,210
testing::TestPartResult::ExtractSummary[abi:cxx11](char const*)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-test-part.cc
std::string TestPartResult::ExtractSummary(const char* message) { const char* const stack_trace = strstr(message, internal::kStackTraceMarker); return stack_trace == nullptr ? message : std::string(message, stack_trace); }
O3
cpp
testing::TestPartResult::ExtractSummary[abi:cxx11](char const*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x24cd0(%rip), %rsi # 0x41105 movq %r14, %rdi callq 0x9100 testq %rax, %rax je 0x1c459 leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0xfc64 jmp 0x1c469 leaq 0x7(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x34bfa movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN7testing14TestPartResult14ExtractSummaryB5cxx11EPKc: push r14 push rbx push rax mov r14, rsi mov rbx, rdi lea rsi, _ZN7testing8internal17kStackTraceMarkerE; "\nStack trace:\n" mov rdi, r14 call _strstr test rax, rax jz short loc_1C459 lea rcx, [rbx+10h] mov [rbx], rcx mov rdi, rbx mov rsi, r14 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp short loc_1C469 loc_1C459: lea rdx, [rsp+18h+var_11] mov rdi, rbx mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_1C469: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_QWORD * testing::TestPartResult::ExtractSummary[abi:cxx11](_QWORD *a1, _BYTE *a2) { long long v2; // rax long long v3; // rax _BYTE v5[17]; // [rsp+1h] [rbp-11h] BYREF v5[0] = HIBYTE(v2); v3 = strstr(a2, "\nStack trace:\n"); if ( v3 ) { *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, a2, v3); } else { std::string::basic_string<std::allocator<char>>(a1, a2, v5); } return a1; }
ExtractSummary[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x141105] MOV RDI,R14 CALL 0x00109100 TEST RAX,RAX JZ 0x0011c459 LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x0010fc64 JMP 0x0011c469 LAB_0011c459: LEA RDX,[RSP + 0x7] MOV RDI,RBX MOV RSI,R14 CALL 0x00134bfa LAB_0011c469: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* testing::TestPartResult::ExtractSummary[abi:cxx11](char const*) */ TestPartResult * __thiscall testing::TestPartResult::ExtractSummary_abi_cxx11_(TestPartResult *this,char *param_1) { char *pcVar1; allocator local_11; pcVar1 = strstr(param_1,"\nStack trace:\n"); if (pcVar1 == (char *)0x0) { std::__cxx11::string::string<std::allocator<char>>((string *)this,param_1,&local_11); } else { *(TestPartResult **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,param_1,pcVar1); } return this; }
1,211
_gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O0
cpp
_gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xb64f0 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xb6520 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xb6550 testb $0x1, %al jne 0x1be346 jmp 0x1be386 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xb76c0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x1be3a0 testb $0x1, %al jne 0x1be376 jmp 0x1be378 jmp 0x1be395 jmp 0x1be37a leaq 0x30(%rsp), %rdi callq 0xb65d0 jmp 0x1be322 movq 0x10(%rsp), %rdi callq 0xb6520 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] mov [rsp+38h+var_28], rdi call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void) mov [rsp+38h+var_8], rax loc_1BE322: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_20], rax lea rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_1BE346 jmp short loc_1BE386 loc_1BE346: mov rax, [rsp+38h+var_28] add rax, 18h mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_8] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+38h+var_30] mov rsi, rax mov rdx, [rsp+38h+var_18] call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA17_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_ test al, 1 jnz short loc_1BE376 jmp short loc_1BE378 loc_1BE376: jmp short loc_1BE395 loc_1BE378: jmp short $+2 loc_1BE37A: lea rdi, [rsp+38h+var_8] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void) jmp short loc_1BE322 loc_1BE386: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_8], rax loc_1BE395: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+20h] [rbp-18h] long long v6; // [rsp+28h] [rbp-10h] long long i; // [rsp+30h] [rbp-8h] BYREF v6 = a1; v5 = a2; for ( i = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(a1); ; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) ) { v4 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&i, (long long)&v4) ) break; v2 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i); if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[17]>(a1 + 24, v2, v5) & 1) != 0 ) return i; } return std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); }
1,212
_gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x9605f movq %r14, %rdi movq %rbx, %rsi callq 0x27404 testb %al, %al jne 0x9605c addq $0x30, %r14 jmp 0x9603e movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_9603E: mov rax, [r15+8] cmp r14, rax jz short loc_9605F mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_9605C add r14, 30h ; '0' jmp short loc_9603E loc_9605C: mov rax, r14 loc_9605F: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_0019603e: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x0019605f MOV RDI,R14 MOV RSI,RBX CALL 0x00127404 TEST AL,AL JNZ 0x0019605c ADD R14,0x30 JMP 0x0019603e LAB_0019605c: MOV RAX,R14 LAB_0019605f: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
1,213
lo0bits
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static int lo0bits(ULong *y) { register int k; register ULong x= *y; if (x & 7) { if (x & 1) return 0; if (x & 2) { *y= x >> 1; return 1; } *y= x >> 2; return 2; } k= 0; if (!(x & 0xffff)) { k= 16; x>>= 16; } if (!(x & 0xff)) { k+= 8; x>>= 8; } if (!(x & 0xf)) { k+= 4; x>>= 4; } if (!(x & 0x3)) { k+= 2; x>>= 2; } if (!(x & 1)) { k++; x>>= 1; if (!x) return 32; } *y= x; return k; }
O0
c
lo0bits: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax je 0x4fdfd movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4fdc3 movl $0x0, -0x4(%rbp) jmp 0x4feb6 movl -0x18(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4fde5 movl -0x18(%rbp), %ecx shrl %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4feb6 movl -0x18(%rbp), %ecx shrl $0x2, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x4feb6 movl $0x0, -0x14(%rbp) movl -0x18(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF cmpl $0x0, %eax jne 0x4fe21 movl $0x10, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x10, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xff, %eax cmpl $0x0, %eax jne 0x4fe40 movl -0x14(%rbp), %eax addl $0x8, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x8, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xf, %eax cmpl $0x0, %eax jne 0x4fe5d movl -0x14(%rbp), %eax addl $0x4, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x4, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x3, %eax cmpl $0x0, %eax jne 0x4fe7a movl -0x14(%rbp), %eax addl $0x2, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x2, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x4fea7 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl %eax movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x4fea5 movl $0x20, -0x4(%rbp) jmp 0x4feb6 jmp 0x4fea7 movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
lo0bits: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_18], eax mov eax, [rbp+var_18] and eax, 7 cmp eax, 0 jz short loc_4FDFD mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jz short loc_4FDC3 mov [rbp+var_4], 0 jmp loc_4FEB6 loc_4FDC3: mov eax, [rbp+var_18] and eax, 2 cmp eax, 0 jz short loc_4FDE5 mov ecx, [rbp+var_18] shr ecx, 1 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 1 jmp loc_4FEB6 loc_4FDE5: mov ecx, [rbp+var_18] shr ecx, 2 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 2 jmp loc_4FEB6 loc_4FDFD: mov [rbp+var_14], 0 mov eax, [rbp+var_18] and eax, 0FFFFh cmp eax, 0 jnz short loc_4FE21 mov [rbp+var_14], 10h mov eax, [rbp+var_18] shr eax, 10h mov [rbp+var_18], eax loc_4FE21: mov eax, [rbp+var_18] and eax, 0FFh cmp eax, 0 jnz short loc_4FE40 mov eax, [rbp+var_14] add eax, 8 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 8 mov [rbp+var_18], eax loc_4FE40: mov eax, [rbp+var_18] and eax, 0Fh cmp eax, 0 jnz short loc_4FE5D mov eax, [rbp+var_14] add eax, 4 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 4 mov [rbp+var_18], eax loc_4FE5D: mov eax, [rbp+var_18] and eax, 3 cmp eax, 0 jnz short loc_4FE7A mov eax, [rbp+var_14] add eax, 2 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 2 mov [rbp+var_18], eax loc_4FE7A: mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jnz short loc_4FEA7 mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 1 mov [rbp+var_18], eax cmp [rbp+var_18], 0 jnz short loc_4FEA5 mov [rbp+var_4], 20h ; ' ' jmp short loc_4FEB6 loc_4FEA5: jmp short $+2 loc_4FEA7: mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], ecx mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_4FEB6: mov eax, [rbp+var_4] pop rbp retn
long long lo0bits(unsigned int *a1) { unsigned int v2; // [rsp+0h] [rbp-18h] unsigned int v3; // [rsp+4h] [rbp-14h] v2 = *a1; if ( (*a1 & 7) != 0 ) { if ( (v2 & 1) != 0 ) { return 0; } else if ( (v2 & 2) != 0 ) { *a1 = v2 >> 1; return 1; } else { *a1 = v2 >> 2; return 2; } } else { v3 = 0; if ( !(_WORD)v2 ) { v3 = 16; v2 >>= 16; } if ( !(_BYTE)v2 ) { v3 += 8; v2 >>= 8; } if ( (v2 & 0xF) == 0 ) { v3 += 4; v2 >>= 4; } if ( (v2 & 3) == 0 ) { v3 += 2; v2 >>= 2; } if ( (v2 & 1) != 0 || (++v3, (v2 >>= 1) != 0) ) { *a1 = v2; return v3; } else { return 32; } } }
lo0bits: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x7 CMP EAX,0x0 JZ 0x0014fdfd MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014fdc3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014feb6 LAB_0014fdc3: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014fde5 MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014feb6 LAB_0014fde5: MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x2 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0014feb6 LAB_0014fdfd: MOV dword ptr [RBP + -0x14],0x0 MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xffff CMP EAX,0x0 JNZ 0x0014fe21 MOV dword ptr [RBP + -0x14],0x10 MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x10 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe21: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xff CMP EAX,0x0 JNZ 0x0014fe40 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x8 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x8 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe40: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xf CMP EAX,0x0 JNZ 0x0014fe5d MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x4 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x4 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe5d: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x3 CMP EAX,0x0 JNZ 0x0014fe7a MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x2 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x2 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe7a: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0014fea7 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x1 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x0014fea5 MOV dword ptr [RBP + -0x4],0x20 JMP 0x0014feb6 LAB_0014fea5: JMP 0x0014fea7 LAB_0014fea7: MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0014feb6: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int lo0bits(uint *param_1) { uint local_20; int local_1c; int local_c; local_20 = *param_1; if ((local_20 & 7) == 0) { local_1c = 0; if ((local_20 & 0xffff) == 0) { local_1c = 0x10; local_20 = local_20 >> 0x10; } if ((local_20 & 0xff) == 0) { local_1c = local_1c + 8; local_20 = local_20 >> 8; } if ((local_20 & 0xf) == 0) { local_1c = local_1c + 4; local_20 = local_20 >> 4; } if ((local_20 & 3) == 0) { local_1c = local_1c + 2; local_20 = local_20 >> 2; } if ((local_20 & 1) == 0) { local_1c = local_1c + 1; local_20 = local_20 >> 1; if (local_20 == 0) { return 0x20; } } *param_1 = local_20; local_c = local_1c; } else if ((local_20 & 1) == 0) { if ((local_20 & 2) == 0) { *param_1 = local_20 >> 2; local_c = 2; } else { *param_1 = local_20 >> 1; local_c = 1; } } else { local_c = 0; } return local_c; }
1,214
c4_tx_verify_log_data
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c
INTERNAL bool c4_tx_verify_log_data(verify_ctx_t* ctx, ssz_ob_t log, bytes32_t block_hash, uint64_t block_number, uint32_t tx_index, bytes_t tx_raw, bytes_t receipt_raw) { bytes32_t tx_hash = {0}; bytes_t val = {0}; bytes_t logs = {0}; tx_type_t type = 0; keccak(tx_raw, tx_hash); if (!bytes_eq(bytes(tx_hash, 32), ssz_get(&log, "transactionHash").bytes)) RETURN_VERIFY_ERROR(ctx, "invalid transaction hash!"); if (block_number != ssz_get_uint64(&log, "blockNumber")) RETURN_VERIFY_ERROR(ctx, "invalid block number!"); if (!bytes_eq(ssz_get(&log, "blockHash").bytes, bytes(block_hash, 32))) RETURN_VERIFY_ERROR(ctx, "invalid block hash!"); if (tx_index != ssz_get_uint32(&log, "transactionIndex")) RETURN_VERIFY_ERROR(ctx, "invalid transaction index!"); if (!get_and_remove_tx_type(ctx, &receipt_raw, &type)) RETURN_VERIFY_ERROR(ctx, "invalid tx data, invalid type!"); if (rlp_decode(&receipt_raw, 0, &receipt_raw) != RLP_LIST || rlp_decode(&receipt_raw, 3, &logs) != RLP_LIST) RETURN_VERIFY_ERROR(ctx, "invalid to data!"); uint32_t logs_len = rlp_decode(&logs, -1, &logs); for (uint32_t i = 0; i < logs_len; i++) { bytes_t log_rlp = {0}; rlp_decode(&logs, i, &log_rlp); if (matches(log, log_rlp)) return true; } RETURN_VERIFY_ERROR(ctx, "missing the log within the tx"); }
O1
c
c4_tx_verify_log_data: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 movl %ecx, %ebp movq %rdx, %r12 movq %rsi, %r15 movq %rdi, 0x18(%rsp) leaq 0x170(%rsp), %rbx xorps %xmm0, %xmm0 leaq 0x110(%rsp), %r13 movaps %xmm0, 0x10(%r13) movaps %xmm0, (%r13) movaps %xmm0, 0x60(%rsp) movl $0x0, 0x4c(%rsp) movl %r8d, %edi movq %r9, %rsi movq %r13, %rdx callq 0x16aa8 leaq 0x30bf5(%rip), %rdx # 0x3e2e0 leaq 0xf8(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14ddd movl (%r14), %edx movq 0x8(%r14), %rcx movl $0x20, %edi movq %r13, %rsi callq 0x13577 testb %al, %al je 0xdadc leaq 0x2ff5d(%rip), %rdx # 0x3d67e leaq 0x88(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14ddd movl (%r14), %edi movq 0x8(%r14), %rsi callq 0x135ae cmpq %r12, %rax jne 0xdae5 leaq 0x2ffac(%rip), %rdx # 0x3d6fc leaq 0xe0(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14ddd movl (%r14), %edi movq 0x8(%r14), %rsi movl $0x20, %edx movq %r15, %rcx callq 0x13577 testb %al, %al je 0xdaee leaq 0x2ff3f(%rip), %rdx # 0x3d6c5 leaq 0x88(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14ddd movl (%r14), %edi movq 0x8(%r14), %rsi callq 0x135ae cmpl %ebp, %eax jne 0xdaf7 leaq 0x188(%rsp), %r12 leaq 0x4c(%rsp), %rdx movq 0x18(%rsp), %r14 movq %r14, %rdi movq %r12, %rsi callq 0xd4e5 testb %al, %al je 0xdb2c xorl %r13d, %r13d movq %r12, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x10ef0 leaq 0x30b6b(%rip), %r15 # 0x3e354 cmpl $0x2, %eax jne 0xdb06 leaq 0x60(%rsp), %rdx movq %r12, %rdi movl $0x3, %esi callq 0x10ef0 cmpl $0x2, %eax jne 0xdb33 leaq 0x60(%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rdi, %rdx callq 0x10ef0 leaq 0x30b3f(%rip), %r15 # 0x3e365 testl %eax, %eax setne %r13b je 0xdb06 movl %eax, %ebp xorl %r12d, %r12d leaq 0xa0(%rsp), %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) leaq 0x60(%rsp), %rdi movl %r12d, %esi leaq 0x50(%rsp), %rdx callq 0x10ef0 movl 0x50(%rsp), %eax movq 0x58(%rsp), %rcx leaq 0x170(%rsp), %rdx movups (%rdx), %xmm0 movaps %xmm0, 0x30(%rsp) movq 0x10(%rdx), %rdx movq %rdx, 0x40(%rsp) movl %eax, 0xa0(%rsp) movq %rcx, 0xa8(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movq %rbx, %rdi xorl %esi, %esi leaq 0x20(%rsp), %rdx callq 0x10ef0 cmpl $0x1, %eax jne 0xdacb leaq 0x88(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x2fdd9(%rip), %rdx # 0x3d697 callq 0x14ddd movl 0x88(%rsp), %edx movq 0x90(%rsp), %rcx movl 0x20(%rsp), %edi movq 0x28(%rsp), %rsi callq 0x13577 testb %al, %al je 0xdacb movq %rbx, %rdi movl $0x2, %esi leaq 0x20(%rsp), %rdx callq 0x10ef0 cmpl $0x1, %eax jne 0xdacb leaq 0xc8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x3072a(%rip), %rdx # 0x3e041 callq 0x14ddd movl 0xc8(%rsp), %edx movq 0xd0(%rsp), %rcx movl 0x20(%rsp), %edi movq 0x28(%rsp), %rsi callq 0x13577 testb %al, %al je 0xdacb leaq 0xb0(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x30607(%rip), %rdx # 0x3df5c callq 0x14ddd movq 0xc0(%rsp), %rax movq %rax, 0x40(%rsp) movups 0xb0(%rsp), %xmm0 movaps %xmm0, 0x30(%rsp) movq %rbx, %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x10ef0 cmpl $0x2, %eax jne 0xdacb movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x142c2 movl %eax, %r14d movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rbx, %rdx callq 0x10ef0 cmpl %eax, %r14d movq 0x18(%rsp), %r14 jne 0xdacb movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x142c2 testl %eax, %eax sete %r14b je 0xdaba movq %rbx, %rdi xorl %esi, %esi leaq 0x20(%rsp), %rdx callq 0x10ef0 cmpl $0x1, %eax jne 0xdac6 movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x70(%rsp), %rdi xorl %esi, %esi callq 0x14147 movl 0x70(%rsp), %edx movq 0x78(%rsp), %rcx movl 0x20(%rsp), %edi movq 0x28(%rsp), %rsi callq 0x13577 testb %al, %al je 0xdac6 movl $0x1, %r13d movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x142c2 cmpl %eax, %r13d setae %r14b jae 0xdaba movq %rbx, %rdi movl %r13d, %esi leaq 0x20(%rsp), %rdx callq 0x10ef0 cmpl $0x1, %eax jne 0xdaba movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x70(%rsp), %rdi movl %r13d, %esi callq 0x14147 movl 0x70(%rsp), %edx movq 0x78(%rsp), %rcx movl 0x20(%rsp), %edi movq 0x28(%rsp), %rsi callq 0x13577 incl %r13d testb %al, %al jne 0xda46 testb %r14b, %r14b movq 0x18(%rsp), %r14 je 0xdacb jmp 0xdb38 movq 0x18(%rsp), %r14 incl %r12d xorl %r13d, %r13d cmpl %ebp, %r12d jne 0xd83f jmp 0xdb06 leaq 0x307c6(%rip), %r15 # 0x3e2a9 jmp 0xdafe leaq 0x30804(%rip), %r15 # 0x3e2f0 jmp 0xdafe leaq 0x30811(%rip), %r15 # 0x3e306 jmp 0xdafe leaq 0x3081c(%rip), %r15 # 0x3e31a xorl %r13d, %r13d movq 0x18(%rsp), %r14 leaq 0x70(%r14), %rdi movq %r15, %rsi callq 0x18879 movb $0x0, 0x68(%r14) movl %r13d, %eax addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x30802(%rip), %r15 # 0x3e335 xorl %r13d, %r13d jmp 0xdb06 movb $0x1, %r13b jmp 0xdb17
c4_tx_verify_log_data: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 138h mov ebp, ecx mov r12, rdx mov r15, rsi mov [rsp+168h+var_150], rdi lea rbx, [rsp+168h+arg_0] xorps xmm0, xmm0 lea r13, [rsp+168h+var_58] movaps xmmword ptr [r13+10h], xmm0 movaps xmmword ptr [r13+0], xmm0 movaps [rsp+168h+var_108], xmm0 mov [rsp+168h+var_11C], 0 mov edi, r8d mov rsi, r9 mov rdx, r13 call keccak lea rdx, aTransactionhas; "transactionHash" lea r14, [rsp+168h+var_70] mov rdi, r14 mov rsi, rbx call ssz_get mov edx, [r14] mov rcx, [r14+8] mov edi, 20h ; ' ' mov rsi, r13 call bytes_eq test al, al jz loc_DADC lea rdx, aBlocknumber; "blockNumber" lea r14, [rsp+168h+var_E0] mov rdi, r14 mov rsi, rbx call ssz_get mov edi, [r14] mov rsi, [r14+8] call bytes_as_le cmp rax, r12 jnz loc_DAE5 lea rdx, aBlockhash; "blockHash" lea r14, [rsp+168h+var_88] mov rdi, r14 mov rsi, rbx call ssz_get mov edi, [r14] mov rsi, [r14+8] mov edx, 20h ; ' ' mov rcx, r15 call bytes_eq test al, al jz loc_DAEE lea rdx, aTransactionind; "transactionIndex" lea r14, [rsp+168h+var_E0] mov rdi, r14 mov rsi, rbx call ssz_get mov edi, [r14] mov rsi, [r14+8] call bytes_as_le cmp eax, ebp jnz loc_DAF7 lea r12, [rsp+168h+arg_18] lea rdx, [rsp+168h+var_11C] mov r14, [rsp+168h+var_150] mov rdi, r14 mov rsi, r12 call get_and_remove_tx_type test al, al jz loc_DB2C xor r13d, r13d mov rdi, r12 xor esi, esi mov rdx, r12 call rlp_decode lea r15, aInvalidToData; "invalid to data!" cmp eax, 2 jnz loc_DB06 lea rdx, [rsp+168h+var_108] mov rdi, r12 mov esi, 3 call rlp_decode cmp eax, 2 jnz loc_DB33 lea rdi, [rsp+168h+var_108] mov esi, 0FFFFFFFFh mov rdx, rdi call rlp_decode lea r15, aMissingTheLogW; "missing the log within the tx" test eax, eax setnz r13b jz loc_DB06 mov ebp, eax xor r12d, r12d lea rbx, [rsp+168h+var_C8] loc_D83F: xorps xmm0, xmm0 movaps [rsp+168h+var_118], xmm0 lea rdi, [rsp+168h+var_108] mov esi, r12d lea rdx, [rsp+168h+var_118] call rlp_decode mov eax, dword ptr [rsp+168h+var_118] mov rcx, qword ptr [rsp+168h+var_118+8] lea rdx, [rsp+168h+arg_0] movups xmm0, xmmword ptr [rdx] movaps [rsp+168h+var_138], xmm0 mov rdx, [rdx+10h] mov [rsp+168h+var_128], rdx mov [rsp+168h+var_C8], eax mov [rsp+168h+var_C0], rcx xorps xmm0, xmm0 movaps [rsp+168h+var_148], xmm0 mov rdi, rbx xor esi, esi lea rdx, [rsp+168h+var_148] call rlp_decode cmp eax, 1 jnz loc_DACB lea rdi, [rsp+168h+var_E0] lea rsi, [rsp+168h+var_138] lea rdx, aAddress; "address" call ssz_get mov edx, [rsp+168h+var_E0] mov rcx, [rsp+168h+var_D8] mov edi, dword ptr [rsp+168h+var_148] mov rsi, qword ptr [rsp+168h+var_148+8] call bytes_eq test al, al jz loc_DACB mov rdi, rbx mov esi, 2 lea rdx, [rsp+168h+var_148] call rlp_decode cmp eax, 1 jnz loc_DACB lea rdi, [rsp+168h+var_A0] lea rsi, [rsp+168h+var_138] lea rdx, aSyncData+5; "data" call ssz_get mov edx, [rsp+168h+var_A0] mov rcx, [rsp+168h+var_98] mov edi, dword ptr [rsp+168h+var_148] mov rsi, qword ptr [rsp+168h+var_148+8] call bytes_eq test al, al jz loc_DACB lea rdi, [rsp+168h+var_B8] lea rsi, [rsp+168h+var_138] lea rdx, aTopics; "topics" call ssz_get mov rax, [rsp+168h+var_A8] mov [rsp+168h+var_128], rax movups xmm0, [rsp+168h+var_B8] movaps [rsp+168h+var_138], xmm0 mov rdi, rbx mov esi, 1 mov rdx, rbx call rlp_decode cmp eax, 2 jnz loc_DACB mov rax, [rsp+168h+var_128] mov [rsp+168h+var_158], rax movaps xmm0, [rsp+168h+var_138] movups [rsp+168h+var_168], xmm0 call ssz_len mov r14d, eax mov rdi, rbx mov esi, 0FFFFFFFFh mov rdx, rbx call rlp_decode cmp r14d, eax mov r14, [rsp+168h+var_150] jnz loc_DACB mov rax, [rsp+168h+var_128] mov [rsp+168h+var_158], rax movaps xmm0, [rsp+168h+var_138] movups [rsp+168h+var_168], xmm0 call ssz_len test eax, eax setz r14b jz loc_DABA mov rdi, rbx xor esi, esi lea rdx, [rsp+168h+var_148] call rlp_decode cmp eax, 1 jnz loc_DAC6 mov rax, [rsp+168h+var_128] mov [rsp+168h+var_158], rax movaps xmm0, [rsp+168h+var_138] movups [rsp+168h+var_168], xmm0 lea rdi, [rsp+168h+var_F8] xor esi, esi call ssz_at mov edx, [rsp+168h+var_F8] mov rcx, [rsp+168h+var_F0] mov edi, dword ptr [rsp+168h+var_148] mov rsi, qword ptr [rsp+168h+var_148+8] call bytes_eq test al, al jz loc_DAC6 mov r13d, 1 loc_DA46: mov rax, [rsp+168h+var_128] mov [rsp+168h+var_158], rax movaps xmm0, [rsp+168h+var_138] movups [rsp+168h+var_168], xmm0 call ssz_len cmp r13d, eax setnb r14b jnb short loc_DABA mov rdi, rbx mov esi, r13d lea rdx, [rsp+168h+var_148] call rlp_decode cmp eax, 1 jnz short loc_DABA mov rax, [rsp+168h+var_128] mov [rsp+168h+var_158], rax movaps xmm0, [rsp+168h+var_138] movups [rsp+168h+var_168], xmm0 lea rdi, [rsp+168h+var_F8] mov esi, r13d call ssz_at mov edx, [rsp+168h+var_F8] mov rcx, [rsp+168h+var_F0] mov edi, dword ptr [rsp+168h+var_148] mov rsi, qword ptr [rsp+168h+var_148+8] call bytes_eq inc r13d test al, al jnz short loc_DA46 loc_DABA: test r14b, r14b mov r14, [rsp+168h+var_150] jz short loc_DACB jmp short loc_DB38 loc_DAC6: mov r14, [rsp+168h+var_150] loc_DACB: inc r12d xor r13d, r13d cmp r12d, ebp jnz loc_D83F jmp short loc_DB06 loc_DADC: lea r15, aInvalidTransac; "invalid transaction hash!" jmp short loc_DAFE loc_DAE5: lea r15, aInvalidBlockNu_0; "invalid block number!" jmp short loc_DAFE loc_DAEE: lea r15, aInvalidBlockHa; "invalid block hash!" jmp short loc_DAFE loc_DAF7: lea r15, aInvalidTransac_0; "invalid transaction index!" loc_DAFE: xor r13d, r13d mov r14, [rsp+168h+var_150] loc_DB06: lea rdi, [r14+70h] mov rsi, r15 call c4_state_add_error mov byte ptr [r14+68h], 0 loc_DB17: mov eax, r13d add rsp, 138h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_DB2C: lea r15, aInvalidTxDataI; "invalid tx data, invalid type!" loc_DB33: xor r13d, r13d jmp short loc_DB06 loc_DB38: mov r13b, 1 jmp short loc_DB17
long long c4_tx_verify_log_data( long long a1, long long a2, long long a3, int a4, unsigned int a5, long long a6, __int128 a7, long long a8, char a9) { long long v11; // r14 unsigned int v12; // r13d const char *v13; // r15 int v14; // eax int v15; // ebp unsigned int v16; // r12d int v17; // edx int v18; // ecx int v19; // r8d int v20; // r9d int v21; // r14d bool v22; // zf int v23; // edx int v24; // ecx int v25; // r8d int v26; // r9d int v27; // eax bool v28; // r14 int v29; // edx int v30; // ecx int v31; // r8d int v32; // r9d int v33; // edi int v34; // esi int v35; // edx int v36; // ecx int v37; // r8d int v38; // r9d unsigned int v39; // eax int v40; // edx int v41; // ecx int v42; // r8d int v43; // r9d __int128 v46; // [rsp+20h] [rbp-148h] BYREF __int128 v47; // [rsp+30h] [rbp-138h] BYREF long long v48; // [rsp+40h] [rbp-128h] unsigned int v49; // [rsp+4Ch] [rbp-11Ch] BYREF __int128 v50; // [rsp+50h] [rbp-118h] BYREF __int128 v51; // [rsp+60h] [rbp-108h] BYREF unsigned int v52; // [rsp+70h] [rbp-F8h] BYREF long long v53; // [rsp+78h] [rbp-F0h] unsigned int v54; // [rsp+88h] [rbp-E0h] BYREF long long v55; // [rsp+90h] [rbp-D8h] int v56; // [rsp+A0h] [rbp-C8h] BYREF long long v57; // [rsp+A8h] [rbp-C0h] __int128 v58; // [rsp+B0h] [rbp-B8h] BYREF long long v59; // [rsp+C0h] [rbp-A8h] unsigned int v60; // [rsp+C8h] [rbp-A0h] BYREF long long v61; // [rsp+D0h] [rbp-98h] unsigned int v62; // [rsp+E0h] [rbp-88h] BYREF long long v63; // [rsp+E8h] [rbp-80h] unsigned int v64; // [rsp+F8h] [rbp-70h] BYREF long long v65; // [rsp+100h] [rbp-68h] _BYTE v66[88]; // [rsp+110h] [rbp-58h] BYREF memset(v66, 0, 32); v51 = 0LL; v49 = 0; keccak(a5, a6, v66); ssz_get(&v64, &a7, "transactionHash"); if ( !(unsigned __int8)bytes_eq(32LL, v66, v64, v65) ) { v13 = "invalid transaction hash!"; LABEL_32: v12 = 0; v11 = a1; goto LABEL_33; } ssz_get(&v54, &a7, "blockNumber"); if ( bytes_as_le(v54, v55) != a3 ) { v13 = "invalid block number!"; goto LABEL_32; } ssz_get(&v62, &a7, "blockHash"); if ( !(unsigned __int8)bytes_eq(v62, v63, 32LL, a2) ) { v13 = "invalid block hash!"; goto LABEL_32; } ssz_get(&v54, &a7, "transactionIndex"); if ( (unsigned int)bytes_as_le(v54, v55) != a4 ) { v13 = "invalid transaction index!"; goto LABEL_32; } v11 = a1; if ( !get_and_remove_tx_type(a1, (long long)&a9, &v49) ) { v13 = "invalid tx data, invalid type!"; goto LABEL_36; } v12 = 0; v13 = "invalid to data!"; if ( (unsigned int)rlp_decode(&a9, 0LL, &a9) != 2 ) { LABEL_33: c4_state_add_error(v11 + 112, v13); *(_BYTE *)(v11 + 104) = 0; return v12; } if ( (unsigned int)rlp_decode(&a9, 3LL, &v51) != 2 ) { LABEL_36: v12 = 0; goto LABEL_33; } v14 = rlp_decode(&v51, 0xFFFFFFFFLL, &v51); v13 = "missing the log within the tx"; LOBYTE(v12) = v14 != 0; if ( !v14 ) goto LABEL_33; v15 = v14; v16 = 0; while ( 1 ) { v50 = 0LL; rlp_decode(&v51, v16, &v50); v47 = a7; v48 = a8; v56 = v50; v57 = *((_QWORD *)&v50 + 1); v46 = 0LL; if ( (unsigned int)rlp_decode(&v56, 0LL, &v46) != 1 ) goto LABEL_26; ssz_get(&v54, &v47, "address"); if ( !(unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v54, v55) ) goto LABEL_26; if ( (unsigned int)rlp_decode(&v56, 2LL, &v46) != 1 ) goto LABEL_26; ssz_get(&v60, &v47, "data"); if ( !(unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v60, v61) ) goto LABEL_26; ssz_get(&v58, &v47, "topics"); v48 = v59; v47 = v58; if ( (unsigned int)rlp_decode(&v56, 1LL, &v56) != 2 ) goto LABEL_26; v21 = ssz_len((unsigned int)&v56, 1, v17, v18, v19, v20, v47, DWORD2(v47), v48); v22 = v21 == (unsigned int)rlp_decode(&v56, 0xFFFFFFFFLL, &v56); v11 = a1; if ( !v22 ) goto LABEL_26; v27 = ssz_len((unsigned int)&v56, -1, v23, v24, v25, v26, v47, DWORD2(v47), v48); v28 = v27 == 0; if ( v27 ) { if ( (unsigned int)rlp_decode(&v56, 0LL, &v46) != 1 || (ssz_at((unsigned int)&v52, 0, v29, v30, v31, v32, v47, *((long long *)&v47 + 1), v48), v33 = v46, v34 = DWORD2(v46), !(unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v52, v53)) ) { v11 = a1; goto LABEL_26; } v12 = 1; do { v39 = ssz_len(v33, v34, v35, v36, v37, v38, v47, DWORD2(v47), v48); v28 = v12 >= v39; if ( v12 >= v39 ) break; if ( (unsigned int)rlp_decode(&v56, v12, &v46) != 1 ) break; ssz_at((unsigned int)&v52, v12, v40, v41, v42, v43, v47, *((long long *)&v47 + 1), v48); v33 = v46; v34 = DWORD2(v46); ++v12; } while ( (unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v52, v53) ); } v22 = !v28; v11 = a1; if ( !v22 ) break; LABEL_26: ++v16; v12 = 0; if ( v16 == v15 ) goto LABEL_33; } LOBYTE(v12) = 1; return v12; }
c4_tx_verify_log_data: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x138 MOV EBP,ECX MOV R12,RDX MOV R15,RSI MOV qword ptr [RSP + 0x18],RDI LEA RBX,[RSP + 0x170] XORPS XMM0,XMM0 LEA R13,[RSP + 0x110] MOVAPS xmmword ptr [R13 + 0x10],XMM0 MOVAPS xmmword ptr [R13],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOV dword ptr [RSP + 0x4c],0x0 MOV EDI,R8D MOV RSI,R9 MOV RDX,R13 CALL 0x00116aa8 LEA RDX,[0x13e2e0] LEA R14,[RSP + 0xf8] MOV RDI,R14 MOV RSI,RBX CALL 0x00114ddd MOV EDX,dword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] MOV EDI,0x20 MOV RSI,R13 CALL 0x00113577 TEST AL,AL JZ 0x0010dadc LEA RDX,[0x13d67e] LEA R14,[RSP + 0x88] MOV RDI,R14 MOV RSI,RBX CALL 0x00114ddd MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x001135ae CMP RAX,R12 JNZ 0x0010dae5 LEA RDX,[0x13d6fc] LEA R14,[RSP + 0xe0] MOV RDI,R14 MOV RSI,RBX CALL 0x00114ddd MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] MOV EDX,0x20 MOV RCX,R15 CALL 0x00113577 TEST AL,AL JZ 0x0010daee LEA RDX,[0x13d6c5] LEA R14,[RSP + 0x88] MOV RDI,R14 MOV RSI,RBX CALL 0x00114ddd MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x001135ae CMP EAX,EBP JNZ 0x0010daf7 LEA R12,[RSP + 0x188] LEA RDX,[RSP + 0x4c] MOV R14,qword ptr [RSP + 0x18] MOV RDI,R14 MOV RSI,R12 CALL 0x0010d4e5 TEST AL,AL JZ 0x0010db2c XOR R13D,R13D MOV RDI,R12 XOR ESI,ESI MOV RDX,R12 CALL 0x00110ef0 LEA R15,[0x13e354] CMP EAX,0x2 JNZ 0x0010db06 LEA RDX,[RSP + 0x60] MOV RDI,R12 MOV ESI,0x3 CALL 0x00110ef0 CMP EAX,0x2 JNZ 0x0010db33 LEA RDI,[RSP + 0x60] MOV ESI,0xffffffff MOV RDX,RDI CALL 0x00110ef0 LEA R15,[0x13e365] TEST EAX,EAX SETNZ R13B JZ 0x0010db06 MOV EBP,EAX XOR R12D,R12D LEA RBX,[RSP + 0xa0] LAB_0010d83f: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 LEA RDI,[RSP + 0x60] MOV ESI,R12D LEA RDX,[RSP + 0x50] CALL 0x00110ef0 MOV EAX,dword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] LEA RDX,[RSP + 0x170] MOVUPS XMM0,xmmword ptr [RDX] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV RDX,qword ptr [RDX + 0x10] MOV qword ptr [RSP + 0x40],RDX MOV dword ptr [RSP + 0xa0],EAX MOV qword ptr [RSP + 0xa8],RCX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RDI,RBX XOR ESI,ESI LEA RDX,[RSP + 0x20] CALL 0x00110ef0 CMP EAX,0x1 JNZ 0x0010dacb LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x30] LEA RDX,[0x13d697] CALL 0x00114ddd MOV EDX,dword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x90] MOV EDI,dword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00113577 TEST AL,AL JZ 0x0010dacb MOV RDI,RBX MOV ESI,0x2 LEA RDX,[RSP + 0x20] CALL 0x00110ef0 CMP EAX,0x1 JNZ 0x0010dacb LEA RDI,[RSP + 0xc8] LEA RSI,[RSP + 0x30] LEA RDX,[0x13e041] CALL 0x00114ddd MOV EDX,dword ptr [RSP + 0xc8] MOV RCX,qword ptr [RSP + 0xd0] MOV EDI,dword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00113577 TEST AL,AL JZ 0x0010dacb LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x30] LEA RDX,[0x13df5c] CALL 0x00114ddd MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x40],RAX MOVUPS XMM0,xmmword ptr [RSP + 0xb0] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV RDI,RBX MOV ESI,0x1 MOV RDX,RBX CALL 0x00110ef0 CMP EAX,0x2 JNZ 0x0010dacb MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001142c2 MOV R14D,EAX MOV RDI,RBX MOV ESI,0xffffffff MOV RDX,RBX CALL 0x00110ef0 CMP R14D,EAX MOV R14,qword ptr [RSP + 0x18] JNZ 0x0010dacb MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001142c2 TEST EAX,EAX SETZ R14B JZ 0x0010daba MOV RDI,RBX XOR ESI,ESI LEA RDX,[RSP + 0x20] CALL 0x00110ef0 CMP EAX,0x1 JNZ 0x0010dac6 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0x70] XOR ESI,ESI CALL 0x00114147 MOV EDX,dword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x78] MOV EDI,dword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00113577 TEST AL,AL JZ 0x0010dac6 MOV R13D,0x1 LAB_0010da46: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001142c2 CMP R13D,EAX SETNC R14B JNC 0x0010daba MOV RDI,RBX MOV ESI,R13D LEA RDX,[RSP + 0x20] CALL 0x00110ef0 CMP EAX,0x1 JNZ 0x0010daba MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0x70] MOV ESI,R13D CALL 0x00114147 MOV EDX,dword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x78] MOV EDI,dword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00113577 INC R13D TEST AL,AL JNZ 0x0010da46 LAB_0010daba: TEST R14B,R14B MOV R14,qword ptr [RSP + 0x18] JZ 0x0010dacb JMP 0x0010db38 LAB_0010dac6: MOV R14,qword ptr [RSP + 0x18] LAB_0010dacb: INC R12D XOR R13D,R13D CMP R12D,EBP JNZ 0x0010d83f JMP 0x0010db06 LAB_0010dadc: LEA R15,[0x13e2a9] JMP 0x0010dafe LAB_0010dae5: LEA R15,[0x13e2f0] JMP 0x0010dafe LAB_0010daee: LEA R15,[0x13e306] JMP 0x0010dafe LAB_0010daf7: LEA R15,[0x13e31a] LAB_0010dafe: XOR R13D,R13D MOV R14,qword ptr [RSP + 0x18] LAB_0010db06: LEA RDI,[R14 + 0x70] MOV RSI,R15 CALL 0x00118879 MOV byte ptr [R14 + 0x68],0x0 LAB_0010db17: MOV EAX,R13D ADD RSP,0x138 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010db2c: LEA R15,[0x13e335] LAB_0010db33: XOR R13D,R13D JMP 0x0010db06 LAB_0010db38: MOV R13B,0x1 JMP 0x0010db17
ulong c4_tx_verify_log_data (long param_1,int8 param_2,long param_3,int param_4,int4 param_5, int8 param_6,int8 param_7,int8 param_8,int8 param_9) { char cVar1; int iVar2; int iVar3; int iVar4; uint uVar5; long lVar6; int iVar7; ulong uVar8; char *pcVar9; bool bVar10; ulong local_148; int8 uStack_140; int8 local_138; int8 uStack_130; int8 local_128; int4 local_11c; int8 local_118; int8 uStack_110; int8 local_108; int8 uStack_100; int4 local_f8 [2]; int8 local_f0; int4 local_e0 [2]; int8 local_d8; int4 local_c8 [2]; int8 local_c0; int4 local_b8; int4 uStack_b4; int4 uStack_b0; int4 uStack_ac; int8 local_a8; int4 local_a0 [2]; int8 local_98; int4 local_88 [2]; int8 local_80; int4 local_70 [2]; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_108 = 0; uStack_100 = 0; local_11c = 0; keccak(param_5,param_6,&local_58); ssz_get(local_70,&param_7,"transactionHash"); cVar1 = bytes_eq(0x20,&local_58,local_70[0],local_68); if (cVar1 == '\0') { pcVar9 = "invalid transaction hash!"; } else { ssz_get(local_e0,&param_7,"blockNumber"); lVar6 = bytes_as_le(local_e0[0],local_d8); if (lVar6 == param_3) { ssz_get(local_88,&param_7,"blockHash"); cVar1 = bytes_eq(local_88[0],local_80,0x20,param_2); if (cVar1 == '\0') { pcVar9 = "invalid block hash!"; } else { ssz_get(local_e0,&param_7,"transactionIndex"); iVar2 = bytes_as_le(local_e0[0],local_d8); if (iVar2 == param_4) { cVar1 = get_and_remove_tx_type(param_1,&stack0x00000020,&local_11c); if (cVar1 == '\0') { pcVar9 = "invalid tx data, invalid type!"; } else { uVar8 = 0; iVar2 = rlp_decode(&stack0x00000020,0,&stack0x00000020); pcVar9 = "invalid to data!"; if (iVar2 != 2) goto LAB_0010db06; iVar2 = rlp_decode(&stack0x00000020,3,&local_108); if (iVar2 == 2) { iVar2 = rlp_decode(&local_108,0xffffffff,&local_108); pcVar9 = "missing the log within the tx"; uVar8 = (ulong)(iVar2 != 0); if (iVar2 != 0) { iVar7 = 0; do { uVar8 = 0; local_118 = 0; uStack_110 = 0; rlp_decode(&local_108,iVar7,&local_118); local_138 = param_7; uStack_130 = param_8; local_128 = param_9; local_c8[0] = (int4)local_118; local_c0 = uStack_110; local_148 = 0; uStack_140 = 0; iVar3 = rlp_decode(local_c8,0,&local_148); if (iVar3 == 1) { ssz_get(local_e0,&local_138,"address"); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_e0[0],local_d8); if ((cVar1 != '\0') && (iVar3 = rlp_decode(local_c8,2,&local_148), iVar3 == 1)) { ssz_get(local_a0,&local_138,"data"); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_a0[0],local_98); if (cVar1 != '\0') { ssz_get(&local_b8,&local_138,"topics"); local_128 = local_a8; local_138 = CONCAT44(uStack_b4,local_b8); uStack_130 = CONCAT44(uStack_ac,uStack_b0); iVar3 = rlp_decode(local_c8,1,local_c8); if (iVar3 == 2) { iVar3 = ssz_len(); iVar4 = rlp_decode(local_c8,0xffffffff,local_c8); if (iVar3 == iVar4) { iVar3 = ssz_len(); bVar10 = iVar3 == 0; if (bVar10) { LAB_0010daba: if (bVar10) { return CONCAT71((int7)(uVar8 >> 8),1); } } else { iVar3 = rlp_decode(local_c8,0,&local_148); if (iVar3 == 1) { ssz_at(local_f8,0); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_f8[0], local_f0); if (cVar1 != '\0') { uVar8 = 1; do { uVar5 = ssz_len(); bVar10 = uVar5 <= (uint)uVar8; if ((bVar10) || (iVar3 = rlp_decode(local_c8,uVar8,&local_148), iVar3 != 1)) break; ssz_at(local_f8,uVar8); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_f8[0], local_f0); uVar8 = (ulong)((uint)uVar8 + 1); } while (cVar1 != '\0'); goto LAB_0010daba; } } } } } } } } iVar7 = iVar7 + 1; uVar8 = 0; } while (iVar7 != iVar2); } goto LAB_0010db06; } } uVar8 = 0; goto LAB_0010db06; } pcVar9 = "invalid transaction index!"; } } else { pcVar9 = "invalid block number!"; } } uVar8 = 0; LAB_0010db06: c4_state_add_error(param_1 + 0x70,pcVar9); *(int1 *)(param_1 + 0x68) = 0; return uVar8; }
1,215
c4_tx_verify_log_data
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c
INTERNAL bool c4_tx_verify_log_data(verify_ctx_t* ctx, ssz_ob_t log, bytes32_t block_hash, uint64_t block_number, uint32_t tx_index, bytes_t tx_raw, bytes_t receipt_raw) { bytes32_t tx_hash = {0}; bytes_t val = {0}; bytes_t logs = {0}; tx_type_t type = 0; keccak(tx_raw, tx_hash); if (!bytes_eq(bytes(tx_hash, 32), ssz_get(&log, "transactionHash").bytes)) RETURN_VERIFY_ERROR(ctx, "invalid transaction hash!"); if (block_number != ssz_get_uint64(&log, "blockNumber")) RETURN_VERIFY_ERROR(ctx, "invalid block number!"); if (!bytes_eq(ssz_get(&log, "blockHash").bytes, bytes(block_hash, 32))) RETURN_VERIFY_ERROR(ctx, "invalid block hash!"); if (tx_index != ssz_get_uint32(&log, "transactionIndex")) RETURN_VERIFY_ERROR(ctx, "invalid transaction index!"); if (!get_and_remove_tx_type(ctx, &receipt_raw, &type)) RETURN_VERIFY_ERROR(ctx, "invalid tx data, invalid type!"); if (rlp_decode(&receipt_raw, 0, &receipt_raw) != RLP_LIST || rlp_decode(&receipt_raw, 3, &logs) != RLP_LIST) RETURN_VERIFY_ERROR(ctx, "invalid to data!"); uint32_t logs_len = rlp_decode(&logs, -1, &logs); for (uint32_t i = 0; i < logs_len; i++) { bytes_t log_rlp = {0}; rlp_decode(&logs, i, &log_rlp); if (matches(log, log_rlp)) return true; } RETURN_VERIFY_ERROR(ctx, "missing the log within the tx"); }
O3
c
c4_tx_verify_log_data: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movl %ecx, 0x5c(%rsp) movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbp leaq 0x190(%rsp), %rbx xorps %xmm0, %xmm0 leaq 0x130(%rsp), %r13 movaps %xmm0, 0x10(%r13) movaps %xmm0, (%r13) movaps %xmm0, 0x80(%rsp) movl %r8d, %edi movq %r9, %rsi movq %r13, %rdx callq 0x16384 leaq 0x30d76(%rip), %rdx # 0x3e2e0 leaq 0x118(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14885 movl (%r14), %edx movq 0x8(%r14), %rcx movl $0x20, %edi movq %r13, %rsi callq 0x13271 testb %al, %al je 0xd8f4 leaq 0x300de(%rip), %rdx # 0x3d67e leaq 0xa0(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14885 movl (%r14), %edi movq 0x8(%r14), %rsi callq 0x1329e cmpq %r12, %rax jne 0xd901 movq %rbx, %r13 leaq 0x3012a(%rip), %rdx # 0x3d6fc leaq 0x100(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x14885 movl (%r14), %edi movq 0x8(%r14), %rsi movl $0x20, %edx movq %r15, %rcx callq 0x13271 testb %al, %al je 0xd90e leaq 0x300bd(%rip), %rdx # 0x3d6c5 leaq 0xa0(%rsp), %r14 movq %r14, %rdi movq %r13, %rsi callq 0x14885 movl (%r14), %edi movq 0x8(%r14), %rsi callq 0x1329e cmpl 0x5c(%rsp), %eax jne 0xd91b leaq 0x1a8(%rsp), %r15 leaq 0x9c(%rsp), %rdx movq %rbp, %r14 movq %rbp, %rdi movq %r15, %rsi callq 0xd369 testb %al, %al je 0xd943 movq %r15, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x10c40 cmpl $0x2, %eax jne 0xd950 leaq 0x80(%rsp), %rdx movq %r15, %rdi movl $0x3, %esi callq 0x10c40 cmpl $0x2, %eax jne 0xd950 leaq 0x80(%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rdi, %rdx callq 0x10c40 testl %eax, %eax je 0xd8e7 movl %eax, %r12d xorl %r15d, %r15d xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) leaq 0x80(%rsp), %rdi movl %r15d, %esi leaq 0x70(%rsp), %rdx callq 0x10c40 movl 0x70(%rsp), %eax movq 0x78(%rsp), %rcx movups (%r13), %xmm0 movaps %xmm0, 0x20(%rsp) movq %r13, %rbx movq 0x10(%r13), %rdx movq %rdx, 0x30(%rsp) movl %eax, 0x60(%rsp) movq %rcx, 0x68(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) leaq 0x60(%rsp), %rdi xorl %esi, %esi leaq 0x40(%rsp), %rdx callq 0x10c40 cmpl $0x1, %eax jne 0xd8d8 leaq 0xa0(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0x2ff6e(%rip), %rdx # 0x3d697 callq 0x14885 movl 0xa0(%rsp), %edx movq 0xa8(%rsp), %rcx movl 0x40(%rsp), %edi movq 0x48(%rsp), %rsi callq 0x13271 testb %al, %al je 0xd8d8 leaq 0x60(%rsp), %rdi movl $0x2, %esi leaq 0x40(%rsp), %rdx callq 0x10c40 cmpl $0x1, %eax jne 0xd8d8 leaq 0xe8(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0x308bd(%rip), %rdx # 0x3e041 callq 0x14885 movl 0xe8(%rsp), %edx movq 0xf0(%rsp), %rcx movl 0x40(%rsp), %edi movq 0x48(%rsp), %rsi callq 0x13271 testb %al, %al je 0xd8d8 leaq 0xd0(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0x3079a(%rip), %rdx # 0x3df5c callq 0x14885 movq 0xe0(%rsp), %rax movq %rax, 0x30(%rsp) movups 0xd0(%rsp), %xmm0 movaps %xmm0, 0x20(%rsp) leaq 0x60(%rsp), %rdi movl $0x1, %esi movq %rdi, %rdx callq 0x10c40 cmpl $0x2, %eax jne 0xd8d8 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x13de0 movl %eax, %r14d leaq 0x60(%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rdi, %rdx callq 0x10c40 cmpl %eax, %r14d movq %rbp, %r14 jne 0xd8d8 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x13de0 testl %eax, %eax je 0xd967 xorl %r13d, %r13d leaq 0x60(%rsp), %rdi movl %r13d, %esi leaq 0x40(%rsp), %rdx callq 0x10c40 cmpl $0x1, %eax jne 0xd8d8 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0xb8(%rsp), %rdi movl %r13d, %esi callq 0x13c65 movl 0xb8(%rsp), %edx movq 0xc0(%rsp), %rcx movl 0x40(%rsp), %edi movq 0x48(%rsp), %rsi callq 0x13271 testb %al, %al je 0xd8d8 incl %r13d movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x13de0 cmpl %eax, %r13d jb 0xd858 jmp 0xd967 incl %r15d cmpl %r12d, %r15d movq %rbx, %r13 jne 0xd6ae leaq 0x70(%r14), %rdi leaq 0x30a73(%rip), %rsi # 0x3e365 jmp 0xd95b leaq 0x70(%rbp), %rdi leaq 0x309aa(%rip), %rsi # 0x3e2a9 jmp 0xd926 leaq 0x70(%rbp), %rdi leaq 0x309e4(%rip), %rsi # 0x3e2f0 jmp 0xd926 leaq 0x70(%rbp), %rdi leaq 0x309ed(%rip), %rsi # 0x3e306 jmp 0xd926 leaq 0x70(%rbp), %rdi leaq 0x309f4(%rip), %rsi # 0x3e31a callq 0x17ff5 movb $0x0, 0x68(%rbp) xorl %eax, %eax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x70(%r14), %rdi leaq 0x309e7(%rip), %rsi # 0x3e335 jmp 0xd95b leaq 0x70(%r14), %rdi leaq 0x309f9(%rip), %rsi # 0x3e354 callq 0x17ff5 movb $0x0, 0x68(%r14) jmp 0xd92f movb $0x1, %al jmp 0xd931
c4_tx_verify_log_data: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 158h mov [rsp+188h+var_12C], ecx mov r12, rdx mov r15, rsi mov rbp, rdi lea rbx, [rsp+188h+arg_0] xorps xmm0, xmm0 lea r13, [rsp+188h+var_58] movaps xmmword ptr [r13+10h], xmm0 movaps xmmword ptr [r13+0], xmm0 movaps [rsp+188h+var_108], xmm0 mov edi, r8d mov rsi, r9 mov rdx, r13 call keccak lea rdx, aTransactionhas; "transactionHash" lea r14, [rsp+188h+var_70] mov rdi, r14 mov rsi, rbx call ssz_get mov edx, [r14] mov rcx, [r14+8] mov edi, 20h ; ' ' mov rsi, r13 call bytes_eq test al, al jz loc_D8F4 lea rdx, aBlocknumber; "blockNumber" lea r14, [rsp+188h+var_E8] mov rdi, r14 mov rsi, rbx call ssz_get mov edi, [r14] mov rsi, [r14+8] call bytes_as_le cmp rax, r12 jnz loc_D901 mov r13, rbx lea rdx, aBlockhash; "blockHash" lea r14, [rsp+188h+var_88] mov rdi, r14 mov rsi, rbx call ssz_get mov edi, [r14] mov rsi, [r14+8] mov edx, 20h ; ' ' mov rcx, r15 call bytes_eq test al, al jz loc_D90E lea rdx, aTransactionind; "transactionIndex" lea r14, [rsp+188h+var_E8] mov rdi, r14 mov rsi, r13 call ssz_get mov edi, [r14] mov rsi, [r14+8] call bytes_as_le cmp eax, [rsp+188h+var_12C] jnz loc_D91B lea r15, [rsp+188h+arg_18] lea rdx, [rsp+188h+var_EC] mov r14, rbp mov rdi, rbp mov rsi, r15 call get_and_remove_tx_type test al, al jz loc_D943 mov rdi, r15 xor esi, esi mov rdx, r15 call rlp_decode cmp eax, 2 jnz loc_D950 lea rdx, [rsp+188h+var_108] mov rdi, r15 mov esi, 3 call rlp_decode cmp eax, 2 jnz loc_D950 lea rdi, [rsp+188h+var_108] mov esi, 0FFFFFFFFh mov rdx, rdi call rlp_decode test eax, eax jz loc_D8E7 mov r12d, eax xor r15d, r15d loc_D6AE: xorps xmm0, xmm0 movaps [rsp+188h+var_118], xmm0 lea rdi, [rsp+188h+var_108] mov esi, r15d lea rdx, [rsp+188h+var_118] call rlp_decode mov eax, dword ptr [rsp+188h+var_118] mov rcx, qword ptr [rsp+188h+var_118+8] movups xmm0, xmmword ptr [r13+0] movaps [rsp+188h+var_168], xmm0 mov rbx, r13 mov rdx, [r13+10h] mov [rsp+188h+var_158], rdx mov [rsp+188h+var_128], eax mov [rsp+188h+var_120], rcx xorps xmm0, xmm0 movaps [rsp+188h+var_148], xmm0 lea rdi, [rsp+188h+var_128] xor esi, esi lea rdx, [rsp+188h+var_148] call rlp_decode cmp eax, 1 jnz loc_D8D8 lea rdi, [rsp+188h+var_E8] lea rsi, [rsp+188h+var_168] lea rdx, aAddress; "address" call ssz_get mov edx, [rsp+188h+var_E8] mov rcx, [rsp+188h+var_E0] mov edi, dword ptr [rsp+188h+var_148] mov rsi, qword ptr [rsp+188h+var_148+8] call bytes_eq test al, al jz loc_D8D8 lea rdi, [rsp+188h+var_128] mov esi, 2 lea rdx, [rsp+188h+var_148] call rlp_decode cmp eax, 1 jnz loc_D8D8 lea rdi, [rsp+188h+var_A0] lea rsi, [rsp+188h+var_168] lea rdx, aSyncData+5; "data" call ssz_get mov edx, [rsp+188h+var_A0] mov rcx, [rsp+188h+var_98] mov edi, dword ptr [rsp+188h+var_148] mov rsi, qword ptr [rsp+188h+var_148+8] call bytes_eq test al, al jz loc_D8D8 lea rdi, [rsp+188h+var_B8] lea rsi, [rsp+188h+var_168] lea rdx, aTopics; "topics" call ssz_get mov rax, [rsp+188h+var_A8] mov [rsp+188h+var_158], rax movups xmm0, [rsp+188h+var_B8] movaps [rsp+188h+var_168], xmm0 lea rdi, [rsp+188h+var_128] mov esi, 1 mov rdx, rdi call rlp_decode cmp eax, 2 jnz loc_D8D8 mov rax, [rsp+188h+var_158] mov [rsp+188h+var_178], rax movaps xmm0, [rsp+188h+var_168] movups [rsp+188h+var_188], xmm0 call ssz_len mov r14d, eax lea rdi, [rsp+188h+var_128] mov esi, 0FFFFFFFFh mov rdx, rdi call rlp_decode cmp r14d, eax mov r14, rbp jnz loc_D8D8 mov rax, [rsp+188h+var_158] mov [rsp+188h+var_178], rax movaps xmm0, [rsp+188h+var_168] movups [rsp+188h+var_188], xmm0 call ssz_len test eax, eax jz loc_D967 xor r13d, r13d loc_D858: lea rdi, [rsp+188h+var_128] mov esi, r13d lea rdx, [rsp+188h+var_148] call rlp_decode cmp eax, 1 jnz short loc_D8D8 mov rax, [rsp+188h+var_158] mov [rsp+188h+var_178], rax movaps xmm0, [rsp+188h+var_168] movups [rsp+188h+var_188], xmm0 lea rdi, [rsp+188h+var_D0] mov esi, r13d call ssz_at mov edx, [rsp+188h+var_D0] mov rcx, [rsp+188h+var_C8] mov edi, dword ptr [rsp+188h+var_148] mov rsi, qword ptr [rsp+188h+var_148+8] call bytes_eq test al, al jz short loc_D8D8 inc r13d mov rax, [rsp+188h+var_158] mov [rsp+188h+var_178], rax movaps xmm0, [rsp+188h+var_168] movups [rsp+188h+var_188], xmm0 call ssz_len cmp r13d, eax jb short loc_D858 jmp loc_D967 loc_D8D8: inc r15d cmp r15d, r12d mov r13, rbx jnz loc_D6AE loc_D8E7: lea rdi, [r14+70h] lea rsi, aMissingTheLogW; "missing the log within the tx" jmp short loc_D95B loc_D8F4: lea rdi, [rbp+70h] lea rsi, aInvalidTransac; "invalid transaction hash!" jmp short loc_D926 loc_D901: lea rdi, [rbp+70h] lea rsi, aInvalidBlockNu_0; "invalid block number!" jmp short loc_D926 loc_D90E: lea rdi, [rbp+70h] lea rsi, aInvalidBlockHa; "invalid block hash!" jmp short loc_D926 loc_D91B: lea rdi, [rbp+70h] lea rsi, aInvalidTransac_0; "invalid transaction index!" loc_D926: call c4_state_add_error mov byte ptr [rbp+68h], 0 loc_D92F: xor eax, eax loc_D931: add rsp, 158h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D943: lea rdi, [r14+70h] lea rsi, aInvalidTxDataI; "invalid tx data, invalid type!" jmp short loc_D95B loc_D950: lea rdi, [r14+70h] lea rsi, aInvalidToData; "invalid to data!" loc_D95B: call c4_state_add_error mov byte ptr [r14+68h], 0 jmp short loc_D92F loc_D967: mov al, 1 jmp short loc_D931
char c4_tx_verify_log_data( long long a1, long long a2, long long a3, int a4, unsigned int a5, long long a6, char a7, int a8, int a9, char a10) { char *v12; // r13 long long v13; // r14 int v14; // eax int v15; // r12d unsigned int v16; // r15d char *v17; // rbx int v18; // edx int v19; // ecx int v20; // r8d int v21; // r9d int v22; // r14d bool v23; // zf int v24; // edx int v25; // ecx int v26; // r8d int v27; // r9d unsigned int v28; // r13d int v29; // edx int v30; // ecx int v31; // r8d int v32; // r9d int v33; // edi int v34; // esi int v35; // edx int v36; // ecx int v37; // r8d int v38; // r9d long long v39; // rdi const char *v40; // rsi long long v41; // rdi const char *v42; // rsi __int128 v44; // [rsp+20h] [rbp-168h] BYREF long long v45; // [rsp+30h] [rbp-158h] __int128 v46; // [rsp+40h] [rbp-148h] BYREF int v47; // [rsp+5Ch] [rbp-12Ch] int v48; // [rsp+60h] [rbp-128h] BYREF long long v49; // [rsp+68h] [rbp-120h] __int128 v50; // [rsp+70h] [rbp-118h] BYREF __int128 v51; // [rsp+80h] [rbp-108h] BYREF unsigned int v52; // [rsp+9Ch] [rbp-ECh] BYREF unsigned int v53; // [rsp+A0h] [rbp-E8h] BYREF long long v54; // [rsp+A8h] [rbp-E0h] unsigned int v55; // [rsp+B8h] [rbp-D0h] BYREF long long v56; // [rsp+C0h] [rbp-C8h] __int128 v57; // [rsp+D0h] [rbp-B8h] BYREF long long v58; // [rsp+E0h] [rbp-A8h] unsigned int v59; // [rsp+E8h] [rbp-A0h] BYREF long long v60; // [rsp+F0h] [rbp-98h] unsigned int v61; // [rsp+100h] [rbp-88h] BYREF long long v62; // [rsp+108h] [rbp-80h] unsigned int v63; // [rsp+118h] [rbp-70h] BYREF long long v64; // [rsp+120h] [rbp-68h] _BYTE v65[88]; // [rsp+130h] [rbp-58h] BYREF v47 = a4; memset(v65, 0, 32); v51 = 0LL; keccak(a5, a6, v65); ssz_get(&v63, &a7, "transactionHash"); if ( !(unsigned __int8)bytes_eq(32LL, v65, v63, v64) ) { v41 = a1 + 112; v42 = "invalid transaction hash!"; LABEL_28: c4_state_add_error(v41, v42); *(_BYTE *)(a1 + 104) = 0; return 0; } ssz_get(&v53, &a7, "blockNumber"); if ( bytes_as_le(v53, v54) != a3 ) { v41 = a1 + 112; v42 = "invalid block number!"; goto LABEL_28; } v12 = &a7; ssz_get(&v61, &a7, "blockHash"); if ( !(unsigned __int8)bytes_eq(v61, v62, 32LL, a2) ) { v41 = a1 + 112; v42 = "invalid block hash!"; goto LABEL_28; } ssz_get(&v53, &a7, "transactionIndex"); if ( (unsigned int)bytes_as_le(v53, v54) != v47 ) { v41 = a1 + 112; v42 = "invalid transaction index!"; goto LABEL_28; } v13 = a1; if ( !get_and_remove_tx_type(a1, (long long)&a10, &v52) ) { v39 = a1 + 112; v40 = "invalid tx data, invalid type!"; goto LABEL_32; } if ( (unsigned int)rlp_decode(&a10, 0LL, &a10) != 2 || (unsigned int)rlp_decode(&a10, 3LL, &v51) != 2 ) { v39 = a1 + 112; v40 = "invalid to data!"; goto LABEL_32; } v14 = rlp_decode(&v51, 0xFFFFFFFFLL, &v51); if ( !v14 ) { LABEL_23: v39 = v13 + 112; v40 = "missing the log within the tx"; LABEL_32: c4_state_add_error(v39, v40); *(_BYTE *)(v13 + 104) = 0; return 0; } v15 = v14; v16 = 0; while ( 1 ) { v50 = 0LL; rlp_decode(&v51, v16, &v50); v44 = *(_OWORD *)v12; v17 = v12; v45 = *((_QWORD *)v12 + 2); v48 = v50; v49 = *((_QWORD *)&v50 + 1); v46 = 0LL; if ( (unsigned int)rlp_decode(&v48, 0LL, &v46) == 1 ) { ssz_get(&v53, &v44, "address"); if ( (unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v53, v54) ) { if ( (unsigned int)rlp_decode(&v48, 2LL, &v46) == 1 ) { ssz_get(&v59, &v44, "data"); if ( (unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v59, v60) ) { ssz_get(&v57, &v44, "topics"); v45 = v58; v44 = v57; if ( (unsigned int)rlp_decode(&v48, 1LL, &v48) == 2 ) { v22 = ssz_len((unsigned int)&v48, 1, v18, v19, v20, v21, v44, DWORD2(v44), v45); v23 = v22 == (unsigned int)rlp_decode(&v48, 0xFFFFFFFFLL, &v48); v13 = a1; if ( v23 ) break; } } } } } LABEL_22: ++v16; v12 = v17; if ( v16 == v15 ) goto LABEL_23; } if ( (unsigned int)ssz_len((unsigned int)&v48, -1, v24, v25, v26, v27, v44, DWORD2(v44), v45) ) { v28 = 0; while ( (unsigned int)rlp_decode(&v48, v28, &v46) == 1 ) { ssz_at((unsigned int)&v55, v28, v29, v30, v31, v32, v44, *((long long *)&v44 + 1), v45); v33 = v46; v34 = DWORD2(v46); if ( !(unsigned __int8)bytes_eq((unsigned int)v46, *((_QWORD *)&v46 + 1), v55, v56) ) break; if ( ++v28 >= (unsigned int)ssz_len(v33, v34, v35, v36, v37, v38, v44, DWORD2(v44), v45) ) return 1; } goto LABEL_22; } return 1; }
c4_tx_verify_log_data: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x158 MOV dword ptr [RSP + 0x5c],ECX MOV R12,RDX MOV R15,RSI MOV RBP,RDI LEA RBX,[RSP + 0x190] XORPS XMM0,XMM0 LEA R13,[RSP + 0x130] MOVAPS xmmword ptr [R13 + 0x10],XMM0 MOVAPS xmmword ptr [R13],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOV EDI,R8D MOV RSI,R9 MOV RDX,R13 CALL 0x00116384 LEA RDX,[0x13e2e0] LEA R14,[RSP + 0x118] MOV RDI,R14 MOV RSI,RBX CALL 0x00114885 MOV EDX,dword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] MOV EDI,0x20 MOV RSI,R13 CALL 0x00113271 TEST AL,AL JZ 0x0010d8f4 LEA RDX,[0x13d67e] LEA R14,[RSP + 0xa0] MOV RDI,R14 MOV RSI,RBX CALL 0x00114885 MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x0011329e CMP RAX,R12 JNZ 0x0010d901 MOV R13,RBX LEA RDX,[0x13d6fc] LEA R14,[RSP + 0x100] MOV RDI,R14 MOV RSI,RBX CALL 0x00114885 MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] MOV EDX,0x20 MOV RCX,R15 CALL 0x00113271 TEST AL,AL JZ 0x0010d90e LEA RDX,[0x13d6c5] LEA R14,[RSP + 0xa0] MOV RDI,R14 MOV RSI,R13 CALL 0x00114885 MOV EDI,dword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x0011329e CMP EAX,dword ptr [RSP + 0x5c] JNZ 0x0010d91b LEA R15,[RSP + 0x1a8] LEA RDX,[RSP + 0x9c] MOV R14,RBP MOV RDI,RBP MOV RSI,R15 CALL 0x0010d369 TEST AL,AL JZ 0x0010d943 MOV RDI,R15 XOR ESI,ESI MOV RDX,R15 CALL 0x00110c40 CMP EAX,0x2 JNZ 0x0010d950 LEA RDX,[RSP + 0x80] MOV RDI,R15 MOV ESI,0x3 CALL 0x00110c40 CMP EAX,0x2 JNZ 0x0010d950 LEA RDI,[RSP + 0x80] MOV ESI,0xffffffff MOV RDX,RDI CALL 0x00110c40 TEST EAX,EAX JZ 0x0010d8e7 MOV R12D,EAX XOR R15D,R15D LAB_0010d6ae: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 LEA RDI,[RSP + 0x80] MOV ESI,R15D LEA RDX,[RSP + 0x70] CALL 0x00110c40 MOV EAX,dword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x78] MOVUPS XMM0,xmmword ptr [R13] MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RBX,R13 MOV RDX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x30],RDX MOV dword ptr [RSP + 0x60],EAX MOV qword ptr [RSP + 0x68],RCX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 LEA RDI,[RSP + 0x60] XOR ESI,ESI LEA RDX,[RSP + 0x40] CALL 0x00110c40 CMP EAX,0x1 JNZ 0x0010d8d8 LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x20] LEA RDX,[0x13d697] CALL 0x00114885 MOV EDX,dword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0xa8] MOV EDI,dword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00113271 TEST AL,AL JZ 0x0010d8d8 LEA RDI,[RSP + 0x60] MOV ESI,0x2 LEA RDX,[RSP + 0x40] CALL 0x00110c40 CMP EAX,0x1 JNZ 0x0010d8d8 LEA RDI,[RSP + 0xe8] LEA RSI,[RSP + 0x20] LEA RDX,[0x13e041] CALL 0x00114885 MOV EDX,dword ptr [RSP + 0xe8] MOV RCX,qword ptr [RSP + 0xf0] MOV EDI,dword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00113271 TEST AL,AL JZ 0x0010d8d8 LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0x20] LEA RDX,[0x13df5c] CALL 0x00114885 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [RSP + 0xd0] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RDI,[RSP + 0x60] MOV ESI,0x1 MOV RDX,RDI CALL 0x00110c40 CMP EAX,0x2 JNZ 0x0010d8d8 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00113de0 MOV R14D,EAX LEA RDI,[RSP + 0x60] MOV ESI,0xffffffff MOV RDX,RDI CALL 0x00110c40 CMP R14D,EAX MOV R14,RBP JNZ 0x0010d8d8 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00113de0 TEST EAX,EAX JZ 0x0010d967 XOR R13D,R13D LAB_0010d858: LEA RDI,[RSP + 0x60] MOV ESI,R13D LEA RDX,[RSP + 0x40] CALL 0x00110c40 CMP EAX,0x1 JNZ 0x0010d8d8 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0xb8] MOV ESI,R13D CALL 0x00113c65 MOV EDX,dword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0xc0] MOV EDI,dword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00113271 TEST AL,AL JZ 0x0010d8d8 INC R13D MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00113de0 CMP R13D,EAX JC 0x0010d858 JMP 0x0010d967 LAB_0010d8d8: INC R15D CMP R15D,R12D MOV R13,RBX JNZ 0x0010d6ae LAB_0010d8e7: LEA RDI,[R14 + 0x70] LEA RSI,[0x13e365] JMP 0x0010d95b LAB_0010d8f4: LEA RDI,[RBP + 0x70] LEA RSI,[0x13e2a9] JMP 0x0010d926 LAB_0010d901: LEA RDI,[RBP + 0x70] LEA RSI,[0x13e2f0] JMP 0x0010d926 LAB_0010d90e: LEA RDI,[RBP + 0x70] LEA RSI,[0x13e306] JMP 0x0010d926 LAB_0010d91b: LEA RDI,[RBP + 0x70] LEA RSI,[0x13e31a] LAB_0010d926: CALL 0x00117ff5 MOV byte ptr [RBP + 0x68],0x0 LAB_0010d92f: XOR EAX,EAX LAB_0010d931: ADD RSP,0x158 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010d943: LEA RDI,[R14 + 0x70] LEA RSI,[0x13e335] JMP 0x0010d95b LAB_0010d950: LEA RDI,[R14 + 0x70] LEA RSI,[0x13e354] LAB_0010d95b: CALL 0x00117ff5 MOV byte ptr [R14 + 0x68],0x0 JMP 0x0010d92f LAB_0010d967: MOV AL,0x1 JMP 0x0010d931
int8 c4_tx_verify_log_data (long param_1,int8 param_2,long param_3,int param_4,int4 param_5, int8 param_6,int8 param_7,int8 param_8,int8 param_9) { char cVar1; int iVar2; int iVar3; int iVar4; uint uVar5; long lVar6; char *pcVar7; uint uVar8; int iVar9; int8 local_168; int8 uStack_160; int8 local_158; ulong local_148; int8 uStack_140; int local_12c; int4 local_128 [2]; int8 local_120; int8 local_118; int8 uStack_110; int8 local_108; int8 uStack_100; int1 local_ec [4]; int4 local_e8 [2]; int8 local_e0; int4 local_d0 [2]; int8 local_c8; int4 local_b8; int4 uStack_b4; int4 uStack_b0; int4 uStack_ac; int8 local_a8; int4 local_a0 [2]; int8 local_98; int4 local_88 [2]; int8 local_80; int4 local_70 [2]; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_108 = 0; uStack_100 = 0; local_12c = param_4; keccak(param_5,param_6,&local_58); ssz_get(local_70,&param_7,"transactionHash"); cVar1 = bytes_eq(0x20,&local_58,local_70[0],local_68); if (cVar1 == '\0') { pcVar7 = "invalid transaction hash!"; } else { ssz_get(local_e8,&param_7,"blockNumber"); lVar6 = bytes_as_le(local_e8[0],local_e0); if (lVar6 == param_3) { ssz_get(local_88,&param_7,"blockHash"); cVar1 = bytes_eq(local_88[0],local_80,0x20,param_2); if (cVar1 == '\0') { pcVar7 = "invalid block hash!"; } else { ssz_get(local_e8,&param_7,"transactionIndex"); iVar2 = bytes_as_le(local_e8[0],local_e0); if (iVar2 == local_12c) { cVar1 = get_and_remove_tx_type(param_1,&stack0x00000020,local_ec); if (cVar1 == '\0') { pcVar7 = "invalid tx data, invalid type!"; } else { iVar2 = rlp_decode(&stack0x00000020,0,&stack0x00000020); if ((iVar2 == 2) && (iVar2 = rlp_decode(&stack0x00000020,3,&local_108), iVar2 == 2)) { iVar2 = rlp_decode(&local_108,0xffffffff,&local_108); if (iVar2 != 0) { iVar9 = 0; do { local_118 = 0; uStack_110 = 0; rlp_decode(&local_108,iVar9,&local_118); local_168 = param_7; uStack_160 = param_8; local_158 = param_9; local_128[0] = (int4)local_118; local_120 = uStack_110; local_148 = 0; uStack_140 = 0; iVar3 = rlp_decode(local_128,0,&local_148); if (iVar3 == 1) { ssz_get(local_e8,&local_168,"address"); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_e8[0],local_e0); if ((cVar1 != '\0') && (iVar3 = rlp_decode(local_128,2,&local_148), iVar3 == 1)) { ssz_get(local_a0,&local_168,"data"); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_a0[0],local_98); if (cVar1 != '\0') { ssz_get(&local_b8,&local_168,"topics"); local_158 = local_a8; local_168 = CONCAT44(uStack_b4,local_b8); uStack_160 = CONCAT44(uStack_ac,uStack_b0); iVar3 = rlp_decode(local_128,1,local_128); if (iVar3 == 2) { iVar3 = ssz_len(); iVar4 = rlp_decode(local_128,0xffffffff,local_128); if (iVar3 == iVar4) { iVar3 = ssz_len(); if (iVar3 == 0) { return 1; } uVar8 = 0; while (iVar3 = rlp_decode(local_128,uVar8,&local_148), iVar3 == 1) { ssz_at(local_d0,uVar8); cVar1 = bytes_eq(local_148 & 0xffffffff,uStack_140,local_d0[0], local_c8); if (cVar1 == '\0') break; uVar8 = uVar8 + 1; uVar5 = ssz_len(); if (uVar5 <= uVar8) { return 1; } } } } } } } iVar9 = iVar9 + 1; } while (iVar9 != iVar2); } pcVar7 = "missing the log within the tx"; } else { pcVar7 = "invalid to data!"; } } c4_state_add_error(param_1 + 0x70,pcVar7); *(int1 *)(param_1 + 0x68) = 0; return 0; } pcVar7 = "invalid transaction index!"; } } else { pcVar7 = "invalid block number!"; } } c4_state_add_error(param_1 + 0x70,pcVar7); *(int1 *)(param_1 + 0x68) = 0; return 0; }
1,216
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
SubscriptExpr(const Location & location, std::shared_ptr<Expression> && b, std::shared_ptr<Expression> && i) : Expression(location), base(std::move(b)), index(std::move(i)) {}
O2
cpp
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 callq 0x63572 leaq 0x9446a(%rip), %rax # 0xff768 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) andq $0x0, 0x38(%r15) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r15) andq $0x0, (%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN5minja13SubscriptExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx mov r15, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja13SubscriptExprE; `vtable for'minja::SubscriptExpr add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 and qword ptr [r15+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r15+30h], xmm0 and qword ptr [rbx], 0 pop rbx pop r14 pop r15 retn
long long * minja::SubscriptExpr::SubscriptExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4) { long long *result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); result = &`vtable for'minja::SubscriptExpr + 2; *(_QWORD *)a1 = &`vtable for'minja::SubscriptExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; return result; }
SubscriptExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RDI CALL 0x00163572 LEA RAX,[0x1ff768] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 AND qword ptr [R15 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 AND qword ptr [RBX],0x0 POP RBX POP R14 POP R15 RET
/* minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SubscriptExpr::SubscriptExpr (SubscriptExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001ff778; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)param_3 = 0; return; }
1,217
js_promise_try
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_try(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue result_promise, resolving_funcs[2], ret, ret2; BOOL is_reject = 0; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val); if (JS_IsException(result_promise)) return result_promise; ret = JS_Call(ctx, argv[0], JS_UNDEFINED, argc - 1, argv + 1); if (JS_IsException(ret)) { is_reject = 1; ret = JS_GetException(ctx); } ret2 = JS_Call(ctx, resolving_funcs[is_reject], JS_UNDEFINED, 1, &ret); JS_FreeValue(ctx, resolving_funcs[0]); JS_FreeValue(ctx, resolving_funcs[1]); JS_FreeValue(ctx, ret); if (JS_IsException(ret2)) { JS_FreeValue(ctx, result_promise); return ret2; } JS_FreeValue(ctx, ret2); return result_promise; }
O2
c
js_promise_try: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movq %rdx, %rcx movq %rdi, %rbx cmpl $-0x1, %ecx jne 0x4c049 movq %r8, %r13 movq %rsi, %rdx leaq 0x20(%rsp), %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x33520 movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d je 0x4c065 decl %ebp leaq 0x10(%r13), %rax movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rax, (%rsp) pushq $0x3 popq %r8 movq %rbx, %rdi xorl %ecx, %ecx movl %ebp, %r9d callq 0x25a66 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) cmpl $0x6, %edx jne 0x4bfd5 movq 0x18(%rbx), %rax movups 0xf0(%rax), %xmm0 andl $0x0, 0xf0(%rax) leaq 0x30(%rsp), %r12 movq $0x4, 0xf8(%rax) movaps %xmm0, 0x10(%rsp) movq (%r12), %rsi movq 0x8(%r12), %rdx leaq 0x10(%rsp), %rbp movq %rbp, (%rsp) pushq $0x3 popq %r8 pushq $0x1 popq %r9 movq %rbx, %rdi xorl %ecx, %ecx callq 0x25a66 movq %rax, %r12 movq %rdx, %r13 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x1bbce movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x1bbce movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq %rbx, %rdi callq 0x1bbce movq %rbx, %rdi cmpl $0x6, %r13d jne 0x4c05a movq %r15, %rsi movq %r14, %rdx callq 0x1bbce jmp 0x4c06b movq %rbx, %rdi callq 0x21191 pushq $0x6 popq %r13 xorl %r12d, %r12d jmp 0x4c06b movq %r12, %rsi movq %r13, %rdx callq 0x1bbce movq %r15, %r12 movq %r14, %r13 movq %r12, %rax movq %r13, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_try: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov rcx, rdx mov rbx, rdi cmp ecx, 0FFFFFFFFh jnz loc_4C049 mov r13, r8 mov rdx, rsi lea r12, [rsp+78h+var_58] mov rdi, rbx mov rsi, r12 call js_new_promise_capability mov r15, rax mov r14, rdx cmp r14d, 6 jz loc_4C065 dec ebp lea rax, [r13+10h] mov rsi, [r13+0] mov rdx, [r13+8] mov [rsp+78h+var_78], rax push 3 pop r8 mov rdi, rbx xor ecx, ecx mov r9d, ebp call JS_Call mov qword ptr [rsp+78h+var_68], rax mov qword ptr [rsp+78h+var_68+8], rdx cmp edx, 6 jnz short loc_4BFD5 mov rax, [rbx+18h] movups xmm0, xmmword ptr [rax+0F0h] and dword ptr [rax+0F0h], 0 lea r12, [rsp+78h+var_48] mov qword ptr [rax+0F8h], 4 movaps [rsp+78h+var_68], xmm0 loc_4BFD5: mov rsi, [r12] mov rdx, [r12+8] lea rbp, [rsp+78h+var_68] mov [rsp+78h+var_78], rbp push 3 pop r8 push 1 pop r9 mov rdi, rbx xor ecx, ecx call JS_Call mov r12, rax mov r13, rdx mov rsi, [rsp+78h+var_58] mov rdx, [rsp+78h+var_50] mov rdi, rbx call JS_FreeValue mov rsi, [rsp+78h+var_48] mov rdx, [rsp+78h+var_40] mov rdi, rbx call JS_FreeValue mov rsi, [rbp+0] mov rdx, [rbp+8] mov rdi, rbx call JS_FreeValue mov rdi, rbx cmp r13d, 6 jnz short loc_4C05A mov rsi, r15 mov rdx, r14 call JS_FreeValue jmp short loc_4C06B loc_4C049: mov rdi, rbx call JS_ThrowTypeErrorNotAnObject push 6 pop r13 xor r12d, r12d jmp short loc_4C06B loc_4C05A: mov rsi, r12 mov rdx, r13 call JS_FreeValue loc_4C065: mov r12, r15 mov r13, r14 loc_4C06B: mov rax, r12 mov rdx, r13 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_promise_try( long long a1, unsigned long long a2, unsigned long long a3, int a4, _QWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long *v16; // r12 unsigned long long v17; // r15 long long v18; // rdx long long v19; // r14 __int128 v20; // rax long long v21; // rax __int128 v22; // xmm0 long long v23; // r12 long long v24; // rdx long long v25; // r13 char v27; // [rsp+0h] [rbp-78h] __int128 v28; // [rsp+10h] [rbp-68h] BYREF long long v29[2]; // [rsp+20h] [rbp-58h] BYREF long long v30[9]; // [rsp+30h] [rbp-48h] BYREF if ( (_DWORD)a3 != -1 ) { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a3, (long long)a5, a6, v27); return 0LL; } v16 = v29; v17 = js_new_promise_capability( a1, (long long)v29, a2, a3, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14); v19 = v18; if ( (_DWORD)v18 == 6 ) return v17; *(_QWORD *)&v20 = JS_Call(a1, *a5, a5[1], 0, 3, a4 - 1, (long long)(a5 + 2)); v28 = v20; if ( DWORD2(v20) == 6 ) { v21 = *(_QWORD *)(a1 + 24); v22 = *(_OWORD *)(v21 + 240); *(_DWORD *)(v21 + 240) = 0; v16 = v30; *(_QWORD *)(v21 + 248) = 4LL; v28 = v22; } v23 = JS_Call(a1, *v16, v16[1], 0, 3, 1, (long long)&v28); v25 = v24; JS_FreeValue(a1, v29[0], v29[1]); JS_FreeValue(a1, v30[0], v30[1]); JS_FreeValue(a1, v28, *((long long *)&v28 + 1)); if ( (_DWORD)v25 != 6 ) { JS_FreeValue(a1, v23, v25); return v17; } JS_FreeValue(a1, v17, v19); return v23; }
js_promise_try: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV RCX,RDX MOV RBX,RDI CMP ECX,-0x1 JNZ 0x0014c049 MOV R13,R8 MOV RDX,RSI LEA R12,[RSP + 0x20] MOV RDI,RBX MOV RSI,R12 CALL 0x00133520 MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x0014c065 DEC EBP LEA RAX,[R13 + 0x10] MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV qword ptr [RSP],RAX PUSH 0x3 POP R8 MOV RDI,RBX XOR ECX,ECX MOV R9D,EBP CALL 0x00125a66 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX CMP EDX,0x6 JNZ 0x0014bfd5 MOV RAX,qword ptr [RBX + 0x18] MOVUPS XMM0,xmmword ptr [RAX + 0xf0] AND dword ptr [RAX + 0xf0],0x0 LEA R12,[RSP + 0x30] MOV qword ptr [RAX + 0xf8],0x4 MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_0014bfd5: MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] LEA RBP,[RSP + 0x10] MOV qword ptr [RSP],RBP PUSH 0x3 POP R8 PUSH 0x1 POP R9 MOV RDI,RBX XOR ECX,ECX CALL 0x00125a66 MOV R12,RAX MOV R13,RDX MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV RDI,RBX CALL 0x0011bbce MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV RDI,RBX CALL 0x0011bbce MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] MOV RDI,RBX CALL 0x0011bbce MOV RDI,RBX CMP R13D,0x6 JNZ 0x0014c05a MOV RSI,R15 MOV RDX,R14 CALL 0x0011bbce JMP 0x0014c06b LAB_0014c049: MOV RDI,RBX CALL 0x00121191 PUSH 0x6 POP R13 XOR R12D,R12D JMP 0x0014c06b LAB_0014c05a: MOV RSI,R12 MOV RDX,R13 CALL 0x0011bbce LAB_0014c065: MOV R12,R15 MOV R13,R14 LAB_0014c06b: MOV RAX,R12 MOV RDX,R13 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_promise_try(long param_1,int8 param_2,int param_3,int param_4,int8 *param_5) { long lVar1; int8 *puVar2; int1 auVar3 [16]; int1 auVar4 [16]; int1 local_68 [16]; int8 local_58; int8 local_50; int8 local_48; int8 local_40; if (param_3 == -1) { puVar2 = &local_58; auVar3 = js_new_promise_capability(param_1,puVar2,param_2); if (auVar3._8_4_ != 6) { local_68 = JS_Call(param_1,*param_5,param_5[1],0,3,param_4 + -1,param_5 + 2); if (local_68._8_4_ == 6) { lVar1 = *(long *)(param_1 + 0x18); local_68 = *(int1 (*) [16])(lVar1 + 0xf0); *(int4 *)(lVar1 + 0xf0) = 0; puVar2 = &local_48; *(int8 *)(lVar1 + 0xf8) = 4; } auVar4 = JS_Call(param_1,*puVar2,puVar2[1],0,3,1,local_68); JS_FreeValue(param_1,local_58,local_50); JS_FreeValue(param_1,local_48,local_40); JS_FreeValue(param_1,local_68._0_8_,local_68._8_8_); if (auVar4._8_4_ == 6) { JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_); auVar3 = auVar4; } else { JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); } } } else { JS_ThrowTypeErrorNotAnObject(param_1); auVar3 = ZEXT816(6) << 0x40; } return auVar3; }
1,218
lo0bits
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static int lo0bits(ULong *y) { register int k; register ULong x= *y; if (x & 7) { if (x & 1) return 0; if (x & 2) { *y= x >> 1; return 1; } *y= x >> 2; return 2; } k= 0; if (!(x & 0xffff)) { k= 16; x>>= 16; } if (!(x & 0xff)) { k+= 8; x>>= 8; } if (!(x & 0xf)) { k+= 4; x>>= 4; } if (!(x & 0x3)) { k+= 2; x>>= 2; } if (!(x & 1)) { k++; x>>= 1; if (!x) return 32; } *y= x; return k; }
O3
c
lo0bits: pushq %rbp movq %rsp, %rbp movl (%rdi), %ecx testb $0x7, %cl je 0x97f68 xorl %eax, %eax testb $0x1, %cl jne 0x97fcf testb $0x2, %cl jne 0x97fc6 shrl $0x2, %ecx movl $0x2, %eax jmp 0x97fcd movl %ecx, %eax shrl $0x10, %eax xorl %edx, %edx testl $0xfff8, %ecx # imm = 0xFFF8 cmovnel %ecx, %eax sete %dl shll $0x4, %edx leal 0x8(%rdx), %ecx movl %eax, %esi shrl $0x8, %esi testb %al, %al cmovnel %edx, %ecx cmovnel %eax, %esi leal 0x4(%rcx), %edx movl %esi, %r8d shrl $0x4, %r8d testb $0xf, %sil cmovnel %ecx, %edx cmovnel %esi, %r8d leal 0x2(%rdx), %eax movl %r8d, %ecx shrl $0x2, %ecx testb $0x3, %r8b cmovnel %edx, %eax cmovnel %r8d, %ecx testb $0x1, %cl jne 0x97fcd testl %ecx, %ecx je 0x97fd1 incl %eax shrl %ecx jmp 0x97fcd shrl %ecx movl $0x1, %eax movl %ecx, (%rdi) popq %rbp retq movl $0x20, %eax jmp 0x97fcf
lo0bits: push rbp mov rbp, rsp mov ecx, [rdi] test cl, 7 jz short loc_97F68 xor eax, eax test cl, 1 jnz short loc_97FCF test cl, 2 jnz short loc_97FC6 shr ecx, 2 mov eax, 2 jmp short loc_97FCD loc_97F68: mov eax, ecx shr eax, 10h xor edx, edx test ecx, 0FFF8h cmovnz eax, ecx setz dl shl edx, 4 lea ecx, [rdx+8] mov esi, eax shr esi, 8 test al, al cmovnz ecx, edx cmovnz esi, eax lea edx, [rcx+4] mov r8d, esi shr r8d, 4 test sil, 0Fh cmovnz edx, ecx cmovnz r8d, esi lea eax, [rdx+2] mov ecx, r8d shr ecx, 2 test r8b, 3 cmovnz eax, edx cmovnz ecx, r8d test cl, 1 jnz short loc_97FCD test ecx, ecx jz short loc_97FD1 inc eax shr ecx, 1 jmp short loc_97FCD loc_97FC6: shr ecx, 1 mov eax, 1 loc_97FCD: mov [rdi], ecx loc_97FCF: pop rbp retn loc_97FD1: mov eax, 20h ; ' ' jmp short loc_97FCF
long long lo0bits(unsigned int *a1) { unsigned int v1; // ecx long long result; // rax unsigned int v3; // ecx unsigned int v4; // eax int v5; // edx int v6; // edx int v7; // ecx unsigned int v8; // esi unsigned int v9; // edx unsigned int v10; // r8d v1 = *a1; if ( (*a1 & 7) != 0 ) { result = 0LL; if ( (v1 & 1) != 0 ) return result; if ( (v1 & 2) != 0 ) { v3 = v1 >> 1; result = 1LL; } else { v3 = v1 >> 2; result = 2LL; } } else { v4 = HIWORD(v1); v5 = 0; if ( (v1 & 0xFFF8) != 0 ) v4 = *a1; LOBYTE(v5) = (*a1 & 0xFFF8) == 0; v6 = 16 * v5; v7 = v6 + 8; v8 = v4 >> 8; if ( (_BYTE)v4 ) { v7 = v6; v8 = v4; } v9 = v7 + 4; v10 = v8 >> 4; if ( (v8 & 0xF) != 0 ) { v9 = v7; v10 = v8; } result = v9 + 2; v3 = v10 >> 2; if ( (v10 & 3) != 0 ) { result = v9; v3 = v10; } if ( (v3 & 1) == 0 ) { if ( !v3 ) return 32LL; result = (unsigned int)(result + 1); v3 >>= 1; } } *a1 = v3; return result; }
lo0bits: PUSH RBP MOV RBP,RSP MOV ECX,dword ptr [RDI] TEST CL,0x7 JZ 0x00197f68 XOR EAX,EAX TEST CL,0x1 JNZ 0x00197fcf TEST CL,0x2 JNZ 0x00197fc6 SHR ECX,0x2 MOV EAX,0x2 JMP 0x00197fcd LAB_00197f68: MOV EAX,ECX SHR EAX,0x10 XOR EDX,EDX TEST ECX,0xfff8 CMOVNZ EAX,ECX SETZ DL SHL EDX,0x4 LEA ECX,[RDX + 0x8] MOV ESI,EAX SHR ESI,0x8 TEST AL,AL CMOVNZ ECX,EDX CMOVNZ ESI,EAX LEA EDX,[RCX + 0x4] MOV R8D,ESI SHR R8D,0x4 TEST SIL,0xf CMOVNZ EDX,ECX CMOVNZ R8D,ESI LEA EAX,[RDX + 0x2] MOV ECX,R8D SHR ECX,0x2 TEST R8B,0x3 CMOVNZ EAX,EDX CMOVNZ ECX,R8D TEST CL,0x1 JNZ 0x00197fcd TEST ECX,ECX JZ 0x00197fd1 INC EAX SHR ECX,0x1 JMP 0x00197fcd LAB_00197fc6: SHR ECX,0x1 MOV EAX,0x1 LAB_00197fcd: MOV dword ptr [RDI],ECX LAB_00197fcf: POP RBP RET LAB_00197fd1: MOV EAX,0x20 JMP 0x00197fcf
int lo0bits(uint *param_1) { uint uVar1; int iVar2; uint uVar3; int iVar4; bool bVar5; uVar3 = *param_1; if ((uVar3 & 7) == 0) { bVar5 = (uVar3 & 0xfff8) == 0; uVar1 = uVar3 >> 0x10; if (!bVar5) { uVar1 = uVar3; } iVar4 = (uint)bVar5 * 0x10; uVar3 = uVar1 >> 8; iVar2 = iVar4 + 8; if ((char)uVar1 != '\0') { uVar3 = uVar1; iVar2 = iVar4; } uVar1 = uVar3 >> 4; iVar4 = iVar2 + 4; if ((uVar3 & 0xf) != 0) { uVar1 = uVar3; iVar4 = iVar2; } uVar3 = uVar1 >> 2; iVar2 = iVar4 + 2; if ((uVar1 & 3) != 0) { uVar3 = uVar1; iVar2 = iVar4; } if ((uVar3 & 1) == 0) { if (uVar3 == 0) { return 0x20; } iVar2 = iVar2 + 1; uVar3 = uVar3 >> 1; } } else { if ((uVar3 & 1) != 0) { return 0; } if ((uVar3 & 2) == 0) { uVar3 = uVar3 >> 2; iVar2 = 2; } else { uVar3 = uVar3 >> 1; iVar2 = 1; } } *param_1 = uVar3; return iVar2; }
1,219
scan_one_character
eloqsql/strings/ctype.c
static size_t scan_one_character(const char *s, const char *e, my_wc_t *wc) { CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci; if (s >= e) return 0; /* Escape sequence: \uXXXX */ if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2])) { size_t len= 3; /* We have at least one digit */ for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++) { } wc[0]= 0; return len; } else if ((int8) s[0] > 0) /* 7-bit character */ { wc[0]= 0; return 1; } else /* Non-escaped character */ { int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e); if (rc > 0) return (size_t) rc; } return 0; }
O0
c
scan_one_character: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) leaq 0x313195(%rip), %rax # 0x37f9b0 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jb 0x6c836 movq $0x0, -0x8(%rbp) jmp 0x6c968 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5c, %eax jne 0x6c907 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jae 0x6c907 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x75, %eax jne 0x6c907 movq -0x28(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x6c907 movq $0x3, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x35(%rbp) jae 0x6c8cd movq -0x28(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax setne %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x6c8d6 jmp 0x6c8f2 jmp 0x6c8d8 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x6c89c movq -0x20(%rbp), %rax movq $0x0, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x6c968 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jle 0x6c928 movq -0x20(%rbp), %rax movq $0x0, (%rax) movq $0x1, -0x8(%rbp) jmp 0x6c968 movq -0x28(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) jle 0x6c95c movslq -0x34(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x6c968 jmp 0x6c95e jmp 0x6c960 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
scan_one_character: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx lea rax, my_charset_utf8mb3_general_ci mov [rbp+var_28], rax mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jb short loc_6C836 mov [rbp+var_8], 0 jmp loc_6C968 loc_6C836: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ch ; '\' jnz loc_6C907 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jnb loc_6C907 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 75h ; 'u' jnz loc_6C907 mov rax, [rbp+var_28] mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+2] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 jz short loc_6C907 mov [rbp+var_30], 3 mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_6C89C: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_35], al jnb short loc_6C8CD mov rax, [rbp+var_28] mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 setnz al mov [rbp+var_35], al loc_6C8CD: mov al, [rbp+var_35] test al, 1 jnz short loc_6C8D6 jmp short loc_6C8F2 loc_6C8D6: jmp short $+2 loc_6C8D8: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_6C89C loc_6C8F2: mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp short loc_6C968 loc_6C907: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jle short loc_6C928 mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov [rbp+var_8], 1 jmp short loc_6C968 loc_6C928: mov rax, [rbp+var_28] mov rax, [rax+0B8h] mov rax, [rax+28h] mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] call rax mov [rbp+var_34], eax cmp [rbp+var_34], 0 jle short loc_6C95C movsxd rax, [rbp+var_34] mov [rbp+var_8], rax jmp short loc_6C968 loc_6C95C: jmp short $+2 loc_6C95E: jmp short $+2 loc_6C960: mov [rbp+var_8], 0 loc_6C968: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3) { bool v4; // [rsp+Bh] [rbp-35h] int v5; // [rsp+Ch] [rbp-34h] long long v6; // [rsp+10h] [rbp-30h] unsigned __int8 *i; // [rsp+30h] [rbp-10h] if ( (unsigned long long)a1 >= a2 ) return 0LL; if ( *a1 == 92 && (unsigned long long)(a1 + 2) < a2 && a1[1] == 117 && (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 ) { v6 = 3LL; for ( i = (unsigned __int8 *)(a1 + 3); ; ++i ) { v4 = 0; if ( (unsigned long long)i < a2 ) v4 = (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *i + 1LL) & 0x80) != 0; if ( !v4 ) break; ++v6; } *a3 = 0LL; return v6; } else if ( *a1 <= 0 ) { v5 = (*(long long ( **)(unsigned int *, _QWORD *, char *, unsigned long long))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46] + 40LL))( my_charset_utf8mb3_general_ci, a3, a1, a2); if ( v5 <= 0 ) return 0LL; else return v5; } else { *a3 = 0LL; return 1LL; } }
scan_one_character: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX LEA RAX,[0x47f9b0] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JC 0x0016c836 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0016c968 LAB_0016c836: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5c JNZ 0x0016c907 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JNC 0x0016c907 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x75 JNZ 0x0016c907 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 JZ 0x0016c907 MOV qword ptr [RBP + -0x30],0x3 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_0016c89c: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x35],AL JNC 0x0016c8cd MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x35],AL LAB_0016c8cd: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x0016c8d6 JMP 0x0016c8f2 LAB_0016c8d6: JMP 0x0016c8d8 LAB_0016c8d8: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016c89c LAB_0016c8f2: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x0016c968 LAB_0016c907: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JLE 0x0016c928 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV qword ptr [RBP + -0x8],0x1 JMP 0x0016c968 LAB_0016c928: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JLE 0x0016c95c MOVSXD RAX,dword ptr [RBP + -0x34] MOV qword ptr [RBP + -0x8],RAX JMP 0x0016c968 LAB_0016c95c: JMP 0x0016c95e LAB_0016c95e: JMP 0x0016c960 LAB_0016c960: MOV qword ptr [RBP + -0x8],0x0 LAB_0016c968: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3) { int iVar1; bool bVar2; long local_38; byte *local_18; long local_10; if (param_1 < param_2) { if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) && ((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) { local_38 = 3; local_18 = param_1 + 3; while( true ) { bVar2 = false; if (local_18 < param_2) { bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) != 0; } if (!bVar2) break; local_18 = local_18 + 1; local_38 = local_38 + 1; } *param_3 = 0; local_10 = local_38; } else if ((char)*param_1 < '\x01') { iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28)) (my_charset_utf8mb3_general_ci,param_3,param_1,param_2); if (iVar1 < 1) { local_10 = 0; } else { local_10 = (long)iVar1; } } else { *param_3 = 0; local_10 = 1; } } else { local_10 = 0; } return local_10; }
1,220
my_strxfrm_pad_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend) { uchar *str0= str; DBUG_ASSERT(str && str <= strend); for ( ; str < strend ; ) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O0
c
my_strxfrm_pad_unicode: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x70306 jmp 0x70308 movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x70342 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x0, (%rax) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x70340 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x20, (%rax) jmp 0x70308 movq -0x8(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax popq %rbp retq nop
my_strxfrm_pad_unicode: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax jmp short $+2 loc_70306: jmp short $+2 loc_70308: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_70342 mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_70340 mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 20h ; ' ' loc_70340: jmp short loc_70308 loc_70342: mov rax, [rbp+var_8] mov rcx, [rbp+var_18] sub rax, rcx pop rbp retn
_BYTE * my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2) { _BYTE *v2; // rax _BYTE *v3; // rax _BYTE *v5; // [rsp+10h] [rbp-8h] v5 = a1; while ( (unsigned long long)v5 < a2 ) { v2 = v5++; *v2 = 0; if ( (unsigned long long)v5 < a2 ) { v3 = v5++; *v3 = 32; } } return (_BYTE *)(v5 - a1); }
my_strxfrm_pad_unicode: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x00170306 LAB_00170306: JMP 0x00170308 LAB_00170308: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00170342 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00170340 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x20 LAB_00170340: JMP 0x00170308 LAB_00170342: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX POP RBP RET
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2) { int1 *puVar1; int1 *local_10; puVar1 = param_1; while (local_10 = puVar1, local_10 < param_2) { puVar1 = local_10 + 1; *local_10 = 0; if (puVar1 < param_2) { *puVar1 = 0x20; puVar1 = local_10 + 2; } } return (long)local_10 - (long)param_1; }
1,221
ma_field_extension_deep_dup
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MA_FIELD_EXTENSION *ma_field_extension_deep_dup(MA_MEM_ROOT *memroot, const MA_FIELD_EXTENSION *from) { MA_FIELD_EXTENSION *ext= new_ma_field_extension(memroot); uint i; if (!ext) return NULL; for (i= 0; i < MARIADB_FIELD_ATTR_LAST; i++) { if (from->metadata[i].str) ext->metadata[i]= ma_const_string_copy_root(memroot, from->metadata[i].str, from->metadata[i].length); } return ext; }
O0
c
ma_field_extension_deep_dup: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x21a60 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x21ad1 movq $0x0, -0x8(%rbp) jmp 0x21b6a movl $0x0, -0x24(%rbp) cmpl $0x1, -0x24(%rbp) jae 0x21b62 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpq $0x0, (%rax) je 0x21b52 movq -0x20(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rdx callq 0x21b80 movq %rax, %rcx movq -0x40(%rbp), %rax movq %rcx, -0x38(%rbp) movq %rdx, -0x30(%rbp) movq -0x38(%rbp), %rcx movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq %rcx, 0x8(%rax) jmp 0x21b54 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x21ad8 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_field_extension_deep_dup: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call new_ma_field_extension mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_21AD1 mov [rbp+var_8], 0 jmp loc_21B6A loc_21AD1: mov [rbp+var_24], 0 loc_21AD8: cmp [rbp+var_24], 1 jnb loc_21B62 mov rax, [rbp+var_18] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx cmp qword ptr [rax], 0 jz short loc_21B52 mov rax, [rbp+var_20] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx mov [rbp+var_40], rax mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rax, [rbp+var_18] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx mov rdx, [rax+8] call ma_const_string_copy_root mov rcx, rax mov rax, [rbp+var_40] mov [rbp+var_38], rcx mov [rbp+var_30], rdx mov rcx, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_30] mov [rax+8], rcx loc_21B52: jmp short $+2 loc_21B54: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_21AD8 loc_21B62: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_21B6A: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
_QWORD * ma_field_extension_deep_dup(long long a1, _QWORD *a2) { long long v2; // rdx int i; // [rsp+1Ch] [rbp-24h] _QWORD *v5; // [rsp+20h] [rbp-20h] v5 = (_QWORD *)new_ma_field_extension(a1); if ( !v5 ) return 0LL; for ( i = 0; !i; i = 1 ) { if ( *a2 ) { *v5 = ma_const_string_copy_root(a1, *a2, a2[1]); v5[1] = v2; } } return v5; }
ma_field_extension_deep_dup: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00121a60 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00121ad1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00121b6a LAB_00121ad1: MOV dword ptr [RBP + -0x24],0x0 LAB_00121ad8: CMP dword ptr [RBP + -0x24],0x1 JNC 0x00121b62 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX CMP qword ptr [RAX],0x0 JZ 0x00121b52 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV RDX,qword ptr [RAX + 0x8] CALL 0x00121b80 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RCX MOV qword ptr [RBP + -0x30],RDX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],RCX LAB_00121b52: JMP 0x00121b54 LAB_00121b54: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00121ad8 LAB_00121b62: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00121b6a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int1 (*) [16] ma_field_extension_deep_dup(int8 param_1,long *param_2) { bool bVar1; int1 auVar2 [16]; int1 (*local_10) [16]; local_10 = (int1 (*) [16])new_ma_field_extension(param_1); if (local_10 == (int1 (*) [16])0x0) { local_10 = (int1 (*) [16])0x0; } else { bVar1 = false; while (!bVar1) { if (*param_2 != 0) { auVar2 = ma_const_string_copy_root(param_1,*param_2,param_2[1]); *local_10 = auVar2; } bVar1 = true; } } return local_10; }
1,222
my_strnncollsp_padspace_bin
eloqsql/strings/ctype-bin.c
int my_strnncollsp_padspace_bin(const uchar *str, size_t length) { for ( ; length ; str++, length--) { if (*str < ' ') return -1; else if (*str > ' ') return 1; } return 0; }
O0
c
my_strnncollsp_padspace_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x701cb movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0x70198 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x701d2 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jle 0x701ad movl $0x1, -0x4(%rbp) jmp 0x701d2 jmp 0x701af jmp 0x701b1 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x7017c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_strnncollsp_padspace_bin: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_7017C: cmp [rbp+var_18], 0 jz short loc_701CB mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_70198 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_701D2 loc_70198: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jle short loc_701AD mov [rbp+var_4], 1 jmp short loc_701D2 loc_701AD: jmp short $+2 loc_701AF: jmp short $+2 loc_701B1: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_7017C loc_701CB: mov [rbp+var_4], 0 loc_701D2: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncollsp_padspace_bin(unsigned __int8 *a1, long long a2) { while ( a2 ) { if ( *a1 < 0x20u ) return (unsigned int)-1; if ( *a1 > 0x20u ) return 1; ++a1; --a2; } return 0; }
my_strnncollsp_padspace_bin: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_0017017c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001701cb MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x00170198 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001701d2 LAB_00170198: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JLE 0x001701ad MOV dword ptr [RBP + -0x4],0x1 JMP 0x001701d2 LAB_001701ad: JMP 0x001701af LAB_001701af: JMP 0x001701b1 LAB_001701b1: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0017017c LAB_001701cb: MOV dword ptr [RBP + -0x4],0x0 LAB_001701d2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_strnncollsp_padspace_bin(byte *param_1,long param_2) { long local_20; byte *local_18; local_20 = param_2; local_18 = param_1; while( true ) { if (local_20 == 0) { return 0; } if (*local_18 < 0x20) break; if (0x20 < *local_18) { return 1; } local_18 = local_18 + 1; local_20 = local_20 + -1; } return 0xffffffff; }
1,223
JS_ToInt32Clamp
bluesky950520[P]quickjs/quickjs.c
int JS_ToInt32Clamp(JSContext *ctx, int *pres, JSValue val, int min, int max, int min_offset) { int res = JS_ToInt32SatFree(ctx, pres, js_dup(val)); if (res == 0) { if (*pres < min) { *pres += min_offset; if (*pres < min) *pres = min; } else { if (*pres > max) *pres = max; } } return res; }
O2
c
JS_ToInt32Clamp: pushq %rbp pushq %r14 pushq %rbx movl %r9d, %ebp movl %r8d, %r14d movq %rsi, %rbx cmpl $-0x9, %ecx jb 0x24f99 incl (%rdx) movq %rbx, %rsi callq 0x24ef6 testl %eax, %eax jne 0x24fc1 movl (%rbx), %ecx cmpl %r14d, %ecx jge 0x24fbb addl 0x20(%rsp), %ecx cmpl %r14d, %ecx cmovlel %r14d, %ecx movl %ecx, %ebp jmp 0x24fbf cmpl %ebp, %ecx jle 0x24fc1 movl %ebp, (%rbx) popq %rbx popq %r14 popq %rbp retq
JS_ToInt32Clamp: push rbp push r14 push rbx mov ebp, r9d mov r14d, r8d mov rbx, rsi cmp ecx, 0FFFFFFF7h jb short loc_24F99 inc dword ptr [rdx] loc_24F99: mov rsi, rbx call JS_ToInt32SatFree test eax, eax jnz short loc_24FC1 mov ecx, [rbx] cmp ecx, r14d jge short loc_24FBB add ecx, [rsp+18h+arg_0] cmp ecx, r14d cmovle ecx, r14d mov ebp, ecx jmp short loc_24FBF loc_24FBB: cmp ecx, ebp jle short loc_24FC1 loc_24FBF: mov [rbx], ebp loc_24FC1: pop rbx pop r14 pop rbp retn
long long JS_ToInt32Clamp(long long a1, int *a2, _DWORD *a3, long long a4, int a5, int a6, int a7) { long long result; // rax int v10; // ecx int v11; // ecx if ( (unsigned int)a4 >= 0xFFFFFFF7 ) ++*a3; result = JS_ToInt32SatFree(a1, a2, (long long)a3, a4); if ( !(_DWORD)result ) { v10 = *a2; if ( *a2 >= a5 ) { if ( v10 <= a6 ) return result; } else { v11 = a7 + v10; if ( v11 <= a5 ) v11 = a5; a6 = v11; } *a2 = a6; } return result; }
JS_ToInt32Clamp: PUSH RBP PUSH R14 PUSH RBX MOV EBP,R9D MOV R14D,R8D MOV RBX,RSI CMP ECX,-0x9 JC 0x00124f99 INC dword ptr [RDX] LAB_00124f99: MOV RSI,RBX CALL 0x00124ef6 TEST EAX,EAX JNZ 0x00124fc1 MOV ECX,dword ptr [RBX] CMP ECX,R14D JGE 0x00124fbb ADD ECX,dword ptr [RSP + 0x20] CMP ECX,R14D CMOVLE ECX,R14D MOV EBP,ECX JMP 0x00124fbf LAB_00124fbb: CMP ECX,EBP JLE 0x00124fc1 LAB_00124fbf: MOV dword ptr [RBX],EBP LAB_00124fc1: POP RBX POP R14 POP RBP RET
void JS_ToInt32Clamp(int8 param_1,int *param_2,int *param_3,uint param_4,int param_5, int param_6,int param_7) { int iVar1; if (0xfffffff6 < param_4) { *param_3 = *param_3 + 1; } iVar1 = JS_ToInt32SatFree(param_1,param_2); if (iVar1 == 0) { iVar1 = *param_2; if (iVar1 < param_5) { param_6 = iVar1 + param_7; if (iVar1 + param_7 <= param_5) { param_6 = param_5; } } else if (iVar1 <= param_6) { return; } *param_2 = param_6; } return; }
1,224
JS_NumberIsInteger
bluesky950520[P]quickjs/quickjs.c
static int JS_NumberIsInteger(JSContext *ctx, JSValue val) { double d; if (!JS_IsNumber(val)) return FALSE; if (unlikely(JS_ToFloat64(ctx, &d, val))) return -1; return isfinite(d) && floor(d) == d; }
O2
c
JS_NumberIsInteger: pushq %rbx subq $0x10, %rsp movq %rdx, %rcx movq %rsi, %rdx xorl %ebx, %ebx cmpl $0x7, %ecx je 0x1f967 testl %ecx, %ecx jne 0x1f9ac leaq 0x8(%rsp), %rsi callq 0x20703 testl %eax, %eax jne 0x1f9b4 movq 0x8(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF cmpq %rcx, %rax jg 0x1f9ac movq %xmm0, (%rsp) callq 0xe850 cmpeqsd (%rsp), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx retq pushq $-0x1 popq %rbx jmp 0x1f9ac
JS_NumberIsInteger: push rbx sub rsp, 10h mov rcx, rdx mov rdx, rsi xor ebx, ebx cmp ecx, 7 jz short loc_1F967 test ecx, ecx jnz short loc_1F9AC loc_1F967: lea rsi, [rsp+18h+var_10] call JS_ToFloat64 test eax, eax jnz short loc_1F9B4 movq xmm0, [rsp+18h+var_10] movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FEFFFFFFFFFFFFFh cmp rax, rcx jg short loc_1F9AC movq [rsp+18h+var_18], xmm0 call _floor cmpeqsd xmm0, [rsp+18h+var_18] movq rbx, xmm0 and ebx, 1 loc_1F9AC: mov eax, ebx add rsp, 10h pop rbx retn loc_1F9B4: push 0FFFFFFFFFFFFFFFFh pop rbx jmp short loc_1F9AC
long long JS_NumberIsInteger(long long a1, long long a2, long long a3) { unsigned int v3; // ebx __m128d v4; // xmm0 __m128d v5; // rt1 double v7; // [rsp+0h] [rbp-18h] __m128i v8; // [rsp+8h] [rbp-10h] BYREF v3 = 0; if ( (_DWORD)a3 == 7 || !(_DWORD)a3 ) { if ( (unsigned int)JS_ToFloat64(a1, &v8, a2, a3) ) { return (unsigned int)-1; } else { v4 = (__m128d)_mm_loadl_epi64(&v8); if ( (*(_QWORD *)&v4.m128d_f64[0] & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL ) { v7 = v4.m128d_f64[0]; v4.m128d_f64[0] = floor(v4.m128d_f64[0]); v5.m128d_f64[0] = v7; return *(_OWORD *)&_mm_cmpeq_sd(v4, v5) & 1; } } } return v3; }
JS_NumberIsInteger: PUSH RBX SUB RSP,0x10 MOV RCX,RDX MOV RDX,RSI XOR EBX,EBX CMP ECX,0x7 JZ 0x0011f967 TEST ECX,ECX JNZ 0x0011f9ac LAB_0011f967: LEA RSI,[RSP + 0x8] CALL 0x00120703 TEST EAX,EAX JNZ 0x0011f9b4 MOVQ XMM0,qword ptr [RSP + 0x8] MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7fefffffffffffff CMP RAX,RCX JG 0x0011f9ac MOVQ qword ptr [RSP],XMM0 CALL 0x0010e850 CMPEQSD XMM0,qword ptr [RSP] MOVQ RBX,XMM0 AND EBX,0x1 LAB_0011f9ac: MOV EAX,EBX ADD RSP,0x10 POP RBX RET LAB_0011f9b4: PUSH -0x1 POP RBX JMP 0x0011f9ac
uint JS_NumberIsInteger(int8 param_1,int8 param_2,int param_3) { int iVar1; uint uVar2; double dVar3; double local_10; uVar2 = 0; if ((param_3 == 7) || (param_3 == 0)) { iVar1 = JS_ToFloat64(param_1,&local_10,param_2); if (iVar1 == 0) { if ((ulong)ABS(local_10) < 0x7ff0000000000000) { dVar3 = floor(local_10); uVar2 = -(uint)(dVar3 == local_10) & 1; } } else { uVar2 = 0xffffffff; } } return uVar2; }
1,225
JS_NumberIsInteger
bluesky950520[P]quickjs/quickjs.c
static int JS_NumberIsInteger(JSContext *ctx, JSValue val) { double d; if (!JS_IsNumber(val)) return FALSE; if (unlikely(JS_ToFloat64(ctx, &d, val))) return -1; return isfinite(d) && floor(d) == d; }
O3
c
JS_NumberIsInteger: pushq %rbx subq $0x10, %rsp movq %rdx, %rcx movq %rsi, %rdx xorl %ebx, %ebx cmpl $0x7, %ecx je 0xfb9c testl %ecx, %ecx jne 0xfbf8 cmpl $0x2, %ecx ja 0xfba7 cvtsi2sd %edx, %xmm0 jmp 0xfbc7 cmpl $0x7, %ecx jne 0xfbb3 movq %rdx, %xmm0 jmp 0xfbc7 leaq 0x8(%rsp), %rsi callq 0x3e93d testl %eax, %eax jne 0xfc00 movq 0x8(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF cmpq %rcx, %rax jg 0xfbf8 movq %xmm0, (%rsp) callq 0xe830 cmpeqsd (%rsp), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx retq pushq $-0x1 popq %rbx jmp 0xfbf8
JS_NumberIsInteger: push rbx sub rsp, 10h mov rcx, rdx mov rdx, rsi xor ebx, ebx cmp ecx, 7 jz short loc_FB9C test ecx, ecx jnz short loc_FBF8 loc_FB9C: cmp ecx, 2 ja short loc_FBA7 cvtsi2sd xmm0, edx jmp short loc_FBC7 loc_FBA7: cmp ecx, 7 jnz short loc_FBB3 movq xmm0, rdx jmp short loc_FBC7 loc_FBB3: lea rsi, [rsp+18h+var_10] call __JS_ToFloat64Free test eax, eax jnz short loc_FC00 movq xmm0, [rsp+18h+var_10] loc_FBC7: movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FEFFFFFFFFFFFFFh cmp rax, rcx jg short loc_FBF8 movq [rsp+18h+var_18], xmm0 call _floor cmpeqsd xmm0, [rsp+18h+var_18] movq rbx, xmm0 and ebx, 1 loc_FBF8: mov eax, ebx add rsp, 10h pop rbx retn loc_FC00: push 0FFFFFFFFFFFFFFFFh pop rbx jmp short loc_FBF8
long long JS_NumberIsInteger(__m128d a1, long long a2, unsigned long long a3, unsigned int a4) { unsigned int v4; // ebx __m128d v5; // rt1 double v7; // [rsp+0h] [rbp-18h] v4 = 0; if ( a4 == 7 || !a4 ) { if ( a4 > 2 ) a1 = (__m128d)a3; else a1.m128d_f64[0] = (double)(int)a3; if ( (*(_QWORD *)&a1.m128d_f64[0] & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL ) { v7 = a1.m128d_f64[0]; a1.m128d_f64[0] = floor(a1.m128d_f64[0]); v5.m128d_f64[0] = v7; return *(_OWORD *)&_mm_cmpeq_sd(a1, v5) & 1; } } return v4; }
JS_NumberIsInteger: PUSH RBX SUB RSP,0x10 MOV RCX,RDX MOV RDX,RSI XOR EBX,EBX CMP ECX,0x7 JZ 0x0010fb9c TEST ECX,ECX JNZ 0x0010fbf8 LAB_0010fb9c: CMP ECX,0x2 JA 0x0010fba7 CVTSI2SD XMM0,EDX JMP 0x0010fbc7 LAB_0010fba7: CMP ECX,0x7 JNZ 0x0010fbb3 MOVQ XMM0,RDX JMP 0x0010fbc7 LAB_0010fbb3: LEA RSI,[RSP + 0x8] CALL 0x0013e93d TEST EAX,EAX JNZ 0x0010fc00 MOVQ XMM0,qword ptr [RSP + 0x8] LAB_0010fbc7: MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7fefffffffffffff CMP RAX,RCX JG 0x0010fbf8 MOVQ qword ptr [RSP],XMM0 CALL 0x0010e830 CMPEQSD XMM0,qword ptr [RSP] MOVQ RBX,XMM0 AND EBX,0x1 LAB_0010fbf8: MOV EAX,EBX ADD RSP,0x10 POP RBX RET LAB_0010fc00: PUSH -0x1 POP RBX JMP 0x0010fbf8
uint JS_NumberIsInteger(int8 param_1,double param_2,uint param_3) { int iVar1; uint uVar2; double dVar3; double local_10; uVar2 = 0; if ((param_3 == 7) || (param_3 == 0)) { if (param_3 < 3) { param_2 = (double)SUB84(param_2,0); } else if ((param_3 != 7) && (iVar1 = __JS_ToFloat64Free(param_1,&local_10), param_2 = local_10, iVar1 != 0)) { return 0xffffffff; } if ((ulong)ABS(param_2) < 0x7ff0000000000000) { dVar3 = floor(param_2); uVar2 = -(uint)(dVar3 == param_2) & 1; } } return uVar2; }
1,226
my_is_symlink
eloqsql/mysys/my_symlink.c
int my_is_symlink(const char *filename __attribute__((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; if (lstat(filename, &stat_buff)) return 0; MSAN_STAT_WORKAROUND(&stat_buff); return !!S_ISLNK(stat_buff.st_mode); #elif defined (_WIN32) DWORD dwAttr = GetFileAttributes(filename); return (dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); #else /* No symlinks */ return 0; #endif }
O0
c
my_is_symlink: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x284d0 cmpl $0x0, %eax je 0x812ed movl $0x0, -0x4(%rbp) jmp 0x8130c movl -0x88(%rbp), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0xa000, %eax # imm = 0xA000 sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xa0, %rsp popq %rbp retq nopl (%rax,%rax)
my_is_symlink: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] lea rsi, [rbp+var_A0] call _lstat64 cmp eax, 0 jz short loc_812ED mov [rbp+var_4], 0 jmp short loc_8130C loc_812ED: mov eax, [rbp+var_88] and eax, 0F000h cmp eax, 0A000h setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_4], eax loc_8130C: mov eax, [rbp+var_4] add rsp, 0A0h pop rbp retn
_BOOL8 my_is_symlink(long long a1) { _BYTE v2[24]; // [rsp+0h] [rbp-A0h] BYREF int v3; // [rsp+18h] [rbp-88h] long long v4; // [rsp+90h] [rbp-10h] v4 = a1; return !(unsigned int)lstat64(a1, v2) && (v3 & 0xF000) == 40960; }
my_is_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0xa0] CALL 0x001284d0 CMP EAX,0x0 JZ 0x001812ed MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018130c LAB_001812ed: MOV EAX,dword ptr [RBP + -0x88] AND EAX,0xf000 CMP EAX,0xa000 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX LAB_0018130c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xa0 POP RBP RET
bool my_is_symlink(char *param_1) { int iVar1; stat64 local_a8; char *local_18; local_18 = param_1; iVar1 = lstat64(param_1,&local_a8); return iVar1 == 0 && (local_a8.st_mode & 0xf000) == 0xa000; }
1,227
testing::Test::Run()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void Test::Run() { if (!HasSameFixtureClass()) return; internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()"); // We will run the test only if SetUp() was successful and didn't call // GTEST_SKIP(). if (!HasFatalFailure() && !IsSkipped()) { impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::TestBody, "the test body"); } // However, we want to clean up as much as possible. Hence we will // always call TearDown(), even if SetUp() or the test body has // failed. impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::TearDown, "TearDown()"); }
O1
cpp
testing::Test::Run(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x20574 testb %al, %al je 0x20c51 callq 0x19012 movq 0x38c50(%rip), %r14 # 0x597b0 cmpq $0x0, 0x280(%r14) jne 0x20b85 movl $0x8, %edi callq 0x84b0 leaq 0x37ac5(%rip), %rcx # 0x58640 movq %rcx, (%rax) movq %rax, 0x280(%r14) movq 0x280(%r14), %rdi movq (%rdi), %rax callq *0x18(%rax) leaq 0x223d1(%rip), %rcx # 0x42f6a movl $0x11, %esi movq %rbx, %rdi xorl %edx, %edx callq 0x34423 callq 0x20c5a testb %al, %al jne 0x20c02 callq 0x20cc4 testb %al, %al jne 0x20c02 cmpq $0x0, 0x280(%r14) jne 0x20bdf movl $0x8, %edi callq 0x84b0 leaq 0x37a6b(%rip), %rcx # 0x58640 movq %rcx, (%rax) movq %rax, 0x280(%r14) movq 0x280(%r14), %rdi movq (%rdi), %rax callq *0x18(%rax) leaq 0x2237f(%rip), %rcx # 0x42f72 movl $0x21, %esi movq %rbx, %rdi xorl %edx, %edx callq 0x34423 cmpq $0x0, 0x280(%r14) jne 0x20c27 movl $0x8, %edi callq 0x84b0 leaq 0x37a23(%rip), %rcx # 0x58640 movq %rcx, (%rax) movq %rax, 0x280(%r14) movq 0x280(%r14), %rdi movq (%rdi), %rax callq *0x18(%rax) leaq 0x22345(%rip), %rcx # 0x42f80 movl $0x19, %esi movq %rbx, %rdi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x34423 addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN7testing4Test3RunEv: push r14 push rbx push rax mov rbx, rdi call _ZN7testing4Test19HasSameFixtureClassEv; testing::Test::HasSameFixtureClass(void) test al, al jz loc_20C51 call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov r14, cs:qword_597B0 cmp qword ptr [r14+280h], 0 jnz short loc_20B85 mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_58640 mov [rax], rcx mov [r14+280h], rax loc_20B85: mov rdi, [r14+280h] mov rax, [rdi] call qword ptr [rax+18h] lea rcx, aSetup; "SetUp()" mov esi, 11h mov rdi, rbx; this xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) call _ZN7testing4Test15HasFatalFailureEv; testing::Test::HasFatalFailure(void) test al, al jnz short loc_20C02 call _ZN7testing4Test9IsSkippedEv; testing::Test::IsSkipped(void) test al, al jnz short loc_20C02 cmp qword ptr [r14+280h], 0 jnz short loc_20BDF mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_58640 mov [rax], rcx mov [r14+280h], rax loc_20BDF: mov rdi, [r14+280h] mov rax, [rdi] call qword ptr [rax+18h] lea rcx, aTheTestBody; "the test body" mov esi, 21h ; '!' mov rdi, rbx xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) loc_20C02: cmp qword ptr [r14+280h], 0 jnz short loc_20C27 mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_58640 mov [rax], rcx mov [r14+280h], rax loc_20C27: mov rdi, [r14+280h] mov rax, [rdi] call qword ptr [rax+18h] lea rcx, aTeardown; "TearDown()" mov esi, 19h mov rdi, rbx xor edx, edx add rsp, 8 pop rbx pop r14 jmp _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) loc_20C51: add rsp, 8 pop rbx pop r14 retn
char testing::Test::Run(testing::Test *this) { char result; // al testing::internal::UnitTestImpl *v2; // r14 _QWORD *v3; // rax _QWORD *v4; // rax _QWORD *v5; // rax result = testing::Test::HasSameFixtureClass(this); if ( result ) { testing::UnitTest::GetInstance(this); v2 = qword_597B0; if ( !*((_QWORD *)qword_597B0 + 80) ) { v3 = (_QWORD *)operator new(8uLL); *v3 = off_58640; *((_QWORD *)v2 + 80) = v3; } (*(void ( **)(_QWORD))(**((_QWORD **)v2 + 80) + 24LL))(*((_QWORD *)v2 + 80)); testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(this, 17LL, 0LL, "SetUp()"); if ( !(unsigned __int8)testing::Test::HasFatalFailure(this) && !(unsigned __int8)testing::Test::IsSkipped(this) ) { if ( !*((_QWORD *)v2 + 80) ) { v4 = (_QWORD *)operator new(8uLL); *v4 = off_58640; *((_QWORD *)v2 + 80) = v4; } (*(void ( **)(_QWORD))(**((_QWORD **)v2 + 80) + 24LL))(*((_QWORD *)v2 + 80)); testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(this, 33LL, 0LL, "the test body"); } if ( !*((_QWORD *)v2 + 80) ) { v5 = (_QWORD *)operator new(8uLL); *v5 = off_58640; *((_QWORD *)v2 + 80) = v5; } (*(void ( **)(_QWORD))(**((_QWORD **)v2 + 80) + 24LL))(*((_QWORD *)v2 + 80)); return testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(this, 25LL, 0LL, "TearDown()"); } return result; }
Run: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00120574 TEST AL,AL JZ 0x00120c51 CALL 0x00119012 MOV R14,qword ptr [0x001597b0] CMP qword ptr [R14 + 0x280],0x0 JNZ 0x00120b85 MOV EDI,0x8 CALL 0x001084b0 LEA RCX,[0x158640] MOV qword ptr [RAX],RCX MOV qword ptr [R14 + 0x280],RAX LAB_00120b85: MOV RDI,qword ptr [R14 + 0x280] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LEA RCX,[0x142f6a] MOV ESI,0x11 MOV RDI,RBX XOR EDX,EDX CALL 0x00134423 CALL 0x00120c5a TEST AL,AL JNZ 0x00120c02 CALL 0x00120cc4 TEST AL,AL JNZ 0x00120c02 CMP qword ptr [R14 + 0x280],0x0 JNZ 0x00120bdf MOV EDI,0x8 CALL 0x001084b0 LEA RCX,[0x158640] MOV qword ptr [RAX],RCX MOV qword ptr [R14 + 0x280],RAX LAB_00120bdf: MOV RDI,qword ptr [R14 + 0x280] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LEA RCX,[0x142f72] MOV ESI,0x21 MOV RDI,RBX XOR EDX,EDX CALL 0x00134423 LAB_00120c02: CMP qword ptr [R14 + 0x280],0x0 JNZ 0x00120c27 MOV EDI,0x8 CALL 0x001084b0 LEA RCX,[0x158640] MOV qword ptr [RAX],RCX MOV qword ptr [R14 + 0x280],RAX LAB_00120c27: MOV RDI,qword ptr [R14 + 0x280] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LEA RCX,[0x142f80] MOV ESI,0x19 MOV RDI,RBX XOR EDX,EDX ADD RSP,0x8 POP RBX POP R14 JMP 0x00134423 LAB_00120c51: ADD RSP,0x8 POP RBX POP R14 RET
/* testing::Test::Run() */ void __thiscall testing::Test::Run(Test *this) { int8 uVar1; char cVar2; int8 *puVar3; cVar2 = HasSameFixtureClass(); if (cVar2 != '\0') { UnitTest::GetInstance(); uVar1 = UnitTest::GetInstance()::instance._64_8_; if (*(long *)(UnitTest::GetInstance()::instance._64_8_ + 0x280) == 0) { puVar3 = (int8 *)operator_new(8); *puVar3 = &PTR__OsStackTraceGetterInterface_00158640; *(int8 **)(uVar1 + 0x280) = puVar3; } (**(code **)(**(long **)(uVar1 + 0x280) + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this,(_func_void *)0x11,(char *)0x0); cVar2 = HasFatalFailure(); if (cVar2 == '\0') { cVar2 = IsSkipped(); if (cVar2 == '\0') { if (*(long *)(uVar1 + 0x280) == 0) { puVar3 = (int8 *)operator_new(8); *puVar3 = &PTR__OsStackTraceGetterInterface_00158640; *(int8 **)(uVar1 + 0x280) = puVar3; } (**(code **)(**(long **)(uVar1 + 0x280) + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this,(_func_void *)0x21,(char *)0x0); } } if (*(long *)(uVar1 + 0x280) == 0) { puVar3 = (int8 *)operator_new(8); *puVar3 = &PTR__OsStackTraceGetterInterface_00158640; *(int8 **)(uVar1 + 0x280) = puVar3; } (**(code **)(**(long **)(uVar1 + 0x280) + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this,(_func_void *)0x19,(char *)0x0); return; } return; }
1,228
multi_alloc_root
eloqsql/mysys/my_alloc.c
void *multi_alloc_root(MEM_ROOT *root, ...) { va_list args; char **ptr, *start, *res; size_t tot_length, length; DBUG_ENTER("multi_alloc_root"); /* We don't need to do DBUG_PRINT here as it will be done when alloc_root is called */ va_start(args, root); tot_length= 0; while ((ptr= va_arg(args, char **))) { length= va_arg(args, uint); tot_length+= ALIGN_SIZE(length); } va_end(args); if (!(start= (char*) alloc_root(root, tot_length))) DBUG_RETURN(0); /* purecov: inspected */ va_start(args, root); res= start; while ((ptr= va_arg(args, char **))) { *ptr= res; length= va_arg(args, uint); res+= ALIGN_SIZE(length); } va_end(args); DBUG_RETURN((void*) start); }
O0
c
multi_alloc_root: pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 testb %al, %al je 0x6a951 movaps %xmm0, -0xe0(%rbp) movaps %xmm1, -0xd0(%rbp) movaps %xmm2, -0xc0(%rbp) movaps %xmm3, -0xb0(%rbp) movaps %xmm4, -0xa0(%rbp) movaps %xmm5, -0x90(%rbp) movaps %xmm6, -0x80(%rbp) movaps %xmm7, -0x70(%rbp) movq %r9, -0xe8(%rbp) movq %r8, -0xf0(%rbp) movq %rcx, -0xf8(%rbp) movq %rdx, -0x100(%rbp) movq %rsi, -0x108(%rbp) movq %rdi, -0x10(%rbp) leaq -0x30(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x8, (%rax) movq $0x0, -0x50(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x120(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x114(%rbp) cmpl $0x28, %eax ja 0x6a9df movq -0x120(%rbp), %rcx movl -0x114(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x128(%rbp) jmp 0x6a9fc movq -0x120(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x128(%rbp) movq -0x128(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x6aa96 leaq -0x30(%rbp), %rax movq %rax, -0x138(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x12c(%rbp) cmpl $0x28, %eax ja 0x6aa4f movq -0x138(%rbp), %rcx movl -0x12c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x140(%rbp) jmp 0x6aa6c movq -0x138(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rax movl (%rax), %eax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x6a9a4 leaq -0x30(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x6a660 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x6aac0 jmp 0x6aab3 movq $0x0, -0x8(%rbp) jmp 0x6abf5 leaq -0x30(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x8, (%rax) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x150(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x144(%rbp) cmpl $0x28, %eax ja 0x6ab27 movq -0x150(%rbp), %rcx movl -0x144(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x158(%rbp) jmp 0x6ab44 movq -0x150(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x158(%rbp) movq -0x158(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x6abe9 movq -0x48(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) leaq -0x30(%rbp), %rax movq %rax, -0x168(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x15c(%rbp) cmpl $0x28, %eax ja 0x6aba2 movq -0x168(%rbp), %rcx movl -0x15c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x170(%rbp) jmp 0x6abbf movq -0x168(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x170(%rbp) movq -0x170(%rbp), %rax movl (%rax), %eax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x6aaec leaq -0x30(%rbp), %rax movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x170, %rsp # imm = 0x170 popq %rbp retq nopw %cs:(%rax,%rax)
multi_alloc_root: push rbp mov rbp, rsp sub rsp, 170h test al, al jz short loc_6A951 movaps [rbp+var_E0], xmm0 movaps [rbp+var_D0], xmm1 movaps [rbp+var_C0], xmm2 movaps [rbp+var_B0], xmm3 movaps [rbp+var_A0], xmm4 movaps [rbp+var_90], xmm5 movaps [rbp+var_80], xmm6 movaps [rbp+var_70], xmm7 loc_6A951: mov [rbp+var_E8], r9 mov [rbp+var_F0], r8 mov [rbp+var_F8], rcx mov [rbp+var_100], rdx mov [rbp+var_108], rsi mov [rbp+var_10], rdi lea rax, [rbp+var_30] lea rcx, [rbp+var_110] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 8 mov [rbp+var_50], 0 loc_6A9A4: lea rax, [rbp+var_30] mov [rbp+var_120], rax mov eax, [rbp+var_30] mov [rbp+var_114], eax cmp eax, 28h ; '(' ja short loc_6A9DF mov rcx, [rbp+var_120] mov edx, [rbp+var_114] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_128], rax jmp short loc_6A9FC loc_6A9DF: mov rcx, [rbp+var_120] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_128], rax loc_6A9FC: mov rax, [rbp+var_128] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_6AA96 lea rax, [rbp+var_30] mov [rbp+var_138], rax mov eax, [rbp+var_30] mov [rbp+var_12C], eax cmp eax, 28h ; '(' ja short loc_6AA4F mov rcx, [rbp+var_138] mov edx, [rbp+var_12C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_140], rax jmp short loc_6AA6C loc_6AA4F: mov rcx, [rbp+var_138] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_140], rax loc_6AA6C: mov rax, [rbp+var_140] mov eax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, [rbp+var_50] mov [rbp+var_50], rax jmp loc_6A9A4 loc_6AA96: lea rax, [rbp+var_30] mov rdi, [rbp+var_10] mov rsi, [rbp+var_50] call alloc_root mov [rbp+var_40], rax cmp rax, 0 jnz short loc_6AAC0 jmp short $+2 loc_6AAB3: mov [rbp+var_8], 0 jmp loc_6ABF5 loc_6AAC0: lea rax, [rbp+var_30] lea rcx, [rbp+var_110] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 8 mov rax, [rbp+var_40] mov [rbp+var_48], rax loc_6AAEC: lea rax, [rbp+var_30] mov [rbp+var_150], rax mov eax, [rbp+var_30] mov [rbp+var_144], eax cmp eax, 28h ; '(' ja short loc_6AB27 mov rcx, [rbp+var_150] mov edx, [rbp+var_144] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_158], rax jmp short loc_6AB44 loc_6AB27: mov rcx, [rbp+var_150] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_158], rax loc_6AB44: mov rax, [rbp+var_158] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_6ABE9 mov rcx, [rbp+var_48] mov rax, [rbp+var_38] mov [rax], rcx lea rax, [rbp+var_30] mov [rbp+var_168], rax mov eax, [rbp+var_30] mov [rbp+var_15C], eax cmp eax, 28h ; '(' ja short loc_6ABA2 mov rcx, [rbp+var_168] mov edx, [rbp+var_15C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_170], rax jmp short loc_6ABBF loc_6ABA2: mov rcx, [rbp+var_168] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_170], rax loc_6ABBF: mov rax, [rbp+var_170] mov eax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, [rbp+var_48] mov [rbp+var_48], rax jmp loc_6AAEC loc_6ABE9: lea rax, [rbp+var_30] mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_6ABF5: mov rax, [rbp+var_8] add rsp, 170h pop rbp retn
char * multi_alloc_root( _QWORD **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) { char *v15; // rax char *v16; // rax char *v17; // rax char *v18; // rax char v20; // [rsp+60h] [rbp-110h] BYREF long long v21; // [rsp+68h] [rbp-108h] long long v22; // [rsp+70h] [rbp-100h] long long v23; // [rsp+78h] [rbp-F8h] long long v24; // [rsp+80h] [rbp-F0h] long long v25; // [rsp+88h] [rbp-E8h] __m128 v26; // [rsp+90h] [rbp-E0h] __m128 v27; // [rsp+A0h] [rbp-D0h] __m128 v28; // [rsp+B0h] [rbp-C0h] __m128 v29; // [rsp+C0h] [rbp-B0h] __m128 v30; // [rsp+D0h] [rbp-A0h] __m128 v31; // [rsp+E0h] [rbp-90h] __m128 v32; // [rsp+F0h] [rbp-80h] __m128 v33; // [rsp+100h] [rbp-70h] long long v34; // [rsp+118h] [rbp-58h] long long i; // [rsp+120h] [rbp-50h] char *j; // [rsp+128h] [rbp-48h] char *v37; // [rsp+130h] [rbp-40h] char **v38; // [rsp+138h] [rbp-38h] int v39; // [rsp+140h] [rbp-30h] int v40; // [rsp+144h] [rbp-2Ch] char *v41; // [rsp+148h] [rbp-28h] char *v42; // [rsp+150h] [rbp-20h] _QWORD **v43; // [rsp+160h] [rbp-10h] v26 = a7; v27 = a8; v28 = a9; v29 = a10; v30 = a11; v31 = a12; v32 = a13; v33 = a14; v25 = a6; v24 = a5; v23 = a4; v22 = a3; v21 = a2; v43 = a1; v42 = &v20; v41 = &a15; v40 = 48; v39 = 8; for ( i = 0LL; ; i += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL ) { if ( (unsigned int)v39 > 0x28 ) { v15 = v41; v41 += 8; } else { v15 = &v42[v39]; v39 += 8; } v38 = *(char ***)v15; if ( !v38 ) break; if ( (unsigned int)v39 > 0x28 ) { v16 = v41; v41 += 8; } else { v16 = &v42[v39]; v39 += 8; } v34 = *(unsigned int *)v16; } v37 = alloc_root(v43, i); if ( !v37 ) return 0LL; v42 = &v20; v41 = &a15; v40 = 48; v39 = 8; for ( j = v37; ; j += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL ) { if ( (unsigned int)v39 > 0x28 ) { v17 = v41; v41 += 8; } else { v17 = &v42[v39]; v39 += 8; } v38 = *(char ***)v17; if ( !v38 ) break; *v38 = j; if ( (unsigned int)v39 > 0x28 ) { v18 = v41; v41 += 8; } else { v18 = &v42[v39]; v39 += 8; } v34 = *(unsigned int *)v18; } return v37; }
multi_alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x170 TEST AL,AL JZ 0x0016a951 MOVAPS xmmword ptr [RBP + -0xe0],XMM0 MOVAPS xmmword ptr [RBP + -0xd0],XMM1 MOVAPS xmmword ptr [RBP + -0xc0],XMM2 MOVAPS xmmword ptr [RBP + -0xb0],XMM3 MOVAPS xmmword ptr [RBP + -0xa0],XMM4 MOVAPS xmmword ptr [RBP + -0x90],XMM5 MOVAPS xmmword ptr [RBP + -0x80],XMM6 MOVAPS xmmword ptr [RBP + -0x70],XMM7 LAB_0016a951: MOV qword ptr [RBP + -0xe8],R9 MOV qword ptr [RBP + -0xf0],R8 MOV qword ptr [RBP + -0xf8],RCX MOV qword ptr [RBP + -0x100],RDX MOV qword ptr [RBP + -0x108],RSI MOV qword ptr [RBP + -0x10],RDI LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0x110] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x8 MOV qword ptr [RBP + -0x50],0x0 LAB_0016a9a4: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x114],EAX CMP EAX,0x28 JA 0x0016a9df MOV RCX,qword ptr [RBP + -0x120] MOV EDX,dword ptr [RBP + -0x114] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x128],RAX JMP 0x0016a9fc LAB_0016a9df: MOV RCX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x128],RAX LAB_0016a9fc: MOV RAX,qword ptr [RBP + -0x128] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x0016aa96 LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x138],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x28 JA 0x0016aa4f MOV RCX,qword ptr [RBP + -0x138] MOV EDX,dword ptr [RBP + -0x12c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x140],RAX JMP 0x0016aa6c LAB_0016aa4f: MOV RCX,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x140],RAX LAB_0016aa6c: MOV RAX,qword ptr [RBP + -0x140] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX JMP 0x0016a9a4 LAB_0016aa96: LEA RAX,[RBP + -0x30] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x50] CALL 0x0016a660 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x0016aac0 JMP 0x0016aab3 LAB_0016aab3: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0016abf5 LAB_0016aac0: LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0x110] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x8 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX LAB_0016aaec: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x150],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x144],EAX CMP EAX,0x28 JA 0x0016ab27 MOV RCX,qword ptr [RBP + -0x150] MOV EDX,dword ptr [RBP + -0x144] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x158],RAX JMP 0x0016ab44 LAB_0016ab27: MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x158],RAX LAB_0016ab44: MOV RAX,qword ptr [RBP + -0x158] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x0016abe9 MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x168],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x15c],EAX CMP EAX,0x28 JA 0x0016aba2 MOV RCX,qword ptr [RBP + -0x168] MOV EDX,dword ptr [RBP + -0x15c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x170],RAX JMP 0x0016abbf LAB_0016aba2: MOV RCX,qword ptr [RBP + -0x168] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x170],RAX LAB_0016abbf: MOV RAX,qword ptr [RBP + -0x170] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x0016aaec LAB_0016abe9: LEA RAX,[RBP + -0x30] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_0016abf5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x170 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ long multi_alloc_root(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; uint *local_178; uint *local_160; uint *local_148; uint *local_130; uint local_118 [2]; int8 local_110; int8 local_108; int8 local_100; int8 local_f8; int8 local_f0; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; ulong local_60; long local_58; long local_50; long local_40; uint local_38; int4 local_34; uint *local_30; uint *local_28; int8 local_18; long local_10; if (in_AL != '\0') { local_e8 = param_1; local_d8 = param_2; local_c8 = param_3; local_b8 = param_4; local_a8 = param_5; local_98 = param_6; local_88 = param_7; local_78 = param_8; } local_28 = local_118; local_30 = (uint *)&stack0x00000008; local_34 = 0x30; local_38 = 8; local_58 = 0; while( true ) { if (local_38 < 0x29) { local_130 = (uint *)((long)local_28 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_130 = local_30; local_30 = local_30 + 2; } local_40 = *(long *)local_130; if (local_40 == 0) break; if (local_38 < 0x29) { local_148 = (uint *)((long)local_28 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_148 = local_30; local_30 = local_30 + 2; } local_60 = (ulong)*local_148; local_58 = (local_60 + 7 & 0xfffffffffffffff8) + local_58; } local_110 = param_10; local_108 = param_11; local_100 = param_12; local_f8 = param_13; local_f0 = param_14; local_18 = param_9; local_10 = alloc_root(param_9,local_58); if (local_10 == 0) { local_10 = 0; } else { local_30 = (uint *)&stack0x00000008; local_38 = 8; local_50 = local_10; while( true ) { if (local_38 < 0x29) { local_160 = (uint *)((long)local_118 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_160 = local_30; local_30 = local_30 + 2; } if (*(long **)local_160 == (long *)0x0) break; **(long **)local_160 = local_50; if (local_38 < 0x29) { local_178 = (uint *)((long)local_118 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_178 = local_30; local_30 = local_30 + 2; } local_50 = ((ulong)*local_178 + 7 & 0xfffffffffffffff8) + local_50; } } return local_10; }
1,229
my_uca_init_one_contraction
eloqsql/strings/ctype-uca.c
static uint16 * my_uca_init_one_contraction(MY_CONTRACTIONS *contractions, my_wc_t *str, uint length, my_bool with_context) { int flag; uint i; my_uca_add_contraction_flag(contractions, str[0], with_context ? MY_UCA_PREVIOUS_CONTEXT_HEAD : MY_UCA_CNT_HEAD); for (i= 1, flag= MY_UCA_CNT_MID1; i < length - 1; i++, flag<<= 1) my_uca_add_contraction_flag(contractions, str[i], flag); my_uca_add_contraction_flag(contractions, str[i], with_context ? MY_UCA_PREVIOUS_CONTEXT_TAIL : MY_UCA_CNT_TAIL); /* Add new contraction to the contraction list */ return my_uca_add_contraction(contractions, str, length, with_context)->weight; }
O3
c
my_uca_init_one_contraction: pushq %rbp movq %rsp, %rbp movq (%rsi), %rax andl $0xfff, %eax # imm = 0xFFF testb %cl, %cl movl $0x1, %r8d movl $0x40, %r9d cmovel %r8d, %r9d movq 0x10(%rdi), %r8 orb %r9b, (%r8,%rax) leal -0x1(%rdx), %r8d movl $0x1, %eax cmpl $0x2, %r8d jb 0x3f627 movl %r8d, %eax movb $0x4, %r8b movl $0x1, %r9d movq (%rsi,%r9,8), %r10 movq 0x10(%rdi), %r11 andl $0xfff, %r10d # imm = 0xFFF orb %r8b, (%r11,%r10) incq %r9 addb %r8b, %r8b cmpq %r9, %rax jne 0x3f609 movq (%rsi,%rax,8), %rax andl $0xfff, %eax # imm = 0xFFF testb %cl, %cl movl $0x2, %r8d movl $0x80, %r9d cmovel %r8d, %r9d movq 0x10(%rdi), %r8 orb %r9b, (%r8,%rax) imulq $0x58, (%rdi), %rax movl %edx, %r8d addq 0x8(%rdi), %rax testl %edx, %edx je 0x3f671 xorl %r9d, %r9d movq (%rsi,%r9,8), %r10 movq %r10, (%rax,%r9,8) incq %r9 cmpq %r9, %r8 jne 0x3f65c cmpl $0x5, %edx ja 0x3f679 movq $0x0, (%rax,%r8,8) movb %cl, 0x52(%rax) incq (%rdi) addq $0x30, %rax popq %rbp retq
my_uca_init_one_contraction: push rbp mov rbp, rsp mov rax, [rsi] and eax, 0FFFh test cl, cl mov r8d, 1 mov r9d, 40h ; '@' cmovz r9d, r8d mov r8, [rdi+10h] or [r8+rax], r9b lea r8d, [rdx-1] mov eax, 1 cmp r8d, 2 jb short loc_3F627 mov eax, r8d mov r8b, 4 mov r9d, 1 loc_3F609: mov r10, [rsi+r9*8] mov r11, [rdi+10h] and r10d, 0FFFh or [r11+r10], r8b inc r9 add r8b, r8b cmp rax, r9 jnz short loc_3F609 loc_3F627: mov rax, [rsi+rax*8] and eax, 0FFFh test cl, cl mov r8d, 2 mov r9d, 80h cmovz r9d, r8d mov r8, [rdi+10h] or [r8+rax], r9b imul rax, [rdi], 58h ; 'X' mov r8d, edx add rax, [rdi+8] test edx, edx jz short loc_3F671 xor r9d, r9d loc_3F65C: mov r10, [rsi+r9*8] mov [rax+r9*8], r10 inc r9 cmp r8, r9 jnz short loc_3F65C cmp edx, 5 ja short loc_3F679 loc_3F671: mov qword ptr [rax+r8*8], 0 loc_3F679: mov [rax+52h], cl inc qword ptr [rdi] add rax, 30h ; '0' pop rbp retn
long long my_uca_init_one_contraction(_QWORD *a1, _QWORD *a2, unsigned int a3, char a4) { char v4; // r9 long long v5; // rax char v6; // r8 long long v7; // r9 long long v8; // rax char v9; // r9 long long v10; // rax long long i; // r9 v4 = 64; if ( !a4 ) v4 = 1; *(_BYTE *)(a1[2] + (*a2 & 0xFFFLL)) |= v4; v5 = 1LL; if ( a3 - 1 >= 2 ) { v5 = a3 - 1; v6 = 4; v7 = 1LL; do { *(_BYTE *)(a1[2] + (a2[v7++] & 0xFFFLL)) |= v6; v6 *= 2; } while ( v5 != v7 ); } v8 = a2[v5] & 0xFFFLL; v9 = 0x80; if ( !a4 ) v9 = 2; *(_BYTE *)(a1[2] + v8) |= v9; v10 = a1[1] + 88LL * *a1; if ( !a3 ) goto LABEL_12; for ( i = 0LL; i != a3; ++i ) *(_QWORD *)(v10 + 8 * i) = a2[i]; if ( a3 <= 5 ) LABEL_12: *(_QWORD *)(v10 + 8LL * a3) = 0LL; *(_BYTE *)(v10 + 82) = a4; ++*a1; return v10 + 48; }
my_uca_init_one_contraction: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI] AND EAX,0xfff TEST CL,CL MOV R8D,0x1 MOV R9D,0x40 CMOVZ R9D,R8D MOV R8,qword ptr [RDI + 0x10] OR byte ptr [R8 + RAX*0x1],R9B LEA R8D,[RDX + -0x1] MOV EAX,0x1 CMP R8D,0x2 JC 0x0013f627 MOV EAX,R8D MOV R8B,0x4 MOV R9D,0x1 LAB_0013f609: MOV R10,qword ptr [RSI + R9*0x8] MOV R11,qword ptr [RDI + 0x10] AND R10D,0xfff OR byte ptr [R11 + R10*0x1],R8B INC R9 ADD R8B,R8B CMP RAX,R9 JNZ 0x0013f609 LAB_0013f627: MOV RAX,qword ptr [RSI + RAX*0x8] AND EAX,0xfff TEST CL,CL MOV R8D,0x2 MOV R9D,0x80 CMOVZ R9D,R8D MOV R8,qword ptr [RDI + 0x10] OR byte ptr [R8 + RAX*0x1],R9B IMUL RAX,qword ptr [RDI],0x58 MOV R8D,EDX ADD RAX,qword ptr [RDI + 0x8] TEST EDX,EDX JZ 0x0013f671 XOR R9D,R9D LAB_0013f65c: MOV R10,qword ptr [RSI + R9*0x8] MOV qword ptr [RAX + R9*0x8],R10 INC R9 CMP R8,R9 JNZ 0x0013f65c CMP EDX,0x5 JA 0x0013f679 LAB_0013f671: MOV qword ptr [RAX + R8*0x8],0x0 LAB_0013f679: MOV byte ptr [RAX + 0x52],CL INC qword ptr [RDI] ADD RAX,0x30 POP RBP RET
long my_uca_init_one_contraction(long *param_1,int8 *param_2,uint param_3,char param_4) { byte *pbVar1; ulong uVar2; long lVar3; byte bVar4; ulong uVar5; bVar4 = 0x40; if (param_4 == '\0') { bVar4 = 1; } pbVar1 = (byte *)(param_1[2] + (ulong)((uint)*param_2 & 0xfff)); *pbVar1 = *pbVar1 | bVar4; uVar2 = 1; if (1 < param_3 - 1) { uVar2 = (ulong)(param_3 - 1); bVar4 = 4; uVar5 = 1; do { pbVar1 = (byte *)(param_1[2] + (ulong)((uint)param_2[uVar5] & 0xfff)); *pbVar1 = *pbVar1 | bVar4; uVar5 = uVar5 + 1; bVar4 = bVar4 * '\x02'; } while (uVar2 != uVar5); } bVar4 = 0x80; if (param_4 == '\0') { bVar4 = 2; } pbVar1 = (byte *)(param_1[2] + (ulong)((uint)param_2[uVar2] & 0xfff)); *pbVar1 = *pbVar1 | bVar4; lVar3 = *param_1 * 0x58 + param_1[1]; if (param_3 != 0) { uVar2 = 0; do { *(int8 *)(lVar3 + uVar2 * 8) = param_2[uVar2]; uVar2 = uVar2 + 1; } while (param_3 != uVar2); if (5 < param_3) goto LAB_0013f679; } *(int8 *)(lVar3 + (ulong)param_3 * 8) = 0; LAB_0013f679: *(char *)(lVar3 + 0x52) = param_4; *param_1 = *param_1 + 1; return lVar3 + 0x30; }
1,230
Lex_input_stream::get_body_utf8_maximum_length(THD*)
eloqsql/sql/sql_lex.cc
size_t Lex_input_stream::get_body_utf8_maximum_length(THD *thd) { /* String literals can grow during escaping: 1a. Character string '<TAB>' can grow to '\t', 3 bytes to 4 bytes growth. 1b. Character string '1000 times <TAB>' grows from 1002 to 2002 bytes (including quotes), which gives a little bit less than 2 times growth. "2" should be a reasonable multiplier that safely covers escaping needs. */ return (m_buf_length / thd->variables.character_set_client->mbminlen) * my_charset_utf8mb3_bin.mbmaxlen * 2/*for escaping*/; }
O0
cpp
Lex_input_stream::get_body_utf8_maximum_length(THD*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x48(%rax), %rax movq -0x10(%rbp), %rcx movq 0xb50(%rcx), %rcx movl 0x98(%rcx), %ecx xorl %edx, %edx divq %rcx leaq 0x14016bf(%rip), %rcx # 0x1cc16a0 movl 0x9c(%rcx), %ecx imulq %rcx, %rax shlq %rax popq %rbp retq
_ZN16Lex_input_stream28get_body_utf8_maximum_lengthEP3THD: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+48h] mov rcx, [rbp+var_10] mov rcx, [rcx+0B50h] mov ecx, [rcx+98h] xor edx, edx div rcx lea rcx, my_charset_utf8mb3_bin mov ecx, [rcx+9Ch] imul rax, rcx shl rax, 1 pop rbp retn
unsigned long long Lex_input_stream::get_body_utf8_maximum_length(Lex_input_stream *this, THD *a2) { return 2 * *((unsigned int *)&my_charset_utf8mb3_bin + 39) * (*((_QWORD *)this + 9) / (unsigned long long)*(unsigned int *)(*((_QWORD *)a2 + 362) + 152LL)); }
__cxx_global_var_init.6: PUSH RBP MOV RBP,RSP LEA RDI,[0x26969b0] MOV ESI,0x1000000 CALL 0x008db900 POP RBP RET
void __cxx_global_var_init_6(void) { date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZERO_DATE,0x1000000); return; }
1,231
js_mallocz
bluesky950520[P]quickjs/quickjs.c
void *js_mallocz(JSContext *ctx, size_t size) { void *ptr; ptr = js_mallocz_rt(ctx->rt, size); if (unlikely(!ptr)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ptr; }
O0
c
js_mallocz: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rax movq 0x18(%rax), %rdi movq 0x20(%rsp), %rsi callq 0x208a0 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x20ad1 movq 0x28(%rsp), %rdi callq 0x20950 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq $0x0, 0x30(%rsp) jmp 0x20adb movq 0x18(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
js_mallocz: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, [rsp+38h+var_10] mov rdi, [rax+18h] mov rsi, [rsp+38h+var_18] call js_mallocz_rt mov [rsp+38h+var_20], rax cmp [rsp+38h+var_20], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_20AD1 mov rdi, [rsp+38h+var_10] call JS_ThrowOutOfMemory mov [rsp+38h+var_30], rax mov [rsp+38h+var_28], rdx mov [rsp+38h+var_8], 0 jmp short loc_20ADB loc_20AD1: mov rax, [rsp+38h+var_20] mov [rsp+38h+var_8], rax loc_20ADB: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long js_mallocz(long long a1, unsigned long long a2) { int v2; // edx long long v3; // rcx int v4; // r8d int v5; // r9d long long v7; // [rsp+18h] [rbp-20h] v7 = js_mallocz_rt(*(_QWORD *)(a1 + 24), a2); if ( v7 ) return v7; JS_ThrowOutOfMemory(a1, a2, v2, v3, v4, v5); return 0LL; }
js_mallocz: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001208a0 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00120ad1 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00120950 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x30],0x0 JMP 0x00120adb LAB_00120ad1: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x30],RAX LAB_00120adb: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long js_mallocz(long param_1,int8 param_2) { long local_8; local_8 = js_mallocz_rt(*(int8 *)(param_1 + 0x18),param_2); if (local_8 == 0) { JS_ThrowOutOfMemory(param_1); local_8 = 0; } return local_8; }
1,232
js_mallocz
bluesky950520[P]quickjs/quickjs.c
void *js_mallocz(JSContext *ctx, size_t size) { void *ptr; ptr = js_mallocz_rt(ctx->rt, size); if (unlikely(!ptr)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ptr; }
O1
c
js_mallocz: pushq %rbx movq %rsi, %rdx movq %rdi, %rbx movq 0x18(%rdi), %rdi pushq $0x1 popq %rsi callq 0xec78 testq %rax, %rax je 0xed97 popq %rbx retq movq %rbx, %rdi callq 0x1bf4f xorl %eax, %eax jmp 0xed95
js_mallocz: push rbx mov rdx, rsi mov rbx, rdi mov rdi, [rdi+18h] push 1 pop rsi call js_calloc_rt test rax, rax jz short loc_ED97 loc_ED95: pop rbx retn loc_ED97: mov rdi, rbx call JS_ThrowOutOfMemory xor eax, eax jmp short loc_ED95
long long js_mallocz(long long a1, unsigned long long a2) { long long result; // rax result = js_calloc_rt(*(_QWORD *)(a1 + 24), 1uLL, a2); if ( !result ) { JS_ThrowOutOfMemory(a1); return 0LL; } return result; }
js_mallocz: PUSH RBX MOV RDX,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] PUSH 0x1 POP RSI CALL 0x0010ec78 TEST RAX,RAX JZ 0x0010ed97 LAB_0010ed95: POP RBX RET LAB_0010ed97: MOV RDI,RBX CALL 0x0011bf4f XOR EAX,EAX JMP 0x0010ed95
long js_mallocz(long param_1,int8 param_2) { long lVar1; lVar1 = js_calloc_rt(*(int8 *)(param_1 + 0x18),1,param_2); if (lVar1 == 0) { JS_ThrowOutOfMemory(param_1); lVar1 = 0; } return lVar1; }
1,233
ps_fetch_datetime
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_datetime(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row) { MYSQL_TIME *t= (MYSQL_TIME *)r_param->buffer; unsigned int len= net_field_length(row); switch (r_param->buffer_type) { case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: convert_to_datetime(t, row, len, field->type); break; case MYSQL_TYPE_DATE: convert_to_datetime(t, row, len, field->type); break; case MYSQL_TYPE_TIME: convert_to_datetime(t, row, len, field->type); t->year= t->day= t->month= 0; break; case MYSQL_TYPE_YEAR: { MYSQL_TIME tm; convert_to_datetime(&tm, row, len, field->type); shortstore(r_param->buffer, tm.year); break; } default: { char dtbuffer[60]; MYSQL_TIME tm; size_t length; convert_to_datetime(&tm, row, len, field->type); switch(field->type) { case MYSQL_TYPE_DATE: length= sprintf(dtbuffer, "%04u-%02u-%02u", tm.year, tm.month, tm.day); break; case MYSQL_TYPE_TIME: length= sprintf(dtbuffer, "%s%02u:%02u:%02u", (tm.neg ? "-" : ""), tm.hour, tm.minute, tm.second); if (field->decimals && field->decimals <= 6) { char ms[8]; sprintf(ms, ".%06lu", tm.second_part); if (field->decimals < 6) ms[field->decimals + 1]= 0; length+= strlen(ms); strcat(dtbuffer, ms); } break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: length= sprintf(dtbuffer, "%04u-%02u-%02u %02u:%02u:%02u", tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); if (field->decimals && field->decimals <= 6) { char ms[8]; sprintf(ms, ".%06lu", tm.second_part); if (field->decimals < 6) ms[field->decimals + 1]= 0; length+= strlen(ms); strcat(dtbuffer, ms); } break; default: dtbuffer[0]= 0; length= 0; break; } convert_froma_string(r_param, dtbuffer, length); break; } } (*row) += len; }
O0
c
ps_fetch_datetime: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movq %rdx, -0x78(%rbp) movq -0x68(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rdi callq 0x1c9d0 movl %eax, -0x84(%rbp) movq -0x68(%rbp), %rax movl 0x60(%rax), %eax addl $-0x7, %eax movl %eax, %ecx movq %rcx, -0xf0(%rbp) subl $0x6, %eax ja 0x359c5 movq -0xf0(%rbp), %rax leaq 0x20ab7(%rip), %rcx # 0x563a0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x80(%rbp), %rdi movq -0x78(%rbp), %rsi movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movl 0x70(%rax), %ecx callq 0x37e40 jmp 0x35bdf movq -0x80(%rbp), %rdi movq -0x78(%rbp), %rsi movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movl 0x70(%rax), %ecx callq 0x37e40 jmp 0x35bdf movq -0x80(%rbp), %rdi movq -0x78(%rbp), %rsi movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movl 0x70(%rax), %ecx callq 0x37e40 movq -0x80(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x80(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x80(%rbp), %rax movl $0x0, (%rax) jmp 0x35bdf movq -0x78(%rbp), %rsi movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movl 0x70(%rax), %ecx leaq -0xb0(%rbp), %rdi callq 0x37e40 movl -0xb0(%rbp), %eax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax movb %al, %cl movq -0x68(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movl -0xb4(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x68(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x1(%rax) jmp 0x35bdf movq -0x78(%rbp), %rsi movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movl 0x70(%rax), %ecx leaq -0xe0(%rbp), %rdi callq 0x37e40 movq -0x70(%rbp), %rax movl 0x70(%rax), %eax addl $-0x7, %eax movl %eax, %ecx movq %rcx, -0xf8(%rbp) subl $0x5, %eax ja 0x35bbc movq -0xf8(%rbp), %rax leaq 0x209b0(%rip), %rcx # 0x563bc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq -0x50(%rbp), %rdi movl -0xe0(%rbp), %edx movl -0xdc(%rbp), %ecx movl -0xd8(%rbp), %r8d leaq 0x1daac(%rip), %rsi # 0x534df movb $0x0, %al callq 0x130f0 cltq movq %rax, -0xe8(%rbp) jmp 0x35bcb leaq -0x50(%rbp), %rdi movsbl -0xc0(%rbp), %ecx leaq 0x1c7fe(%rip), %rdx # 0x52258 leaq 0x1bbe6(%rip), %rax # 0x51647 cmpl $0x0, %ecx cmovneq %rax, %rdx movl -0xd4(%rbp), %ecx movl -0xd0(%rbp), %r8d movl -0xcc(%rbp), %r9d leaq 0x1da6b(%rip), %rsi # 0x534ee movb $0x0, %al callq 0x130f0 cltq movq %rax, -0xe8(%rbp) movq -0x70(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x35aff movq -0x70(%rbp), %rax cmpl $0x6, 0x68(%rax) ja 0x35aff leaq -0x58(%rbp), %rdi movq -0xc8(%rbp), %rdx leaq 0x1da46(%rip), %rsi # 0x534ff movb $0x0, %al callq 0x130f0 movq -0x70(%rbp), %rax cmpl $0x6, 0x68(%rax) jae 0x35adb movq -0x70(%rbp), %rax movl 0x68(%rax), %eax addl $0x1, %eax movl %eax, %eax movb $0x0, -0x58(%rbp,%rax) leaq -0x58(%rbp), %rdi callq 0x131a0 addq -0xe8(%rbp), %rax movq %rax, -0xe8(%rbp) leaq -0x50(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x13790 jmp 0x35bcb leaq -0x50(%rbp), %rdi movl -0xe0(%rbp), %edx movl -0xdc(%rbp), %ecx movl -0xd8(%rbp), %r8d movl -0xd4(%rbp), %r9d movl -0xd0(%rbp), %r10d movl -0xcc(%rbp), %eax leaq 0x1d9d0(%rip), %rsi # 0x53506 movl %r10d, (%rsp) movl %eax, 0x8(%rsp) movb $0x0, %al callq 0x130f0 cltq movq %rax, -0xe8(%rbp) movq -0x70(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x35bba movq -0x70(%rbp), %rax cmpl $0x6, 0x68(%rax) ja 0x35bba leaq -0x60(%rbp), %rdi movq -0xc8(%rbp), %rdx leaq 0x1d98b(%rip), %rsi # 0x534ff movb $0x0, %al callq 0x130f0 movq -0x70(%rbp), %rax cmpl $0x6, 0x68(%rax) jae 0x35b96 movq -0x70(%rbp), %rax movl 0x68(%rax), %eax addl $0x1, %eax movl %eax, %eax movb $0x0, -0x60(%rbp,%rax) leaq -0x60(%rbp), %rdi callq 0x131a0 addq -0xe8(%rbp), %rax movq %rax, -0xe8(%rbp) leaq -0x50(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x13790 jmp 0x35bcb movb $0x0, -0x50(%rbp) movq $0x0, -0xe8(%rbp) movq -0x68(%rbp), %rdi leaq -0x50(%rbp), %rsi movq -0xe8(%rbp), %rdx callq 0x365d0 movl -0x84(%rbp), %eax movl %eax, %edx movq -0x78(%rbp), %rax movq (%rax), %rcx addq %rdx, %rcx movq %rcx, (%rax) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x35c0f addq $0x110, %rsp # imm = 0x110 popq %rbp retq callq 0x134c0 nopw %cs:(%rax,%rax)
ps_fetch_datetime: push rbp mov rbp, rsp sub rsp, 110h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov rax, [rbp+var_68] mov rax, [rax+10h] mov [rbp+var_80], rax mov rdi, [rbp+var_78] call net_field_length mov [rbp+var_84], eax mov rax, [rbp+var_68] mov eax, [rax+60h] add eax, 0FFFFFFF9h; switch 7 cases mov ecx, eax mov [rbp+var_F0], rcx sub eax, 6 ja def_358F0; jumptable 00000000000358F0 default case, cases 8,9 mov rax, [rbp+var_F0] lea rcx, jpt_358F0 movsxd rax, ds:(jpt_358F0 - 563A0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_358F2: mov rdi, [rbp+var_80]; jumptable 00000000000358F0 cases 7,12 mov rsi, [rbp+var_78] mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov ecx, [rax+70h] call convert_to_datetime jmp loc_35BDF loc_35911: mov rdi, [rbp+var_80]; jumptable 00000000000358F0 case 10 mov rsi, [rbp+var_78] mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov ecx, [rax+70h] call convert_to_datetime jmp loc_35BDF loc_35930: mov rdi, [rbp+var_80]; jumptable 00000000000358F0 case 11 mov rsi, [rbp+var_78] mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov ecx, [rax+70h] call convert_to_datetime mov rax, [rbp+var_80] mov dword ptr [rax+4], 0 mov rax, [rbp+var_80] mov dword ptr [rax+8], 0 mov rax, [rbp+var_80] mov dword ptr [rax], 0 jmp loc_35BDF loc_3596F: mov rsi, [rbp+var_78]; jumptable 00000000000358F0 case 13 mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov ecx, [rax+70h] lea rdi, [rbp+var_B0] call convert_to_datetime mov eax, [rbp+var_B0] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] mov cl, al mov rax, [rbp+var_68] mov rax, [rax+10h] mov [rax], cl mov eax, [rbp+var_B4] shr eax, 8 mov cl, al mov rax, [rbp+var_68] mov rax, [rax+10h] mov [rax+1], cl jmp loc_35BDF def_358F0: mov rsi, [rbp+var_78]; jumptable 00000000000358F0 default case, cases 8,9 mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov ecx, [rax+70h] lea rdi, [rbp+var_E0] call convert_to_datetime mov rax, [rbp+var_70] mov eax, [rax+70h] add eax, 0FFFFFFF9h; switch 6 cases mov ecx, eax mov [rbp+var_F8], rcx sub eax, 5 ja def_35A13; jumptable 0000000000035A13 default case, cases 8,9 mov rax, [rbp+var_F8] lea rcx, jpt_35A13 movsxd rax, ds:(jpt_35A13 - 563BCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_35A15: lea rdi, [rbp+var_50]; jumptable 0000000000035A13 case 10 mov edx, [rbp+var_E0] mov ecx, [rbp+var_DC] mov r8d, [rbp+var_D8] lea rsi, a04u02u02u; "%04u-%02u-%02u" mov al, 0 call _sprintf cdqe mov [rbp+var_E8], rax jmp loc_35BCB loc_35A48: lea rdi, [rbp+var_50]; jumptable 0000000000035A13 case 11 movsx ecx, [rbp+var_C0] lea rdx, aDDD+12h; "" lea rax, asc_51634+13h; "-" cmp ecx, 0 cmovnz rdx, rax mov ecx, [rbp+var_D4] mov r8d, [rbp+var_D0] mov r9d, [rbp+var_CC] lea rsi, aS02u02u02u; "%s%02u:%02u:%02u" mov al, 0 call _sprintf cdqe mov [rbp+var_E8], rax mov rax, [rbp+var_70] cmp dword ptr [rax+68h], 0 jz short loc_35AFF mov rax, [rbp+var_70] cmp dword ptr [rax+68h], 6 ja short loc_35AFF lea rdi, [rbp+var_58] mov rdx, [rbp+var_C8] lea rsi, a06lu; ".%06lu" mov al, 0 call _sprintf mov rax, [rbp+var_70] cmp dword ptr [rax+68h], 6 jnb short loc_35ADB mov rax, [rbp+var_70] mov eax, [rax+68h] add eax, 1 mov eax, eax mov [rbp+rax+var_58], 0 loc_35ADB: lea rdi, [rbp+var_58] call _strlen add rax, [rbp+var_E8] mov [rbp+var_E8], rax lea rdi, [rbp+var_50] lea rsi, [rbp+var_58] call _strcat loc_35AFF: jmp loc_35BCB loc_35B04: lea rdi, [rbp+var_50]; jumptable 0000000000035A13 cases 7,12 mov edx, [rbp+var_E0] mov ecx, [rbp+var_DC] mov r8d, [rbp+var_D8] mov r9d, [rbp+var_D4] mov r10d, [rbp+var_D0] mov eax, [rbp+var_CC] lea rsi, a04u02u02u02u02; "%04u-%02u-%02u %02u:%02u:%02u" mov [rsp+110h+var_110], r10d mov [rsp+110h+var_108], eax mov al, 0 call _sprintf cdqe mov [rbp+var_E8], rax mov rax, [rbp+var_70] cmp dword ptr [rax+68h], 0 jz short loc_35BBA mov rax, [rbp+var_70] cmp dword ptr [rax+68h], 6 ja short loc_35BBA lea rdi, [rbp+var_60] mov rdx, [rbp+var_C8] lea rsi, a06lu; ".%06lu" mov al, 0 call _sprintf mov rax, [rbp+var_70] cmp dword ptr [rax+68h], 6 jnb short loc_35B96 mov rax, [rbp+var_70] mov eax, [rax+68h] add eax, 1 mov eax, eax mov [rbp+rax+var_60], 0 loc_35B96: lea rdi, [rbp+var_60] call _strlen add rax, [rbp+var_E8] mov [rbp+var_E8], rax lea rdi, [rbp+var_50] lea rsi, [rbp+var_60] call _strcat loc_35BBA: jmp short loc_35BCB def_35A13: mov [rbp+var_50], 0; jumptable 0000000000035A13 default case, cases 8,9 mov [rbp+var_E8], 0 loc_35BCB: mov rdi, [rbp+var_68] lea rsi, [rbp+var_50] mov rdx, [rbp+var_E8] call convert_froma_string loc_35BDF: mov eax, [rbp+var_84] mov edx, eax mov rax, [rbp+var_78] mov rcx, [rax] add rcx, rdx mov [rax], rcx mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_35C0F add rsp, 110h pop rbp retn loc_35C0F: call ___stack_chk_fail
unsigned long long ps_fetch_datetime(long long a1, long long a2, unsigned __int8 **a3) { const char *v3; // rdx long long v5; // [rsp+28h] [rbp-E8h] long long v6; // [rsp+28h] [rbp-E8h] int v7; // [rsp+30h] [rbp-E0h] BYREF int v8; // [rsp+34h] [rbp-DCh] int v9; // [rsp+38h] [rbp-D8h] int v10; // [rsp+3Ch] [rbp-D4h] int v11; // [rsp+40h] [rbp-D0h] int v12; // [rsp+44h] [rbp-CCh] long long v13; // [rsp+48h] [rbp-C8h] char v14; // [rsp+50h] [rbp-C0h] int v15; // [rsp+5Ch] [rbp-B4h] _DWORD v16[11]; // [rsp+60h] [rbp-B0h] BYREF unsigned int v17; // [rsp+8Ch] [rbp-84h] _DWORD *v18; // [rsp+90h] [rbp-80h] unsigned __int8 **v19; // [rsp+98h] [rbp-78h] long long v20; // [rsp+A0h] [rbp-70h] long long v21; // [rsp+A8h] [rbp-68h] _BYTE v22[8]; // [rsp+B0h] [rbp-60h] BYREF _BYTE v23[8]; // [rsp+B8h] [rbp-58h] BYREF _BYTE v24[72]; // [rsp+C0h] [rbp-50h] BYREF unsigned long long v25; // [rsp+108h] [rbp-8h] v25 = __readfsqword(0x28u); v21 = a1; v20 = a2; v19 = a3; v18 = *(_DWORD **)(a1 + 16); v17 = net_field_length(a3); switch ( *(_DWORD *)(a1 + 96) ) { case 7: case 0xA: case 0xC: convert_to_datetime(v18, v19, v17, *(unsigned int *)(v20 + 112)); break; case 0xB: convert_to_datetime(v18, v19, v17, *(unsigned int *)(v20 + 112)); v18[1] = 0; v18[2] = 0; *v18 = 0; break; case 0xD: convert_to_datetime(v16, v19, v17, *(unsigned int *)(v20 + 112)); v15 = v16[0]; **(_BYTE **)(v21 + 16) = v16[0]; *(_BYTE *)(*(_QWORD *)(v21 + 16) + 1LL) = BYTE1(v15); break; default: convert_to_datetime(&v7, v19, v17, *(unsigned int *)(v20 + 112)); switch ( *(_DWORD *)(v20 + 112) ) { case 7: case 0xC: v6 = (int)sprintf(v24, "%04u-%02u-%02u %02u:%02u:%02u", v7, v8, v9, v10, v11, v12); if ( *(_DWORD *)(v20 + 104) && *(_DWORD *)(v20 + 104) <= 6u ) { sprintf(v22, ".%06lu", v13); if ( *(_DWORD *)(v20 + 104) < 6u ) v22[*(_DWORD *)(v20 + 104) + 1] = 0; v6 += strlen(v22); strcat(v24, v22); } goto LABEL_22; case 0xA: v5 = (int)sprintf(v24, "%04u-%02u-%02u", v7, v8, v9); convert_froma_string(v21, v24, v5); goto LABEL_23; case 0xB: v3 = ""; if ( v14 ) v3 = "-"; v6 = (int)sprintf(v24, "%s%02u:%02u:%02u", v3, v10, v11, v12); if ( *(_DWORD *)(v20 + 104) && *(_DWORD *)(v20 + 104) <= 6u ) { sprintf(v23, ".%06lu", v13); if ( *(_DWORD *)(v20 + 104) < 6u ) v23[*(_DWORD *)(v20 + 104) + 1] = 0; v6 += strlen(v23); strcat(v24, v23); } goto LABEL_22; default: v24[0] = 0; v6 = 0LL; LABEL_22: convert_froma_string(v21, v24, v6); break; } break; } LABEL_23: *v19 += v17; return __readfsqword(0x28u); }
ps_fetch_datetime: PUSH RBP MOV RBP,RSP SUB RSP,0x110 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x78] CALL 0x0011c9d0 MOV dword ptr [RBP + -0x84],EAX MOV RAX,qword ptr [RBP + -0x68] MOV EAX,dword ptr [RAX + 0x60] ADD EAX,-0x7 MOV ECX,EAX MOV qword ptr [RBP + -0xf0],RCX SUB EAX,0x6 JA 0x001359c5 MOV RAX,qword ptr [RBP + -0xf0] LEA RCX,[0x1563a0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x70] CALL 0x00137e40 JMP 0x00135bdf caseD_a: MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x70] CALL 0x00137e40 JMP 0x00135bdf caseD_b: MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x70] CALL 0x00137e40 MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RAX],0x0 JMP 0x00135bdf caseD_d: MOV RSI,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x70] LEA RDI,[RBP + -0xb0] CALL 0x00137e40 MOV EAX,dword ptr [RBP + -0xb0] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] MOV CL,AL MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0xb4] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x1],CL JMP 0x00135bdf caseD_8: MOV RSI,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x70] LEA RDI,[RBP + -0xe0] CALL 0x00137e40 MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x70] ADD EAX,-0x7 MOV ECX,EAX MOV qword ptr [RBP + -0xf8],RCX SUB EAX,0x5 JA 0x00135bbc MOV RAX,qword ptr [RBP + -0xf8] LEA RCX,[0x1563bc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_a: LEA RDI,[RBP + -0x50] MOV EDX,dword ptr [RBP + -0xe0] MOV ECX,dword ptr [RBP + -0xdc] MOV R8D,dword ptr [RBP + -0xd8] LEA RSI,[0x1534df] MOV AL,0x0 CALL 0x001130f0 CDQE MOV qword ptr [RBP + -0xe8],RAX JMP 0x00135bcb caseD_b: LEA RDI,[RBP + -0x50] MOVSX ECX,byte ptr [RBP + -0xc0] LEA RDX,[0x152258] LEA RAX,[0x151647] CMP ECX,0x0 CMOVNZ RDX,RAX MOV ECX,dword ptr [RBP + -0xd4] MOV R8D,dword ptr [RBP + -0xd0] MOV R9D,dword ptr [RBP + -0xcc] LEA RSI,[0x1534ee] MOV AL,0x0 CALL 0x001130f0 CDQE MOV qword ptr [RBP + -0xe8],RAX MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x68],0x0 JZ 0x00135aff MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x68],0x6 JA 0x00135aff LEA RDI,[RBP + -0x58] MOV RDX,qword ptr [RBP + -0xc8] LEA RSI,[0x1534ff] MOV AL,0x0 CALL 0x001130f0 MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x68],0x6 JNC 0x00135adb MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x68] ADD EAX,0x1 MOV EAX,EAX MOV byte ptr [RBP + RAX*0x1 + -0x58],0x0 LAB_00135adb: LEA RDI,[RBP + -0x58] CALL 0x001131a0 ADD RAX,qword ptr [RBP + -0xe8] MOV qword ptr [RBP + -0xe8],RAX LEA RDI,[RBP + -0x50] LEA RSI,[RBP + -0x58] CALL 0x00113790 LAB_00135aff: JMP 0x00135bcb caseD_7: LEA RDI,[RBP + -0x50] MOV EDX,dword ptr [RBP + -0xe0] MOV ECX,dword ptr [RBP + -0xdc] MOV R8D,dword ptr [RBP + -0xd8] MOV R9D,dword ptr [RBP + -0xd4] MOV R10D,dword ptr [RBP + -0xd0] MOV EAX,dword ptr [RBP + -0xcc] LEA RSI,[0x153506] MOV dword ptr [RSP],R10D MOV dword ptr [RSP + 0x8],EAX MOV AL,0x0 CALL 0x001130f0 CDQE MOV qword ptr [RBP + -0xe8],RAX MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x68],0x0 JZ 0x00135bba MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x68],0x6 JA 0x00135bba LEA RDI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0xc8] LEA RSI,[0x1534ff] MOV AL,0x0 CALL 0x001130f0 MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x68],0x6 JNC 0x00135b96 MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x68] ADD EAX,0x1 MOV EAX,EAX MOV byte ptr [RBP + RAX*0x1 + -0x60],0x0 LAB_00135b96: LEA RDI,[RBP + -0x60] CALL 0x001131a0 ADD RAX,qword ptr [RBP + -0xe8] MOV qword ptr [RBP + -0xe8],RAX LEA RDI,[RBP + -0x50] LEA RSI,[RBP + -0x60] CALL 0x00113790 LAB_00135bba: JMP 0x00135bcb caseD_8: MOV byte ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0xe8],0x0 LAB_00135bcb: MOV RDI,qword ptr [RBP + -0x68] LEA RSI,[RBP + -0x50] MOV RDX,qword ptr [RBP + -0xe8] CALL 0x001365d0 LAB_00135bdf: MOV EAX,dword ptr [RBP + -0x84] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX] ADD RCX,RDX MOV qword ptr [RAX],RCX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00135c0f ADD RSP,0x110 POP RBP RET LAB_00135c0f: CALL 0x001134c0
void ps_fetch_datetime(long param_1,long param_2,long *param_3) { int iVar1; size_t sVar2; char *pcVar3; long in_FS_OFFSET; long local_f0; uint local_e8; uint local_e4; uint local_e0; uint local_dc; uint local_d8; uint local_d4; int8 local_d0; char local_c8; int4 local_bc; int4 local_b8 [11]; uint local_8c; int4 *local_88; long *local_80; long local_78; long local_70; char local_68 [8]; char local_60 [8]; char local_58 [72]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_88 = *(int4 **)(param_1 + 0x10); local_80 = param_3; local_78 = param_2; local_70 = param_1; local_8c = net_field_length(param_3); switch(*(int4 *)(local_70 + 0x60)) { case 7: case 0xc: convert_to_datetime(local_88,local_80,local_8c,*(int4 *)(local_78 + 0x70)); break; default: convert_to_datetime(&local_e8,local_80,local_8c,*(int4 *)(local_78 + 0x70)); switch(*(int4 *)(local_78 + 0x70)) { case 7: case 0xc: iVar1 = sprintf(local_58,"%04u-%02u-%02u %02u:%02u:%02u",(ulong)local_e8,(ulong)local_e4, (ulong)local_e0,(ulong)local_dc,local_d8,local_d4); local_f0 = (long)iVar1; if ((*(int *)(local_78 + 0x68) != 0) && (*(uint *)(local_78 + 0x68) < 7)) { sprintf(local_68,".%06lu",local_d0); if (*(uint *)(local_78 + 0x68) < 6) { local_68[*(int *)(local_78 + 0x68) + 1] = '\0'; } sVar2 = strlen(local_68); local_f0 = sVar2 + local_f0; strcat(local_58,local_68); } break; default: local_58[0] = '\0'; local_f0 = 0; break; case 10: iVar1 = sprintf(local_58,"%04u-%02u-%02u",(ulong)local_e8,(ulong)local_e4,(ulong)local_e0); local_f0 = (long)iVar1; break; case 0xb: pcVar3 = ""; if (local_c8 != '\0') { pcVar3 = "-"; } iVar1 = sprintf(local_58,"%s%02u:%02u:%02u",pcVar3,(ulong)local_dc,(ulong)local_d8, (ulong)local_d4); local_f0 = (long)iVar1; if ((*(int *)(local_78 + 0x68) != 0) && (*(uint *)(local_78 + 0x68) < 7)) { sprintf(local_60,".%06lu",local_d0); if (*(uint *)(local_78 + 0x68) < 6) { local_60[*(int *)(local_78 + 0x68) + 1] = '\0'; } sVar2 = strlen(local_60); local_f0 = sVar2 + local_f0; strcat(local_58,local_60); } } convert_froma_string(local_70,local_58,local_f0); break; case 10: convert_to_datetime(local_88,local_80,local_8c,*(int4 *)(local_78 + 0x70)); break; case 0xb: convert_to_datetime(local_88,local_80,local_8c,*(int4 *)(local_78 + 0x70)); local_88[1] = 0; local_88[2] = 0; *local_88 = 0; break; case 0xd: convert_to_datetime(local_b8,local_80,local_8c,*(int4 *)(local_78 + 0x70)); local_bc = local_b8[0]; **(int1 **)(local_70 + 0x10) = (char)local_b8[0]; *(char *)(*(long *)(local_70 + 0x10) + 1) = (char)((uint)local_b8[0] >> 8); } *local_80 = *local_80 + (ulong)local_8c; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
1,234
LefDefParser::lefwViaRuleGenLayer(char const*, char const*, double, double, double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwViaRuleGenLayer(const char *layerName, const char *direction, double minWidth, double maxWidth, // optional double overhang, double metalOverhang) { // optional int status; if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_VIARULEGEN_START && lefwState != LEFW_VIARULEGEN) return LEFW_BAD_ORDER; if (lefwNumViaRuleLayers >= 2) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) // add a new line since, lefwViaRuleGen encPrint(lefwFile, (char*) "\n"); // & lefwViaRuleGenDefault do not else fprintf(lefwFile, "\n"); if ((status = lefwViaRulePrtLayer(layerName, direction, minWidth, maxWidth, overhang, metalOverhang)) != LEFW_OK) return status; lefwNumViaRuleLayers++; lefwState = LEFW_VIARULEGEN; return LEFW_OK; }
O0
cpp
LefDefParser::lefwViaRuleGenLayer(char const*, char const*, double, double, double, double): subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movsd %xmm0, 0x28(%rsp) movsd %xmm1, 0x20(%rsp) movsd %xmm2, 0x18(%rsp) movsd %xmm3, 0x10(%rsp) leaq 0x19783(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x19690 movl $0x1, 0x44(%rsp) jmp 0x19786 leaq 0x199bd(%rip), %rax # 0x33054 cmpl $0x0, (%rax) jne 0x196a9 movl $0x2, 0x44(%rsp) jmp 0x19786 leaq 0x199a0(%rip), %rax # 0x33050 cmpl $0x11, (%rax) je 0x196ce leaq 0x19994(%rip), %rax # 0x33050 cmpl $0x4c, (%rax) je 0x196ce movl $0x2, 0x44(%rsp) jmp 0x19786 leaq 0x19a03(%rip), %rax # 0x330d8 cmpl $0x2, (%rax) jl 0x196e7 movl $0x2, 0x44(%rsp) jmp 0x19786 cmpl $0x0, 0x199fe(%rip) # 0x330ec je 0x1970a leaq 0x19709(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x11fb4(%rip), %rsi # 0x2b6b5 movb $0x0, %al callq 0x289b0 jmp 0x19722 leaq 0x196ef(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x11f9a(%rip), %rsi # 0x2b6b5 movb $0x0, %al callq 0x1100 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi movsd 0x28(%rsp), %xmm0 movsd 0x20(%rsp), %xmm1 movsd 0x18(%rsp), %xmm2 movsd 0x10(%rsp), %xmm3 callq 0x18c60 movl %eax, 0xc(%rsp) cmpl $0x0, %eax je 0x1975c movl 0xc(%rsp), %eax movl %eax, 0x44(%rsp) jmp 0x19786 leaq 0x19975(%rip), %rax # 0x330d8 movl (%rax), %ecx addl $0x1, %ecx leaq 0x19969(%rip), %rax # 0x330d8 movl %ecx, (%rax) leaq 0x198d8(%rip), %rax # 0x33050 movl $0x4c, (%rax) movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nop
_ZN12LefDefParser19lefwViaRuleGenLayerEPKcS1_dddd: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi movsd [rsp+48h+var_20], xmm0 movsd [rsp+48h+var_28], xmm1 movsd [rsp+48h+var_30], xmm2 movsd [rsp+48h+var_38], xmm3 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_19690 mov [rsp+48h+var_4], 1 jmp loc_19786 loc_19690: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_196A9 mov [rsp+48h+var_4], 2 jmp loc_19786 loc_196A9: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 11h jz short loc_196CE lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 4Ch ; 'L' jz short loc_196CE mov [rsp+48h+var_4], 2 jmp loc_19786 loc_196CE: lea rax, _ZN12LefDefParser20lefwNumViaRuleLayersE; LefDefParser::lefwNumViaRuleLayers cmp dword ptr [rax], 2 jl short loc_196E7 mov [rsp+48h+var_4], 2 jmp loc_19786 loc_196E7: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1970A lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aEnd+7; "\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_19722 loc_1970A: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aEnd+7; "\n" mov al, 0 call _fprintf loc_19722: mov rdi, [rsp+48h+var_10]; this mov rsi, [rsp+48h+var_18]; char * movsd xmm0, [rsp+48h+var_20]; double movsd xmm1, [rsp+48h+var_28]; double movsd xmm2, [rsp+48h+var_30]; double movsd xmm3, [rsp+48h+var_38]; double call _ZN12LefDefParser19lefwViaRulePrtLayerEPKcS1_dddd; LefDefParser::lefwViaRulePrtLayer(char const*,char const*,double,double,double,double) mov [rsp+48h+var_3C], eax cmp eax, 0 jz short loc_1975C mov eax, [rsp+48h+var_3C] mov [rsp+48h+var_4], eax jmp short loc_19786 loc_1975C: lea rax, _ZN12LefDefParser20lefwNumViaRuleLayersE; LefDefParser::lefwNumViaRuleLayers mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser20lefwNumViaRuleLayersE; LefDefParser::lefwNumViaRuleLayers mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 4Ch ; 'L' mov [rsp+48h+var_4], 0 loc_19786: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long LefDefParser::lefwViaRuleGenLayer( LefDefParser *this, const char *a2, const char *a3, double a4, double a5, double a6, double a7, int a8, int a9, int a10) { const char *v10; // rdx int v11; // ecx int v12; // r8d int v13; // r9d unsigned int v15; // [rsp+Ch] [rbp-3Ch] if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 17 || LefDefParser::lefwState == 76 ) { if ( LefDefParser::lefwNumViaRuleLayers < 2 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"\n", (_DWORD)a3, a8, a9, a10); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n"); v15 = LefDefParser::lefwViaRulePrtLayer(this, a2, v10, a4, a5, a6, a7, v11, v12, v13); if ( v15 ) { return v15; } else { ++LefDefParser::lefwNumViaRuleLayers; LefDefParser::lefwState = 76; return 0; } } else { return 2; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwViaRuleGenLayer: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOVSD qword ptr [RSP + 0x28],XMM0 MOVSD qword ptr [RSP + 0x20],XMM1 MOVSD qword ptr [RSP + 0x18],XMM2 MOVSD qword ptr [RSP + 0x10],XMM3 LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x00119690 MOV dword ptr [RSP + 0x44],0x1 JMP 0x00119786 LAB_00119690: LEA RAX,[0x133054] CMP dword ptr [RAX],0x0 JNZ 0x001196a9 MOV dword ptr [RSP + 0x44],0x2 JMP 0x00119786 LAB_001196a9: LEA RAX,[0x133050] CMP dword ptr [RAX],0x11 JZ 0x001196ce LEA RAX,[0x133050] CMP dword ptr [RAX],0x4c JZ 0x001196ce MOV dword ptr [RSP + 0x44],0x2 JMP 0x00119786 LAB_001196ce: LEA RAX,[0x1330d8] CMP dword ptr [RAX],0x2 JL 0x001196e7 MOV dword ptr [RSP + 0x44],0x2 JMP 0x00119786 LAB_001196e7: CMP dword ptr [0x001330ec],0x0 JZ 0x0011970a LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x12b6b5] MOV AL,0x0 CALL 0x001289b0 JMP 0x00119722 LAB_0011970a: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x12b6b5] MOV AL,0x0 CALL 0x00101100 LAB_00119722: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOVSD XMM0,qword ptr [RSP + 0x28] MOVSD XMM1,qword ptr [RSP + 0x20] MOVSD XMM2,qword ptr [RSP + 0x18] MOVSD XMM3,qword ptr [RSP + 0x10] CALL 0x00118c60 MOV dword ptr [RSP + 0xc],EAX CMP EAX,0x0 JZ 0x0011975c MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x44],EAX JMP 0x00119786 LAB_0011975c: LEA RAX,[0x1330d8] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1330d8] MOV dword ptr [RAX],ECX LEA RAX,[0x133050] MOV dword ptr [RAX],0x4c MOV dword ptr [RSP + 0x44],0x0 LAB_00119786: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
/* LefDefParser::lefwViaRuleGenLayer(char const*, char const*, double, double, double, double) */ int LefDefParser::lefwViaRuleGenLayer (char *param_1,char *param_2,double param_3,double param_4,double param_5, double param_6) { int local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 0x11) || (lefwState == 0x4c)) { if (lefwNumViaRuleLayers < 2) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"\n"); } else { encPrint(lefwFile,"\n"); } local_4 = lefwViaRulePrtLayer(param_1,param_2,param_3,param_4,param_5,param_6); if (local_4 == 0) { lefwNumViaRuleLayers = lefwNumViaRuleLayers + 1; lefwState = 0x4c; local_4 = 0; } } else { local_4 = 2; } } else { local_4 = 2; } return local_4; }
1,235
get_dynamic
eloqsql/mysys/array.c
void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx) { if (idx >= array->elements) { DBUG_PRINT("warning",("To big array idx: %d, array size is %d", idx,array->elements)); bzero(element,array->size_of_element); return; } memcpy(element,array->buffer+idx*array->size_of_element, (size_t) array->size_of_element); }
O0
c
get_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0x84e59 jmp 0x84e41 jmp 0x84e43 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x37300 jmp 0x84e82 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rsi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x370c0 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
get_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov eax, [rbp+var_14] mov rcx, [rbp+var_8] cmp eax, [rcx+8] jb short loc_84E59 jmp short $+2 loc_84E41: jmp short $+2 loc_84E43: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax xor esi, esi call _memset jmp short loc_84E82 loc_84E59: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_14] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax add rsi, rax mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax call _memcpy loc_84E82: add rsp, 20h pop rbp retn
long long get_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20)); else return memset(a2, 0LL, *(unsigned int *)(a1 + 20)); }
get_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x8] JC 0x00184e59 JMP 0x00184e41 LAB_00184e41: JMP 0x00184e43 LAB_00184e43: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX XOR ESI,ESI CALL 0x00137300 JMP 0x00184e82 LAB_00184e59: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x001370c0 LAB_00184e82: ADD RSP,0x20 POP RBP RET
void get_dynamic(long *param_1,void *param_2,uint param_3) { if (param_3 < *(uint *)(param_1 + 1)) { memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))), (ulong)*(uint *)((long)param_1 + 0x14)); } else { memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14)); } return; }
1,236
my_hash_sort_ucs2_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_bin(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { size_t lengthsp= my_lengthsp_mb2(cs, (const char *) key, len); my_hash_sort_ucs2_nopad_bin(cs, key, lengthsp, nr1, nr2); }
O3
c
my_hash_sort_ucs2_bin: movq %rdx, %rax cmpq $0x2, %rdx jl 0x8da1d cmpb $0x20, -0x1(%rsi,%rax) jne 0x8da15 leaq -0x2(%rax), %rdx cmpb $0x0, -0x2(%rsi,%rax) je 0x8d9fa movq (%rcx), %rdx movq (%r8), %rdi jmp 0x8da29 movq (%rcx), %rdx movq (%r8), %rdi cmpq $0x1, %rax jne 0x8da5c pushq %rbp movq %rsp, %rbp addq %rsi, %rax movl %edx, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rdx, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rdx addq $0x3, %rdi incq %rsi cmpq %rax, %rsi jb 0x8da30 popq %rbp movq %rdx, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_ucs2_bin: mov rax, rdx cmp rdx, 2 jl short loc_8DA1D cmp byte ptr [rsi+rax-1], 20h ; ' ' jnz short loc_8DA15 lea rdx, [rax-2] cmp byte ptr [rsi+rax-2], 0 jz short my_hash_sort_ucs2_bin loc_8DA15: mov rdx, [rcx] mov rdi, [r8] jmp short loc_8DA29 loc_8DA1D: mov rdx, [rcx] mov rdi, [r8] cmp rax, 1 jnz short loc_8DA5C loc_8DA29: push rbp mov rbp, rsp add rax, rsi loc_8DA30: mov r9d, edx and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rdx shl r9, 8 add r9, r10 xor rdx, r9 add rdi, 3 inc rsi cmp rsi, rax jb short loc_8DA30 pop rbp loc_8DA5C: mov [rcx], rdx mov [r8], rdi retn
unsigned long long my_hash_sort_ucs2_bin( long long a1, unsigned long long a2, long long a3, long long *a4, long long *a5) { unsigned long long result; // rax long long v6; // rdx long long v7; // rdi while ( 1 ) { result = a3; if ( a3 < 2 ) break; if ( *(_BYTE *)(a2 + a3 - 1) == 32 ) { a3 -= 2LL; if ( !*(_BYTE *)(a2 + result - 2) ) continue; } v6 = *a4; v7 = *a5; goto LABEL_6; } v6 = *a4; v7 = *a5; if ( result != 1 ) goto LABEL_8; LABEL_6: result += a2; do { v6 ^= (v7 + (v6 & 0x3F)) * *(unsigned __int8 *)a2 + (v6 << 8); v7 += 3LL; ++a2; } while ( a2 < result ); LABEL_8: *a4 = v6; *a5 = v7; return result; }
my_hash_sort_ucs2_bin: MOV RAX,RDX CMP RDX,0x2 JL 0x0018da1d CMP byte ptr [RSI + RAX*0x1 + -0x1],0x20 JNZ 0x0018da15 LEA RDX,[RAX + -0x2] CMP byte ptr [RSI + RAX*0x1 + -0x2],0x0 JZ 0x0018d9fa LAB_0018da15: MOV RDX,qword ptr [RCX] MOV RDI,qword ptr [R8] JMP 0x0018da29 LAB_0018da1d: MOV RDX,qword ptr [RCX] MOV RDI,qword ptr [R8] CMP RAX,0x1 JNZ 0x0018da5c LAB_0018da29: PUSH RBP MOV RBP,RSP ADD RAX,RSI LAB_0018da30: MOV R9D,EDX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RDX SHL R9,0x8 ADD R9,R10 XOR RDX,R9 ADD RDI,0x3 INC RSI CMP RSI,RAX JC 0x0018da30 POP RBP LAB_0018da5c: MOV qword ptr [RCX],RDX MOV qword ptr [R8],RDI RET
void my_hash_sort_ucs2_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { byte *pbVar1; long lVar2; ulong uVar3; long lVar4; do { lVar2 = param_3; if (lVar2 < 2) { uVar3 = *param_4; lVar4 = *param_5; if (lVar2 != 1) goto LAB_0018da5c; goto LAB_0018da29; } } while ((param_2[lVar2 + -1] == 0x20) && (param_3 = lVar2 + -2, param_2[lVar2 + -2] == 0)); uVar3 = *param_4; lVar4 = *param_5; LAB_0018da29: pbVar1 = param_2 + lVar2; do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4); lVar4 = lVar4 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar1); LAB_0018da5c: *param_4 = uVar3; *param_5 = lVar4; return; }
1,237
ps_fetch_string
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_string(MYSQL_BIND *r_param, const MYSQL_FIELD *field __attribute__((unused)), unsigned char **row) { /* C-API differs from PHP. While PHP just converts string to string, C-API needs to convert the string to the defined type with in the result bind buffer. */ ulong field_length= net_field_length(row); convert_froma_string(r_param, (char *)*row, field_length); (*row) += field_length; }
O0
c
ps_fetch_string: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x20e70 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rdx callq 0x3d290 movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax)
ps_fetch_string: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_18] call net_field_length mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rax, [rbp+var_18] mov rsi, [rax] mov rdx, [rbp+var_20] call convert_froma_string mov rcx, [rbp+var_20] mov rax, [rbp+var_18] add rcx, [rax] mov [rax], rcx add rsp, 20h pop rbp retn
unsigned __int8 ** ps_fetch_string(long long a1, long long a2, unsigned __int8 **a3) { unsigned __int8 **result; // rax long long v4; // [rsp+0h] [rbp-20h] v4 = net_field_length(a3); convert_froma_string(a1, *a3, v4); result = a3; *a3 += v4; return result; }
ps_fetch_string: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00120e70 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0013d290 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX ADD RSP,0x20 POP RBP RET
void ps_fetch_string(int8 param_1,int8 param_2,long *param_3) { long lVar1; lVar1 = net_field_length(param_3); convert_froma_string(param_1,*param_3,lVar1); *param_3 = lVar1 + *param_3; return; }
1,238
ps_fetch_string
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_string(MYSQL_BIND *r_param, const MYSQL_FIELD *field __attribute__((unused)), unsigned char **row) { /* C-API differs from PHP. While PHP just converts string to string, C-API needs to convert the string to the defined type with in the result bind buffer. */ ulong field_length= net_field_length(row); convert_froma_string(r_param, (char *)*row, field_length); (*row) += field_length; }
O3
c
ps_fetch_string: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movq %rdx, %rdi callq 0x1cd19 movq %rax, %r15 movq (%rbx), %rsi movq %r14, %rdi movq %rax, %rdx callq 0x2d40d addq %r15, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ps_fetch_string: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rdi mov rdi, rdx call net_field_length mov r15, rax mov rsi, [rbx] mov rdi, r14 mov rdx, rax call convert_froma_string add [rbx], r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ps_fetch_string(long long a1, long long a2, unsigned __int8 **a3) { unsigned long long v4; // r15 long long result; // rax v4 = net_field_length(a3); result = convert_froma_string(a1, *a3, v4); *a3 += v4; return result; }
ps_fetch_string: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI MOV RDI,RDX CALL 0x0011cd19 MOV R15,RAX MOV RSI,qword ptr [RBX] MOV RDI,R14 MOV RDX,RAX CALL 0x0012d40d ADD qword ptr [RBX],R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void ps_fetch_string(int8 param_1,int8 param_2,long *param_3) { long lVar1; lVar1 = net_field_length(param_3); convert_froma_string(param_1,*param_3,lVar1); *param_3 = *param_3 + lVar1; return; }
1,239
intx::operator<(intx::uint<256u> const&, intx::uint<256u> const&)
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
inline constexpr bool operator<(const uint256& x, const uint256& y) noexcept { auto xp = uint128{x[2], x[3]}; auto yp = uint128{y[2], y[3]}; if (xp == yp) { xp = uint128{x[0], x[1]}; yp = uint128{y[0], y[1]}; } return xp < yp; }
O2
cpp
intx::operator<(intx::uint<256u> const&, intx::uint<256u> const&): movq 0x10(%rdi), %rcx movq 0x18(%rdi), %rax movq 0x10(%rsi), %rdx movq 0x18(%rsi), %r8 movq %rcx, %r9 xorq %rdx, %r9 movq %rax, %r10 xorq %r8, %r10 orq %r9, %r10 jne 0x3ad9e movq (%rdi), %rcx movq 0x8(%rdi), %rax movq (%rsi), %rdx movq 0x8(%rsi), %r8 cmpq %rdx, %rcx sbbq %r8, %rax setb %al retq
_ZN4intxltERKNS_4uintILj256EEES3_: mov rcx, [rdi+10h] mov rax, [rdi+18h] mov rdx, [rsi+10h] mov r8, [rsi+18h] mov r9, rcx xor r9, rdx mov r10, rax xor r10, r8 or r10, r9 jnz short loc_3AD9E mov rcx, [rdi] mov rax, [rdi+8] mov rdx, [rsi] mov r8, [rsi+8] loc_3AD9E: cmp rcx, rdx sbb rax, r8 setb al retn
bool intx::operator<(unsigned long long *a1, unsigned long long *a2) { unsigned long long v2; // rcx unsigned long long v3; // rax unsigned long long v4; // rdx unsigned long long v5; // r8 v2 = a1[2]; v3 = a1[3]; v4 = a2[2]; v5 = a2[3]; if ( *((_OWORD *)a2 + 1) - *((_OWORD *)a1 + 1) == 0LL ) { v2 = *a1; v3 = a1[1]; v4 = *a2; v5 = a2[1]; } return __PAIR128__(v3, v2) < __PAIR128__(v5, v4); }
operator<: MOV RCX,qword ptr [RDI + 0x10] MOV RAX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RSI + 0x10] MOV R8,qword ptr [RSI + 0x18] MOV R9,RCX XOR R9,RDX MOV R10,RAX XOR R10,R8 OR R10,R9 JNZ 0x0013ad9e MOV RCX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RSI] MOV R8,qword ptr [RSI + 0x8] LAB_0013ad9e: CMP RCX,RDX SBB RAX,R8 SETC AL RET
/* intx::TEMPNAMEPLACEHOLDERVALUE(intx::uint<256u> const&, intx::uint<256u> const&) */ int8 intx::operator<(uint *param_1,uint *param_2) { ulong uVar1; ulong uVar2; ulong uVar3; ulong uVar4; uVar2 = *(ulong *)(param_1 + 0x10); uVar1 = *(ulong *)(param_1 + 0x18); uVar3 = *(ulong *)(param_2 + 0x10); uVar4 = *(ulong *)(param_2 + 0x18); if (uVar1 == uVar4 && uVar2 == uVar3) { uVar2 = *(ulong *)param_1; uVar1 = *(ulong *)(param_1 + 8); uVar3 = *(ulong *)param_2; uVar4 = *(ulong *)(param_2 + 8); } return CONCAT71((int7)((uVar1 - uVar4) - (ulong)(uVar2 < uVar3) >> 8), uVar1 < uVar4 || uVar1 - uVar4 < (ulong)(uVar2 < uVar3)); }
1,240
exec_REDO_LOGREC_DEBUG_INFO
eloqsql/storage/maria/ma_recovery.c
prototype_redo_exec_hook(DEBUG_INFO) { char *data; enum translog_debug_info_type debug_info; enlarge_buffer(rec); if (log_record_buffer.str == NULL || translog_read_record(rec->lsn, 0, rec->record_length, log_record_buffer.str, NULL) != rec->record_length) { eprint(tracef, "Failed to read record debug record"); return 1; } debug_info= (enum translog_debug_info_type) log_record_buffer.str[0]; data= (char*) log_record_buffer.str + 1; switch (debug_info) { case LOGREC_DEBUG_INFO_QUERY: tprint(tracef, "Query: %.*s\n", (int) rec->record_length - 1, data); break; default: DBUG_ASSERT(0); } return 0; }
O3
c
exec_REDO_LOGREC_DEBUG_INFO: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movl 0x14(%rdi), %edx cmpq %rdx, 0xbd3080(%rip) # 0xc27c88 jae 0x54c30 movq %rdx, 0xbd3077(%rip) # 0xc27c88 movq 0xbd3068(%rip), %rsi # 0xc27c80 movl $0x50, %ecx xorl %edi, %edi callq 0xbf444 movq %rax, %rcx movq %rax, 0xbd3052(%rip) # 0xc27c80 jmp 0x54c37 movq 0xbd3049(%rip), %rcx # 0xc27c80 testq %rcx, %rcx je 0x54c84 movq (%rbx), %rdi movl 0x14(%rbx), %edx xorl %r14d, %r14d xorl %esi, %esi xorl %r8d, %r8d callq 0x45a2a cmpl 0x14(%rbx), %eax jne 0x54c84 movq 0xbd3025(%rip), %rcx # 0xc27c80 cmpb $0x0, (%rcx) jne 0x54ca2 incq %rcx leaq 0xbd3136(%rip), %rdx # 0xc27da0 movq (%rdx), %rdi decl %eax leaq 0xa65dc(%rip), %rsi # 0xfb252 xorl %r14d, %r14d movl %eax, %edx xorl %eax, %eax callq 0x55d08 jmp 0x54ca2 leaq 0xbd3115(%rip), %rax # 0xc27da0 movq (%rax), %rdi leaq 0xa659a(%rip), %rsi # 0xfb22f xorl %eax, %eax callq 0x55d90 movl $0x1, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
exec_REDO_LOGREC_DEBUG_INFO: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov edx, [rdi+14h] cmp cs:log_record_buffer_1, rdx jnb short loc_54C30 mov cs:log_record_buffer_1, rdx mov rsi, cs:log_record_buffer_0 mov ecx, 50h ; 'P' xor edi, edi call my_realloc mov rcx, rax mov cs:log_record_buffer_0, rax jmp short loc_54C37 loc_54C30: mov rcx, cs:log_record_buffer_0 loc_54C37: test rcx, rcx jz short loc_54C84 mov rdi, [rbx] mov edx, [rbx+14h] xor r14d, r14d xor esi, esi xor r8d, r8d call translog_read_record cmp eax, [rbx+14h] jnz short loc_54C84 mov rcx, cs:log_record_buffer_0 cmp byte ptr [rcx], 0 jnz short loc_54CA2 inc rcx lea rdx, tracef mov rdi, [rdx] dec eax lea rsi, aQueryS; "Query: %.*s\n" xor r14d, r14d mov edx, eax xor eax, eax call tprint jmp short loc_54CA2 loc_54C84: lea rax, tracef mov rdi, [rax] lea rsi, aFailedToReadRe_0; "Failed to read record debug record" xor eax, eax call eprint mov r14d, 1 loc_54CA2: mov eax, r14d pop rbx pop r14 pop rbp retn
long long exec_REDO_LOGREC_DEBUG_INFO(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { unsigned long long v6; // rdx long long v7; // rcx unsigned int v8; // r14d int record; // eax v6 = *(unsigned int *)(a1 + 20); if ( log_record_buffer_1 >= v6 ) { v7 = log_record_buffer_0; } else { log_record_buffer_1 = *(unsigned int *)(a1 + 20); v7 = my_realloc(0LL, log_record_buffer_0, v6, 80LL); log_record_buffer_0 = v7; } if ( v7 && (v8 = 0, record = translog_read_record(*(_QWORD *)a1, 0, *(unsigned int *)(a1 + 20), v7, 0LL), record == *(_DWORD *)(a1 + 20)) ) { if ( !*(_BYTE *)log_record_buffer_0 ) { v8 = 0; tprint(tracef, (unsigned int)"Query: %.*s\n", record - 1, log_record_buffer_0 + 1, a5, a6); } } else { eprint(tracef, (unsigned int)"Failed to read record debug record", v6, v7, a5, a6); return 1; } return v8; }
exec_REDO_LOGREC_DEBUG_INFO: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV EDX,dword ptr [RDI + 0x14] CMP qword ptr [0x00d27c88],RDX JNC 0x00154c30 MOV qword ptr [0x00d27c88],RDX MOV RSI,qword ptr [0x00d27c80] MOV ECX,0x50 XOR EDI,EDI CALL 0x001bf444 MOV RCX,RAX MOV qword ptr [0x00d27c80],RAX JMP 0x00154c37 LAB_00154c30: MOV RCX,qword ptr [0x00d27c80] LAB_00154c37: TEST RCX,RCX JZ 0x00154c84 MOV RDI,qword ptr [RBX] MOV EDX,dword ptr [RBX + 0x14] XOR R14D,R14D XOR ESI,ESI XOR R8D,R8D CALL 0x00145a2a CMP EAX,dword ptr [RBX + 0x14] JNZ 0x00154c84 MOV RCX,qword ptr [0x00d27c80] CMP byte ptr [RCX],0x0 JNZ 0x00154ca2 INC RCX LEA RDX,[0xd27da0] MOV RDI,qword ptr [RDX] DEC EAX LEA RSI,[0x1fb252] XOR R14D,R14D MOV EDX,EAX XOR EAX,EAX CALL 0x00155d08 JMP 0x00154ca2 LAB_00154c84: LEA RAX,[0xd27da0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1fb22f] XOR EAX,EAX CALL 0x00155d90 MOV R14D,0x1 LAB_00154ca2: MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 exec_REDO_LOGREC_DEBUG_INFO(int8 *param_1) { int iVar1; ulong uVar2; uVar2 = (ulong)*(uint *)((long)param_1 + 0x14); if (log_record_buffer_1 < uVar2) { log_record_buffer_1 = uVar2; log_record_buffer_0 = (char *)my_realloc(0,log_record_buffer_0,uVar2,0x50); } if ((log_record_buffer_0 != (char *)0x0) && (iVar1 = translog_read_record (*param_1,0,*(int4 *)((long)param_1 + 0x14),log_record_buffer_0,0), iVar1 == *(int *)((long)param_1 + 0x14))) { if (*log_record_buffer_0 != '\0') { return 0; } tprint(tracef,"Query: %.*s\n",iVar1 + -1,log_record_buffer_0 + 1); return 0; } eprint(tracef,"Failed to read record debug record"); return 1; }
1,241
ggml_status_to_string
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
const char * ggml_status_to_string(enum ggml_status status) { switch (status) { case GGML_STATUS_ALLOC_FAILED: return "GGML status: error (failed to allocate memory)"; case GGML_STATUS_FAILED: return "GGML status: error (operation failed)"; case GGML_STATUS_SUCCESS: return "GGML status: success"; case GGML_STATUS_ABORTED: return "GGML status: warning (operation aborted)"; } return "GGML status: unknown"; }
O3
c
ggml_status_to_string: addl $0x2, %edi cmpl $0x3, %edi ja 0x199e0 movl %edi, %eax leaq 0x32a48(%rip), %rcx # 0x4c420 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x32c17(%rip), %rax # 0x4c5fe retq
ggml_status_to_string: add edi, 2 cmp edi, 3 ja short loc_199E0 mov eax, edi lea rcx, unk_4C420 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_199E0: lea rax, aGgmlStatusUnkn; "GGML status: unknown" retn
const char * ggml_status_to_string(int a1) { unsigned int v1; // edi v1 = a1 + 2; if ( v1 > 3 ) return "GGML status: unknown"; else return (char *)dword_4C420 + dword_4C420[v1]; }
ggml_status_to_string: ADD EDI,0x2 CMP EDI,0x3 JA 0x001199e0 MOV EAX,EDI LEA RCX,[0x14c420] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_001199e0: LEA RAX,[0x14c5fe] RET
char * ggml_status_to_string(int param_1) { if (param_1 + 2U < 4) { return &DAT_0014c420 + *(int *)(&DAT_0014c420 + (ulong)(param_1 + 2U) * 4); } return "GGML status: unknown"; }
1,242
char const* google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd<google::protobuf::internal::EpsCopyInputStream::AppendString(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)::'lambda'(char const*, long)>(char const*, google::protobuf::internal::EpsCopyInputStream::AppendString(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)::'lambda'(char const*, long) const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
const char* AppendUntilEnd(const char* ptr, const A& append) { if (ptr - buffer_end_ > limit_) return nullptr; while (limit_ > kSlopBytes) { size_t chunk_size = buffer_end_ + kSlopBytes - ptr; append(ptr, chunk_size); ptr = Next(); if (ptr == nullptr) return limit_end_; ptr += kSlopBytes; } auto end = buffer_end_ + limit_; GOOGLE_DCHECK(end >= ptr); append(ptr, end - ptr); return end; }
O3
c
char const* google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd<google::protobuf::internal::EpsCopyInputStream::AppendString(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)::'lambda'(char const*, long)>(char const*, google::protobuf::internal::EpsCopyInputStream::AppendString(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)::'lambda'(char const*, long) const&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq 0x8(%rdi), %rcx movq %rsi, %rdx subq %rcx, %rdx movslq 0x1c(%rdi), %r14 cmpq %r14, %rdx jle 0xab2f0 xorl %r14d, %r14d jmp 0xab34a movq %rsi, %rax cmpl $0x11, %r14d jl 0xab331 movq %rdi, %r15 movq 0x8(%r15), %rdx subq %rax, %rdx addq $0x10, %rdx movq (%rbx), %rdi movq %rax, %rsi callq 0x13c5a movq %r15, %rdi callq 0x9ed98 testq %rax, %rax je 0xab347 addq $0x10, %rax movslq 0x1c(%r15), %r14 cmpq $0x11, %r14 jge 0xab2fc movq 0x8(%r15), %rcx addq %rcx, %r14 movq %r14, %rdx subq %rax, %rdx movq (%rbx), %rdi movq %rax, %rsi callq 0x13c5a jmp 0xab34a movq (%r15), %r14 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN6google8protobuf8internal18EpsCopyInputStream14AppendUntilEndIZNS2_12AppendStringEPKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlS5_lE_EES5_S5_RKT_: push r15 push r14 push rbx mov rbx, rdx mov rcx, [rdi+8] mov rdx, rsi sub rdx, rcx movsxd r14, dword ptr [rdi+1Ch] cmp rdx, r14 jle short loc_AB2F0 xor r14d, r14d jmp short loc_AB34A loc_AB2F0: mov rax, rsi cmp r14d, 11h jl short loc_AB331 mov r15, rdi loc_AB2FC: mov rdx, [r15+8] sub rdx, rax add rdx, 10h mov rdi, [rbx] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, r15; this call _ZN6google8protobuf8internal18EpsCopyInputStream4NextEv; google::protobuf::internal::EpsCopyInputStream::Next(void) test rax, rax jz short loc_AB347 add rax, 10h movsxd r14, dword ptr [r15+1Ch] cmp r14, 11h jge short loc_AB2FC mov rcx, [r15+8] loc_AB331: add r14, rcx mov rdx, r14 sub rdx, rax mov rdi, [rbx] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) jmp short loc_AB34A loc_AB347: mov r14, [r15] loc_AB34A: mov rax, r14 pop rbx pop r14 pop r15 retn
long long google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd<google::protobuf::internal::EpsCopyInputStream::AppendString(char const*,std::string *)::{lambda(char const*,long)#1}>( google::protobuf::internal::EpsCopyInputStream *this, _BYTE *a2, _QWORD **a3) { long long v4; // rcx long long v5; // r14 long long v6; // r14 _BYTE *v7; // rax google::protobuf::internal::EpsCopyInputStream *v8; // rax v4 = *((_QWORD *)this + 1); v5 = *((int *)this + 7); if ( (long long)&a2[-v4] > v5 ) return 0LL; v7 = a2; if ( (int)v5 < 17 ) { LABEL_7: v6 = v4 + v5; std::string::append(*a3, v7, v6 - (_QWORD)v7); } else { while ( 1 ) { std::string::append(*a3, v7, *((_QWORD *)this + 1) - (_QWORD)v7 + 16LL); v8 = google::protobuf::internal::EpsCopyInputStream::Next(this); if ( !v8 ) return *(_QWORD *)this; v7 = (char *)v8 + 16; v5 = *((int *)this + 7); if ( v5 < 17 ) { v4 = *((_QWORD *)this + 1); goto LABEL_7; } } } return v6; }
AppendUntilEnd<google::protobuf::internal::EpsCopyInputStream::AppendString(char_const*,std::__cxx11::string*)::{lambda(char_const*,long)#1}>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV RCX,qword ptr [RDI + 0x8] MOV RDX,RSI SUB RDX,RCX MOVSXD R14,dword ptr [RDI + 0x1c] CMP RDX,R14 JLE 0x001ab2f0 XOR R14D,R14D JMP 0x001ab34a LAB_001ab2f0: MOV RAX,RSI CMP R14D,0x11 JL 0x001ab331 MOV R15,RDI LAB_001ab2fc: MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RAX ADD RDX,0x10 MOV RDI,qword ptr [RBX] MOV RSI,RAX CALL 0x00113c5a MOV RDI,R15 CALL 0x0019ed98 TEST RAX,RAX JZ 0x001ab347 ADD RAX,0x10 MOVSXD R14,dword ptr [R15 + 0x1c] CMP R14,0x11 JGE 0x001ab2fc MOV RCX,qword ptr [R15 + 0x8] LAB_001ab331: ADD R14,RCX MOV RDX,R14 SUB RDX,RAX MOV RDI,qword ptr [RBX] MOV RSI,RAX CALL 0x00113c5a JMP 0x001ab34a LAB_001ab347: MOV R14,qword ptr [R15] LAB_001ab34a: MOV RAX,R14 POP RBX POP R14 POP R15 RET
/* char const* google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd<google::protobuf::internal::EpsCopyInputStream::AppendString(char const*, std::__cxx11::string*)::{lambda(char const*, long)#1}>(char const*, google::protobuf::internal::EpsCopyInputStream::AppendString(char const*, std::__cxx11::string*)::{lambda(char const*, long)#1} const&) */ char * __thiscall google::protobuf::internal::EpsCopyInputStream:: AppendUntilEnd<google::protobuf::internal::EpsCopyInputStream::AppendString(char_const*,std::__cxx11::string*)::_lambda(char_const*,long)_1_> (EpsCopyInputStream *this,char *param_1,_lambda_char_const__long__1_ *param_2) { long lVar1; long lVar2; char *pcVar3; lVar1 = *(long *)(this + 8); lVar2 = (long)*(int *)(this + 0x1c); if (lVar2 < (long)param_1 - lVar1) { pcVar3 = (char *)0x0; } else { if (0x10 < *(int *)(this + 0x1c)) { do { std::__cxx11::string::append (*(string **)param_2,param_1,(*(long *)(this + 8) - (long)param_1) + 0x10); lVar1 = Next(this); if (lVar1 == 0) { return *(char **)this; } param_1 = (char *)(lVar1 + 0x10); lVar2 = (long)*(int *)(this + 0x1c); } while (0x10 < lVar2); lVar1 = *(long *)(this + 8); } pcVar3 = (char *)(lVar2 + lVar1); std::__cxx11::string::append(*(string **)param_2,param_1,(long)pcVar3 - (long)param_1); } return pcVar3; }
1,243
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O0
c
skip: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 testb %al, %al je 0xdb537 movaps %xmm0, -0x130(%rbp) movaps %xmm1, -0x120(%rbp) movaps %xmm2, -0x110(%rbp) movaps %xmm3, -0x100(%rbp) movaps %xmm4, -0xf0(%rbp) movaps %xmm5, -0xe0(%rbp) movaps %xmm6, -0xd0(%rbp) movaps %xmm7, -0xc0(%rbp) movq %r9, -0x138(%rbp) movq %r8, -0x140(%rbp) movq %rcx, -0x148(%rbp) movq %rdx, -0x150(%rbp) movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x64(%rbp) movq %rsi, -0x70(%rbp) cmpq $0x0, -0x70(%rbp) je 0xdb5c3 movq -0x70(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xdb5c3 leaq -0x90(%rbp), %rax leaq -0x160(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) leaq -0x60(%rbp), %rdi movq -0x70(%rbp), %rdx leaq -0x90(%rbp), %rcx movl $0x50, %esi callq 0x2a520 leaq -0x90(%rbp), %rax jmp 0xdb5c7 movb $0x0, -0x60(%rbp) jmp 0xdb5c9 movl -0x64(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x64(%rbp) cmpl $0x0, %eax jle 0xdb618 leaq -0xb0(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x2a2c0 leaq -0xb0(%rbp), %rdx movl $0x1, %edi xorl %eax, %eax movl %eax, %esi callq 0xdb340 leaq -0x60(%rbp), %rsi leaq 0x79ab7(%rip), %rdi # 0x1550c3 callq 0xdb420 callq 0xdb880 jmp 0xdb5c9 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdb633 addq $0x160, %rsp # imm = 0x160 popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
skip: push rbp mov rbp, rsp sub rsp, 160h test al, al jz short loc_DB537 movaps [rbp+var_130], xmm0 movaps [rbp+var_120], xmm1 movaps [rbp+var_110], xmm2 movaps [rbp+var_100], xmm3 movaps [rbp+var_F0], xmm4 movaps [rbp+var_E0], xmm5 movaps [rbp+var_D0], xmm6 movaps [rbp+var_C0], xmm7 loc_DB537: mov [rbp+var_138], r9 mov [rbp+var_140], r8 mov [rbp+var_148], rcx mov [rbp+var_150], rdx mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_64], edi mov [rbp+var_70], rsi cmp [rbp+var_70], 0 jz short loc_DB5C3 mov rax, [rbp+var_70] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_DB5C3 lea rax, [rbp+var_90] lea rcx, [rbp+var_160] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h lea rdi, [rbp+var_60] mov rdx, [rbp+var_70] lea rcx, [rbp+var_90] mov esi, 50h ; 'P' call _vsnprintf lea rax, [rbp+var_90] jmp short loc_DB5C7 loc_DB5C3: mov [rbp+var_60], 0 loc_DB5C7: jmp short $+2 loc_DB5C9: mov eax, [rbp+var_64] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_64], ecx cmp eax, 0 jle short loc_DB618 lea rdi, [rbp+var_B0] xor esi, esi mov edx, 18h call _memset lea rdx, [rbp+var_B0] mov edi, 1 xor eax, eax mov esi, eax call vemit_tap lea rsi, [rbp+var_60] lea rdi, aSkip; "skip" call emit_dir call emit_endl jmp short loc_DB5C9 loc_DB618: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DB633 add rsp, 160h pop rbp retn loc_DB633: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { int v2; // eax _BYTE v4[32]; // [rsp+B0h] [rbp-B0h] BYREF va_list va; // [rsp+D0h] [rbp-90h] BYREF _BYTE *v6; // [rsp+F0h] [rbp-70h] int v7; // [rsp+FCh] [rbp-64h] char v8[88]; // [rsp+100h] [rbp-60h] BYREF unsigned long long v9; // [rsp+158h] [rbp-8h] v9 = __readfsqword(0x28u); v7 = a1; v6 = a2; if ( a2 && *v6 ) { va_start(va, a2); vsnprintf(v8, 80LL, v6, va); } else { v8[0] = 0; } while ( 1 ) { v2 = v7--; if ( v2 <= 0 ) break; memset(v4, 0LL, 24LL); vemit_tap(1, 0LL, (long long)v4); emit_dir("skip", v8); emit_endl(); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP SUB RSP,0x160 TEST AL,AL JZ 0x001db537 MOVAPS xmmword ptr [RBP + -0x130],XMM0 MOVAPS xmmword ptr [RBP + -0x120],XMM1 MOVAPS xmmword ptr [RBP + -0x110],XMM2 MOVAPS xmmword ptr [RBP + -0x100],XMM3 MOVAPS xmmword ptr [RBP + -0xf0],XMM4 MOVAPS xmmword ptr [RBP + -0xe0],XMM5 MOVAPS xmmword ptr [RBP + -0xd0],XMM6 MOVAPS xmmword ptr [RBP + -0xc0],XMM7 LAB_001db537: MOV qword ptr [RBP + -0x138],R9 MOV qword ptr [RBP + -0x140],R8 MOV qword ptr [RBP + -0x148],RCX MOV qword ptr [RBP + -0x150],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x64],EDI MOV qword ptr [RBP + -0x70],RSI CMP qword ptr [RBP + -0x70],0x0 JZ 0x001db5c3 MOV RAX,qword ptr [RBP + -0x70] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001db5c3 LEA RAX,[RBP + -0x90] LEA RCX,[RBP + -0x160] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 LEA RDI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x70] LEA RCX,[RBP + -0x90] MOV ESI,0x50 CALL 0x0012a520 LEA RAX,[RBP + -0x90] JMP 0x001db5c7 LAB_001db5c3: MOV byte ptr [RBP + -0x60],0x0 LAB_001db5c7: JMP 0x001db5c9 LAB_001db5c9: MOV EAX,dword ptr [RBP + -0x64] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x64],ECX CMP EAX,0x0 JLE 0x001db618 LEA RDI,[RBP + -0xb0] XOR ESI,ESI MOV EDX,0x18 CALL 0x0012a2c0 LEA RDX,[RBP + -0xb0] MOV EDI,0x1 XOR EAX,EAX MOV ESI,EAX CALL 0x001db340 LEA RSI,[RBP + -0x60] LEA RDI,[0x2550c3] CALL 0x001db420 CALL 0x001db880 JMP 0x001db5c9 LAB_001db618: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001db633 ADD RSP,0x160 POP RBP RET LAB_001db633: CALL 0x0012a270
void skip(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_168 [16]; int8 local_158; int8 local_150; int8 local_148; int8 local_140; int8 local_138; int8 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int1 local_b8 [32]; int4 local_98; int4 local_94; int1 *local_90; int1 *local_88; char *local_78; int local_6c; char local_68 [88]; long local_10; if (in_AL != '\0') { local_138 = param_1; local_128 = param_2; local_118 = param_3; local_108 = param_4; local_f8 = param_5; local_e8 = param_6; local_d8 = param_7; local_c8 = param_8; } local_10 = *(long *)(in_FS_OFFSET + 0x28); local_158 = param_11; local_150 = param_12; local_148 = param_13; local_140 = param_14; local_78 = param_10; local_6c = param_9; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_68[0] = '\0'; } else { local_88 = local_168; local_90 = &stack0x00000008; local_94 = 0x30; local_98 = 0x10; vsnprintf(local_68,0x50,param_10,&local_98); } while (0 < local_6c) { local_6c = local_6c + -1; memset(local_b8,0,0x18); vemit_tap(1,0,local_b8); emit_dir(&DAT_002550c3); emit_endl(); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { local_6c = local_6c + -1; /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
1,244
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O3
c
skip: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movl %edi, %ebx movq %rdx, -0x140(%rbp) movq %rcx, -0x138(%rbp) movq %r8, -0x130(%rbp) movq %r9, -0x128(%rbp) testb %al, %al je 0x9251b movaps %xmm0, -0x120(%rbp) movaps %xmm1, -0x110(%rbp) movaps %xmm2, -0x100(%rbp) movaps %xmm3, -0xf0(%rbp) movaps %xmm4, -0xe0(%rbp) movaps %xmm5, -0xd0(%rbp) movaps %xmm6, -0xc0(%rbp) movaps %xmm7, -0xb0(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testq %rsi, %rsi je 0x92579 movq %rsi, %r10 cmpb $0x0, (%rsi) je 0x92579 leaq -0x150(%rbp), %rax leaq -0xa0(%rbp), %r9 movq %rax, 0x10(%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r9) leaq -0x80(%rbp), %rdi movl $0x50, %esi movl $0x50, %ecx movl $0x1, %edx movq %r10, %r8 callq 0x291a0 jmp 0x9257d movb $0x0, -0x80(%rbp) testl %ebx, %ebx jle 0x9260d incl %ebx movq 0x2f3a1a(%rip), %r15 # 0x385fa8 leaq 0x4acb6(%rip), %r12 # 0xdd24b leaq -0x80(%rbp), %r13 leaq 0x4eb58(%rip), %r14 # 0xe10f8 xorps %xmm0, %xmm0 movaps %xmm0, -0xa0(%rbp) movq $0x0, -0x90(%rbp) movl $0x1, %edi xorl %esi, %esi leaq -0xa0(%rbp), %rdx callq 0x92361 movq (%r15), %rdi movl $0x1, %esi leaq 0x4ace0(%rip), %rdx # 0xdd2b7 movq %r12, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x29400 movq (%r15), %rdi movl $0x1, %esi movq %r14, %rdx xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x29400 decl %ebx cmpl $0x1, %ebx ja 0x925a0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9262e addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
skip: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov ebx, edi mov [rbp+var_140], rdx mov [rbp+var_138], rcx mov [rbp+var_130], r8 mov [rbp+var_128], r9 test al, al jz short loc_9251B movaps [rbp+var_120], xmm0 movaps [rbp+var_110], xmm1 movaps [rbp+var_100], xmm2 movaps [rbp+var_F0], xmm3 movaps [rbp+var_E0], xmm4 movaps [rbp+var_D0], xmm5 movaps [rbp+var_C0], xmm6 movaps [rbp+var_B0], xmm7 loc_9251B: mov rax, fs:28h mov [rbp+var_30], rax test rsi, rsi jz short loc_92579 mov r10, rsi cmp byte ptr [rsi], 0 jz short loc_92579 lea rax, [rbp+var_150] lea r9, [rbp+var_A0] mov [r9+10h], rax lea rax, [rbp+arg_0] mov [r9+8], rax mov rax, 3000000010h mov [r9], rax lea rdi, [rbp+var_80] mov esi, 50h ; 'P' mov ecx, 50h ; 'P' mov edx, 1 mov r8, r10 call ___vsnprintf_chk jmp short loc_9257D loc_92579: mov [rbp+var_80], 0 loc_9257D: test ebx, ebx jle loc_9260D inc ebx mov r15, cs:stdout_ptr lea r12, aSkip; "skip" lea r13, [rbp+var_80] lea r14, asc_E10F5+3; "\n" loc_925A0: xorps xmm0, xmm0 movaps [rbp+var_A0], xmm0 mov [rbp+var_90], 0 mov edi, 1 xor esi, esi lea rdx, [rbp+var_A0] call vemit_tap mov rdi, [r15] mov esi, 1 lea rdx, aSS; " # %s %s" mov rcx, r12 mov r8, r13 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush mov rdi, [r15] mov esi, 1 mov rdx, r14 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush dec ebx cmp ebx, 1 ja short loc_925A0 loc_9260D: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9262E add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9262E: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { unsigned int v2; // ebx va_list va; // [rsp+B0h] [rbp-A0h] BYREF char v5[80]; // [rsp+D0h] [rbp-80h] BYREF unsigned long long v6; // [rsp+120h] [rbp-30h] v6 = __readfsqword(0x28u); if ( a2 && *a2 ) { va_start(va, a2); __vsnprintf_chk(v5, 80LL, 1LL, 80LL, a2, va); } else { v5[0] = 0; } if ( a1 > 0 ) { v2 = a1 + 1; do { memset(va, 0, sizeof(va)); vemit_tap(1, 0LL, (long long)va); __fprintf_chk(stdout, 1LL, " # %s %s", "skip", v5); fflush(stdout); __fprintf_chk(stdout, 1LL, "\n"); fflush(stdout); --v2; } while ( v2 > 1 ); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV EBX,EDI MOV qword ptr [RBP + -0x140],RDX MOV qword ptr [RBP + -0x138],RCX MOV qword ptr [RBP + -0x130],R8 MOV qword ptr [RBP + -0x128],R9 TEST AL,AL JZ 0x0019251b MOVAPS xmmword ptr [RBP + -0x120],XMM0 MOVAPS xmmword ptr [RBP + -0x110],XMM1 MOVAPS xmmword ptr [RBP + -0x100],XMM2 MOVAPS xmmword ptr [RBP + -0xf0],XMM3 MOVAPS xmmword ptr [RBP + -0xe0],XMM4 MOVAPS xmmword ptr [RBP + -0xd0],XMM5 MOVAPS xmmword ptr [RBP + -0xc0],XMM6 MOVAPS xmmword ptr [RBP + -0xb0],XMM7 LAB_0019251b: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST RSI,RSI JZ 0x00192579 MOV R10,RSI CMP byte ptr [RSI],0x0 JZ 0x00192579 LEA RAX,[RBP + -0x150] LEA R9,[RBP + -0xa0] MOV qword ptr [R9 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R9],RAX LEA RDI,[RBP + -0x80] MOV ESI,0x50 MOV ECX,0x50 MOV EDX,0x1 MOV R8,R10 CALL 0x001291a0 JMP 0x0019257d LAB_00192579: MOV byte ptr [RBP + -0x80],0x0 LAB_0019257d: TEST EBX,EBX JLE 0x0019260d INC EBX MOV R15,qword ptr [0x00485fa8] LEA R12,[0x1dd24b] LEA R13,[RBP + -0x80] LEA R14,[0x1e10f8] LAB_001925a0: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOV qword ptr [RBP + -0x90],0x0 MOV EDI,0x1 XOR ESI,ESI LEA RDX,[RBP + -0xa0] CALL 0x00192361 MOV RDI,qword ptr [R15] MOV ESI,0x1 LEA RDX,[0x1dd2b7] MOV RCX,R12 MOV R8,R13 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x00129400 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,R14 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x00129400 DEC EBX CMP EBX,0x1 JA 0x001925a0 LAB_0019260d: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019262e ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019262e: CALL 0x00129270
void skip(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { int *puVar1; char in_AL; uint uVar2; long in_FS_OFFSET; int1 local_158 [16]; int8 local_148; int8 local_140; int8 local_138; int8 local_130; int4 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int1 *puStack_a0; int1 *local_98; int1 local_88 [80]; long local_38; if (in_AL != '\0') { local_128 = param_1; local_118 = param_2; local_108 = param_3; local_f8 = param_4; local_e8 = param_5; local_d8 = param_6; local_c8 = param_7; local_b8 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_148 = param_11; local_140 = param_12; local_138 = param_13; local_130 = param_14; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_88[0] = 0; } else { local_98 = local_158; puStack_a0 = &stack0x00000008; local_a8 = 0x3000000010; __vsnprintf_chk(local_88,0x50,1,0x50,param_10); } puVar1 = PTR_stdout_00485fa8; if (0 < param_9) { uVar2 = param_9 + 1; do { local_a8 = 0; puStack_a0 = (int1 *)0x0; local_98 = (int1 *)0x0; vemit_tap(1,0,&local_a8); __fprintf_chk(*(int8 *)puVar1,1," # %s %s",&DAT_001dd24b,local_88); fflush(*(FILE **)puVar1); __fprintf_chk(*(int8 *)puVar1,1,&DAT_001e10f8); fflush(*(FILE **)puVar1); uVar2 = uVar2 - 1; } while (1 < uVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
1,245
ma_ck_delete
eloqsql/storage/maria/ma_delete.c
my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key) { MARIA_SHARE *share= info->s; int res; my_bool buff_alloced; LSN lsn= LSN_IMPOSSIBLE; my_off_t new_root= share->state.key_root[key->keyinfo->key_nr]; uchar *key_buff, *save_key_data; MARIA_KEY org_key; DBUG_ENTER("_ma_ck_delete"); LINT_INIT_STRUCT(org_key); alloc_on_stack(*info->stack_end_ptr, key_buff, buff_alloced, key->keyinfo->max_store_length); if (!key_buff) DBUG_RETURN(1); save_key_data= key->data; if (share->now_transactional) { /* Save original value as the key may change */ memcpy(key_buff, key->data, key->data_length + key->ref_length); org_key= *key; key->data= key_buff; } if ((res= _ma_ck_real_delete(info, key, &new_root))) { /* We have to mark the table crashed before unpin_all_pages() */ maria_mark_crashed(info); } key->data= save_key_data; if (!res && share->now_transactional) res= _ma_write_undo_key_delete(info, &org_key, new_root, &lsn); else { share->state.key_root[key->keyinfo->key_nr]= new_root; _ma_fast_unlock_key_del(info); } _ma_unpin_all_pages_and_finalize_row(info, lsn); stack_alloc_free(key_buff, buff_alloced); DBUG_RETURN(res != 0); }
O3
c
ma_ck_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %r13 movq $0x0, -0x48(%rbp) movq 0x118(%r13), %rax movq 0x8(%rsi), %rcx movzbl 0xa5(%rcx), %edx movq (%rax,%rdx,8), %rax movq %rax, -0x40(%rbp) movzwl 0xb0(%rcx), %esi leaq -0x70(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%rdi), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x5b1ad cmpq $0x10000, %rax # imm = 0x10000 ja 0x5b197 cmpl $0x1000, %esi # imm = 0x1000 jb 0x5b1ad cmpq $0x8001, %rax # imm = 0x8001 jb 0x5b1ad movq %rsp, %r15 addl $0xf, %esi andl $-0x10, %esi subq %rsi, %r15 movq %r15, %rsp movb $0x1, %al movl %eax, -0x34(%rbp) jmp 0x5b1cc movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xc3acd testq %rax, %rax je 0x5b2ab movq %rax, %r15 movl $0x0, -0x34(%rbp) movq (%r14), %r12 cmpb $0x0, 0x7e7(%r13) je 0x5b200 movl 0x14(%r14), %edx addl 0x10(%r14), %edx movq %r15, %rdi movq %r12, %rsi callq 0x2b0b0 movups (%r14), %xmm0 movups 0x10(%r14), %xmm1 movaps %xmm0, -0x70(%rbp) movaps %xmm1, -0x60(%rbp) movq %r15, (%r14) leaq -0x40(%rbp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x5b2d0 testb %al, %al je 0x5b253 movq (%rbx), %rcx orl $0x2, 0x170(%rcx) movq %r12, (%r14) movzbl %al, %r12d movq -0x40(%rbp), %rax movq 0x118(%r13), %rcx movq 0x8(%r14), %rdx movzbl 0xa5(%rdx), %edx movq %rax, (%rcx,%rdx,8) cmpb $0x0, 0x67e(%rbx) je 0x5b24f movq %rbx, %rdi callq 0x42daa xorl %esi, %esi jmp 0x5b27e movq %r12, (%r14) cmpb $0x0, 0x7e7(%r13) je 0x5b220 movq -0x40(%rbp), %rdx leaq -0x70(%rbp), %rsi leaq -0x48(%rbp), %r14 movq %rbx, %rdi movq %r14, %rcx callq 0x5b4bf movsbl %al, %r12d movq (%r14), %rsi movq %rbx, %rdi callq 0x416f0 movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) cmpb $0x0, -0x34(%rbp) jne 0x5b2a3 movq %r15, %rdi callq 0xc3cfa testl %r12d, %r12d setne %al jmp 0x5b2ad movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x5b2cb leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2b280
_ma_ck_delete: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r13, [rdi] mov [rbp+var_48], 0 mov rax, [r13+118h] mov rcx, [rsi+8] movzx edx, byte ptr [rcx+0A5h] mov rax, [rax+rdx*8] mov [rbp+var_40], rax movzx esi, word ptr [rcx+0B0h] lea rcx, [rbp+var_70] mov [rcx], rsi mov rax, [rdi+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_5B1AD cmp rax, 10000h ja short loc_5B197 cmp esi, 1000h jb short loc_5B1AD cmp rax, 8001h jb short loc_5B1AD loc_5B197: mov r15, rsp add esi, 0Fh and esi, 0FFFFFFF0h sub r15, rsi mov rsp, r15 mov al, 1 mov [rbp+var_34], eax jmp short loc_5B1CC loc_5B1AD: mov edx, offset stru_10010 xor edi, edi call my_malloc test rax, rax jz loc_5B2AB mov r15, rax mov [rbp+var_34], 0 loc_5B1CC: mov r12, [r14] cmp byte ptr [r13+7E7h], 0 jz short loc_5B200 mov edx, [r14+14h] add edx, [r14+10h] mov rdi, r15 mov rsi, r12 call _memcpy movups xmm0, xmmword ptr [r14] movups xmm1, xmmword ptr [r14+10h] movaps [rbp+var_70], xmm0 movaps [rbp+var_60], xmm1 mov [r14], r15 loc_5B200: lea rdx, [rbp+var_40] mov rdi, rbx mov rsi, r14 call _ma_ck_real_delete test al, al jz short loc_5B253 mov rcx, [rbx] or dword ptr [rcx+170h], 2 mov [r14], r12 loc_5B220: movzx r12d, al mov rax, [rbp+var_40] mov rcx, [r13+118h] mov rdx, [r14+8] movzx edx, byte ptr [rdx+0A5h] mov [rcx+rdx*8], rax cmp byte ptr [rbx+67Eh], 0 jz short loc_5B24F mov rdi, rbx call _ma_unlock_key_del loc_5B24F: xor esi, esi jmp short loc_5B27E loc_5B253: mov [r14], r12 cmp byte ptr [r13+7E7h], 0 jz short loc_5B220 mov rdx, [rbp+var_40] lea rsi, [rbp+var_70] lea r14, [rbp+var_48] mov rdi, rbx mov rcx, r14 call _ma_write_undo_key_delete movsx r12d, al mov rsi, [r14] loc_5B27E: mov rdi, rbx call _ma_unpin_all_pages mov rax, [rbx+8] mov qword ptr [rax+90h], 0 cmp byte ptr [rbp+var_34], 0 jnz short loc_5B2A3 mov rdi, r15 call my_free loc_5B2A3: test r12d, r12d setnz al jmp short loc_5B2AD loc_5B2AB: mov al, 1 loc_5B2AD: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_5B2CB lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5B2CB: call ___stack_chk_fail
bool ma_ck_delete(_QWORD **a1, long long *a2) { _DWORD *v3; // r13 long long v4; // rcx unsigned long long v5; // rsi unsigned long long v6; // rax bool v7; // cc unsigned long long v8; // rax char *v9; // r15 long long v10; // rax long long v11; // r12 __int128 v12; // xmm1 unsigned __int8 v13; // al int v14; // r12d int v15; // esi _OWORD v17[2]; // [rsp+0h] [rbp-70h] BYREF long long v18; // [rsp+28h] [rbp-48h] BYREF long long v19; // [rsp+30h] [rbp-40h] BYREF int v20; // [rsp+3Ch] [rbp-34h] unsigned long long v21; // [rsp+40h] [rbp-30h] v21 = __readfsqword(0x28u); v3 = *a1; v18 = 0LL; v4 = a2[1]; v19 = *(_QWORD *)(*((_QWORD *)v3 + 35) + 8LL * *(unsigned __int8 *)(v4 + 165)); v5 = *(unsigned __int16 *)(v4 + 176); *(_QWORD *)&v17[0] = v5; v6 = *a1[15] - (_QWORD)v17; v7 = v6 <= v5; v8 = v6 - v5; if ( v7 || v8 <= 0x10000 && ((unsigned int)v5 < 0x1000 || v8 < 0x8001) ) { v10 = my_malloc(0LL, v5, &stru_10010); if ( !v10 ) return 1; v9 = (char *)v10; v20 = 0; } else { v9 = (char *)v17 - (((_DWORD)v5 + 15) & 0xFFFFFFF0); LOBYTE(v8) = 1; v20 = v8; } v11 = *a2; if ( *((_BYTE *)v3 + 2023) ) { memcpy(v9, *a2, (unsigned int)(*((_DWORD *)a2 + 4) + *((_DWORD *)a2 + 5))); v12 = *((_OWORD *)a2 + 1); v17[0] = *(_OWORD *)a2; v17[1] = v12; *a2 = (long long)v9; } v13 = ma_ck_real_delete(a1, a2, &v19); if ( v13 ) { *((_DWORD *)*a1 + 92) |= 2u; *a2 = v11; LABEL_12: v14 = v13; *(_QWORD *)(*((_QWORD *)v3 + 35) + 8LL * *(unsigned __int8 *)(a2[1] + 165)) = v19; if ( *((_BYTE *)a1 + 1662) ) ma_unlock_key_del(a1); v15 = 0; goto LABEL_17; } *a2 = v11; if ( !*((_BYTE *)v3 + 2023) ) goto LABEL_12; v14 = (char)((long long ( *)(_QWORD **, _OWORD *, long long, long long *))ma_write_undo_key_delete)( a1, v17, v19, &v18); v15 = v18; LABEL_17: ma_unpin_all_pages((long long)a1, v15); a1[1][18] = 0LL; if ( !(_BYTE)v20 ) my_free(v9); return v14 != 0; }
_ma_ck_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13,qword ptr [RDI] MOV qword ptr [RBP + -0x48],0x0 MOV RAX,qword ptr [R13 + 0x118] MOV RCX,qword ptr [RSI + 0x8] MOVZX EDX,byte ptr [RCX + 0xa5] MOV RAX,qword ptr [RAX + RDX*0x8] MOV qword ptr [RBP + -0x40],RAX MOVZX ESI,word ptr [RCX + 0xb0] LEA RCX,[RBP + -0x70] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [RDI + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x0015b1ad CMP RAX,0x10000 JA 0x0015b197 CMP ESI,0x1000 JC 0x0015b1ad CMP RAX,0x8001 JC 0x0015b1ad LAB_0015b197: MOV R15,RSP ADD ESI,0xf AND ESI,0xfffffff0 SUB R15,RSI MOV RSP,R15 MOV AL,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0015b1cc LAB_0015b1ad: MOV EDX,0x10010 XOR EDI,EDI CALL 0x001c3acd TEST RAX,RAX JZ 0x0015b2ab MOV R15,RAX MOV dword ptr [RBP + -0x34],0x0 LAB_0015b1cc: MOV R12,qword ptr [R14] CMP byte ptr [R13 + 0x7e7],0x0 JZ 0x0015b200 MOV EDX,dword ptr [R14 + 0x14] ADD EDX,dword ptr [R14 + 0x10] MOV RDI,R15 MOV RSI,R12 CALL 0x0012b0b0 MOVUPS XMM0,xmmword ptr [R14] MOVUPS XMM1,xmmword ptr [R14 + 0x10] MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOVAPS xmmword ptr [RBP + -0x60],XMM1 MOV qword ptr [R14],R15 LAB_0015b200: LEA RDX,[RBP + -0x40] MOV RDI,RBX MOV RSI,R14 CALL 0x0015b2d0 TEST AL,AL JZ 0x0015b253 MOV RCX,qword ptr [RBX] OR dword ptr [RCX + 0x170],0x2 MOV qword ptr [R14],R12 LAB_0015b220: MOVZX R12D,AL MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [R13 + 0x118] MOV RDX,qword ptr [R14 + 0x8] MOVZX EDX,byte ptr [RDX + 0xa5] MOV qword ptr [RCX + RDX*0x8],RAX CMP byte ptr [RBX + 0x67e],0x0 JZ 0x0015b24f MOV RDI,RBX CALL 0x00142daa LAB_0015b24f: XOR ESI,ESI JMP 0x0015b27e LAB_0015b253: MOV qword ptr [R14],R12 CMP byte ptr [R13 + 0x7e7],0x0 JZ 0x0015b220 MOV RDX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x70] LEA R14,[RBP + -0x48] MOV RDI,RBX MOV RCX,R14 CALL 0x0015b4bf MOVSX R12D,AL MOV RSI,qword ptr [R14] LAB_0015b27e: MOV RDI,RBX CALL 0x001416f0 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 CMP byte ptr [RBP + -0x34],0x0 JNZ 0x0015b2a3 MOV RDI,R15 CALL 0x001c3cfa LAB_0015b2a3: TEST R12D,R12D SETNZ AL JMP 0x0015b2ad LAB_0015b2ab: MOV AL,0x1 LAB_0015b2ad: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0015b2cb LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015b2cb: CALL 0x0012b280
bool _ma_ck_delete(long *param_1,ulong *param_2) { ushort uVar1; int iVar2; long lVar3; void *__src; byte bVar4; char cVar5; ulong uVar6; int1 *__dest; ulong *puVar7; int8 uVar8; uint uVar9; long in_FS_OFFSET; bool bVar10; ulong local_78; int4 uStack_70; int4 uStack_6c; ulong local_68; ulong uStack_60; int8 local_50; int8 local_48; int4 local_3c; long local_38; puVar7 = &local_78; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar3 = *param_1; local_50 = 0; local_48 = *(int8 *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8); uVar1 = *(ushort *)(param_2[1] + 0xb0); local_78 = (ulong)uVar1; uVar6 = (*(long *)param_1[0xf] - (long)&local_78) - local_78; if (((ulong)(*(long *)param_1[0xf] - (long)&local_78) < local_78 || uVar6 == 0) || ((uVar6 < 0x10001 && ((uVar1 < 0x1000 || (uVar6 < 0x8001)))))) { __dest = (int1 *)my_malloc(0,local_78,0x10010); if (__dest == (int1 *)0x0) { bVar10 = true; goto LAB_0015b2ad; } local_3c = 0; puVar7 = &local_78; } else { __dest = (int1 *)((long)&local_78 - (ulong)(uVar1 + 0xf & 0xfffffff0)); local_3c = (int4)CONCAT71((int7)(uVar6 >> 8),1); puVar7 = (ulong *)__dest; } __src = (void *)*param_2; if (*(char *)(lVar3 + 0x7e7) != '\0') { iVar2 = *(int *)((long)param_2 + 0x14); uVar6 = param_2[2]; *(int8 *)((long)puVar7 + -8) = 0x15b1ec; memcpy(__dest,__src,(ulong)(uint)(iVar2 + (int)uVar6)); local_78 = *param_2; uStack_70 = (int4)param_2[1]; uStack_6c = *(int4 *)((long)param_2 + 0xc); local_68 = param_2[2]; uStack_60 = param_2[3]; *param_2 = (ulong)__dest; } *(int8 *)((long)puVar7 + -8) = 0x15b20f; bVar4 = _ma_ck_real_delete(param_1,param_2,&local_48); uVar8 = local_48; if (bVar4 == 0) { *param_2 = (ulong)__src; if (*(char *)(lVar3 + 0x7e7) == '\0') goto LAB_0015b220; *(int8 *)((long)puVar7 + -8) = 0x15b277; cVar5 = _ma_write_undo_key_delete(param_1,&local_78,uVar8,&local_50); uVar9 = (uint)cVar5; uVar8 = local_50; } else { *(uint *)(*param_1 + 0x170) = *(uint *)(*param_1 + 0x170) | 2; *param_2 = (ulong)__src; LAB_0015b220: uVar9 = (uint)bVar4; *(int8 *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8) = local_48; if (*(char *)((long)param_1 + 0x67e) != '\0') { *(int8 *)((long)puVar7 + -8) = 0x15b24f; _ma_unlock_key_del(param_1); } uVar8 = 0; } *(int8 *)((long)puVar7 + -8) = 0x15b286; _ma_unpin_all_pages(param_1,uVar8); *(int8 *)(param_1[1] + 0x90) = 0; if ((char)local_3c == '\0') { *(int8 *)((long)puVar7 + -8) = 0x15b2a3; my_free(__dest); } bVar10 = uVar9 != 0; LAB_0015b2ad: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return bVar10; } /* WARNING: Subroutine does not return */ *(code **)((long)puVar7 + -8) = _ma_ck_real_delete; __stack_chk_fail(); }
1,246
ssz_add_gindex
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
gindex_t ssz_add_gindex(gindex_t gindex1, gindex_t gindex2) { uint32_t depth = log2_ceil((uint32_t) gindex2 + 1) - 1; if (depth > 63) { log_error("gindex depth is too large: %u", depth); return 0; } return (gindex1 << depth) | (gindex2 & ((1 << depth) - 1)); }
O1
c
ssz_add_gindex: pushq %rbx movq %rsi, %rbx leal 0x1(%rsi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x2, %eax jb 0x14d74 bsrl %eax, %edx movl %edx, %ecx xorl $-0x20, %ecx leal -0x1(%rax), %esi addl $0x21, %ecx testl %esi, %eax cmovel %edx, %ecx decl %ecx cmpl $0x40, %ecx jb 0x14d8f xorl %ebx, %ebx xorl %eax, %eax callq 0x1869f testl %eax, %eax je 0x14da0 callq 0x54e1 xorl %ebx, %ebx jmp 0x14da0 shlq %cl, %rdi movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax notl %eax andl %eax, %ebx orq %rdi, %rbx movq %rbx, %rax popq %rbx retq
ssz_add_gindex: push rbx mov rbx, rsi lea eax, [rsi+1] mov ecx, 0FFFFFFFFh cmp eax, 2 jb short loc_14D74 bsr edx, eax mov ecx, edx xor ecx, 0FFFFFFE0h lea esi, [rax-1] add ecx, 21h ; '!' test eax, esi cmovz ecx, edx dec ecx loc_14D74: cmp ecx, 40h ; '@' jb short loc_14D8F xor ebx, ebx xor eax, eax call c4_get_log_level test eax, eax jz short loc_14DA0 call ssz_add_gindex_cold_1 xor ebx, ebx jmp short loc_14DA0 loc_14D8F: shl rdi, cl mov eax, 0FFFFFFFFh shl eax, cl not eax and ebx, eax or rbx, rdi loc_14DA0: mov rax, rbx pop rbx retn
long long ssz_add_gindex(long long a1, long long a2) { unsigned int v2; // eax unsigned int v3; // ecx unsigned int v4; // edx unsigned int v5; // ecx long long v6; // rbx long long v7; // rdx int v8; // ecx int v9; // r8d int v10; // r9d v2 = a2 + 1; v3 = -1; if ( (unsigned int)(a2 + 1) >= 2 ) { _BitScanReverse(&v4, v2); a2 = (unsigned int)a2; v5 = (v4 ^ 0xFFFFFFE0) + 33; if ( ((unsigned int)a2 & v2) == 0 ) v5 = v4; v3 = v5 - 1; } if ( v3 < 0x40 ) return (a1 << v3) | ~(-1 << v3) & (unsigned int)a2; v6 = 0LL; if ( (unsigned int)c4_get_log_level() ) { ssz_add_gindex_cold_1(a1, a2, v7, v8, v9, v10); return 0LL; } return v6; }
ssz_add_gindex: PUSH RBX MOV RBX,RSI LEA EAX,[RSI + 0x1] MOV ECX,0xffffffff CMP EAX,0x2 JC 0x00114d74 BSR EDX,EAX MOV ECX,EDX XOR ECX,0xffffffe0 LEA ESI,[RAX + -0x1] ADD ECX,0x21 TEST EAX,ESI CMOVZ ECX,EDX DEC ECX LAB_00114d74: CMP ECX,0x40 JC 0x00114d8f XOR EBX,EBX XOR EAX,EAX CALL 0x0011869f TEST EAX,EAX JZ 0x00114da0 CALL 0x001054e1 XOR EBX,EBX JMP 0x00114da0 LAB_00114d8f: SHL RDI,CL MOV EAX,0xffffffff SHL EAX,CL NOT EAX AND EBX,EAX OR RBX,RDI LAB_00114da0: MOV RAX,RBX POP RBX RET
ulong ssz_add_gindex(long param_1,uint param_2) { uint uVar1; uint uVar2; int iVar3; uint uVar4; ulong uVar5; uVar2 = param_2 + 1; uVar4 = 0xffffffff; if (1 < uVar2) { uVar1 = 0x1f; if (uVar2 != 0) { for (; uVar2 >> uVar1 == 0; uVar1 = uVar1 - 1) { } } uVar4 = (uVar1 ^ 0xffffffe0) + 0x21; if ((uVar2 & param_2) == 0) { uVar4 = uVar1; } uVar4 = uVar4 - 1; } if (uVar4 < 0x40) { uVar5 = (ulong)(param_2 & ~(-1 << ((byte)uVar4 & 0x1f))) | param_1 << ((byte)uVar4 & 0x3f); } else { uVar5 = 0; iVar3 = c4_get_log_level(); if (iVar3 != 0) { ssz_add_gindex_cold_1(); uVar5 = 0; } } return uVar5; }
1,247
ssz_add_gindex
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
gindex_t ssz_add_gindex(gindex_t gindex1, gindex_t gindex2) { uint32_t depth = log2_ceil((uint32_t) gindex2 + 1) - 1; if (depth > 63) { log_error("gindex depth is too large: %u", depth); return 0; } return (gindex1 << depth) | (gindex2 & ((1 << depth) - 1)); }
O3
c
ssz_add_gindex: pushq %rbx leal 0x1(%rsi), %eax cmpl $0x2, %eax jae 0x14818 xorl %ebx, %ebx xorl %eax, %eax callq 0x17e1b testl %eax, %eax je 0x14848 callq 0x54da xorl %ebx, %ebx jmp 0x14848 movq %rsi, %rbx bsrl %eax, %edx movl %edx, %ecx xorl $0x1f, %ecx leal -0x1(%rax), %esi movb $0x20, %r8b subb %cl, %r8b testl %esi, %eax movzbl %r8b, %ecx cmovel %edx, %ecx decb %cl shlq %cl, %rdi movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax notl %eax andl %eax, %ebx orq %rdi, %rbx movq %rbx, %rax popq %rbx retq
ssz_add_gindex: push rbx lea eax, [rsi+1] cmp eax, 2 jnb short loc_14818 xor ebx, ebx xor eax, eax call c4_get_log_level test eax, eax jz short loc_14848 call ssz_add_gindex_cold_1 xor ebx, ebx jmp short loc_14848 loc_14818: mov rbx, rsi bsr edx, eax mov ecx, edx xor ecx, 1Fh lea esi, [rax-1] mov r8b, 20h ; ' ' sub r8b, cl test eax, esi movzx ecx, r8b cmovz ecx, edx dec cl shl rdi, cl mov eax, 0FFFFFFFFh shl eax, cl not eax and ebx, eax or rbx, rdi loc_14848: mov rax, rbx pop rbx retn
long long ssz_add_gindex(long long a1, long long a2) { long long v2; // rbx long long v3; // rdx int v4; // ecx int v5; // r8d int v6; // r9d int v7; // edx char v8; // cl if ( (unsigned int)(a2 + 1) >= 2 ) { _BitScanReverse((unsigned int *)&v7, a2 + 1); v8 = 32 - (v7 ^ 0x1F); if ( ((unsigned int)a2 & ((_DWORD)a2 + 1)) == 0 ) v8 = v7; return (a1 << (v8 - 1)) | ~(-1 << (v8 - 1)) & (unsigned int)a2; } else { v2 = 0LL; if ( (unsigned int)c4_get_log_level() ) { ssz_add_gindex_cold_1(a1, a2, v3, v4, v5, v6); return 0LL; } } return v2; }
ssz_add_gindex: PUSH RBX LEA EAX,[RSI + 0x1] CMP EAX,0x2 JNC 0x00114818 XOR EBX,EBX XOR EAX,EAX CALL 0x00117e1b TEST EAX,EAX JZ 0x00114848 CALL 0x001054da XOR EBX,EBX JMP 0x00114848 LAB_00114818: MOV RBX,RSI BSR EDX,EAX MOV ECX,EDX XOR ECX,0x1f LEA ESI,[RAX + -0x1] MOV R8B,0x20 SUB R8B,CL TEST EAX,ESI MOVZX ECX,R8B CMOVZ ECX,EDX DEC CL SHL RDI,CL MOV EAX,0xffffffff SHL EAX,CL NOT EAX AND EBX,EAX OR RBX,RDI LAB_00114848: MOV RAX,RBX POP RBX RET
ulong ssz_add_gindex(long param_1,uint param_2) { uint uVar1; int iVar2; byte bVar3; ulong uVar4; uVar1 = param_2 + 1; if (uVar1 < 2) { uVar4 = 0; iVar2 = c4_get_log_level(); if (iVar2 != 0) { ssz_add_gindex_cold_1(); uVar4 = 0; } } else { iVar2 = 0x1f; if (uVar1 != 0) { for (; uVar1 >> iVar2 == 0; iVar2 = iVar2 + -1) { } } bVar3 = 0x20 - ((byte)iVar2 ^ 0x1f); if ((uVar1 & param_2) == 0) { bVar3 = (byte)iVar2; } uVar4 = (ulong)(param_2 & ~(-1 << (bVar3 - 1 & 0x1f))) | param_1 << (bVar3 - 1 & 0x3f); } return uVar4; }
1,248
strxmov
eloqsql/strings/strxmov.c
char *strxmov(char *dst,const char *src, ...) { va_list pvar; va_start(pvar,src); while (src != NullS) { while ((*dst++ = *src++)) ; dst--; src = va_arg(pvar, char *); } va_end(pvar); *dst = 0; /* there might have been no sources! */ return dst; }
O3
c
strxmov: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %eax, %r10d movq %rdi, %rax leaq -0xd0(%rbp), %rdi movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %r10b, %r10b je 0xd73f0 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %rdi, -0x10(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x18(%rbp) movabsq $0x3000000010, %rcx # imm = 0x3000000010 movq %rcx, -0x20(%rbp) testq %rsi, %rsi je 0xd745e movq -0x10(%rbp), %rcx movl -0x20(%rbp), %edx movq -0x18(%rbp), %rdi movq %rdi, %r8 movb (%rsi), %r9b movb %r9b, (%rax) testb %r9b, %r9b jne 0xd7456 cmpl $0x28, %edx ja 0xd743e movq %r8, %r9 movl %edx, %r8d addq %rcx, %r8 addl $0x8, %edx movl %edx, -0x20(%rbp) jmp 0xd7449 leaq 0x8(%r8), %rdi movq %rdi, -0x18(%rbp) movq %rdi, %r9 movq (%r8), %rsi movq %r9, %r8 testq %rsi, %rsi jne 0xd741d jmp 0xd745e incq %rax incq %rsi jmp 0xd741a movb $0x0, (%rax) addq $0x50, %rsp popq %rbp retq nop
strxmov: push rbp mov rbp, rsp sub rsp, 50h mov r10d, eax mov rax, rdi lea rdi, [rbp+var_D0] mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test r10b, r10b jz short loc_D73F0 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_D73F0: mov [rbp+var_10], rdi lea rcx, [rbp+arg_0] mov [rbp+var_18], rcx mov rcx, 3000000010h mov [rbp+var_20], rcx test rsi, rsi jz short loc_D745E mov rcx, [rbp+var_10] mov edx, dword ptr [rbp+var_20] mov rdi, [rbp+var_18] loc_D741A: mov r8, rdi loc_D741D: mov r9b, [rsi] mov [rax], r9b test r9b, r9b jnz short loc_D7456 cmp edx, 28h ; '(' ja short loc_D743E mov r9, r8 mov r8d, edx add r8, rcx add edx, 8 mov dword ptr [rbp+var_20], edx jmp short loc_D7449 loc_D743E: lea rdi, [r8+8] mov [rbp+var_18], rdi mov r9, rdi loc_D7449: mov rsi, [r8] mov r8, r9 test rsi, rsi jnz short loc_D741D jmp short loc_D745E loc_D7456: inc rax inc rsi jmp short loc_D741A loc_D745E: mov byte ptr [rax], 0 add rsp, 50h pop rbp retn
char *strxmov(char *a1, char *a2, ...) { char *result; // rax char *reg_save_area; // rcx unsigned int gp_offset; // edx char *overflow_arg_area; // rdi char *v6; // r8 char v7; // r9 char *v8; // r9 va_list va; // [rsp+B0h] [rbp-20h] BYREF result = a1; va_start(va, a2); if ( a2 ) { reg_save_area = (char *)va[0].reg_save_area; gp_offset = va[0].gp_offset; overflow_arg_area = (char *)va[0].overflow_arg_area; while ( 1 ) { v6 = overflow_arg_area; while ( 1 ) { v7 = *a2; *result = *a2; if ( v7 ) break; if ( gp_offset > 0x28 ) { overflow_arg_area = v6 + 8; va[0].overflow_arg_area = v6 + 8; v8 = v6 + 8; } else { v8 = v6; v6 = &reg_save_area[gp_offset]; gp_offset += 8; va[0].gp_offset = gp_offset; } a2 = *(char **)v6; v6 = v8; if ( !a2 ) goto LABEL_11; } ++result; ++a2; } } LABEL_11: *result = 0; return result; }
strxmov: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV R10D,EAX MOV RAX,RDI LEA RDI,[RBP + -0xd0] MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST R10B,R10B JZ 0x001d73f0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001d73f0: MOV qword ptr [RBP + -0x10],RDI LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RCX MOV RCX,0x3000000010 MOV qword ptr [RBP + -0x20],RCX TEST RSI,RSI JZ 0x001d745e MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x20] MOV RDI,qword ptr [RBP + -0x18] LAB_001d741a: MOV R8,RDI LAB_001d741d: MOV R9B,byte ptr [RSI] MOV byte ptr [RAX],R9B TEST R9B,R9B JNZ 0x001d7456 CMP EDX,0x28 JA 0x001d743e MOV R9,R8 MOV R8D,EDX ADD R8,RCX ADD EDX,0x8 MOV dword ptr [RBP + -0x20],EDX JMP 0x001d7449 LAB_001d743e: LEA RDI,[R8 + 0x8] MOV qword ptr [RBP + -0x18],RDI MOV R9,RDI LAB_001d7449: MOV RSI,qword ptr [R8] MOV R8,R9 TEST RSI,RSI JNZ 0x001d741d JMP 0x001d745e LAB_001d7456: INC RAX INC RSI JMP 0x001d741a LAB_001d745e: MOV byte ptr [RAX],0x0 ADD RSP,0x50 POP RBP RET
void strxmov(char *param_1,char *param_2) { char cVar1; int8 *puVar2; int8 *puVar3; ulong uVar4; int8 *puVar5; int8 local_d8 [22]; uint local_28; puVar2 = (int8 *)&stack0x00000008; if (param_2 != (char *)0x0) { local_28 = 0x10; puVar3 = puVar2; do { for (; cVar1 = *param_2, *param_1 = cVar1, cVar1 != '\0'; param_2 = param_2 + 1) { param_1 = param_1 + 1; puVar3 = puVar2; } if (local_28 < 0x29) { uVar4 = (ulong)local_28; local_28 = local_28 + 8; puVar5 = (int8 *)((long)local_d8 + uVar4); } else { puVar2 = puVar3 + 1; puVar5 = puVar3; puVar3 = puVar2; } param_2 = (char *)*puVar5; } while (param_2 != (char *)0x0); } *param_1 = '\0'; return; }
1,249
binding_system_resolve_binding
tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c
uint64_t binding_system_resolve_binding(BindingSystem* system, StringId name) { assert(system != NULL); assert(name != NULL); // Get current scope uint64_t scope_id = system->current_scope_id; // Search for binding in current scope and parent scopes while (scope_id != 0) { // Search for binding in current scope for (size_t i = 0; i < system->binding_table.count; i++) { if (system->binding_table.scope_ids[i] == scope_id && strcmp(system->binding_table.names[i], name) == 0) { // Found binding return system->binding_table.binding_ids[i]; } } // Get parent scope scope_id = binding_system_get_parent_scope(system, scope_id); } // Binding not found return 0; }
O0
c
binding_system_resolve_binding: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0xbba9 jmp 0xbbc8 leaq 0x61cf(%rip), %rdi # 0x11d7f leaq 0x63bb(%rip), %rsi # 0x11f72 movl $0x56, %edx leaq 0x645e(%rip), %rcx # 0x12021 callq 0x10a0 cmpq $0x0, -0x18(%rbp) je 0xbbd1 jmp 0xbbf0 leaq 0x619a(%rip), %rdi # 0x11d72 leaq 0x6393(%rip), %rsi # 0x11f72 movl $0x57, %edx leaq 0x6436(%rip), %rcx # 0x12021 callq 0x10a0 movq -0x10(%rbp), %rax movq 0x110(%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0xbc90 movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0xbc7a movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rax cmpq -0x20(%rbp), %rax jne 0xbc6a movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -0x18(%rbp), %rsi callq 0x10d0 cmpl $0x0, %eax jne 0xbc6a movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x8(%rbp) jmp 0xbc98 jmp 0xbc6c movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0xbc12 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xb750 movq %rax, -0x20(%rbp) jmp 0xbbff movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
binding_system_resolve_binding: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_BBA9 jmp short loc_BBC8 loc_BBA9: lea rdi, aSystemNull; "system != NULL" lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... mov edx, 56h ; 'V' lea rcx, aUint64TBinding_3; "uint64_t binding_system_resolve_binding"... call ___assert_fail loc_BBC8: cmp [rbp+var_18], 0 jz short loc_BBD1 jmp short loc_BBF0 loc_BBD1: lea rdi, aNameNull; "name != NULL" lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... mov edx, 57h ; 'W' lea rcx, aUint64TBinding_3; "uint64_t binding_system_resolve_binding"... call ___assert_fail loc_BBF0: mov rax, [rbp+var_10] mov rax, [rax+110h] mov [rbp+var_20], rax loc_BBFF: cmp [rbp+var_20], 0 jz loc_BC90 mov [rbp+var_28], 0 loc_BC12: mov rax, [rbp+var_28] mov rcx, [rbp+var_10] cmp rax, [rcx+48h] jnb short loc_BC7A mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rbp+var_28] mov rax, [rax+rcx*8] cmp rax, [rbp+var_20] jnz short loc_BC6A mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz short loc_BC6A mov rax, [rbp+var_10] mov rax, [rax+18h] mov rcx, [rbp+var_28] mov rax, [rax+rcx*8] mov [rbp+var_8], rax jmp short loc_BC98 loc_BC6A: jmp short $+2 loc_BC6C: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_BC12 loc_BC7A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call binding_system_get_parent_scope mov [rbp+var_20], rax jmp loc_BBFF loc_BC90: mov [rbp+var_8], 0 loc_BC98: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long binding_system_resolve_binding(_QWORD *a1, long long a2) { unsigned long long j; // [rsp+8h] [rbp-28h] long long i; // [rsp+10h] [rbp-20h] if ( !a1 ) __assert_fail( "system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c", 86LL, "uint64_t binding_system_resolve_binding(BindingSystem *, StringId)"); if ( !a2 ) __assert_fail( "name != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c", 87LL, "uint64_t binding_system_resolve_binding(BindingSystem *, StringId)"); for ( i = a1[34]; i; i = binding_system_get_parent_scope(a1, i) ) { for ( j = 0LL; j < a1[9]; ++j ) { if ( *(_QWORD *)(a1[4] + 8 * j) == i && !(unsigned int)strcmp(*(_QWORD *)(a1[2] + 8 * j), a2) ) return *(_QWORD *)(a1[3] + 8 * j); } } return 0LL; }
binding_system_resolve_binding: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0010bba9 JMP 0x0010bbc8 LAB_0010bba9: LEA RDI,[0x111d7f] LEA RSI,[0x111f72] MOV EDX,0x56 LEA RCX,[0x112021] CALL 0x001010a0 LAB_0010bbc8: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0010bbd1 JMP 0x0010bbf0 LAB_0010bbd1: LEA RDI,[0x111d72] LEA RSI,[0x111f72] MOV EDX,0x57 LEA RCX,[0x112021] CALL 0x001010a0 LAB_0010bbf0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x110] MOV qword ptr [RBP + -0x20],RAX LAB_0010bbff: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0010bc90 MOV qword ptr [RBP + -0x28],0x0 LAB_0010bc12: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x48] JNC 0x0010bc7a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0010bc6a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001010d0 CMP EAX,0x0 JNZ 0x0010bc6a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x0010bc98 LAB_0010bc6a: JMP 0x0010bc6c LAB_0010bc6c: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0010bc12 LAB_0010bc7a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0010b750 MOV qword ptr [RBP + -0x20],RAX JMP 0x0010bbff LAB_0010bc90: MOV qword ptr [RBP + -0x8],0x0 LAB_0010bc98: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int8 binding_system_resolve_binding(long param_1,char *param_2) { int iVar1; ulong local_30; long local_28; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c" ,0x56,"uint64_t binding_system_resolve_binding(BindingSystem *, StringId)"); } if (param_2 != (char *)0x0) { local_28 = *(long *)(param_1 + 0x110); do { if (local_28 == 0) { return 0; } for (local_30 = 0; local_30 < *(ulong *)(param_1 + 0x48); local_30 = local_30 + 1) { if ((*(long *)(*(long *)(param_1 + 0x20) + local_30 * 8) == local_28) && (iVar1 = strcmp(*(char **)(*(long *)(param_1 + 0x10) + local_30 * 8),param_2), iVar1 == 0 )) { return *(int8 *)(*(long *)(param_1 + 0x18) + local_30 * 8); } } local_28 = binding_system_get_parent_scope(param_1,local_28); } while( true ); } /* WARNING: Subroutine does not return */ __assert_fail("name != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c" ,0x57,"uint64_t binding_system_resolve_binding(BindingSystem *, StringId)"); }
1,250
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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&)
monkey531[P]llama/common/json.hpp
constexpr value_t type() const noexcept { return m_data.m_type; }
O2
cpp
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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&): pushq %rbx movzbl (%rdi), %eax movb (%rsi), %cl cmpb %cl, %al jne 0x4a230 cmpl $0x8, %eax ja 0x4a343 movl %eax, %eax leaq 0x4288a(%rip), %rcx # 0x8caa4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rdi), %rax cmpq 0x8(%rsi), %rax jmp 0x4a2e8 movl %eax, %edx xorb $0x5, %dl movl %ecx, %r8d xorb $0x7, %r8b orb %r8b, %dl jne 0x4a252 cvtsi2sdq 0x8(%rdi), %xmm0 cmpeqsd 0x8(%rsi), %xmm0 jmp 0x4a2f8 movl %eax, %r9d xorb $0x7, %r9b movl %ecx, %edx xorb $0x5, %dl orb %dl, %r9b jne 0x4a26e cvtsi2sdq 0x8(%rsi), %xmm0 jmp 0x4a2f2 movl %eax, %r9d xorb $0x6, %r9b orb %r8b, %r9b jne 0x4a2a2 movsd 0x8(%rdi), %xmm0 unpcklps 0x421aa(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] subpd 0x421b2(%rip), %xmm0 # 0x8c440 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] addsd %xmm0, %xmm1 cmpeqsd 0x8(%rsi), %xmm1 jmp 0x4a2db movl %eax, %r8d xorb $0x7, %r8b xorb $0x6, %cl orb %cl, %r8b jne 0x4a349 movsd 0x8(%rsi), %xmm0 unpcklps 0x4216f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] subpd 0x42177(%rip), %xmm0 # 0x8c440 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] addsd %xmm0, %xmm1 cmpeqsd 0x8(%rdi), %xmm1 movq %xmm1, %rbx jmp 0x4a2fd movb 0x8(%rdi), %al cmpb 0x8(%rsi), %al sete %bl jmp 0x4a345 movsd 0x8(%rsi), %xmm0 cmpeqsd 0x8(%rdi), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx jmp 0x4a345 movq 0x8(%rdi), %rdi movq 0x8(%rsi), %rsi callq 0x4a376 jmp 0x4a33f movq 0x8(%rdi), %rdi movq 0x8(%rsi), %rsi popq %rbx jmp 0x22d1d movb $0x1, %bl jmp 0x4a345 movq 0x8(%rdi), %rdi movq 0x8(%rsi), %rsi callq 0x4a39f jmp 0x4a33f movq 0x8(%rdi), %rdi movq 0x8(%rsi), %rsi callq 0x4a3c8 movl %eax, %ebx jmp 0x4a345 xorl %ebx, %ebx movl %ebx, %eax popq %rbx retq movl %eax, %r8d xorb $0x6, %r8b orb %dl, %r8b je 0x4a223 xorb $0x5, %al orb %cl, %al je 0x4a223 xorl %ebx, %ebx xorl %edx, %edx callq 0x4a40c jmp 0x4a345 movq %rax, %rdi callq 0x22b61
_ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_: push rbx movzx eax, byte ptr [rdi] mov cl, [rsi] cmp al, cl jnz short loc_4A230 cmp eax, 8; switch 9 cases ja def_4A221; jumptable 000000000004A221 default case mov eax, eax lea rcx, jpt_4A221 movsxd rax, ds:(jpt_4A221 - 8CAA4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4A223: mov rax, [rdi+8]; jumptable 000000000004A221 cases 5,6 cmp rax, [rsi+8] jmp loc_4A2E8 loc_4A230: mov edx, eax xor dl, 5 mov r8d, ecx xor r8b, 7 or dl, r8b jnz short loc_4A252 cvtsi2sd xmm0, qword ptr [rdi+8] cmpeqsd xmm0, qword ptr [rsi+8] jmp loc_4A2F8 loc_4A252: mov r9d, eax xor r9b, 7 mov edx, ecx xor dl, 5 or r9b, dl jnz short loc_4A26E cvtsi2sd xmm0, qword ptr [rsi+8] jmp loc_4A2F2 loc_4A26E: mov r9d, eax xor r9b, 6 or r9b, r8b jnz short loc_4A2A2 movsd xmm0, qword ptr [rdi+8] unpcklps xmm0, cs:xmmword_8C430 subpd xmm0, cs:xmmword_8C440 movapd xmm1, xmm0 unpckhpd xmm1, xmm0 addsd xmm1, xmm0 cmpeqsd xmm1, qword ptr [rsi+8] jmp short loc_4A2DB loc_4A2A2: mov r8d, eax xor r8b, 7 xor cl, 6 or r8b, cl jnz loc_4A349 movsd xmm0, qword ptr [rsi+8] unpcklps xmm0, cs:xmmword_8C430 subpd xmm0, cs:xmmword_8C440 movapd xmm1, xmm0 unpckhpd xmm1, xmm0 addsd xmm1, xmm0 cmpeqsd xmm1, qword ptr [rdi+8] loc_4A2DB: movq rbx, xmm1 jmp short loc_4A2FD loc_4A2E2: mov al, [rdi+8]; jumptable 000000000004A221 case 4 cmp al, [rsi+8] loc_4A2E8: setz bl jmp short loc_4A345 loc_4A2ED: movsd xmm0, qword ptr [rsi+8]; jumptable 000000000004A221 case 7 loc_4A2F2: cmpeqsd xmm0, qword ptr [rdi+8] loc_4A2F8: movq rbx, xmm0 loc_4A2FD: and ebx, 1 jmp short loc_4A345 loc_4A302: mov rdi, [rdi+8]; jumptable 000000000004A221 case 2 mov rsi, [rsi+8] call _ZSteqIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISE_EEbRKS4_IT_T0_ESK_; std::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>,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>>>(std::vector 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>,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>>>,std::vector 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>,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>>>) jmp short loc_4A33F loc_4A311: mov rdi, [rdi+8]; jumptable 000000000004A221 case 3 mov rsi, [rsi+8] pop rbx jmp _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ loc_4A31F: mov bl, 1; jumptable 000000000004A221 case 0 jmp short loc_4A345 loc_4A323: mov rdi, [rdi+8]; jumptable 000000000004A221 case 1 mov rsi, [rsi+8] call _ZSteqISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS6_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_EEbRKSC_IT_T0_ESN_; std::operator==<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>>,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>>>>(std::vector const&<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>>,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>>>>,std::vector const&<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>>,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>>>>) jmp short loc_4A33F loc_4A332: mov rdi, [rdi+8]; jumptable 000000000004A221 case 8 mov rsi, [rsi+8] call _ZNK8nlohmann16json_abi_v3_11_327byte_container_with_subtypeISt6vectorIhSaIhEEEeqERKS5_; nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>::operator==(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) loc_4A33F: mov ebx, eax jmp short loc_4A345 def_4A221: xor ebx, ebx; jumptable 000000000004A221 default case loc_4A345: mov eax, ebx pop rbx retn loc_4A349: mov r8d, eax xor r8b, 6 or r8b, dl jz loc_4A223; jumptable 000000000004A221 cases 5,6 xor al, 5 or al, cl jz loc_4A223; jumptable 000000000004A221 cases 5,6 xor ebx, ebx xor edx, edx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE18compares_unorderedERKSD_SF_b; 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>::compares_unordered(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) jmp short loc_4A345 mov rdi, rax call __clang_call_terminate
char nlohmann::json_abi_v3_11_3::operator==(unsigned __int8 *a1, unsigned __int8 *a2, __m128d a3) { unsigned __int8 v3; // al unsigned __int8 v4; // cl __m128d v6; // rt1 unsigned __int8 v7; // dl __m128d v8; // xmm0 __m128d v9; // xmm1 __m128d v10; // rt1 __int8 v11; // xmm1_1 unsigned __int8 v12; // cl __m128d v13; // xmm0 __m128d v14; // xmm1 __m128d v15; // rt1 __int8 v16; // bl char v17; // bl __m128d v18; // rt1 char v19; // al v3 = *a1; v4 = *a2; if ( *a1 != *a2 ) { if ( v4 ^ 7 | v3 ^ 5 ) { v7 = v4 ^ 5; if ( v4 ^ 5 | v3 ^ 7 ) { if ( v4 ^ 7 | v3 ^ 6 ) { v12 = v4 ^ 6; if ( v12 | v3 ^ 7 ) { if ( v7 | v3 ^ 6 && v12 | v3 ^ 5 ) { v17 = 0; 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>::compares_unordered( a1, a2, 0LL); } else { return *((_QWORD *)a1 + 1) == *((_QWORD *)a2 + 1); } return v17; } v13 = _mm_sub_pd( (__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a2 + 1), (__m128)xmmword_8C430), (__m128d)xmmword_8C440); v14 = _mm_unpackhi_pd(v13, v13); v14.m128d_f64[0] = v14.m128d_f64[0] + v13.m128d_f64[0]; v15.m128d_f64[0] = *((double *)a1 + 1); v11 = *(_OWORD *)&_mm_cmpeq_sd(v14, v15); } else { v8 = _mm_sub_pd( (__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_8C430), (__m128d)xmmword_8C440); v9 = _mm_unpackhi_pd(v8, v8); v9.m128d_f64[0] = v9.m128d_f64[0] + v8.m128d_f64[0]; v10.m128d_f64[0] = *((double *)a2 + 1); v11 = *(_OWORD *)&_mm_cmpeq_sd(v9, v10); } v16 = v11; return v16 & 1; } a3.m128d_f64[0] = (double)(int)*((_QWORD *)a2 + 1); LABEL_16: v18.m128d_f64[0] = *((double *)a1 + 1); LOBYTE(a3.m128d_f64[0]) = *(_OWORD *)&_mm_cmpeq_sd(a3, v18); } else { a3.m128d_f64[0] = (double)(int)*((_QWORD *)a1 + 1); v6.m128d_f64[0] = *((double *)a2 + 1); LOBYTE(a3.m128d_f64[0]) = *(_OWORD *)&_mm_cmpeq_sd(a3, v6); } v16 = LOBYTE(a3.m128d_f64[0]); return v16 & 1; } switch ( *a1 ) { case 0u: return 1; case 1u: v19 = std::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( *((_QWORD *)a1 + 1), *((_QWORD *)a2 + 1)); goto LABEL_24; case 2u: v19 = std::operator==<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>>>( *((_QWORD *)a1 + 1), *((_QWORD *)a2 + 1)); goto LABEL_24; case 3u: return std::operator==<char>(*((_QWORD **)a1 + 1), *((_QWORD **)a2 + 1)); case 4u: return a1[8] == a2[8]; case 5u: case 6u: return *((_QWORD *)a1 + 1) == *((_QWORD *)a2 + 1); case 7u: a3 = (__m128d)*((unsigned long long *)a2 + 1); goto LABEL_16; case 8u: v19 = nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>::operator==( *((_QWORD *)a1 + 1), *((_QWORD *)a2 + 1)); LABEL_24: v17 = v19; break; default: return 0; } return v17; }
operator==: PUSH RBX MOVZX EAX,byte ptr [RDI] MOV CL,byte ptr [RSI] CMP AL,CL JNZ 0x0014a230 CMP EAX,0x8 JA 0x0014a343 MOV EAX,EAX LEA RCX,[0x18caa4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [RDI + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0014a2e8 LAB_0014a230: MOV EDX,EAX XOR DL,0x5 MOV R8D,ECX XOR R8B,0x7 OR DL,R8B JNZ 0x0014a252 CVTSI2SD XMM0,qword ptr [RDI + 0x8] CMPEQSD XMM0,qword ptr [RSI + 0x8] JMP 0x0014a2f8 LAB_0014a252: MOV R9D,EAX XOR R9B,0x7 MOV EDX,ECX XOR DL,0x5 OR R9B,DL JNZ 0x0014a26e CVTSI2SD XMM0,qword ptr [RSI + 0x8] JMP 0x0014a2f2 LAB_0014a26e: MOV R9D,EAX XOR R9B,0x6 OR R9B,R8B JNZ 0x0014a2a2 MOVSD XMM0,qword ptr [RDI + 0x8] UNPCKLPS XMM0,xmmword ptr [0x0018c430] SUBPD XMM0,xmmword ptr [0x0018c440] MOVAPD XMM1,XMM0 UNPCKHPD XMM1,XMM0 ADDSD XMM1,XMM0 CMPEQSD XMM1,qword ptr [RSI + 0x8] JMP 0x0014a2db LAB_0014a2a2: MOV R8D,EAX XOR R8B,0x7 XOR CL,0x6 OR R8B,CL JNZ 0x0014a349 MOVSD XMM0,qword ptr [RSI + 0x8] UNPCKLPS XMM0,xmmword ptr [0x0018c430] SUBPD XMM0,xmmword ptr [0x0018c440] MOVAPD XMM1,XMM0 UNPCKHPD XMM1,XMM0 ADDSD XMM1,XMM0 CMPEQSD XMM1,qword ptr [RDI + 0x8] LAB_0014a2db: MOVQ RBX,XMM1 JMP 0x0014a2fd caseD_4: MOV AL,byte ptr [RDI + 0x8] CMP AL,byte ptr [RSI + 0x8] LAB_0014a2e8: SETZ BL JMP 0x0014a345 caseD_7: MOVSD XMM0,qword ptr [RSI + 0x8] LAB_0014a2f2: CMPEQSD XMM0,qword ptr [RDI + 0x8] LAB_0014a2f8: MOVQ RBX,XMM0 LAB_0014a2fd: AND EBX,0x1 JMP 0x0014a345 caseD_2: MOV RDI,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x8] LAB_0014a30a: CALL 0x0014a376 JMP 0x0014a33f caseD_3: MOV RDI,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x8] POP RBX JMP 0x00122d1d caseD_0: MOV BL,0x1 JMP 0x0014a345 caseD_1: MOV RDI,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x8] CALL 0x0014a39f JMP 0x0014a33f caseD_8: MOV RDI,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x8] CALL 0x0014a3c8 LAB_0014a33f: MOV EBX,EAX JMP 0x0014a345 default: XOR EBX,EBX LAB_0014a345: MOV EAX,EBX POP RBX RET LAB_0014a349: MOV R8D,EAX XOR R8B,0x6 OR R8B,DL JZ 0x0014a223 XOR AL,0x5 OR AL,CL JZ 0x0014a223 XOR EBX,EBX XOR EDX,EDX CALL 0x0014a40c JMP 0x0014a345
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* nlohmann::json_abi_v3_11_3::TEMPNAMEPLACEHOLDERVALUE(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&) */ ulong nlohmann::json_abi_v3_11_3::operator==(basic_json *param_1,basic_json *param_2) { byte bVar1; byte bVar2; double dVar3; uint uVar4; int7 extraout_var; ulong uVar5; int7 extraout_var_00; int8 unaff_RBX; int7 uVar6; bool bVar7; bVar2 = *param_1; bVar1 = *param_2; uVar6 = (int7)((ulong)unaff_RBX >> 8); if (bVar2 != bVar1) { if (bVar2 == 5 && (bVar1 ^ 7) == 0) { bVar7 = (double)*(long *)(param_1 + 8) == *(double *)(param_2 + 8); } else { if (bVar2 == 7 && (bVar1 ^ 5) == 0) { dVar3 = (double)*(long *)(param_2 + 8); goto LAB_0014a2f2; } if (bVar2 == 6 && (bVar1 ^ 7) == 0) { bVar7 = ((double)CONCAT44(_UNK_0018c434,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) - _UNK_0018c448) + ((double)CONCAT44(_DAT_0018c430,(int)*(int8 *)(param_1 + 8)) - _DAT_0018c440) == *(double *)(param_2 + 8); } else { if (bVar2 != 7 || (bVar1 ^ 6) != 0) { if ((bVar2 != 6 || (bVar1 ^ 5) != 0) && (bVar2 != 5 || (bVar1 ^ 6) != 0)) { uVar5 = 0; 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> ::compares_unordered(param_1,param_2,false); goto LAB_0014a345; } goto switchD_0014a221_caseD_5; } bVar7 = ((double)CONCAT44(_UNK_0018c434,(int)((ulong)*(int8 *)(param_2 + 8) >> 0x20)) - _UNK_0018c448) + ((double)CONCAT44(_DAT_0018c430,(int)*(int8 *)(param_2 + 8)) - _DAT_0018c440) == *(double *)(param_1 + 8); } } LAB_0014a2fd: uVar5 = (ulong)(-(uint)bVar7 & 1); goto LAB_0014a345; } switch(bVar2) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_0014a345; case 1: bVar7 = std::operator==(*(vector **)(param_1 + 8),*(vector **)(param_2 + 8)); uVar4 = (uint)CONCAT71(extraout_var_00,bVar7); break; case 2: /* try { // try from 0014a30a to 0014a33e has its CatchHandler @ 0014a36e */ bVar7 = std::operator==(*(vector **)(param_1 + 8),*(vector **)(param_2 + 8)); uVar4 = (uint)CONCAT71(extraout_var,bVar7); break; case 3: uVar5 = std::operator==(*(string **)(param_1 + 8),*(string **)(param_2 + 8)); return uVar5; case 4: bVar7 = param_1[8] == param_2[8]; goto LAB_0014a2e8; case 5: case 6: switchD_0014a221_caseD_5: bVar7 = *(long *)(param_1 + 8) == *(long *)(param_2 + 8); LAB_0014a2e8: uVar5 = CONCAT71(uVar6,bVar7); goto LAB_0014a345; case 7: dVar3 = *(double *)(param_2 + 8); LAB_0014a2f2: bVar7 = dVar3 == *(double *)(param_1 + 8); goto LAB_0014a2fd; case 8: uVar4 = byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>:: operator==(*(byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>> **)(param_1 + 8),*(byte_container_with_subtype **)(param_2 + 8)); break; default: uVar5 = 0; goto LAB_0014a345; } uVar5 = (ulong)uVar4; LAB_0014a345: return uVar5 & 0xffffffff; }
1,251
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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&)
monkey531[P]llama/common/json.hpp
constexpr value_t type() const noexcept { return m_data.m_type; }
O3
cpp
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movzbl (%rdi), %eax movb (%rsi), %cl cmpb %cl, %al jne 0x4de34 cmpl $0x8, %eax ja 0x4dffc movb $0x1, %bl movl %eax, %eax leaq 0x59cb6(%rip), %rcx # 0xa7ad4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rdi), %rax cmpq 0x8(%rsi), %rax jmp 0x4df85 movl %eax, %edx xorb $0x5, %dl movl %ecx, %r8d xorb $0x7, %r8b orb %r8b, %dl jne 0x4de56 cvtsi2sdq 0x8(%rdi), %xmm0 cmpeqsd 0x8(%rsi), %xmm0 jmp 0x4defc movl %eax, %r9d xorb $0x7, %r9b movl %ecx, %edx xorb $0x5, %dl orb %dl, %r9b jne 0x4de72 cvtsi2sdq 0x8(%rsi), %xmm0 jmp 0x4def6 movl %eax, %r9d xorb $0x6, %r9b orb %r8b, %r9b jne 0x4dea6 movsd 0x8(%rdi), %xmm0 unpcklps 0x595b6(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] subpd 0x595be(%rip), %xmm0 # 0xa7450 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] addsd %xmm0, %xmm1 cmpeqsd 0x8(%rsi), %xmm1 jmp 0x4dedf movl %eax, %r8d xorb $0x7, %r8b xorb $0x6, %cl orb %cl, %r8b jne 0x4e04d movsd 0x8(%rsi), %xmm0 unpcklps 0x5957b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] subpd 0x59583(%rip), %xmm0 # 0xa7450 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] addsd %xmm0, %xmm1 cmpeqsd 0x8(%rdi), %xmm1 movq %xmm1, %rbx jmp 0x4df01 movb 0x8(%rdi), %al cmpb 0x8(%rsi), %al jmp 0x4df85 movsd 0x8(%rsi), %xmm0 cmpeqsd 0x8(%rdi), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx jmp 0x4e03f movq 0x8(%rdi), %rax movq 0x8(%rsi), %rcx movq (%rax), %r14 movq 0x8(%rax), %r12 movq %r12, %rax subq %r14, %rax movq (%rcx), %r15 movq 0x8(%rcx), %rcx subq %r15, %rcx cmpq %rcx, %rax jne 0x4dffc cmpq %r12, %r14 je 0x4e03f movq %r14, %rdi movq %r15, %rsi callq 0x4ddf6 movl %eax, %ebx testb %al, %al je 0x4e03f addq $0x10, %r14 addq $0x10, %r15 jmp 0x4df31 movq 0x8(%rdi), %rax movq 0x8(%rsi), %rcx movq 0x8(%rax), %rdx cmpq 0x8(%rcx), %rdx jne 0x4dffc testq %rdx, %rdx je 0x4e03f movq (%rcx), %rsi movq (%rax), %rdi callq 0x186e0 testl %eax, %eax sete %bl jmp 0x4e03f movq 0x8(%rdi), %rax movq 0x8(%rsi), %rcx movq (%rax), %r15 movq 0x8(%rax), %r12 movq %r12, %rax subq %r15, %rax movq (%rcx), %r14 movq 0x8(%rcx), %rcx subq %r14, %rcx cmpq %rcx, %rax jne 0x4dffc cmpq %r12, %r15 je 0x4e03f addq $0x20, %r14 movq 0x8(%r15), %rdx cmpq -0x18(%r14), %rdx jne 0x4dffc testq %rdx, %rdx je 0x4dfdd movq -0x20(%r14), %rsi movq (%r15), %rdi callq 0x186e0 testl %eax, %eax jne 0x4dffc leaq 0x20(%r15), %rdi movq %r14, %rsi callq 0x4ddf6 testb %al, %al je 0x4dffc addq $0x30, %r15 addq $0x30, %r14 cmpq %r12, %r15 jne 0x4dfbe jmp 0x4e03f xorl %ebx, %ebx jmp 0x4e03f movq 0x8(%rdi), %rax movq 0x8(%rsi), %rcx leaq 0x18(%rax), %rdx leaq 0x20(%rax), %rsi leaq 0x20(%rsp), %rdi movq %rsi, (%rdi) movq %rdx, 0x8(%rdi) movq %rax, 0x10(%rdi) leaq 0x18(%rcx), %rax leaq 0x20(%rcx), %rdx leaq 0x8(%rsp), %rsi movq %rdx, (%rsi) movq %rax, 0x8(%rsi) movq %rcx, 0x10(%rsi) callq 0x4e0d6 movl %eax, %ebx movl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl %eax, %r8d xorb $0x6, %r8b orb %dl, %r8b je 0x4de27 xorb $0x5, %al orb %cl, %al je 0x4de27 xorl %ebx, %ebx xorl %edx, %edx callq 0x4e07a jmp 0x4e03f movq %rax, %rdi callq 0x2a243
_ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_: push r15 push r14 push r12 push rbx sub rsp, 38h movzx eax, byte ptr [rdi] mov cl, [rsi] cmp al, cl jnz short loc_4DE34 cmp eax, 8; switch 9 cases ja def_4DE25; jumptable 000000000004DE25 default case mov bl, 1 mov eax, eax lea rcx, jpt_4DE25 movsxd rax, ds:(jpt_4DE25 - 0A7AD4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4DE27: mov rax, [rdi+8]; jumptable 000000000004DE25 cases 5,6 cmp rax, [rsi+8] jmp loc_4DF85 loc_4DE34: mov edx, eax xor dl, 5 mov r8d, ecx xor r8b, 7 or dl, r8b jnz short loc_4DE56 cvtsi2sd xmm0, qword ptr [rdi+8] cmpeqsd xmm0, qword ptr [rsi+8] jmp loc_4DEFC loc_4DE56: mov r9d, eax xor r9b, 7 mov edx, ecx xor dl, 5 or r9b, dl jnz short loc_4DE72 cvtsi2sd xmm0, qword ptr [rsi+8] jmp loc_4DEF6 loc_4DE72: mov r9d, eax xor r9b, 6 or r9b, r8b jnz short loc_4DEA6 movsd xmm0, qword ptr [rdi+8] unpcklps xmm0, cs:xmmword_A7440 subpd xmm0, cs:xmmword_A7450 movapd xmm1, xmm0 unpckhpd xmm1, xmm0 addsd xmm1, xmm0 cmpeqsd xmm1, qword ptr [rsi+8] jmp short loc_4DEDF loc_4DEA6: mov r8d, eax xor r8b, 7 xor cl, 6 or r8b, cl jnz loc_4E04D movsd xmm0, qword ptr [rsi+8] unpcklps xmm0, cs:xmmword_A7440 subpd xmm0, cs:xmmword_A7450 movapd xmm1, xmm0 unpckhpd xmm1, xmm0 addsd xmm1, xmm0 cmpeqsd xmm1, qword ptr [rdi+8] loc_4DEDF: movq rbx, xmm1 jmp short loc_4DF01 loc_4DEE6: mov al, [rdi+8]; jumptable 000000000004DE25 case 4 cmp al, [rsi+8] jmp loc_4DF85 loc_4DEF1: movsd xmm0, qword ptr [rsi+8]; jumptable 000000000004DE25 case 7 loc_4DEF6: cmpeqsd xmm0, qword ptr [rdi+8] loc_4DEFC: movq rbx, xmm0 loc_4DF01: and ebx, 1 jmp loc_4E03F; jumptable 000000000004DE25 case 0 loc_4DF09: mov rax, [rdi+8]; jumptable 000000000004DE25 case 2 mov rcx, [rsi+8] mov r14, [rax] mov r12, [rax+8] mov rax, r12 sub rax, r14 mov r15, [rcx] mov rcx, [rcx+8] sub rcx, r15 cmp rax, rcx jnz def_4DE25; jumptable 000000000004DE25 default case loc_4DF31: cmp r14, r12 jz loc_4E03F; jumptable 000000000004DE25 case 0 mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov ebx, eax test al, al jz loc_4E03F; jumptable 000000000004DE25 case 0 add r14, 10h add r15, 10h jmp short loc_4DF31 loc_4DF59: mov rax, [rdi+8]; jumptable 000000000004DE25 case 3 mov rcx, [rsi+8] mov rdx, [rax+8] cmp rdx, [rcx+8] jnz def_4DE25; jumptable 000000000004DE25 default case test rdx, rdx jz loc_4E03F; jumptable 000000000004DE25 case 0 mov rsi, [rcx] mov rdi, [rax] call _bcmp test eax, eax loc_4DF85: setz bl jmp loc_4E03F; jumptable 000000000004DE25 case 0 loc_4DF8D: mov rax, [rdi+8]; jumptable 000000000004DE25 case 1 mov rcx, [rsi+8] mov r15, [rax] mov r12, [rax+8] mov rax, r12 sub rax, r15 mov r14, [rcx] mov rcx, [rcx+8] sub rcx, r14 cmp rax, rcx jnz short def_4DE25; jumptable 000000000004DE25 default case cmp r15, r12 jz loc_4E03F; jumptable 000000000004DE25 case 0 add r14, 20h ; ' ' loc_4DFBE: mov rdx, [r15+8] cmp rdx, [r14-18h] jnz short def_4DE25; jumptable 000000000004DE25 default case test rdx, rdx jz short loc_4DFDD mov rsi, [r14-20h] mov rdi, [r15] call _bcmp test eax, eax jnz short def_4DE25; jumptable 000000000004DE25 default case loc_4DFDD: lea rdi, [r15+20h] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jz short def_4DE25; jumptable 000000000004DE25 default case add r15, 30h ; '0' add r14, 30h ; '0' cmp r15, r12 jnz short loc_4DFBE jmp short loc_4E03F; jumptable 000000000004DE25 case 0 def_4DE25: xor ebx, ebx; jumptable 000000000004DE25 default case jmp short loc_4E03F; jumptable 000000000004DE25 case 0 loc_4E000: mov rax, [rdi+8]; jumptable 000000000004DE25 case 8 mov rcx, [rsi+8] lea rdx, [rax+18h] lea rsi, [rax+20h] lea rdi, [rsp+58h+var_38] mov [rdi], rsi mov [rdi+8], rdx mov [rdi+10h], rax lea rax, [rcx+18h] lea rdx, [rcx+20h] lea rsi, [rsp+58h+var_50] mov [rsi], rdx mov [rsi+8], rax mov [rsi+10h], rcx call _ZNSt15__tuple_compareISt5tupleIJRKSt6vectorIhSaIhEERKmRKbEESA_Lm0ELm3EE4__eqERKSA_SD_; std::__tuple_compare<std::tuple<std::vector<uchar> const&,ulong const&,bool const&>,std::tuple<std::vector<uchar> const&,ulong const&,bool const&>,0ul,3ul>::__eq(std::tuple<std::vector<uchar> const&,ulong const&,bool const&> const&,std::tuple<std::vector<uchar> const&,ulong const&,bool const&> const&) mov ebx, eax loc_4E03F: mov eax, ebx; jumptable 000000000004DE25 case 0 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_4E04D: mov r8d, eax xor r8b, 6 or r8b, dl jz loc_4DE27; jumptable 000000000004DE25 cases 5,6 xor al, 5 or al, cl jz loc_4DE27; jumptable 000000000004DE25 cases 5,6 xor ebx, ebx xor edx, edx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE18compares_unorderedERKSD_SF_b; 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>::compares_unordered(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) jmp short loc_4E03F; jumptable 000000000004DE25 case 0 mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::operator==(unsigned __int8 *a1, unsigned __int8 *a2, __m128d a3) { unsigned int v3; // ebx unsigned __int8 v4; // al unsigned __int8 v5; // cl bool v6; // zf __m128d v7; // rt1 unsigned __int8 v8; // dl __m128d v9; // xmm0 __m128d v10; // xmm1 __m128d v11; // rt1 __int8 v12; // xmm1_1 unsigned __int8 v13; // cl __m128d v14; // xmm0 __m128d v15; // xmm1 __m128d v16; // rt1 __int8 v17; // bl __m128d v18; // rt1 long long *v19; // rax long long *v20; // rcx long long v21; // r14 long long v22; // r12 long long v23; // r15 _QWORD *v24; // rax _QWORD *v25; // rcx long long v26; // rdx _QWORD *v27; // rax _QWORD *v28; // rcx _QWORD *v29; // r15 _QWORD *v30; // r12 long long v31; // r14 long long v32; // rdx v4 = *a1; v5 = *a2; if ( *a1 != *a2 ) { if ( v5 ^ 7 | v4 ^ 5 ) { v8 = v5 ^ 5; if ( v5 ^ 5 | v4 ^ 7 ) { if ( v5 ^ 7 | v4 ^ 6 ) { v13 = v5 ^ 6; if ( v13 | v4 ^ 7 ) { if ( v8 | v4 ^ 6 && v13 | v4 ^ 5 ) { v3 = 0; 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>::compares_unordered( a1, a2, 0LL); } else { LABEL_3: v6 = *((_QWORD *)a1 + 1) == *((_QWORD *)a2 + 1); LABEL_25: LOBYTE(v3) = v6; } return v3; } v14 = _mm_sub_pd( (__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a2 + 1), (__m128)xmmword_A7440), (__m128d)xmmword_A7450); v15 = _mm_unpackhi_pd(v14, v14); v15.m128d_f64[0] = v15.m128d_f64[0] + v14.m128d_f64[0]; v16.m128d_f64[0] = *((double *)a1 + 1); v12 = *(_OWORD *)&_mm_cmpeq_sd(v15, v16); } else { v9 = _mm_sub_pd( (__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_A7440), (__m128d)xmmword_A7450); v10 = _mm_unpackhi_pd(v9, v9); v10.m128d_f64[0] = v10.m128d_f64[0] + v9.m128d_f64[0]; v11.m128d_f64[0] = *((double *)a2 + 1); v12 = *(_OWORD *)&_mm_cmpeq_sd(v10, v11); } v17 = v12; return v17 & 1; } a3.m128d_f64[0] = (double)(int)*((_QWORD *)a2 + 1); LABEL_15: v18.m128d_f64[0] = *((double *)a1 + 1); LOBYTE(a3.m128d_f64[0]) = *(_OWORD *)&_mm_cmpeq_sd(a3, v18); } else { a3.m128d_f64[0] = (double)(int)*((_QWORD *)a1 + 1); v7.m128d_f64[0] = *((double *)a2 + 1); LOBYTE(a3.m128d_f64[0]) = *(_OWORD *)&_mm_cmpeq_sd(a3, v7); } v17 = LOBYTE(a3.m128d_f64[0]); return v17 & 1; } LOBYTE(v3) = 1; switch ( *a1 ) { case 0u: return v3; case 1u: v27 = (_QWORD *)*((_QWORD *)a1 + 1); v28 = (_QWORD *)*((_QWORD *)a2 + 1); v29 = (_QWORD *)*v27; v30 = (_QWORD *)v27[1]; if ( (_QWORD *)((char *)v30 - *v27) != (_QWORD *)(v28[1] - *v28) ) return 0; if ( v29 == v30 ) return v3; v31 = *v28 + 32LL; break; case 2u: v19 = (long long *)*((_QWORD *)a1 + 1); v20 = (long long *)*((_QWORD *)a2 + 1); v21 = *v19; v22 = v19[1]; v23 = *v20; if ( v22 - *v19 != v20[1] - *v20 ) return 0; while ( v21 != v22 ) { v3 = nlohmann::json_abi_v3_11_3::operator==(v21, v23); if ( !(_BYTE)v3 ) break; v21 += 16LL; v23 += 16LL; } return v3; case 3u: v24 = (_QWORD *)*((_QWORD *)a1 + 1); v25 = (_QWORD *)*((_QWORD *)a2 + 1); v26 = v24[1]; if ( v26 != v25[1] ) return 0; if ( !v26 ) return v3; v6 = (unsigned int)bcmp(*v24, *v25, v26) == 0; goto LABEL_25; case 4u: v6 = a1[8] == a2[8]; goto LABEL_25; case 5u: case 6u: goto LABEL_3; case 7u: a3 = (__m128d)*((unsigned long long *)a2 + 1); goto LABEL_15; case 8u: return (unsigned int)std::__tuple_compare<std::tuple<std::vector<unsigned char> const&,unsigned long const&,bool const&>,std::tuple<std::vector<unsigned char> const&,unsigned long const&,bool const&>,0ul,3ul>::__eq(); default: return 0; } while ( 1 ) { v32 = v29[1]; if ( v32 != *(_QWORD *)(v31 - 24) || v32 && (unsigned int)bcmp(*v29, *(_QWORD *)(v31 - 32), v32) ) break; if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v29 + 4, v31) ) break; v29 += 6; v31 += 48LL; if ( v29 == v30 ) return v3; } return 0; }
operator==: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOVZX EAX,byte ptr [RDI] MOV CL,byte ptr [RSI] CMP AL,CL JNZ 0x0014de34 CMP EAX,0x8 JA 0x0014dffc MOV BL,0x1 MOV EAX,EAX LEA RCX,[0x1a7ad4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [RDI + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0014df85 LAB_0014de34: MOV EDX,EAX XOR DL,0x5 MOV R8D,ECX XOR R8B,0x7 OR DL,R8B JNZ 0x0014de56 CVTSI2SD XMM0,qword ptr [RDI + 0x8] CMPEQSD XMM0,qword ptr [RSI + 0x8] JMP 0x0014defc LAB_0014de56: MOV R9D,EAX XOR R9B,0x7 MOV EDX,ECX XOR DL,0x5 OR R9B,DL JNZ 0x0014de72 CVTSI2SD XMM0,qword ptr [RSI + 0x8] JMP 0x0014def6 LAB_0014de72: MOV R9D,EAX XOR R9B,0x6 OR R9B,R8B JNZ 0x0014dea6 MOVSD XMM0,qword ptr [RDI + 0x8] UNPCKLPS XMM0,xmmword ptr [0x001a7440] SUBPD XMM0,xmmword ptr [0x001a7450] MOVAPD XMM1,XMM0 UNPCKHPD XMM1,XMM0 ADDSD XMM1,XMM0 CMPEQSD XMM1,qword ptr [RSI + 0x8] JMP 0x0014dedf LAB_0014dea6: MOV R8D,EAX XOR R8B,0x7 XOR CL,0x6 OR R8B,CL JNZ 0x0014e04d MOVSD XMM0,qword ptr [RSI + 0x8] UNPCKLPS XMM0,xmmword ptr [0x001a7440] SUBPD XMM0,xmmword ptr [0x001a7450] MOVAPD XMM1,XMM0 UNPCKHPD XMM1,XMM0 ADDSD XMM1,XMM0 CMPEQSD XMM1,qword ptr [RDI + 0x8] LAB_0014dedf: MOVQ RBX,XMM1 JMP 0x0014df01 caseD_4: MOV AL,byte ptr [RDI + 0x8] CMP AL,byte ptr [RSI + 0x8] JMP 0x0014df85 caseD_7: MOVSD XMM0,qword ptr [RSI + 0x8] LAB_0014def6: CMPEQSD XMM0,qword ptr [RDI + 0x8] LAB_0014defc: MOVQ RBX,XMM0 LAB_0014df01: AND EBX,0x1 JMP 0x0014e03f caseD_2: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI + 0x8] MOV R14,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] MOV RAX,R12 SUB RAX,R14 MOV R15,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] SUB RCX,R15 CMP RAX,RCX JNZ 0x0014dffc LAB_0014df31: CMP R14,R12 JZ 0x0014e03f MOV RDI,R14 MOV RSI,R15 CALL 0x0014ddf6 MOV EBX,EAX TEST AL,AL JZ 0x0014e03f ADD R14,0x10 ADD R15,0x10 JMP 0x0014df31 caseD_3: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RAX + 0x8] CMP RDX,qword ptr [RCX + 0x8] JNZ 0x0014dffc TEST RDX,RDX JZ 0x0014e03f MOV RSI,qword ptr [RCX] MOV RDI,qword ptr [RAX] CALL 0x001186e0 TEST EAX,EAX LAB_0014df85: SETZ BL JMP 0x0014e03f caseD_1: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI + 0x8] MOV R15,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] MOV RAX,R12 SUB RAX,R15 MOV R14,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] SUB RCX,R14 CMP RAX,RCX JNZ 0x0014dffc CMP R15,R12 JZ 0x0014e03f ADD R14,0x20 LAB_0014dfbe: MOV RDX,qword ptr [R15 + 0x8] CMP RDX,qword ptr [R14 + -0x18] JNZ 0x0014dffc TEST RDX,RDX JZ 0x0014dfdd MOV RSI,qword ptr [R14 + -0x20] MOV RDI,qword ptr [R15] CALL 0x001186e0 TEST EAX,EAX JNZ 0x0014dffc LAB_0014dfdd: LEA RDI,[R15 + 0x20] MOV RSI,R14 CALL 0x0014ddf6 TEST AL,AL JZ 0x0014dffc ADD R15,0x30 ADD R14,0x30 CMP R15,R12 JNZ 0x0014dfbe JMP 0x0014e03f LAB_0014dffc: XOR EBX,EBX JMP 0x0014e03f caseD_8: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI + 0x8] LEA RDX,[RAX + 0x18] LEA RSI,[RAX + 0x20] LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],RSI MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RDI + 0x10],RAX LEA RAX,[RCX + 0x18] LEA RDX,[RCX + 0x20] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RDX MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI + 0x10],RCX LAB_0014e038: CALL 0x0014e0d6 MOV EBX,EAX caseD_0: MOV EAX,EBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_0014e04d: MOV R8D,EAX XOR R8B,0x6 OR R8B,DL JZ 0x0014de27 XOR AL,0x5 OR AL,CL JZ 0x0014de27 XOR EBX,EBX XOR EDX,EDX CALL 0x0014e07a JMP 0x0014e03f
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* nlohmann::json_abi_v3_11_3::TEMPNAMEPLACEHOLDERVALUE(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&) */ ulong nlohmann::json_abi_v3_11_3::operator==(basic_json *param_1,basic_json *param_2) { basic_json bVar1; basic_json bVar2; basic_json *pbVar3; size_t sVar4; int8 *puVar5; long lVar6; double dVar7; char cVar8; int iVar9; uint uVar10; ulong unaff_RBX; basic_json *pbVar11; basic_json *pbVar12; int8 *puVar13; bool bVar14; long local_50; long local_48; long local_40; long local_38; long local_30; long local_28; bVar2 = *param_1; bVar1 = *param_2; if (bVar2 != bVar1) { if (bVar2 == (basic_json)0x5 && ((byte)bVar1 ^ 7) == 0) { bVar14 = (double)*(long *)(param_1 + 8) == *(double *)(param_2 + 8); } else { if (bVar2 == (basic_json)0x7 && ((byte)bVar1 ^ 5) == 0) { dVar7 = (double)*(long *)(param_2 + 8); goto LAB_0014def6; } if (bVar2 == (basic_json)0x6 && ((byte)bVar1 ^ 7) == 0) { bVar14 = ((double)CONCAT44(_UNK_001a7444,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) - _UNK_001a7458) + ((double)CONCAT44(_DAT_001a7440,(int)*(int8 *)(param_1 + 8)) - _DAT_001a7450) == *(double *)(param_2 + 8); } else { if (bVar2 != (basic_json)0x7 || ((byte)bVar1 ^ 6) != 0) { if ((bVar2 != (basic_json)0x6 || ((byte)bVar1 ^ 5) != 0) && (bVar2 != (basic_json)0x5 || ((byte)bVar1 ^ 6) != 0)) { unaff_RBX = 0; 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> ::compares_unordered(param_1,param_2,false); goto switchD_0014de25_caseD_0; } goto switchD_0014de25_caseD_5; } bVar14 = ((double)CONCAT44(_UNK_001a7444,(int)((ulong)*(int8 *)(param_2 + 8) >> 0x20)) - _UNK_001a7458) + ((double)CONCAT44(_DAT_001a7440,(int)*(int8 *)(param_2 + 8)) - _DAT_001a7450) == *(double *)(param_1 + 8); } } LAB_0014df01: unaff_RBX = (ulong)(-(uint)bVar14 & 1); goto switchD_0014de25_caseD_0; } if (8 < (byte)bVar2) goto LAB_0014dffc; unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),1); switch(bVar2) { case (basic_json)0x0: goto switchD_0014de25_caseD_0; case (basic_json)0x1: puVar13 = (int8 *)**(long **)(param_1 + 8); puVar5 = (int8 *)(*(long **)(param_1 + 8))[1]; lVar6 = **(long **)(param_2 + 8); if ((long)puVar5 - (long)puVar13 == (*(long **)(param_2 + 8))[1] - lVar6) { if (puVar13 != puVar5) { pbVar11 = (basic_json *)(lVar6 + 0x20); do { sVar4 = puVar13[1]; if ((sVar4 != *(size_t *)(pbVar11 + -0x18)) || (((sVar4 != 0 && (iVar9 = bcmp((void *)*puVar13,*(void **)(pbVar11 + -0x20),sVar4), iVar9 != 0)) || (cVar8 = operator==((basic_json *)(puVar13 + 4),pbVar11), cVar8 == '\0')))) goto LAB_0014dffc; puVar13 = puVar13 + 6; pbVar11 = pbVar11 + 0x30; } while (puVar13 != puVar5); } goto switchD_0014de25_caseD_0; } break; case (basic_json)0x2: pbVar11 = (basic_json *)**(long **)(param_1 + 8); pbVar3 = (basic_json *)(*(long **)(param_1 + 8))[1]; pbVar12 = (basic_json *)**(long **)(param_2 + 8); if ((long)pbVar3 - (long)pbVar11 == (*(long **)(param_2 + 8))[1] - (long)pbVar12) { for (; pbVar11 != pbVar3; pbVar11 = pbVar11 + 0x10) { uVar10 = operator==(pbVar11,pbVar12); unaff_RBX = (ulong)uVar10; if ((char)uVar10 == '\0') break; pbVar12 = pbVar12 + 0x10; } goto switchD_0014de25_caseD_0; } break; case (basic_json)0x3: sVar4 = (*(int8 **)(param_1 + 8))[1]; if (sVar4 == (*(int8 **)(param_2 + 8))[1]) { if (sVar4 == 0) goto switchD_0014de25_caseD_0; iVar9 = bcmp((void *)**(int8 **)(param_1 + 8),(void *)**(int8 **)(param_2 + 8), sVar4); bVar14 = iVar9 == 0; goto LAB_0014df85; } break; case (basic_json)0x4: bVar14 = param_1[8] == param_2[8]; goto LAB_0014df85; default: switchD_0014de25_caseD_5: bVar14 = *(long *)(param_1 + 8) == *(long *)(param_2 + 8); LAB_0014df85: unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),bVar14); goto switchD_0014de25_caseD_0; case (basic_json)0x7: dVar7 = *(double *)(param_2 + 8); LAB_0014def6: bVar14 = dVar7 == *(double *)(param_1 + 8); goto LAB_0014df01; case (basic_json)0x8: local_28 = *(long *)(param_1 + 8); local_40 = *(long *)(param_2 + 8); local_30 = local_28 + 0x18; local_38 = local_28 + 0x20; local_48 = local_40 + 0x18; local_50 = local_40 + 0x20; /* try { // try from 0014e038 to 0014e03c has its CatchHandler @ 0014e072 */ uVar10 = std:: __tuple_compare<std::tuple<std::vector<unsigned_char,std::allocator<unsigned_char>>const&,unsigned_long_const&,bool_const&>,std::tuple<std::vector<unsigned_char,std::allocator<unsigned_char>>const&,unsigned_long_const&,bool_const&>,0ul,3ul> ::__eq((tuple *)&local_38,(tuple *)&local_50); unaff_RBX = (ulong)uVar10; goto switchD_0014de25_caseD_0; } LAB_0014dffc: unaff_RBX = 0; switchD_0014de25_caseD_0: return unaff_RBX & 0xffffffff; }
1,252
my_coll_parser_scan_reset_before
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_reset_before(MY_COLL_RULE_PARSER *p) { MY_COLL_LEXEM *lexem= my_coll_parser_curr(p); if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before primary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 1]"))) { p->rule.before_level= 1; } else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before secondary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 2]"))) { p->rule.before_level= 2; } else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before tertiary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 3]"))) { p->rule.before_level= 3; } else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before quaternary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 4]"))) { p->rule.before_level= 4; } else { p->rule.before_level= 0; return 0; /* Don't scan thr next character */ } return my_coll_parser_scan(p); }
O0
c
my_coll_parser_scan_reset_before: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x4e7e0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x2c69a(%rip), %rsi # 0x7b9ce movl $0x10, %edx callq 0x4ef60 cmpl $0x0, %eax je 0x4f35d movq -0x18(%rbp), %rdi leaq 0x2c691(%rip), %rsi # 0x7b9df movl $0xa, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f371 movq -0x10(%rbp), %rax movq $0x1, 0xe0(%rax) jmp 0x4f461 movq -0x18(%rbp), %rdi leaq 0x2c66e(%rip), %rsi # 0x7b9ea movl $0x12, %edx callq 0x4ef60 cmpl $0x0, %eax je 0x4f3a5 movq -0x18(%rbp), %rdi leaq 0x2c667(%rip), %rsi # 0x7b9fd movl $0xa, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f3b9 movq -0x10(%rbp), %rax movq $0x2, 0xe0(%rax) jmp 0x4f45f movq -0x18(%rbp), %rdi leaq 0x2c644(%rip), %rsi # 0x7ba08 movl $0x11, %edx callq 0x4ef60 cmpl $0x0, %eax je 0x4f3ed movq -0x18(%rbp), %rdi leaq 0x2c63c(%rip), %rsi # 0x7ba1a movl $0xa, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f3fe movq -0x10(%rbp), %rax movq $0x3, 0xe0(%rax) jmp 0x4f45d movq -0x18(%rbp), %rdi leaq 0x2c61c(%rip), %rsi # 0x7ba25 movl $0x13, %edx callq 0x4ef60 cmpl $0x0, %eax je 0x4f432 movq -0x18(%rbp), %rdi leaq 0x2c616(%rip), %rsi # 0x7ba39 movl $0xa, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f443 movq -0x10(%rbp), %rax movq $0x4, 0xe0(%rax) jmp 0x4f45b movq -0x10(%rbp), %rax movq $0x0, 0xe0(%rax) movl $0x0, -0x4(%rbp) jmp 0x4f46d jmp 0x4f45d jmp 0x4f45f jmp 0x4f461 movq -0x10(%rbp), %rdi callq 0x4efc0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_scan_reset_before: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call my_coll_parser_curr mov [rbp+var_18], rax mov rdi, [rbp+var_18] lea rsi, aBeforePrimary; "[before primary]" mov edx, 10h call lex_cmp cmp eax, 0 jz short loc_4F35D mov rdi, [rbp+var_18] lea rsi, aBefore1; "[before 1]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_4F371 loc_4F35D: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 1 jmp loc_4F461 loc_4F371: mov rdi, [rbp+var_18] lea rsi, aBeforeSecondar; "[before secondary]" mov edx, 12h call lex_cmp cmp eax, 0 jz short loc_4F3A5 mov rdi, [rbp+var_18] lea rsi, aBefore2; "[before 2]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_4F3B9 loc_4F3A5: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 2 jmp loc_4F45F loc_4F3B9: mov rdi, [rbp+var_18] lea rsi, aBeforeTertiary; "[before tertiary]" mov edx, 11h call lex_cmp cmp eax, 0 jz short loc_4F3ED mov rdi, [rbp+var_18] lea rsi, aBefore3; "[before 3]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_4F3FE loc_4F3ED: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 3 jmp short loc_4F45D loc_4F3FE: mov rdi, [rbp+var_18] lea rsi, aBeforeQuaterna; "[before quaternary]" mov edx, 13h call lex_cmp cmp eax, 0 jz short loc_4F432 mov rdi, [rbp+var_18] lea rsi, aBefore4; "[before 4]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_4F443 loc_4F432: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 4 jmp short loc_4F45B loc_4F443: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 0 mov [rbp+var_4], 0 jmp short loc_4F46D loc_4F45B: jmp short $+2 loc_4F45D: jmp short $+2 loc_4F45F: jmp short $+2 loc_4F461: mov rdi, [rbp+var_10] call my_coll_parser_scan mov [rbp+var_4], eax loc_4F46D: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_coll_parser_scan_reset_before(long long a1) { long long v2; // [rsp+8h] [rbp-18h] v2 = my_coll_parser_curr(a1); if ( !(unsigned int)lex_cmp(v2, (long long)"[before primary]", 0x10uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 1]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 1LL; return (unsigned int)my_coll_parser_scan(a1); } if ( !(unsigned int)lex_cmp(v2, (long long)"[before secondary]", 0x12uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 2]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 2LL; return (unsigned int)my_coll_parser_scan(a1); } if ( !(unsigned int)lex_cmp(v2, (long long)"[before tertiary]", 0x11uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 3]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 3LL; return (unsigned int)my_coll_parser_scan(a1); } if ( !(unsigned int)lex_cmp(v2, (long long)"[before quaternary]", 0x13uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 4]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 4LL; return (unsigned int)my_coll_parser_scan(a1); } *(_QWORD *)(a1 + 224) = 0LL; return 0; }
my_coll_parser_scan_reset_before: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014e7e0 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17b9ce] MOV EDX,0x10 CALL 0x0014ef60 CMP EAX,0x0 JZ 0x0014f35d MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17b9df] MOV EDX,0xa CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f371 LAB_0014f35d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x1 JMP 0x0014f461 LAB_0014f371: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17b9ea] MOV EDX,0x12 CALL 0x0014ef60 CMP EAX,0x0 JZ 0x0014f3a5 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17b9fd] MOV EDX,0xa CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f3b9 LAB_0014f3a5: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x2 JMP 0x0014f45f LAB_0014f3b9: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17ba08] MOV EDX,0x11 CALL 0x0014ef60 CMP EAX,0x0 JZ 0x0014f3ed MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17ba1a] MOV EDX,0xa CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f3fe LAB_0014f3ed: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x3 JMP 0x0014f45d LAB_0014f3fe: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17ba25] MOV EDX,0x13 CALL 0x0014ef60 CMP EAX,0x0 JZ 0x0014f432 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x17ba39] MOV EDX,0xa CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f443 LAB_0014f432: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x4 JMP 0x0014f45b LAB_0014f443: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014f46d LAB_0014f45b: JMP 0x0014f45d LAB_0014f45d: JMP 0x0014f45f LAB_0014f45f: JMP 0x0014f461 LAB_0014f461: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014efc0 MOV dword ptr [RBP + -0x4],EAX LAB_0014f46d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_coll_parser_scan_reset_before(long param_1) { int iVar1; int4 uVar2; int8 uVar3; uVar3 = my_coll_parser_curr(param_1); iVar1 = lex_cmp(uVar3,"[before primary]",0x10); if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 1]",10), iVar1 == 0)) { *(int8 *)(param_1 + 0xe0) = 1; } else { iVar1 = lex_cmp(uVar3,"[before secondary]",0x12); if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 2]",10), iVar1 == 0)) { *(int8 *)(param_1 + 0xe0) = 2; } else { iVar1 = lex_cmp(uVar3,"[before tertiary]",0x11); if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 3]",10), iVar1 == 0)) { *(int8 *)(param_1 + 0xe0) = 3; } else { iVar1 = lex_cmp(uVar3,"[before quaternary]",0x13); if ((iVar1 != 0) && (iVar1 = lex_cmp(uVar3,"[before 4]",10), iVar1 != 0)) { *(int8 *)(param_1 + 0xe0) = 0; return 0; } *(int8 *)(param_1 + 0xe0) = 4; } } } uVar2 = my_coll_parser_scan(param_1); return uVar2; }
1,253
js_date_getTimezoneOffset
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_getTimezoneOffset(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // getTimezoneOffset() double v; if (JS_ThisTimeValue(ctx, &v, this_val)) return JS_EXCEPTION; if (isnan(v)) return JS_NAN; else /* assuming -8.64e15 <= v <= -8.64e15 */ return js_int64(getTimezoneOffset((int64_t)trunc(v))); }
O2
c
js_date_getTimezoneOffset: pushq %rax movq %rdx, %rcx movq %rsi, %rdx movq %rsp, %rsi callq 0x4a403 testl %eax, %eax je 0x49f10 pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x49f32 movsd (%rsp), %xmm0 ucomisd %xmm0, %xmm0 jp 0x49f34 callq 0xe150 cvttsd2si %xmm0, %rdi callq 0x4a679 movslq %eax, %rdi callq 0x20a0b popq %rcx retq pushq $0x7 popq %rdx movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000 jmp 0x49f32
js_date_getTimezoneOffset: push rax mov rcx, rdx mov rdx, rsi mov rsi, rsp call JS_ThisTimeValue test eax, eax jz short loc_49F10 push 6 pop rdx xor eax, eax jmp short loc_49F32 loc_49F10: movsd xmm0, [rsp+8+var_8] ucomisd xmm0, xmm0 jp short loc_49F34 call _trunc cvttsd2si rdi, xmm0 call getTimezoneOffset movsxd rdi, eax call js_int64 loc_49F32: pop rcx retn loc_49F34: push 7 pop rdx mov rax, 7FF8000000000000h jmp short loc_49F32
long long js_date_getTimezoneOffset(long long a1, long long a2, long long a3) { double v3; // rax double v5; // xmm0_8 int TimezoneOffset; // eax double v7; // [rsp+0h] [rbp-8h] BYREF v7 = v3; if ( (unsigned int)JS_ThisTimeValue(a1, &v7, a2, a3) ) return 0LL; v5 = trunc(v7); TimezoneOffset = getTimezoneOffset((unsigned int)(int)v5); return js_int64(TimezoneOffset); }
js_date_getTimezoneOffset: PUSH RAX MOV RCX,RDX MOV RDX,RSI MOV RSI,RSP CALL 0x0014a403 TEST EAX,EAX JZ 0x00149f10 PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x00149f32 LAB_00149f10: MOVSD XMM0,qword ptr [RSP] UCOMISD XMM0,XMM0 JP 0x00149f34 CALL 0x0010e150 CVTTSD2SI RDI,XMM0 CALL 0x0014a679 MOVSXD RDI,EAX CALL 0x00120a0b LAB_00149f32: POP RCX RET LAB_00149f34: PUSH 0x7 POP RDX MOV RAX,0x7ff8000000000000 JMP 0x00149f32
int8 js_date_getTimezoneOffset(int8 param_1,int8 param_2,int8 param_3) { int iVar1; double in_RAX; int8 uVar2; double dVar3; double local_8; local_8 = in_RAX; iVar1 = JS_ThisTimeValue(param_1,&local_8,param_2,param_3); if (iVar1 == 0) { if (NAN(local_8)) { uVar2 = 0x7ff8000000000000; } else { dVar3 = trunc(local_8); iVar1 = getTimezoneOffset((long)dVar3); uVar2 = js_int64((long)iVar1); } } else { uVar2 = 0; } return uVar2; }
1,254
LefDefParser::defwHistory(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwHistory(const char *string) { char *c; defwFunc = DEFW_HISTORY; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (!defwDidInit) return DEFW_BAD_ORDER; if (string == 0 || *string == 0) return DEFW_BAD_DATA; for (c = (char*) string; *c; c++) if (*c == '\n') defwLines++; fprintf(defwFile, "HISTORY %s ;\n", string); defwLines++; defwState = DEFW_HISTORY; return DEFW_OK; }
O0
cpp
LefDefParser::defwHistory(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0x19d18(%rip), %rax # 0x2b168 movl $0xb, (%rax) leaq 0x19cfb(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x11470 movl $0x1, 0x14(%rsp) jmp 0x11535 leaq 0x19cfd(%rip), %rax # 0x2b174 cmpl $0x0, (%rax) jne 0x11489 movl $0x2, 0x14(%rsp) jmp 0x11535 cmpq $0x0, 0x8(%rsp) je 0x1149e movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x114ab movl $0x3, 0x14(%rsp) jmp 0x11535 movq 0x8(%rsp), %rax movq %rax, (%rsp) movq (%rsp), %rax cmpb $0x0, (%rax) je 0x114ee movq (%rsp), %rax movsbl (%rax), %eax cmpl $0xa, %eax jne 0x114de leaq 0x19c90(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x19c84(%rip), %rax # 0x2b160 movl %ecx, (%rax) jmp 0x114e0 movq (%rsp), %rax addq $0x1, %rax movq %rax, (%rsp) jmp 0x114b4 leaq 0x19c63(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x12aac(%rip), %rsi # 0x23fb0 movb $0x0, %al callq 0x10f0 leaq 0x19c4e(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x19c42(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0x19c3d(%rip), %rax # 0x2b164 movl $0xb, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
_ZN12LefDefParser11defwHistoryEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 0Bh lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_11470 mov [rsp+18h+var_4], 1 jmp loc_11535 loc_11470: lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit cmp dword ptr [rax], 0 jnz short loc_11489 mov [rsp+18h+var_4], 2 jmp loc_11535 loc_11489: cmp [rsp+18h+var_10], 0 jz short loc_1149E mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_114AB loc_1149E: mov [rsp+18h+var_4], 3 jmp loc_11535 loc_114AB: mov rax, [rsp+18h+var_10] mov [rsp+18h+var_18], rax loc_114B4: mov rax, [rsp+18h+var_18] cmp byte ptr [rax], 0 jz short loc_114EE mov rax, [rsp+18h+var_18] movsx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_114DE lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx loc_114DE: jmp short $+2 loc_114E0: mov rax, [rsp+18h+var_18] add rax, 1 mov [rsp+18h+var_18], rax jmp short loc_114B4 loc_114EE: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aHistoryS; "HISTORY %s ;\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 0Bh mov [rsp+18h+var_4], 0 loc_11535: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwHistory(LefDefParser *this, const char *a2) { LefDefParser *i; // [rsp+0h] [rbp-18h] LefDefParser::defwFunc = 11; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwDidInit ) { if ( this && *(_BYTE *)this ) { for ( i = this; *(_BYTE *)i; i = (LefDefParser *)((char *)i + 1) ) { if ( *(_BYTE *)i == 10 ) ++LefDefParser::defwLines; } fprintf(LefDefParser::defwFile, "HISTORY %s ;\n", (const char *)this); ++LefDefParser::defwLines; LefDefParser::defwState = 11; return 0; } else { return 3; } } else { return 2; } } else { return 1; } }
defwHistory: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x12b168] MOV dword ptr [RAX],0xb LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x00111470 MOV dword ptr [RSP + 0x14],0x1 JMP 0x00111535 LAB_00111470: LEA RAX,[0x12b174] CMP dword ptr [RAX],0x0 JNZ 0x00111489 MOV dword ptr [RSP + 0x14],0x2 JMP 0x00111535 LAB_00111489: CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011149e MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x001114ab LAB_0011149e: MOV dword ptr [RSP + 0x14],0x3 JMP 0x00111535 LAB_001114ab: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX LAB_001114b4: MOV RAX,qword ptr [RSP] CMP byte ptr [RAX],0x0 JZ 0x001114ee MOV RAX,qword ptr [RSP] MOVSX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x001114de LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LAB_001114de: JMP 0x001114e0 LAB_001114e0: MOV RAX,qword ptr [RSP] ADD RAX,0x1 MOV qword ptr [RSP],RAX JMP 0x001114b4 LAB_001114ee: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x123fb0] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0xb MOV dword ptr [RSP + 0x14],0x0 LAB_00111535: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwHistory(char const*) */ int4 LefDefParser::defwHistory(char *param_1) { char *local_18; int4 local_4; defwFunc = 0xb; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwDidInit == 0) { local_4 = 2; } else if ((param_1 == (char *)0x0) || (local_18 = param_1, *param_1 == '\0')) { local_4 = 3; } else { for (; *local_18 != '\0'; local_18 = local_18 + 1) { if (*local_18 == '\n') { defwLines = defwLines + 1; } } fprintf(defwFile,"HISTORY %s ;\n",param_1); defwLines = defwLines + 1; defwState = 0xb; local_4 = 0; } return local_4; }
1,255
minja::FilterTemplateToken::~FilterTemplateToken()
monkey531[P]llama/common/minja.hpp
FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter) : TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {}
O3
cpp
minja::FilterTemplateToken::~FilterTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x82d61(%rip), %rax # 0xe1e68 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x5f11c callq 0x348da leaq 0x820a5(%rip), %rax # 0xe11c8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x5f138 callq 0x348da movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1a740
_ZN5minja19FilterTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_5F11C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5F11C: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_5F138 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5F138: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::FilterTemplateToken::~FilterTemplateToken(minja::FilterTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::FilterTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~FilterTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1e1e68] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0015f11c CALL 0x001348da LAB_0015f11c: LEA RAX,[0x1e11c8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0015f138 CALL 0x001348da LAB_0015f138: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011a740
/* minja::FilterTemplateToken::~FilterTemplateToken() */ void __thiscall minja::FilterTemplateToken::~FilterTemplateToken(FilterTemplateToken *this) { *(int ***)this = &PTR__FilterTemplateToken_001e1e78; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_001e11d8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x40); return; }
1,256
ma_ck_write_btree
eloqsql/storage/maria/ma_write.c
static my_bool _ma_ck_write_btree(MARIA_HA *info, MARIA_KEY *key) { my_bool error; MARIA_KEYDEF *keyinfo= key->keyinfo; my_off_t *root= &info->s->state.key_root[keyinfo->key_nr]; DBUG_ENTER("_ma_ck_write_btree"); error= _ma_ck_write_btree_with_log(info, key, root, keyinfo->write_comp_flag | key->flag); if (info->ft1_to_ft2) { if (!error) error= _ma_ft_convert_to_ft2(info, key); delete_dynamic(info->ft1_to_ft2); my_free(info->ft1_to_ft2); info->ft1_to_ft2=0; } DBUG_RETURN(error); }
O0
c
ma_ck_write_btree: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x118(%rax), %rax movq -0x20(%rbp), %rcx movzbl 0xa5(%rcx), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x20(%rbp), %rax movl 0xb4(%rax), %ecx movq -0x10(%rbp), %rax orl 0x18(%rax), %ecx callq 0x66790 movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x320(%rax) je 0x62648 cmpb $0x0, -0x11(%rbp) jne 0x62619 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x73500 movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq 0x320(%rax), %rdi callq 0xdc730 movq -0x8(%rbp), %rax movq 0x320(%rax), %rdi callq 0xf5510 movq -0x8(%rbp), %rax movq $0x0, 0x320(%rax) jmp 0x6264a movb -0x11(%rbp), %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ma_ck_write_btree: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+118h] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+0A5h] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] mov rax, [rbp+var_20] mov ecx, [rax+0B4h] mov rax, [rbp+var_10] or ecx, [rax+18h] call _ma_ck_write_btree_with_log mov [rbp+var_11], al mov rax, [rbp+var_8] cmp qword ptr [rax+320h], 0 jz short loc_62648 cmp [rbp+var_11], 0 jnz short loc_62619 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _ma_ft_convert_to_ft2 mov [rbp+var_11], al loc_62619: mov rax, [rbp+var_8] mov rdi, [rax+320h] call delete_dynamic mov rax, [rbp+var_8] mov rdi, [rax+320h] call my_free mov rax, [rbp+var_8] mov qword ptr [rax+320h], 0 loc_62648: jmp short $+2 loc_6264A: mov al, [rbp+var_11] mov [rbp+var_29], al mov al, [rbp+var_29] add rsp, 30h pop rbp retn
char ma_ck_write_btree(_QWORD *a1, long long a2) { char v3; // [rsp+1Fh] [rbp-11h] v3 = ma_ck_write_btree_with_log( a1, a2, 8LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL) + *(_QWORD *)(*a1 + 280LL), (unsigned int)(*(_DWORD *)(a2 + 24) | *(_DWORD *)(*(_QWORD *)(a2 + 8) + 180LL))); if ( a1[100] ) { if ( !v3 ) v3 = ma_ft_convert_to_ft2(a1, a2); delete_dynamic(a1[100]); my_free(a1[100]); a1[100] = 0LL; } return v3; }
_ma_ck_write_btree: 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 + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x118] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0xa5] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0xb4] MOV RAX,qword ptr [RBP + -0x10] OR ECX,dword ptr [RAX + 0x18] CALL 0x00166790 MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x320],0x0 JZ 0x00162648 CMP byte ptr [RBP + -0x11],0x0 JNZ 0x00162619 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00173500 MOV byte ptr [RBP + -0x11],AL LAB_00162619: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x320] CALL 0x001dc730 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x320] CALL 0x001f5510 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x320],0x0 LAB_00162648: JMP 0x0016264a LAB_0016264a: MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x29],AL MOV AL,byte ptr [RBP + -0x29] ADD RSP,0x30 POP RBP RET
char _ma_ck_write_btree(long *param_1,long param_2) { char local_19; local_19 = _ma_ck_write_btree_with_log (param_1,param_2, *(long *)(*param_1 + 0x118) + (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 8, *(uint *)(*(long *)(param_2 + 8) + 0xb4) | *(uint *)(param_2 + 0x18)); if (param_1[100] != 0) { if (local_19 == '\0') { local_19 = _ma_ft_convert_to_ft2(param_1,param_2); } delete_dynamic(param_1[100]); my_free(param_1[100]); param_1[100] = 0; } return local_19; }
1,257
js_array_buffer_get_byteLength
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_get_byteLength(JSContext *ctx, JSValue this_val, int class_id) { JSArrayBuffer *abuf = JS_GetOpaque2(ctx, this_val, class_id); if (!abuf) return JS_EXCEPTION; /* return 0 if detached */ return js_uint32(abuf->byte_length); }
O1
c
js_array_buffer_get_byteLength: pushq %rax callq 0x269a1 testq %rax, %rax je 0x7ef32 movslq (%rax), %rcx xorl %esi, %esi movl %ecx, %eax cvtsi2sd %rax, %xmm0 testq %rcx, %rcx movq %xmm0, %rax cmovnsq %rcx, %rax movl $0x7, %edx cmovnsq %rsi, %rdx jmp 0x7ef39 movl $0x6, %edx xorl %eax, %eax popq %rcx retq
js_array_buffer_get_byteLength: push rax call JS_GetOpaque2 test rax, rax jz short loc_7EF32 movsxd rcx, dword ptr [rax] xor esi, esi mov eax, ecx cvtsi2sd xmm0, rax test rcx, rcx movq rax, xmm0 cmovns rax, rcx mov edx, 7 cmovns rdx, rsi jmp short loc_7EF39 loc_7EF32: mov edx, 6 xor eax, eax loc_7EF39: pop rcx retn
long long js_array_buffer_get_byteLength(long long a1, long long a2, int a3, unsigned int a4) { int *Opaque2; // rax long long v5; // rcx long long result; // rax Opaque2 = (int *)JS_GetOpaque2(a1, a2, a3, a4); if ( Opaque2 ) { v5 = *Opaque2; *(double *)&result = (double)*Opaque2; if ( v5 >= 0 ) return v5; } else { *(double *)&result = 0.0; } return result; }
js_array_buffer_get_byteLength: PUSH RAX CALL 0x001269a1 TEST RAX,RAX JZ 0x0017ef32 MOVSXD RCX,dword ptr [RAX] XOR ESI,ESI MOV EAX,ECX CVTSI2SD XMM0,RAX TEST RCX,RCX MOVQ RAX,XMM0 CMOVNS RAX,RCX MOV EDX,0x7 CMOVNS RDX,RSI JMP 0x0017ef39 LAB_0017ef32: MOV EDX,0x6 XOR EAX,EAX LAB_0017ef39: POP RCX RET
int1 [16] js_array_buffer_get_byteLength(void) { uint uVar1; uint *puVar2; double dVar3; double dVar4; int8 uVar5; int1 auVar6 [16]; puVar2 = (uint *)JS_GetOpaque2(); if (puVar2 == (uint *)0x0) { dVar3 = 0.0; uVar5 = 6; } else { uVar1 = *puVar2; dVar4 = (double)(long)(int)uVar1; dVar3 = (double)uVar1; if (-1 < (long)dVar4) { dVar3 = dVar4; } uVar5 = 7; if (-1 < (long)dVar4) { uVar5 = 0; } } auVar6._8_8_ = uVar5; auVar6._0_8_ = dVar3; return auVar6; }
1,258
int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<double>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
int PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints( int levelIndex, Index faceIndex, SparseMatrix<REAL> const & matrix, PatchDescriptor::Type patchType, Index const sourcePoints[], int sourcePointOffset, Index patchPoints[]) { // // If sharing local points, verify the type of this patch supports // sharing and disable it if not: // int numPatchPoints = matrix.GetNumRows(); int firstNewLocalPoint = _localPointOffset + _numLocalPoints; int nextNewLocalPoint = firstNewLocalPoint; ShareBits const* shareBitsPerPoint = _options.shareLocalPoints ? GetShareBitsPerType(patchType) : 0; bool shareLocalPointsForThisPatch = (shareBitsPerPoint != 0); int const * varyingIndices = 0; if (_stencilTableVarying) { varyingIndices = GetVaryingIndicesPerType(patchType); } bool applyVertexStencils = (_stencilTable.Get<REAL>() != 0); bool applyVaryingStencils = (varyingIndices != 0); // // When point-sharing is not enabled, all patch points are generally // new local points -- the exception to this occurs when "re-using" // source points, i.e. the resulting patch can be a mixture of source // and local points (typically when the irregular patch type is the // same as the regular patch type native to the scheme). // if (!shareLocalPointsForThisPatch) { if (!_options.reuseSourcePoints) { if (applyVertexStencils) { appendLocalPointStencils( matrix, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { for (int i = 0; i < numPatchPoints; ++i) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } } for (int i = 0; i < numPatchPoints; ++i) { patchPoints[i] = nextNewLocalPoint ++; } } else { for (int i = 0; i < numPatchPoints; ++i) { if (_options.reuseSourcePoints && (matrix.GetRowSize(i) == 1)) { patchPoints[i] = sourcePoints[matrix.GetRowColumns(i)[0]] + sourcePointOffset; continue; } if (applyVertexStencils) { appendLocalPointStencil( matrix, i, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } patchPoints[i] = nextNewLocalPoint ++; } } } else { // Gather topology info according to the sharing for this patch type // Level const & level = _refiner.getLevel(levelIndex); ConstIndexArray fCorners; ConstIndexArray fVerts; ConstIndexArray fEdges; bool fEdgeReversed[4]; bool fEdgeBoundary[4]; ShareBits const shareBitsForType = shareBitsPerPoint[numPatchPoints]; if (shareBitsForType) { if (shareBitsForType & SHARE_CORNER) { fCorners = (_fvarChannel < 0) ? level.getFaceVertices(faceIndex) : level.getFaceFVarValues(faceIndex, _fvarChannel); } if (shareBitsForType & SHARE_EDGE) { fEdges = level.getFaceEdges(faceIndex); fVerts = (_fvarChannel < 0) ? fCorners : level.getFaceVertices(faceIndex); Level::ETag fEdgeTags[4]; level.getFaceETags(faceIndex, fEdgeTags, _fvarChannel); for (int i = 0; i < fEdges.size(); ++i) { fEdgeReversed[i] = level.getEdgeVertices(fEdges[i])[0] != fVerts[i]; fEdgeBoundary[i] = fEdgeTags[i]._boundary; } } } // Inspect the sharing bits for each point -- if set, see if a local // point for the corresponding vertex/fvar-value or edge was // previously used: // for (int i = 0; i < numPatchPoints; ++i) { if (_options.reuseSourcePoints && (matrix.GetRowSize(i) == 1)) { patchPoints[i] = sourcePoints[matrix.GetRowColumns(i)[0]] + sourcePointOffset; continue; } int patchPoint = nextNewLocalPoint; if (shareBitsPerPoint[i]) { int index = shareBitsPerPoint[i] & SHARE_INDEX_MASK; if (shareBitsPerPoint[i] & SHARE_CORNER) { patchPoint = findSharedCornerPoint( levelIndex, fCorners[index], nextNewLocalPoint); } else if (!fEdgeBoundary[index]) { int edgeEnd = (((shareBitsPerPoint[i] & SHARE_EDGE_END) > 0) != fEdgeReversed[index]); patchPoint = findSharedEdgePoint( levelIndex, fEdges[index], edgeEnd, nextNewLocalPoint); } } if (patchPoint == nextNewLocalPoint) { if (applyVertexStencils) { appendLocalPointStencil( matrix, i, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } nextNewLocalPoint ++; } patchPoints[i] = patchPoint; } } int numNewLocalPoints = nextNewLocalPoint - firstNewLocalPoint; _numLocalPoints += numNewLocalPoints; return numNewLocalPoints; }
O1
cpp
int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<double>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, 0x30(%rsp) movl %edx, %r13d movl %esi, 0x24(%rsp) movq %rdi, %rbx movq %rcx, 0x18(%rsp) movl (%rcx), %r14d xorl %ecx, %ecx cmpl $0x9, %r8d leaq 0x4a636(%rip), %rax # 0xb9000 cmovneq %rcx, %rax cmpl $0x3, %r8d leaq 0x4a617(%rip), %r12 # 0xb8ff0 cmovneq %rax, %r12 movb 0x8(%rdi), %al testb $0x1, %al cmoveq %rcx, %r12 movl 0x10(%rdi), %ebp movb $0x1, %cl movl %ecx, 0x8(%rsp) cmpq $0x0, 0x50(%rdi) je 0x6ea19 addl $-0x3, %r8d cmpl $0x7, %r8d ja 0x6ea19 leaq 0x4a4b5(%rip), %rcx # 0xb8ebc movslq (%rcx,%r8,4), %rdx addq %rcx, %rdx jmpq *%rdx leaq 0x4a619(%rip), %rcx # 0xb9030 jmp 0x6ea46 movq $0x0, 0x10(%rsp) jmp 0x6ea53 leaq 0x4a655(%rip), %rcx # 0xb9080 jmp 0x6ea46 leaq 0x4a6cc(%rip), %rcx # 0xb9100 jmp 0x6ea46 leaq 0x4a603(%rip), %rcx # 0xb9040 jmp 0x6ea46 leaq 0x4a66a(%rip), %rcx # 0xb90b0 movq %rcx, 0x10(%rsp) movl $0x0, 0x8(%rsp) movq 0x98(%rsp), %rsi movslq %r14d, %r15 addl 0x14(%rbx), %ebp movq 0x48(%rbx), %rcx movq %rcx, 0x40(%rsp) testq %r12, %r12 je 0x6eaa8 movl %ebp, 0xc(%rsp) movzwl (%r12,%r15,2), %ebp testl %ebp, %ebp je 0x6eb41 movq (%rbx), %rax movslq 0x24(%rsp), %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %r15 testb $0x10, %bpl jne 0x6eb58 movq $0x0, 0x28(%rsp) jmp 0x6ec5e testb $0x2, %al jne 0x6eb7b movl %ebp, 0xc(%rsp) cmpq $0x0, 0x40(%rsp) movq 0x30(%rsp), %r13 movq 0x10(%rsp), %r12 movl 0x90(%rsp), %ecx je 0x6eb0c movq %rbx, %rdi movq 0x18(%rsp), %rsi movq %r13, %rdx callq 0x386c0 testl %r15d, %r15d setle %al movl 0x8(%rsp), %ecx orb %al, %cl jne 0x6eb0c xorl %ebp, %ebp movq %rbx, %rdi movq %r12, %rsi movl %ebp, %edx movq %r13, %rcx movl 0x90(%rsp), %r8d callq 0x3a020 incl %ebp cmpl %ebp, %r14d jne 0x6eaed movl 0xc(%rsp), %ebp movl %ebp, %r13d testl %r14d, %r14d movq 0x98(%rsp), %rdx jle 0x6ee3c movl %ebp, %eax xorl %r13d, %r13d leal (%rax,%r13), %ecx movl %ecx, (%rdx,%r13,4) incq %r13 cmpq %r13, %r14 jne 0x6eb29 addl %ebp, %r13d jmp 0x6ee3c movq $0x0, 0x38(%rsp) movq $0x0, 0x28(%rsp) jmp 0x6ed00 movl 0xc(%rbx), %edx testl %edx, %edx js 0x6ec3f movq %r15, %rdi movl %r13d, %esi callq 0x3af30 movq 0x98(%rsp), %rsi jmp 0x6ec59 movl %ebp, %r13d testl %r14d, %r14d movq 0x30(%rsp), %r12 jle 0x6ee3c xorl %r15d, %r15d movl %ebp, %r13d testb $0x2, 0x8(%rbx) je 0x6ebcb movq 0x18(%rsp), %rax movq 0x10(%rax), %rax movl 0x4(%rax,%r15,4), %ecx movslq (%rax,%r15,4), %rax subl %eax, %ecx cmpl $0x1, %ecx jne 0x6ebcb movq 0x18(%rsp), %rcx movq 0x28(%rcx), %rcx movslq (%rcx,%rax,4), %rax movl (%r12,%rax,4), %eax addl 0x90(%rsp), %eax jmp 0x6ec2a cmpq $0x0, 0x40(%rsp) je 0x6ec20 movq %rbx, %rdi movq 0x18(%rsp), %rsi movl %r15d, %edx movq %r12, %rcx movl 0x90(%rsp), %r8d callq 0x39190 movq 0x98(%rsp), %rsi cmpb $0x0, 0x8(%rsp) jne 0x6ec20 movq %rbx, %rdi movq 0x10(%rsp), %rsi movl %r15d, %edx movq %r12, %rcx movl 0x90(%rsp), %r8d callq 0x3a020 movq 0x98(%rsp), %rsi movl %r13d, %eax leal 0x1(%r13), %ecx movl %ecx, %r13d movl %eax, (%rsi,%r15,4) incq %r15 cmpq %r15, %r14 jne 0x6eb92 jmp 0x6ee3c leal 0x1(,%r13,2), %eax cltq movq 0x18(%r15), %rcx movslq (%rcx,%rax,4), %rax shlq $0x2, %rax addq 0x30(%r15), %rax movq %rax, 0x28(%rsp) testb $0x60, %bpl je 0x6ecf7 leal (,%r13,2), %eax movq %r13, %rsi leal 0x1(,%r13,2), %ecx movslq %ecx, %rcx movq 0x18(%r15), %rdx movslq (%rdx,%rcx,4), %rdi shlq $0x2, %rdi cltq movl (%rdx,%rax,4), %ebp movl 0xc(%rbx), %ecx movq 0x28(%rsp), %r13 testl %ecx, %ecx js 0x6eca2 movq 0x30(%r15), %r13 addq %rdi, %r13 addq 0x48(%r15), %rdi movq %rdi, 0x38(%rsp) leaq 0x4c(%rsp), %rdx movq %r15, %rdi callq 0x38400 movq 0x38(%rsp), %rsi testl %ebp, %ebp jle 0x6eced movq 0x78(%r15), %rax xorl %ecx, %ecx movslq (%rsi,%rcx,4), %rdx movl (%rax,%rdx,8), %edx cmpl (%r13,%rcx,4), %edx setne 0x54(%rsp,%rcx) movb 0x4c(%rsp,%rcx), %dl shrb %dl andb $0x1, %dl movb %dl, 0x50(%rsp,%rcx) incq %rcx cmpq %rcx, %rbp jne 0x6ecc7 movq 0x98(%rsp), %rsi jmp 0x6ed00 movq $0x0, 0x38(%rsp) movl 0xc(%rsp), %eax movl %eax, %r13d testl %r14d, %r14d jle 0x6ee38 xorl %r15d, %r15d movl 0xc(%rsp), %eax movl %eax, %r13d testb $0x2, 0x8(%rbx) je 0x6ed5a movq 0x18(%rsp), %rax movq 0x10(%rax), %rax movl 0x4(%rax,%r15,4), %ecx movslq (%rax,%r15,4), %rax subl %eax, %ecx cmpl $0x1, %ecx jne 0x6ed5a movq 0x18(%rsp), %rcx movq 0x28(%rcx), %rcx movslq (%rcx,%rax,4), %rax movq 0x30(%rsp), %rcx movl (%rcx,%rax,4), %ebp addl 0x90(%rsp), %ebp jmp 0x6ee28 movzwl (%r12,%r15,2), %eax movl %r13d, %ebp testl %eax, %eax je 0x6edc7 movl %eax, %edx andl $0xf, %edx testb $0x10, %al jne 0x6eda6 cmpb $0x0, 0x50(%rsp,%rdx) movl %r13d, %ebp jne 0x6edc7 shrl $0x6, %eax andl $0x1, %eax movzbl 0x54(%rsp,%rdx), %esi xorl %ecx, %ecx cmpl %esi, %eax setne %cl movl %edx, %eax movq 0x38(%rsp), %rdx movl (%rdx,%rax,4), %edx movq %rbx, %rdi movl 0x24(%rsp), %esi movl %r13d, %r8d callq 0x3bc00 jmp 0x6edbd movq 0x28(%rsp), %rax movl (%rax,%rdx,4), %edx movq %rbx, %rdi movl 0x24(%rsp), %esi movl %r13d, %ecx callq 0x3a5a0 movq 0x98(%rsp), %rsi movl %eax, %ebp cmpl %r13d, %ebp jne 0x6ee28 cmpq $0x0, 0x40(%rsp) je 0x6ee25 movq %rbx, %rdi movq 0x18(%rsp), %rsi movl %r15d, %edx movq 0x30(%rsp), %rcx movl 0x90(%rsp), %r8d callq 0x39190 movq 0x98(%rsp), %rsi cmpb $0x0, 0x8(%rsp) jne 0x6ee25 movq %rbx, %rdi movq 0x10(%rsp), %rsi movl %r15d, %edx movq 0x30(%rsp), %rcx movl 0x90(%rsp), %r8d callq 0x3a020 movq 0x98(%rsp), %rsi incl %r13d movl %ebp, (%rsi,%r15,4) incq %r15 cmpq %r15, %r14 jne 0x6ed1a movl 0xc(%rsp), %ebp subl %ebp, %r13d addl %r13d, 0x10(%rbx) movl %r13d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper22AppendLocalPatchPointsIfEEiiiRKNS1_12SparseMatrixIT_EENS1_15PatchDescriptor4TypeEPKiiPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_58], r9 mov r13d, edx mov [rsp+88h+var_64], esi mov rbx, rdi mov [rsp+88h+var_70], rcx mov r14d, [rcx] xor ecx, ecx cmp r8d, 9 lea rax, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_119GetShareBitsPerTypeENS1_15PatchDescriptor4TypeEE15gregoryQuadBits; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits cmovnz rax, rcx cmp r8d, 3 lea r12, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_119GetShareBitsPerTypeENS1_15PatchDescriptor4TypeEE14linearQuadBits; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits cmovnz r12, rax mov al, [rdi+8] test al, 1 cmovz r12, rcx mov ebp, [rdi+10h] mov cl, 1 mov [rsp+88h+var_80], ecx cmp qword ptr [rdi+50h], 0 jz short def_6EA0E; jumptable 000000000006EA0E default case, cases 7,8 add r8d, 0FFFFFFFDh; switch 8 cases cmp r8d, 7 ja short def_6EA0E; jumptable 000000000006EA0E default case, cases 7,8 lea rcx, jpt_6EA0E movsxd rdx, ds:(jpt_6EA0E - 0B8EBCh)[rcx+r8*4] add rdx, rcx jmp rdx; switch jump loc_6EA10: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE13linearIndices; jumptable 000000000006EA0E cases 3,4 jmp short loc_6EA46 def_6EA0E: mov [rsp+88h+var_78], 0; jumptable 000000000006EA0E default case, cases 7,8 jmp short loc_6EA53 loc_6EA24: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE16boxsplineIndices; jumptable 000000000006EA0E case 5 jmp short loc_6EA46 loc_6EA2D: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE17gregoryTriIndices; jumptable 000000000006EA0E case 10 jmp short loc_6EA46 loc_6EA36: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE14bsplineIndices; jumptable 000000000006EA0E case 6 jmp short loc_6EA46 loc_6EA3F: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE14gregoryIndices; jumptable 000000000006EA0E case 9 loc_6EA46: mov [rsp+88h+var_78], rcx mov [rsp+88h+var_80], 0 loc_6EA53: mov rsi, [rsp+88h+arg_8] movsxd r15, r14d add ebp, [rbx+14h] mov rcx, [rbx+48h] mov [rsp+88h+var_48], rcx test r12, r12 jz short loc_6EAA8 mov [rsp+88h+var_7C], ebp movzx ebp, word ptr [r12+r15*2] test ebp, ebp jz loc_6EB41 mov rax, [rbx] movsxd rcx, [rsp+88h+var_64] mov rax, [rax+30h] mov r15, [rax+rcx*8] test bpl, 10h jnz loc_6EB58 mov [rsp+88h+var_60], 0 jmp loc_6EC5E loc_6EAA8: test al, 2 jnz loc_6EB7B mov [rsp+88h+var_7C], ebp cmp [rsp+88h+var_48], 0 mov r13, [rsp+88h+var_58] mov r12, [rsp+88h+var_78] mov ecx, [rsp+88h+arg_0] jz short loc_6EB0C mov rdi, rbx mov rsi, [rsp+88h+var_70] mov rdx, r13 call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper24appendLocalPointStencilsIfEEvRKNS1_12SparseMatrixIT_EEPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencils<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int const*,int) test r15d, r15d setle al mov ecx, [rsp+88h+var_80] or cl, al jnz short loc_6EB0C xor ebp, ebp loc_6EAED: mov rdi, rbx mov rsi, r12 mov edx, ebp mov rcx, r13 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) inc ebp cmp r14d, ebp jnz short loc_6EAED loc_6EB0C: mov ebp, [rsp+88h+var_7C] mov r13d, ebp test r14d, r14d mov rdx, [rsp+88h+arg_8] jle loc_6EE3C mov eax, ebp xor r13d, r13d loc_6EB29: lea ecx, [rax+r13] mov [rdx+r13*4], ecx inc r13 cmp r14, r13 jnz short loc_6EB29 add r13d, ebp jmp loc_6EE3C loc_6EB41: mov [rsp+88h+var_50], 0 mov [rsp+88h+var_60], 0 jmp loc_6ED00 loc_6EB58: mov edx, [rbx+0Ch]; int test edx, edx js loc_6EC3F mov rdi, r15; this mov esi, r13d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) mov rsi, [rsp+88h+arg_8] jmp loc_6EC59 loc_6EB7B: mov r13d, ebp test r14d, r14d mov r12, [rsp+88h+var_58] jle loc_6EE3C xor r15d, r15d mov r13d, ebp loc_6EB92: test byte ptr [rbx+8], 2 jz short loc_6EBCB mov rax, [rsp+88h+var_70] mov rax, [rax+10h] mov ecx, [rax+r15*4+4] movsxd rax, dword ptr [rax+r15*4] sub ecx, eax cmp ecx, 1 jnz short loc_6EBCB mov rcx, [rsp+88h+var_70] mov rcx, [rcx+28h] movsxd rax, dword ptr [rcx+rax*4] mov eax, [r12+rax*4] add eax, [rsp+88h+arg_0] jmp short loc_6EC2A loc_6EBCB: cmp [rsp+88h+var_48], 0 jz short loc_6EC20 mov rdi, rbx mov rsi, [rsp+88h+var_70] mov edx, r15d mov rcx, r12 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper23appendLocalPointStencilIfEEvRKNS1_12SparseMatrixIT_EEiPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,int) mov rsi, [rsp+88h+arg_8] cmp byte ptr [rsp+88h+var_80], 0 jnz short loc_6EC20 mov rdi, rbx mov rsi, [rsp+88h+var_78] mov edx, r15d mov rcx, r12 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) mov rsi, [rsp+88h+arg_8] loc_6EC20: mov eax, r13d lea ecx, [r13+1] mov r13d, ecx loc_6EC2A: mov [rsi+r15*4], eax inc r15 cmp r14, r15 jnz loc_6EB92 jmp loc_6EE3C loc_6EC3F: lea eax, ds:1[r13*2] cdqe mov rcx, [r15+18h] movsxd rax, dword ptr [rcx+rax*4] shl rax, 2 add rax, [r15+30h] loc_6EC59: mov [rsp+88h+var_60], rax loc_6EC5E: test bpl, 60h jz loc_6ECF7 lea eax, ds:0[r13*2] mov rsi, r13 lea ecx, ds:1[r13*2] movsxd rcx, ecx mov rdx, [r15+18h] movsxd rdi, dword ptr [rdx+rcx*4] shl rdi, 2 cdqe mov ebp, [rdx+rax*4] mov ecx, [rbx+0Ch] mov r13, [rsp+88h+var_60] test ecx, ecx js short loc_6ECA2 mov r13, [r15+30h] add r13, rdi loc_6ECA2: add rdi, [r15+48h] mov [rsp+88h+var_50], rdi lea rdx, [rsp+88h+var_3C] mov rdi, r15 call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceETagsEiPNS3_4ETagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag *,int) mov rsi, [rsp+88h+var_50] test ebp, ebp jle short loc_6ECED mov rax, [r15+78h] xor ecx, ecx loc_6ECC7: movsxd rdx, dword ptr [rsi+rcx*4] mov edx, [rax+rdx*8] cmp edx, [r13+rcx*4+0] setnz [rsp+rcx+88h+var_34] mov dl, [rsp+rcx+88h+var_3C] shr dl, 1 and dl, 1 mov [rsp+rcx+88h+var_38], dl inc rcx cmp rbp, rcx jnz short loc_6ECC7 loc_6ECED: mov rsi, [rsp+88h+arg_8] jmp short loc_6ED00 loc_6ECF7: mov [rsp+88h+var_50], 0 loc_6ED00: mov eax, [rsp+88h+var_7C] mov r13d, eax test r14d, r14d jle loc_6EE38 xor r15d, r15d mov eax, [rsp+88h+var_7C] mov r13d, eax loc_6ED1A: test byte ptr [rbx+8], 2 jz short loc_6ED5A mov rax, [rsp+88h+var_70] mov rax, [rax+10h] mov ecx, [rax+r15*4+4] movsxd rax, dword ptr [rax+r15*4] sub ecx, eax cmp ecx, 1 jnz short loc_6ED5A mov rcx, [rsp+88h+var_70] mov rcx, [rcx+28h] movsxd rax, dword ptr [rcx+rax*4] mov rcx, [rsp+88h+var_58] mov ebp, [rcx+rax*4] add ebp, [rsp+88h+arg_0] jmp loc_6EE28 loc_6ED5A: movzx eax, word ptr [r12+r15*2] mov ebp, r13d test eax, eax jz short loc_6EDC7 mov edx, eax and edx, 0Fh test al, 10h jnz short loc_6EDA6 cmp [rsp+rdx+88h+var_38], 0 mov ebp, r13d jnz short loc_6EDC7 shr eax, 6 and eax, 1 movzx esi, [rsp+rdx+88h+var_34] xor ecx, ecx cmp eax, esi setnz cl; int mov eax, edx mov rdx, [rsp+88h+var_50] mov edx, [rdx+rax*4]; int mov rdi, rbx; this mov esi, [rsp+88h+var_64]; int mov r8d, r13d; int call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper19findSharedEdgePointEiiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedEdgePoint(int,int,int,int) jmp short loc_6EDBD loc_6EDA6: mov rax, [rsp+88h+var_60] mov edx, [rax+rdx*4]; int mov rdi, rbx; this mov esi, [rsp+88h+var_64]; int mov ecx, r13d; int call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper21findSharedCornerPointEiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedCornerPoint(int,int,int) loc_6EDBD: mov rsi, [rsp+88h+arg_8] mov ebp, eax loc_6EDC7: cmp ebp, r13d jnz short loc_6EE28 cmp [rsp+88h+var_48], 0 jz short loc_6EE25 mov rdi, rbx mov rsi, [rsp+88h+var_70] mov edx, r15d mov rcx, [rsp+88h+var_58] mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper23appendLocalPointStencilIfEEvRKNS1_12SparseMatrixIT_EEiPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,int) mov rsi, [rsp+88h+arg_8] cmp byte ptr [rsp+88h+var_80], 0 jnz short loc_6EE25 mov rdi, rbx mov rsi, [rsp+88h+var_78] mov edx, r15d mov rcx, [rsp+88h+var_58] mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) mov rsi, [rsp+88h+arg_8] loc_6EE25: inc r13d loc_6EE28: mov [rsi+r15*4], ebp inc r15 cmp r14, r15 jnz loc_6ED1A loc_6EE38: mov ebp, [rsp+88h+var_7C] loc_6EE3C: sub r13d, ebp add [rbx+10h], r13d mov eax, r13d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float>( OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *this, int a2, int a3, unsigned int *a4, int a5, long long a6, unsigned int a7, long long a8) { long long v10; // r14 _WORD *v11; // rax _WORD *v12; // r12 char v13; // al void *v14; // rcx long long v15; // rsi int v16; // ebp __int16 v17; // bp long long v18; // rax _QWORD *v19; // r15 unsigned int v20; // ebp int v21; // r13d long long j; // r13 int v23; // edx long long FaceFVarValues; // rax long long v25; // r15 long long v26; // rax int v27; // ecx long long v28; // rax unsigned int v29; // eax int v30; // esi long long v31; // rdx long long v32; // rdi long long v33; // rbp int v34; // ecx long long v35; // r13 long long v36; // rax long long i; // rcx long long v38; // r15 long long v39; // rax int v40; // ecx long long v41; // rax int v42; // ebp unsigned int v43; // eax long long v44; // rdx int SharedCornerPoint; // eax unsigned int v46; // r13d char v48; // [rsp+8h] [rbp-80h] int v49; // [rsp+Ch] [rbp-7Ch] int v50; // [rsp+Ch] [rbp-7Ch] void *v51; // [rsp+10h] [rbp-78h] long long v54; // [rsp+28h] [rbp-60h] long long v56; // [rsp+38h] [rbp-50h] long long v57; // [rsp+40h] [rbp-48h] _BYTE v58[60]; // [rsp+4Ch] [rbp-3Ch] BYREF v10 = *a4; v11 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits; if ( a5 != 9 ) v11 = 0LL; v12 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits; if ( a5 != 3 ) v12 = v11; v13 = *((_BYTE *)this + 8); if ( (v13 & 1) == 0 ) v12 = 0LL; v48 = 1; if ( *((_QWORD *)this + 10) ) { switch ( a5 ) { case 3: case 4: v14 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearIndices; break; case 5: v14 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::boxsplineIndices; break; case 6: v14 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::bsplineIndices; break; case 9: v14 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryIndices; break; case 10: v14 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryTriIndices; break; default: goto LABEL_10; } v51 = v14; v48 = 0; } else { LABEL_10: v51 = 0LL; } v15 = a8; v16 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); v57 = *((_QWORD *)this + 9); if ( v12 ) { v49 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); v17 = v12[(int)v10]; if ( v17 ) { v18 = *(_QWORD *)(*(_QWORD *)this + 48LL); v19 = *(_QWORD **)(v18 + 8LL * a2); if ( (v17 & 0x10) != 0 ) { v23 = *((_DWORD *)this + 3); if ( v23 < 0 ) { FaceFVarValues = v19[6] + 4LL * *(int *)(v19[3] + 4LL * (2 * a3 + 1)); } else { FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues( *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(v18 + 8LL * a2), a3, v23); v15 = a8; } v54 = FaceFVarValues; } else { v54 = 0LL; } if ( (v17 & 0x60) != 0 ) { v30 = a3; v31 = v19[3]; v32 = 4LL * *(int *)(v31 + 4LL * (2 * a3 + 1)); v33 = *(unsigned int *)(v31 + 8LL * a3); v34 = *((_DWORD *)this + 3); v35 = v54; if ( v34 >= 0 ) v35 = v32 + v19[6]; v56 = v19[9] + v32; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(v19, v30, (long long)v58, v34); if ( (int)v33 > 0 ) { v36 = v19[15]; for ( i = 0LL; i != v33; ++i ) { v58[i + 8] = *(_DWORD *)(v36 + 8LL * *(int *)(v56 + 4 * i)) != *(_DWORD *)(v35 + 4 * i); v58[i + 4] = (v58[i] & 2) != 0; } } v15 = a8; } else { v56 = 0LL; } } else { v56 = 0LL; v54 = 0LL; } v21 = v49; if ( (int)v10 > 0 ) { v38 = 0LL; v21 = v49; while ( (*((_BYTE *)this + 8) & 2) != 0 ) { v39 = *((_QWORD *)a4 + 2); v40 = *(_DWORD *)(v39 + 4 * v38 + 4); v41 = *(int *)(v39 + 4 * v38); if ( v40 - (_DWORD)v41 != 1 ) break; v42 = a7 + *(_DWORD *)(a6 + 4LL * *(int *)(*((_QWORD *)a4 + 5) + 4 * v41)); LABEL_69: *(_DWORD *)(v15 + 4 * v38++) = v42; if ( v10 == v38 ) goto LABEL_70; } v43 = (unsigned __int16)v12[v38]; v42 = v21; if ( v12[v38] ) { v44 = v43 & 0xF; if ( (v43 & 0x10) != 0 ) { SharedCornerPoint = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedCornerPoint( this, a2, *(_DWORD *)(v54 + 4 * v44), v21); } else { v42 = v21; if ( v58[v44 + 4] ) goto LABEL_64; SharedCornerPoint = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedEdgePoint( this, a2, *(_DWORD *)(v56 + 4LL * (v43 & 0xF)), ((v43 >> 6) & 1) != v58[(v43 & 0xF) + 8], v21); } v15 = a8; v42 = SharedCornerPoint; } LABEL_64: if ( v42 == v21 ) { if ( v57 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>( this, a4, (unsigned int)v38, a6, a7); v15 = a8; if ( !v48 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v51, (unsigned int)v38, a6, a7); v15 = a8; } } ++v21; } goto LABEL_69; } LABEL_70: v16 = v49; } else if ( (v13 & 2) != 0 ) { v21 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); if ( (int)v10 > 0 ) { v25 = 0LL; v21 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); do { if ( (*((_BYTE *)this + 8) & 2) != 0 && (v26 = *((_QWORD *)a4 + 2), v27 = *(_DWORD *)(v26 + 4 * v25 + 4), v28 = *(int *)(v26 + 4 * v25), v27 - (_DWORD)v28 == 1) ) { v29 = a7 + *(_DWORD *)(a6 + 4LL * *(int *)(*((_QWORD *)a4 + 5) + 4 * v28)); } else { if ( v57 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>( this, a4, (unsigned int)v25, a6, a7); v15 = a8; if ( !v48 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v51, (unsigned int)v25, a6, a7); v15 = a8; } } v29 = v21++; } *(_DWORD *)(v15 + 4 * v25++) = v29; } while ( v10 != v25 ); } } else { v50 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); if ( v57 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencils<float>(this, a4, a6, a7); if ( !(((int)v10 <= 0) | (unsigned __int8)v48) ) { v20 = 0; do OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v51, v20++, a6, a7); while ( (_DWORD)v10 != v20 ); } } v16 = v50; v21 = v50; if ( (int)v10 > 0 ) { for ( j = 0LL; j != v10; ++j ) *(_DWORD *)(a8 + 4 * j) = v50 + j; v21 = v50 + j; } } v46 = v21 - v16; *((_DWORD *)this + 4) += v46; return v46; }
AppendLocalPatchPoints<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RSP + 0x30],R9 MOV R13D,EDX MOV dword ptr [RSP + 0x24],ESI MOV RBX,RDI MOV qword ptr [RSP + 0x18],RCX MOV R14D,dword ptr [RCX] XOR ECX,ECX CMP R8D,0x9 LEA RAX,[0x1b9000] CMOVNZ RAX,RCX CMP R8D,0x3 LEA R12,[0x1b8ff0] CMOVNZ R12,RAX MOV AL,byte ptr [RDI + 0x8] TEST AL,0x1 CMOVZ R12,RCX MOV EBP,dword ptr [RDI + 0x10] MOV CL,0x1 MOV dword ptr [RSP + 0x8],ECX CMP qword ptr [RDI + 0x50],0x0 JZ 0x0016ea19 ADD R8D,-0x3 CMP R8D,0x7 JA 0x0016ea19 LEA RCX,[0x1b8ebc] MOVSXD RDX,dword ptr [RCX + R8*0x4] ADD RDX,RCX switchD: JMP RDX caseD_3: LEA RCX,[0x1b9030] JMP 0x0016ea46 caseD_7: MOV qword ptr [RSP + 0x10],0x0 JMP 0x0016ea53 caseD_5: LEA RCX,[0x1b9080] JMP 0x0016ea46 caseD_a: LEA RCX,[0x1b9100] JMP 0x0016ea46 caseD_6: LEA RCX,[0x1b9040] JMP 0x0016ea46 caseD_9: LEA RCX,[0x1b90b0] LAB_0016ea46: MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0x8],0x0 LAB_0016ea53: MOV RSI,qword ptr [RSP + 0x98] MOVSXD R15,R14D ADD EBP,dword ptr [RBX + 0x14] MOV RCX,qword ptr [RBX + 0x48] MOV qword ptr [RSP + 0x40],RCX TEST R12,R12 JZ 0x0016eaa8 MOV dword ptr [RSP + 0xc],EBP MOVZX EBP,word ptr [R12 + R15*0x2] TEST EBP,EBP JZ 0x0016eb41 MOV RAX,qword ptr [RBX] MOVSXD RCX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RAX + 0x30] MOV R15,qword ptr [RAX + RCX*0x8] TEST BPL,0x10 JNZ 0x0016eb58 MOV qword ptr [RSP + 0x28],0x0 JMP 0x0016ec5e LAB_0016eaa8: TEST AL,0x2 JNZ 0x0016eb7b MOV dword ptr [RSP + 0xc],EBP CMP qword ptr [RSP + 0x40],0x0 MOV R13,qword ptr [RSP + 0x30] MOV R12,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x90] JZ 0x0016eb0c MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,R13 CALL 0x001386c0 TEST R15D,R15D SETLE AL MOV ECX,dword ptr [RSP + 0x8] OR CL,AL JNZ 0x0016eb0c XOR EBP,EBP LAB_0016eaed: MOV RDI,RBX MOV RSI,R12 MOV EDX,EBP MOV RCX,R13 MOV R8D,dword ptr [RSP + 0x90] CALL 0x0013a020 INC EBP CMP R14D,EBP JNZ 0x0016eaed LAB_0016eb0c: MOV EBP,dword ptr [RSP + 0xc] MOV R13D,EBP TEST R14D,R14D MOV RDX,qword ptr [RSP + 0x98] JLE 0x0016ee3c MOV EAX,EBP XOR R13D,R13D LAB_0016eb29: LEA ECX,[RAX + R13*0x1] MOV dword ptr [RDX + R13*0x4],ECX INC R13 CMP R14,R13 JNZ 0x0016eb29 ADD R13D,EBP JMP 0x0016ee3c LAB_0016eb41: MOV qword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x28],0x0 JMP 0x0016ed00 LAB_0016eb58: MOV EDX,dword ptr [RBX + 0xc] TEST EDX,EDX JS 0x0016ec3f MOV RDI,R15 MOV ESI,R13D CALL 0x0013af30 MOV RSI,qword ptr [RSP + 0x98] JMP 0x0016ec59 LAB_0016eb7b: MOV R13D,EBP TEST R14D,R14D MOV R12,qword ptr [RSP + 0x30] JLE 0x0016ee3c XOR R15D,R15D MOV R13D,EBP LAB_0016eb92: TEST byte ptr [RBX + 0x8],0x2 JZ 0x0016ebcb MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + R15*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R15*0x4] SUB ECX,EAX CMP ECX,0x1 JNZ 0x0016ebcb MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX + 0x28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] MOV EAX,dword ptr [R12 + RAX*0x4] ADD EAX,dword ptr [RSP + 0x90] JMP 0x0016ec2a LAB_0016ebcb: CMP qword ptr [RSP + 0x40],0x0 JZ 0x0016ec20 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV EDX,R15D MOV RCX,R12 MOV R8D,dword ptr [RSP + 0x90] CALL 0x00139190 MOV RSI,qword ptr [RSP + 0x98] CMP byte ptr [RSP + 0x8],0x0 JNZ 0x0016ec20 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV EDX,R15D MOV RCX,R12 MOV R8D,dword ptr [RSP + 0x90] CALL 0x0013a020 MOV RSI,qword ptr [RSP + 0x98] LAB_0016ec20: MOV EAX,R13D LEA ECX,[R13 + 0x1] MOV R13D,ECX LAB_0016ec2a: MOV dword ptr [RSI + R15*0x4],EAX INC R15 CMP R14,R15 JNZ 0x0016eb92 JMP 0x0016ee3c LAB_0016ec3f: LEA EAX,[0x1 + R13*0x2] CDQE MOV RCX,qword ptr [R15 + 0x18] MOVSXD RAX,dword ptr [RCX + RAX*0x4] SHL RAX,0x2 ADD RAX,qword ptr [R15 + 0x30] LAB_0016ec59: MOV qword ptr [RSP + 0x28],RAX LAB_0016ec5e: TEST BPL,0x60 JZ 0x0016ecf7 LEA EAX,[R13*0x2] MOV RSI,R13 LEA ECX,[0x1 + R13*0x2] MOVSXD RCX,ECX MOV RDX,qword ptr [R15 + 0x18] MOVSXD RDI,dword ptr [RDX + RCX*0x4] SHL RDI,0x2 CDQE MOV EBP,dword ptr [RDX + RAX*0x4] MOV ECX,dword ptr [RBX + 0xc] MOV R13,qword ptr [RSP + 0x28] TEST ECX,ECX JS 0x0016eca2 MOV R13,qword ptr [R15 + 0x30] ADD R13,RDI LAB_0016eca2: ADD RDI,qword ptr [R15 + 0x48] MOV qword ptr [RSP + 0x38],RDI LEA RDX,[RSP + 0x4c] MOV RDI,R15 CALL 0x00138400 MOV RSI,qword ptr [RSP + 0x38] TEST EBP,EBP JLE 0x0016eced MOV RAX,qword ptr [R15 + 0x78] XOR ECX,ECX LAB_0016ecc7: MOVSXD RDX,dword ptr [RSI + RCX*0x4] MOV EDX,dword ptr [RAX + RDX*0x8] CMP EDX,dword ptr [R13 + RCX*0x4] SETNZ byte ptr [RSP + RCX*0x1 + 0x54] MOV DL,byte ptr [RSP + RCX*0x1 + 0x4c] SHR DL,0x1 AND DL,0x1 MOV byte ptr [RSP + RCX*0x1 + 0x50],DL INC RCX CMP RBP,RCX JNZ 0x0016ecc7 LAB_0016eced: MOV RSI,qword ptr [RSP + 0x98] JMP 0x0016ed00 LAB_0016ecf7: MOV qword ptr [RSP + 0x38],0x0 LAB_0016ed00: MOV EAX,dword ptr [RSP + 0xc] MOV R13D,EAX TEST R14D,R14D JLE 0x0016ee38 XOR R15D,R15D MOV EAX,dword ptr [RSP + 0xc] MOV R13D,EAX LAB_0016ed1a: TEST byte ptr [RBX + 0x8],0x2 JZ 0x0016ed5a MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + R15*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R15*0x4] SUB ECX,EAX CMP ECX,0x1 JNZ 0x0016ed5a MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX + 0x28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] MOV RCX,qword ptr [RSP + 0x30] MOV EBP,dword ptr [RCX + RAX*0x4] ADD EBP,dword ptr [RSP + 0x90] JMP 0x0016ee28 LAB_0016ed5a: MOVZX EAX,word ptr [R12 + R15*0x2] MOV EBP,R13D TEST EAX,EAX JZ 0x0016edc7 MOV EDX,EAX AND EDX,0xf TEST AL,0x10 JNZ 0x0016eda6 CMP byte ptr [RSP + RDX*0x1 + 0x50],0x0 MOV EBP,R13D JNZ 0x0016edc7 SHR EAX,0x6 AND EAX,0x1 MOVZX ESI,byte ptr [RSP + RDX*0x1 + 0x54] XOR ECX,ECX CMP EAX,ESI SETNZ CL MOV EAX,EDX MOV RDX,qword ptr [RSP + 0x38] MOV EDX,dword ptr [RDX + RAX*0x4] MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x24] MOV R8D,R13D CALL 0x0013bc00 JMP 0x0016edbd LAB_0016eda6: MOV RAX,qword ptr [RSP + 0x28] MOV EDX,dword ptr [RAX + RDX*0x4] MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x24] MOV ECX,R13D CALL 0x0013a5a0 LAB_0016edbd: MOV RSI,qword ptr [RSP + 0x98] MOV EBP,EAX LAB_0016edc7: CMP EBP,R13D JNZ 0x0016ee28 CMP qword ptr [RSP + 0x40],0x0 JZ 0x0016ee25 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV EDX,R15D MOV RCX,qword ptr [RSP + 0x30] MOV R8D,dword ptr [RSP + 0x90] CALL 0x00139190 MOV RSI,qword ptr [RSP + 0x98] CMP byte ptr [RSP + 0x8],0x0 JNZ 0x0016ee25 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV EDX,R15D MOV RCX,qword ptr [RSP + 0x30] MOV R8D,dword ptr [RSP + 0x90] CALL 0x0013a020 MOV RSI,qword ptr [RSP + 0x98] LAB_0016ee25: INC R13D LAB_0016ee28: MOV dword ptr [RSI + R15*0x4],EBP INC R15 CMP R14,R15 JNZ 0x0016ed1a LAB_0016ee38: MOV EBP,dword ptr [RSP + 0xc] LAB_0016ee3c: SUB R13D,EBP ADD dword ptr [RBX + 0x10],R13D MOV EAX,R13D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*) */ int __thiscall OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float> (LocalPointHelper *this,int param_1,int param_2,SparseMatrix *param_3,int param_5, int *param_6,int param_7,long param_8) { ushort uVar1; uint uVar2; int iVar3; long lVar4; Level *this_00; long lVar5; bool bVar6; int1 *puVar7; ulong uVar8; ulong uVar9; int iVar10; uint uVar11; int iVar12; int1 *puVar13; int iVar14; long lVar15; ulong uVar16; int *local_78; long local_60; long local_50; ETag local_3c [4]; byte abStack_38 [4]; byte abStack_34 [4]; uVar2 = *(uint *)param_3; uVar16 = (ulong)uVar2; puVar7 = (anonymous_namespace):: GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits; if (param_5 != 9) { puVar7 = (int1 *)0x0; } puVar13 = (anonymous_namespace):: GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits; if (param_5 != 3) { puVar13 = puVar7; } if (((byte)this[8] & 1) == 0) { puVar13 = (int1 *)0x0; } bVar6 = true; if (*(long *)(this + 0x50) == 0) { switchD_0016ea0e_caseD_7: local_78 = (int *)0x0; } else { switch(param_5) { case 3: case 4: local_78 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: linearIndices; break; case 5: local_78 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: boxsplineIndices; break; case 6: local_78 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: bsplineIndices; break; default: goto switchD_0016ea0e_caseD_7; case 9: local_78 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: gregoryIndices; break; case 10: local_78 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: gregoryTriIndices; } bVar6 = false; } iVar10 = *(int *)(this + 0x10) + *(int *)(this + 0x14); lVar4 = *(long *)(this + 0x48); iVar14 = iVar10; if (puVar13 == (int1 *)0x0) { if (((byte)this[8] & 2) == 0) { if ((lVar4 != 0) && (appendLocalPointStencils<float>(this,param_3,param_6,param_7), !bVar6 && 0 < (int)uVar2)) { uVar11 = 0; do { appendLocalPointVaryingStencil<float>(this,local_78,uVar11,param_6,param_7); uVar11 = uVar11 + 1; } while (uVar2 != uVar11); } if (0 < (int)uVar2) { uVar8 = 0; do { *(int *)(param_8 + uVar8 * 4) = iVar10 + (int)uVar8; uVar8 = uVar8 + 1; } while (uVar16 != uVar8); iVar14 = (int)uVar8 + iVar10; } } else if (0 < (int)uVar2) { uVar8 = 0; iVar12 = iVar10; do { if ((((byte)this[8] & 2) == 0) || (iVar3 = *(int *)(*(long *)(param_3 + 0x10) + uVar8 * 4), *(int *)(*(long *)(param_3 + 0x10) + 4 + uVar8 * 4) - iVar3 != 1)) { if (lVar4 != 0) { appendLocalPointStencil<float>(this,param_3,(int)uVar8,param_6,param_7); if (!bVar6) { appendLocalPointVaryingStencil<float>(this,local_78,(int)uVar8,param_6,param_7); } } iVar14 = iVar12 + 1; } else { iVar14 = iVar12; iVar12 = param_6[*(int *)(*(long *)(param_3 + 0x28) + (long)iVar3 * 4)] + param_7; } *(int *)(param_8 + uVar8 * 4) = iVar12; uVar8 = uVar8 + 1; iVar12 = iVar14; } while (uVar16 != uVar8); } } else { uVar1 = *(ushort *)(puVar13 + (long)(int)uVar2 * 2); if (uVar1 == 0) { local_50 = 0; local_60 = 0; } else { this_00 = *(Level **)(*(long *)(*(long *)this + 0x30) + (long)param_1 * 8); if ((uVar1 & 0x10) == 0) { local_60 = 0; } else if (*(int *)(this + 0xc) < 0) { local_60 = (long)*(int *)(*(long *)(this_00 + 0x18) + (long)(param_2 * 2 + 1) * 4) * 4 + *(long *)(this_00 + 0x30); } else { local_60 = Vtr::internal::Level::getFaceFVarValues(this_00,param_2,*(int *)(this + 0xc)); } if ((uVar1 & 0x60) == 0) { local_50 = 0; } else { local_50 = (long)*(int *)(*(long *)(this_00 + 0x18) + (long)(param_2 * 2 + 1) * 4) * 4; uVar11 = *(uint *)(*(long *)(this_00 + 0x18) + (long)(param_2 * 2) * 4); lVar15 = local_60; if (-1 < *(int *)(this + 0xc)) { lVar15 = *(long *)(this_00 + 0x30) + local_50; } local_50 = local_50 + *(long *)(this_00 + 0x48); Vtr::internal::Level::getFaceETags(this_00,param_2,local_3c,*(int *)(this + 0xc)); if (0 < (int)uVar11) { lVar5 = *(long *)(this_00 + 0x78); uVar8 = 0; do { abStack_34[uVar8] = *(int *)(lVar5 + (long)*(int *)(local_50 + uVar8 * 4) * 8) != *(int *)(lVar15 + uVar8 * 4); abStack_38[uVar8] = (byte)local_3c[uVar8] >> 1 & 1; uVar8 = uVar8 + 1; } while (uVar11 != uVar8); } } } if (0 < (int)uVar2) { uVar8 = 0; do { if ((((byte)this[8] & 2) == 0) || (iVar12 = *(int *)(*(long *)(param_3 + 0x10) + uVar8 * 4), *(int *)(*(long *)(param_3 + 0x10) + 4 + uVar8 * 4) - iVar12 != 1)) { uVar1 = *(ushort *)(puVar13 + uVar8 * 2); iVar12 = iVar14; if (uVar1 != 0) { uVar9 = (ulong)(uVar1 & 0xf); if ((uVar1 & 0x10) == 0) { if (abStack_38[uVar9] == 0) { iVar12 = findSharedEdgePoint(this,param_1,*(int *)(local_50 + uVar9 * 4), (uint)((uVar1 >> 6 & 1) != (ushort)abStack_34[uVar9]), iVar14); } } else { iVar12 = findSharedCornerPoint(this,param_1,*(int *)(local_60 + uVar9 * 4),iVar14); } } if (iVar12 == iVar14) { if (lVar4 != 0) { appendLocalPointStencil<float>(this,param_3,(int)uVar8,param_6,param_7); if (!bVar6) { appendLocalPointVaryingStencil<float>(this,local_78,(int)uVar8,param_6,param_7); } } iVar14 = iVar14 + 1; } } else { iVar12 = param_6[*(int *)(*(long *)(param_3 + 0x28) + (long)iVar12 * 4)] + param_7; } *(int *)(param_8 + uVar8 * 4) = iVar12; uVar8 = uVar8 + 1; } while (uVar16 != uVar8); } } *(int *)(this + 0x10) = *(int *)(this + 0x10) + (iVar14 - iVar10); return iVar14 - iVar10; }
1,259
int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<double>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
int PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints( int levelIndex, Index faceIndex, SparseMatrix<REAL> const & matrix, PatchDescriptor::Type patchType, Index const sourcePoints[], int sourcePointOffset, Index patchPoints[]) { // // If sharing local points, verify the type of this patch supports // sharing and disable it if not: // int numPatchPoints = matrix.GetNumRows(); int firstNewLocalPoint = _localPointOffset + _numLocalPoints; int nextNewLocalPoint = firstNewLocalPoint; ShareBits const* shareBitsPerPoint = _options.shareLocalPoints ? GetShareBitsPerType(patchType) : 0; bool shareLocalPointsForThisPatch = (shareBitsPerPoint != 0); int const * varyingIndices = 0; if (_stencilTableVarying) { varyingIndices = GetVaryingIndicesPerType(patchType); } bool applyVertexStencils = (_stencilTable.Get<REAL>() != 0); bool applyVaryingStencils = (varyingIndices != 0); // // When point-sharing is not enabled, all patch points are generally // new local points -- the exception to this occurs when "re-using" // source points, i.e. the resulting patch can be a mixture of source // and local points (typically when the irregular patch type is the // same as the regular patch type native to the scheme). // if (!shareLocalPointsForThisPatch) { if (!_options.reuseSourcePoints) { if (applyVertexStencils) { appendLocalPointStencils( matrix, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { for (int i = 0; i < numPatchPoints; ++i) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } } for (int i = 0; i < numPatchPoints; ++i) { patchPoints[i] = nextNewLocalPoint ++; } } else { for (int i = 0; i < numPatchPoints; ++i) { if (_options.reuseSourcePoints && (matrix.GetRowSize(i) == 1)) { patchPoints[i] = sourcePoints[matrix.GetRowColumns(i)[0]] + sourcePointOffset; continue; } if (applyVertexStencils) { appendLocalPointStencil( matrix, i, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } patchPoints[i] = nextNewLocalPoint ++; } } } else { // Gather topology info according to the sharing for this patch type // Level const & level = _refiner.getLevel(levelIndex); ConstIndexArray fCorners; ConstIndexArray fVerts; ConstIndexArray fEdges; bool fEdgeReversed[4]; bool fEdgeBoundary[4]; ShareBits const shareBitsForType = shareBitsPerPoint[numPatchPoints]; if (shareBitsForType) { if (shareBitsForType & SHARE_CORNER) { fCorners = (_fvarChannel < 0) ? level.getFaceVertices(faceIndex) : level.getFaceFVarValues(faceIndex, _fvarChannel); } if (shareBitsForType & SHARE_EDGE) { fEdges = level.getFaceEdges(faceIndex); fVerts = (_fvarChannel < 0) ? fCorners : level.getFaceVertices(faceIndex); Level::ETag fEdgeTags[4]; level.getFaceETags(faceIndex, fEdgeTags, _fvarChannel); for (int i = 0; i < fEdges.size(); ++i) { fEdgeReversed[i] = level.getEdgeVertices(fEdges[i])[0] != fVerts[i]; fEdgeBoundary[i] = fEdgeTags[i]._boundary; } } } // Inspect the sharing bits for each point -- if set, see if a local // point for the corresponding vertex/fvar-value or edge was // previously used: // for (int i = 0; i < numPatchPoints; ++i) { if (_options.reuseSourcePoints && (matrix.GetRowSize(i) == 1)) { patchPoints[i] = sourcePoints[matrix.GetRowColumns(i)[0]] + sourcePointOffset; continue; } int patchPoint = nextNewLocalPoint; if (shareBitsPerPoint[i]) { int index = shareBitsPerPoint[i] & SHARE_INDEX_MASK; if (shareBitsPerPoint[i] & SHARE_CORNER) { patchPoint = findSharedCornerPoint( levelIndex, fCorners[index], nextNewLocalPoint); } else if (!fEdgeBoundary[index]) { int edgeEnd = (((shareBitsPerPoint[i] & SHARE_EDGE_END) > 0) != fEdgeReversed[index]); patchPoint = findSharedEdgePoint( levelIndex, fEdges[index], edgeEnd, nextNewLocalPoint); } } if (patchPoint == nextNewLocalPoint) { if (applyVertexStencils) { appendLocalPointStencil( matrix, i, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } nextNewLocalPoint ++; } patchPoints[i] = patchPoint; } } int numNewLocalPoints = nextNewLocalPoint - firstNewLocalPoint; _numLocalPoints += numNewLocalPoints; return numNewLocalPoints; }
O2
cpp
int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<double>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %r14 movl %edx, %r9d movl %esi, 0x1c(%rsp) movq %rdi, %rbx movq %rcx, 0x8(%rsp) movslq (%rcx), %r12 movl 0x10(%rdi), %r15d movb 0x8(%rdi), %bpl xorl %ecx, %ecx addl 0x14(%rdi), %r15d cmpl $0x9, %r8d leaq 0x4310c(%rip), %rax # 0xc35b0 cmovneq %rcx, %rax cmpl $0x3, %r8d leaq 0x430ed(%rip), %r13 # 0xc35a0 cmovneq %rax, %r13 testb $0x1, %bpl movl $0x0, %eax movq %rax, (%rsp) cmoveq %rcx, %r13 cmpq $0x0, 0x50(%rdi) movl %r15d, 0x18(%rsp) je 0x804eb movl %r8d, %edi movl %r9d, %r15d callq 0x7fff4 movl %r15d, %r9d movl 0x18(%rsp), %r15d movq %rax, (%rsp) movq 0x48(%rbx), %rax movq %rax, 0x30(%rsp) testq %r13, %r13 je 0x80542 movq %r14, 0x48(%rsp) movq %r13, 0x50(%rsp) movzwl (%r13,%r12,2), %r14d xorl %r13d, %r13d testl %r14d, %r14d je 0x805b2 movq (%rbx), %rax movslq 0x1c(%rsp), %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %rbp testb $0x10, %r14b movl %r9d, 0x14(%rsp) jne 0x805c9 movq $0x0, 0x20(%rsp) jmp 0x806e0 testb $0x2, %bpl jne 0x805e4 cmpq $0x0, 0x30(%rsp) je 0x80692 movq %r14, %r13 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r14, %rdx movl 0x90(%rsp), %ecx callq 0x4fba0 cmpq $0x0, (%rsp) je 0x80692 xorl %ebp, %ebp testl %r12d, %r12d movl $0x0, %r14d cmovgl %r12d, %r14d cmpl %ebp, %r14d je 0x80692 movq %rbx, %rdi movq (%rsp), %rsi movl %ebp, %edx movq %r13, %rcx movl 0x90(%rsp), %r8d callq 0x52400 incl %ebp jmp 0x8058c movq $0x0, 0x28(%rsp) movq $0x0, 0x20(%rsp) jmp 0x8076f movl 0xc(%rbx), %edx movq %rbp, %rdi movl %r9d, %esi testl %edx, %edx js 0x806d1 callq 0x53d20 jmp 0x806d6 xorl %r13d, %r13d testl %r12d, %r12d cmovlel %r13d, %r12d movl %r15d, %ebp cmpq %r13, %r12 je 0x806ba testb $0x2, 0x8(%rbx) je 0x80633 movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movl 0x4(%rax,%r13,4), %ecx movslq (%rax,%r13,4), %rax subl %eax, %ecx cmpl $0x1, %ecx jne 0x80633 movq 0x8(%rsp), %rcx movq 0x28(%rcx), %rcx movslq (%rcx,%rax,4), %rax movl (%r14,%rax,4), %eax addl 0x90(%rsp), %eax jmp 0x8067e cmpq $0x0, 0x30(%rsp) je 0x80677 movq %rbx, %rdi movq 0x8(%rsp), %rsi movl %r13d, %edx movq %r14, %rcx movl 0x90(%rsp), %r8d callq 0x50bb0 cmpq $0x0, (%rsp) je 0x80677 movq %rbx, %rdi movq (%rsp), %rsi movl %r13d, %edx movq %r14, %rcx movl 0x90(%rsp), %r8d callq 0x52400 movl %ebp, %eax leal 0x1(%rbp), %ecx movl %ecx, %ebp movq 0x98(%rsp), %rcx movl %eax, (%rcx,%r13,4) incq %r13 jmp 0x805f1 xorl %ebp, %ebp testl %r12d, %r12d cmovlel %ebp, %r12d movl %r15d, %eax cmpq %rbp, %r12 je 0x806b7 leaq (%rax,%rbp), %rcx movq 0x98(%rsp), %rdx movl %ecx, (%rdx,%rbp,4) incq %rbp jmp 0x8069e addl %r15d, %ebp subl %r15d, %ebp addl %ebp, 0x10(%rbx) movl %ebp, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x52db0 movq %rax, 0x20(%rsp) movl 0x14(%rsp), %r9d testb $0x60, %r14b je 0x80761 movq %rbp, %rdi movl %r9d, %esi callq 0x52d60 movq %rax, 0x28(%rsp) movl %edx, %r15d movl 0xc(%rbx), %ecx movq 0x20(%rsp), %r14 testl %ecx, %ecx js 0x80717 movq %rbp, %rdi movl 0x14(%rsp), %esi callq 0x52db0 movq %rax, %r14 movl 0xc(%rbx), %ecx leaq 0x3c(%rsp), %rdx movq %rbp, %rdi movl 0x14(%rsp), %esi callq 0x4f7b0 xorl %eax, %eax testl %r15d, %r15d cmovlel %eax, %r15d cmpq %rax, %r15 je 0x8076a movq 0x28(%rsp), %rcx movslq (%rcx,%rax,4), %rcx movq 0x78(%rbp), %rdx movl (%rdx,%rcx,8), %ecx cmpl (%r14,%rax,4), %ecx setne 0x44(%rsp,%rax) movb 0x3c(%rsp,%rax), %cl shrb %cl andb $0x1, %cl movb %cl, 0x40(%rsp,%rax) incq %rax jmp 0x80731 movq $0x0, 0x28(%rsp) movl 0x18(%rsp), %r15d testl %r12d, %r12d cmovlel %r13d, %r12d movl %r15d, %ebp movq 0x48(%rsp), %r14 cmpq %r13, %r12 je 0x806ba testb $0x2, 0x8(%rbx) je 0x807c3 movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movl 0x4(%rax,%r13,4), %ecx movslq (%rax,%r13,4), %rax subl %eax, %ecx cmpl $0x1, %ecx jne 0x807c3 movq 0x8(%rsp), %rcx movq 0x28(%rcx), %rcx movslq (%rcx,%rax,4), %rax movl (%r14,%rax,4), %eax addl 0x90(%rsp), %eax jmp 0x80871 movq 0x50(%rsp), %rax movzwl (%rax,%r13,2), %eax testl %eax, %eax je 0x80826 movl %eax, %edx andl $0xf, %edx testb $0x10, %al jne 0x8080c cmpb $0x0, 0x40(%rsp,%rdx) jne 0x80826 shrl $0x6, %eax andl $0x1, %eax movzbl 0x44(%rsp,%rdx), %esi xorl %ecx, %ecx cmpl %esi, %eax setne %cl movq 0x28(%rsp), %rax movl (%rax,%rdx,4), %edx movq %rbx, %rdi movl 0x1c(%rsp), %esi movl %ebp, %r8d callq 0x550c0 jmp 0x80822 movq 0x20(%rsp), %rax movl (%rax,%rdx,4), %edx movq %rbx, %rdi movl 0x1c(%rsp), %esi movl %ebp, %ecx callq 0x52ce0 cmpl %ebp, %eax jne 0x80871 cmpq $0x0, 0x30(%rsp) je 0x8086a movq %rbx, %rdi movq 0x8(%rsp), %rsi movl %r13d, %edx movq %r14, %rcx movl 0x90(%rsp), %r8d callq 0x50bb0 cmpq $0x0, (%rsp) je 0x8086a movq %rbx, %rdi movq (%rsp), %rsi movl %r13d, %edx movq %r14, %rcx movl 0x90(%rsp), %r8d callq 0x52400 movl %ebp, %eax leal 0x1(%rbp), %ecx movl %ecx, %ebp movq 0x98(%rsp), %rcx movl %eax, (%rcx,%r13,4) incq %r13 jmp 0x8077e nop
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper22AppendLocalPatchPointsIfEEiiiRKNS1_12SparseMatrixIT_EENS1_15PatchDescriptor4TypeEPKiiPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, r9 mov r9d, edx mov [rsp+88h+var_6C], esi mov rbx, rdi mov [rsp+88h+var_80], rcx movsxd r12, dword ptr [rcx] mov r15d, [rdi+10h] mov bpl, [rdi+8] xor ecx, ecx add r15d, [rdi+14h] cmp r8d, 9 lea rax, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_119GetShareBitsPerTypeENS1_15PatchDescriptor4TypeEE15gregoryQuadBits; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits cmovnz rax, rcx cmp r8d, 3 lea r13, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_119GetShareBitsPerTypeENS1_15PatchDescriptor4TypeEE14linearQuadBits; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits cmovnz r13, rax test bpl, 1 mov eax, 0 mov [rsp+88h+var_88], rax cmovz r13, rcx cmp qword ptr [rdi+50h], 0 mov [rsp+88h+var_70], r15d jz short loc_804EB mov edi, r8d mov r15d, r9d call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type) mov r9d, r15d mov r15d, [rsp+88h+var_70] mov [rsp+88h+var_88], rax loc_804EB: mov rax, [rbx+48h] mov [rsp+88h+var_58], rax test r13, r13 jz short loc_80542 mov [rsp+88h+var_40], r14 mov [rsp+88h+var_38], r13 movzx r14d, word ptr [r13+r12*2+0] xor r13d, r13d test r14d, r14d jz loc_805B2 mov rax, [rbx] movsxd rcx, [rsp+88h+var_6C] mov rax, [rax+30h] mov rbp, [rax+rcx*8] test r14b, 10h mov [rsp+88h+var_74], r9d jnz loc_805C9 mov [rsp+88h+var_68], 0 jmp loc_806E0 loc_80542: test bpl, 2 jnz loc_805E4 cmp [rsp+88h+var_58], 0 jz loc_80692 mov r13, r14 mov rdi, rbx mov rsi, [rsp+88h+var_80] mov rdx, r14 mov ecx, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper24appendLocalPointStencilsIfEEvRKNS1_12SparseMatrixIT_EEPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencils<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int const*,int) cmp [rsp+88h+var_88], 0 jz loc_80692 xor ebp, ebp test r12d, r12d mov r14d, 0 cmovg r14d, r12d loc_8058C: cmp r14d, ebp jz loc_80692 mov rdi, rbx mov rsi, [rsp+88h+var_88] mov edx, ebp mov rcx, r13 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) inc ebp jmp short loc_8058C loc_805B2: mov [rsp+88h+var_60], 0 mov [rsp+88h+var_68], 0 jmp loc_8076F loc_805C9: mov edx, [rbx+0Ch]; int mov rdi, rbp; this mov esi, r9d; int test edx, edx js loc_806D1 call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) jmp loc_806D6 loc_805E4: xor r13d, r13d test r12d, r12d cmovle r12d, r13d mov ebp, r15d loc_805F1: cmp r12, r13 jz loc_806BA test byte ptr [rbx+8], 2 jz short loc_80633 mov rax, [rsp+88h+var_80] mov rax, [rax+10h] mov ecx, [rax+r13*4+4] movsxd rax, dword ptr [rax+r13*4] sub ecx, eax cmp ecx, 1 jnz short loc_80633 mov rcx, [rsp+88h+var_80] mov rcx, [rcx+28h] movsxd rax, dword ptr [rcx+rax*4] mov eax, [r14+rax*4] add eax, [rsp+88h+arg_0] jmp short loc_8067E loc_80633: cmp [rsp+88h+var_58], 0 jz short loc_80677 mov rdi, rbx mov rsi, [rsp+88h+var_80] mov edx, r13d mov rcx, r14 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper23appendLocalPointStencilIfEEvRKNS1_12SparseMatrixIT_EEiPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,int) cmp [rsp+88h+var_88], 0 jz short loc_80677 mov rdi, rbx mov rsi, [rsp+88h+var_88] mov edx, r13d mov rcx, r14 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) loc_80677: mov eax, ebp lea ecx, [rbp+1] mov ebp, ecx loc_8067E: mov rcx, [rsp+88h+arg_8] mov [rcx+r13*4], eax inc r13 jmp loc_805F1 loc_80692: xor ebp, ebp test r12d, r12d cmovle r12d, ebp mov eax, r15d loc_8069E: cmp r12, rbp jz short loc_806B7 lea rcx, [rax+rbp] mov rdx, [rsp+88h+arg_8] mov [rdx+rbp*4], ecx inc rbp jmp short loc_8069E loc_806B7: add ebp, r15d loc_806BA: sub ebp, r15d add [rbx+10h], ebp mov eax, ebp add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_806D1: call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) loc_806D6: mov [rsp+88h+var_68], rax mov r9d, [rsp+88h+var_74] loc_806E0: test r14b, 60h jz short loc_80761 mov rdi, rbp; this mov esi, r9d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(int) mov [rsp+88h+var_60], rax mov r15d, edx mov ecx, [rbx+0Ch] mov r14, [rsp+88h+var_68] test ecx, ecx js short loc_80717 mov rdi, rbp; this mov esi, [rsp+88h+var_74]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) mov r14, rax mov ecx, [rbx+0Ch] loc_80717: lea rdx, [rsp+88h+var_4C] mov rdi, rbp mov esi, [rsp+88h+var_74] call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceETagsEiPNS3_4ETagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag *,int) xor eax, eax test r15d, r15d cmovle r15d, eax loc_80731: cmp r15, rax jz short loc_8076A mov rcx, [rsp+88h+var_60] movsxd rcx, dword ptr [rcx+rax*4] mov rdx, [rbp+78h] mov ecx, [rdx+rcx*8] cmp ecx, [r14+rax*4] setnz [rsp+rax+88h+var_44] mov cl, [rsp+rax+88h+var_4C] shr cl, 1 and cl, 1 mov [rsp+rax+88h+var_48], cl inc rax jmp short loc_80731 loc_80761: mov [rsp+88h+var_60], 0 loc_8076A: mov r15d, [rsp+88h+var_70] loc_8076F: test r12d, r12d cmovle r12d, r13d mov ebp, r15d mov r14, [rsp+88h+var_40] loc_8077E: cmp r12, r13 jz loc_806BA test byte ptr [rbx+8], 2 jz short loc_807C3 mov rax, [rsp+88h+var_80] mov rax, [rax+10h] mov ecx, [rax+r13*4+4] movsxd rax, dword ptr [rax+r13*4] sub ecx, eax cmp ecx, 1 jnz short loc_807C3 mov rcx, [rsp+88h+var_80] mov rcx, [rcx+28h] movsxd rax, dword ptr [rcx+rax*4] mov eax, [r14+rax*4] add eax, [rsp+88h+arg_0] jmp loc_80871 loc_807C3: mov rax, [rsp+88h+var_38] movzx eax, word ptr [rax+r13*2] test eax, eax jz short loc_80826 mov edx, eax and edx, 0Fh test al, 10h jnz short loc_8080C cmp [rsp+rdx+88h+var_48], 0 jnz short loc_80826 shr eax, 6 and eax, 1 movzx esi, [rsp+rdx+88h+var_44] xor ecx, ecx cmp eax, esi setnz cl; int mov rax, [rsp+88h+var_60] mov edx, [rax+rdx*4]; int mov rdi, rbx; this mov esi, [rsp+88h+var_6C]; int mov r8d, ebp; int call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper19findSharedEdgePointEiiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedEdgePoint(int,int,int,int) jmp short loc_80822 loc_8080C: mov rax, [rsp+88h+var_68] mov edx, [rax+rdx*4]; int mov rdi, rbx; this mov esi, [rsp+88h+var_6C]; int mov ecx, ebp; int call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper21findSharedCornerPointEiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedCornerPoint(int,int,int) loc_80822: cmp eax, ebp jnz short loc_80871 loc_80826: cmp [rsp+88h+var_58], 0 jz short loc_8086A mov rdi, rbx mov rsi, [rsp+88h+var_80] mov edx, r13d mov rcx, r14 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper23appendLocalPointStencilIfEEvRKNS1_12SparseMatrixIT_EEiPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,int) cmp [rsp+88h+var_88], 0 jz short loc_8086A mov rdi, rbx mov rsi, [rsp+88h+var_88] mov edx, r13d mov rcx, r14 mov r8d, [rsp+88h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) loc_8086A: mov eax, ebp lea ecx, [rbp+1] mov ebp, ecx loc_80871: mov rcx, [rsp+88h+arg_8] mov [rcx+r13*4], eax inc r13 jmp loc_8077E
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float>( OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *this, int a2, unsigned int a3, int *a4, long long a5, long long a6, unsigned int a7, long long a8) { long long v9; // r9 long long v10; // r12 char v11; // bp int v12; // r15d unsigned __int16 *v13; // rax unsigned __int16 *v14; // r13 long long VaryingIndicesPerType; // rax int v17; // r14d long long v18; // r13 OpenSubdiv::v3_6_0::Vtr::internal::Level *v19; // rbp long long v20; // r13 unsigned int v21; // ebp int v22; // r14d int v23; // edx long long FaceVertices; // rax long long v25; // r13 int v26; // ebp long long v27; // rax int v28; // ecx long long v29; // rax unsigned int v30; // eax long long v31; // rbp unsigned int v32; // ebp unsigned int v34; // edx long long v35; // r15 int v36; // ecx long long v37; // r14 long long v38; // rax long long v39; // r14 long long v40; // rax int v41; // ecx long long v42; // rax unsigned int SharedCornerPoint; // eax unsigned int v44; // eax long long v45; // rdx long long v46; // [rsp+0h] [rbp-88h] unsigned int v48; // [rsp+14h] [rbp-74h] int v49; // [rsp+18h] [rbp-70h] long long v50; // [rsp+20h] [rbp-68h] long long FaceEdges; // [rsp+28h] [rbp-60h] long long v52; // [rsp+30h] [rbp-58h] _BYTE v53[12]; // [rsp+3Ch] [rbp-4Ch] BYREF long long v54; // [rsp+48h] [rbp-40h] unsigned __int16 *v55; // [rsp+50h] [rbp-38h] v9 = a3; v10 = *a4; v11 = *((_BYTE *)this + 8); v12 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); v13 = (unsigned __int16 *)&OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits; if ( (_DWORD)a5 != 9 ) v13 = 0LL; v14 = (unsigned __int16 *)&OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits; if ( (_DWORD)a5 != 3 ) v14 = v13; v46 = 0LL; if ( (v11 & 1) == 0 ) v14 = 0LL; v49 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); if ( *((_QWORD *)this + 10) ) { VaryingIndicesPerType = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(a5); v9 = a3; v12 = v49; v46 = VaryingIndicesPerType; } v52 = *((_QWORD *)this + 9); if ( v14 ) { v54 = a6; v55 = v14; v17 = v14[v10]; v18 = 0LL; if ( v17 ) { v19 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*(_QWORD *)(*(_QWORD *)this + 48LL) + 8LL * a2); v48 = v9; if ( (v17 & 0x10) != 0 ) { v23 = *((_DWORD *)this + 3); if ( v23 < 0 ) FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v19, v9); else FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(v19, v9, v23); v50 = FaceVertices; v9 = v48; } else { v50 = 0LL; } if ( (v17 & 0x60) != 0 ) { FaceEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(v19, v9); v35 = v34; v36 = *((_DWORD *)this + 3); v37 = v50; if ( v36 >= 0 ) { v37 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v19, v48); v36 = *((_DWORD *)this + 3); } OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(v19, v48, (long long)v53, v36); v38 = 0LL; if ( (int)v35 <= 0 ) v35 = 0LL; while ( v35 != v38 ) { v53[v38 + 8] = *(_DWORD *)(*((_QWORD *)v19 + 15) + 8LL * *(int *)(FaceEdges + 4 * v38)) != *(_DWORD *)(v37 + 4 * v38); v53[v38 + 4] = (v53[v38] & 2) != 0; ++v38; } } else { FaceEdges = 0LL; } v12 = v49; } else { FaceEdges = 0LL; v50 = 0LL; } if ( (int)v10 <= 0 ) v10 = 0LL; v26 = v12; v39 = v54; while ( 1 ) { if ( v10 == v18 ) goto LABEL_40; if ( (*((_BYTE *)this + 8) & 2) != 0 ) { v40 = *((_QWORD *)a4 + 2); v41 = *(_DWORD *)(v40 + 4 * v18 + 4); v42 = *(int *)(v40 + 4 * v18); if ( v41 - (_DWORD)v42 == 1 ) { SharedCornerPoint = a7 + *(_DWORD *)(v39 + 4LL * *(int *)(*((_QWORD *)a4 + 5) + 4 * v42)); goto LABEL_69; } } v44 = v55[v18]; if ( v55[v18] ) { v45 = v44 & 0xF; if ( (v44 & 0x10) != 0 ) { SharedCornerPoint = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedCornerPoint( this, a2, *(_DWORD *)(v50 + 4 * v45), v26); LABEL_64: if ( SharedCornerPoint != v26 ) goto LABEL_69; goto LABEL_65; } if ( !v53[v45 + 4] ) { SharedCornerPoint = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedEdgePoint( this, a2, *(_DWORD *)(FaceEdges + 4 * v45), ((v44 >> 6) & 1) != v53[v45 + 8], v26); goto LABEL_64; } } LABEL_65: if ( v52 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>( this, a4, (unsigned int)v18, v39, a7, v9); if ( v46 ) OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v46, (unsigned int)v18, v39, a7); } SharedCornerPoint = v26++; LABEL_69: *(_DWORD *)(a8 + 4 * v18++) = SharedCornerPoint; } } if ( (v11 & 2) != 0 ) { v25 = 0LL; if ( (int)v10 <= 0 ) v10 = 0LL; v26 = v12; while ( v10 != v25 ) { if ( (*((_BYTE *)this + 8) & 2) != 0 && (v27 = *((_QWORD *)a4 + 2), v28 = *(_DWORD *)(v27 + 4 * v25 + 4), v29 = *(int *)(v27 + 4 * v25), v28 - (_DWORD)v29 == 1) ) { v30 = a7 + *(_DWORD *)(a6 + 4LL * *(int *)(*((_QWORD *)a4 + 5) + 4 * v29)); } else { if ( v52 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>( this, a4, (unsigned int)v25, a6, a7, v9); if ( v46 ) OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v46, (unsigned int)v25, a6, a7); } v30 = v26++; } *(_DWORD *)(a8 + 4 * v25++) = v30; } } else { if ( v52 ) { v20 = a6; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencils<float>( this, a4, a6, a7, a5, v9); if ( v46 ) { v21 = 0; v22 = 0; if ( (int)v10 > 0 ) v22 = v10; while ( v22 != v21 ) OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v46, v21++, v20, a7); } } v31 = 0LL; if ( (int)v10 <= 0 ) v10 = 0LL; while ( v10 != v31 ) { *(_DWORD *)(a8 + 4 * v31) = v12 + v31; ++v31; } v26 = v12 + v31; } LABEL_40: v32 = v26 - v12; *((_DWORD *)this + 4) += v32; return v32; }
AppendLocalPatchPoints<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,R9 MOV R9D,EDX MOV dword ptr [RSP + 0x1c],ESI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RCX MOVSXD R12,dword ptr [RCX] MOV R15D,dword ptr [RDI + 0x10] MOV BPL,byte ptr [RDI + 0x8] XOR ECX,ECX ADD R15D,dword ptr [RDI + 0x14] CMP R8D,0x9 LEA RAX,[0x1c35b0] CMOVNZ RAX,RCX CMP R8D,0x3 LEA R13,[0x1c35a0] CMOVNZ R13,RAX TEST BPL,0x1 MOV EAX,0x0 MOV qword ptr [RSP],RAX CMOVZ R13,RCX CMP qword ptr [RDI + 0x50],0x0 MOV dword ptr [RSP + 0x18],R15D JZ 0x001804eb MOV EDI,R8D MOV R15D,R9D CALL 0x0017fff4 MOV R9D,R15D MOV R15D,dword ptr [RSP + 0x18] MOV qword ptr [RSP],RAX LAB_001804eb: MOV RAX,qword ptr [RBX + 0x48] MOV qword ptr [RSP + 0x30],RAX TEST R13,R13 JZ 0x00180542 MOV qword ptr [RSP + 0x48],R14 MOV qword ptr [RSP + 0x50],R13 MOVZX R14D,word ptr [R13 + R12*0x2] XOR R13D,R13D TEST R14D,R14D JZ 0x001805b2 MOV RAX,qword ptr [RBX] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + 0x30] MOV RBP,qword ptr [RAX + RCX*0x8] TEST R14B,0x10 MOV dword ptr [RSP + 0x14],R9D JNZ 0x001805c9 MOV qword ptr [RSP + 0x20],0x0 JMP 0x001806e0 LAB_00180542: TEST BPL,0x2 JNZ 0x001805e4 CMP qword ptr [RSP + 0x30],0x0 JZ 0x00180692 MOV R13,R14 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R14 MOV ECX,dword ptr [RSP + 0x90] CALL 0x0014fba0 CMP qword ptr [RSP],0x0 JZ 0x00180692 XOR EBP,EBP TEST R12D,R12D MOV R14D,0x0 CMOVG R14D,R12D LAB_0018058c: CMP R14D,EBP JZ 0x00180692 MOV RDI,RBX MOV RSI,qword ptr [RSP] MOV EDX,EBP MOV RCX,R13 MOV R8D,dword ptr [RSP + 0x90] CALL 0x00152400 INC EBP JMP 0x0018058c LAB_001805b2: MOV qword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x20],0x0 JMP 0x0018076f LAB_001805c9: MOV EDX,dword ptr [RBX + 0xc] MOV RDI,RBP MOV ESI,R9D TEST EDX,EDX JS 0x001806d1 CALL 0x00153d20 JMP 0x001806d6 LAB_001805e4: XOR R13D,R13D TEST R12D,R12D CMOVLE R12D,R13D MOV EBP,R15D LAB_001805f1: CMP R12,R13 JZ 0x001806ba TEST byte ptr [RBX + 0x8],0x2 JZ 0x00180633 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + R13*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R13*0x4] SUB ECX,EAX CMP ECX,0x1 JNZ 0x00180633 MOV RCX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RCX + 0x28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] MOV EAX,dword ptr [R14 + RAX*0x4] ADD EAX,dword ptr [RSP + 0x90] JMP 0x0018067e LAB_00180633: CMP qword ptr [RSP + 0x30],0x0 JZ 0x00180677 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV EDX,R13D MOV RCX,R14 MOV R8D,dword ptr [RSP + 0x90] CALL 0x00150bb0 CMP qword ptr [RSP],0x0 JZ 0x00180677 MOV RDI,RBX MOV RSI,qword ptr [RSP] MOV EDX,R13D MOV RCX,R14 MOV R8D,dword ptr [RSP + 0x90] CALL 0x00152400 LAB_00180677: MOV EAX,EBP LEA ECX,[RBP + 0x1] MOV EBP,ECX LAB_0018067e: MOV RCX,qword ptr [RSP + 0x98] MOV dword ptr [RCX + R13*0x4],EAX INC R13 JMP 0x001805f1 LAB_00180692: XOR EBP,EBP TEST R12D,R12D CMOVLE R12D,EBP MOV EAX,R15D LAB_0018069e: CMP R12,RBP JZ 0x001806b7 LEA RCX,[RAX + RBP*0x1] MOV RDX,qword ptr [RSP + 0x98] MOV dword ptr [RDX + RBP*0x4],ECX INC RBP JMP 0x0018069e LAB_001806b7: ADD EBP,R15D LAB_001806ba: SUB EBP,R15D ADD dword ptr [RBX + 0x10],EBP MOV EAX,EBP ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001806d1: CALL 0x00152db0 LAB_001806d6: MOV qword ptr [RSP + 0x20],RAX MOV R9D,dword ptr [RSP + 0x14] LAB_001806e0: TEST R14B,0x60 JZ 0x00180761 MOV RDI,RBP MOV ESI,R9D CALL 0x00152d60 MOV qword ptr [RSP + 0x28],RAX MOV R15D,EDX MOV ECX,dword ptr [RBX + 0xc] MOV R14,qword ptr [RSP + 0x20] TEST ECX,ECX JS 0x00180717 MOV RDI,RBP MOV ESI,dword ptr [RSP + 0x14] CALL 0x00152db0 MOV R14,RAX MOV ECX,dword ptr [RBX + 0xc] LAB_00180717: LEA RDX,[RSP + 0x3c] MOV RDI,RBP MOV ESI,dword ptr [RSP + 0x14] CALL 0x0014f7b0 XOR EAX,EAX TEST R15D,R15D CMOVLE R15D,EAX LAB_00180731: CMP R15,RAX JZ 0x0018076a MOV RCX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RCX + RAX*0x4] MOV RDX,qword ptr [RBP + 0x78] MOV ECX,dword ptr [RDX + RCX*0x8] CMP ECX,dword ptr [R14 + RAX*0x4] SETNZ byte ptr [RSP + RAX*0x1 + 0x44] MOV CL,byte ptr [RSP + RAX*0x1 + 0x3c] SHR CL,0x1 AND CL,0x1 MOV byte ptr [RSP + RAX*0x1 + 0x40],CL INC RAX JMP 0x00180731 LAB_00180761: MOV qword ptr [RSP + 0x28],0x0 LAB_0018076a: MOV R15D,dword ptr [RSP + 0x18] LAB_0018076f: TEST R12D,R12D CMOVLE R12D,R13D MOV EBP,R15D MOV R14,qword ptr [RSP + 0x48] LAB_0018077e: CMP R12,R13 JZ 0x001806ba TEST byte ptr [RBX + 0x8],0x2 JZ 0x001807c3 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + R13*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R13*0x4] SUB ECX,EAX CMP ECX,0x1 JNZ 0x001807c3 MOV RCX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RCX + 0x28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] MOV EAX,dword ptr [R14 + RAX*0x4] ADD EAX,dword ptr [RSP + 0x90] JMP 0x00180871 LAB_001807c3: MOV RAX,qword ptr [RSP + 0x50] MOVZX EAX,word ptr [RAX + R13*0x2] TEST EAX,EAX JZ 0x00180826 MOV EDX,EAX AND EDX,0xf TEST AL,0x10 JNZ 0x0018080c CMP byte ptr [RSP + RDX*0x1 + 0x40],0x0 JNZ 0x00180826 SHR EAX,0x6 AND EAX,0x1 MOVZX ESI,byte ptr [RSP + RDX*0x1 + 0x44] XOR ECX,ECX CMP EAX,ESI SETNZ CL MOV RAX,qword ptr [RSP + 0x28] MOV EDX,dword ptr [RAX + RDX*0x4] MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x1c] MOV R8D,EBP CALL 0x001550c0 JMP 0x00180822 LAB_0018080c: MOV RAX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RAX + RDX*0x4] MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x1c] MOV ECX,EBP CALL 0x00152ce0 LAB_00180822: CMP EAX,EBP JNZ 0x00180871 LAB_00180826: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0018086a MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV EDX,R13D MOV RCX,R14 MOV R8D,dword ptr [RSP + 0x90] CALL 0x00150bb0 CMP qword ptr [RSP],0x0 JZ 0x0018086a MOV RDI,RBX MOV RSI,qword ptr [RSP] MOV EDX,R13D MOV RCX,R14 MOV R8D,dword ptr [RSP + 0x90] CALL 0x00152400 LAB_0018086a: MOV EAX,EBP LEA ECX,[RBP + 0x1] MOV EBP,ECX LAB_00180871: MOV RCX,qword ptr [RSP + 0x98] MOV dword ptr [RCX + R13*0x4],EAX INC R13 JMP 0x0018077e
/* int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*) */ int __thiscall OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float> (LocalPointHelper *this,int param_1,int param_2,SparseMatrix *param_3,int param_5, int *param_6,int param_7,long param_8) { LocalPointHelper LVar1; ushort uVar2; uint uVar3; long lVar4; Level *this_00; int *piVar5; int iVar6; int1 *puVar7; long lVar8; ulong uVar9; int iVar10; uint uVar11; int iVar12; ulong uVar13; int1 *puVar14; ulong uVar15; uint uVar16; int iVar17; int1 auVar18 [12]; int *local_88; long local_68; long local_60; ETag local_4c [4]; byte abStack_48 [4]; byte abStack_44 [4]; int *local_40; int1 *local_38; uVar3 = *(uint *)param_3; LVar1 = this[8]; iVar17 = *(int *)(this + 0x10) + *(int *)(this + 0x14); puVar7 = (anonymous_namespace):: GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits; if (param_5 != 9) { puVar7 = (int1 *)0x0; } puVar14 = (anonymous_namespace):: GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits; if (param_5 != 3) { puVar14 = puVar7; } local_88 = (int *)0x0; if (((byte)LVar1 & 1) == 0) { puVar14 = (int1 *)0x0; } if (*(long *)(this + 0x50) != 0) { local_88 = (int *)(anonymous_namespace)::GetVaryingIndicesPerType(param_5); } lVar4 = *(long *)(this + 0x48); iVar12 = iVar17; if (puVar14 == (int1 *)0x0) { if (((byte)LVar1 & 2) == 0) { if ((lVar4 != 0) && (appendLocalPointStencils<float>(this,param_3,param_6,param_7), local_88 != (int *)0x0)) { uVar11 = 0; uVar16 = 0; if (0 < (int)uVar3) { uVar16 = uVar3; } for (; uVar16 != uVar11; uVar11 = uVar11 + 1) { appendLocalPointVaryingStencil<float>(this,local_88,uVar11,param_6,param_7); } } uVar13 = 0; uVar15 = (ulong)uVar3; if ((int)uVar3 < 1) { uVar15 = uVar13; } for (; uVar15 != uVar13; uVar13 = uVar13 + 1) { *(int *)(param_8 + uVar13 * 4) = iVar17 + (int)uVar13; } iVar12 = (int)uVar13 + iVar17; } else { uVar13 = 0; uVar15 = (ulong)uVar3; if ((int)uVar3 < 1) { uVar15 = uVar13; } for (; uVar15 != uVar13; uVar13 = uVar13 + 1) { if ((((byte)this[8] & 2) == 0) || (iVar10 = *(int *)(*(long *)(param_3 + 0x10) + uVar13 * 4), *(int *)(*(long *)(param_3 + 0x10) + 4 + uVar13 * 4) - iVar10 != 1)) { if (lVar4 != 0) { appendLocalPointStencil<float>(this,param_3,(int)uVar13,param_6,param_7); if (local_88 != (int *)0x0) { appendLocalPointVaryingStencil<float>(this,local_88,(int)uVar13,param_6,param_7); } } iVar6 = iVar12 + 1; iVar10 = iVar12; } else { iVar10 = param_6[*(int *)(*(long *)(param_3 + 0x28) + (long)iVar10 * 4)] + param_7; iVar6 = iVar12; } *(int *)(param_8 + uVar13 * 4) = iVar10; iVar12 = iVar6; } } } else { local_40 = param_6; local_38 = puVar14; uVar2 = *(ushort *)(puVar14 + (long)(int)uVar3 * 2); uVar15 = 0; if (uVar2 == 0) { local_60 = 0; local_68 = 0; } else { this_00 = *(Level **)(*(long *)(*(long *)this + 0x30) + (long)param_1 * 8); if ((uVar2 & 0x10) == 0) { local_68 = 0; } else if (*(int *)(this + 0xc) < 0) { local_68 = Vtr::internal::Level::getFaceVertices(this_00,param_2); } else { local_68 = Vtr::internal::Level::getFaceFVarValues(this_00,param_2,*(int *)(this + 0xc)); } if ((uVar2 & 0x60) == 0) { local_60 = 0; } else { auVar18 = Vtr::internal::Level::getFaceEdges(this_00,param_2); local_60 = auVar18._0_8_; iVar10 = *(int *)(this + 0xc); lVar8 = local_68; if (-1 < iVar10) { lVar8 = Vtr::internal::Level::getFaceVertices(this_00,param_2); iVar10 = *(int *)(this + 0xc); } Vtr::internal::Level::getFaceETags(this_00,param_2,local_4c,iVar10); uVar9 = 0; uVar13 = (ulong)auVar18._8_4_; if ((int)auVar18._8_4_ < 1) { uVar13 = uVar9; } for (; uVar13 != uVar9; uVar9 = uVar9 + 1) { abStack_44[uVar9] = *(int *)(*(long *)(this_00 + 0x78) + (long)*(int *)(local_60 + uVar9 * 4) * 8) != *(int *)(lVar8 + uVar9 * 4); abStack_48[uVar9] = (byte)local_4c[uVar9] >> 1 & 1; } } } piVar5 = local_40; uVar13 = (ulong)uVar3; if ((int)uVar3 < 1) { uVar13 = uVar15; } for (; uVar13 != uVar15; uVar15 = uVar15 + 1) { iVar10 = iVar12; if ((((byte)this[8] & 2) == 0) || (iVar6 = *(int *)(*(long *)(param_3 + 0x10) + uVar15 * 4), *(int *)(*(long *)(param_3 + 0x10) + 4 + uVar15 * 4) - iVar6 != 1)) { uVar2 = *(ushort *)(local_38 + uVar15 * 2); if (uVar2 != 0) { uVar9 = (ulong)(uVar2 & 0xf); if ((uVar2 & 0x10) == 0) { if (abStack_48[uVar9] != 0) goto LAB_00180826; iVar6 = findSharedEdgePoint(this,param_1,*(int *)(local_60 + uVar9 * 4), (uint)((uVar2 >> 6 & 1) != (ushort)abStack_44[uVar9]),iVar12 ); } else { iVar6 = findSharedCornerPoint(this,param_1,*(int *)(local_68 + uVar9 * 4),iVar12); } if (iVar6 != iVar12) goto LAB_00180871; } LAB_00180826: if (lVar4 != 0) { appendLocalPointStencil<float>(this,param_3,(int)uVar15,piVar5,param_7); if (local_88 != (int *)0x0) { appendLocalPointVaryingStencil<float>(this,local_88,(int)uVar15,piVar5,param_7); } } iVar10 = iVar12 + 1; iVar6 = iVar12; } else { iVar6 = piVar5[*(int *)(*(long *)(param_3 + 0x28) + (long)iVar6 * 4)] + param_7; } LAB_00180871: *(int *)(param_8 + uVar15 * 4) = iVar6; iVar12 = iVar10; } } *(int *)(this + 0x10) = *(int *)(this + 0x10) + (iVar12 - iVar17); return iVar12 - iVar17; }
1,260
int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<double>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
int PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints( int levelIndex, Index faceIndex, SparseMatrix<REAL> const & matrix, PatchDescriptor::Type patchType, Index const sourcePoints[], int sourcePointOffset, Index patchPoints[]) { // // If sharing local points, verify the type of this patch supports // sharing and disable it if not: // int numPatchPoints = matrix.GetNumRows(); int firstNewLocalPoint = _localPointOffset + _numLocalPoints; int nextNewLocalPoint = firstNewLocalPoint; ShareBits const* shareBitsPerPoint = _options.shareLocalPoints ? GetShareBitsPerType(patchType) : 0; bool shareLocalPointsForThisPatch = (shareBitsPerPoint != 0); int const * varyingIndices = 0; if (_stencilTableVarying) { varyingIndices = GetVaryingIndicesPerType(patchType); } bool applyVertexStencils = (_stencilTable.Get<REAL>() != 0); bool applyVaryingStencils = (varyingIndices != 0); // // When point-sharing is not enabled, all patch points are generally // new local points -- the exception to this occurs when "re-using" // source points, i.e. the resulting patch can be a mixture of source // and local points (typically when the irregular patch type is the // same as the regular patch type native to the scheme). // if (!shareLocalPointsForThisPatch) { if (!_options.reuseSourcePoints) { if (applyVertexStencils) { appendLocalPointStencils( matrix, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { for (int i = 0; i < numPatchPoints; ++i) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } } for (int i = 0; i < numPatchPoints; ++i) { patchPoints[i] = nextNewLocalPoint ++; } } else { for (int i = 0; i < numPatchPoints; ++i) { if (_options.reuseSourcePoints && (matrix.GetRowSize(i) == 1)) { patchPoints[i] = sourcePoints[matrix.GetRowColumns(i)[0]] + sourcePointOffset; continue; } if (applyVertexStencils) { appendLocalPointStencil( matrix, i, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } patchPoints[i] = nextNewLocalPoint ++; } } } else { // Gather topology info according to the sharing for this patch type // Level const & level = _refiner.getLevel(levelIndex); ConstIndexArray fCorners; ConstIndexArray fVerts; ConstIndexArray fEdges; bool fEdgeReversed[4]; bool fEdgeBoundary[4]; ShareBits const shareBitsForType = shareBitsPerPoint[numPatchPoints]; if (shareBitsForType) { if (shareBitsForType & SHARE_CORNER) { fCorners = (_fvarChannel < 0) ? level.getFaceVertices(faceIndex) : level.getFaceFVarValues(faceIndex, _fvarChannel); } if (shareBitsForType & SHARE_EDGE) { fEdges = level.getFaceEdges(faceIndex); fVerts = (_fvarChannel < 0) ? fCorners : level.getFaceVertices(faceIndex); Level::ETag fEdgeTags[4]; level.getFaceETags(faceIndex, fEdgeTags, _fvarChannel); for (int i = 0; i < fEdges.size(); ++i) { fEdgeReversed[i] = level.getEdgeVertices(fEdges[i])[0] != fVerts[i]; fEdgeBoundary[i] = fEdgeTags[i]._boundary; } } } // Inspect the sharing bits for each point -- if set, see if a local // point for the corresponding vertex/fvar-value or edge was // previously used: // for (int i = 0; i < numPatchPoints; ++i) { if (_options.reuseSourcePoints && (matrix.GetRowSize(i) == 1)) { patchPoints[i] = sourcePoints[matrix.GetRowColumns(i)[0]] + sourcePointOffset; continue; } int patchPoint = nextNewLocalPoint; if (shareBitsPerPoint[i]) { int index = shareBitsPerPoint[i] & SHARE_INDEX_MASK; if (shareBitsPerPoint[i] & SHARE_CORNER) { patchPoint = findSharedCornerPoint( levelIndex, fCorners[index], nextNewLocalPoint); } else if (!fEdgeBoundary[index]) { int edgeEnd = (((shareBitsPerPoint[i] & SHARE_EDGE_END) > 0) != fEdgeReversed[index]); patchPoint = findSharedEdgePoint( levelIndex, fEdges[index], edgeEnd, nextNewLocalPoint); } } if (patchPoint == nextNewLocalPoint) { if (applyVertexStencils) { appendLocalPointStencil( matrix, i, sourcePoints, sourcePointOffset); if (applyVaryingStencils) { appendLocalPointVaryingStencil<REAL>( varyingIndices, i, sourcePoints, sourcePointOffset); } } nextNewLocalPoint ++; } patchPoints[i] = patchPoint; } } int numNewLocalPoints = nextNewLocalPoint - firstNewLocalPoint; _numLocalPoints += numNewLocalPoints; return numNewLocalPoints; }
O3
cpp
int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<double>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, 0x30(%rsp) movq %rcx, %r12 movl %edx, %r9d movl %esi, 0x1c(%rsp) movq %rdi, %rbx movl (%rcx), %ebp xorl %ecx, %ecx cmpl $0x9, %r8d leaq 0x4c75b(%rip), %rax # 0xbc740 cmovneq %rcx, %rax cmpl $0x3, %r8d leaq 0x4c73c(%rip), %r13 # 0xbc730 cmovneq %rax, %r13 movb 0x8(%rdi), %al testb $0x1, %al cmoveq %rcx, %r13 movl 0x10(%rdi), %esi movb $0x1, %cl movl %ecx, 0x8(%rsp) cmpq $0x0, 0x50(%rdi) je 0x70034 addl $-0x3, %r8d cmpl $0x7, %r8d ja 0x70034 leaq 0x4c5da(%rip), %rcx # 0xbc5fc movslq (%rcx,%r8,4), %rdx addq %rcx, %rdx jmpq *%rdx leaq 0x4c73e(%rip), %rcx # 0xbc770 jmp 0x70061 movq $0x0, 0x10(%rsp) jmp 0x7006e leaq 0x4c77a(%rip), %rcx # 0xbc7c0 jmp 0x70061 leaq 0x4c7f1(%rip), %rcx # 0xbc840 jmp 0x70061 leaq 0x4c728(%rip), %rcx # 0xbc780 jmp 0x70061 leaq 0x4c78f(%rip), %rcx # 0xbc7f0 movq %rcx, 0x10(%rsp) movl $0x0, 0x8(%rsp) movq 0xa8(%rsp), %rdx movl 0xa0(%rsp), %r14d movslq %ebp, %r15 addl 0x14(%rbx), %esi movq 0x48(%rbx), %rcx movq %rcx, 0x38(%rsp) testq %r13, %r13 movl %esi, 0xc(%rsp) je 0x700dc movzwl (%r13,%r15,2), %r15d testl %r15d, %r15d movq %r13, 0x60(%rsp) je 0x70173 movq (%rbx), %rax movslq 0x1c(%rsp), %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %rdi testb $0x10, %r15b movq %r9, 0x58(%rsp) movq %rdi, 0x20(%rsp) jne 0x7018a movq $0x0, 0x28(%rsp) jmp 0x7028a testb $0x2, %al jne 0x701a6 cmpq $0x0, 0x38(%rsp) movq 0x30(%rsp), %r14 movq 0x10(%rsp), %r13 movl 0xa0(%rsp), %ecx je 0x7013b movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movl %ecx, %r12d callq 0x386c0 testl %r15d, %r15d setle %al movl 0x8(%rsp), %ecx orb %al, %cl jne 0x7013b xorl %r15d, %r15d movq %rbx, %rdi movq %r13, %rsi movl %r15d, %edx movq %r14, %rcx movl %r12d, %r8d callq 0x3a000 incl %r15d cmpl %r15d, %ebp jne 0x7011f movl 0xc(%rsp), %eax movl %eax, %r13d testl %ebp, %ebp movq 0xa8(%rsp), %rdx jle 0x70446 movl 0xc(%rsp), %eax xorl %r13d, %r13d leal (%rax,%r13), %ecx movl %ecx, (%rdx,%r13,4) incq %r13 cmpq %r13, %rbp jne 0x70159 addl 0xc(%rsp), %r13d jmp 0x70446 movq $0x0, 0x20(%rsp) movq $0x0, 0x28(%rsp) jmp 0x70339 movl 0xc(%rbx), %edx testl %edx, %edx js 0x70263 movl %r9d, %esi callq 0x3aef0 movl 0xc(%rsp), %esi jmp 0x7027d movl %esi, %r13d testl %ebp, %ebp movq 0x30(%rsp), %r14 jle 0x70446 xorl %r15d, %r15d movl 0xc(%rsp), %eax movl %eax, %r13d testb $0x2, 0x8(%rbx) je 0x701f1 movq 0x10(%r12), %rax movl 0x4(%rax,%r15,4), %ecx movslq (%rax,%r15,4), %rax subl %eax, %ecx cmpl $0x1, %ecx jne 0x701f1 movq 0x28(%r12), %rcx movslq (%rcx,%rax,4), %rax movl (%r14,%rax,4), %eax addl 0xa0(%rsp), %eax jmp 0x7024e cmpq $0x0, 0x38(%rsp) je 0x70244 movq %rbx, %rdi movq %r12, %rsi movl %r15d, %edx movq %r14, %rcx movl 0xa0(%rsp), %r8d callq 0x39180 movq 0xa8(%rsp), %rdx cmpb $0x0, 0x8(%rsp) jne 0x70244 movq %rbx, %rdi movq 0x10(%rsp), %rsi movl %r15d, %edx movq %r14, %rcx movl 0xa0(%rsp), %r8d callq 0x3a000 movq 0xa8(%rsp), %rdx movl %r13d, %eax leal 0x1(%r13), %ecx movl %ecx, %r13d movl %eax, (%rdx,%r15,4) incq %r15 cmpq %r15, %rbp jne 0x701c0 jmp 0x70446 leal 0x1(,%r9,2), %eax cltq movq 0x18(%rdi), %rcx movslq (%rcx,%rax,4), %rax shlq $0x2, %rax addq 0x30(%rdi), %rax movq %rax, 0x28(%rsp) movq 0xa8(%rsp), %rdx testb $0x60, %r15b je 0x70330 movq %r12, 0x50(%rsp) movq 0x58(%rsp), %rsi leal (%rsi,%rsi), %eax leal 0x1(,%rsi,2), %ecx movslq %ecx, %rcx movq 0x20(%rsp), %rdi movq 0x18(%rdi), %rdx movslq (%rdx,%rcx,4), %r12 shlq $0x2, %r12 cltq movl (%rdx,%rax,4), %r13d movl 0xc(%rbx), %ecx movq 0x28(%rsp), %r15 testl %ecx, %ecx js 0x702d5 movq 0x30(%rdi), %r15 addq %r12, %r15 addq 0x48(%rdi), %r12 leaq 0x44(%rsp), %rdx callq 0x38400 testl %r13d, %r13d jle 0x70318 movq 0x20(%rsp), %rax movq 0x78(%rax), %rax xorl %ecx, %ecx movslq (%r12,%rcx,4), %rdx movl (%rax,%rdx,8), %edx cmpl (%r15,%rcx,4), %edx setne 0x4c(%rsp,%rcx) movb 0x44(%rsp,%rcx), %dl shrb %dl andb $0x1, %dl movb %dl, 0x48(%rsp,%rcx) incq %rcx cmpq %rcx, %r13 jne 0x702f3 movq %r12, 0x20(%rsp) movl 0xc(%rsp), %esi movq 0xa8(%rsp), %rdx movq 0x50(%rsp), %r12 jmp 0x70339 movq $0x0, 0x20(%rsp) movl %esi, %r13d testl %ebp, %ebp jle 0x70446 xorl %r15d, %r15d movl 0xc(%rsp), %eax movl %eax, %r13d testb $0x2, 0x8(%rbx) je 0x70382 movq 0x10(%r12), %rax movl 0x4(%rax,%r15,4), %ecx movslq (%rax,%r15,4), %rax subl %eax, %ecx cmpl $0x1, %ecx jne 0x70382 movq 0x28(%r12), %rcx movslq (%rcx,%rax,4), %rax movq 0x30(%rsp), %rcx movl (%rcx,%rax,4), %eax addl %r14d, %eax jmp 0x70436 movq 0x60(%rsp), %rax movzwl (%rax,%r15,2), %eax testl %eax, %eax je 0x703e7 movl %eax, %edx andl $0xf, %edx testb $0x10, %al jne 0x703cb cmpb $0x0, 0x48(%rsp,%rdx) jne 0x703e7 shrl $0x6, %eax andl $0x1, %eax movzbl 0x4c(%rsp,%rdx), %esi xorl %ecx, %ecx cmpl %esi, %eax setne %cl movq 0x20(%rsp), %rax movl (%rax,%rdx,4), %edx movq %rbx, %rdi movl 0x1c(%rsp), %esi movl %r13d, %r8d callq 0x3bbc0 jmp 0x703e2 movq 0x28(%rsp), %rax movl (%rax,%rdx,4), %edx movq %rbx, %rdi movl 0x1c(%rsp), %esi movl %r13d, %ecx callq 0x3a580 cmpl %r13d, %eax jne 0x7042e cmpq $0x0, 0x38(%rsp) je 0x70424 movq %rbx, %rdi movq %r12, %rsi movl %r15d, %edx movq 0x30(%rsp), %rcx movl %r14d, %r8d callq 0x39180 cmpb $0x0, 0x8(%rsp) jne 0x70424 movq %rbx, %rdi movq 0x10(%rsp), %rsi movl %r15d, %edx movq 0x30(%rsp), %rcx movl %r14d, %r8d callq 0x3a000 movl %r13d, %eax leal 0x1(%r13), %ecx movl %ecx, %r13d movq 0xa8(%rsp), %rdx movl %eax, (%rdx,%r15,4) incq %r15 cmpq %r15, %rbp jne 0x7034e subl 0xc(%rsp), %r13d addl %r13d, 0x10(%rbx) movl %r13d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper22AppendLocalPatchPointsIfEEiiiRKNS1_12SparseMatrixIT_EENS1_15PatchDescriptor4TypeEPKiiPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_68], r9 mov r12, rcx mov r9d, edx mov [rsp+98h+var_7C], esi mov rbx, rdi mov ebp, [rcx] xor ecx, ecx cmp r8d, 9 lea rax, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_119GetShareBitsPerTypeENS1_15PatchDescriptor4TypeEE15gregoryQuadBits; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits cmovnz rax, rcx cmp r8d, 3 lea r13, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_119GetShareBitsPerTypeENS1_15PatchDescriptor4TypeEE14linearQuadBits; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits cmovnz r13, rax mov al, [rdi+8] test al, 1 cmovz r13, rcx mov esi, [rdi+10h] mov cl, 1 mov [rsp+98h+var_90], ecx cmp qword ptr [rdi+50h], 0 jz short def_70029; jumptable 0000000000070029 default case, cases 7,8 add r8d, 0FFFFFFFDh; switch 8 cases cmp r8d, 7 ja short def_70029; jumptable 0000000000070029 default case, cases 7,8 lea rcx, jpt_70029 movsxd rdx, ds:(jpt_70029 - 0BC5FCh)[rcx+r8*4] add rdx, rcx jmp rdx; switch jump loc_7002B: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE13linearIndices; jumptable 0000000000070029 cases 3,4 jmp short loc_70061 def_70029: mov [rsp+98h+var_88], 0; jumptable 0000000000070029 default case, cases 7,8 jmp short loc_7006E loc_7003F: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE16boxsplineIndices; jumptable 0000000000070029 case 5 jmp short loc_70061 loc_70048: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE17gregoryTriIndices; jumptable 0000000000070029 case 10 jmp short loc_70061 loc_70051: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE14bsplineIndices; jumptable 0000000000070029 case 6 jmp short loc_70061 loc_7005A: lea rcx, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_124GetVaryingIndicesPerTypeENS1_15PatchDescriptor4TypeEE14gregoryIndices; jumptable 0000000000070029 case 9 loc_70061: mov [rsp+98h+var_88], rcx mov [rsp+98h+var_90], 0 loc_7006E: mov rdx, [rsp+98h+arg_8] mov r14d, [rsp+98h+arg_0] movsxd r15, ebp add esi, [rbx+14h] mov rcx, [rbx+48h] mov [rsp+98h+var_60], rcx test r13, r13 mov [rsp+98h+var_8C], esi jz short loc_700DC movzx r15d, word ptr [r13+r15*2+0] test r15d, r15d mov [rsp+98h+var_38], r13 jz loc_70173 mov rax, [rbx] movsxd rcx, [rsp+98h+var_7C] mov rax, [rax+30h] mov rdi, [rax+rcx*8]; this test r15b, 10h mov [rsp+98h+var_40], r9 mov [rsp+98h+var_78], rdi jnz loc_7018A mov [rsp+98h+var_70], 0 jmp loc_7028A loc_700DC: test al, 2 jnz loc_701A6 cmp [rsp+98h+var_60], 0 mov r14, [rsp+98h+var_68] mov r13, [rsp+98h+var_88] mov ecx, [rsp+98h+arg_0] jz short loc_7013B mov rdi, rbx mov rsi, r12 mov rdx, r14 mov r12d, ecx call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper24appendLocalPointStencilsIfEEvRKNS1_12SparseMatrixIT_EEPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencils<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int const*,int) test r15d, r15d setle al mov ecx, [rsp+98h+var_90] or cl, al jnz short loc_7013B xor r15d, r15d loc_7011F: mov rdi, rbx mov rsi, r13 mov edx, r15d mov rcx, r14 mov r8d, r12d call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) inc r15d cmp ebp, r15d jnz short loc_7011F loc_7013B: mov eax, [rsp+98h+var_8C] mov r13d, eax test ebp, ebp mov rdx, [rsp+98h+arg_8] jle loc_70446 mov eax, [rsp+98h+var_8C] xor r13d, r13d loc_70159: lea ecx, [rax+r13] mov [rdx+r13*4], ecx inc r13 cmp rbp, r13 jnz short loc_70159 add r13d, [rsp+98h+var_8C] jmp loc_70446 loc_70173: mov [rsp+98h+var_78], 0 mov [rsp+98h+var_70], 0 jmp loc_70339 loc_7018A: mov edx, [rbx+0Ch]; int test edx, edx js loc_70263 mov esi, r9d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) mov esi, [rsp+98h+var_8C] jmp loc_7027D loc_701A6: mov r13d, esi test ebp, ebp mov r14, [rsp+98h+var_68] jle loc_70446 xor r15d, r15d mov eax, [rsp+98h+var_8C] mov r13d, eax loc_701C0: test byte ptr [rbx+8], 2 jz short loc_701F1 mov rax, [r12+10h] mov ecx, [rax+r15*4+4] movsxd rax, dword ptr [rax+r15*4] sub ecx, eax cmp ecx, 1 jnz short loc_701F1 mov rcx, [r12+28h] movsxd rax, dword ptr [rcx+rax*4] mov eax, [r14+rax*4] add eax, [rsp+98h+arg_0] jmp short loc_7024E loc_701F1: cmp [rsp+98h+var_60], 0 jz short loc_70244 mov rdi, rbx mov rsi, r12 mov edx, r15d mov rcx, r14 mov r8d, [rsp+98h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper23appendLocalPointStencilIfEEvRKNS1_12SparseMatrixIT_EEiPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,int) mov rdx, [rsp+98h+arg_8] cmp byte ptr [rsp+98h+var_90], 0 jnz short loc_70244 mov rdi, rbx mov rsi, [rsp+98h+var_88] mov edx, r15d mov rcx, r14 mov r8d, [rsp+98h+arg_0] call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) mov rdx, [rsp+98h+arg_8] loc_70244: mov eax, r13d lea ecx, [r13+1] mov r13d, ecx loc_7024E: mov [rdx+r15*4], eax inc r15 cmp rbp, r15 jnz loc_701C0 jmp loc_70446 loc_70263: lea eax, ds:1[r9*2] cdqe mov rcx, [rdi+18h] movsxd rax, dword ptr [rcx+rax*4] shl rax, 2 add rax, [rdi+30h] loc_7027D: mov [rsp+98h+var_70], rax mov rdx, [rsp+98h+arg_8] loc_7028A: test r15b, 60h jz loc_70330 mov [rsp+98h+var_48], r12 mov rsi, [rsp+98h+var_40] lea eax, [rsi+rsi] lea ecx, ds:1[rsi*2] movsxd rcx, ecx mov rdi, [rsp+98h+var_78] mov rdx, [rdi+18h] movsxd r12, dword ptr [rdx+rcx*4] shl r12, 2 cdqe mov r13d, [rdx+rax*4] mov ecx, [rbx+0Ch] mov r15, [rsp+98h+var_70] test ecx, ecx js short loc_702D5 mov r15, [rdi+30h] add r15, r12 loc_702D5: add r12, [rdi+48h] lea rdx, [rsp+98h+var_54] call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceETagsEiPNS3_4ETagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag *,int) test r13d, r13d jle short loc_70318 mov rax, [rsp+98h+var_78] mov rax, [rax+78h] xor ecx, ecx loc_702F3: movsxd rdx, dword ptr [r12+rcx*4] mov edx, [rax+rdx*8] cmp edx, [r15+rcx*4] setnz [rsp+rcx+98h+var_4C] mov dl, [rsp+rcx+98h+var_54] shr dl, 1 and dl, 1 mov [rsp+rcx+98h+var_50], dl inc rcx cmp r13, rcx jnz short loc_702F3 loc_70318: mov [rsp+98h+var_78], r12 mov esi, [rsp+98h+var_8C] mov rdx, [rsp+98h+arg_8] mov r12, [rsp+98h+var_48] jmp short loc_70339 loc_70330: mov [rsp+98h+var_78], 0 loc_70339: mov r13d, esi test ebp, ebp jle loc_70446 xor r15d, r15d mov eax, [rsp+98h+var_8C] mov r13d, eax loc_7034E: test byte ptr [rbx+8], 2 jz short loc_70382 mov rax, [r12+10h] mov ecx, [rax+r15*4+4] movsxd rax, dword ptr [rax+r15*4] sub ecx, eax cmp ecx, 1 jnz short loc_70382 mov rcx, [r12+28h] movsxd rax, dword ptr [rcx+rax*4] mov rcx, [rsp+98h+var_68] mov eax, [rcx+rax*4] add eax, r14d jmp loc_70436 loc_70382: mov rax, [rsp+98h+var_38] movzx eax, word ptr [rax+r15*2] test eax, eax jz short loc_703E7 mov edx, eax and edx, 0Fh test al, 10h jnz short loc_703CB cmp [rsp+rdx+98h+var_50], 0 jnz short loc_703E7 shr eax, 6 and eax, 1 movzx esi, [rsp+rdx+98h+var_4C] xor ecx, ecx cmp eax, esi setnz cl; int mov rax, [rsp+98h+var_78] mov edx, [rax+rdx*4]; int mov rdi, rbx; this mov esi, [rsp+98h+var_7C]; int mov r8d, r13d; int call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper19findSharedEdgePointEiiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedEdgePoint(int,int,int,int) jmp short loc_703E2 loc_703CB: mov rax, [rsp+98h+var_70] mov edx, [rax+rdx*4]; int mov rdi, rbx; this mov esi, [rsp+98h+var_7C]; int mov ecx, r13d; int call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper21findSharedCornerPointEiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedCornerPoint(int,int,int) loc_703E2: cmp eax, r13d jnz short loc_7042E loc_703E7: cmp [rsp+98h+var_60], 0 jz short loc_70424 mov rdi, rbx mov rsi, r12 mov edx, r15d mov rcx, [rsp+98h+var_68] mov r8d, r14d call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper23appendLocalPointStencilIfEEvRKNS1_12SparseMatrixIT_EEiPKii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&,int,int const*,int) cmp byte ptr [rsp+98h+var_90], 0 jnz short loc_70424 mov rdi, rbx mov rsi, [rsp+98h+var_88] mov edx, r15d mov rcx, [rsp+98h+var_68] mov r8d, r14d call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder16LocalPointHelper30appendLocalPointVaryingStencilIfEEvPKiiS6_i; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>(int const*,int,int const*,int) loc_70424: mov eax, r13d lea ecx, [r13+1] mov r13d, ecx loc_7042E: mov rdx, [rsp+98h+arg_8] loc_70436: mov [rdx+r15*4], eax inc r15 cmp rbp, r15 jnz loc_7034E loc_70446: sub r13d, [rsp+98h+var_8C] add [rbx+10h], r13d mov eax, r13d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float>( OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper *this, int a2, unsigned int a3, unsigned int *a4, long long a5, long long a6, unsigned int a7, long long a8) { unsigned int *v8; // r12 long long v9; // r9 long long v11; // rbp unsigned __int16 *v12; // rax unsigned __int16 *v13; // r13 char v14; // al void *v15; // rcx long long v16; // rdx int v17; // esi int v18; // r15d OpenSubdiv::v3_6_0::Vtr::internal::Level *v19; // rdi unsigned int v20; // r15d int v21; // r13d long long j; // r13 int v23; // edx long long FaceFVarValues; // rax long long v25; // r15 long long v26; // rax int v27; // ecx long long v28; // rax unsigned int v29; // eax long long v30; // rdx long long v31; // r12 long long v32; // r13 int v33; // ecx long long v34; // r15 long long v35; // r12 long long v36; // rax long long i; // rcx long long v38; // r15 long long v39; // rax int v40; // ecx long long v41; // rax unsigned int SharedCornerPoint; // eax unsigned int v43; // eax long long v44; // rdx unsigned int v45; // r13d char v47; // [rsp+8h] [rbp-90h] void *v48; // [rsp+10h] [rbp-88h] long long v50; // [rsp+20h] [rbp-78h] long long v51; // [rsp+28h] [rbp-70h] long long v53; // [rsp+38h] [rbp-60h] _BYTE v54[12]; // [rsp+44h] [rbp-54h] BYREF unsigned int *v55; // [rsp+50h] [rbp-48h] long long v56; // [rsp+58h] [rbp-40h] unsigned __int16 *v57; // [rsp+60h] [rbp-38h] v8 = a4; v9 = a3; v11 = *a4; v12 = (unsigned __int16 *)&OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits; if ( (_DWORD)a5 != 9 ) v12 = 0LL; v13 = (unsigned __int16 *)&OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits; if ( (_DWORD)a5 != 3 ) v13 = v12; v14 = *((_BYTE *)this + 8); if ( (v14 & 1) == 0 ) v13 = 0LL; v47 = 1; if ( *((_QWORD *)this + 10) ) { a5 = (unsigned int)(a5 - 3); switch ( (int)a5 ) { case 0: case 1: v15 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearIndices; break; case 2: v15 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::boxsplineIndices; break; case 3: v15 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::bsplineIndices; break; case 6: v15 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryIndices; break; case 7: v15 = &OpenSubdiv::v3_6_0::Far::`anonymous namespace'::GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryTriIndices; break; default: goto LABEL_10; } v48 = v15; v47 = 0; } else { LABEL_10: v48 = 0LL; } v16 = a8; v17 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); v53 = *((_QWORD *)this + 9); if ( v13 ) { v18 = v13[(int)v11]; v57 = v13; if ( v18 ) { v19 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*(_QWORD *)(*(_QWORD *)this + 48LL) + 8LL * a2); v56 = v9; if ( (v18 & 0x10) != 0 ) { v23 = *((_DWORD *)this + 3); if ( v23 < 0 ) FaceFVarValues = *((_QWORD *)v19 + 6) + 4LL * *(int *)(*((_QWORD *)v19 + 3) + 4LL * (2 * (int)v9 + 1)); else FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(v19, v9, v23); v51 = FaceFVarValues; v16 = a8; } else { v51 = 0LL; } if ( (v18 & 0x60) != 0 ) { v55 = v8; v30 = *((_QWORD *)v19 + 3); v31 = 4LL * *(int *)(v30 + 4LL * (2 * (int)v56 + 1)); v32 = *(unsigned int *)(v30 + 8LL * (_DWORD)v56); v33 = *((_DWORD *)this + 3); v34 = v51; if ( v33 >= 0 ) v34 = v31 + *((_QWORD *)v19 + 6); v35 = *((_QWORD *)v19 + 9) + v31; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(v19, v56, (long long)v54, v33); if ( (int)v32 > 0 ) { v36 = *((_QWORD *)v19 + 15); for ( i = 0LL; i != v32; ++i ) { v54[i + 8] = *(_DWORD *)(v36 + 8LL * *(int *)(v35 + 4 * i)) != *(_DWORD *)(v34 + 4 * i); v54[i + 4] = (v54[i] & 2) != 0; } } v50 = v35; v16 = a8; v8 = v55; } else { v50 = 0LL; } } else { v50 = 0LL; v51 = 0LL; } v21 = v17; if ( (int)v11 > 0 ) { v38 = 0LL; v21 = v17; while ( (*((_BYTE *)this + 8) & 2) != 0 ) { v39 = *((_QWORD *)v8 + 2); v40 = *(_DWORD *)(v39 + 4 * v38 + 4); v41 = *(int *)(v39 + 4 * v38); if ( v40 - (_DWORD)v41 != 1 ) break; SharedCornerPoint = a7 + *(_DWORD *)(a6 + 4LL * *(int *)(*((_QWORD *)v8 + 5) + 4 * v41)); LABEL_69: *(_DWORD *)(v16 + 4 * v38++) = SharedCornerPoint; if ( v11 == v38 ) goto LABEL_70; } v43 = v57[v38]; if ( !v57[v38] ) goto LABEL_64; v44 = v43 & 0xF; if ( (v43 & 0x10) != 0 ) { SharedCornerPoint = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedCornerPoint( this, a2, *(_DWORD *)(v51 + 4 * v44), v21); } else { if ( v54[v44 + 4] ) goto LABEL_64; SharedCornerPoint = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::findSharedEdgePoint( this, a2, *(_DWORD *)(v50 + 4 * v44), ((v43 >> 6) & 1) != v54[v44 + 8], v21); } if ( SharedCornerPoint != v21 ) { LABEL_68: v16 = a8; goto LABEL_69; } LABEL_64: if ( v53 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>( this, v8, (unsigned int)v38, a6, a7, v9); if ( !v47 ) OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v48, (unsigned int)v38, a6, a7); } SharedCornerPoint = v21++; goto LABEL_68; } } else if ( (v14 & 2) != 0 ) { v21 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); if ( (int)v11 > 0 ) { v25 = 0LL; v21 = *((_DWORD *)this + 5) + *((_DWORD *)this + 4); do { if ( (*((_BYTE *)this + 8) & 2) != 0 && (v26 = *((_QWORD *)v8 + 2), v27 = *(_DWORD *)(v26 + 4 * v25 + 4), v28 = *(int *)(v26 + 4 * v25), v27 - (_DWORD)v28 == 1) ) { v29 = a7 + *(_DWORD *)(a6 + 4LL * *(int *)(*((_QWORD *)v8 + 5) + 4 * v28)); } else { if ( v53 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencil<float>( this, v8, (unsigned int)v25, a6, a7, v9); v16 = a8; if ( !v47 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v48, (unsigned int)v25, a6, a7); v16 = a8; } } v29 = v21++; } *(_DWORD *)(v16 + 4 * v25++) = v29; } while ( v11 != v25 ); } } else { if ( v53 ) { OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointStencils<float>( this, v8, a6, a7, a5, v9); if ( !(((int)v11 <= 0) | (unsigned __int8)v47) ) { v20 = 0; do OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::appendLocalPointVaryingStencil<float>( this, v48, v20++, a6, a7); while ( (_DWORD)v11 != v20 ); } } v21 = v17; if ( (int)v11 > 0 ) { for ( j = 0LL; j != v11; ++j ) *(_DWORD *)(a8 + 4 * j) = v17 + j; v21 = v17 + j; } } LABEL_70: v45 = v21 - v17; *((_DWORD *)this + 4) += v45; return v45; }
AppendLocalPatchPoints<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x30],R9 MOV R12,RCX MOV R9D,EDX MOV dword ptr [RSP + 0x1c],ESI MOV RBX,RDI MOV EBP,dword ptr [RCX] XOR ECX,ECX CMP R8D,0x9 LEA RAX,[0x1bc740] CMOVNZ RAX,RCX CMP R8D,0x3 LEA R13,[0x1bc730] CMOVNZ R13,RAX MOV AL,byte ptr [RDI + 0x8] TEST AL,0x1 CMOVZ R13,RCX MOV ESI,dword ptr [RDI + 0x10] MOV CL,0x1 MOV dword ptr [RSP + 0x8],ECX CMP qword ptr [RDI + 0x50],0x0 JZ 0x00170034 ADD R8D,-0x3 CMP R8D,0x7 JA 0x00170034 LEA RCX,[0x1bc5fc] MOVSXD RDX,dword ptr [RCX + R8*0x4] ADD RDX,RCX switchD: JMP RDX caseD_3: LEA RCX,[0x1bc770] JMP 0x00170061 caseD_7: MOV qword ptr [RSP + 0x10],0x0 JMP 0x0017006e caseD_5: LEA RCX,[0x1bc7c0] JMP 0x00170061 caseD_a: LEA RCX,[0x1bc840] JMP 0x00170061 caseD_6: LEA RCX,[0x1bc780] JMP 0x00170061 caseD_9: LEA RCX,[0x1bc7f0] LAB_00170061: MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0x8],0x0 LAB_0017006e: MOV RDX,qword ptr [RSP + 0xa8] MOV R14D,dword ptr [RSP + 0xa0] MOVSXD R15,EBP ADD ESI,dword ptr [RBX + 0x14] MOV RCX,qword ptr [RBX + 0x48] MOV qword ptr [RSP + 0x38],RCX TEST R13,R13 MOV dword ptr [RSP + 0xc],ESI JZ 0x001700dc MOVZX R15D,word ptr [R13 + R15*0x2] TEST R15D,R15D MOV qword ptr [RSP + 0x60],R13 JZ 0x00170173 MOV RAX,qword ptr [RBX] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RAX + RCX*0x8] TEST R15B,0x10 MOV qword ptr [RSP + 0x58],R9 MOV qword ptr [RSP + 0x20],RDI JNZ 0x0017018a MOV qword ptr [RSP + 0x28],0x0 JMP 0x0017028a LAB_001700dc: TEST AL,0x2 JNZ 0x001701a6 CMP qword ptr [RSP + 0x38],0x0 MOV R14,qword ptr [RSP + 0x30] MOV R13,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xa0] JZ 0x0017013b MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 MOV R12D,ECX CALL 0x001386c0 TEST R15D,R15D SETLE AL MOV ECX,dword ptr [RSP + 0x8] OR CL,AL JNZ 0x0017013b XOR R15D,R15D LAB_0017011f: MOV RDI,RBX MOV RSI,R13 MOV EDX,R15D MOV RCX,R14 MOV R8D,R12D CALL 0x0013a000 INC R15D CMP EBP,R15D JNZ 0x0017011f LAB_0017013b: MOV EAX,dword ptr [RSP + 0xc] MOV R13D,EAX TEST EBP,EBP MOV RDX,qword ptr [RSP + 0xa8] JLE 0x00170446 MOV EAX,dword ptr [RSP + 0xc] XOR R13D,R13D LAB_00170159: LEA ECX,[RAX + R13*0x1] MOV dword ptr [RDX + R13*0x4],ECX INC R13 CMP RBP,R13 JNZ 0x00170159 ADD R13D,dword ptr [RSP + 0xc] JMP 0x00170446 LAB_00170173: MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 JMP 0x00170339 LAB_0017018a: MOV EDX,dword ptr [RBX + 0xc] TEST EDX,EDX JS 0x00170263 MOV ESI,R9D CALL 0x0013aef0 MOV ESI,dword ptr [RSP + 0xc] JMP 0x0017027d LAB_001701a6: MOV R13D,ESI TEST EBP,EBP MOV R14,qword ptr [RSP + 0x30] JLE 0x00170446 XOR R15D,R15D MOV EAX,dword ptr [RSP + 0xc] MOV R13D,EAX LAB_001701c0: TEST byte ptr [RBX + 0x8],0x2 JZ 0x001701f1 MOV RAX,qword ptr [R12 + 0x10] MOV ECX,dword ptr [RAX + R15*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R15*0x4] SUB ECX,EAX CMP ECX,0x1 JNZ 0x001701f1 MOV RCX,qword ptr [R12 + 0x28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] MOV EAX,dword ptr [R14 + RAX*0x4] ADD EAX,dword ptr [RSP + 0xa0] JMP 0x0017024e LAB_001701f1: CMP qword ptr [RSP + 0x38],0x0 JZ 0x00170244 MOV RDI,RBX MOV RSI,R12 MOV EDX,R15D MOV RCX,R14 MOV R8D,dword ptr [RSP + 0xa0] CALL 0x00139180 MOV RDX,qword ptr [RSP + 0xa8] CMP byte ptr [RSP + 0x8],0x0 JNZ 0x00170244 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV EDX,R15D MOV RCX,R14 MOV R8D,dword ptr [RSP + 0xa0] CALL 0x0013a000 MOV RDX,qword ptr [RSP + 0xa8] LAB_00170244: MOV EAX,R13D LEA ECX,[R13 + 0x1] MOV R13D,ECX LAB_0017024e: MOV dword ptr [RDX + R15*0x4],EAX INC R15 CMP RBP,R15 JNZ 0x001701c0 JMP 0x00170446 LAB_00170263: LEA EAX,[0x1 + R9*0x2] CDQE MOV RCX,qword ptr [RDI + 0x18] MOVSXD RAX,dword ptr [RCX + RAX*0x4] SHL RAX,0x2 ADD RAX,qword ptr [RDI + 0x30] LAB_0017027d: MOV qword ptr [RSP + 0x28],RAX MOV RDX,qword ptr [RSP + 0xa8] LAB_0017028a: TEST R15B,0x60 JZ 0x00170330 MOV qword ptr [RSP + 0x50],R12 MOV RSI,qword ptr [RSP + 0x58] LEA EAX,[RSI + RSI*0x1] LEA ECX,[0x1 + RSI*0x2] MOVSXD RCX,ECX MOV RDI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RDI + 0x18] MOVSXD R12,dword ptr [RDX + RCX*0x4] SHL R12,0x2 CDQE MOV R13D,dword ptr [RDX + RAX*0x4] MOV ECX,dword ptr [RBX + 0xc] MOV R15,qword ptr [RSP + 0x28] TEST ECX,ECX JS 0x001702d5 MOV R15,qword ptr [RDI + 0x30] ADD R15,R12 LAB_001702d5: ADD R12,qword ptr [RDI + 0x48] LEA RDX,[RSP + 0x44] CALL 0x00138400 TEST R13D,R13D JLE 0x00170318 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x78] XOR ECX,ECX LAB_001702f3: MOVSXD RDX,dword ptr [R12 + RCX*0x4] MOV EDX,dword ptr [RAX + RDX*0x8] CMP EDX,dword ptr [R15 + RCX*0x4] SETNZ byte ptr [RSP + RCX*0x1 + 0x4c] MOV DL,byte ptr [RSP + RCX*0x1 + 0x44] SHR DL,0x1 AND DL,0x1 MOV byte ptr [RSP + RCX*0x1 + 0x48],DL INC RCX CMP R13,RCX JNZ 0x001702f3 LAB_00170318: MOV qword ptr [RSP + 0x20],R12 MOV ESI,dword ptr [RSP + 0xc] MOV RDX,qword ptr [RSP + 0xa8] MOV R12,qword ptr [RSP + 0x50] JMP 0x00170339 LAB_00170330: MOV qword ptr [RSP + 0x20],0x0 LAB_00170339: MOV R13D,ESI TEST EBP,EBP JLE 0x00170446 XOR R15D,R15D MOV EAX,dword ptr [RSP + 0xc] MOV R13D,EAX LAB_0017034e: TEST byte ptr [RBX + 0x8],0x2 JZ 0x00170382 MOV RAX,qword ptr [R12 + 0x10] MOV ECX,dword ptr [RAX + R15*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R15*0x4] SUB ECX,EAX CMP ECX,0x1 JNZ 0x00170382 MOV RCX,qword ptr [R12 + 0x28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] MOV RCX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RCX + RAX*0x4] ADD EAX,R14D JMP 0x00170436 LAB_00170382: MOV RAX,qword ptr [RSP + 0x60] MOVZX EAX,word ptr [RAX + R15*0x2] TEST EAX,EAX JZ 0x001703e7 MOV EDX,EAX AND EDX,0xf TEST AL,0x10 JNZ 0x001703cb CMP byte ptr [RSP + RDX*0x1 + 0x48],0x0 JNZ 0x001703e7 SHR EAX,0x6 AND EAX,0x1 MOVZX ESI,byte ptr [RSP + RDX*0x1 + 0x4c] XOR ECX,ECX CMP EAX,ESI SETNZ CL MOV RAX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RAX + RDX*0x4] MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x1c] MOV R8D,R13D CALL 0x0013bbc0 JMP 0x001703e2 LAB_001703cb: MOV RAX,qword ptr [RSP + 0x28] MOV EDX,dword ptr [RAX + RDX*0x4] MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x1c] MOV ECX,R13D CALL 0x0013a580 LAB_001703e2: CMP EAX,R13D JNZ 0x0017042e LAB_001703e7: CMP qword ptr [RSP + 0x38],0x0 JZ 0x00170424 MOV RDI,RBX MOV RSI,R12 MOV EDX,R15D MOV RCX,qword ptr [RSP + 0x30] MOV R8D,R14D CALL 0x00139180 CMP byte ptr [RSP + 0x8],0x0 JNZ 0x00170424 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV EDX,R15D MOV RCX,qword ptr [RSP + 0x30] MOV R8D,R14D CALL 0x0013a000 LAB_00170424: MOV EAX,R13D LEA ECX,[R13 + 0x1] MOV R13D,ECX LAB_0017042e: MOV RDX,qword ptr [RSP + 0xa8] LAB_00170436: MOV dword ptr [RDX + R15*0x4],EAX INC R15 CMP RBP,R15 JNZ 0x0017034e LAB_00170446: SUB R13D,dword ptr [RSP + 0xc] ADD dword ptr [RBX + 0x10],R13D MOV EAX,R13D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* int OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float>(int, int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float> const&, OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type, int const*, int, int*) */ int __thiscall OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LocalPointHelper::AppendLocalPatchPoints<float> (LocalPointHelper *this,int param_1,uint param_2,SparseMatrix *param_3,int param_5, int *param_6,int param_7,long param_8) { ushort uVar1; uint uVar2; long lVar3; Level *this_00; long lVar4; bool bVar5; int iVar6; int1 *puVar7; ulong uVar8; ulong uVar9; ulong uVar10; int iVar11; int iVar12; int iVar13; uint uVar14; long lVar15; int *local_88; long local_78; long local_70; ETag local_54 [4]; byte abStack_50 [4]; byte abStack_4c [4]; SparseMatrix *local_48; ulong local_40; int1 *local_38; uVar2 = *(uint *)param_3; uVar10 = (ulong)uVar2; puVar7 = (anonymous_namespace):: GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::gregoryQuadBits; if (param_5 != 9) { puVar7 = (int1 *)0x0; } local_38 = (anonymous_namespace):: GetShareBitsPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type)::linearQuadBits; if (param_5 != 3) { local_38 = puVar7; } if (((byte)this[8] & 1) == 0) { local_38 = (int1 *)0x0; } bVar5 = true; if (*(long *)(this + 0x50) == 0) { switchD_00170029_caseD_7: local_88 = (int *)0x0; } else { switch(param_5) { case 3: case 4: local_88 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: linearIndices; break; case 5: local_88 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: boxsplineIndices; break; case 6: local_88 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: bsplineIndices; break; default: goto switchD_00170029_caseD_7; case 9: local_88 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: gregoryIndices; break; case 10: local_88 = (int *)(anonymous_namespace):: GetVaryingIndicesPerType(OpenSubdiv::v3_6_0::Far::PatchDescriptor::Type):: gregoryTriIndices; } bVar5 = false; } iVar11 = *(int *)(this + 0x10) + *(int *)(this + 0x14); lVar3 = *(long *)(this + 0x48); iVar13 = iVar11; if (local_38 == (int1 *)0x0) { if (((byte)this[8] & 2) == 0) { if ((lVar3 != 0) && (appendLocalPointStencils<float>(this,param_3,param_6,param_7), !bVar5 && 0 < (int)uVar2)) { uVar14 = 0; do { appendLocalPointVaryingStencil<float>(this,local_88,uVar14,param_6,param_7); uVar14 = uVar14 + 1; } while (uVar2 != uVar14); } if (0 < (int)uVar2) { uVar8 = 0; do { *(int *)(param_8 + uVar8 * 4) = iVar11 + (int)uVar8; uVar8 = uVar8 + 1; } while (uVar10 != uVar8); iVar13 = (int)uVar8 + iVar11; } } else if (0 < (int)uVar2) { uVar8 = 0; iVar12 = iVar11; do { if ((((byte)this[8] & 2) == 0) || (iVar6 = *(int *)(*(long *)(param_3 + 0x10) + uVar8 * 4), *(int *)(*(long *)(param_3 + 0x10) + 4 + uVar8 * 4) - iVar6 != 1)) { if (lVar3 != 0) { appendLocalPointStencil<float>(this,param_3,(int)uVar8,param_6,param_7); if (!bVar5) { appendLocalPointVaryingStencil<float>(this,local_88,(int)uVar8,param_6,param_7); } } iVar13 = iVar12 + 1; } else { iVar13 = iVar12; iVar12 = param_6[*(int *)(*(long *)(param_3 + 0x28) + (long)iVar6 * 4)] + param_7; } *(int *)(param_8 + uVar8 * 4) = iVar12; uVar8 = uVar8 + 1; iVar12 = iVar13; } while (uVar10 != uVar8); } } else { uVar1 = *(ushort *)(local_38 + (long)(int)uVar2 * 2); if (uVar1 == 0) { local_78 = 0; local_70 = 0; } else { this_00 = *(Level **)(*(long *)(*(long *)this + 0x30) + (long)param_1 * 8); local_40 = (ulong)param_2; if ((uVar1 & 0x10) == 0) { local_70 = 0; } else if (*(int *)(this + 0xc) < 0) { local_70 = (long)*(int *)(*(long *)(this_00 + 0x18) + (long)(int)(param_2 * 2 + 1) * 4) * 4 + *(long *)(this_00 + 0x30); } else { local_70 = Vtr::internal::Level::getFaceFVarValues(this_00,param_2,*(int *)(this + 0xc)); } if ((uVar1 & 0x60) == 0) { local_78 = 0; } else { iVar12 = (int)local_40; local_78 = (long)*(int *)(*(long *)(this_00 + 0x18) + (long)(iVar12 * 2 + 1) * 4) * 4; uVar14 = *(uint *)(*(long *)(this_00 + 0x18) + (long)(iVar12 * 2) * 4); lVar15 = local_70; if (-1 < *(int *)(this + 0xc)) { lVar15 = *(long *)(this_00 + 0x30) + local_78; } local_78 = local_78 + *(long *)(this_00 + 0x48); local_48 = param_3; Vtr::internal::Level::getFaceETags(this_00,iVar12,local_54,*(int *)(this + 0xc)); param_3 = local_48; if (0 < (int)uVar14) { lVar4 = *(long *)(this_00 + 0x78); uVar8 = 0; do { abStack_4c[uVar8] = *(int *)(lVar4 + (long)*(int *)(local_78 + uVar8 * 4) * 8) != *(int *)(lVar15 + uVar8 * 4); abStack_50[uVar8] = (byte)local_54[uVar8] >> 1 & 1; uVar8 = uVar8 + 1; param_3 = local_48; } while (uVar14 != uVar8); } } } if (0 < (int)uVar2) { uVar8 = 0; iVar12 = iVar11; do { iVar13 = iVar12; if ((((byte)this[8] & 2) == 0) || (iVar6 = *(int *)(*(long *)(param_3 + 0x10) + uVar8 * 4), *(int *)(*(long *)(param_3 + 0x10) + 4 + uVar8 * 4) - iVar6 != 1)) { uVar1 = *(ushort *)(local_38 + uVar8 * 2); if (uVar1 != 0) { uVar9 = (ulong)(uVar1 & 0xf); if ((uVar1 & 0x10) == 0) { if (abStack_50[uVar9] != 0) goto LAB_001703e7; iVar6 = findSharedEdgePoint(this,param_1,*(int *)(local_78 + uVar9 * 4), (uint)((uVar1 >> 6 & 1) != (ushort)abStack_4c[uVar9]), iVar12); } else { iVar6 = findSharedCornerPoint(this,param_1,*(int *)(local_70 + uVar9 * 4),iVar12); } if (iVar6 != iVar12) goto LAB_00170436; } LAB_001703e7: if (lVar3 != 0) { appendLocalPointStencil<float>(this,param_3,(int)uVar8,param_6,param_7); if (!bVar5) { appendLocalPointVaryingStencil<float>(this,local_88,(int)uVar8,param_6,param_7); } } iVar13 = iVar12 + 1; iVar6 = iVar12; } else { iVar6 = param_6[*(int *)(*(long *)(param_3 + 0x28) + (long)iVar6 * 4)] + param_7; } LAB_00170436: *(int *)(param_8 + uVar8 * 4) = iVar6; uVar8 = uVar8 + 1; iVar12 = iVar13; } while (uVar10 != uVar8); } } *(int *)(this + 0x10) = *(int *)(this + 0x10) + (iVar13 - iVar11); return iVar13 - iVar11; }
1,261
rw_pr_unlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_unlock(rw_pr_lock_t *rwlock) { if (rwlock->active_writer) { /* We are unlocking wr-lock. */ #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif rwlock->active_writer= FALSE; if (rwlock->writers_waiting_readers) { /* Avoid expensive cond signal in case when there is no contention or it is wr-only. Note that from view point of performance it would be better to signal on the condition variable after unlocking mutex (as it reduces number of contex switches). Unfortunately this would mean that such rwlock can't be safely used by MDL subsystem, which relies on the fact that it is OK to destroy rwlock once it is in unlocked state. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } else { /* We are unlocking rd-lock. */ pthread_mutex_lock(&rwlock->lock); rwlock->active_readers--; if (rwlock->active_readers == 0 && rwlock->writers_waiting_readers) { /* If we are last reader and there are waiting writers wake them up. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } return 0; }
O0
c
rw_pr_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) je 0xfb6f0 movq -0x8(%rbp), %rax movb $0x0, 0x60(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0xfb6e5 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x2a580 movq -0x8(%rbp), %rdi callq 0x2a1f0 jmp 0xfb730 movq -0x8(%rbp), %rdi callq 0x2a220 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) jne 0xfb727 movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0xfb727 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x2a580 movq -0x8(%rbp), %rdi callq 0x2a1f0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
rw_pr_unlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jz short loc_FB6F0 mov rax, [rbp+var_8] mov byte ptr [rax+60h], 0 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_FB6E5 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_FB6E5: mov rdi, [rbp+var_8] call _pthread_mutex_unlock jmp short loc_FB730 loc_FB6F0: mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 0FFFFFFFFh mov [rax+58h], ecx mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jnz short loc_FB727 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_FB727 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_FB727: mov rdi, [rbp+var_8] call _pthread_mutex_unlock loc_FB730: xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_unlock(long long a1) { if ( *(_BYTE *)(a1 + 96) ) { *(_BYTE *)(a1 + 96) = 0; if ( *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } else { pthread_mutex_lock(a1); if ( !--*(_DWORD *)(a1 + 88) && *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } pthread_mutex_unlock(a1); return 0LL; }
rw_pr_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JZ 0x001fb6f0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x001fb6e5 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0012a580 LAB_001fb6e5: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a1f0 JMP 0x001fb730 LAB_001fb6f0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,-0x1 MOV dword ptr [RAX + 0x58],ECX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JNZ 0x001fb727 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x001fb727 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0012a580 LAB_001fb727: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a1f0 LAB_001fb730: XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_unlock(pthread_mutex_t *param_1) { if (*(char *)((long)param_1 + 0x60) == '\0') { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + -1; if ((*(int *)((long)param_1 + 0x58) == 0) && (*(int *)((long)param_1 + 0x5c) != 0)) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } else { *(int1 *)((long)param_1 + 0x60) = 0; if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } return 0; }
1,262
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>::at<char const (&) [10], 0>(char const (&) [10])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& 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>::at<char const (&) [10], 0>(char const (&) [10]): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa2980 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x112868 jmp 0x112944 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x4f580 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa04a0 movq %rax, 0x90(%rsp) leaq 0xa7653(%rip), %rsi # 0x1b9eeb leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x11ae30 jmp 0x1128af movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xbb8a0 jmp 0x1128cd movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x121827(%rip), %rsi # 0x234108 leaq -0x72398(%rip), %rdx # 0xa0550 callq 0x4f940 jmp 0x112ad5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x112929 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x50100 testb $0x1, 0x83(%rsp) jne 0x112935 jmp 0x11293f movq 0x18(%rsp), %rdi callq 0x4fc70 jmp 0x112ac8 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x11ce20 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa27c0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbb4f0 testb $0x1, %al jne 0x11298d jmp 0x112a9e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x4f580 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x4fd90 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x55120 jmp 0x1129d2 leaq 0xa7542(%rip), %rsi # 0x1b9f1b leaq 0xa7541(%rip), %rcx # 0x1b9f21 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x11c050 jmp 0x1129f1 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0xb9430 jmp 0x112a0b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x1217d5(%rip), %rsi # 0x2341f0 leaq -0x59fe2(%rip), %rdx # 0xb8a40 callq 0x4f940 jmp 0x112ad5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x112a80 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x112a76 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x50100 leaq 0x30(%rsp), %rdi callq 0x50100 leaq 0x2f(%rsp), %rdi callq 0x500e0 testb $0x1, 0x2e(%rsp) jne 0x112a93 jmp 0x112a9c movq (%rsp), %rdi callq 0x4fc70 jmp 0x112ac8 leaq 0x78(%rsp), %rdi callq 0xbb6f0 movq 0x20(%rsp), %rdi movq %rax, %rsi addq $0x20, %rsi movq $-0x1, %rdx callq 0x11ad10 addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x4f990 nopw %cs:(%rax,%rax) nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_112868 jmp loc_112944 loc_112868: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_1128AF: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_1128CD: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_112AD5 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_112929 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_112929: test [rsp+arg_7B], 1 jnz short loc_112935 jmp short loc_11293F loc_112935: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_11293F: jmp loc_112AC8 loc_112944: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_11298D jmp loc_112A9E loc_11298D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1129D2: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_1129F1: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_112A0B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_112AD5 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_112A80 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_112A76 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_112A76: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_112A80: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_112A93 jmp short loc_112A9C loc_112A93: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_112A9C: jmp short loc_112AC8 loc_112A9E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+0C8h+var_A8] mov rsi, rax add rsi, 20h ; ' ' mov rdx, 0FFFFFFFFFFFFFFFFh call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; 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>::set_parent(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>&,ulong) add rsp, 0C8h retn loc_112AC8: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_112AD5: nop word ptr [rax+rax+00000000h] nop
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d long long v7; // rax int v9; // [rsp+0h] [rbp-C8h] void *v10; // [rsp+0h] [rbp-C8h] nlohmann::json_abi_v3_11_3::detail::out_of_range *v11; // [rsp+0h] [rbp-C8h] void *v12; // [rsp+8h] [rbp-C0h] long long v13; // [rsp+8h] [rbp-C0h] int v14; // [rsp+10h] [rbp-B8h] int v15; // [rsp+18h] [rbp-B0h] void *exception; // [rsp+18h] [rbp-B0h] nlohmann::json_abi_v3_11_3::detail::type_error *v17; // [rsp+18h] [rbp-B0h] long long v18; // [rsp+20h] [rbp-A8h] char v19; // [rsp+2Fh] [rbp-99h] BYREF _BYTE v20[32]; // [rsp+30h] [rbp-98h] BYREF int v21[8]; // [rsp+50h] [rbp-78h] BYREF char v22[8]; // [rsp+70h] [rbp-58h] BYREF int v23[2]; // [rsp+78h] [rbp-50h] BYREF char v24; // [rsp+83h] [rbp-45h] char v25[8]; // [rsp+90h] [rbp-38h] BYREF int v26[8]; // [rsp+98h] [rbp-30h] BYREF int v27[2]; // [rsp+B8h] [rbp-10h] long long v28; // [rsp+C0h] [rbp-8h] v28 = a1; *(_QWORD *)v27 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v25 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (int)v26, (int)"cannot use at() with ", (int)v25, v2, v3, v4, v9, v12, v14, (long long)exception); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v17, 304, (long long)v26, a1); v24 = 0; __cxa_throw( v17, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v23 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(_QWORD *)v27); *(_QWORD *)v22 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v23, (long long)v22) ) { v10 = __cxa_allocate_exception(0x20uLL); v13 = *(_QWORD *)v27; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v20, v13, (long long)&v19); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (int)v21, (int)"key '", (int)v20, (int)"' not found", v5, v6, v10, v13, (int)&v19, v15, a1); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v11, 403, (long long)v21, v18); __cxa_throw( v11, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } v7 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v23); 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>::set_parent( a1, v7 + 32, -1LL); }
1,263
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>::at<char const (&) [10], 0>(char const (&) [10])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O2
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>::at<char const (&) [10], 0>(char const (&) [10]): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x5f249 movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x63028 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x5f2a7 addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx movq %r14, %rdi callq 0x3d1f2 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x33157(%rip), %rsi # 0x923c2 leaq 0x8(%rsp), %rdi callq 0x6264d movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x46780 xorl %ebp, %ebp leaq 0x70032(%rip), %rsi # 0xcf2c8 leaq -0x16b49(%rip), %rdx # 0x48754 movq %rbx, %rdi callq 0x20b30 jmp 0x5f311 pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x2303e leaq 0x33127(%rip), %rsi # 0x923f2 leaq 0x33126(%rip), %rcx # 0x923f8 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x62c57 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x45cc8 xorl %ebp, %ebp leaq 0x700ae(%rip), %rsi # 0xcf3b0 leaq -0x16bb5(%rip), %rdx # 0x48754 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d88 jmp 0x5f326 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x5f337 jmp 0x5f343 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d88 testb %bpl, %bpl jne 0x5f346 jmp 0x5f34e movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20b90
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_5F249 mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_5F2A7 add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_5F249: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_5F311 loc_5F2A7: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_5F311: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_5F326 mov r14, rax mov bpl, 1 loc_5F326: lea rdi, [rsp+68h+var_40] jmp short loc_5F337 jmp short loc_5F343 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_5F337: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_5F346 jmp short loc_5F34E loc_5F343: mov r14, rax loc_5F346: mov rdi, rbx; void * call ___cxa_free_exception loc_5F34E: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v6, "key '", v7, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 403, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0015f249 MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x00163028 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0015f2a7 ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0015f249: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX MOV RDI,R14 CALL 0x0013d1f2 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0015f264: LEA RSI,[0x1923c2] LEA RDI,[RSP + 0x8] CALL 0x0016264d MOV BPL,0x1 LAB_0015f278: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00146780 XOR EBP,EBP LEA RSI,[0x1cf2c8] LEA RDX,[0x148754] MOV RDI,RBX CALL 0x00120b30 LAB_0015f2a7: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX LAB_0015f2b2: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x0012303e LAB_0015f2c4: LEA RSI,[0x1923f2] LEA RCX,[0x1923f8] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00162c57 MOV BPL,0x1 LAB_0015f2e4: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00145cc8 XOR EBP,EBP LEA RSI,[0x1cf3b0] LEA RDX,[0x148754] MOV RDI,RBX CALL 0x00120b30
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (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,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0015f264 to 0015f274 has its CatchHandler @ 0015f343 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0015f278 to 0015f2a4 has its CatchHandler @ 0015f32f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0015f2b2 to 0015f2c3 has its CatchHandler @ 0015f32d */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0015f2c4 to 0015f2e0 has its CatchHandler @ 0015f320 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0015f2e4 to 0015f310 has its CatchHandler @ 0015f311 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
1,264
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>::at<char const (&) [10], 0>(char const (&) [10])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& 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>::at<char const (&) [10], 0>(char const (&) [10]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x69241 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x6922b movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0x69220 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x69201 jmp 0x69223 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x6929f addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3deb4 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x43180(%rip), %rsi # 0xac3e3 leaq 0x20(%rsp), %rdi callq 0x6e647 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x49ade xorl %ebp, %ebp leaq 0x7202a(%rip), %rsi # 0xdb2b8 leaq -0x1d11b(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 jmp 0x69318 movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18310 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x1d1e4 leaq 0x4313f(%rip), %rsi # 0xac413 leaq 0x4313e(%rip), %rcx # 0xac419 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x6ec24 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x48dbe xorl %ebp, %ebp leaq 0x72097(%rip), %rsi # 0xdb3a0 leaq -0x1d196(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69336 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69381 movq 0x10(%rsp), %rsi jmp 0x69379 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x6938b movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x6938b jmp 0x69388 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69381 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x6938b jmp 0x69393 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_69241 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_6922B loc_69201: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_69220 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_69201 jmp short loc_69223 loc_69220: mov rax, rbx loc_69223: mov rcx, [r14+8] mov rbx, [rcx+8] loc_6922B: cmp rax, rbx jz short loc_6929F add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_69241: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_69318 loc_6929F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 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, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_69318: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69336 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69336: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_69381 mov rsi, [rsp+68h+var_58] jmp short loc_69379 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_6938B mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6938B jmp short loc_69388 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69381 mov rsi, [rsp+68h+var_38] loc_69379: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69381: test bpl, bpl jnz short loc_6938B jmp short loc_69393 loc_69388: mov r14, rax loc_6938B: mov rdi, rbx; void * call ___cxa_free_exception loc_69393: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax void *v9[2]; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) goto LABEL_7; } v4 = v3; LABEL_7: v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } if ( v4 == v3 ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = &v10; v8 = strlen(a2); std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v11, "key '", v9, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v11); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00169241 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x0016922b LAB_00169201: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x00169220 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00169201 JMP 0x00169223 LAB_00169220: MOV RAX,RBX LAB_00169223: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_0016922b: CMP RAX,RBX JZ 0x0016929f ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00169241: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013deb4 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_0016925c: LEA RSI,[0x1ac3e3] LEA RDI,[RSP + 0x20] CALL 0x0016e647 MOV BPL,0x1 LAB_00169270: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00149ade XOR EBP,EBP LEA RSI,[0x1db2b8] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30 LAB_0016929f: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118310 LEA RDX,[RAX + R15*0x1] LAB_001692c2: MOV RDI,RSP MOV RSI,R15 CALL 0x0011d1e4 LAB_001692cd: LEA RSI,[0x1ac413] LEA RCX,[0x1ac419] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0016ec24 MOV BPL,0x1 LAB_001692eb: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00148dbe XOR EBP,EBP LEA RSI,[0x1db3a0] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (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,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0016925c to 0016926c has its CatchHandler @ 00169388 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 00169270 to 0016929c has its CatchHandler @ 00169363 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001692c2 to 001692cc has its CatchHandler @ 00169361 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001692cd to 001692e7 has its CatchHandler @ 00169346 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001692eb to 00169317 has its CatchHandler @ 00169318 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
1,265
translog_close_log_file
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_close_log_file(TRANSLOG_FILE *file) { int rc= 0; flush_pagecache_blocks(log_descriptor.pagecache, &file->handler, FLUSH_RELEASE); /* Sync file when we close it TODO: sync only we have changed the log */ if (!file->is_sync) { rc= mysql_file_sync(file->handler.file, MYF(MY_WME)); translog_syncs++; } rc|= mysql_file_close(file->handler.file, MYF(MY_WME)); my_free(file); return MY_TEST(rc); }
O3
c
translog_close_log_file: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx movq 0x3c987b(%rip), %rdi # 0x3ffef0 leaq 0x8(%rbx), %rsi movl $0x1, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3e0a0 cmpb $0x0, 0x51(%rbx) jne 0x366c7 movl 0x18(%rbx), %r14d leaq 0x351977(%rip), %rax # 0x388010 movq (%rax), %rax leaq -0x58(%rbp), %rdi movl %r14d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x36717 movl $0x10, %esi movl %r14d, %edi callq 0xa28d8 incq 0x3c8621(%rip) # 0x3fece8 movl 0x18(%rbx), %r14d leaq 0x35193e(%rip), %rax # 0x388010 movq (%rax), %rax leaq -0x58(%rbp), %rdi movl %r14d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3670a movl $0x10, %esi movl %r14d, %edi callq 0xa19b9 movq %rbx, %rdi callq 0xa1412 addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rdi movl %r14d, %esi callq 0x2bd68 jmp 0x366f9 movq %rax, %rdi movl %r14d, %esi callq 0x2bd16 jmp 0x366c0
translog_close_log_file: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov rbx, rdi mov rdi, cs:log_descriptor lea rsi, [rbx+8] mov edx, 1 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter cmp byte ptr [rbx+51h], 0 jnz short loc_366C7 mov r14d, [rbx+18h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_58] mov esi, r14d mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_36717 mov esi, 10h mov edi, r14d call my_sync loc_366C0: inc cs:translog_syncs loc_366C7: mov r14d, [rbx+18h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_58] mov esi, r14d mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_3670A mov esi, 10h mov edi, r14d call my_close loc_366F9: mov rdi, rbx call my_free add rsp, 50h pop rbx pop r14 pop rbp retn loc_3670A: mov rdi, rax mov esi, r14d call translog_close_log_file_cold_2 jmp short loc_366F9 loc_36717: mov rdi, rax mov esi, r14d call translog_close_log_file_cold_1 jmp short loc_366C0
long long translog_close_log_file(long long a1) { unsigned int v1; // r14d long long v2; // rax unsigned int v3; // r14d long long v4; // rax _BYTE v6[88]; // [rsp+8h] [rbp-58h] BYREF flush_pagecache_blocks_with_filter(log_descriptor[0], a1 + 8, 1LL, 0LL, 0LL); if ( !*(_BYTE *)(a1 + 81) ) { v1 = *(_DWORD *)(a1 + 24); v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, v1, 16LL); if ( v2 ) translog_close_log_file_cold_1(v2, v1); else my_sync(v1, 16LL); ++translog_syncs; } v3 = *(_DWORD *)(a1 + 24); v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, v3, 4LL); if ( v4 ) translog_close_log_file_cold_2(v4, v3); else my_close(v3, 16LL); return my_free(a1); }
translog_close_log_file: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOV RDI,qword ptr [0x004ffef0] LEA RSI,[RBX + 0x8] MOV EDX,0x1 XOR ECX,ECX XOR R8D,R8D CALL 0x0013e0a0 CMP byte ptr [RBX + 0x51],0x0 JNZ 0x001366c7 MOV R14D,dword ptr [RBX + 0x18] LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x58] MOV ESI,R14D MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00136717 MOV ESI,0x10 MOV EDI,R14D CALL 0x001a28d8 LAB_001366c0: INC qword ptr [0x004fece8] LAB_001366c7: MOV R14D,dword ptr [RBX + 0x18] LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x58] MOV ESI,R14D MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013670a MOV ESI,0x10 MOV EDI,R14D CALL 0x001a19b9 LAB_001366f9: MOV RDI,RBX CALL 0x001a1412 ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0013670a: MOV RDI,RAX MOV ESI,R14D CALL 0x0012bd68 JMP 0x001366f9 LAB_00136717: MOV RDI,RAX MOV ESI,R14D CALL 0x0012bd16 JMP 0x001366c0
void translog_close_log_file(long param_1) { int4 uVar1; long lVar2; int1 local_60 [72]; flush_pagecache_blocks_with_filter(log_descriptor,param_1 + 8,1,0,0); if (*(char *)(param_1 + 0x51) == '\0') { uVar1 = *(int4 *)(param_1 + 0x18); lVar2 = (**(code **)(PSI_server + 0x158))(local_60,uVar1,0x10); if (lVar2 == 0) { my_sync(uVar1,0x10); } else { translog_close_log_file_cold_1(lVar2,uVar1); } translog_syncs = translog_syncs + 1; } uVar1 = *(int4 *)(param_1 + 0x18); lVar2 = (**(code **)(PSI_server + 0x158))(local_60,uVar1,4); if (lVar2 == 0) { my_close(uVar1,0x10); } else { translog_close_log_file_cold_2(lVar2,uVar1); } my_free(param_1); return; }
1,266
write_hook_for_clr_end
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_clr_end(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn __attribute__ ((unused)), void *hook_arg) { MARIA_SHARE *share= tbl_info->s; struct st_msg_to_write_hook_for_clr_end *msg= (struct st_msg_to_write_hook_for_clr_end *)hook_arg; my_bool error= FALSE; DBUG_ENTER("write_hook_for_clr_end"); DBUG_ASSERT(trn->trid != 0); trn->undo_lsn= msg->previous_undo_lsn; switch (msg->undone_record_type) { case LOGREC_UNDO_ROW_DELETE: share->state.state.records++; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_INSERT: share->state.state.records--; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_UPDATE: share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_KEY_INSERT_WITH_ROOT: case LOGREC_UNDO_KEY_DELETE_WITH_ROOT: { /* Update key root */ struct st_msg_to_write_hook_for_undo_key *extra_msg= (struct st_msg_to_write_hook_for_undo_key *) msg->extra_msg; *extra_msg->root= extra_msg->value; break; } case LOGREC_UNDO_KEY_INSERT: case LOGREC_UNDO_KEY_DELETE: break; case LOGREC_UNDO_BULK_INSERT: mysql_mutex_assert_owner(&share->intern_lock); error= (maria_enable_indexes(tbl_info) || /* we enabled indices, need '2' below */ _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_FULL_INFO)); /* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */ break; default: DBUG_ASSERT(0); } if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */ trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn); DBUG_RETURN(error); }
O0
c
write_hook_for_clr_end: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movb $0x0, -0x39(%rbp) jmp 0x427c4 movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x38(%rbp), %rax movl 0x8(%rax), %eax addl $-0x12, %eax movl %eax, %ecx movq %rcx, -0x50(%rbp) subl $0x15, %eax ja 0x428be movq -0x50(%rbp), %rax leaq 0x11cfca(%rip), %rcx # 0x15f7c4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x428c4 movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x428c4 movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x428c4 movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq 0x8(%rax), %rcx movq -0x48(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) jmp 0x428c4 jmp 0x428c4 jmp 0x42883 jmp 0x42885 movq -0x18(%rbp), %rdi callq 0x93300 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x51(%rbp) jne 0x428b1 movq -0x30(%rbp), %rdi movl $0x3, %esi callq 0x8fa30 cmpl $0x0, %eax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x39(%rbp) jmp 0x428c4 jmp 0x428c0 jmp 0x428c2 jmp 0x428c4 movq -0x10(%rbp), %rax cmpq $0x0, 0x98(%rax) jne 0x428f2 movq -0x10(%rbp), %rax movabsq $-0x100000000000000, %rcx # imm = 0xFF00000000000000 andq 0xa0(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) jmp 0x428f4 movb -0x39(%rbp), %al movb %al, -0x52(%rbp) movb -0x52(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
write_hook_for_clr_end: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov [rbp+var_39], 0 jmp short $+2 loc_427C4: mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+98h], rcx mov rax, [rbp+var_38] mov eax, [rax+8] add eax, 0FFFFFFEEh; switch 22 cases mov ecx, eax mov [rbp+var_50], rcx sub eax, 15h ja def_42801; jumptable 0000000000042801 default case, cases 25-38 mov rax, [rbp+var_50] lea rcx, jpt_42801 movsxd rax, ds:(jpt_42801 - 15F7C4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_42803: mov rax, [rbp+var_30]; jumptable 0000000000042801 case 19 mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_38] mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp loc_428C4 loc_42829: mov rax, [rbp+var_30]; jumptable 0000000000042801 case 18 mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rax, [rbp+var_38] mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp short loc_428C4 loc_4284C: mov rax, [rbp+var_38]; jumptable 0000000000042801 case 20 mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp short loc_428C4 loc_4285F: mov rax, [rbp+var_38]; jumptable 0000000000042801 cases 22,24 mov rax, [rax+10h] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rax+8] mov rax, [rbp+var_48] mov rax, [rax] mov [rax], rcx jmp short loc_428C4 loc_4287F: jmp short loc_428C4; jumptable 0000000000042801 cases 21,23 loc_42881: jmp short $+2; jumptable 0000000000042801 case 39 loc_42883: jmp short $+2 loc_42885: mov rdi, [rbp+var_18] call maria_enable_indexes mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_51], al jnz short loc_428B1 mov rdi, [rbp+var_30] mov esi, 3 call _ma_state_info_write cmp eax, 0 setnz al mov [rbp+var_51], al loc_428B1: mov al, [rbp+var_51] and al, 1 movzx eax, al mov [rbp+var_39], al jmp short loc_428C4 def_42801: jmp short $+2; jumptable 0000000000042801 default case, cases 25-38 loc_428C0: jmp short $+2 loc_428C2: jmp short $+2 loc_428C4: mov rax, [rbp+var_10] cmp qword ptr [rax+98h], 0 jnz short loc_428F2 mov rax, [rbp+var_10] mov rcx, 0FF00000000000000h and rcx, [rax+0A0h] mov rax, [rbp+var_10] mov [rax+0A0h], rcx loc_428F2: jmp short $+2 loc_428F4: mov al, [rbp+var_39] mov [rbp+var_52], al mov al, [rbp+var_52] add rsp, 60h pop rbp retn
bool write_hook_for_clr_end(long long a1, long long a2, long long *a3, long long a4, long long a5) { bool v6; // [rsp+Fh] [rbp-51h] bool v7; // [rsp+27h] [rbp-39h] long long v8; // [rsp+30h] [rbp-30h] v8 = *a3; v7 = 0; *(_QWORD *)(a2 + 152) = *(_QWORD *)a5; switch ( *(_DWORD *)(a5 + 8) ) { case 0x12: --*(_QWORD *)(v8 + 24); *(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12); break; case 0x13: ++*(_QWORD *)(v8 + 24); *(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12); break; case 0x14: *(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12); break; case 0x16: case 0x18: ***(_QWORD ***)(a5 + 16) = *(_QWORD *)(*(_QWORD *)(a5 + 16) + 8LL); break; case 0x27: v6 = 1; if ( !(unsigned int)maria_enable_indexes(a3) ) v6 = (unsigned int)ma_state_info_write(v8, 3LL) != 0; v7 = v6; break; default: break; } if ( !*(_QWORD *)(a2 + 152) ) *(_QWORD *)(a2 + 160) &= 0xFF00000000000000LL; return v7; }
write_hook_for_clr_end: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV byte ptr [RBP + -0x39],0x0 JMP 0x001427c4 LAB_001427c4: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x8] ADD EAX,-0x12 MOV ECX,EAX MOV qword ptr [RBP + -0x50],RCX SUB EAX,0x15 JA 0x001428be MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x25f7c4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_13: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x001428c4 caseD_12: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x001428c4 caseD_14: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x001428c4 caseD_16: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x001428c4 caseD_15: JMP 0x001428c4 caseD_27: JMP 0x00142883 LAB_00142883: JMP 0x00142885 LAB_00142885: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00193300 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x51],AL JNZ 0x001428b1 MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x3 CALL 0x0018fa30 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_001428b1: MOV AL,byte ptr [RBP + -0x51] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x39],AL JMP 0x001428c4 caseD_19: JMP 0x001428c0 LAB_001428c0: JMP 0x001428c2 LAB_001428c2: JMP 0x001428c4 LAB_001428c4: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x98],0x0 JNZ 0x001428f2 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,-0x100000000000000 AND RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX LAB_001428f2: JMP 0x001428f4 LAB_001428f4: MOV AL,byte ptr [RBP + -0x39] MOV byte ptr [RBP + -0x52],AL MOV AL,byte ptr [RBP + -0x52] ADD RSP,0x60 POP RBP RET
bool write_hook_for_clr_end (int8 param_1,long param_2,long *param_3,int8 param_4,int8 *param_5 ) { long lVar1; int iVar2; bool local_59; bool local_41; lVar1 = *param_3; local_41 = false; *(int8 *)(param_2 + 0x98) = *param_5; switch(*(int4 *)(param_5 + 1)) { case 0x12: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + -1; *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x13: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + 1; *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x14: *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x15: case 0x17: break; case 0x16: case 0x18: **(int8 **)param_5[2] = ((int8 *)param_5[2])[1]; break; default: break; case 0x27: iVar2 = maria_enable_indexes(param_3); local_59 = true; if (iVar2 == 0) { iVar2 = _ma_state_info_write(lVar1,3); local_59 = iVar2 != 0; } local_41 = local_59; } if (*(long *)(param_2 + 0x98) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) & 0xff00000000000000; } return local_41; }
1,267
get_charsets_dir
eloqsql/mysys/charset.c
char *get_charsets_dir(char *buf) { const char *sharedir= SHAREDIR; char *res; DBUG_ENTER("get_charsets_dir"); if (charsets_dir != NULL) strmake(buf, charsets_dir, FN_REFLEN-1); else { if (test_if_hard_path(sharedir) || is_prefix(sharedir, DEFAULT_CHARSET_HOME)) strxmov(buf, sharedir, "/", CHARSET_DIR, NullS); else strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, NullS); } res= convert_dirname(buf,buf,NullS); DBUG_PRINT("info",("charsets dir: '%s'", buf)); DBUG_RETURN(res); }
O0
c
get_charsets_dir: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) leaq 0x500cd(%rip), %rax # 0xaf770 movq %rax, -0x10(%rbp) leaq 0x3af8c2(%rip), %rax # 0x40ef70 cmpq $0x0, (%rax) je 0x5f6ce movq -0x8(%rbp), %rdi leaq 0x3af8b1(%rip), %rax # 0x40ef70 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0xabb70 jmp 0x5f748 movq -0x10(%rbp), %rdi callq 0x64db0 cmpl $0x0, %eax jne 0x5f6f1 movq -0x10(%rbp), %rdi leaq 0x500a2(%rip), %rsi # 0xaf789 callq 0xa8420 cmpl $0x0, %eax je 0x5f715 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x50cc8(%rip), %rdx # 0xb03c8 leaq 0x50095(%rip), %rcx # 0xaf79c xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0xabc50 jmp 0x5f746 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rcx leaq 0x50065(%rip), %rsi # 0xaf789 leaq 0x50c9d(%rip), %r8 # 0xb03c8 leaq 0x5006a(%rip), %r9 # 0xaf79c xorl %eax, %eax movq %r8, %rdx movq $0x0, (%rsp) movb $0x0, %al callq 0xabc50 jmp 0x5f748 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x58230 movq %rax, -0x18(%rbp) jmp 0x5f75f jmp 0x5f761 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_charsets_dir: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi lea rax, aHomeMonoInstal; "/home/mono/install/share" mov [rbp+var_10], rax lea rax, charsets_dir cmp qword ptr [rax], 0 jz short loc_5F6CE mov rdi, [rbp+var_8] lea rax, charsets_dir mov rsi, [rax] mov edx, 1FFh call strmake jmp short loc_5F748 loc_5F6CE: mov rdi, [rbp+var_10] call test_if_hard_path cmp eax, 0 jnz short loc_5F6F1 mov rdi, [rbp+var_10] lea rsi, aHomeMonoInstal_0; "/home/mono/install" call is_prefix cmp eax, 0 jz short loc_5F715 loc_5F6F1: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, unk_B03C8 lea rcx, aCharsets; "charsets/" xor eax, eax mov r8d, eax mov al, 0 call strxmov jmp short loc_5F746 loc_5F715: mov rdi, [rbp+var_8] mov rcx, [rbp+var_10] lea rsi, aHomeMonoInstal_0; "/home/mono/install" lea r8, unk_B03C8 lea r9, aCharsets; "charsets/" xor eax, eax mov rdx, r8 mov [rsp+30h+var_30], 0 mov al, 0 call strxmov loc_5F746: jmp short $+2 loc_5F748: mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] xor eax, eax mov edx, eax call convert_dirname mov [rbp+var_18], rax jmp short $+2 loc_5F75F: jmp short $+2 loc_5F761: mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
_BYTE * get_charsets_dir(_BYTE *a1) { int v1; // r9d if ( charsets_dir ) { strmake(a1, charsets_dir, 511LL); } else if ( (unsigned int)test_if_hard_path("/home/mono/install/share") || (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") ) { strxmov( (_DWORD)a1, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_B03C8, (unsigned int)"charsets/", 0, v1); } else { strxmov( (_DWORD)a1, (unsigned int)"/home/mono/install", (unsigned int)&unk_B03C8, (unsigned int)"/home/mono/install/share", (unsigned int)&unk_B03C8, (unsigned int)"charsets/"); } return convert_dirname(a1, (long long)a1, 0LL); }
get_charsets_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x1af770] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0x50ef70] CMP qword ptr [RAX],0x0 JZ 0x0015f6ce MOV RDI,qword ptr [RBP + -0x8] LEA RAX,[0x50ef70] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff CALL 0x001abb70 JMP 0x0015f748 LAB_0015f6ce: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00164db0 CMP EAX,0x0 JNZ 0x0015f6f1 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1af789] CALL 0x001a8420 CMP EAX,0x0 JZ 0x0015f715 LAB_0015f6f1: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x1b03c8] LEA RCX,[0x1af79c] XOR EAX,EAX MOV R8D,EAX MOV AL,0x0 CALL 0x001abc50 JMP 0x0015f746 LAB_0015f715: MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] LEA RSI,[0x1af789] LEA R8,[0x1b03c8] LEA R9,[0x1af79c] XOR EAX,EAX MOV RDX,R8 MOV qword ptr [RSP],0x0 MOV AL,0x0 CALL 0x001abc50 LAB_0015f746: JMP 0x0015f748 LAB_0015f748: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV EDX,EAX CALL 0x00158230 MOV qword ptr [RBP + -0x18],RAX JMP 0x0015f75f LAB_0015f75f: JMP 0x0015f761 LAB_0015f761: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
int8 get_charsets_dir(int8 param_1) { int iVar1; int8 uVar2; if (charsets_dir == 0) { iVar1 = test_if_hard_path("/home/mono/install/share"); if ((iVar1 == 0) && (iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"), iVar1 == 0)) { strxmov(param_1,"/home/mono/install",&DAT_001b03c8,"/home/mono/install/share",&DAT_001b03c8, "charsets/",0); } else { strxmov(param_1,"/home/mono/install/share",&DAT_001b03c8,"charsets/",0); } } else { strmake(param_1,charsets_dir,0x1ff); } uVar2 = convert_dirname(param_1,param_1,0); return uVar2; }
1,268
ntt_conv
bluesky950520[P]quickjs/libbf.c
static int ntt_conv(BFNTTState *s, NTTLimb *buf1, NTTLimb *buf2, int k, int k_tot, limb_t m_idx) { limb_t n1, n2, i; int k1, k2; if (k <= NTT_TRIG_K_MAX) { k1 = k; } else { /* recursive split of the FFT */ k1 = bf_min(k / 2, NTT_TRIG_K_MAX); } k2 = k - k1; n1 = (limb_t)1 << k1; n2 = (limb_t)1 << k2; if (ntt_fft_partial(s, buf1, k1, k2, n1, n2, 0, m_idx)) return -1; if (ntt_fft_partial(s, buf2, k1, k2, n1, n2, 0, m_idx)) return -1; if (k2 == 0) { ntt_vec_mul(s, buf1, buf2, k, k_tot, m_idx); } else { for(i = 0; i < n1; i++) { ntt_conv(s, buf1 + i * n2, buf2 + i * n2, k2, k_tot, m_idx); } } if (ntt_fft_partial(s, buf1, k1, k2, n1, n2, 1, m_idx)) return -1; return 0; }
O2
c
ntt_conv: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %r10 movl %r8d, 0x8(%rsp) movl %ecx, %r15d movq %rdx, 0x20(%rsp) movq %rsi, %r14 movl %ecx, %eax shrl %eax cmpl $0x13, %eax pushq $0x13 popq %rbp cmovbl %eax, %ebp cmpl $0x14, %ecx cmovll %ecx, %ebp movl %ecx, %r13d subl %ebp, %r13d pushq $0x1 popq %rbx movq %rbx, %r12 movl %ebp, %ecx shlq %cl, %r12 movl %r13d, %ecx shlq %cl, %rbx movq %rdi, 0x28(%rsp) movl %ebp, %edx movl %r13d, %ecx movq %r12, %r8 movq %rbx, %r9 movq %r10, (%rsp) pushq %r10 pushq $0x0 callq 0x7edd8 popq %rcx popq %rdx pushq $-0x1 popq %rcx testl %eax, %eax jne 0x7e8d8 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movl %ebp, %edx movl %r13d, %ecx movq %r12, %r8 movq %rbx, %r9 pushq (%rsp) pushq $0x0 callq 0x7edd8 pushq $-0x1 popq %rcx addq $0x10, %rsp testl %eax, %eax jne 0x7e8d8 movq %r12, 0x10(%rsp) movq %rbx, 0x18(%rsp) movq 0x28(%rsp), %rbx cmpl $0x14, %r15d jge 0x7e864 movq (%rsp), %r10 movslq %r10d, %rax leaq 0xea4f(%rip), %rcx # 0x8d1f0 movq (%rcx,%rax,8), %r12 movq %rbx, %rdi movq 0x8(%rbx,%rax,8), %rcx movq %rcx, 0x40(%rsp) imulq $0x340, %rax, %rax # imm = 0x340 addq %rbx, %rax movl 0x8(%rsp), %ecx shlq $0x4, %rcx movq 0x26f0(%rcx,%rax), %rdx movq %rdx, 0x38(%rsp) movq 0x26f8(%rcx,%rax), %rax movq %rax, 0x30(%rsp) movl %r15d, %eax movq %rax, 0x8(%rsp) xorl %r15d, %r15d movq 0x20(%rsp), %rdx movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r8 movq %r15, %rax movq 0x8(%rsp), %rcx shrq %cl, %rax testq %rax, %rax jne 0x7e8bf movq (%r14,%r15,8), %rdi cmpq %r12, %rdi movl $0x0, %eax cmovaeq %r12, %rax subq %rax, %rdi movq (%rdx,%r15,8), %rsi movq %r12, %rdx movq 0x40(%rsp), %rcx callq 0x7ed88 movq 0x10(%rsp), %r8 movq 0x18(%rsp), %r9 movq %rbx, %rdi movq (%rsp), %r10 movq %rax, %rcx mulq 0x30(%rsp) imulq 0x38(%rsp), %rcx imulq %r12, %rdx subq %rdx, %rcx movq 0x20(%rsp), %rdx movq %rcx, (%r14,%r15,8) incq %r15 jmp 0x7e7f8 xorl %r15d, %r15d movq (%rsp), %r10 movq %rbx, %rdi movq 0x18(%rsp), %r9 movq 0x10(%rsp), %r8 movl 0x8(%rsp), %r12d cmpq %r15, %r8 je 0x7e8bf movq %r15, %rax movl %r13d, %ecx shlq %cl, %rax leaq (%r14,%rax,8), %rsi movq 0x20(%rsp), %rcx leaq (%rcx,%rax,8), %rdx movq %rbx, %rdi movl %r13d, %ecx movl %r12d, %r8d movq %r10, %r9 callq 0x7e6d7 movq 0x10(%rsp), %r8 movq 0x18(%rsp), %r9 movq %rbx, %rdi movq (%rsp), %r10 incq %r15 jmp 0x7e87d movq %r14, %rsi movl %ebp, %edx movl %r13d, %ecx pushq %r10 pushq $0x1 callq 0x7edd8 popq %rcx popq %rdx xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx movl %ecx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ntt_conv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r10, r9 mov dword ptr [rsp+78h+var_70], r8d mov r15d, ecx mov [rsp+78h+var_58], rdx mov r14, rsi mov eax, ecx shr eax, 1 cmp eax, 13h push 13h pop rbp cmovb ebp, eax cmp ecx, 14h cmovl ebp, ecx mov r13d, ecx sub r13d, ebp push 1 pop rbx mov r12, rbx mov ecx, ebp shl r12, cl mov ecx, r13d shl rbx, cl mov [rsp+78h+var_50], rdi mov edx, ebp mov ecx, r13d mov r8, r12 mov r9, rbx mov [rsp+78h+var_78], r10 push r10 push 0 call ntt_fft_partial pop rcx pop rdx push 0FFFFFFFFFFFFFFFFh pop rcx test eax, eax jnz loc_7E8D8 mov rdi, [rsp+78h+var_50] mov rsi, [rsp+78h+var_58] mov edx, ebp mov ecx, r13d mov r8, r12 mov r9, rbx push [rsp+78h+var_78] push 0 call ntt_fft_partial push 0FFFFFFFFFFFFFFFFh pop rcx add rsp, 10h test eax, eax jnz loc_7E8D8 mov [rsp+78h+var_68], r12 mov [rsp+78h+var_60], rbx mov rbx, [rsp+78h+var_50] cmp r15d, 14h jge loc_7E864 mov r10, [rsp+78h+var_78] movsxd rax, r10d lea rcx, ntt_mods mov r12, [rcx+rax*8] mov rdi, rbx mov rcx, [rbx+rax*8+8] mov [rsp+78h+var_38], rcx imul rax, 340h add rax, rbx mov ecx, dword ptr [rsp+78h+var_70] shl rcx, 4 mov rdx, [rcx+rax+26F0h] mov [rsp+78h+var_40], rdx mov rax, [rcx+rax+26F8h] mov [rsp+78h+var_48], rax mov eax, r15d mov [rsp+78h+var_70], rax xor r15d, r15d mov rdx, [rsp+78h+var_58] mov r9, [rsp+78h+var_60] mov r8, [rsp+78h+var_68] loc_7E7F8: mov rax, r15 mov rcx, [rsp+78h+var_70] shr rax, cl test rax, rax jnz loc_7E8BF mov rdi, [r14+r15*8] cmp rdi, r12 mov eax, 0 cmovnb rax, r12 sub rdi, rax mov rsi, [rdx+r15*8] mov rdx, r12 mov rcx, [rsp+78h+var_38] call mul_mod_fast mov r8, [rsp+78h+var_68] mov r9, [rsp+78h+var_60] mov rdi, rbx mov r10, [rsp+78h+var_78] mov rcx, rax mul [rsp+78h+var_48] imul rcx, [rsp+78h+var_40] imul rdx, r12 sub rcx, rdx mov rdx, [rsp+78h+var_58] mov [r14+r15*8], rcx inc r15 jmp short loc_7E7F8 loc_7E864: xor r15d, r15d mov r10, [rsp+78h+var_78] mov rdi, rbx mov r9, [rsp+78h+var_60] mov r8, [rsp+78h+var_68] mov r12d, dword ptr [rsp+78h+var_70] loc_7E87D: cmp r8, r15 jz short loc_7E8BF mov rax, r15 mov ecx, r13d shl rax, cl lea rsi, [r14+rax*8] mov rcx, [rsp+78h+var_58] lea rdx, [rcx+rax*8] mov rdi, rbx mov ecx, r13d mov r8d, r12d mov r9, r10 call ntt_conv mov r8, [rsp+78h+var_68] mov r9, [rsp+78h+var_60] mov rdi, rbx mov r10, [rsp+78h+var_78] inc r15 jmp short loc_7E87D loc_7E8BF: mov rsi, r14 mov edx, ebp mov ecx, r13d push r10 push 1 call ntt_fft_partial pop rcx pop rdx xor ecx, ecx neg eax sbb ecx, ecx loc_7E8D8: mov eax, ecx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ntt_conv(unsigned long long a1, long long a2, long long a3, int a4, unsigned int a5, long long a6) { int v7; // ebp unsigned int v8; // r13d long long v9; // rbx int v10; // eax unsigned int v11; // ecx int v12; // eax long long v13; // r10 unsigned long long v14; // r12 unsigned long long v15; // rax long long v16; // rcx unsigned long long v17; // r15 long long v18; // rdx int v19; // r9d long long v20; // r8 unsigned long long v21; // rax long long v22; // rax long long v23; // r15 char v27; // [rsp+8h] [rbp-70h] unsigned long long v29; // [rsp+28h] [rbp-50h] unsigned long long v30; // [rsp+30h] [rbp-48h] long long v31; // [rsp+38h] [rbp-40h] long long v32; // [rsp+40h] [rbp-38h] v7 = 19; if ( (unsigned int)a4 >> 1 < 0x13 ) v7 = (unsigned int)a4 >> 1; if ( a4 < 20 ) v7 = a4; v8 = a4 - v7; v9 = 1LL << ((unsigned __int8)a4 - (unsigned __int8)v7); v29 = a1; v10 = ntt_fft_partial(a1, a2, v7, a4 - v7, 1LL << v7, v9, 0, a6); v11 = -1; if ( !v10 ) { v12 = ntt_fft_partial(a1, a3, v7, v8, 1LL << v7, v9, 0, a6); v11 = -1; if ( !v12 ) { if ( a4 >= 20 ) { v23 = 0LL; v13 = a6; v19 = v9; v20 = 1LL << v7; while ( v20 != v23 ) { ntt_conv(v29, a2 + 8 * (v23 << v8), a3 + 8 * (v23 << v8), v8, a5, v13); v20 = 1LL << v7; v19 = v9; LODWORD(a1) = v29; v13 = a6; ++v23; } } else { v13 = a6; v14 = ntt_mods[(int)a6]; v32 = *(_QWORD *)(a1 + 8LL * (int)a6 + 8); v15 = a1 + 832LL * (int)a6; v16 = 16LL * a5; v31 = *(_QWORD *)(v16 + v15 + 9968); v30 = *(_QWORD *)(v16 + v15 + 9976); v27 = a4; v17 = 0LL; v18 = a3; v19 = v9; LODWORD(v20) = 1LL << v7; while ( !(v17 >> v27) ) { a1 = *(_QWORD *)(a2 + 8 * v17); v21 = 0LL; if ( a1 >= v14 ) v21 = v14; v22 = mul_mod_fast(a1 - v21, *(_QWORD *)(v18 + 8 * v17), v14, v32); LODWORD(v20) = 1LL << v7; v19 = v9; LODWORD(a1) = v29; v13 = a6; v18 = a3; *(_QWORD *)(a2 + 8 * v17++) = v31 * v22 - v14 * ((v30 * (unsigned __int128)(unsigned long long)v22) >> 64); } } return (unsigned int)-((unsigned int)ntt_fft_partial(a1, a2, v7, v8, v20, v19, 1, v13) != 0); } } return v11; }
ntt_conv: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R10,R9 MOV dword ptr [RSP + 0x8],R8D MOV R15D,ECX MOV qword ptr [RSP + 0x20],RDX MOV R14,RSI MOV EAX,ECX SHR EAX,0x1 CMP EAX,0x13 PUSH 0x13 POP RBP CMOVC EBP,EAX CMP ECX,0x14 CMOVL EBP,ECX MOV R13D,ECX SUB R13D,EBP PUSH 0x1 POP RBX MOV R12,RBX MOV ECX,EBP SHL R12,CL MOV ECX,R13D SHL RBX,CL MOV qword ptr [RSP + 0x28],RDI MOV EDX,EBP MOV ECX,R13D MOV R8,R12 MOV R9,RBX MOV qword ptr [RSP],R10 PUSH R10 PUSH 0x0 CALL 0x0017edd8 POP RCX POP RDX PUSH -0x1 POP RCX TEST EAX,EAX JNZ 0x0017e8d8 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,EBP MOV ECX,R13D MOV R8,R12 MOV R9,RBX PUSH qword ptr [RSP] PUSH 0x0 CALL 0x0017edd8 PUSH -0x1 POP RCX ADD RSP,0x10 TEST EAX,EAX JNZ 0x0017e8d8 MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x18],RBX MOV RBX,qword ptr [RSP + 0x28] CMP R15D,0x14 JGE 0x0017e864 MOV R10,qword ptr [RSP] MOVSXD RAX,R10D LEA RCX,[0x18d1f0] MOV R12,qword ptr [RCX + RAX*0x8] MOV RDI,RBX MOV RCX,qword ptr [RBX + RAX*0x8 + 0x8] MOV qword ptr [RSP + 0x40],RCX IMUL RAX,RAX,0x340 ADD RAX,RBX MOV ECX,dword ptr [RSP + 0x8] SHL RCX,0x4 MOV RDX,qword ptr [RCX + RAX*0x1 + 0x26f0] MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RCX + RAX*0x1 + 0x26f8] MOV qword ptr [RSP + 0x30],RAX MOV EAX,R15D MOV qword ptr [RSP + 0x8],RAX XOR R15D,R15D MOV RDX,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] LAB_0017e7f8: MOV RAX,R15 MOV RCX,qword ptr [RSP + 0x8] SHR RAX,CL TEST RAX,RAX JNZ 0x0017e8bf MOV RDI,qword ptr [R14 + R15*0x8] CMP RDI,R12 MOV EAX,0x0 CMOVNC RAX,R12 SUB RDI,RAX MOV RSI,qword ptr [RDX + R15*0x8] MOV RDX,R12 MOV RCX,qword ptr [RSP + 0x40] CALL 0x0017ed88 MOV R8,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x18] MOV RDI,RBX MOV R10,qword ptr [RSP] MOV RCX,RAX MUL qword ptr [RSP + 0x30] IMUL RCX,qword ptr [RSP + 0x38] IMUL RDX,R12 SUB RCX,RDX MOV RDX,qword ptr [RSP + 0x20] MOV qword ptr [R14 + R15*0x8],RCX INC R15 JMP 0x0017e7f8 LAB_0017e864: XOR R15D,R15D MOV R10,qword ptr [RSP] MOV RDI,RBX MOV R9,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] MOV R12D,dword ptr [RSP + 0x8] LAB_0017e87d: CMP R8,R15 JZ 0x0017e8bf MOV RAX,R15 MOV ECX,R13D SHL RAX,CL LEA RSI,[R14 + RAX*0x8] MOV RCX,qword ptr [RSP + 0x20] LEA RDX,[RCX + RAX*0x8] MOV RDI,RBX MOV ECX,R13D MOV R8D,R12D MOV R9,R10 CALL 0x0017e6d7 MOV R8,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x18] MOV RDI,RBX MOV R10,qword ptr [RSP] INC R15 JMP 0x0017e87d LAB_0017e8bf: MOV RSI,R14 MOV EDX,EBP MOV ECX,R13D PUSH R10 PUSH 0x1 CALL 0x0017edd8 POP RCX POP RDX XOR ECX,ECX NEG EAX SBB ECX,ECX LAB_0017e8d8: MOV EAX,ECX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int ntt_conv(long param_1,long param_2,long param_3,uint param_4,uint param_5,int8 param_6) { ulong uVar1; int8 uVar2; ulong uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int iVar6; int iVar7; long lVar8; long lVar9; ulong uVar10; ulong uVar11; long lVar12; uint uVar13; long lVar14; int iVar15; ulong uVar16; uVar13 = 0x13; if (param_4 >> 1 < 0x13) { uVar13 = param_4 >> 1; } if ((int)param_4 < 0x14) { uVar13 = param_4; } iVar15 = param_4 - uVar13; lVar14 = 1L << ((byte)uVar13 & 0x3f); lVar12 = 1L << ((byte)iVar15 & 0x3f); iVar6 = ntt_fft_partial(param_1,param_2,uVar13,iVar15,lVar14,lVar12,0,param_6); iVar7 = -1; if (iVar6 == 0) { iVar6 = ntt_fft_partial(param_1,param_3,uVar13,iVar15,lVar14,lVar12,0,param_6); iVar7 = -1; if (iVar6 == 0) { if ((int)param_4 < 0x14) { lVar8 = (long)(int)param_6; uVar1 = (&ntt_mods)[lVar8]; uVar2 = *(int8 *)(param_1 + 8 + lVar8 * 8); lVar9 = lVar8 * 0x340 + param_1; lVar8 = *(long *)((ulong)param_5 * 0x10 + 0x26f0 + lVar9); uVar3 = *(ulong *)((ulong)param_5 * 0x10 + 0x26f8 + lVar9); for (uVar16 = 0; uVar16 >> ((byte)param_4 & 0x3f) == 0; uVar16 = uVar16 + 1) { uVar11 = *(ulong *)(param_2 + uVar16 * 8); uVar10 = 0; if (uVar1 <= uVar11) { uVar10 = uVar1; } uVar11 = mul_mod_fast(uVar11 - uVar10,*(int8 *)(param_3 + uVar16 * 8),uVar1,uVar2); auVar4._8_8_ = 0; auVar4._0_8_ = uVar11; auVar5._8_8_ = 0; auVar5._0_8_ = uVar3; *(ulong *)(param_2 + uVar16 * 8) = uVar11 * lVar8 - SUB168(auVar4 * auVar5,8) * uVar1; } } else { for (lVar8 = 0; lVar14 != lVar8; lVar8 = lVar8 + 1) { lVar9 = lVar8 << ((byte)iVar15 & 0x3f); ntt_conv(param_1,param_2 + lVar9 * 8,param_3 + lVar9 * 8,iVar15,param_5,param_6); } } iVar7 = ntt_fft_partial(param_1,param_2,uVar13,iVar15,lVar14,lVar12,1,param_6); iVar7 = -(uint)(iVar7 != 0); } } return iVar7; }
1,269
get_date
eloqsql/mysys/mf_getdate.c
void get_date(register char * to, int flag, time_t date) { reg2 struct tm *start_time; time_t skr; #if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT) struct tm tm_tmp; #endif skr=date ? date : (time_t) my_time(0); #if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT) if (flag & GETDATE_GMT) gmtime_r(&skr,&tm_tmp); else localtime_r(&skr,&tm_tmp); start_time= &tm_tmp; #else if (flag & GETDATE_GMT) start_time= gmtime(&skr); else start_time= localtime(&skr); #endif if (flag & GETDATE_SHORT_DATE) sprintf(to,"%02d%02d%02d", start_time->tm_year % 100, start_time->tm_mon+1, start_time->tm_mday); else sprintf(to, ((flag & GETDATE_FIXEDLENGTH) ? "%4d-%02d-%02d" : "%d-%02d-%02d"), start_time->tm_year+1900, start_time->tm_mon+1, start_time->tm_mday); if (flag & GETDATE_DATE_TIME) sprintf(strend(to), ((flag & GETDATE_FIXEDLENGTH) ? " %02d:%02d:%02d" : " %2d:%02d:%02d"), start_time->tm_hour, start_time->tm_min, start_time->tm_sec); else if (flag & GETDATE_HHMMSSTIME) sprintf(strend(to),"%02d%02d%02d", start_time->tm_hour, start_time->tm_min, start_time->tm_sec); }
O3
c
get_date: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movl %esi, %ebx movq %rdi, %r14 testq %rdx, %rdx jne 0x52b47 callq 0x5b814 movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB mulq %rcx shrq $0x12, %rdx movq %rdx, -0x18(%rbp) leaq -0x18(%rbp), %rdi leaq -0x50(%rbp), %rsi testb $0x8, %bl jne 0x52b5f callq 0x281b0 jmp 0x52b64 callq 0x28750 testb $0x2, %bl jne 0x52ba6 testb $0x10, %bl leaq 0x43ba7(%rip), %rax # 0x9671a leaq 0x43b92(%rip), %rcx # 0x9670c cmoveq %rax, %rcx movl $0x76c, %r8d # imm = 0x76C addl -0x3c(%rbp), %r8d movl -0x44(%rbp), %eax movl -0x40(%rbp), %r9d incl %r9d movl %eax, (%rsp) movq %r14, %rdi movl $0x1, %esi movq $-0x1, %rdx jmp 0x52be7 movslq -0x3c(%rbp), %r8 imulq $0x51eb851f, %r8, %rax # imm = 0x51EB851F movq %rax, %rcx shrq $0x3f, %rcx sarq $0x25, %rax addl %ecx, %eax imull $0x64, %eax, %eax subl %eax, %r8d movl -0x44(%rbp), %eax movl -0x40(%rbp), %r9d incl %r9d movl %eax, (%rsp) leaq 0x43b27(%rip), %rcx # 0x966ff movq %r14, %rdi movl $0x1, %esi movq $-0x1, %rdx xorl %eax, %eax callq 0x28220 testb $0x1, %bl jne 0x52c17 testb $0x4, %bl je 0x52c58 movq %r14, %rdi callq 0x923a4 movl -0x48(%rbp), %r8d movl -0x50(%rbp), %ecx movl -0x4c(%rbp), %r9d movl %ecx, (%rsp) leaq 0x43aea(%rip), %rcx # 0x966ff jmp 0x52c42 movq %r14, %rdi callq 0x923a4 testb $0x10, %bl leaq 0x43b0e(%rip), %rdx # 0x96737 leaq 0x43af7(%rip), %rcx # 0x96727 cmoveq %rdx, %rcx movl -0x48(%rbp), %r8d movl -0x50(%rbp), %edx movl -0x4c(%rbp), %r9d movl %edx, (%rsp) movq %rax, %rdi movl $0x1, %esi movq $-0x1, %rdx xorl %eax, %eax callq 0x28220 addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq nopl (%rax)
get_date: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov ebx, esi mov r14, rdi test rdx, rdx jnz short loc_52B47 call my_hrtime mov rcx, 431BDE82D7B634DBh mul rcx shr rdx, 12h loc_52B47: mov [rbp+var_18], rdx lea rdi, [rbp+var_18] lea rsi, [rbp+var_50] test bl, 8 jnz short loc_52B5F call _localtime_r jmp short loc_52B64 loc_52B5F: call _gmtime_r loc_52B64: test bl, 2 jnz short loc_52BA6 test bl, 10h lea rax, aD02d02d; "%d-%02d-%02d" lea rcx, a4d02d02d; "%4d-%02d-%02d" cmovz rcx, rax mov r8d, 76Ch add r8d, [rbp+var_3C] mov eax, [rbp+var_44] mov r9d, [rbp+var_40] inc r9d mov [rsp+60h+var_60], eax mov rdi, r14 mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh jmp short loc_52BE7 loc_52BA6: movsxd r8, [rbp+var_3C] imul rax, r8, 51EB851Fh mov rcx, rax shr rcx, 3Fh sar rax, 25h add eax, ecx imul eax, 64h ; 'd' sub r8d, eax mov eax, [rbp+var_44] mov r9d, [rbp+var_40] inc r9d mov [rsp+60h+var_60], eax lea rcx, a02d02d02d; "%02d%02d%02d" mov rdi, r14 mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh loc_52BE7: xor eax, eax call ___sprintf_chk test bl, 1 jnz short loc_52C17 test bl, 4 jz short loc_52C58 mov rdi, r14 call strend mov r8d, [rbp+var_48] mov ecx, [rbp+var_50] mov r9d, [rbp+var_4C] mov [rsp+60h+var_60], ecx lea rcx, a02d02d02d; "%02d%02d%02d" jmp short loc_52C42 loc_52C17: mov rdi, r14 call strend test bl, 10h lea rdx, a2d02d02d; " %2d:%02d:%02d" lea rcx, a02d02d02d_0; " %02d:%02d:%02d" cmovz rcx, rdx mov r8d, [rbp+var_48] mov edx, [rbp+var_50] mov r9d, [rbp+var_4C] mov [rsp+60h+var_60], edx loc_52C42: mov rdi, rax mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh xor eax, eax call ___sprintf_chk loc_52C58: add rsp, 50h pop rbx pop r14 pop rbp retn
long long get_date(long long a1, char a2, unsigned long long a3) { const char *v3; // rcx long long v4; // r8 long long v5; // r9 long long result; // rax long long v7; // rax long long v8; // rax const char *v9; // rcx int v10; // [rsp+0h] [rbp-60h] long long v11; // [rsp+0h] [rbp-60h] int v12; // [rsp+10h] [rbp-50h] BYREF unsigned int v13; // [rsp+14h] [rbp-4Ch] unsigned int v14; // [rsp+18h] [rbp-48h] int v15; // [rsp+1Ch] [rbp-44h] int v16; // [rsp+20h] [rbp-40h] int v17; // [rsp+24h] [rbp-3Ch] _QWORD v18[3]; // [rsp+48h] [rbp-18h] BYREF if ( !a3 ) a3 = my_hrtime() / 0xF4240uLL; v18[0] = a3; if ( (a2 & 8) != 0 ) gmtime_r(v18, &v12); else localtime_r(v18, &v12); if ( (a2 & 2) != 0 ) { v4 = (unsigned int)(v17 % 100); v5 = (unsigned int)(v16 + 1); v10 = v15; v3 = "%02d%02d%02d"; } else { v3 = "%4d-%02d-%02d"; if ( (a2 & 0x10) == 0 ) v3 = "%d-%02d-%02d"; v4 = (unsigned int)(v17 + 1900); v5 = (unsigned int)(v16 + 1); v10 = v15; } result = __sprintf_chk(a1, 1LL, -1LL, v3, v4, v5, v10); if ( (a2 & 1) != 0 ) { v8 = strend(a1); v9 = " %02d:%02d:%02d"; if ( (a2 & 0x10) == 0 ) v9 = " %2d:%02d:%02d"; LODWORD(v11) = v12; return __sprintf_chk(v8, 1LL, -1LL, v9, v14, v13, v11); } else if ( (a2 & 4) != 0 ) { v7 = strend(a1); LODWORD(v11) = v12; return __sprintf_chk(v7, 1LL, -1LL, "%02d%02d%02d", v14, v13, v11); } return result; }
get_date: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV EBX,ESI MOV R14,RDI TEST RDX,RDX JNZ 0x00152b47 CALL 0x0015b814 MOV RCX,0x431bde82d7b634db MUL RCX SHR RDX,0x12 LAB_00152b47: MOV qword ptr [RBP + -0x18],RDX LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x50] TEST BL,0x8 JNZ 0x00152b5f CALL 0x001281b0 JMP 0x00152b64 LAB_00152b5f: CALL 0x00128750 LAB_00152b64: TEST BL,0x2 JNZ 0x00152ba6 TEST BL,0x10 LEA RAX,[0x19671a] LEA RCX,[0x19670c] CMOVZ RCX,RAX MOV R8D,0x76c ADD R8D,dword ptr [RBP + -0x3c] MOV EAX,dword ptr [RBP + -0x44] MOV R9D,dword ptr [RBP + -0x40] INC R9D MOV dword ptr [RSP],EAX MOV RDI,R14 MOV ESI,0x1 MOV RDX,-0x1 JMP 0x00152be7 LAB_00152ba6: MOVSXD R8,dword ptr [RBP + -0x3c] IMUL RAX,R8,0x51eb851f MOV RCX,RAX SHR RCX,0x3f SAR RAX,0x25 ADD EAX,ECX IMUL EAX,EAX,0x64 SUB R8D,EAX MOV EAX,dword ptr [RBP + -0x44] MOV R9D,dword ptr [RBP + -0x40] INC R9D MOV dword ptr [RSP],EAX LEA RCX,[0x1966ff] MOV RDI,R14 MOV ESI,0x1 MOV RDX,-0x1 LAB_00152be7: XOR EAX,EAX CALL 0x00128220 TEST BL,0x1 JNZ 0x00152c17 TEST BL,0x4 JZ 0x00152c58 MOV RDI,R14 CALL 0x001923a4 MOV R8D,dword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x4c] MOV dword ptr [RSP],ECX LEA RCX,[0x1966ff] JMP 0x00152c42 LAB_00152c17: MOV RDI,R14 CALL 0x001923a4 TEST BL,0x10 LEA RDX,[0x196737] LEA RCX,[0x196727] CMOVZ RCX,RDX MOV R8D,dword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x4c] MOV dword ptr [RSP],EDX LAB_00152c42: MOV RDI,RAX MOV ESI,0x1 MOV RDX,-0x1 XOR EAX,EAX CALL 0x00128220 LAB_00152c58: ADD RSP,0x50 POP RBX POP R14 POP RBP RET
void get_date(int8 param_1,ulong param_2,ulong param_3) { int8 uVar1; char *pcVar2; tm local_58; ulong local_20; if (param_3 == 0) { param_3 = my_hrtime(); param_3 = param_3 / 1000000; } local_20 = param_3; if ((param_2 & 8) == 0) { localtime_r((time_t *)&local_20,&local_58); } else { gmtime_r((time_t *)&local_20,&local_58); } if ((param_2 & 2) == 0) { pcVar2 = "%4d-%02d-%02d"; if ((param_2 & 0x10) == 0) { pcVar2 = "%d-%02d-%02d"; } local_58.tm_year = local_58.tm_year + 0x76c; } else { local_58.tm_year = local_58.tm_year % 100; pcVar2 = "%02d%02d%02d"; } __sprintf_chk(param_1,1,0xffffffffffffffff,pcVar2,local_58.tm_year,local_58.tm_mon + 1, local_58.tm_mday); if ((param_2 & 1) == 0) { if ((param_2 & 4) == 0) { return; } uVar1 = strend(param_1); pcVar2 = "%02d%02d%02d"; } else { uVar1 = strend(param_1); pcVar2 = " %02d:%02d:%02d"; if ((param_2 & 0x10) == 0) { pcVar2 = " %2d:%02d:%02d"; } } __sprintf_chk(uVar1,1,0xffffffffffffffff,pcVar2,local_58.tm_hour,local_58.tm_min,local_58.tm_sec); return; }
1,270
fini_one_value
eloqsql/mysys/my_getopt.c
static void fini_one_value(const struct my_option *option, void *variable, longlong value __attribute__ ((unused))) { DBUG_ENTER("fini_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { case GET_STR_ALLOC: my_free(*((char**) variable)); *((char**) variable)= NULL; break; default: /* dummy default to avoid compiler warnings */ break; } DBUG_VOID_RETURN; }
O0
c
fini_one_value: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x30(%rax), %eax andl $0x3f, %eax subl $0xa, %eax jne 0x7945e jmp 0x79445 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x7bd00 movq -0x10(%rbp), %rax movq $0x0, (%rax) jmp 0x79460 jmp 0x79460 jmp 0x79462 jmp 0x79464 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
fini_one_value: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+30h] and eax, 3Fh sub eax, 0Ah jnz short loc_7945E jmp short $+2 loc_79445: mov rax, [rbp+var_10] mov rdi, [rax] call my_free mov rax, [rbp+var_10] mov qword ptr [rax], 0 jmp short loc_79460 loc_7945E: jmp short $+2 loc_79460: jmp short $+2 loc_79462: jmp short $+2 loc_79464: add rsp, 20h pop rbp retn
_QWORD * fini_one_value(long long a1, _QWORD *a2) { _QWORD *result; // rax result = (_QWORD *)((*(_DWORD *)(a1 + 48) & 0x3Fu) - 10); if ( (*(_DWORD *)(a1 + 48) & 0x3F) == 0xA ) { my_free(*a2); result = a2; *a2 = 0LL; } return result; }
fini_one_value: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x30] AND EAX,0x3f SUB EAX,0xa JNZ 0x0017945e JMP 0x00179445 LAB_00179445: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0017bd00 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 JMP 0x00179460 LAB_0017945e: JMP 0x00179460 LAB_00179460: JMP 0x00179462 LAB_00179462: JMP 0x00179464 LAB_00179464: ADD RSP,0x20 POP RBP RET
void fini_one_value(long param_1,int8 *param_2) { if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) { my_free(*param_2); *param_2 = 0; } return; }
1,271
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
monkey531[P]llama/common/json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0xb7bcf movq (%rbx), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax leaq 0x388b6(%rip), %rsi # 0xf0477 movl $0x4, %edx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax leaq 0x10(%rbx), %r14 leaq 0x50(%rbx), %rsi movq %r14, %rdi callq 0xb7e13 movq (%rbx), %rdi subq %r14, %rax movq (%rdi), %rcx movq 0x8(%rcx), %rcx movq %r14, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: push r14 push rbx push rax mov rbx, rdi movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl short loc_B7BCF mov rdi, [rbx] mov rax, [rdi] mov rax, [rax+8] lea rsi, aOnNull_0+5; "null" mov edx, 4 add rsp, 8 pop rbx pop r14 jmp rax loc_B7BCF: lea r14, [rbx+10h] lea rsi, [rbx+50h] mov rdi, r14; this call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double) mov rdi, [rbx] sub rax, r14 mov rcx, [rdi] mov rcx, [rcx+8] mov rsi, r14 mov rdx, rax add rsp, 8 pop rbx pop r14 jmp rcx
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( _QWORD *a1, double a2) { long long v3; // rax if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL); v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2)); return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))( *a1, a1 + 2, v3 - (_QWORD)(a1 + 2)); }
dump_float: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x001b7bcf MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] LEA RSI,[0x1f0477] MOV EDX,0x4 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_001b7bcf: LEA R14,[RBX + 0x10] LEA RSI,[RBX + 0x50] MOV RDI,R14 CALL 0x001b7e13 MOV RDI,qword ptr [RBX] SUB RAX,R14 MOV RCX,qword ptr [RDI] MOV RCX,qword ptr [RCX + 0x8] MOV RSI,R14 MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP RCX
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,double param_1) { serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *psVar1; code *UNRECOVERED_JUMPTABLE; char *pcVar2; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { /* WARNING: Could not recover jumptable at 0x001b7bcd. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)this + 8))(*(long **)this,"null",4); return; } psVar1 = this + 0x10; pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1); UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8); /* WARNING: Could not recover jumptable at 0x001b7bf9. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE); return; }
1,272
JS_AddIntrinsicProxy
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicProxy(JSContext *ctx) { JSRuntime *rt = ctx->rt; JSValue obj1; if (!JS_IsRegisteredClass(rt, JS_CLASS_PROXY)) { init_class_range(rt, js_proxy_class_def, JS_CLASS_PROXY, countof(js_proxy_class_def)); rt->class_array[JS_CLASS_PROXY].exotic = &js_proxy_exotic_methods; rt->class_array[JS_CLASS_PROXY].call = js_proxy_call; } obj1 = JS_NewCFunction2(ctx, js_proxy_constructor, "Proxy", 2, JS_CFUNC_constructor, 0); JS_SetConstructorBit(ctx, obj1, TRUE); JS_SetPropertyFunctionList(ctx, obj1, js_proxy_funcs, countof(js_proxy_funcs)); JS_DefinePropertyValueStr(ctx, ctx->global_obj, "Proxy", obj1, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); }
O2
c
JS_AddIntrinsicProxy: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq 0x18(%rdi), %r14 cmpl $0x31, 0x78(%r14) jb 0x1cea6 movq 0x80(%r14), %rax cmpl $0x0, 0x780(%rax) jne 0x1cede leaq 0x9cda3(%rip), %rsi # 0xb9c50 pushq $0x30 popq %rdx pushq $0x1 popq %rcx movq %r14, %rdi callq 0x1b1c1 movq 0x80(%r14), %rax leaq 0x9cd9f(%rip), %rcx # 0xb9c68 movq %rcx, 0x7a0(%rax) leaq 0x15bf1(%rip), %rcx # 0x32ac8 movq %rcx, 0x798(%rax) leaq 0x15ef1(%rip), %rsi # 0x32dd6 leaq 0x6c0d6(%rip), %rdx # 0x88fc2 pushq $0x2 popq %rcx movq %rbx, %rdi movl %ecx, %r8d xorl %r9d, %r9d callq 0x1ee8d movq %rax, %r14 movq %rdx, %r15 cmpl $-0x1, %r15d jne 0x1cf0e orb $0x10, 0x5(%r14) leaq 0x9cd8b(%rip), %rcx # 0xb9ca0 pushq $0x1 popq %r8 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x2ffaf movq 0x1a0(%rbx), %rsi movq 0x1a8(%rbx), %rdx movl $0x3, (%rsp) leaq 0x6c07f(%rip), %rcx # 0x88fc2 movq %rbx, %rdi movq %r14, %r8 movq %r15, %r9 callq 0x245db addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
JS_AddIntrinsicProxy: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi mov r14, [rdi+18h] cmp dword ptr [r14+78h], 31h ; '1' jb short loc_1CEA6 mov rax, [r14+80h] cmp dword ptr [rax+780h], 0 jnz short loc_1CEDE loc_1CEA6: lea rsi, js_proxy_class_def push 30h ; '0' pop rdx push 1 pop rcx mov rdi, r14 call init_class_range mov rax, [r14+80h] lea rcx, js_proxy_exotic_methods mov [rax+7A0h], rcx lea rcx, js_proxy_call mov [rax+798h], rcx loc_1CEDE: lea rsi, js_proxy_constructor lea rdx, aProxy; "Proxy" push 2 pop rcx mov rdi, rbx mov r8d, ecx xor r9d, r9d call JS_NewCFunction2 mov r14, rax mov r15, rdx cmp r15d, 0FFFFFFFFh jnz short loc_1CF0E or byte ptr [r14+5], 10h loc_1CF0E: lea rcx, js_proxy_funcs push 1 pop r8 mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_SetPropertyFunctionList mov rsi, [rbx+1A0h] mov rdx, [rbx+1A8h] mov [rsp+28h+var_28], 3 lea rcx, aProxy; "Proxy" mov rdi, rbx mov r8, r14 mov r9, r15 call JS_DefinePropertyValueStr add rsp, 10h pop rbx pop r14 pop r15 retn
long long JS_AddIntrinsicProxy(long long *a1) { long long v1; // r14 long long v2; // rax long long v3; // rax long long v4; // rdx int v5; // r14d int v6; // r15d v1 = a1[3]; if ( *(_DWORD *)(v1 + 120) < 0x31u || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 1920LL) ) { init_class_range(a1[3], (long long)&js_proxy_class_def, 0x30u, 1LL); v2 = *(_QWORD *)(v1 + 128); *(_QWORD *)(v2 + 1952) = js_proxy_exotic_methods; *(_QWORD *)(v2 + 1944) = js_proxy_call; } v3 = JS_NewCFunction2(a1, js_proxy_constructor, "Proxy", 2LL, 2LL, 0LL); v5 = v3; v6 = v4; if ( (_DWORD)v4 == -1 ) *(_BYTE *)(v3 + 5) |= 0x10u; JS_SetPropertyFunctionList(a1, v3, v4, &js_proxy_funcs, 1LL); return JS_DefinePropertyValueStr((_DWORD)a1, a1[52], a1[53], (unsigned int)"Proxy", v5, v6, 3); }
JS_AddIntrinsicProxy: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] CMP dword ptr [R14 + 0x78],0x31 JC 0x0011cea6 MOV RAX,qword ptr [R14 + 0x80] CMP dword ptr [RAX + 0x780],0x0 JNZ 0x0011cede LAB_0011cea6: LEA RSI,[0x1b9c50] PUSH 0x30 POP RDX PUSH 0x1 POP RCX MOV RDI,R14 CALL 0x0011b1c1 MOV RAX,qword ptr [R14 + 0x80] LEA RCX,[0x1b9c68] MOV qword ptr [RAX + 0x7a0],RCX LEA RCX,[0x132ac8] MOV qword ptr [RAX + 0x798],RCX LAB_0011cede: LEA RSI,[0x132dd6] LEA RDX,[0x188fc2] PUSH 0x2 POP RCX MOV RDI,RBX MOV R8D,ECX XOR R9D,R9D CALL 0x0011ee8d MOV R14,RAX MOV R15,RDX CMP R15D,-0x1 JNZ 0x0011cf0e OR byte ptr [R14 + 0x5],0x10 LAB_0011cf0e: LEA RCX,[0x1b9ca0] PUSH 0x1 POP R8 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0012ffaf MOV RSI,qword ptr [RBX + 0x1a0] MOV RDX,qword ptr [RBX + 0x1a8] MOV dword ptr [RSP],0x3 LEA RCX,[0x188fc2] MOV RDI,RBX MOV R8,R14 MOV R9,R15 CALL 0x001245db ADD RSP,0x10 POP RBX POP R14 POP R15 RET
void JS_AddIntrinsicProxy(long param_1) { long lVar1; int1 auVar2 [16]; lVar1 = *(long *)(param_1 + 0x18); if ((*(uint *)(lVar1 + 0x78) < 0x31) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x780) == 0)) { init_class_range(lVar1,js_proxy_class_def,0x30,1); lVar1 = *(long *)(lVar1 + 0x80); *(int1 **)(lVar1 + 0x7a0) = js_proxy_exotic_methods; *(code **)(lVar1 + 0x798) = js_proxy_call; } auVar2 = JS_NewCFunction2(param_1,js_proxy_constructor,"Proxy",2,2,0); lVar1 = auVar2._0_8_; if (auVar2._8_4_ == -1) { *(byte *)(lVar1 + 5) = *(byte *)(lVar1 + 5) | 0x10; } JS_SetPropertyFunctionList(param_1,lVar1,auVar2._8_8_,js_proxy_funcs,1); JS_DefinePropertyValueStr (param_1,*(int8 *)(param_1 + 0x1a0),*(int8 *)(param_1 + 0x1a8),"Proxy",lVar1 ,auVar2._8_8_,3); return; }
1,273
pfs_get_thread_file_descriptor_locker_v1
eloqsql/storage/perfschema/pfs.cc
PSI_file_locker* pfs_get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state, File file, PSI_file_operation op) { int index= static_cast<int> (file); assert(static_cast<int> (op) >= 0); assert(static_cast<uint> (op) < array_elements(file_operation_map)); assert(state != NULL); if (unlikely((index < 0) || (index >= file_handle_max))) return NULL; PFS_file *pfs_file= file_handle_array[index]; if (unlikely(pfs_file == NULL)) return NULL; /* We are about to close a file by descriptor number, and the calling code still holds the descriptor. Cleanup the file descriptor <--> file instrument association. Remove the instrumentation *before* the close to avoid race conditions with another thread opening a file (that could be given the same descriptor). */ if (op == PSI_FILE_CLOSE) file_handle_array[index]= NULL; if (! pfs_file->m_enabled) return NULL; assert(pfs_file->m_class != NULL); PFS_file_class *klass= pfs_file->m_class; /* Needed for the LF_HASH */ PFS_thread *pfs_thread= my_thread_get_THR_PFS(); if (unlikely(pfs_thread == NULL)) return NULL; uint flags; /* Always populated */ state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); if (flag_thread_instrumentation) { if (! pfs_thread->m_enabled) return NULL; flags= STATE_FLAG_THREAD; if (pfs_file->m_timed) flags|= STATE_FLAG_TIMED; if (flag_events_waits_current) { if (unlikely(pfs_thread->m_events_waits_current >= & pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE])) { locker_lost++; return NULL; } PFS_events_waits *wait= pfs_thread->m_events_waits_current; state->m_wait= wait; flags|= STATE_FLAG_EVENT; PFS_events_waits *parent_event= wait - 1; wait->m_event_type= EVENT_TYPE_WAIT; wait->m_nesting_event_id= parent_event->m_event_id; wait->m_nesting_event_type= parent_event->m_event_type; wait->m_thread_internal_id= pfs_thread->m_thread_internal_id; wait->m_class= klass; wait->m_timer_start= 0; wait->m_timer_end= 0; wait->m_object_instance_addr= pfs_file; wait->m_weak_file= pfs_file; wait->m_weak_version= pfs_file->get_version(); wait->m_event_id= pfs_thread->m_event_id++; wait->m_end_event_id= 0; wait->m_operation= file_operation_map[static_cast<int> (op)]; wait->m_wait_class= WAIT_CLASS_FILE; pfs_thread->m_events_waits_current++; } } else { if (pfs_file->m_timed) { flags= STATE_FLAG_TIMED; } else { /* TODO: consider a shortcut. */ flags= 0; } } state->m_flags= flags; state->m_file= reinterpret_cast<PSI_file*> (pfs_file); state->m_operation= op; state->m_name= NULL; state->m_class= klass; return reinterpret_cast<PSI_file_locker*> (state); }
O0
cpp
pfs_get_thread_file_descriptor_locker_v1: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x1c(%rbp) movb $0x1, %al cmpl $0x0, -0x1c(%rbp) movb %al, -0x51(%rbp) jl 0x2fd57 movslq -0x1c(%rbp), %rax leaq 0x3dbff2(%rip), %rcx # 0x40bd40 cmpq (%rcx), %rax setge %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x2fd71 movq $0x0, -0x8(%rbp) jmp 0x30049 leaq 0x3dc038(%rip), %rax # 0x40bdb0 movq (%rax), %rax movslq -0x1c(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x2fda6 movq $0x0, -0x8(%rbp) jmp 0x30049 cmpl $0x4, -0x18(%rbp) jne 0x2fdc2 leaq 0x3dbffd(%rip), %rax # 0x40bdb0 movq (%rax), %rax movslq -0x1c(%rbp), %rcx movq $0x0, (%rax,%rcx,8) movq -0x28(%rbp), %rax testb $0x1, 0x4(%rax) jne 0x2fdd9 movq $0x0, -0x8(%rbp) jmp 0x30049 movq -0x28(%rbp), %rax movq 0x220(%rax), %rax movq %rax, -0x30(%rbp) callq 0x2d4b0 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x2fe10 movq $0x0, -0x8(%rbp) jmp 0x30049 movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) leaq 0x3dbc1d(%rip), %rax # 0x40ba40 testb $0x1, (%rax) je 0x2ffee movq -0x38(%rbp), %rax testb $0x1, 0x7e0(%rax) jne 0x2fe46 movq $0x0, -0x8(%rbp) jmp 0x30049 movl $0x2, -0x3c(%rbp) movq -0x28(%rbp), %rax testb $0x1, 0x5(%rax) je 0x2fe60 movl -0x3c(%rbp), %eax orl $0x1, %eax movl %eax, -0x3c(%rbp) leaq 0x3dbad9(%rip), %rax # 0x40b940 testb $0x1, (%rax) je 0x2ffec movq -0x38(%rbp), %rax movq 0x7f0(%rax), %rax movq -0x38(%rbp), %rcx addq $0x878, %rcx # imm = 0x878 addq $0x420, %rcx # imm = 0x420 cmpq %rcx, %rax setae %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x2fec2 leaq 0x3dbee4(%rip), %rax # 0x40bd88 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3dbed6(%rip), %rax # 0x40bd88 movq %rcx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x30049 movq -0x38(%rbp), %rax movq 0x7f0(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movl -0x3c(%rbp), %eax orl $0x4, %eax movl %eax, -0x3c(%rbp) movq -0x48(%rbp), %rax addq $-0xb0, %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movl $0x4, 0x18(%rax) movq -0x50(%rbp), %rax movq 0x8(%rax), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x50(%rbp), %rax movl 0x18(%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x38(%rbp), %rax movq 0x850(%rax), %rcx movq -0x48(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x48(%rbp), %rax movq $0x0, 0x38(%rax) movq -0x48(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x28(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x28(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x28(%rbp), %rdi callq 0x36270 movl %eax, %ecx movq -0x48(%rbp), %rax movl %ecx, 0x80(%rax) movq -0x38(%rbp), %rax movq 0x7f8(%rax), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, 0x7f8(%rax) movq -0x48(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x48(%rbp), %rax movq $0x0, 0x10(%rax) movslq -0x18(%rbp), %rcx leaq 0x1e41c5(%rip), %rax # 0x214180 movl (%rax,%rcx,4), %ecx movq -0x48(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x48(%rbp), %rax movl $0x5, 0x58(%rax) movq -0x38(%rbp), %rax movq 0x7f0(%rax), %rcx addq $0xb0, %rcx movq %rcx, 0x7f0(%rax) jmp 0x3000a movq -0x28(%rbp), %rax testb $0x1, 0x5(%rax) je 0x30001 movl $0x1, -0x3c(%rbp) jmp 0x30008 movl $0x0, -0x3c(%rbp) jmp 0x3000a movl -0x3c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pfs_get_thread_file_descriptor_locker_v1: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov eax, [rbp+var_14] mov [rbp+var_1C], eax mov al, 1 cmp [rbp+var_1C], 0 mov [rbp+var_51], al jl short loc_2FD57 movsxd rax, [rbp+var_1C] lea rcx, file_handle_max cmp rax, [rcx] setnl al mov [rbp+var_51], al loc_2FD57: mov al, [rbp+var_51] and al, 1 movzx eax, al cmp eax, 0 jz short loc_2FD71 mov [rbp+var_8], 0 jmp loc_30049 loc_2FD71: lea rax, file_handle_array mov rax, [rax] movsxd rcx, [rbp+var_1C] mov rax, [rax+rcx*8] mov [rbp+var_28], rax cmp [rbp+var_28], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_2FDA6 mov [rbp+var_8], 0 jmp loc_30049 loc_2FDA6: cmp [rbp+var_18], 4 jnz short loc_2FDC2 lea rax, file_handle_array mov rax, [rax] movsxd rcx, [rbp+var_1C] mov qword ptr [rax+rcx*8], 0 loc_2FDC2: mov rax, [rbp+var_28] test byte ptr [rax+4], 1 jnz short loc_2FDD9 mov [rbp+var_8], 0 jmp loc_30049 loc_2FDD9: mov rax, [rbp+var_28] mov rax, [rax+220h] mov [rbp+var_30], rax call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_38], rax cmp [rbp+var_38], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_2FE10 mov [rbp+var_8], 0 jmp loc_30049 loc_2FE10: mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+20h], rcx lea rax, flag_thread_instrumentation test byte ptr [rax], 1 jz loc_2FFEE mov rax, [rbp+var_38] test byte ptr [rax+7E0h], 1 jnz short loc_2FE46 mov [rbp+var_8], 0 jmp loc_30049 loc_2FE46: mov [rbp+var_3C], 2 mov rax, [rbp+var_28] test byte ptr [rax+5], 1 jz short loc_2FE60 mov eax, [rbp+var_3C] or eax, 1 mov [rbp+var_3C], eax loc_2FE60: lea rax, flag_events_waits_current test byte ptr [rax], 1 jz loc_2FFEC mov rax, [rbp+var_38] mov rax, [rax+7F0h] mov rcx, [rbp+var_38] add rcx, 878h add rcx, 420h cmp rax, rcx setnb al and al, 1 movzx eax, al cmp eax, 0 jz short loc_2FEC2 lea rax, locker_lost mov rcx, [rax] add rcx, 1 lea rax, locker_lost mov [rax], rcx mov [rbp+var_8], 0 jmp loc_30049 loc_2FEC2: mov rax, [rbp+var_38] mov rax, [rax+7F0h] mov [rbp+var_48], rax mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax+40h], rcx mov eax, [rbp+var_3C] or eax, 4 mov [rbp+var_3C], eax mov rax, [rbp+var_48] add rax, 0FFFFFFFFFFFFFF50h mov [rbp+var_50], rax mov rax, [rbp+var_48] mov dword ptr [rax+18h], 4 mov rax, [rbp+var_50] mov rcx, [rax+8] mov rax, [rbp+var_48] mov [rax+20h], rcx mov rax, [rbp+var_50] mov ecx, [rax+18h] mov rax, [rbp+var_48] mov [rax+28h], ecx mov rax, [rbp+var_38] mov rcx, [rax+850h] mov rax, [rbp+var_48] mov [rax], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_48] mov [rax+30h], rcx mov rax, [rbp+var_48] mov qword ptr [rax+38h], 0 mov rax, [rbp+var_48] mov qword ptr [rax+40h], 0 mov rcx, [rbp+var_28] mov rax, [rbp+var_48] mov [rax+88h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_48] mov [rax+68h], rcx mov rdi, [rbp+var_28]; this call _ZN8PFS_file11get_versionEv; PFS_file::get_version(void) mov ecx, eax mov rax, [rbp+var_48] mov [rax+80h], ecx mov rax, [rbp+var_38] mov rcx, [rax+7F8h] mov rdx, rcx add rdx, 1 mov [rax+7F8h], rdx mov rax, [rbp+var_48] mov [rax+8], rcx mov rax, [rbp+var_48] mov qword ptr [rax+10h], 0 movsxd rcx, [rbp+var_18] lea rax, _ZL18file_operation_map; file_operation_map mov ecx, [rax+rcx*4] mov rax, [rbp+var_48] mov [rax+90h], ecx mov rax, [rbp+var_48] mov dword ptr [rax+58h], 5 mov rax, [rbp+var_38] mov rcx, [rax+7F0h] add rcx, 0B0h mov [rax+7F0h], rcx loc_2FFEC: jmp short loc_3000A loc_2FFEE: mov rax, [rbp+var_28] test byte ptr [rax+5], 1 jz short loc_30001 mov [rbp+var_3C], 1 jmp short loc_30008 loc_30001: mov [rbp+var_3C], 0 loc_30008: jmp short $+2 loc_3000A: mov ecx, [rbp+var_3C] mov rax, [rbp+var_10] mov [rax], ecx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+8], rcx mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+4], ecx mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_30049: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
long long pfs_get_thread_file_descriptor_locker_v1(long long a1, int a2, int a3) { long long v3; // rcx bool v5; // [rsp+Fh] [rbp-51h] long long v6; // [rsp+18h] [rbp-48h] int v7; // [rsp+24h] [rbp-3Ch] long long THR_PFS; // [rsp+28h] [rbp-38h] long long v9; // [rsp+30h] [rbp-30h] PFS_file *v10; // [rsp+38h] [rbp-28h] v5 = 1; if ( a2 >= 0 ) v5 = a2 >= (long long)file_handle_max; if ( v5 ) return 0LL; v10 = *(PFS_file **)(file_handle_array + 8LL * a2); if ( !v10 ) return 0LL; if ( a3 == 4 ) *(_QWORD *)(file_handle_array + 8LL * a2) = 0LL; if ( (*((_BYTE *)v10 + 4) & 1) == 0 ) return 0LL; v9 = *((_QWORD *)v10 + 68); THR_PFS = my_thread_get_THR_PFS(); if ( THR_PFS ) { *(_QWORD *)(a1 + 32) = THR_PFS; if ( (flag_thread_instrumentation & 1) != 0 ) { if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 ) return 0LL; v7 = 2; if ( (*((_BYTE *)v10 + 5) & 1) != 0 ) v7 = 3; if ( (flag_events_waits_current & 1) != 0 ) { if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) ) { ++locker_lost; return 0LL; } v6 = *(_QWORD *)(THR_PFS + 2032); *(_QWORD *)(a1 + 64) = v6; v7 |= 4u; *(_DWORD *)(v6 + 24) = 4; *(_QWORD *)(v6 + 32) = *(_QWORD *)(v6 - 176 + 8); *(_DWORD *)(v6 + 40) = *(_DWORD *)(v6 - 176 + 24); *(_QWORD *)v6 = *(_QWORD *)(THR_PFS + 2128); *(_QWORD *)(v6 + 48) = v9; *(_QWORD *)(v6 + 56) = 0LL; *(_QWORD *)(v6 + 64) = 0LL; *(_QWORD *)(v6 + 136) = v10; *(_QWORD *)(v6 + 104) = v10; *(_DWORD *)(v6 + 128) = PFS_file::get_version(v10); v3 = *(_QWORD *)(THR_PFS + 2040); *(_QWORD *)(THR_PFS + 2040) = v3 + 1; *(_QWORD *)(v6 + 8) = v3; *(_QWORD *)(v6 + 16) = 0LL; *(_DWORD *)(v6 + 144) = file_operation_map[a3]; *(_DWORD *)(v6 + 88) = 5; *(_QWORD *)(THR_PFS + 2032) += 176LL; } } else { v7 = (*((_BYTE *)v10 + 5) & 1) != 0; } *(_DWORD *)a1 = v7; *(_QWORD *)(a1 + 8) = v10; *(_DWORD *)(a1 + 4) = a3; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = v9; return a1; } return 0LL; }
pfs_get_thread_file_descriptor_locker_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x1c],EAX MOV AL,0x1 CMP dword ptr [RBP + -0x1c],0x0 MOV byte ptr [RBP + -0x51],AL JL 0x0012fd57 MOVSXD RAX,dword ptr [RBP + -0x1c] LEA RCX,[0x50bd40] CMP RAX,qword ptr [RCX] SETGE AL MOV byte ptr [RBP + -0x51],AL LAB_0012fd57: MOV AL,byte ptr [RBP + -0x51] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0012fd71 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00130049 LAB_0012fd71: LEA RAX,[0x50bdb0] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0012fda6 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00130049 LAB_0012fda6: CMP dword ptr [RBP + -0x18],0x4 JNZ 0x0012fdc2 LEA RAX,[0x50bdb0] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV qword ptr [RAX + RCX*0x8],0x0 LAB_0012fdc2: MOV RAX,qword ptr [RBP + -0x28] TEST byte ptr [RAX + 0x4],0x1 JNZ 0x0012fdd9 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00130049 LAB_0012fdd9: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x220] MOV qword ptr [RBP + -0x30],RAX CALL 0x0012d4b0 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0012fe10 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00130049 LAB_0012fe10: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX LEA RAX,[0x50ba40] TEST byte ptr [RAX],0x1 JZ 0x0012ffee MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x7e0],0x1 JNZ 0x0012fe46 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00130049 LAB_0012fe46: MOV dword ptr [RBP + -0x3c],0x2 MOV RAX,qword ptr [RBP + -0x28] TEST byte ptr [RAX + 0x5],0x1 JZ 0x0012fe60 MOV EAX,dword ptr [RBP + -0x3c] OR EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX LAB_0012fe60: LEA RAX,[0x50b940] TEST byte ptr [RAX],0x1 JZ 0x0012ffec MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x7f0] MOV RCX,qword ptr [RBP + -0x38] ADD RCX,0x878 ADD RCX,0x420 CMP RAX,RCX SETNC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0012fec2 LEA RAX,[0x50bd88] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x50bd88] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x00130049 LAB_0012fec2: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x7f0] MOV qword ptr [RBP + -0x48],RAX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV EAX,dword ptr [RBP + -0x3c] OR EAX,0x4 MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,-0xb0 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x18],0x4 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x850] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x40],0x0 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x68],RCX MOV RDI,qword ptr [RBP + -0x28] CALL 0x00136270 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x80],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x7f8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RAX + 0x7f8],RDX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x10],0x0 MOVSXD RCX,dword ptr [RBP + -0x18] LEA RAX,[0x314180] MOV ECX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x90],ECX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x58],0x5 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x7f0] ADD RCX,0xb0 MOV qword ptr [RAX + 0x7f0],RCX LAB_0012ffec: JMP 0x0013000a LAB_0012ffee: MOV RAX,qword ptr [RBP + -0x28] TEST byte ptr [RAX + 0x5],0x1 JZ 0x00130001 MOV dword ptr [RBP + -0x3c],0x1 JMP 0x00130008 LAB_00130001: MOV dword ptr [RBP + -0x3c],0x0 LAB_00130008: JMP 0x0013000a LAB_0013000a: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00130049: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
uint * pfs_get_thread_file_descriptor_locker_v1(uint *param_1,int param_2,uint param_3) { PFS_file *this; int8 uVar1; int8 *puVar2; long lVar3; int4 uVar4; long lVar5; uint local_44; uint *local_10; if (param_2 < 0 || file_handle_max <= param_2) { local_10 = (uint *)0x0; } else { this = *(PFS_file **)(file_handle_array + (long)param_2 * 8); if (this == (PFS_file *)0x0) { local_10 = (uint *)0x0; } else { if (param_3 == 4) { *(int8 *)(file_handle_array + (long)param_2 * 8) = 0; } if (((byte)this[4] & 1) == 0) { local_10 = (uint *)0x0; } else { uVar1 = *(int8 *)(this + 0x220); lVar5 = my_thread_get_THR_PFS(); if (lVar5 == 0) { local_10 = (uint *)0x0; } else { *(long *)(param_1 + 8) = lVar5; if ((flag_thread_instrumentation & 1) == 0) { local_44 = (uint)(((byte)this[5] & 1) != 0); } else { if ((*(byte *)(lVar5 + 0x7e0) & 1) == 0) { return (uint *)0x0; } local_44 = 2; if (((byte)this[5] & 1) != 0) { local_44 = 3; } if ((flag_events_waits_current & 1) != 0) { if (lVar5 + 0xc98U <= *(ulong *)(lVar5 + 0x7f0)) { locker_lost = locker_lost + 1; return (uint *)0x0; } puVar2 = *(int8 **)(lVar5 + 0x7f0); *(int8 **)(param_1 + 0x10) = puVar2; local_44 = local_44 | 4; *(int4 *)(puVar2 + 3) = 4; puVar2[4] = puVar2[-0x15]; *(int4 *)(puVar2 + 5) = *(int4 *)(puVar2 + -0x13); *puVar2 = *(int8 *)(lVar5 + 0x850); puVar2[6] = uVar1; puVar2[7] = 0; puVar2[8] = 0; puVar2[0x11] = this; puVar2[0xd] = this; uVar4 = PFS_file::get_version(this); *(int4 *)(puVar2 + 0x10) = uVar4; lVar3 = *(long *)(lVar5 + 0x7f8); *(long *)(lVar5 + 0x7f8) = lVar3 + 1; puVar2[1] = lVar3; puVar2[2] = 0; *(int4 *)(puVar2 + 0x12) = *(int4 *)(file_operation_map + (long)(int)param_3 * 4); *(int4 *)(puVar2 + 0xb) = 5; *(long *)(lVar5 + 0x7f0) = *(long *)(lVar5 + 0x7f0) + 0xb0; } } *param_1 = local_44; *(PFS_file **)(param_1 + 2) = this; param_1[1] = param_3; param_1[4] = 0; param_1[5] = 0; *(int8 *)(param_1 + 6) = uVar1; local_10 = param_1; } } } } return local_10; }
1,274
testing::TestResult::GetTestProperty(int) const
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
const TestProperty& TestResult::GetTestProperty(int i) const { if (i < 0 || i >= test_property_count()) internal::posix::Abort(); return test_properties_.at(static_cast<size_t>(i)); }
O1
cpp
testing::TestResult::GetTestProperty(int) const: pushq %rax testl %esi, %esi js 0x1fc8f movq 0x50(%rdi), %rax movq 0x58(%rdi), %rcx subq %rax, %rcx shrq $0x6, %rcx cmpl %esi, %ecx jle 0x1fc8f movl %esi, %esi movq 0x58(%rdi), %rdx subq %rax, %rdx sarq $0x6, %rdx cmpq %rsi, %rdx jbe 0x1fc94 shlq $0x6, %rsi addq %rsi, %rax popq %rcx retq callq 0x326af leaq 0x24a60(%rip), %rdi # 0x446fb xorl %eax, %eax callq 0x8860
_ZNK7testing10TestResult15GetTestPropertyEi: push rax test esi, esi js short loc_1FC8F mov rax, [rdi+50h] mov rcx, [rdi+58h] sub rcx, rax shr rcx, 6 cmp ecx, esi jle short loc_1FC8F mov esi, esi mov rdx, [rdi+58h] sub rdx, rax sar rdx, 6 cmp rdx, rsi jbe short loc_1FC94 shl rsi, 6 add rax, rsi pop rcx retn loc_1FC8F: call _ZN7testing8internal5posix5AbortEv; testing::internal::posix::Abort(void) loc_1FC94: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
long long testing::TestResult::GetTestProperty(testing::TestResult *this, int a2) { long long v2; // rax unsigned long long v3; // rdx if ( a2 < 0 || (v2 = *((_QWORD *)this + 10), (int)((unsigned long long)(*((_QWORD *)this + 11) - v2) >> 6) <= a2) ) testing::internal::posix::Abort(this); v3 = (*((_QWORD *)this + 11) - v2) >> 6; if ( v3 <= (unsigned int)a2 ) std::__throw_out_of_range_fmt( "vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", (unsigned int)a2, v3); return ((unsigned long long)(unsigned int)a2 << 6) + v2; }
GetTestProperty: PUSH RAX TEST ESI,ESI JS 0x0011fc8f MOV RAX,qword ptr [RDI + 0x50] MOV RCX,qword ptr [RDI + 0x58] SUB RCX,RAX SHR RCX,0x6 CMP ECX,ESI JLE 0x0011fc8f MOV ESI,ESI MOV RDX,qword ptr [RDI + 0x58] SUB RDX,RAX SAR RDX,0x6 CMP RDX,RSI JBE 0x0011fc94 SHL RSI,0x6 ADD RAX,RSI POP RCX RET LAB_0011fc8f: CALL 0x001326af LAB_0011fc94: LEA RDI,[0x1446fb] XOR EAX,EAX CALL 0x00108860
/* testing::TestResult::GetTestProperty(int) const */ ulong __thiscall testing::TestResult::GetTestProperty(TestResult *this,int param_1) { long lVar1; char *pcVar2; if ((param_1 < 0) || (lVar1 = *(long *)(this + 0x50), (int)((ulong)(*(long *)(this + 0x58) - lVar1) >> 6) <= param_1 )) { internal::posix::Abort(); } else if ((ulong)(uint)param_1 < (ulong)(*(long *)(this + 0x58) - lVar1 >> 6)) { return lVar1 + (ulong)(uint)param_1 * 0x40; } pcVar2 = "vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"; std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); return (ulong)(*(long *)(pcVar2 + 0x58) - *(long *)(pcVar2 + 0x50)) >> 6; }
1,275
mi_read_rnd_pack_record
eloqsql/storage/myisam/mi_packrec.c
int _mi_read_rnd_pack_record(MI_INFO *info, uchar *buf, register my_off_t filepos, my_bool skip_deleted_blocks) { uint b_type; MI_BLOCK_INFO block_info; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_read_rnd_pack_record"); if (filepos >= info->state->data_file_length) { my_errno= HA_ERR_END_OF_FILE; goto err; } if (info->opt_flag & READ_CACHE_USED) { if (_mi_read_cache(&info->rec_cache, (uchar*) block_info.header, filepos, share->pack.ref_length, skip_deleted_blocks ? READING_NEXT : 0)) goto err; b_type=_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, -1, filepos); } else b_type=_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, info->dfile, filepos); if (b_type) goto err; /* Error code is already set */ #ifndef DBUG_OFF if (block_info.rec_len > share->max_pack_length) { my_errno=HA_ERR_WRONG_IN_RECORD; goto err; } #endif if (info->opt_flag & READ_CACHE_USED) { if (_mi_read_cache(&info->rec_cache, (uchar*) info->rec_buff, block_info.filepos, block_info.rec_len, skip_deleted_blocks ? READING_NEXT : 0)) goto err; } else { if (mysql_file_read(info->dfile, (uchar*) info->rec_buff + block_info.offset, block_info.rec_len-block_info.offset, MYF(MY_NABP))) goto err; } info->packed_length=block_info.rec_len; info->lastpos=filepos; info->nextpos=block_info.filepos+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, info->rec_buff, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O3
c
mi_read_rnd_pack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x8(%rdi), %rax cmpq %rdx, 0x28(%rax) jbe 0x86f1d movl %ecx, %r12d movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 testb $0x2, 0x1c8(%rdi) jne 0x86f2a leaq 0x50(%r14), %rsi leaq 0x120(%r14), %rcx movl 0x1c0(%r14), %r8d leaq -0x88(%rbp), %rdx movq %r14, %rdi jmp 0x86f72 callq 0xa8dda movl $0x89, (%rax) jmp 0x86f7e movq (%r14), %rax leaq 0x220(%r14), %rdi movl 0x240(%rax), %ecx xorl %r8d, %r8d testb %r12b, %r12b setne %r8b leaq -0x88(%rbp), %rsi movq %r15, %rdx callq 0x94130 testl %eax, %eax jne 0x86f7e leaq 0x50(%r14), %rsi leaq 0x120(%r14), %rcx leaq -0x88(%rbp), %rdx movq %r14, %rdi movl $0xffffffff, %r8d # imm = 0xFFFFFFFF movq %r15, %r9 callq 0x86b69 testl %eax, %eax je 0x86faa callq 0xa8dda movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x87107 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x2, 0x1c8(%r14) jne 0x8701e movl 0x1c0(%r14), %esi movl -0x34(%rbp), %eax movq 0x120(%r14), %r13 addq %rax, %r13 movq -0x70(%rbp), %r12 subq %rax, %r12 leaq 0x309f02(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0xe0(%rbp), %rdi movl %esi, -0x8c(%rbp) movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x8709d movl $0x4, %ecx movl -0x8c(%rbp), %edi movq %r13, %rsi movq %r12, %rdx callq 0xa7b1c movq %rax, %r13 testq %r13, %r13 jne 0x86f7e jmp 0x8704b leaq 0x220(%r14), %rdi movq 0x120(%r14), %rsi movq -0x70(%rbp), %rcx movq -0x50(%rbp), %rdx xorl %r8d, %r8d testb %r12b, %r12b setne %r8b callq 0x94130 testl %eax, %eax jne 0x86f7e movq -0x70(%rbp), %rax movq %rax, 0x1b0(%r14) movq %r15, 0x170(%r14) movq -0x50(%rbp), %rcx addq %rax, %rcx movq %rcx, 0x178(%r14) orb $-0x7e, 0x1d0(%r14) movq 0x120(%r14), %rcx movb $0x0, (%rcx,%rax) leaq 0x50(%r14), %rsi movq 0x120(%r14), %rcx movq -0x70(%rbp), %r8 movq %r14, %rdi movq %rbx, %rdx callq 0x86e07 jmp 0x86f85 movq %rax, %rcx leaq 0x309e31(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq 0x5d3cb(%rip), %rdx # 0xe447c movq %rcx, -0x98(%rbp) movq %rcx, %rdi movq %r12, %rsi movl $0x545, %ecx # imm = 0x545 callq *0x210(%rax) movl $0x4, %ecx movl -0x8c(%rbp), %edi movq %r13, %rsi movq %r12, %rdx callq 0xa7b1c movq %rax, %r13 xorl %esi, %esi testq %rax, %rax cmoveq %r12, %rsi leaq 0x309de6(%rip), %rax # 0x390ed8 movq (%rax), %rax movq -0x98(%rbp), %rdi callq *0x218(%rax) jmp 0x87013 callq 0x2a240
_mi_read_rnd_pack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+8] cmp [rax+28h], rdx jbe short loc_86F1D mov r12d, ecx mov r15, rdx mov rbx, rsi mov r14, rdi test byte ptr [rdi+1C8h], 2 jnz short loc_86F2A lea rsi, [r14+50h] lea rcx, [r14+120h] mov r8d, [r14+1C0h] lea rdx, [rbp+var_88] mov rdi, r14 jmp short loc_86F72 loc_86F1D: call _my_thread_var mov dword ptr [rax], 89h jmp short loc_86F7E loc_86F2A: mov rax, [r14] lea rdi, [r14+220h] mov ecx, [rax+240h] xor r8d, r8d test r12b, r12b setnz r8b lea rsi, [rbp+var_88] mov rdx, r15 call _mi_read_cache test eax, eax jnz short loc_86F7E lea rsi, [r14+50h] lea rcx, [r14+120h] lea rdx, [rbp+var_88] mov rdi, r14 mov r8d, 0FFFFFFFFh loc_86F72: mov r9, r15 call _mi_pack_get_block_info test eax, eax jz short loc_86FAA loc_86F7E: call _my_thread_var mov eax, [rax] loc_86F85: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_87107 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_86FAA: test byte ptr [r14+1C8h], 2 jnz short loc_8701E mov esi, [r14+1C0h] mov eax, [rbp+var_34] mov r13, [r14+120h] add r13, rax mov r12, [rbp+var_70] sub r12, rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_E0] mov [rbp+var_8C], esi mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_8709D mov ecx, 4 mov edi, [rbp+var_8C] mov rsi, r13 mov rdx, r12 call my_read mov r13, rax loc_87013: test r13, r13 jnz loc_86F7E jmp short loc_8704B loc_8701E: lea rdi, [r14+220h] mov rsi, [r14+120h] mov rcx, [rbp+var_70] mov rdx, [rbp+var_50] xor r8d, r8d test r12b, r12b setnz r8b call _mi_read_cache test eax, eax jnz loc_86F7E loc_8704B: mov rax, [rbp+var_70] mov [r14+1B0h], rax mov [r14+170h], r15 mov rcx, [rbp+var_50] add rcx, rax mov [r14+178h], rcx or byte ptr [r14+1D0h], 82h mov rcx, [r14+120h] mov byte ptr [rcx+rax], 0 lea rsi, [r14+50h] mov rcx, [r14+120h] mov r8, [rbp+var_70] mov rdi, r14 mov rdx, rbx call _mi_pack_rec_unpack jmp loc_86F85 loc_8709D: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_98], rcx mov rdi, rcx mov rsi, r12 mov ecx, 545h call qword ptr [rax+210h] mov ecx, 4 mov edi, [rbp+var_8C] mov rsi, r13 mov rdx, r12 call my_read mov r13, rax xor esi, esi test rax, rax cmovz rsi, r12 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_98] call qword ptr [rax+218h] jmp loc_87013 loc_87107: call ___stack_chk_fail
long long mi_read_rnd_pack_record(long long a1, const char *a2, unsigned long long a3, char a4) { long long v6; // rbx _QWORD *v7; // r14 _QWORD *v8; // rcx unsigned int v9; // r8d const char *v11; // r13 const char *v12; // r12 long long v13; // rax long long v14; // r13 long long v15; // rax char v16[72]; // [rsp+0h] [rbp-E0h] BYREF long long v17; // [rsp+48h] [rbp-98h] unsigned int v18; // [rsp+54h] [rbp-8Ch] unsigned __int8 v19[24]; // [rsp+58h] [rbp-88h] BYREF long long v20; // [rsp+70h] [rbp-70h] long long v21; // [rsp+90h] [rbp-50h] unsigned int v22; // [rsp+ACh] [rbp-34h] unsigned long long v23; // [rsp+B0h] [rbp-30h] v23 = __readfsqword(0x28u); if ( *(_QWORD *)(*(_QWORD *)(a1 + 8) + 40LL) <= a3 ) { *(_DWORD *)my_thread_var(a1, a2) = 137; return *(unsigned int *)my_thread_var(a1, a2); } v6 = (long long)a2; v7 = (_QWORD *)a1; if ( (*(_BYTE *)(a1 + 456) & 2) == 0 ) { a2 = (const char *)(a1 + 80); v8 = (_QWORD *)(a1 + 288); v9 = *(_DWORD *)(a1 + 448); goto LABEL_7; } a1 += 544LL; a2 = (const char *)v19; if ( (unsigned int)mi_read_cache(a1, v19, a3, *(unsigned int *)(*v7 + 576LL), a4 != 0) ) return *(unsigned int *)my_thread_var(a1, a2); a2 = (const char *)(v7 + 10); v8 = v7 + 36; a1 = (long long)v7; v9 = -1; LABEL_7: if ( (unsigned int)mi_pack_get_block_info((long long *)a1, (long long)a2, v19, v8, v9, a3) ) return *(unsigned int *)my_thread_var(a1, a2); if ( (v7[57] & 2) != 0 ) { a1 = (long long)(v7 + 68); a2 = (const char *)v7[36]; if ( (unsigned int)mi_read_cache(v7 + 68, a2, v21, v20, a4 != 0) ) return *(unsigned int *)my_thread_var(a1, a2); } else { v11 = (const char *)(v22 + v7[36]); v12 = (const char *)(v20 - v22); v18 = *((_DWORD *)v7 + 112); v13 = ((long long ( *)(char *, _QWORD, long long))PSI_server[43])(v16, v18, 6LL); if ( v13 ) { v17 = v13; ((void ( *)(long long, const char *, const char *, long long))PSI_server[66])( v13, v12, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1349LL); v14 = my_read(v18, v11, v12, 4LL); a2 = 0LL; if ( !v14 ) a2 = v12; a1 = v17; ((void ( *)(long long, const char *))PSI_server[67])(v17, a2); } else { a1 = v18; a2 = v11; v14 = my_read(v18, v11, v12, 4LL); } if ( v14 ) return *(unsigned int *)my_thread_var(a1, a2); } v15 = v20; v7[54] = v20; v7[46] = a3; v7[47] = v15 + v21; *((_BYTE *)v7 + 464) |= 0x82u; *(_BYTE *)(v7[36] + v15) = 0; return mi_pack_rec_unpack(v7, (long long)(v7 + 10), v6, v7[36], v20); }
_mi_read_rnd_pack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0x8] CMP qword ptr [RAX + 0x28],RDX JBE 0x00186f1d MOV R12D,ECX MOV R15,RDX MOV RBX,RSI MOV R14,RDI TEST byte ptr [RDI + 0x1c8],0x2 JNZ 0x00186f2a LEA RSI,[R14 + 0x50] LEA RCX,[R14 + 0x120] MOV R8D,dword ptr [R14 + 0x1c0] LEA RDX,[RBP + -0x88] MOV RDI,R14 JMP 0x00186f72 LAB_00186f1d: CALL 0x001a8dda MOV dword ptr [RAX],0x89 JMP 0x00186f7e LAB_00186f2a: MOV RAX,qword ptr [R14] LEA RDI,[R14 + 0x220] MOV ECX,dword ptr [RAX + 0x240] XOR R8D,R8D TEST R12B,R12B SETNZ R8B LEA RSI,[RBP + -0x88] MOV RDX,R15 CALL 0x00194130 TEST EAX,EAX JNZ 0x00186f7e LEA RSI,[R14 + 0x50] LEA RCX,[R14 + 0x120] LEA RDX,[RBP + -0x88] MOV RDI,R14 MOV R8D,0xffffffff LAB_00186f72: MOV R9,R15 CALL 0x00186b69 TEST EAX,EAX JZ 0x00186faa LAB_00186f7e: CALL 0x001a8dda MOV EAX,dword ptr [RAX] LAB_00186f85: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00187107 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00186faa: TEST byte ptr [R14 + 0x1c8],0x2 JNZ 0x0018701e MOV ESI,dword ptr [R14 + 0x1c0] MOV EAX,dword ptr [RBP + -0x34] MOV R13,qword ptr [R14 + 0x120] ADD R13,RAX MOV R12,qword ptr [RBP + -0x70] SUB R12,RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xe0] MOV dword ptr [RBP + -0x8c],ESI MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0018709d MOV ECX,0x4 MOV EDI,dword ptr [RBP + -0x8c] MOV RSI,R13 MOV RDX,R12 CALL 0x001a7b1c MOV R13,RAX LAB_00187013: TEST R13,R13 JNZ 0x00186f7e JMP 0x0018704b LAB_0018701e: LEA RDI,[R14 + 0x220] MOV RSI,qword ptr [R14 + 0x120] MOV RCX,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x50] XOR R8D,R8D TEST R12B,R12B SETNZ R8B CALL 0x00194130 TEST EAX,EAX JNZ 0x00186f7e LAB_0018704b: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [R14 + 0x1b0],RAX MOV qword ptr [R14 + 0x170],R15 MOV RCX,qword ptr [RBP + -0x50] ADD RCX,RAX MOV qword ptr [R14 + 0x178],RCX OR byte ptr [R14 + 0x1d0],0x82 MOV RCX,qword ptr [R14 + 0x120] MOV byte ptr [RCX + RAX*0x1],0x0 LEA RSI,[R14 + 0x50] MOV RCX,qword ptr [R14 + 0x120] MOV R8,qword ptr [RBP + -0x70] MOV RDI,R14 MOV RDX,RBX CALL 0x00186e07 JMP 0x00186f85 LAB_0018709d: MOV RCX,RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDX,[0x1e447c] MOV qword ptr [RBP + -0x98],RCX MOV RDI,RCX MOV RSI,R12 MOV ECX,0x545 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,dword ptr [RBP + -0x8c] MOV RSI,R13 MOV RDX,R12 CALL 0x001a7b1c MOV R13,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R12 LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x98] CALL qword ptr [RAX + 0x218] JMP 0x00187013 LAB_00187107: CALL 0x0012a240
ulong _mi_read_rnd_pack_record(long *param_1,int8 param_2,ulong param_3,char param_4) { int iVar1; int4 *puVar2; uint *puVar3; long lVar4; ulong uVar5; int4 uVar6; long lVar7; long lVar8; long in_FS_OFFSET; int1 local_e8 [72]; long local_a0; int4 local_94; int1 local_90 [24]; long local_78; long local_58; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 < *(ulong *)(param_1[1] + 0x28)) { if ((*(byte *)(param_1 + 0x39) & 2) == 0) { uVar6 = (int4)param_1[0x38]; } else { iVar1 = _mi_read_cache(param_1 + 0x44,local_90,param_3,*(int4 *)(*param_1 + 0x240), param_4 != '\0'); if (iVar1 != 0) goto LAB_00186f7e; uVar6 = 0xffffffff; } iVar1 = _mi_pack_get_block_info(param_1,param_1 + 10,local_90,param_1 + 0x24,uVar6,param_3); if (iVar1 == 0) { if ((*(byte *)(param_1 + 0x39) & 2) == 0) { local_94 = (int4)param_1[0x38]; lVar8 = param_1[0x24] + (ulong)local_3c; lVar7 = local_78 - (ulong)local_3c; lVar4 = (**(code **)(PSI_server + 0x158))(local_e8,local_94,6); if (lVar4 == 0) { lVar8 = my_read(local_94,lVar8,lVar7,4); } else { local_a0 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,lVar7, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x545); lVar8 = my_read(local_94,lVar8,lVar7,4); lVar4 = 0; if (lVar8 == 0) { lVar4 = lVar7; } (**(code **)(PSI_server + 0x218))(local_a0,lVar4); } if (lVar8 == 0) { LAB_0018704b: param_1[0x36] = local_78; param_1[0x2e] = param_3; param_1[0x2f] = local_58 + local_78; *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 0x82; *(int1 *)(param_1[0x24] + local_78) = 0; uVar5 = _mi_pack_rec_unpack(param_1,param_1 + 10,param_2,param_1[0x24],local_78); goto LAB_00186f85; } } else { iVar1 = _mi_read_cache(param_1 + 0x44,param_1[0x24],local_58,local_78,param_4 != '\0'); if (iVar1 == 0) goto LAB_0018704b; } } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } LAB_00186f7e: puVar3 = (uint *)_my_thread_var(); uVar5 = (ulong)*puVar3; LAB_00186f85: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar5; }
1,276
JS_DetectModule
bluesky950520[P]quickjs/quickjs.c
BOOL JS_DetectModule(const char *input, size_t input_len) { JSRuntime *rt; JSContext *ctx; JSValue val; BOOL is_module; is_module = TRUE; rt = JS_NewRuntime(); if (!rt) return FALSE; ctx = JS_NewContextRaw(rt); if (!ctx) { JS_FreeRuntime(rt); return FALSE; } JS_AddIntrinsicRegExp(ctx); // otherwise regexp literals don't parse val = __JS_EvalInternal(ctx, JS_UNDEFINED, input, input_len, "<unnamed>", JS_EVAL_TYPE_MODULE|JS_EVAL_FLAG_COMPILE_ONLY, -1); if (JS_IsException(val)) { const char *msg = JS_ToCString(ctx, rt->current_exception); // gruesome hack to recognize exceptions from import statements; // necessary because we don't pass in a module loader is_module = !!strstr(msg, "ReferenceError: could not load module"); JS_FreeCString(ctx, msg); } JS_FreeValue(ctx, val); JS_FreeContext(ctx); JS_FreeRuntime(rt); return is_module; }
O2
c
JS_DetectModule: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r15 movq %rdi, %r12 callq 0x17e46 testq %rax, %rax je 0x336fa movq %rax, %rbx movq %rax, %rdi callq 0x182dd testq %rax, %rax je 0x336fe movq %rax, %r14 movq %rax, %rdi callq 0x191bb orl $-0x1, 0x8(%rsp) movl $0x21, (%rsp) leaq 0x52764(%rip), %r9 # 0x85e01 pushq $0x3 popq %rdx movq %r14, %rdi xorl %esi, %esi movq %r12, %rcx movq %r15, %r8 callq 0x30900 movq %rax, %r15 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x33702 movq 0xf0(%rbx), %rsi movq 0xf8(%rbx), %rdx movq %r14, %rdi callq 0x1aa0d movq %rax, %r13 leaq 0x5272f(%rip), %rsi # 0x85e0b movq %rax, %rdi callq 0xe9a0 xorl %ebp, %ebp testq %rax, %rax setne %bpl movq %r14, %rdi movq %r13, %rsi callq 0x1b057 jmp 0x33705 xorl %ebp, %ebp jmp 0x33723 xorl %ebp, %ebp jmp 0x3371b pushq $0x1 popq %rbp movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1801e movq %r14, %rdi callq 0x19f36 movq %rbx, %rdi callq 0x17c92 movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_DetectModule: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rsi mov r12, rdi call JS_NewRuntime test rax, rax jz loc_336FA mov rbx, rax mov rdi, rax call JS_NewContextRaw test rax, rax jz short loc_336FE mov r14, rax mov rdi, rax call JS_AddIntrinsicRegExp or [rsp+48h+var_40], 0FFFFFFFFh mov [rsp+48h+var_48], 21h ; '!' lea r9, aUnnamed; "<unnamed>" push 3 pop rdx mov rdi, r14 xor esi, esi mov rcx, r12 mov r8, r15 call __JS_EvalInternal mov r15, rax mov r12, rdx cmp r12d, 6 jnz short loc_33702 mov rsi, [rbx+0F0h] mov rdx, [rbx+0F8h] mov rdi, r14 call JS_ToCString_0 mov r13, rax lea rsi, aReferenceerror; "ReferenceError: could not load module" mov rdi, rax call _strstr xor ebp, ebp test rax, rax setnz bpl mov rdi, r14 mov rsi, r13 call JS_FreeCString jmp short loc_33705 loc_336FA: xor ebp, ebp jmp short loc_33723 loc_336FE: xor ebp, ebp jmp short loc_3371B loc_33702: push 1 pop rbp loc_33705: mov rdi, r14 mov rsi, r15 mov rdx, r12 call JS_FreeValue mov rdi, r14 call JS_FreeContext loc_3371B: mov rdi, rbx call JS_FreeRuntime loc_33723: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BOOL8 JS_DetectModule( char *a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rax long long v11; // rbx unsigned int *v12; // rax unsigned int *v13; // r14 double v14; // xmm4_8 double v15; // xmm5_8 unsigned long long v16; // r15 long long v17; // rdx long long v18; // r12 long long v19; // r13 BOOL v20; // ebp v10 = JS_NewRuntime(); if ( v10 ) { v11 = v10; v12 = (unsigned int *)JS_NewContextRaw(v10); if ( v12 ) { v13 = v12; JS_AddIntrinsicRegExp(v12); v16 = _JS_EvalInternal( (long long)v13, 0LL, 3LL, a1, a2, "<unnamed>", a3, a4, a5, a6, v14, v15, a9, a10, 0x21u, 0xFFFFFFFF); v18 = v17; if ( (_DWORD)v17 == 6 ) { v19 = JS_ToCString_0((long long)v13, *(_QWORD *)(v11 + 240), *(_QWORD *)(v11 + 248)); v20 = strstr(v19, "ReferenceError: could not load module") != 0; JS_FreeCString((long long)v13, v19); } else { v20 = 1; } JS_FreeValue((long long)v13, v16, v18); JS_FreeContext(v13); } else { v20 = 0; } JS_FreeRuntime(v11); } else { return 0; } return v20; }
JS_DetectModule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RSI MOV R12,RDI CALL 0x00117e46 TEST RAX,RAX JZ 0x001336fa MOV RBX,RAX MOV RDI,RAX CALL 0x001182dd TEST RAX,RAX JZ 0x001336fe MOV R14,RAX MOV RDI,RAX CALL 0x001191bb OR dword ptr [RSP + 0x8],0xffffffff MOV dword ptr [RSP],0x21 LEA R9,[0x185e01] PUSH 0x3 POP RDX MOV RDI,R14 XOR ESI,ESI MOV RCX,R12 MOV R8,R15 CALL 0x00130900 MOV R15,RAX MOV R12,RDX CMP R12D,0x6 JNZ 0x00133702 MOV RSI,qword ptr [RBX + 0xf0] MOV RDX,qword ptr [RBX + 0xf8] MOV RDI,R14 CALL 0x0011aa0d MOV R13,RAX LEA RSI,[0x185e0b] MOV RDI,RAX CALL 0x0010e9a0 XOR EBP,EBP TEST RAX,RAX SETNZ BPL MOV RDI,R14 MOV RSI,R13 CALL 0x0011b057 JMP 0x00133705 LAB_001336fa: XOR EBP,EBP JMP 0x00133723 LAB_001336fe: XOR EBP,EBP JMP 0x0013371b LAB_00133702: PUSH 0x1 POP RBP LAB_00133705: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0011801e MOV RDI,R14 CALL 0x00119f36 LAB_0013371b: MOV RDI,RBX CALL 0x00117c92 LAB_00133723: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool JS_DetectModule(int8 param_1,int8 param_2) { long lVar1; long lVar2; char *__haystack; char *pcVar3; bool bVar4; int1 auVar5 [16]; lVar1 = JS_NewRuntime(); if (lVar1 == 0) { bVar4 = false; } else { lVar2 = JS_NewContextRaw(lVar1); if (lVar2 == 0) { bVar4 = false; } else { JS_AddIntrinsicRegExp(lVar2); auVar5 = __JS_EvalInternal(lVar2,0,3,param_1,param_2,"<unnamed>",0x21,0xffffffff); if (auVar5._8_4_ == 6) { __haystack = (char *)JS_ToCString(lVar2,*(int8 *)(lVar1 + 0xf0), *(int8 *)(lVar1 + 0xf8)); pcVar3 = strstr(__haystack,"ReferenceError: could not load module"); bVar4 = pcVar3 != (char *)0x0; JS_FreeCString(lVar2,__haystack); } else { bVar4 = true; } JS_FreeValue(lVar2,auVar5._0_8_,auVar5._8_8_); JS_FreeContext(lVar2); } JS_FreeRuntime(lVar1); } return bVar4; }
1,277
minja::Value::operator-(minja::Value const&) const
monkey531[P]llama/common/./minja.hpp
Value operator-(const Value& rhs) const { if (is_number_integer() && rhs.is_number_integer()) return get<int64_t>() - rhs.get<int64_t>(); else return get<double>() - rhs.get<double>(); }
O3
cpp
minja::Value::operator-(minja::Value const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al cmpb $0x1, %al ja 0x5853f movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x1, %al ja 0x5853f movq %rsi, %rdi callq 0x3da46 movq %rax, %r15 movq %r14, %rdi callq 0x3da46 subq %rax, %r15 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movq %r15, %rsi callq 0x3ec0c jmp 0x5858b movq %rsi, %rdi callq 0x3db90 movsd %xmm0, 0x8(%rsp) movq %r14, %rdi callq 0x3db90 movsd 0x8(%rsp), %xmm1 subsd %xmm0, %xmm1 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movapd %xmm1, %xmm0 callq 0x3f576 movq %r14, %rdi movl $0x1, %esi callq 0x3d970 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK5minja5ValuemiERKS0_: push r15 push r14 push rbx sub rsp, 10h mov r14, rdx mov rbx, rdi mov al, [rsi+40h] add al, 0FBh cmp al, 1 ja short loc_5853F mov al, [r14+40h] add al, 0FBh cmp al, 1 ja short loc_5853F mov rdi, rsi call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) sub r15, rax lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t) jmp short loc_5858B loc_5853F: mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+28h+var_20], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd xmm1, [rsp+28h+var_20] subsd xmm1, xmm0 lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 movapd xmm0, xmm1 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t) loc_5858B: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
long long minja::Value::operator-(long long a1, long long a2, long long a3) { long long v4; // r15 long long v5; // rax char *v6; // r14 double v7; // xmm1_8 double v9; // [rsp+8h] [rbp-20h] if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u ) { v9 = minja::Value::get<double>(a2); v7 = v9 - minja::Value::get<double>(a3); v6 = (char *)(a1 + 64); *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)(a1 + 64), v7); } else { v4 = minja::Value::get<long>(a2); v5 = minja::Value::get<long>(a3); v6 = (char *)(a1 + 64); *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( a1 + 64, v4 - v5); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6); return a1; }
operator-: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x0015853f MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x0015853f MOV RDI,RSI CALL 0x0013da46 MOV R15,RAX MOV RDI,R14 CALL 0x0013da46 SUB R15,RAX LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,R15 CALL 0x0013ec0c JMP 0x0015858b LAB_0015853f: MOV RDI,RSI CALL 0x0013db90 MOVSD qword ptr [RSP + 0x8],XMM0 MOV RDI,R14 CALL 0x0013db90 MOVSD XMM1,qword ptr [RSP + 0x8] SUBSD XMM1,XMM0 LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOVAPD XMM0,XMM1 CALL 0x0013f576 LAB_0015858b: MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d970 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator-(Value *this,Value *param_1) { long lVar1; long lVar2; Value *in_RDX; double dVar3; double dVar4; if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) { lVar1 = get<long>(param_1); lVar2 = get<long>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (this + 0x40,lVar1 - lVar2); } else { dVar3 = get<double>(param_1); dVar4 = get<double>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (dVar3 - dVar4,this + 0x40); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + '@')); return this; }
1,278
mi_reset
eloqsql/storage/myisam/mi_extra.c
int mi_reset(MI_INFO *info) { int error= 0; MYISAM_SHARE *share=info->s; DBUG_ENTER("mi_reset"); /* Free buffers and reset the following flags: EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK If the row buffer cache is large (for dynamic tables), reduce it to save memory. */ if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); error= end_io_cache(&info->rec_cache); } if (share->base.blobs) mi_alloc_rec_buff(info, -1, &info->rec_buff); #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if (info->opt_flag & MEMMAP_USED) madvise((char*) share->file_map, share->state.state.data_file_length, MADV_RANDOM); #endif info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS); info->quick_mode=0; info->lastinx= 0; /* Use first index as def */ info->last_search_keypage= info->lastpos= HA_OFFSET_ERROR; info->page_changed= 1; info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); DBUG_RETURN(error); }
O0
c
mi_reset: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x12, %eax cmpl $0x0, %eax je 0xb0d76 movq -0x8(%rbp), %rax movl 0x1c8(%rax), %ecx andl $-0x13, %ecx movl %ecx, 0x1c8(%rax) movq -0x8(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 callq 0xe5150 movl %eax, -0xc(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x188(%rax) je 0xb0d9e movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rdx addq $0x120, %rdx # imm = 0x120 movq $-0x1, %rsi callq 0xb9c80 movq -0x8(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0xb0dcd movq -0x18(%rbp), %rax movq 0x270(%rax), %rdi movq -0x18(%rbp), %rax movq 0x40(%rax), %rsi movl $0x1, %edx callq 0x2a470 movq -0x8(%rbp), %rax movl 0x1c8(%rax), %ecx andl $-0x49, %ecx movl %ecx, 0x1c8(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x33b(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x1d4(%rax) movq -0x8(%rbp), %rax movq $-0x1, 0x170(%rax) movq -0x8(%rbp), %rax movq $-0x1, 0x198(%rax) movq -0x8(%rbp), %rax movb $0x1, 0x33c(%rax) movq -0x8(%rbp), %rax movl 0x1d0(%rax), %ecx andl $0x1, %ecx orl $0x10, %ecx orl $0x20, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x1d0(%rax) movl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
mi_reset: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov eax, [rax+1C8h] and eax, 12h cmp eax, 0 jz short loc_B0D76 mov rax, [rbp+var_8] mov ecx, [rax+1C8h] and ecx, 0FFFFFFEDh mov [rax+1C8h], ecx mov rdi, [rbp+var_8] add rdi, 220h call end_io_cache mov [rbp+var_C], eax loc_B0D76: mov rax, [rbp+var_18] cmp dword ptr [rax+188h], 0 jz short loc_B0D9E mov rdi, [rbp+var_8] mov rdx, [rbp+var_8] add rdx, 120h mov rsi, 0FFFFFFFFFFFFFFFFh call mi_alloc_rec_buff loc_B0D9E: mov rax, [rbp+var_8] mov eax, [rax+1C8h] and eax, 20h cmp eax, 0 jz short loc_B0DCD mov rax, [rbp+var_18] mov rdi, [rax+270h] mov rax, [rbp+var_18] mov rsi, [rax+40h] mov edx, 1 call _madvise loc_B0DCD: mov rax, [rbp+var_8] mov ecx, [rax+1C8h] and ecx, 0FFFFFFB7h mov [rax+1C8h], ecx mov rax, [rbp+var_8] mov byte ptr [rax+33Bh], 0 mov rax, [rbp+var_8] mov dword ptr [rax+1D4h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_8] mov qword ptr [rax+198h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_8] mov byte ptr [rax+33Ch], 1 mov rax, [rbp+var_8] mov ecx, [rax+1D0h] and ecx, 1 or ecx, 10h or ecx, 20h mov rax, [rbp+var_8] mov [rax+1D0h], ecx mov eax, [rbp+var_C] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] add rsp, 20h pop rbp retn
long long mi_reset(long long *a1) { long long v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+14h] [rbp-Ch] v3 = 0; v2 = *a1; if ( (a1[57] & 0x12) != 0 ) { *((_DWORD *)a1 + 114) &= 0xFFFFFFED; v3 = end_io_cache(a1 + 68); } if ( *(_DWORD *)(v2 + 392) ) mi_alloc_rec_buff(a1, -1LL, a1 + 36); if ( (a1[57] & 0x20) != 0 ) madvise(*(_QWORD *)(v2 + 624), *(_QWORD *)(v2 + 64), 1LL); *((_DWORD *)a1 + 114) &= 0xFFFFFFB7; *((_BYTE *)a1 + 827) = 0; *((_DWORD *)a1 + 117) = 0; a1[46] = -1LL; a1[51] = -1LL; *((_BYTE *)a1 + 828) = 1; *((_DWORD *)a1 + 116) = a1[58] & 1 | 0x30; return v3; }
mi_reset: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x12 CMP EAX,0x0 JZ 0x001b0d76 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x1c8] AND ECX,0xffffffed MOV dword ptr [RAX + 0x1c8],ECX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x220 CALL 0x001e5150 MOV dword ptr [RBP + -0xc],EAX LAB_001b0d76: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x188],0x0 JZ 0x001b0d9e MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x120 MOV RSI,-0x1 CALL 0x001b9c80 LAB_001b0d9e: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x20 CMP EAX,0x0 JZ 0x001b0dcd MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x270] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1 CALL 0x0012a470 LAB_001b0dcd: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x1c8] AND ECX,0xffffffb7 MOV dword ptr [RAX + 0x1c8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x33b],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x1d4],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x170],-0x1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x198],-0x1 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x33c],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x1d0] AND ECX,0x1 OR ECX,0x10 OR ECX,0x20 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x1d0],ECX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x20 POP RBP RET
int4 mi_reset(long *param_1) { long lVar1; int4 local_14; local_14 = 0; lVar1 = *param_1; if ((*(uint *)(param_1 + 0x39) & 0x12) != 0) { *(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffed; local_14 = end_io_cache(param_1 + 0x44); } if (*(int *)(lVar1 + 0x188) != 0) { mi_alloc_rec_buff(param_1,0xffffffffffffffff,param_1 + 0x24); } if ((*(uint *)(param_1 + 0x39) & 0x20) != 0) { madvise(*(void **)(lVar1 + 0x270),*(size_t *)(lVar1 + 0x40),1); } *(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffb7; *(int1 *)((long)param_1 + 0x33b) = 0; *(int4 *)((long)param_1 + 0x1d4) = 0; param_1[0x2e] = -1; param_1[0x33] = -1; *(int1 *)((long)param_1 + 0x33c) = 1; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 1 | 0x30; return local_14; }
1,279
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } int seq_count = 0; for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { seq_count++; } } putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]); } printf("\n=== Done dumping\n"); }
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 0x77c75(%rip), %rdi # 0xee34b xorl %eax, %eax callq 0x1a070 cmpl $0x0, (%r14) jle 0x76753 movq 0x20(%r14), %r12 movl $0x3e, %r13d leaq 0x7a1ac(%rip), %r15 # 0xf08a0 xorl %ebp, %ebp movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0x7670f leaq 0x77ccf(%rip), %rdi # 0xee3d5 movl %ebp, %esi xorl %eax, %eax callq 0x1a070 movslq 0x4(%r14), %rcx testq %rcx, %rcx jle 0x76731 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 0x7671c jmp 0x76733 xorl %eax, %eax cmpl $0x3e, %eax cmovael %r13d, %eax movsbl (%rax,%r15), %edi callq 0x1abc0 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 cmpl (%r14), %ebp jl 0x766f6 leaq 0x7a132(%rip), %rdi # 0xf088c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1ad00
_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_76753 mov r12, [r14+20h] mov r13d, 3Eh ; '>' lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_766F6: mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_7670F lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_7670F: movsxd rcx, dword ptr [r14+4] test rcx, rcx jle short loc_76731 xor edx, edx xor eax, eax loc_7671C: mov esi, [r12+rdx*4] not esi shr esi, 1Fh add eax, esi inc rdx cmp rcx, rdx jnz short loc_7671C jmp short loc_76733 loc_76731: xor eax, eax loc_76733: 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_766F6 loc_76753: 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,[0x1ee34b] XOR EAX,EAX CALL 0x0011a070 CMP dword ptr [R14],0x0 JLE 0x00176753 MOV R12,qword ptr [R14 + 0x20] MOV R13D,0x3e LEA R15,[0x1f08a0] XOR EBP,EBP LAB_001766f6: MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x0017670f LEA RDI,[0x1ee3d5] MOV ESI,EBP XOR EAX,EAX CALL 0x0011a070 LAB_0017670f: MOVSXD RCX,dword ptr [R14 + 0x4] TEST RCX,RCX JLE 0x00176731 XOR EDX,EDX XOR EAX,EAX LAB_0017671c: MOV ESI,dword ptr [R12 + RDX*0x4] NOT ESI SHR ESI,0x1f ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x0017671c JMP 0x00176733 LAB_00176731: XOR EAX,EAX LAB_00176733: CMP EAX,0x3e CMOVNC EAX,R13D MOVSX EDI,byte ptr [RAX + R15*0x1] CALL 0x0011abc0 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x001766f6 LAB_00176753: LEA RDI,[0x1f088c] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011ad00
/* 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; }
1,280
convert_dirname
eloqsql/mysys/mf_dirname.c
char *convert_dirname(char *to, const char *from, const char *from_end) { char *to_org=to; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("convert_dirname"); /* We use -2 here, becasue we need place for the last FN_LIBCHAR */ if (!from_end || (from_end - from) > FN_REFLEN-2) from_end=from+FN_REFLEN -2; #if FN_LIBCHAR != '/' { for (; from != from_end && *from ; from++) { if (*from == '/') *to++= FN_LIBCHAR; else { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from, from + 3))) { memmove(to, from, l); to+= l; from+= l - 1; to_org= to; /* Don't look inside mbchar */ } else #endif { *to++= *from; } } } *to=0; } #else /* This is ok even if to == from, becasue we need to cut the string */ to= strmake(to, from, (size_t) (from_end-from)); #endif /* Add FN_LIBCHAR to the end of directory path */ if (to != to_org && (to[-1] != FN_LIBCHAR && to[-1] != FN_DEVCHAR)) { *to++=FN_LIBCHAR; *to=0; } DBUG_RETURN(to); /* Pointer to end of dir */ }
O3
c
convert_dirname: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq %rdx, %rax subq %rsi, %rax leaq 0x1fe(%rsi), %rcx cmpq $0x1ff, %rax # imm = 0x1FF movq %rdx, %rax cmovgeq %rcx, %rax testq %rdx, %rdx cmoveq %rcx, %rax subq %rsi, %rax movq %rax, %rdx callq 0xd6a30 cmpq %rbx, %rax je 0x942fa movzbl -0x1(%rax), %ecx testl %ecx, %ecx je 0x942fa cmpl $0x2f, %ecx je 0x942fa movw $0x2f, (%rax) incq %rax addq $0x8, %rsp popq %rbx popq %rbp retq nopl (%rax)
convert_dirname: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, rdx sub rax, rsi lea rcx, [rsi+1FEh] cmp rax, 1FFh mov rax, rdx cmovge rax, rcx test rdx, rdx cmovz rax, rcx sub rax, rsi mov rdx, rax call strmake cmp rax, rbx jz short loc_942FA movzx ecx, byte ptr [rax-1] test ecx, ecx jz short loc_942FA cmp ecx, 2Fh ; '/' jz short loc_942FA mov word ptr [rax], 2Fh ; '/' inc rax loc_942FA: add rsp, 8 pop rbx pop rbp retn
_WORD * convert_dirname(_WORD *a1, long long a2, long long a3) { long long v3; // rax _WORD *result; // rax v3 = a3; if ( a3 - a2 >= 511 ) v3 = a2 + 510; if ( !a3 ) v3 = a2 + 510; result = (_WORD *)strmake(a1, a2, v3 - a2); if ( result != a1 && *((_BYTE *)result - 1) && *((_BYTE *)result - 1) != 47 ) { *result = 47; return (_WORD *)((char *)result + 1); } return result; }
convert_dirname: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,RDX SUB RAX,RSI LEA RCX,[RSI + 0x1fe] CMP RAX,0x1ff MOV RAX,RDX CMOVGE RAX,RCX TEST RDX,RDX CMOVZ RAX,RCX SUB RAX,RSI MOV RDX,RAX CALL 0x001d6a30 CMP RAX,RBX JZ 0x001942fa MOVZX ECX,byte ptr [RAX + -0x1] TEST ECX,ECX JZ 0x001942fa CMP ECX,0x2f JZ 0x001942fa MOV word ptr [RAX],0x2f INC RAX LAB_001942fa: ADD RSP,0x8 POP RBX POP RBP RET
int2 * convert_dirname(int2 *param_1,long param_2,long param_3) { long lVar1; int2 *puVar2; lVar1 = param_3; if (0x1fe < param_3 - param_2) { lVar1 = param_2 + 0x1fe; } if (param_3 == 0) { lVar1 = param_2 + 0x1fe; } puVar2 = (int2 *)strmake(param_1,param_2,lVar1 - param_2); if (((puVar2 != param_1) && (*(char *)((long)puVar2 + -1) != '\0')) && (*(char *)((long)puVar2 + -1) != '/')) { *puVar2 = 0x2f; puVar2 = (int2 *)((long)puVar2 + 1); } return puVar2; }
1,281
mi_close
eloqsql/storage/myisam/mi_close.c
int mi_close(register MI_INFO *info) { int error=0,flag; MYISAM_SHARE *share=info->s; DBUG_ENTER("mi_close"); DBUG_PRINT("enter",("base: %p reopen: %u locks: %u", info, (uint) share->reopen, (uint) share->tot_locks)); if (info->open_list.data) mysql_mutex_lock(&THR_LOCK_myisam); if (info->lock_type == F_EXTRA_LCK) info->lock_type=F_UNLCK; /* HA_EXTRA_NO_USER_CHANGE */ if (info->lock_type != F_UNLCK) { if (mi_lock_database(info,F_UNLCK)) error=my_errno; } mysql_mutex_lock(&share->intern_lock); if (share->options & HA_OPTION_READ_ONLY_DATA) { share->r_locks--; share->tot_locks--; } if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { if (end_io_cache(&info->rec_cache)) error=my_errno; info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); } flag= !--share->reopen; if (info->open_list.data) myisam_open_list= list_delete(myisam_open_list, &info->open_list); mysql_mutex_unlock(&share->intern_lock); my_free(mi_get_rec_buff_ptr(info, info->rec_buff)); ftparser_call_deinitializer(info); if (flag) { DBUG_EXECUTE_IF("crash_before_flush_keys", if (share->kfile >= 0) DBUG_SUICIDE();); if (share->kfile >= 0 && flush_key_blocks(share->key_cache, share->kfile, &share->dirty_part_map, share->deleting ? FLUSH_IGNORE_CHANGED : FLUSH_RELEASE)) error=my_errno; if (share->kfile >= 0) { /* If we are crashed, we can safely flush the current state as it will not change the crashed state. We can NOT write the state in other cases as other threads may be using the file at this point IF using --external-locking. Also, write the state if a temporary table is not being dropped (the server might want to reopen it, and mi_lock_database() only writes the state for non-temp ones) */ if (share->mode != O_RDONLY && (mi_is_crashed(info) || (share->temporary && !share->deleting))) mi_state_info_write(share->kfile, &share->state, 1); /* Decrement open count must be last I/O on this file. */ _mi_decrement_open_count(info); if (mysql_file_close(share->kfile, MYF(0))) error = my_errno; } #ifdef HAVE_MMAP if (share->file_map) { if (share->options & HA_OPTION_COMPRESS_RECORD) _mi_unmap_file(info); else mi_munmap_file(info); } #endif if (share->decode_trees) { my_free(share->decode_trees); my_free(share->decode_tables); } thr_lock_delete(&share->lock); mysql_mutex_destroy(&share->intern_lock); { int i,keys; keys = share->state.header.keys; mysql_rwlock_destroy(&share->mmap_lock); for(i=0; i<keys; i++) { mysql_rwlock_destroy(&share->key_root_lock[i]); } } my_free(info->s); } if (info->open_list.data) mysql_mutex_unlock(&THR_LOCK_myisam); if (info->ftparser_param) { my_free(info->ftparser_param); info->ftparser_param= 0; } if (info->dfile >= 0 && mysql_file_close(info->dfile, MYF(0))) error = my_errno; myisam_log_command(MI_LOG_CLOSE,info,NULL,0,error); my_free(info); if (error) { DBUG_RETURN(my_errno=error); } DBUG_RETURN(0); }
O3
c
mi_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx movq (%rdi), %r15 cmpq $0x0, 0x218(%rdi) je 0x2b3c7 leaq 0x3840f0(%rip), %rax # 0x3af4a0 cmpq $0x0, 0x40(%rax) jne 0x2b7c7 leaq 0x3840de(%rip), %rdi # 0x3af4a0 callq 0x28530 movl 0x1f4(%rbx), %eax xorl %r14d, %r14d cmpl $0x2, %eax je 0x2b3ff cmpl $-0x1, %eax jne 0x2b3e6 movl $0x2, 0x1f4(%rbx) jmp 0x2b3ff movq %rbx, %rdi movl $0x2, %esi callq 0x33be4 testl %eax, %eax je 0x2b3ff callq 0x5c086 movl (%rax), %r14d leaq 0x480(%r15), %r12 cmpq $0x0, 0x4c0(%r15) jne 0x2b799 movq %r12, %rdi callq 0x28530 testb $0x1, 0x31a(%r15) je 0x2b440 movq 0x364(%r15), %xmm0 pcmpeqd %xmm1, %xmm1 paddd %xmm0, %xmm1 movq %xmm1, 0x364(%r15) testb $0x12, 0x1c8(%rbx) je 0x2b468 leaq 0x220(%rbx), %rdi callq 0x5187b testl %eax, %eax je 0x2b461 callq 0x5c086 movl (%rax), %r14d andb $-0x13, 0x1c8(%rbx) movl 0x35c(%r15), %r13d decl %r13d movl %r13d, 0x35c(%r15) cmpq $0x0, 0x218(%rbx) je 0x2b4a3 leaq 0x208(%rbx), %rsi leaq 0x37b24f(%rip), %rax # 0x3a66e0 movq (%rax), %rdi callq 0x4fb2c leaq 0x37b240(%rip), %rcx # 0x3a66e0 movq %rax, (%rcx) movq 0x4c0(%r15), %rdi testq %rdi, %rdi jne 0x2b7b2 movq %r12, %rdi callq 0x28260 movq (%rbx), %rax movq 0x120(%rbx), %rcx leaq -0x18(%rcx), %rdi testq %rcx, %rcx cmoveq %rcx, %rdi testb $0x1, 0x318(%rax) cmoveq %rcx, %rdi callq 0x5a5f2 movq %rbx, %rdi callq 0x49280 testl %r13d, %r13d jne 0x2b6c5 movl 0x350(%r15), %esi testl %esi, %esi js 0x2b5bf movq 0x278(%r15), %rdi cmpb $0x1, 0x385(%r15) leaq 0x280(%r15), %rdx movl $0x2, %ecx sbbl $0x0, %ecx callq 0x53a7d testl %eax, %eax je 0x2b52f callq 0x5c086 movl (%rax), %r14d movl 0x350(%r15), %edi testl %edi, %edi js 0x2b5bf cmpl $0x0, 0x358(%r15) je 0x2b575 movq (%rbx), %rax testb $0x2, 0xf0(%rax) jne 0x2b568 cmpb $0x0, 0x382(%r15) je 0x2b575 cmpb $0x0, 0x385(%r15) jne 0x2b575 movq %r15, %rsi movl $0x1, %edx callq 0x37bdc movq %rbx, %rdi callq 0x348b2 movl 0x350(%r15), %r13d leaq 0x304dc5(%rip), %rax # 0x330350 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %r13d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2b81e movl %r13d, %edi xorl %esi, %esi callq 0x5ab2d testl %eax, %eax je 0x2b5bf callq 0x5c086 movl (%rax), %r14d cmpq $0x0, 0x270(%r15) je 0x2b5e5 testb $0x4, 0x318(%r15) jne 0x2b5dd movq %rbx, %rdi callq 0x2f946 jmp 0x2b5e5 movq %rbx, %rdi callq 0x3a0a4 movq 0x288(%r15), %rdi testq %rdi, %rdi je 0x2b602 callq 0x5a5f2 movq 0x290(%r15), %rdi callq 0x5a5f2 movl %r14d, -0x2c(%rbp) leaq 0x388(%r15), %rdi callq 0x5cba3 movq 0x4c0(%r15), %rdi testq %rdi, %rdi je 0x2b636 leaq 0x304d2b(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x4c0(%r15) movq %r12, %rdi callq 0x28400 movzbl 0x12(%r15), %r14d leaq 0x4e0(%r15), %r12 movq 0x570(%r15), %rdi testq %rdi, %rdi jne 0x2b801 movq %r12, %rdi callq 0x5e8f0 testq %r14, %r14 je 0x2b6b9 imulq $0x98, %r14, %r13 xorl %r14d, %r14d movq 0x4c8(%r15), %r12 movq 0x90(%r12,%r14), %rdi addq %r14, %r12 testq %rdi, %rdi jne 0x2b69e movq %r12, %rdi callq 0x5e8f0 addq $0x98, %r14 cmpq %r14, %r13 jne 0x2b671 jmp 0x2b6b9 leaq 0x304cab(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x58(%rax) movq $0x0, 0x90(%r12) jmp 0x2b688 movq (%rbx), %rdi callq 0x5a5f2 movl -0x2c(%rbp), %r14d cmpq $0x0, 0x218(%rbx) je 0x2b6ef leaq 0x383dca(%rip), %rax # 0x3af4a0 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0x2b7d1 leaq 0x383db6(%rip), %rdi # 0x3af4a0 callq 0x28260 movq 0xd0(%rbx), %rdi testq %rdi, %rdi je 0x2b70b callq 0x5a5f2 movq $0x0, 0xd0(%rbx) movl 0x1c0(%rbx), %r15d testl %r15d, %r15d js 0x2b752 leaq 0x304c32(%rip), %rax # 0x330350 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %r15d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2b7e6 movl %r15d, %edi xorl %esi, %esi callq 0x5ab2d testl %eax, %eax je 0x2b752 callq 0x5c086 movl (%rax), %r14d leaq 0x302dd7(%rip), %rax # 0x32e530 cmpl $0x0, (%rax) js 0x2b772 movl $0x4, %edi movq %rbx, %rsi xorl %edx, %edx xorl %ecx, %ecx movl %r14d, %r8d callq 0x34d4e movq %rbx, %rdi callq 0x5a5f2 testl %r14d, %r14d je 0x2b787 callq 0x5c086 movl %r14d, (%rax) movl %r14d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x65b3f(%rip), %rsi # 0x912df movq %r12, %rdi movl $0x2c, %edx callq 0x29e8c jmp 0x2b41c leaq 0x304b97(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x2b4b3 callq 0x28720 jmp 0x2b3c7 leaq 0x304b78(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x2b6e3 leaq -0x30(%rbp), %r12 movq %rax, %rdi movl %r15d, %esi movq %r12, %rdx callq 0x28791 movl (%r12), %eax jmp 0x2b746 leaq 0x304b48(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x58(%rax) movq $0x0, 0x570(%r15) jmp 0x2b65a leaq -0x30(%rbp), %rcx movq %rax, %rdi movl %r13d, %esi movq %rcx, %r13 movq %rcx, %rdx callq 0x2873d movl (%r13), %eax jmp 0x2b5b3
mi_close: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi mov r15, [rdi] cmp qword ptr [rdi+218h], 0 jz short loc_2B3C7 lea rax, THR_LOCK_myisam cmp qword ptr [rax+40h], 0 jnz loc_2B7C7 lea rdi, THR_LOCK_myisam call _pthread_mutex_lock loc_2B3C7: mov eax, [rbx+1F4h] xor r14d, r14d cmp eax, 2 jz short loc_2B3FF cmp eax, 0FFFFFFFFh jnz short loc_2B3E6 mov dword ptr [rbx+1F4h], 2 jmp short loc_2B3FF loc_2B3E6: mov rdi, rbx mov esi, 2 call mi_lock_database test eax, eax jz short loc_2B3FF call _my_thread_var mov r14d, [rax] loc_2B3FF: lea r12, [r15+480h] cmp qword ptr [r15+4C0h], 0 jnz loc_2B799 mov rdi, r12 call _pthread_mutex_lock loc_2B41C: test byte ptr [r15+31Ah], 1 jz short loc_2B440 movq xmm0, qword ptr [r15+364h] pcmpeqd xmm1, xmm1 paddd xmm1, xmm0 movq qword ptr [r15+364h], xmm1 loc_2B440: test byte ptr [rbx+1C8h], 12h jz short loc_2B468 lea rdi, [rbx+220h] call end_io_cache test eax, eax jz short loc_2B461 call _my_thread_var mov r14d, [rax] loc_2B461: and byte ptr [rbx+1C8h], 0EDh loc_2B468: mov r13d, [r15+35Ch] dec r13d mov [r15+35Ch], r13d cmp qword ptr [rbx+218h], 0 jz short loc_2B4A3 lea rsi, [rbx+208h] lea rax, myisam_open_list mov rdi, [rax] call list_delete lea rcx, myisam_open_list mov [rcx], rax loc_2B4A3: mov rdi, [r15+4C0h] test rdi, rdi jnz loc_2B7B2 loc_2B4B3: mov rdi, r12 call _pthread_mutex_unlock mov rax, [rbx] mov rcx, [rbx+120h] lea rdi, [rcx-18h] test rcx, rcx cmovz rdi, rcx test byte ptr [rax+318h], 1 cmovz rdi, rcx call my_free mov rdi, rbx call ftparser_call_deinitializer test r13d, r13d jnz loc_2B6C5 mov esi, [r15+350h] test esi, esi js loc_2B5BF mov rdi, [r15+278h] cmp byte ptr [r15+385h], 1 lea rdx, [r15+280h] mov ecx, 2 sbb ecx, 0 call flush_key_blocks test eax, eax jz short loc_2B52F call _my_thread_var mov r14d, [rax] loc_2B52F: mov edi, [r15+350h] test edi, edi js loc_2B5BF cmp dword ptr [r15+358h], 0 jz short loc_2B575 mov rax, [rbx] test byte ptr [rax+0F0h], 2 jnz short loc_2B568 cmp byte ptr [r15+382h], 0 jz short loc_2B575 cmp byte ptr [r15+385h], 0 jnz short loc_2B575 loc_2B568: mov rsi, r15 mov edx, 1 call mi_state_info_write loc_2B575: mov rdi, rbx call _mi_decrement_open_count mov r13d, [r15+350h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, r13d mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz loc_2B81E mov edi, r13d xor esi, esi call my_close loc_2B5B3: test eax, eax jz short loc_2B5BF call _my_thread_var mov r14d, [rax] loc_2B5BF: cmp qword ptr [r15+270h], 0 jz short loc_2B5E5 test byte ptr [r15+318h], 4 jnz short loc_2B5DD mov rdi, rbx call mi_munmap_file jmp short loc_2B5E5 loc_2B5DD: mov rdi, rbx call _mi_unmap_file loc_2B5E5: mov rdi, [r15+288h] test rdi, rdi jz short loc_2B602 call my_free mov rdi, [r15+290h] call my_free loc_2B602: mov [rbp+var_2C], r14d lea rdi, [r15+388h] call thr_lock_delete mov rdi, [r15+4C0h] test rdi, rdi jz short loc_2B636 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [r15+4C0h], 0 loc_2B636: mov rdi, r12 call _pthread_mutex_destroy movzx r14d, byte ptr [r15+12h] lea r12, [r15+4E0h] mov rdi, [r15+570h] test rdi, rdi jnz loc_2B801 loc_2B65A: mov rdi, r12 call my_rw_destroy test r14, r14 jz short loc_2B6B9 imul r13, r14, 98h xor r14d, r14d loc_2B671: mov r12, [r15+4C8h] mov rdi, [r12+r14+90h] add r12, r14 test rdi, rdi jnz short loc_2B69E loc_2B688: mov rdi, r12 call my_rw_destroy add r14, 98h cmp r13, r14 jnz short loc_2B671 jmp short loc_2B6B9 loc_2B69E: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+58h] mov qword ptr [r12+90h], 0 jmp short loc_2B688 loc_2B6B9: mov rdi, [rbx] call my_free mov r14d, [rbp+var_2C] loc_2B6C5: cmp qword ptr [rbx+218h], 0 jz short loc_2B6EF lea rax, THR_LOCK_myisam mov rdi, [rax+40h] test rdi, rdi jnz loc_2B7D1 loc_2B6E3: lea rdi, THR_LOCK_myisam call _pthread_mutex_unlock loc_2B6EF: mov rdi, [rbx+0D0h] test rdi, rdi jz short loc_2B70B call my_free mov qword ptr [rbx+0D0h], 0 loc_2B70B: mov r15d, [rbx+1C0h] test r15d, r15d js short loc_2B752 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, r15d mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz loc_2B7E6 mov edi, r15d xor esi, esi call my_close loc_2B746: test eax, eax jz short loc_2B752 call _my_thread_var mov r14d, [rax] loc_2B752: lea rax, myisam_log_file cmp dword ptr [rax], 0 js short loc_2B772 mov edi, 4 mov rsi, rbx xor edx, edx xor ecx, ecx mov r8d, r14d call _myisam_log_command loc_2B772: mov rdi, rbx call my_free test r14d, r14d jz short loc_2B787 call _my_thread_var mov [rax], r14d loc_2B787: mov eax, r14d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2B799: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov edx, 2Ch ; ',' call psi_mutex_lock jmp loc_2B41C loc_2B7B2: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_2B4B3 loc_2B7C7: call mi_close_cold_1 jmp loc_2B3C7 loc_2B7D1: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_2B6E3 loc_2B7E6: lea r12, [rbp+var_30] mov rdi, rax mov esi, r15d mov rdx, r12 call mi_close_cold_3 mov eax, [r12] jmp loc_2B746 loc_2B801: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+58h] mov qword ptr [r15+570h], 0 jmp loc_2B65A loc_2B81E: lea rcx, [rbp+var_30] mov rdi, rax mov esi, r13d mov r13, rcx mov rdx, rcx call mi_close_cold_2 mov eax, [r13+0] jmp loc_2B5B3
long long mi_close(_QWORD *a1, const char *a2) { long long v3; // r15 int v4; // eax unsigned int v5; // r14d long long v6; // rdx long long v7; // rcx long long v8; // rdx long long v9; // rcx int v10; // r13d long long v11; // rcx long long v12; // rdi long long v13; // rdi long long v14; // rdx long long v15; // rcx long long v16; // rdi unsigned int v17; // r13d long long v18; // rax long long v19; // rdi unsigned int v20; // eax long long v21; // rdx long long v22; // rcx long long v23; // rdi long long v24; // r14 long long v25; // r13 long long v26; // r14 long long v27; // r12 long long v28; // rdi long long v29; // r12 long long v30; // rdi unsigned int v31; // r15d long long v32; // rax long long v33; // rdi unsigned int v34; // eax long long v35; // rdx long long v36; // rcx long long v37; // rdx long long v38; // rcx _BYTE v40[72]; // [rsp+8h] [rbp-78h] BYREF unsigned int v41; // [rsp+50h] [rbp-30h] BYREF unsigned int v42; // [rsp+54h] [rbp-2Ch] v3 = *a1; if ( a1[67] ) { if ( THR_LOCK_myisam[8] ) mi_close_cold_1(); else pthread_mutex_lock(THR_LOCK_myisam); } v4 = *((_DWORD *)a1 + 125); v5 = 0; if ( v4 != 2 ) { if ( v4 == -1 ) { *((_DWORD *)a1 + 125) = 2; } else { a2 = (_BYTE *)(&dword_0 + 2); if ( (unsigned int)mi_lock_database(a1, 2LL) ) v5 = *(_DWORD *)my_thread_var(a1, 2LL, v6, v7); } } if ( *(_QWORD *)(v3 + 1216) ) { a2 = "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_close.c"; psi_mutex_lock(v3 + 1152, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_close.c", 0x2Cu); } else { pthread_mutex_lock(v3 + 1152); } if ( (*(_BYTE *)(v3 + 794) & 1) != 0 ) *(_QWORD *)(v3 + 868) = _mm_add_epi32((__m128i)-1LL, _mm_loadl_epi64((const __m128i *)(v3 + 868))).m128i_u64[0]; if ( (a1[57] & 0x12) != 0 ) { if ( (unsigned int)end_io_cache(a1 + 68) ) v5 = *(_DWORD *)my_thread_var(a1 + 68, a2, v8, v9); *((_BYTE *)a1 + 456) &= 0xEDu; } v10 = *(_DWORD *)(v3 + 860) - 1; *(_DWORD *)(v3 + 860) = v10; if ( a1[67] ) { a2 = (const char *)(a1 + 65); myisam_open_list = list_delete(myisam_open_list, a1 + 65); } if ( *(_QWORD *)(v3 + 1216) ) PSI_server[44](); pthread_mutex_unlock(v3 + 1152); v11 = a1[36]; v12 = v11 - 24; if ( !v11 ) v12 = 0LL; if ( (*(_BYTE *)(*a1 + 792LL) & 1) == 0 ) v12 = a1[36]; my_free(v12); ftparser_call_deinitializer(a1); if ( !v10 ) { a2 = (const char *)*(unsigned int *)(v3 + 848); if ( (int)a2 >= 0 ) { v13 = *(_QWORD *)(v3 + 632); if ( (unsigned int)flush_key_blocks(v13, a2, v3 + 640, 2 - (unsigned int)(*(_BYTE *)(v3 + 901) == 0)) ) v5 = *(_DWORD *)my_thread_var(v13, a2, v14, v15); v16 = *(unsigned int *)(v3 + 848); if ( (int)v16 >= 0 ) { if ( *(_DWORD *)(v3 + 856) && ((*(_BYTE *)(*a1 + 240LL) & 2) != 0 || *(_BYTE *)(v3 + 898) && !*(_BYTE *)(v3 + 901)) ) { mi_state_info_write(v16, v3, 1LL); } mi_decrement_open_count(a1); v17 = *(_DWORD *)(v3 + 848); v18 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v40, v17, 4LL); if ( v18 ) { v19 = v18; a2 = (const char *)v17; mi_close_cold_2(v18, v17, &v41); v20 = v41; } else { v19 = v17; a2 = 0LL; v20 = my_close(v17, 0LL); } if ( v20 ) v5 = *(_DWORD *)my_thread_var(v19, a2, v21, v22); } } if ( *(_QWORD *)(v3 + 624) ) { if ( (*(_BYTE *)(v3 + 792) & 4) != 0 ) mi_unmap_file(a1); else mi_munmap_file(a1); } v23 = *(_QWORD *)(v3 + 648); if ( v23 ) { my_free(v23); my_free(*(_QWORD *)(v3 + 656)); } v42 = v5; thr_lock_delete(v3 + 904); if ( *(_QWORD *)(v3 + 1216) ) { PSI_server[9](); *(_QWORD *)(v3 + 1216) = 0LL; } pthread_mutex_destroy(v3 + 1152); v24 = *(unsigned __int8 *)(v3 + 18); if ( *(_QWORD *)(v3 + 1392) ) { PSI_server[11](); *(_QWORD *)(v3 + 1392) = 0LL; } my_rw_destroy(v3 + 1248); if ( v24 ) { v25 = 152 * v24; v26 = 0LL; do { v27 = *(_QWORD *)(v3 + 1224); v28 = *(_QWORD *)(v27 + v26 + 144); v29 = v26 + v27; if ( v28 ) { PSI_server[11](); *(_QWORD *)(v29 + 144) = 0LL; } my_rw_destroy(v29); v26 += 152LL; } while ( v25 != v26 ); } my_free(*a1); v5 = v42; } if ( a1[67] ) { if ( THR_LOCK_myisam[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_myisam); } v30 = a1[26]; if ( v30 ) { my_free(v30); a1[26] = 0LL; } v31 = *((_DWORD *)a1 + 112); if ( (v31 & 0x80000000) == 0 ) { v32 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v40, v31, 4LL); if ( v32 ) { v33 = v32; a2 = (const char *)v31; mi_close_cold_3(v32, v31, &v41); v34 = v41; } else { v33 = v31; a2 = 0LL; v34 = my_close(v31, 0LL); } if ( v34 ) v5 = *(_DWORD *)my_thread_var(v33, a2, v35, v36); } if ( myisam_log_file >= 0 ) { a2 = (const char *)a1; myisam_log_command(4LL, a1, 0LL, 0LL, v5); } my_free(a1); if ( v5 ) *(_DWORD *)my_thread_var(a1, a2, v37, v38) = v5; return v5; }
mi_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV R15,qword ptr [RDI] CMP qword ptr [RDI + 0x218],0x0 JZ 0x0012b3c7 LEA RAX,[0x4af4a0] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x0012b7c7 LEA RDI,[0x4af4a0] CALL 0x00128530 LAB_0012b3c7: MOV EAX,dword ptr [RBX + 0x1f4] XOR R14D,R14D CMP EAX,0x2 JZ 0x0012b3ff CMP EAX,-0x1 JNZ 0x0012b3e6 MOV dword ptr [RBX + 0x1f4],0x2 JMP 0x0012b3ff LAB_0012b3e6: MOV RDI,RBX MOV ESI,0x2 CALL 0x00133be4 TEST EAX,EAX JZ 0x0012b3ff CALL 0x0015c086 MOV R14D,dword ptr [RAX] LAB_0012b3ff: LEA R12,[R15 + 0x480] CMP qword ptr [R15 + 0x4c0],0x0 JNZ 0x0012b799 MOV RDI,R12 CALL 0x00128530 LAB_0012b41c: TEST byte ptr [R15 + 0x31a],0x1 JZ 0x0012b440 MOVQ XMM0,qword ptr [R15 + 0x364] PCMPEQD XMM1,XMM1 PADDD XMM1,XMM0 MOVQ qword ptr [R15 + 0x364],XMM1 LAB_0012b440: TEST byte ptr [RBX + 0x1c8],0x12 JZ 0x0012b468 LEA RDI,[RBX + 0x220] CALL 0x0015187b TEST EAX,EAX JZ 0x0012b461 CALL 0x0015c086 MOV R14D,dword ptr [RAX] LAB_0012b461: AND byte ptr [RBX + 0x1c8],0xed LAB_0012b468: MOV R13D,dword ptr [R15 + 0x35c] DEC R13D MOV dword ptr [R15 + 0x35c],R13D CMP qword ptr [RBX + 0x218],0x0 JZ 0x0012b4a3 LEA RSI,[RBX + 0x208] LEA RAX,[0x4a66e0] MOV RDI,qword ptr [RAX] CALL 0x0014fb2c LEA RCX,[0x4a66e0] MOV qword ptr [RCX],RAX LAB_0012b4a3: MOV RDI,qword ptr [R15 + 0x4c0] TEST RDI,RDI JNZ 0x0012b7b2 LAB_0012b4b3: MOV RDI,R12 CALL 0x00128260 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x120] LEA RDI,[RCX + -0x18] TEST RCX,RCX CMOVZ RDI,RCX TEST byte ptr [RAX + 0x318],0x1 CMOVZ RDI,RCX CALL 0x0015a5f2 MOV RDI,RBX CALL 0x00149280 TEST R13D,R13D JNZ 0x0012b6c5 MOV ESI,dword ptr [R15 + 0x350] TEST ESI,ESI JS 0x0012b5bf MOV RDI,qword ptr [R15 + 0x278] CMP byte ptr [R15 + 0x385],0x1 LEA RDX,[R15 + 0x280] MOV ECX,0x2 SBB ECX,0x0 CALL 0x00153a7d TEST EAX,EAX JZ 0x0012b52f CALL 0x0015c086 MOV R14D,dword ptr [RAX] LAB_0012b52f: MOV EDI,dword ptr [R15 + 0x350] TEST EDI,EDI JS 0x0012b5bf CMP dword ptr [R15 + 0x358],0x0 JZ 0x0012b575 MOV RAX,qword ptr [RBX] TEST byte ptr [RAX + 0xf0],0x2 JNZ 0x0012b568 CMP byte ptr [R15 + 0x382],0x0 JZ 0x0012b575 CMP byte ptr [R15 + 0x385],0x0 JNZ 0x0012b575 LAB_0012b568: MOV RSI,R15 MOV EDX,0x1 CALL 0x00137bdc LAB_0012b575: MOV RDI,RBX CALL 0x001348b2 MOV R13D,dword ptr [R15 + 0x350] LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,R13D MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012b81e MOV EDI,R13D XOR ESI,ESI CALL 0x0015ab2d LAB_0012b5b3: TEST EAX,EAX JZ 0x0012b5bf CALL 0x0015c086 MOV R14D,dword ptr [RAX] LAB_0012b5bf: CMP qword ptr [R15 + 0x270],0x0 JZ 0x0012b5e5 TEST byte ptr [R15 + 0x318],0x4 JNZ 0x0012b5dd MOV RDI,RBX CALL 0x0012f946 JMP 0x0012b5e5 LAB_0012b5dd: MOV RDI,RBX CALL 0x0013a0a4 LAB_0012b5e5: MOV RDI,qword ptr [R15 + 0x288] TEST RDI,RDI JZ 0x0012b602 CALL 0x0015a5f2 MOV RDI,qword ptr [R15 + 0x290] CALL 0x0015a5f2 LAB_0012b602: MOV dword ptr [RBP + -0x2c],R14D LEA RDI,[R15 + 0x388] CALL 0x0015cba3 MOV RDI,qword ptr [R15 + 0x4c0] TEST RDI,RDI JZ 0x0012b636 LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [R15 + 0x4c0],0x0 LAB_0012b636: MOV RDI,R12 CALL 0x00128400 MOVZX R14D,byte ptr [R15 + 0x12] LEA R12,[R15 + 0x4e0] MOV RDI,qword ptr [R15 + 0x570] TEST RDI,RDI JNZ 0x0012b801 LAB_0012b65a: MOV RDI,R12 CALL 0x0015e8f0 TEST R14,R14 JZ 0x0012b6b9 IMUL R13,R14,0x98 XOR R14D,R14D LAB_0012b671: MOV R12,qword ptr [R15 + 0x4c8] MOV RDI,qword ptr [R12 + R14*0x1 + 0x90] ADD R12,R14 TEST RDI,RDI JNZ 0x0012b69e LAB_0012b688: MOV RDI,R12 CALL 0x0015e8f0 ADD R14,0x98 CMP R13,R14 JNZ 0x0012b671 JMP 0x0012b6b9 LAB_0012b69e: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x58] MOV qword ptr [R12 + 0x90],0x0 JMP 0x0012b688 LAB_0012b6b9: MOV RDI,qword ptr [RBX] CALL 0x0015a5f2 MOV R14D,dword ptr [RBP + -0x2c] LAB_0012b6c5: CMP qword ptr [RBX + 0x218],0x0 JZ 0x0012b6ef LEA RAX,[0x4af4a0] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x0012b7d1 LAB_0012b6e3: LEA RDI,[0x4af4a0] CALL 0x00128260 LAB_0012b6ef: MOV RDI,qword ptr [RBX + 0xd0] TEST RDI,RDI JZ 0x0012b70b CALL 0x0015a5f2 MOV qword ptr [RBX + 0xd0],0x0 LAB_0012b70b: MOV R15D,dword ptr [RBX + 0x1c0] TEST R15D,R15D JS 0x0012b752 LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,R15D MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012b7e6 MOV EDI,R15D XOR ESI,ESI CALL 0x0015ab2d LAB_0012b746: TEST EAX,EAX JZ 0x0012b752 CALL 0x0015c086 MOV R14D,dword ptr [RAX] LAB_0012b752: LEA RAX,[0x42e530] CMP dword ptr [RAX],0x0 JS 0x0012b772 MOV EDI,0x4 MOV RSI,RBX XOR EDX,EDX XOR ECX,ECX MOV R8D,R14D CALL 0x00134d4e LAB_0012b772: MOV RDI,RBX CALL 0x0015a5f2 TEST R14D,R14D JZ 0x0012b787 CALL 0x0015c086 MOV dword ptr [RAX],R14D LAB_0012b787: MOV EAX,R14D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012b799: LEA RSI,[0x1912df] MOV RDI,R12 MOV EDX,0x2c CALL 0x00129e8c JMP 0x0012b41c LAB_0012b7b2: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0012b4b3 LAB_0012b7c7: CALL 0x00128720 JMP 0x0012b3c7 LAB_0012b7d1: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0012b6e3 LAB_0012b7e6: LEA R12,[RBP + -0x30] MOV RDI,RAX MOV ESI,R15D MOV RDX,R12 CALL 0x00128791 MOV EAX,dword ptr [R12] JMP 0x0012b746 LAB_0012b801: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x58] MOV qword ptr [R15 + 0x570],0x0 JMP 0x0012b65a LAB_0012b81e: LEA RCX,[RBP + -0x30] MOV RDI,RAX MOV ESI,R13D MOV R13,RCX MOV RDX,RCX CALL 0x0012873d MOV EAX,dword ptr [R13] JMP 0x0012b5b3
int mi_close(long *param_1) { pthread_mutex_t *__mutex; byte bVar1; int4 uVar2; int iVar3; int *piVar4; long lVar5; long lVar6; long lVar7; int iVar8; int1 local_80 [72]; int local_38; int local_34; lVar6 = *param_1; if (param_1[0x43] != 0) { if (THR_LOCK_myisam._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_myisam); } else { mi_close_cold_1(); } } iVar8 = 0; if (*(int *)((long)param_1 + 500) != 2) { iVar8 = 0; if (*(int *)((long)param_1 + 500) == -1) { *(int4 *)((long)param_1 + 500) = 2; } else { iVar3 = mi_lock_database(param_1,2); if (iVar3 != 0) { piVar4 = (int *)_my_thread_var(); iVar8 = *piVar4; } } } __mutex = (pthread_mutex_t *)(lVar6 + 0x480); if (*(long *)(lVar6 + 0x4c0) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_close.c",0x2c ); } if ((*(byte *)(lVar6 + 0x31a) & 1) != 0) { *(ulong *)(lVar6 + 0x364) = CONCAT44((int)((ulong)*(int8 *)(lVar6 + 0x364) >> 0x20) + -1, (int)*(int8 *)(lVar6 + 0x364) + -1); } if ((*(byte *)(param_1 + 0x39) & 0x12) != 0) { iVar3 = end_io_cache(param_1 + 0x44); if (iVar3 != 0) { piVar4 = (int *)_my_thread_var(); iVar8 = *piVar4; } *(byte *)(param_1 + 0x39) = *(byte *)(param_1 + 0x39) & 0xed; } iVar3 = *(int *)(lVar6 + 0x35c) + -1; *(int *)(lVar6 + 0x35c) = iVar3; if (param_1[0x43] != 0) { myisam_open_list = list_delete(myisam_open_list,param_1 + 0x41); } if (*(long *)(lVar6 + 0x4c0) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); lVar5 = param_1[0x24]; lVar7 = lVar5 + -0x18; if (lVar5 == 0) { lVar7 = lVar5; } if ((*(byte *)(*param_1 + 0x318) & 1) == 0) { lVar7 = lVar5; } my_free(lVar7); ftparser_call_deinitializer(param_1); if (iVar3 == 0) { if (-1 < *(int *)(lVar6 + 0x350)) { iVar3 = flush_key_blocks(*(int8 *)(lVar6 + 0x278),*(int *)(lVar6 + 0x350),lVar6 + 0x280, 2 - (uint)(*(char *)(lVar6 + 0x385) == '\0')); if (iVar3 != 0) { piVar4 = (int *)_my_thread_var(); iVar8 = *piVar4; } if (-1 < *(int *)(lVar6 + 0x350)) { if ((*(int *)(lVar6 + 0x358) != 0) && (((*(byte *)(*param_1 + 0xf0) & 2) != 0 || ((*(char *)(lVar6 + 0x382) != '\0' && (*(char *)(lVar6 + 0x385) == '\0')))))) { mi_state_info_write(*(int *)(lVar6 + 0x350),lVar6,1); } _mi_decrement_open_count(param_1); uVar2 = *(int4 *)(lVar6 + 0x350); lVar5 = (**(code **)(PSI_server + 0x158))(local_80,uVar2,4); if (lVar5 == 0) { iVar3 = my_close(uVar2,0); } else { mi_close_cold_2(lVar5,uVar2,&local_38); iVar3 = local_38; } if (iVar3 != 0) { piVar4 = (int *)_my_thread_var(); iVar8 = *piVar4; } } } if (*(long *)(lVar6 + 0x270) != 0) { if ((*(byte *)(lVar6 + 0x318) & 4) == 0) { mi_munmap_file(param_1); } else { _mi_unmap_file(param_1); } } if (*(long *)(lVar6 + 0x288) != 0) { my_free(); my_free(*(int8 *)(lVar6 + 0x290)); } local_34 = iVar8; thr_lock_delete(lVar6 + 0x388); if (*(long *)(lVar6 + 0x4c0) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(lVar6 + 0x4c0) = 0; } pthread_mutex_destroy(__mutex); bVar1 = *(byte *)(lVar6 + 0x12); if (*(long *)(lVar6 + 0x570) != 0) { (**(code **)(PSI_server + 0x58))(); *(int8 *)(lVar6 + 0x570) = 0; } my_rw_destroy(lVar6 + 0x4e0); if ((ulong)bVar1 != 0) { lVar5 = 0; do { lVar7 = *(long *)(lVar6 + 0x4c8) + lVar5; if (*(long *)(*(long *)(lVar6 + 0x4c8) + 0x90 + lVar5) != 0) { (**(code **)(PSI_server + 0x58))(); *(int8 *)(lVar7 + 0x90) = 0; } my_rw_destroy(lVar7); lVar5 = lVar5 + 0x98; } while ((ulong)bVar1 * 0x98 - lVar5 != 0); } my_free(*param_1); iVar8 = local_34; } if (param_1[0x43] != 0) { if (THR_LOCK_myisam._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_myisam); } if (param_1[0x1a] != 0) { my_free(); param_1[0x1a] = 0; } iVar3 = (int)param_1[0x38]; if (-1 < iVar3) { lVar6 = (**(code **)(PSI_server + 0x158))(local_80,iVar3,4); if (lVar6 == 0) { local_38 = my_close(iVar3,0); } else { mi_close_cold_3(lVar6,iVar3,&local_38); } if (local_38 != 0) { piVar4 = (int *)_my_thread_var(); iVar8 = *piVar4; } } if (-1 < myisam_log_file) { _myisam_log_command(4,param_1,0,0,iVar8); } my_free(param_1); if (iVar8 != 0) { piVar4 = (int *)_my_thread_var(); *piVar4 = iVar8; } return iVar8; }
1,282
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&)
monkey531[P]llama/common/minja.hpp
CallExpr(const Location & location, std::shared_ptr<Expression> && obj, ArgumentsExpression && a) : Expression(location), object(std::move(obj)), args(std::move(a)) {}
O2
cpp
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 callq 0x628da leaq 0x8dfca(%rip), %rax # 0xfc8d0 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) addq $0x30, %r15 movq %r15, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %r15 jmp 0x6b7b0
_ZN5minja8CallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEONS_19ArgumentsExpressionE: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx mov r15, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja8CallExprE; `vtable for'minja::CallExpr add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 add r15, 30h ; '0' mov rdi, r15 mov rsi, rbx pop rbx pop r14 pop r15 jmp _ZN5minja19ArgumentsExpressionC2EOS0_; minja::ArgumentsExpression::ArgumentsExpression(minja::ArgumentsExpression&&)
long long minja::CallExpr::CallExpr(long long a1, _QWORD *a2, __int128 *a3, long long a4) { __int128 v6; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::CallExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v6 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v6; *(_QWORD *)a3 = 0LL; return minja::ArgumentsExpression::ArgumentsExpression(a1 + 48, a4); }
CallExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RDI CALL 0x001628da LEA RAX,[0x1fc8d0] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 ADD R15,0x30 MOV RDI,R15 MOV RSI,RBX POP RBX POP R14 POP R15 JMP 0x0016b7b0
/* minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&) */ void __thiscall minja::CallExpr::CallExpr (CallExpr *this,Location *param_1,shared_ptr *param_2,ArgumentsExpression *param_3) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001fc8e0; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; ArgumentsExpression::ArgumentsExpression((ArgumentsExpression *)(this + 0x30),param_3); return; }
1,283
hashcmp
eloqsql/mysys/hash.c
static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length) { size_t rec_keylength; uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1); return ((length && length != rec_keylength) || my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, (uchar*) key, rec_keylength)); }
O3
c
hashcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rdi, %r14 movq 0x50(%rdi), %rax testq %rax, %rax je 0x299fc leaq -0x28(%rbp), %r12 movq %rsi, %rdi movq %r12, %rsi movl $0x1, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0x29a07 movq 0x8(%r14), %rdx movq %rdx, -0x28(%rbp) addq (%r14), %rsi testq %r15, %r15 sete %al cmpq %r15, %rdx sete %cl orb %al, %cl movl $0x1, %eax cmpb $0x1, %cl jne 0x29a3f movq 0x68(%r14), %rdi movq 0xc0(%rdi), %rax movq %rbx, %rcx movq %rdx, %r8 xorl %r9d, %r9d callq *0x8(%rax) movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx setne %al addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
hashcmp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15, rcx mov rbx, rdx mov r14, rdi mov rax, [rdi+50h] test rax, rax jz short loc_299FC lea r12, [rbp+var_28] mov rdi, rsi mov rsi, r12 mov edx, 1 call rax mov rsi, rax mov rdx, [r12] jmp short loc_29A07 loc_299FC: mov rdx, [r14+8] mov [rbp+var_28], rdx add rsi, [r14] loc_29A07: test r15, r15 setz al cmp rdx, r15 setz cl or cl, al mov eax, 1 cmp cl, 1 jnz short loc_29A3F mov rdi, [r14+68h] mov rax, [rdi+0C0h] mov rcx, rbx mov r8, rdx xor r9d, r9d call qword ptr [rax+8] mov ecx, eax xor eax, eax test ecx, ecx setnz al loc_29A3F: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 hashcmp(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, _QWORD *, long long); // rax long long v7; // rsi long long v8; // rdx _BOOL8 result; // rax _QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF v6 = (long long ( *)(long long, _QWORD *, long long))a1[10]; if ( v6 ) { v7 = v6(a2, v10, 1LL); v8 = v10[0]; } else { v8 = a1[1]; v10[0] = v8; v7 = *a1 + a2; } result = 1LL; if ( a4 == 0 || v8 == a4 ) return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL) + 8LL))( a1[13], v7, v8, a3, v8, 0LL) != 0; return result; }
hashcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RCX MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x001299fc LEA R12,[RBP + -0x28] MOV RDI,RSI MOV RSI,R12 MOV EDX,0x1 CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x00129a07 LAB_001299fc: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x28],RDX ADD RSI,qword ptr [R14] LAB_00129a07: TEST R15,R15 SETZ AL CMP RDX,R15 SETZ CL OR CL,AL MOV EAX,0x1 CMP CL,0x1 JNZ 0x00129a3f MOV RDI,qword ptr [R14 + 0x68] MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,RBX MOV R8,RDX XOR R9D,R9D CALL qword ptr [RAX + 0x8] MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX SETNZ AL LAB_00129a3f: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4) { int iVar1; bool bVar2; long local_30; if ((code *)param_1[10] == (code *)0x0) { local_30 = param_1[1]; param_2 = param_2 + *param_1; } else { param_2 = (*(code *)param_1[10])(param_2,&local_30,1); } bVar2 = true; if (local_30 == param_4 || param_4 == 0) { iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8)) (param_1[0xd],param_2,local_30,param_3,local_30,0); bVar2 = iVar1 != 0; } return bVar2; }
1,284
lf_alloc_new
eloqsql/mysys/lf_alloc-pin.c
void *lf_alloc_new(LF_PINS *pins) { LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg); uchar *node; for (;;) { do { node= allocator->top; lf_pin(pins, 0, node); } while (node != allocator->top && LF_BACKOFF()); if (!node) { node= (void *)my_malloc(key_memory_lf_node, allocator->element_size, MYF(MY_WME)); if (allocator->constructor) allocator->constructor(node); #ifdef MY_LF_EXTRA_DEBUG if (likely(node != 0)) my_atomic_add32(&allocator->mallocs, 1); #endif break; } if (my_atomic_casptr((void **)(char *)&allocator->top, (void *)&node, anext_node(node))) break; } lf_unpin(pins, 0); return node; }
O3
c
lf_alloc_new: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x20(%rdi), %rax movq 0x30(%rax), %r15 leaq 0x2e078d(%rip), %rcx # 0x386018 movq 0x48(%r15), %r14 movq %r14, %rax xchgq %rax, (%rbx) cmpq 0x48(%r15), %r14 je 0xa58a9 movl (%rcx), %eax testl %eax, %eax je 0xa588b pause decl %eax jne 0xa58a1 jmp 0xa588b testq %r14, %r14 je 0xa58c3 movl 0x38(%r15), %eax movq (%r14,%rax), %rdx movq %r14, %rax lock cmpxchgq %rdx, 0x48(%r15) jne 0xa588b jmp 0xa58eb leaq 0xb62966(%rip), %rax # 0xc08230 movl (%rax), %edi movl 0x50(%r15), %esi movl $0x10, %edx callq 0x9fd41 movq %rax, %r14 movq 0x58(%r15), %rax testq %rax, %rax je 0xa58eb movq %r14, %rdi callq *%rax xorl %eax, %eax xchgq %rax, (%rbx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
lf_alloc_new: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+20h] mov r15, [rax+30h] lea rcx, my_cpu_relax_multiplier loc_A588B: mov r14, [r15+48h] mov rax, r14 xchg rax, [rbx] cmp r14, [r15+48h] jz short loc_A58A9 mov eax, [rcx] test eax, eax jz short loc_A588B loc_A58A1: pause dec eax jnz short loc_A58A1 jmp short loc_A588B loc_A58A9: test r14, r14 jz short loc_A58C3 mov eax, [r15+38h] mov rdx, [r14+rax] mov rax, r14 lock cmpxchg [r15+48h], rdx jnz short loc_A588B jmp short loc_A58EB loc_A58C3: lea rax, key_memory_lf_node mov edi, [rax] mov esi, [r15+50h] mov edx, 10h call my_malloc mov r14, rax mov rax, [r15+58h] test rax, rax jz short loc_A58EB mov rdi, r14 call rax loc_A58EB: xor eax, eax xchg rax, [rbx] mov rax, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long lf_alloc_new(long long a1) { long long v1; // r15 long long v2; // r14 int i; // eax void ( *v4)(long long); // rax v1 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 48LL); while ( 1 ) { while ( 1 ) { v2 = *(_QWORD *)(v1 + 72); _InterlockedExchange64((volatile long long *)a1, v2); if ( v2 == *(_QWORD *)(v1 + 72) ) break; for ( i = my_cpu_relax_multiplier; i; --i ) _mm_pause(); } if ( !v2 ) break; if ( v2 == _InterlockedCompareExchange64( (volatile signed long long *)(v1 + 72), *(_QWORD *)(v2 + *(unsigned int *)(v1 + 56)), v2) ) goto LABEL_11; } v2 = my_malloc(key_memory_lf_node, *(unsigned int *)(v1 + 80), 16); v4 = *(void ( **)(long long))(v1 + 88); if ( v4 ) v4(v2); LABEL_11: _InterlockedExchange64((volatile long long *)a1, 0LL); return v2; }
lf_alloc_new: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] MOV R15,qword ptr [RAX + 0x30] LEA RCX,[0x486018] LAB_001a588b: MOV R14,qword ptr [R15 + 0x48] MOV RAX,R14 XCHG qword ptr [RBX],RAX CMP R14,qword ptr [R15 + 0x48] JZ 0x001a58a9 MOV EAX,dword ptr [RCX] TEST EAX,EAX JZ 0x001a588b LAB_001a58a1: PAUSE DEC EAX JNZ 0x001a58a1 JMP 0x001a588b LAB_001a58a9: TEST R14,R14 JZ 0x001a58c3 MOV EAX,dword ptr [R15 + 0x38] MOV RDX,qword ptr [R14 + RAX*0x1] MOV RAX,R14 CMPXCHG.LOCK qword ptr [R15 + 0x48],RDX JNZ 0x001a588b JMP 0x001a58eb LAB_001a58c3: LEA RAX,[0xd08230] MOV EDI,dword ptr [RAX] MOV ESI,dword ptr [R15 + 0x50] MOV EDX,0x10 CALL 0x0019fd41 MOV R14,RAX MOV RAX,qword ptr [R15 + 0x58] TEST RAX,RAX JZ 0x001a58eb MOV RDI,R14 CALL RAX LAB_001a58eb: XOR EAX,EAX XCHG qword ptr [RBX],RAX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
long lf_alloc_new(long *param_1) { long lVar1; int iVar2; long lVar3; bool bVar4; lVar1 = *(long *)(param_1[4] + 0x30); do { while( true ) { lVar3 = *(long *)(lVar1 + 0x48); LOCK(); *param_1 = lVar3; UNLOCK(); iVar2 = my_cpu_relax_multiplier; if (lVar3 == *(long *)(lVar1 + 0x48)) break; for (; iVar2 != 0; iVar2 = iVar2 + -1) { } } if (lVar3 == 0) { lVar3 = my_malloc(key_memory_lf_node,*(int4 *)(lVar1 + 0x50),0x10); if (*(code **)(lVar1 + 0x58) != (code *)0x0) { (**(code **)(lVar1 + 0x58))(lVar3); } break; } LOCK(); bVar4 = lVar3 == *(long *)(lVar1 + 0x48); if (bVar4) { *(long *)(lVar1 + 0x48) = *(long *)(lVar3 + (ulong)*(uint *)(lVar1 + 0x38)); } UNLOCK(); } while (!bVar4); LOCK(); *param_1 = 0; UNLOCK(); return lVar3; }
1,285
js_number_toPrecision
bluesky950520[P]quickjs/quickjs.c
static JSValue js_number_toPrecision(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue val; int p; double d; val = js_thisNumberValue(ctx, this_val); if (JS_IsException(val)) return val; if (JS_ToFloat64Free(ctx, &d, val)) return JS_EXCEPTION; if (JS_IsUndefined(argv[0])) return js_dtoa(ctx, d, 0, JS_DTOA_TOSTRING); if (JS_ToInt32Sat(ctx, &p, argv[0])) return JS_EXCEPTION; if (!isfinite(d)) return js_dtoa_infinite(ctx, d); if (p < 1 || p > 100) { return JS_ThrowRangeError(ctx, "toPrecision() argument must be between 1 and 100"); } return js_dtoa(ctx, d, p, JS_DTOA_PRECISION); }
O1
c
js_number_toPrecision: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r12 movq %rdi, %r14 callq 0x7a70b movq %rax, %r15 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x7a179 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r15, %rcx jmp 0x7a1e1 cmpl $0x2, %ebx ja 0x7a18b cvtsi2sd %r15d, %xmm0 movsd %xmm0, 0x8(%rsp) jmp 0x7a1b5 cmpl $0x7, %ebx jne 0x7a197 movq %r15, 0x8(%rsp) jmp 0x7a1b5 leaq 0x8(%rsp), %rsi movq %r14, %rdi movq %r15, %rdx movq %rbx, %rcx callq 0x3df2f testl %eax, %eax je 0x7a1b5 movl $0x6, %ebx jmp 0x7a211 movq 0x8(%r12), %rcx cmpl $0x3, %ecx jne 0x7a1e6 movq 0x8(%rsp), %xmm0 movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x27ce7 movq %rax, %r15 movq %rdx, %rbx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x7a216 movq (%r12), %rdx movq %rdx, 0x10(%rsp) cmpl $-0x9, %ecx jb 0x7a1fb movq 0x10(%rsp), %rax incl (%rax) leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x276c3 movl $0x6, %ebx testl %eax, %eax je 0x7a22b xorl %r15d, %r15d xorl %ecx, %ecx movl %r15d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0x7a257 movq %r14, %rdi callq 0x3e2a1 jmp 0x7a1d1 movl 0x10(%rsp), %esi leal -0x65(%rsi), %eax cmpl $-0x65, %eax ja 0x7a279 leaq 0x27d05(%rip), %rsi # 0xa1f6f xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x20add jmp 0x7a214 movq %r14, %rdi movl $0x3, %edx jmp 0x7a1cc
js_number_toPrecision: push r15 push r14 push r12 push rbx sub rsp, 18h mov r12, r8 mov r14, rdi call js_thisNumberValue mov r15, rax mov rbx, rdx cmp ebx, 6 jnz short loc_7A179 mov rax, 0FFFFFFFF00000000h mov rcx, r15 jmp short loc_7A1E1 loc_7A179: cmp ebx, 2 ja short loc_7A18B cvtsi2sd xmm0, r15d movsd [rsp+38h+var_30], xmm0 jmp short loc_7A1B5 loc_7A18B: cmp ebx, 7 jnz short loc_7A197 mov [rsp+38h+var_30], r15 jmp short loc_7A1B5 loc_7A197: lea rsi, [rsp+38h+var_30] mov rdi, r14 mov rdx, r15 mov rcx, rbx call __JS_ToFloat64Free test eax, eax jz short loc_7A1B5 mov ebx, 6 jmp short loc_7A211 loc_7A1B5: mov rcx, [r12+8] cmp ecx, 3 jnz short loc_7A1E6 movq xmm0, [rsp+38h+var_30] mov rdi, r14 xor esi, esi xor edx, edx loc_7A1CC: call js_dtoa loc_7A1D1: mov r15, rax mov rbx, rdx mov rcx, 0FFFFFFFF00000000h loc_7A1E1: and rcx, rax jmp short loc_7A216 loc_7A1E6: mov rdx, [r12] mov [rsp+38h+var_28], rdx cmp ecx, 0FFFFFFF7h jb short loc_7A1FB mov rax, [rsp+38h+var_28] inc dword ptr [rax] loc_7A1FB: lea rsi, [rsp+38h+var_28] mov rdi, r14 call JS_ToInt32SatFree mov ebx, 6 test eax, eax jz short loc_7A22B loc_7A211: xor r15d, r15d loc_7A214: xor ecx, ecx loc_7A216: mov eax, r15d or rax, rcx mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn loc_7A22B: movq xmm0, [rsp+38h+var_30] movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl short loc_7A257 mov rdi, r14 call js_dtoa_infinite jmp loc_7A1D1 loc_7A257: mov esi, dword ptr [rsp+38h+var_28] lea eax, [rsi-65h] cmp eax, 0FFFFFF9Bh ja short loc_7A279 lea rsi, aToprecisionArg; "toPrecision() argument must be between "... xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowRangeError jmp short loc_7A214 loc_7A279: mov rdi, r14 mov edx, 3 jmp loc_7A1CC
unsigned long long js_number_toPrecision( long long a1, double a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13) { long long v14; // rax long long v15; // rdx unsigned long long v16; // r15 long long v17; // rax unsigned long long v18; // rcx long long v19; // rcx __m128 v20; // xmm0 int v21; // esi int v22; // edx unsigned long long v23; // rcx long long v24; // rdx long long v25; // rdx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 char v31; // [rsp+0h] [rbp-38h] __m128i v32[3]; // [rsp+8h] [rbp-30h] BYREF v14 = js_thisNumberValue(); v16 = v14; if ( (_DWORD)v15 != 6 ) { if ( (unsigned int)v15 > 2 ) { if ( (_DWORD)v15 == 7 ) { v32[0].m128i_i64[0] = v14; } else if ( (unsigned int)_JS_ToFloat64Free(a1, v32[0].m128i_i64, v14, v15) ) { goto LABEL_16; } } else { *(double *)v32[0].m128i_i64 = (double)(int)v14; } v19 = a13[1]; if ( (_DWORD)v19 == 3 ) { v20 = (__m128)_mm_loadl_epi64(v32); v21 = 0; v22 = 0; LABEL_10: v17 = js_dtoa(a1, v21, v22, (__m128i)v20); LABEL_11: LODWORD(v16) = v17; v18 = 0xFFFFFFFF00000000LL; goto LABEL_12; } v24 = *a13; v32[0].m128i_i64[1] = *a13; if ( (unsigned int)v19 >= 0xFFFFFFF7 ) ++*(_DWORD *)v32[0].m128i_i64[1]; if ( !(unsigned int)JS_ToInt32SatFree(a1, &v32[0].m128i_i32[2], v24, v19) ) { v20 = (__m128)_mm_loadl_epi64(v32); if ( (v20.m128_u64[0] & 0x7FFFFFFFFFFFFFFFLL) >= 0x7FF0000000000000LL ) { v17 = js_dtoa_infinite(a1, *(double *)v20.m128_u64); goto LABEL_11; } v21 = v32[0].m128i_i32[2]; if ( (unsigned int)(v32[0].m128i_i32[2] - 101) > 0xFFFFFF9B ) { v22 = 3; goto LABEL_10; } LODWORD(v16) = 0; JS_ThrowRangeError( a1, (long long)"toPrecision() argument must be between 1 and 100", v25, 0x7FF0000000000000LL, v26, v27, v20, a3, a4, a5, v28, v29, a8, a9, v31); LABEL_17: v23 = 0LL; return v23 | (unsigned int)v16; } LABEL_16: LODWORD(v16) = 0; goto LABEL_17; } v17 = 0xFFFFFFFF00000000LL; v18 = v16; LABEL_12: v23 = v17 & v18; return v23 | (unsigned int)v16; }
js_number_toPrecision: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R8 MOV R14,RDI CALL 0x0017a70b MOV R15,RAX MOV RBX,RDX CMP EBX,0x6 JNZ 0x0017a179 MOV RAX,-0x100000000 MOV RCX,R15 JMP 0x0017a1e1 LAB_0017a179: CMP EBX,0x2 JA 0x0017a18b CVTSI2SD XMM0,R15D MOVSD qword ptr [RSP + 0x8],XMM0 JMP 0x0017a1b5 LAB_0017a18b: CMP EBX,0x7 JNZ 0x0017a197 MOV qword ptr [RSP + 0x8],R15 JMP 0x0017a1b5 LAB_0017a197: LEA RSI,[RSP + 0x8] MOV RDI,R14 MOV RDX,R15 MOV RCX,RBX CALL 0x0013df2f TEST EAX,EAX JZ 0x0017a1b5 MOV EBX,0x6 JMP 0x0017a211 LAB_0017a1b5: MOV RCX,qword ptr [R12 + 0x8] CMP ECX,0x3 JNZ 0x0017a1e6 MOVQ XMM0,qword ptr [RSP + 0x8] MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX LAB_0017a1cc: CALL 0x00127ce7 LAB_0017a1d1: MOV R15,RAX MOV RBX,RDX MOV RCX,-0x100000000 LAB_0017a1e1: AND RCX,RAX JMP 0x0017a216 LAB_0017a1e6: MOV RDX,qword ptr [R12] MOV qword ptr [RSP + 0x10],RDX CMP ECX,-0x9 JC 0x0017a1fb MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0017a1fb: LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x001276c3 MOV EBX,0x6 TEST EAX,EAX JZ 0x0017a22b LAB_0017a211: XOR R15D,R15D LAB_0017a214: XOR ECX,ECX LAB_0017a216: MOV EAX,R15D OR RAX,RCX MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET LAB_0017a22b: MOVQ XMM0,qword ptr [RSP + 0x8] MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x0017a257 MOV RDI,R14 CALL 0x0013e2a1 JMP 0x0017a1d1 LAB_0017a257: MOV ESI,dword ptr [RSP + 0x10] LEA EAX,[RSI + -0x65] CMP EAX,-0x65 JA 0x0017a279 LEA RSI,[0x1a1f6f] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x00120add JMP 0x0017a214 LAB_0017a279: MOV RDI,R14 MOV EDX,0x3 JMP 0x0017a1cc
int1 [16] js_number_toPrecision(int8 param_1) { int iVar1; double dVar2; ulong uVar3; int8 uVar4; uint uVar5; int8 *in_R8; double dVar6; int1 auVar7 [16]; int1 auVar8 [16]; double local_30; int *local_28; auVar7 = js_thisNumberValue(); dVar6 = auVar7._0_8_; uVar5 = auVar7._8_4_; if (uVar5 == 6) { dVar2 = -NAN; LAB_0017a1e1: uVar4 = auVar7._8_8_; uVar3 = auVar7._0_8_ & (ulong)dVar2; } else { if (uVar5 < 3) { dVar6 = (double)auVar7._0_4_; LAB_0017a1b5: local_30 = dVar6; if ((uint)in_R8[1] == 3) { uVar3 = 0; uVar4 = 0; LAB_0017a1cc: auVar7 = js_dtoa(local_30,param_1,uVar3,uVar4); LAB_0017a1d1: dVar2 = auVar7._0_8_; auVar7._8_8_ = auVar7._8_8_; auVar7._0_8_ = 0xffffffff00000000; dVar6 = dVar2; goto LAB_0017a1e1; } local_28 = (int *)*in_R8; if (0xfffffff6 < (uint)in_R8[1]) { *local_28 = *local_28 + 1; } iVar1 = JS_ToInt32SatFree(param_1,&local_28); if (iVar1 == 0) { if (0x7fefffffffffffff < (ulong)ABS(local_30)) { auVar7 = js_dtoa_infinite(param_1); goto LAB_0017a1d1; } uVar3 = (ulong)local_28 & 0xffffffff; if (0xffffff9b < (int)local_28 - 0x65U) { uVar4 = 3; goto LAB_0017a1cc; } JS_ThrowRangeError(param_1,"toPrecision() argument must be between 1 and 100"); } } else if ((uVar5 == 7) || (iVar1 = __JS_ToFloat64Free(param_1,&local_30,dVar6,auVar7._8_8_), dVar6 = local_30, iVar1 == 0)) goto LAB_0017a1b5; dVar6 = 0.0; uVar4 = 6; uVar3 = 0; } auVar8._0_8_ = (ulong)dVar6 & 0xffffffff | uVar3; auVar8._8_8_ = uVar4; return auVar8; }
1,286
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0xacffc movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xacfea cmpl $0x2, %eax jne 0xacff3 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xacfe4 leaq 0x30(%rbx), %rdi callq 0xad0b1 movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xacff7 movq %rbx, %rdi popq %rbx jmp 0xad172 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x3de50(%rip), %rdi # 0xeae53 leaq 0x382b1(%rip), %rdx # 0xe52bb leaq 0x430f5(%rip), %rcx # 0xf0106 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1ae80 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_ACFFC mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_ACFEA cmp eax, 2 jnz short loc_ACFF3 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_ACFE4 lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_ACFE4: add rbx, 30h ; '0' jmp short loc_ACFF7 loc_ACFEA: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void) loc_ACFF3: add rbx, 50h ; 'P' loc_ACFF7: mov rax, rbx pop rbx retn loc_ACFFC: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001acffc MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001acfea CMP EAX,0x2 JNZ 0x001acff3 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001acfe4 LEA RDI,[RBX + 0x30] CALL 0x001ad0b1 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001acfe4: ADD RBX,0x30 JMP 0x001acff7 LAB_001acfea: MOV RDI,RBX POP RBX JMP 0x001ad172 LAB_001acff3: ADD RBX,0x50 LAB_001acff7: MOV RAX,RBX POP RBX RET LAB_001acffc: LEA RDI,[0x1eae53] LEA RDX,[0x1e52bb] LEA RCX,[0x1f0106] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011ae80
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)this); return piVar2; }
1,287
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 0x2addb(%rip), %rdi # 0x125059 xorl %eax, %eax callq 0x200d0 cmpl $0x0, (%r14) jle 0xfa2fb movq 0x20(%r14), %r12 movl $0x3e, %r13d leaq 0x2b244(%rip), %r15 # 0x1254e0 xorl %ebp, %ebp movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0xfa2b7 leaq 0x2ae35(%rip), %rdi # 0x1250e3 movl %ebp, %esi xorl %eax, %eax callq 0x200d0 movslq 0x4(%r14), %rcx testq %rcx, %rcx jle 0xfa2d9 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 0xfa2c4 jmp 0xfa2db xorl %eax, %eax cmpl $0x3e, %eax cmovael %r13d, %eax movsbl (%rax,%r15), %edi callq 0x21320 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 cmpl (%r14), %ebp jl 0xfa29e leaq 0x2b1c1(%rip), %rdi # 0x1254c3 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x21120
_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_FA2FB mov r12, [r14+20h] mov r13d, 3Eh ; '>' lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_FA29E: mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_FA2B7 lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_FA2B7: movsxd rcx, dword ptr [r14+4] test rcx, rcx jle short loc_FA2D9 xor edx, edx xor eax, eax loc_FA2C4: mov esi, [r12+rdx*4] not esi shr esi, 1Fh add eax, esi inc rdx cmp rcx, rdx jnz short loc_FA2C4 jmp short loc_FA2DB loc_FA2D9: xor eax, eax loc_FA2DB: 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_FA29E loc_FA2FB: 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,[0x225059] XOR EAX,EAX CALL 0x001200d0 CMP dword ptr [R14],0x0 JLE 0x001fa2fb MOV R12,qword ptr [R14 + 0x20] MOV R13D,0x3e LEA R15,[0x2254e0] XOR EBP,EBP LAB_001fa29e: MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x001fa2b7 LEA RDI,[0x2250e3] MOV ESI,EBP XOR EAX,EAX CALL 0x001200d0 LAB_001fa2b7: MOVSXD RCX,dword ptr [R14 + 0x4] TEST RCX,RCX JLE 0x001fa2d9 XOR EDX,EDX XOR EAX,EAX LAB_001fa2c4: MOV ESI,dword ptr [R12 + RDX*0x4] NOT ESI SHR ESI,0x1f ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x001fa2c4 JMP 0x001fa2db LAB_001fa2d9: XOR EAX,EAX LAB_001fa2db: CMP EAX,0x3e CMOVNC EAX,R13D MOVSX EDI,byte ptr [RAX + R15*0x1] CALL 0x00121320 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x001fa29e LAB_001fa2fb: LEA RDI,[0x2254c3] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00121120
/* 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; }
1,288
r3d_shader_load_screen_ambient_ibl
r3d/src/r3d_state.c
void r3d_shader_load_screen_ambient_ibl(void) { const char* defines[] = { "#define IBL" }; char* fsCode = r3d_shader_inject_defines(FS_SCREEN_AMBIENT, defines, 1); R3D.shader.screen.ambientIbl.id = rlLoadShaderCode(VS_COMMON_SCREEN, fsCode); RL_FREE(fsCode); r3d_shader_screen_ambient_ibl_t* shader = &R3D.shader.screen.ambientIbl; r3d_shader_get_location(screen.ambientIbl, uTexAlbedo); r3d_shader_get_location(screen.ambientIbl, uTexNormal); r3d_shader_get_location(screen.ambientIbl, uTexDepth); r3d_shader_get_location(screen.ambientIbl, uTexSSAO); r3d_shader_get_location(screen.ambientIbl, uTexORM); r3d_shader_get_location(screen.ambientIbl, uCubeIrradiance); r3d_shader_get_location(screen.ambientIbl, uCubePrefilter); r3d_shader_get_location(screen.ambientIbl, uTexBrdfLut); r3d_shader_get_location(screen.ambientIbl, uQuatSkybox); r3d_shader_get_location(screen.ambientIbl, uViewPosition); r3d_shader_get_location(screen.ambientIbl, uMatInvProj); r3d_shader_get_location(screen.ambientIbl, uMatInvView); r3d_shader_enable(screen.ambientIbl); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexAlbedo, 0); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexNormal, 1); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexDepth, 2); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexSSAO, 3); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexORM, 4); r3d_shader_set_samplerCube_slot(screen.ambientIbl, uCubeIrradiance, 5); r3d_shader_set_samplerCube_slot(screen.ambientIbl, uCubePrefilter, 6); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexBrdfLut, 7); r3d_shader_disable(); }
O0
c
r3d_shader_load_screen_ambient_ibl: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq 0xb4b59(%rip), %rax # 0x218d88 movq %rax, -0x8(%rbp) leaq -0x8(%rbp), %rsi leaq 0x54c52(%rip), %rdi # 0x1b8e90 movl $0x1, %edx callq 0x1656b0 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rsi leaq 0x4ee89(%rip), %rdi # 0x1b30e0 callq 0x1a180 movl %eax, 0xe7fc6(%rip) # 0x24c228 movq -0x10(%rbp), %rdi callq 0x8490 leaq 0xe6dce(%rip), %rax # 0x24b040 addq $0x198, %rax # imm = 0x198 addq $0xff0, %rax # imm = 0xFF0 addq $0x60, %rax movq %rax, -0x18(%rbp) movl 0xe7f9c(%rip), %edi # 0x24c228 leaq 0x48bfd(%rip), %rsi # 0x1ace90 callq 0x1a6f0 movl %eax, 0xe7f92(%rip) # 0x24c230 movl 0xe7f84(%rip), %edi # 0x24c228 leaq 0x48bf0(%rip), %rsi # 0x1ace9b callq 0x1a6f0 movl %eax, 0xe7f82(%rip) # 0x24c238 movl 0xe7f6c(%rip), %edi # 0x24c228 leaq 0x48ed5(%rip), %rsi # 0x1ad198 callq 0x1a6f0 movl %eax, 0xe7f72(%rip) # 0x24c240 movl 0xe7f54(%rip), %edi # 0x24c228 leaq 0x48f0a(%rip), %rsi # 0x1ad1e5 callq 0x1a6f0 movl %eax, 0xe7f62(%rip) # 0x24c248 movl 0xe7f3c(%rip), %edi # 0x24c228 leaq 0x48efb(%rip), %rsi # 0x1ad1ee callq 0x1a6f0 movl %eax, 0xe7f52(%rip) # 0x24c250 movl 0xe7f24(%rip), %edi # 0x24c228 leaq 0x48c59(%rip), %rsi # 0x1acf64 callq 0x1a6f0 movl %eax, 0xe7f42(%rip) # 0x24c258 movl 0xe7f0c(%rip), %edi # 0x24c228 leaq 0x48c51(%rip), %rsi # 0x1acf74 callq 0x1a6f0 movl %eax, 0xe7f32(%rip) # 0x24c260 movl 0xe7ef4(%rip), %edi # 0x24c228 leaq 0x48c48(%rip), %rsi # 0x1acf83 callq 0x1a6f0 movl %eax, 0xe7f22(%rip) # 0x24c268 movl 0xe7edc(%rip), %edi # 0x24c228 leaq 0x48c3c(%rip), %rsi # 0x1acf8f callq 0x1a6f0 movl %eax, 0xe7f1e(%rip) # 0x24c27c movl 0xe7ec4(%rip), %edi # 0x24c228 leaq 0x48c65(%rip), %rsi # 0x1acfd0 callq 0x1a6f0 movl %eax, 0xe7f16(%rip) # 0x24c28c movl 0xe7eac(%rip), %edi # 0x24c228 leaq 0x48e2a(%rip), %rsi # 0x1ad1ad callq 0x1a6f0 movl %eax, 0xe7f02(%rip) # 0x24c290 movl 0xe7e94(%rip), %edi # 0x24c228 leaq 0x48b91(%rip), %rsi # 0x1acf2c callq 0x1a6f0 movl %eax, 0xe7eee(%rip) # 0x24c294 movl 0xe7e7c(%rip), %edi # 0x24c228 callq 0x15b80 cmpl $0x0, 0xe7e74(%rip) # 0x24c22c je 0x1643f6 movl $0x0, 0xe7e68(%rip) # 0x24c22c movl 0xe7e66(%rip), %edi # 0x24c230 leaq 0xe6c6f(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x4, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x1, 0xe7e37(%rip) # 0x24c234 je 0x16443b movl $0x1, 0xe7e2b(%rip) # 0x24c234 movl 0xe7e29(%rip), %edi # 0x24c238 leaq 0xe6c2a(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0xc, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x2, 0xe7dfa(%rip) # 0x24c23c je 0x164480 movl $0x2, 0xe7dee(%rip) # 0x24c23c movl 0xe7dec(%rip), %edi # 0x24c240 leaq 0xe6be5(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x14, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x3, 0xe7dbd(%rip) # 0x24c244 je 0x1644c5 movl $0x3, 0xe7db1(%rip) # 0x24c244 movl 0xe7daf(%rip), %edi # 0x24c248 leaq 0xe6ba0(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x1c, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x4, 0xe7d80(%rip) # 0x24c24c je 0x16450a movl $0x4, 0xe7d74(%rip) # 0x24c24c movl 0xe7d72(%rip), %edi # 0x24c250 leaq 0xe6b5b(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x24, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x5, 0xe7d43(%rip) # 0x24c254 je 0x16454f movl $0x5, 0xe7d37(%rip) # 0x24c254 movl 0xe7d35(%rip), %edi # 0x24c258 leaq 0xe6b16(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x2c, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x6, 0xe7d06(%rip) # 0x24c25c je 0x164594 movl $0x6, 0xe7cfa(%rip) # 0x24c25c movl 0xe7cf8(%rip), %edi # 0x24c260 leaq 0xe6ad1(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x34, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 cmpl $0x7, 0xe7cc9(%rip) # 0x24c264 je 0x1645d9 movl $0x7, 0xe7cbd(%rip) # 0x24c264 movl 0xe7cbb(%rip), %edi # 0x24c268 leaq 0xe6a8c(%rip), %rsi # 0x24b040 addq $0x198, %rsi # imm = 0x198 addq $0xff0, %rsi # imm = 0xFF0 addq $0x60, %rsi addq $0x3c, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x1a770 callq 0x15ba0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
r3d_shader_load_screen_ambient_ibl: push rbp mov rbp, rsp sub rsp, 20h mov rax, cs:off_218D88; "#define IBL" mov [rbp+var_8], rax lea rsi, [rbp+var_8] lea rdi, FS_SCREEN_AMBIENT; "#version 330 core\n#ifdef IBL\n#define "... mov edx, 1 call r3d_shader_inject_defines mov [rbp+var_10], rax mov rsi, [rbp+var_10] lea rdi, VS_COMMON_SCREEN; "#version 330 core\nconst vec2 a[3]=vec2"... call rlLoadShaderCode mov cs:dword_24C228, eax mov rdi, [rbp+var_10] call _free lea rax, R3D add rax, 198h add rax, 0FF0h add rax, 60h ; '`' mov [rbp+var_18], rax mov edi, cs:dword_24C228 lea rsi, aUtexalbedo; "uTexAlbedo" call rlGetLocationUniform mov cs:dword_24C230, eax mov edi, cs:dword_24C228 lea rsi, aUtexnormal; "uTexNormal" call rlGetLocationUniform mov cs:dword_24C238, eax mov edi, cs:dword_24C228 lea rsi, aUtexdepth; "uTexDepth" call rlGetLocationUniform mov cs:dword_24C240, eax mov edi, cs:dword_24C228 lea rsi, aUtexssao; "uTexSSAO" call rlGetLocationUniform mov cs:dword_24C248, eax mov edi, cs:dword_24C228 lea rsi, aUtexorm; "uTexORM" call rlGetLocationUniform mov cs:dword_24C250, eax mov edi, cs:dword_24C228 lea rsi, aUcubeirradianc; "uCubeIrradiance" call rlGetLocationUniform mov cs:dword_24C258, eax mov edi, cs:dword_24C228 lea rsi, aUcubeprefilter; "uCubePrefilter" call rlGetLocationUniform mov cs:dword_24C260, eax mov edi, cs:dword_24C228 lea rsi, aUtexbrdflut; "uTexBrdfLut" call rlGetLocationUniform mov cs:dword_24C268, eax mov edi, cs:dword_24C228 lea rsi, aUquatskybox; "uQuatSkybox" call rlGetLocationUniform mov cs:dword_24C27C, eax mov edi, cs:dword_24C228 lea rsi, aUviewposition; "uViewPosition" call rlGetLocationUniform mov cs:dword_24C28C, eax mov edi, cs:dword_24C228 lea rsi, aUmatinvproj; "uMatInvProj" call rlGetLocationUniform mov cs:dword_24C290, eax mov edi, cs:dword_24C228 lea rsi, aUmatinvview; "uMatInvView" call rlGetLocationUniform mov cs:dword_24C294, eax mov edi, cs:dword_24C228 call rlEnableShader cmp cs:dword_24C22C, 0 jz short loc_1643F6 mov cs:dword_24C22C, 0 mov edi, cs:dword_24C230 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 4 mov edx, 4 mov ecx, 1 call rlSetUniform loc_1643F6: cmp cs:dword_24C234, 1 jz short loc_16443B mov cs:dword_24C234, 1 mov edi, cs:dword_24C238 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 0Ch mov edx, 4 mov ecx, 1 call rlSetUniform loc_16443B: cmp cs:dword_24C23C, 2 jz short loc_164480 mov cs:dword_24C23C, 2 mov edi, cs:dword_24C240 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 14h mov edx, 4 mov ecx, 1 call rlSetUniform loc_164480: cmp cs:dword_24C244, 3 jz short loc_1644C5 mov cs:dword_24C244, 3 mov edi, cs:dword_24C248 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 1Ch mov edx, 4 mov ecx, 1 call rlSetUniform loc_1644C5: cmp cs:dword_24C24C, 4 jz short loc_16450A mov cs:dword_24C24C, 4 mov edi, cs:dword_24C250 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 24h ; '$' mov edx, 4 mov ecx, 1 call rlSetUniform loc_16450A: cmp cs:dword_24C254, 5 jz short loc_16454F mov cs:dword_24C254, 5 mov edi, cs:dword_24C258 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 2Ch ; ',' mov edx, 4 mov ecx, 1 call rlSetUniform loc_16454F: cmp cs:dword_24C25C, 6 jz short loc_164594 mov cs:dword_24C25C, 6 mov edi, cs:dword_24C260 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 34h ; '4' mov edx, 4 mov ecx, 1 call rlSetUniform loc_164594: cmp cs:dword_24C264, 7 jz short loc_1645D9 mov cs:dword_24C264, 7 mov edi, cs:dword_24C268 lea rsi, R3D add rsi, 198h add rsi, 0FF0h add rsi, 60h ; '`' add rsi, 3Ch ; '<' mov edx, 4 mov ecx, 1 call rlSetUniform loc_1645D9: call rlDisableShader add rsp, 20h pop rbp retn
long long r3d_shader_load_screen_ambient_ibl() { int v0; // r8d int v1; // r9d long long v3; // [rsp+10h] [rbp-10h] const char *v4; // [rsp+18h] [rbp-8h] BYREF v4 = "#define IBL"; v3 = r3d_shader_inject_defines( "#version 330 core\n" "#ifdef IBL\n" "#define PI 3.1415926535897932384626433832795028\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTe" "xDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform sampler" "Cube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform m" "at4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float Schlic" "kFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16" "*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0," "1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;" "vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);" "q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);re" "turn ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTe" "xCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);flo" "at g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,v" "TexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*S" "chlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradianc" "e,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textur" "eLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F" "0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n" "#else\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout" "(location=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r*=texture(uTexSSAO,vTexCoord).r;a=uColor*r;}\n#endif", &v4, 1LL); dword_24C228 = rlLoadShaderCode( (long long)"#version 330 core\n" "const vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2" " vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}", v3); free(v3); dword_24C230 = rlGetLocationUniform(dword_24C228, (long long)"uTexAlbedo"); dword_24C238 = rlGetLocationUniform(dword_24C228, (long long)"uTexNormal"); dword_24C240 = rlGetLocationUniform(dword_24C228, (long long)"uTexDepth"); dword_24C248 = rlGetLocationUniform(dword_24C228, (long long)"uTexSSAO"); dword_24C250 = rlGetLocationUniform(dword_24C228, (long long)"uTexORM"); dword_24C258 = rlGetLocationUniform(dword_24C228, (long long)"uCubeIrradiance"); dword_24C260 = rlGetLocationUniform(dword_24C228, (long long)"uCubePrefilter"); dword_24C268 = rlGetLocationUniform(dword_24C228, (long long)"uTexBrdfLut"); dword_24C27C = rlGetLocationUniform(dword_24C228, (long long)"uQuatSkybox"); dword_24C28C = rlGetLocationUniform(dword_24C228, (long long)"uViewPosition"); dword_24C290 = rlGetLocationUniform(dword_24C228, (long long)"uMatInvProj"); dword_24C294 = rlGetLocationUniform(dword_24C228, (long long)"uMatInvView"); rlEnableShader(dword_24C228); if ( dword_24C22C ) { dword_24C22C = 0; rlSetUniform(dword_24C230, (long long)&R3D[4588], 4, 1u, v0, v1); } if ( dword_24C234 != 1 ) { dword_24C234 = 1; rlSetUniform(dword_24C238, (long long)&R3D[4596], 4, 1u, v0, v1); } if ( dword_24C23C != 2 ) { dword_24C23C = 2; rlSetUniform(dword_24C240, (long long)&R3D[4604], 4, 1u, v0, v1); } if ( dword_24C244 != 3 ) { dword_24C244 = 3; rlSetUniform(dword_24C248, (long long)&R3D[4612], 4, 1u, v0, v1); } if ( dword_24C24C != 4 ) { dword_24C24C = 4; rlSetUniform(dword_24C250, (long long)&R3D[4620], 4, 1u, v0, v1); } if ( dword_24C254 != 5 ) { dword_24C254 = 5; rlSetUniform(dword_24C258, (long long)&R3D[4628], 4, 1u, v0, v1); } if ( dword_24C25C != 6 ) { dword_24C25C = 6; rlSetUniform(dword_24C260, (long long)&R3D[4636], 4, 1u, v0, v1); } if ( dword_24C264 != 7 ) { dword_24C264 = 7; rlSetUniform(dword_24C268, (long long)&R3D[4644], 4, 1u, v0, v1); } return rlDisableShader(); }
1,289
r3d_shader_load_screen_ambient_ibl
r3d/src/r3d_state.c
void r3d_shader_load_screen_ambient_ibl(void) { const char* defines[] = { "#define IBL" }; char* fsCode = r3d_shader_inject_defines(FS_SCREEN_AMBIENT, defines, 1); R3D.shader.screen.ambientIbl.id = rlLoadShaderCode(VS_COMMON_SCREEN, fsCode); RL_FREE(fsCode); r3d_shader_screen_ambient_ibl_t* shader = &R3D.shader.screen.ambientIbl; r3d_shader_get_location(screen.ambientIbl, uTexAlbedo); r3d_shader_get_location(screen.ambientIbl, uTexNormal); r3d_shader_get_location(screen.ambientIbl, uTexDepth); r3d_shader_get_location(screen.ambientIbl, uTexSSAO); r3d_shader_get_location(screen.ambientIbl, uTexORM); r3d_shader_get_location(screen.ambientIbl, uCubeIrradiance); r3d_shader_get_location(screen.ambientIbl, uCubePrefilter); r3d_shader_get_location(screen.ambientIbl, uTexBrdfLut); r3d_shader_get_location(screen.ambientIbl, uQuatSkybox); r3d_shader_get_location(screen.ambientIbl, uViewPosition); r3d_shader_get_location(screen.ambientIbl, uMatInvProj); r3d_shader_get_location(screen.ambientIbl, uMatInvView); r3d_shader_enable(screen.ambientIbl); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexAlbedo, 0); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexNormal, 1); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexDepth, 2); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexSSAO, 3); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexORM, 4); r3d_shader_set_samplerCube_slot(screen.ambientIbl, uCubeIrradiance, 5); r3d_shader_set_samplerCube_slot(screen.ambientIbl, uCubePrefilter, 6); r3d_shader_set_sampler2D_slot(screen.ambientIbl, uTexBrdfLut, 7); r3d_shader_disable(); }
O3
c
r3d_shader_load_screen_ambient_ibl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx leaq 0x5c556(%rip), %rdi # 0x120c10 callq 0x8180 leaq 0xd(%rax), %rdi callq 0x84d0 movq %rax, %rbx testq %rax, %rax je 0xc476f leaq 0x5c535(%rip), %r14 # 0x120c10 leaq 0x4ef79(%rip), %rsi # 0x11365b movq %r14, %rdi callq 0x80c0 testq %rax, %rax je 0xc4a3c movq %rax, %r12 movq %rax, %rdi movl $0xa, %esi callq 0x8140 movq %rax, %r15 testq %rax, %rax jne 0xc4719 movq %r12, %rdi callq 0x8180 addq %rax, %r12 movq %r12, %r15 movq %r15, %r12 subq %r14, %r12 leaq 0x1(%r12), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x81d0 movb $0x0, 0x1(%rbx,%r12) movq %rbx, %rdi callq 0x8180 movabsq $0x20656e6966656423, %rcx # imm = 0x20656E6966656423 movq %rcx, (%rbx,%rax) movl $0x4c4249, 0x8(%rbx,%rax) # imm = 0x4C4249 movq %rbx, %rdi callq 0x8180 movw $0xa, (%rbx,%rax) incq %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x8710 leaq 0x566ea(%rip), %rdi # 0x11ae60 movq %rbx, %rsi callq 0x1ed91 movl %eax, %r14d movl %eax, 0xee621(%rip) # 0x1b2da8 movq %rbx, %rdi callq 0x8480 leaq 0x4e958(%rip), %rsi # 0x1130ee movl %r14d, %edi callq 0x1f1ea movl %eax, 0xee60c(%rip) # 0x1b2db0 movl 0xee5fe(%rip), %edi # 0x1b2da8 leaq 0x4e948(%rip), %rsi # 0x1130f9 callq 0x1f1ea movl %eax, 0xee5fc(%rip) # 0x1b2db8 movl 0xee5e6(%rip), %edi # 0x1b2da8 leaq 0x4ec2d(%rip), %rsi # 0x1133f6 callq 0x1f1ea movl %eax, 0xee5ec(%rip) # 0x1b2dc0 movl 0xee5ce(%rip), %edi # 0x1b2da8 leaq 0x4ec62(%rip), %rsi # 0x113443 callq 0x1f1ea movl %eax, 0xee5dc(%rip) # 0x1b2dc8 movl 0xee5b6(%rip), %edi # 0x1b2da8 leaq 0x4ec53(%rip), %rsi # 0x11344c callq 0x1f1ea movl %eax, 0xee5cc(%rip) # 0x1b2dd0 movl 0xee59e(%rip), %edi # 0x1b2da8 leaq 0x4e9b1(%rip), %rsi # 0x1131c2 callq 0x1f1ea movl %eax, 0xee5bc(%rip) # 0x1b2dd8 movl 0xee586(%rip), %edi # 0x1b2da8 leaq 0x4e9a9(%rip), %rsi # 0x1131d2 callq 0x1f1ea movl %eax, 0xee5ac(%rip) # 0x1b2de0 movl 0xee56e(%rip), %edi # 0x1b2da8 leaq 0x4e9a0(%rip), %rsi # 0x1131e1 callq 0x1f1ea movl %eax, 0xee59c(%rip) # 0x1b2de8 movl 0xee556(%rip), %edi # 0x1b2da8 leaq 0x4e994(%rip), %rsi # 0x1131ed callq 0x1f1ea movl %eax, 0xee598(%rip) # 0x1b2dfc movl 0xee53e(%rip), %edi # 0x1b2da8 leaq 0x4e9bd(%rip), %rsi # 0x11322e callq 0x1f1ea movl %eax, 0xee590(%rip) # 0x1b2e0c movl 0xee526(%rip), %edi # 0x1b2da8 leaq 0x4eb82(%rip), %rsi # 0x11340b callq 0x1f1ea movl %eax, 0xee57c(%rip) # 0x1b2e10 movl 0xee50e(%rip), %edi # 0x1b2da8 leaq 0x4e8e9(%rip), %rsi # 0x11318a callq 0x1f1ea movl %eax, 0xee568(%rip) # 0x1b2e14 movl 0xee4f6(%rip), %edi # 0x1b2da8 callq 0x1c616 cmpl $0x0, 0xee4ee(%rip) # 0x1b2dac je 0xc48e6 movl $0x0, 0xee4e2(%rip) # 0x1b2dac leaq 0xee4db(%rip), %rsi # 0x1b2dac movl 0xee4d9(%rip), %edi # 0x1b2db0 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x1, 0xee4c7(%rip) # 0x1b2db4 je 0xc4915 movl $0x1, 0xee4bb(%rip) # 0x1b2db4 leaq 0xee4b4(%rip), %rsi # 0x1b2db4 movl 0xee4b2(%rip), %edi # 0x1b2db8 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x2, 0xee4a0(%rip) # 0x1b2dbc je 0xc4944 movl $0x2, 0xee494(%rip) # 0x1b2dbc leaq 0xee48d(%rip), %rsi # 0x1b2dbc movl 0xee48b(%rip), %edi # 0x1b2dc0 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x3, 0xee479(%rip) # 0x1b2dc4 je 0xc4973 movl $0x3, 0xee46d(%rip) # 0x1b2dc4 leaq 0xee466(%rip), %rsi # 0x1b2dc4 movl 0xee464(%rip), %edi # 0x1b2dc8 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x4, 0xee452(%rip) # 0x1b2dcc je 0xc49a2 movl $0x4, 0xee446(%rip) # 0x1b2dcc leaq 0xee43f(%rip), %rsi # 0x1b2dcc movl 0xee43d(%rip), %edi # 0x1b2dd0 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x5, 0xee42b(%rip) # 0x1b2dd4 je 0xc49d1 movl $0x5, 0xee41f(%rip) # 0x1b2dd4 leaq 0xee418(%rip), %rsi # 0x1b2dd4 movl 0xee416(%rip), %edi # 0x1b2dd8 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x6, 0xee404(%rip) # 0x1b2ddc je 0xc4a00 movl $0x6, 0xee3f8(%rip) # 0x1b2ddc leaq 0xee3f1(%rip), %rsi # 0x1b2ddc movl 0xee3ef(%rip), %edi # 0x1b2de0 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x7, 0xee3dd(%rip) # 0x1b2de4 je 0xc4a2f movl $0x7, 0xee3d1(%rip) # 0x1b2de4 leaq 0xee3ca(%rip), %rsi # 0x1b2de4 movl 0xee3c8(%rip), %edi # 0x1b2de8 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x1c621 callq 0xbaca
r3d_shader_load_screen_ambient_ibl: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx lea rdi, FS_SCREEN_AMBIENT; "#version 330 core\n#ifdef IBL\n#define "... call _strlen lea rdi, [rax+0Dh] call _malloc mov rbx, rax test rax, rax jz loc_C476F lea r14, FS_SCREEN_AMBIENT; "#version 330 core\n#ifdef IBL\n#define "... lea rsi, aVersion; "#version" mov rdi, r14 call _strstr test rax, rax jz loc_C4A3C mov r12, rax mov rdi, rax mov esi, 0Ah call _strchr mov r15, rax test rax, rax jnz short loc_C4719 mov rdi, r12 call _strlen add r12, rax mov r15, r12 loc_C4719: mov r12, r15 sub r12, r14 lea rdx, [r12+1] mov rdi, rbx mov rsi, r14 call _strncpy mov byte ptr [rbx+r12+1], 0 mov rdi, rbx call _strlen mov rcx, 20656E6966656423h mov [rbx+rax], rcx mov dword ptr [rbx+rax+8], 4C4249h mov rdi, rbx call _strlen mov word ptr [rbx+rax], 0Ah inc r15 mov rdi, rbx mov rsi, r15 call _strcat loc_C476F: lea rdi, VS_COMMON_SCREEN; "#version 330 core\nconst vec2 a[3]=vec2"... mov rsi, rbx call rlLoadShaderCode mov r14d, eax mov cs:dword_1B2DA8, eax mov rdi, rbx call _free lea rsi, aUtexalbedo; "uTexAlbedo" mov edi, r14d call rlGetLocationUniform mov cs:dword_1B2DB0, eax mov edi, cs:dword_1B2DA8 lea rsi, aUtexnormal; "uTexNormal" call rlGetLocationUniform mov cs:dword_1B2DB8, eax mov edi, cs:dword_1B2DA8 lea rsi, aUtexdepth; "uTexDepth" call rlGetLocationUniform mov cs:dword_1B2DC0, eax mov edi, cs:dword_1B2DA8 lea rsi, aUtexssao; "uTexSSAO" call rlGetLocationUniform mov cs:dword_1B2DC8, eax mov edi, cs:dword_1B2DA8 lea rsi, aUtexorm; "uTexORM" call rlGetLocationUniform mov cs:dword_1B2DD0, eax mov edi, cs:dword_1B2DA8 lea rsi, aUcubeirradianc; "uCubeIrradiance" call rlGetLocationUniform mov cs:dword_1B2DD8, eax mov edi, cs:dword_1B2DA8 lea rsi, aUcubeprefilter; "uCubePrefilter" call rlGetLocationUniform mov cs:dword_1B2DE0, eax mov edi, cs:dword_1B2DA8 lea rsi, aUtexbrdflut; "uTexBrdfLut" call rlGetLocationUniform mov cs:dword_1B2DE8, eax mov edi, cs:dword_1B2DA8 lea rsi, aUquatskybox; "uQuatSkybox" call rlGetLocationUniform mov cs:dword_1B2DFC, eax mov edi, cs:dword_1B2DA8 lea rsi, aUviewposition; "uViewPosition" call rlGetLocationUniform mov cs:dword_1B2E0C, eax mov edi, cs:dword_1B2DA8 lea rsi, aUmatinvproj; "uMatInvProj" call rlGetLocationUniform mov cs:dword_1B2E10, eax mov edi, cs:dword_1B2DA8 lea rsi, aUmatinvview; "uMatInvView" call rlGetLocationUniform mov cs:dword_1B2E14, eax mov edi, cs:dword_1B2DA8 call rlEnableShader cmp cs:dword_1B2DAC, 0 jz short loc_C48E6 mov cs:dword_1B2DAC, 0 lea rsi, dword_1B2DAC mov edi, cs:dword_1B2DB0 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C48E6: cmp cs:dword_1B2DB4, 1 jz short loc_C4915 mov cs:dword_1B2DB4, 1 lea rsi, dword_1B2DB4 mov edi, cs:dword_1B2DB8 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C4915: cmp cs:dword_1B2DBC, 2 jz short loc_C4944 mov cs:dword_1B2DBC, 2 lea rsi, dword_1B2DBC mov edi, cs:dword_1B2DC0 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C4944: cmp cs:dword_1B2DC4, 3 jz short loc_C4973 mov cs:dword_1B2DC4, 3 lea rsi, dword_1B2DC4 mov edi, cs:dword_1B2DC8 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C4973: cmp cs:dword_1B2DCC, 4 jz short loc_C49A2 mov cs:dword_1B2DCC, 4 lea rsi, dword_1B2DCC mov edi, cs:dword_1B2DD0 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C49A2: cmp cs:dword_1B2DD4, 5 jz short loc_C49D1 mov cs:dword_1B2DD4, 5 lea rsi, dword_1B2DD4 mov edi, cs:dword_1B2DD8 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C49D1: cmp cs:dword_1B2DDC, 6 jz short loc_C4A00 mov cs:dword_1B2DDC, 6 lea rsi, dword_1B2DDC mov edi, cs:dword_1B2DE0 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C4A00: cmp cs:dword_1B2DE4, 7 jz short loc_C4A2F mov cs:dword_1B2DE4, 7 lea rsi, dword_1B2DE4 mov edi, cs:dword_1B2DE8 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C4A2F: pop rbx pop r12 pop r14 pop r15 pop rbp jmp rlDisableShader loc_C4A3C: call r3d_shader_load_screen_ambient_ibl_cold_1
long long r3d_shader_load_screen_ambient_ibl() { long long v0; // rax long long v1; // rbx long long v2; // rax long long v3; // r12 long long v4; // r15 unsigned int ShaderCode; // r14d int v6; // r8d int v7; // r9d v0 = strlen( "#version 330 core\n" "#ifdef IBL\n" "#define PI 3.1415926535897932384626433832795028\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTe" "xDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform sampler" "Cube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform m" "at4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float Schlic" "kFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16" "*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0," "1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;" "vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);" "q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);re" "turn ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTe" "xCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);flo" "at g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,v" "TexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*S" "chlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradianc" "e,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textur" "eLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F" "0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n" "#else\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout" "(location=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r*=texture(uTexSSAO,vTexCoord).r;a=uColor*r;}\n#endif"); v1 = malloc(v0 + 13); if ( v1 ) { v2 = strstr( "#version 330 core\n" "#ifdef IBL\n" "#define PI 3.1415926535897932384626433832795028\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D u" "TexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform sam" "plerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uni" "form mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;floa" "t SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){fl" "oat h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1." "0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec" "2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0" ".0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*" "cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s" "=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=" "ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahed" "ral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1" "e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox)" ";a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_RE" "FLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);" "vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}" "\n" "#else\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layo" "ut(location=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r*=texture(uTexSSAO,vTexCoord).r;a=" "uColor*r;}\n" "#endif", "#version"); if ( !v2 ) r3d_shader_load_screen_ambient_ibl_cold_1(); v3 = v2; v4 = strchr(v2, 10LL); if ( !v4 ) v4 = strlen(v3) + v3; strncpy( v1, "#version 330 core\n" "#ifdef IBL\n" "#define PI 3.1415926535897932384626433832795028\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexDe" "pth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform samplerCube u" "CubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatI" "nvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(flo" "at ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix" "(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatI" "nvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-" "abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}" "return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz," "aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float " "w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord)" ".r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uView" "Position-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*" "(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflec" "t(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).r" "gb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w))." "rg;vec3 z=u*(F*f.x+f.y);b=z;}\n" "#else\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout(lo" "cation=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r*=texture(uTexSSAO,vTexCoord).r;a=uColor*r;}\n#endif", v4 - (_QWORD)"#version 330 core\n" "#ifdef IBL\n" "#define PI 3.1415926535897932384626433832795028\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2" "D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;unifo" "rm samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPos" "ition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out" " vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,flo" "at y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec" "4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeO" "ctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >" "=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(v" "ec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uT" "exAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=textu" "re(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPosit" "ionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t" ");float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1" ".0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(" "reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REF" "LECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBr" "dfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n" "#else\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;l" "ayout(location=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r*=texture(uTexSSAO,vTexCoord" ").r;a=uColor*r;}\n" "#endif" + 1); *(_BYTE *)(v1 + v4 - (_QWORD)"#version 330 core\n" "#ifdef IBL\n" "#define PI 3.1415926535897932384626433832795028\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform" " sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCu" "beIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatS" "kybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(locatio" "n=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m" "=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,v" "ec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=" "uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0" ";vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0." "0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){v" "ec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbed" "o,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=tex" "ture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3" " t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=norma" "lize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresne" "l(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradia" "nce,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7" ".0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);ve" "c3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+" "f.y);b=z;}\n" "#else\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4" " uColor;layout(location=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r*=texture(" "uTexSSAO,vTexCoord).r;a=uColor*r;}\n" "#endif" + 1) = 0; strcpy((char *)(v1 + strlen(v1)), "#define IBL"); *(_WORD *)(v1 + strlen(v1)) = 10; strcat(v1, v4 + 1); } ShaderCode = rlLoadShaderCode( (long long)"#version 330 core\n" "const vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 v" "TexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}", v1); dword_1B2DA8 = ShaderCode; free(v1); dword_1B2DB0 = rlGetLocationUniform(ShaderCode, (long long)"uTexAlbedo"); dword_1B2DB8 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uTexNormal"); dword_1B2DC0 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uTexDepth"); dword_1B2DC8 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uTexSSAO"); dword_1B2DD0 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uTexORM"); dword_1B2DD8 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uCubeIrradiance"); dword_1B2DE0 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uCubePrefilter"); dword_1B2DE8 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uTexBrdfLut"); dword_1B2DFC = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uQuatSkybox"); dword_1B2E0C = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uViewPosition"); dword_1B2E10 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uMatInvProj"); dword_1B2E14 = rlGetLocationUniform((unsigned int)dword_1B2DA8, (long long)"uMatInvView"); rlEnableShader((unsigned int)dword_1B2DA8); if ( dword_1B2DAC ) { dword_1B2DAC = 0; rlSetUniform((unsigned int)dword_1B2DB0, (long long)&dword_1B2DAC, 4, 1u, v6, v7); } if ( dword_1B2DB4 != 1 ) { dword_1B2DB4 = 1; rlSetUniform((unsigned int)dword_1B2DB8, (long long)&dword_1B2DB4, 4, 1u, v6, v7); } if ( dword_1B2DBC != 2 ) { dword_1B2DBC = 2; rlSetUniform((unsigned int)dword_1B2DC0, (long long)&dword_1B2DBC, 4, 1u, v6, v7); } if ( dword_1B2DC4 != 3 ) { dword_1B2DC4 = 3; rlSetUniform((unsigned int)dword_1B2DC8, (long long)&dword_1B2DC4, 4, 1u, v6, v7); } if ( dword_1B2DCC != 4 ) { dword_1B2DCC = 4; rlSetUniform((unsigned int)dword_1B2DD0, (long long)&dword_1B2DCC, 4, 1u, v6, v7); } if ( dword_1B2DD4 != 5 ) { dword_1B2DD4 = 5; rlSetUniform((unsigned int)dword_1B2DD8, (long long)&dword_1B2DD4, 4, 1u, v6, v7); } if ( dword_1B2DDC != 6 ) { dword_1B2DDC = 6; rlSetUniform((unsigned int)dword_1B2DE0, (long long)&dword_1B2DDC, 4, 1u, v6, v7); } if ( dword_1B2DE4 != 7 ) { dword_1B2DE4 = 7; rlSetUniform((unsigned int)dword_1B2DE8, (long long)&dword_1B2DE4, 4, 1u, v6, v7); } return rlDisableShader(); }
r3d_shader_load_screen_ambient_ibl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX LEA RDI,[0x220c10] CALL 0x00108180 LEA RDI,[RAX + 0xd] CALL 0x001084d0 MOV RBX,RAX TEST RAX,RAX JZ 0x001c476f LEA R14,[0x220c10] LEA RSI,[0x21365b] MOV RDI,R14 CALL 0x001080c0 TEST RAX,RAX JZ 0x001c4a3c MOV R12,RAX MOV RDI,RAX MOV ESI,0xa CALL 0x00108140 MOV R15,RAX TEST RAX,RAX JNZ 0x001c4719 MOV RDI,R12 CALL 0x00108180 ADD R12,RAX MOV R15,R12 LAB_001c4719: MOV R12,R15 SUB R12,R14 LEA RDX,[R12 + 0x1] MOV RDI,RBX MOV RSI,R14 CALL 0x001081d0 MOV byte ptr [RBX + R12*0x1 + 0x1],0x0 MOV RDI,RBX CALL 0x00108180 MOV RCX,0x20656e6966656423 MOV qword ptr [RBX + RAX*0x1],RCX MOV dword ptr [RBX + RAX*0x1 + 0x8],0x4c4249 MOV RDI,RBX CALL 0x00108180 MOV word ptr [RBX + RAX*0x1],0xa INC R15 MOV RDI,RBX MOV RSI,R15 CALL 0x00108710 LAB_001c476f: LEA RDI,[0x21ae60] MOV RSI,RBX CALL 0x0011ed91 MOV R14D,EAX MOV dword ptr [0x002b2da8],EAX MOV RDI,RBX CALL 0x00108480 LEA RSI,[0x2130ee] MOV EDI,R14D CALL 0x0011f1ea MOV dword ptr [0x002b2db0],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x2130f9] CALL 0x0011f1ea MOV dword ptr [0x002b2db8],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x2133f6] CALL 0x0011f1ea MOV dword ptr [0x002b2dc0],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x213443] CALL 0x0011f1ea MOV dword ptr [0x002b2dc8],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x21344c] CALL 0x0011f1ea MOV dword ptr [0x002b2dd0],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x2131c2] CALL 0x0011f1ea MOV dword ptr [0x002b2dd8],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x2131d2] CALL 0x0011f1ea MOV dword ptr [0x002b2de0],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x2131e1] CALL 0x0011f1ea MOV dword ptr [0x002b2de8],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x2131ed] CALL 0x0011f1ea MOV dword ptr [0x002b2dfc],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x21322e] CALL 0x0011f1ea MOV dword ptr [0x002b2e0c],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x21340b] CALL 0x0011f1ea MOV dword ptr [0x002b2e10],EAX MOV EDI,dword ptr [0x002b2da8] LEA RSI,[0x21318a] CALL 0x0011f1ea MOV dword ptr [0x002b2e14],EAX MOV EDI,dword ptr [0x002b2da8] CALL 0x0011c616 CMP dword ptr [0x002b2dac],0x0 JZ 0x001c48e6 MOV dword ptr [0x002b2dac],0x0 LEA RSI,[0x2b2dac] MOV EDI,dword ptr [0x002b2db0] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c48e6: CMP dword ptr [0x002b2db4],0x1 JZ 0x001c4915 MOV dword ptr [0x002b2db4],0x1 LEA RSI,[0x2b2db4] MOV EDI,dword ptr [0x002b2db8] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c4915: CMP dword ptr [0x002b2dbc],0x2 JZ 0x001c4944 MOV dword ptr [0x002b2dbc],0x2 LEA RSI,[0x2b2dbc] MOV EDI,dword ptr [0x002b2dc0] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c4944: CMP dword ptr [0x002b2dc4],0x3 JZ 0x001c4973 MOV dword ptr [0x002b2dc4],0x3 LEA RSI,[0x2b2dc4] MOV EDI,dword ptr [0x002b2dc8] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c4973: CMP dword ptr [0x002b2dcc],0x4 JZ 0x001c49a2 MOV dword ptr [0x002b2dcc],0x4 LEA RSI,[0x2b2dcc] MOV EDI,dword ptr [0x002b2dd0] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c49a2: CMP dword ptr [0x002b2dd4],0x5 JZ 0x001c49d1 MOV dword ptr [0x002b2dd4],0x5 LEA RSI,[0x2b2dd4] MOV EDI,dword ptr [0x002b2dd8] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c49d1: CMP dword ptr [0x002b2ddc],0x6 JZ 0x001c4a00 MOV dword ptr [0x002b2ddc],0x6 LEA RSI,[0x2b2ddc] MOV EDI,dword ptr [0x002b2de0] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c4a00: CMP dword ptr [0x002b2de4],0x7 JZ 0x001c4a2f MOV dword ptr [0x002b2de4],0x7 LEA RSI,[0x2b2de4] MOV EDI,dword ptr [0x002b2de8] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c4a2f: POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0011c621 LAB_001c4a3c: CALL 0x0010baca
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void r3d_shader_load_screen_ambient_ibl(void) { int4 uVar1; size_t sVar2; char *__dest; char *__s; char *pcVar3; sVar2 = strlen( "#version 330 core\n#ifdef IBL\n#define PI 3.1415926535897932384626433832795028\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n#else\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout..." /* TRUNCATED STRING LITERAL */ ); __dest = (char *)malloc(sVar2 + 0xd); if (__dest != (char *)0x0) { __s = strstr("#version 330 core\n#ifdef IBL\n#define PI 3.1415926535897932384626433832795028\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n#else\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout..." /* TRUNCATED STRING LITERAL */ ,"#version"); if (__s == (char *)0x0) { r3d_shader_load_screen_ambient_ibl_cold_1(); DAT_002b2e18 = rlLoadShaderCode("#version 330 core\nconst vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}" , "#version 330 core\n#ifdef IBL\n#define PI 3.1415926535897932384626433832795028\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n#else\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout..." /* TRUNCATED STRING LITERAL */ ); _DAT_002b2e20 = rlGetLocationUniform(DAT_002b2e18,"uTexSSAO"); _DAT_002b2e28 = rlGetLocationUniform(DAT_002b2e18,"uTexORM"); _DAT_002b2e3c = rlGetLocationUniform(DAT_002b2e18,"uColor"); rlEnableShader(DAT_002b2e18); if (_DAT_002b2e1c != 0) { _DAT_002b2e1c = 0; rlSetUniform(_DAT_002b2e20,&DAT_002b2e1c,4,1); } if (_DAT_002b2e24 != 1) { _DAT_002b2e24 = 1; rlSetUniform(_DAT_002b2e28,&DAT_002b2e24,4,1); } rlDisableShader(); return; } pcVar3 = strchr(__s,10); if (pcVar3 == (char *)0x0) { sVar2 = strlen(__s); pcVar3 = __s + sVar2; } strncpy(__dest, "#version 330 core\n#ifdef IBL\n#define PI 3.1415926535897932384626433832795028\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n#else\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout..." /* TRUNCATED STRING LITERAL */ ,(size_t)(pcVar3 + -0x220c0f)); __dest[(long)(pcVar3 + -0x220c0f)] = '\0'; sVar2 = strlen(__dest); builtin_strncpy(__dest + sVar2,"#define IBL",0xc); sVar2 = strlen(__dest); (__dest + sVar2)[0] = '\n'; (__dest + sVar2)[1] = '\0'; strcat(__dest,pcVar3 + 1); } uVar1 = rlLoadShaderCode("#version 330 core\nconst vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}" ,__dest); DAT_002b2da8 = uVar1; free(__dest); DAT_002b2db0 = rlGetLocationUniform(uVar1,"uTexAlbedo"); DAT_002b2db8 = rlGetLocationUniform(DAT_002b2da8,"uTexNormal"); DAT_002b2dc0 = rlGetLocationUniform(DAT_002b2da8,"uTexDepth"); DAT_002b2dc8 = rlGetLocationUniform(DAT_002b2da8,"uTexSSAO"); DAT_002b2dd0 = rlGetLocationUniform(DAT_002b2da8,"uTexORM"); DAT_002b2dd8 = rlGetLocationUniform(DAT_002b2da8,"uCubeIrradiance"); DAT_002b2de0 = rlGetLocationUniform(DAT_002b2da8,"uCubePrefilter"); DAT_002b2de8 = rlGetLocationUniform(DAT_002b2da8,"uTexBrdfLut"); _DAT_002b2dfc = rlGetLocationUniform(DAT_002b2da8,"uQuatSkybox"); _DAT_002b2e0c = rlGetLocationUniform(DAT_002b2da8,"uViewPosition"); _DAT_002b2e10 = rlGetLocationUniform(DAT_002b2da8,"uMatInvProj"); _DAT_002b2e14 = rlGetLocationUniform(DAT_002b2da8,"uMatInvView"); rlEnableShader(DAT_002b2da8); if (DAT_002b2dac != 0) { DAT_002b2dac = 0; rlSetUniform(DAT_002b2db0,&DAT_002b2dac,4,1); } if (DAT_002b2db4 != 1) { DAT_002b2db4 = 1; rlSetUniform(DAT_002b2db8,&DAT_002b2db4,4,1); } if (DAT_002b2dbc != 2) { DAT_002b2dbc = 2; rlSetUniform(DAT_002b2dc0,&DAT_002b2dbc,4,1); } if (DAT_002b2dc4 != 3) { DAT_002b2dc4 = 3; rlSetUniform(DAT_002b2dc8,&DAT_002b2dc4,4,1); } if (DAT_002b2dcc != 4) { DAT_002b2dcc = 4; rlSetUniform(DAT_002b2dd0,&DAT_002b2dcc,4,1); } if (DAT_002b2dd4 != 5) { DAT_002b2dd4 = 5; rlSetUniform(DAT_002b2dd8,&DAT_002b2dd4,4,1); } if (DAT_002b2ddc != 6) { DAT_002b2ddc = 6; rlSetUniform(DAT_002b2de0,&DAT_002b2ddc,4,1); } if (DAT_002b2de4 != 7) { DAT_002b2de4 = 7; rlSetUniform(DAT_002b2de8,&DAT_002b2de4,4,1); } rlDisableShader(); return; }
1,290
stmt_buffered_fetch
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static int stmt_buffered_fetch(MYSQL_STMT *stmt, uchar **row) { if (!stmt->result_cursor) { *row= NULL; stmt->state= MYSQL_STMT_FETCH_DONE; return MYSQL_NO_DATA; } stmt->state= MYSQL_STMT_USER_FETCHING; *row= (uchar *)stmt->result_cursor->data; stmt->result_cursor= stmt->result_cursor->next; return 0; }
O3
c
stmt_buffered_fetch: movq 0xe0(%rdi), %rax testq %rax, %rax je 0x65623 pushq %rbp movq %rsp, %rbp movl $0x5, 0x50(%rdi) movq 0x8(%rax), %rax movq %rax, (%rsi) movq 0xe0(%rdi), %rax movq (%rax), %rax movq %rax, 0xe0(%rdi) xorl %eax, %eax popq %rbp retq movq $0x0, (%rsi) movl $0x6, 0x50(%rdi) movl $0x64, %eax retq
stmt_buffered_fetch: mov rax, [rdi+0E0h] test rax, rax jz short loc_65623 push rbp mov rbp, rsp mov dword ptr [rdi+50h], 5 mov rax, [rax+8] mov [rsi], rax mov rax, [rdi+0E0h] mov rax, [rax] mov [rdi+0E0h], rax xor eax, eax pop rbp retn loc_65623: mov qword ptr [rsi], 0 mov dword ptr [rdi+50h], 6 mov eax, 64h ; 'd' retn
long long stmt_buffered_fetch(long long a1, _QWORD *a2) { long long v2; // rax v2 = *(_QWORD *)(a1 + 224); if ( v2 ) { *(_DWORD *)(a1 + 80) = 5; *a2 = *(_QWORD *)(v2 + 8); *(_QWORD *)(a1 + 224) = **(_QWORD **)(a1 + 224); return 0LL; } else { *a2 = 0LL; *(_DWORD *)(a1 + 80) = 6; return 100LL; } }
stmt_buffered_fetch: MOV RAX,qword ptr [RDI + 0xe0] TEST RAX,RAX JZ 0x00165623 PUSH RBP MOV RBP,RSP MOV dword ptr [RDI + 0x50],0x5 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RDI + 0xe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xe0],RAX XOR EAX,EAX POP RBP RET LAB_00165623: MOV qword ptr [RSI],0x0 MOV dword ptr [RDI + 0x50],0x6 MOV EAX,0x64 RET
int8 stmt_buffered_fetch(long param_1,int8 *param_2) { if (*(long *)(param_1 + 0xe0) != 0) { *(int4 *)(param_1 + 0x50) = 5; *param_2 = *(int8 *)(*(long *)(param_1 + 0xe0) + 8); *(int8 *)(param_1 + 0xe0) = **(int8 **)(param_1 + 0xe0); return 0; } *param_2 = 0; *(int4 *)(param_1 + 0x50) = 6; return 100; }
1,291
bf_log_internal
bluesky950520[P]quickjs/libbf.c
static int bf_log_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t V_s, *V = &V_s; slimb_t n, prec1, l, i, K; assert(r != a); bf_init(s, T); /* argument reduction 1 */ /* T=a*2^n with 2/3 <= T <= 4/3 */ { bf_t U_s, *U = &U_s; bf_set(T, a); n = T->expn; T->expn = 0; /* U= ~ 2/3 */ bf_init(s, U); bf_set_ui(U, 0xaaaaaaaa); U->expn = 0; if (bf_cmp_lt(T, U)) { T->expn++; n--; } bf_delete(U); } // printf("n=%ld\n", n); // bf_print_str("T", T); /* XXX: precision analysis */ /* number of iterations for argument reduction 2 */ K = bf_isqrt((prec + 1) / 2); /* order of Taylor expansion */ l = prec / (2 * K) + 1; /* precision of the intermediate computations */ prec1 = prec + K + 2 * l + 32; bf_init(s, U); bf_init(s, V); /* Note: cancellation occurs here, so we use more precision (XXX: reduce the precision by computing the exact cancellation) */ bf_add_si(T, T, -1, BF_PREC_INF, BF_RNDN); /* argument reduction 2 */ for(i = 0; i < K; i++) { /* T = T / (1 + sqrt(1 + T)) */ bf_add_si(U, T, 1, prec1, BF_RNDN); bf_sqrt(V, U, prec1, BF_RNDF); bf_add_si(U, V, 1, prec1, BF_RNDN); bf_div(T, T, U, prec1, BF_RNDN); } { bf_t Y_s, *Y = &Y_s; bf_t Y2_s, *Y2 = &Y2_s; bf_init(s, Y); bf_init(s, Y2); /* compute ln(1+x) = ln((1+y)/(1-y)) with y=x/(2+x) = y + y^3/3 + ... + y^(2*l + 1) / (2*l+1) with Y=Y^2 = y*(1+Y/3+Y^2/5+...) = y*(1+Y*(1/3+Y*(1/5 + ...))) */ bf_add_si(Y, T, 2, prec1, BF_RNDN); bf_div(Y, T, Y, prec1, BF_RNDN); bf_mul(Y2, Y, Y, prec1, BF_RNDN); bf_set_ui(r, 0); for(i = l; i >= 1; i--) { bf_set_ui(U, 1); bf_set_ui(V, 2 * i + 1); bf_div(U, U, V, prec1, BF_RNDN); bf_add(r, r, U, prec1, BF_RNDN); bf_mul(r, r, Y2, prec1, BF_RNDN); } bf_add_si(r, r, 1, prec1, BF_RNDN); bf_mul(r, r, Y, prec1, BF_RNDN); bf_delete(Y); bf_delete(Y2); } bf_delete(V); bf_delete(U); /* multiplication by 2 for the Taylor expansion and undo the argument reduction 2*/ bf_mul_2exp(r, K + 1, BF_PREC_INF, BF_RNDZ); /* undo the argument reduction 1 */ bf_const_log2(T, prec1, BF_RNDF); bf_mul_si(T, T, n, prec1, BF_RNDN); bf_add(r, r, T, prec1, BF_RNDN); bf_delete(T); return BF_ST_INEXACT; }
O2
c
bf_log_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rdx, %r12 movq %rdi, 0x28(%rsp) movq (%rdi), %rbx leaq 0x30(%rsp), %r14 movq %rbx, (%r14) andl $0x0, 0x8(%r14) movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000 movq %rbp, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) movq %r14, %rdi callq 0x73216 movq 0x10(%r14), %r13 andq $0x0, 0x10(%r14) leaq 0x58(%rsp), %r15 movq %rbx, 0x18(%rsp) movq %rbx, (%r15) andl $0x0, 0x8(%r15) movq %rbp, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movl $0xaaaaaaaa, %esi # imm = 0xAAAAAAAA movq %r15, %rdi callq 0x73106 andq $0x0, 0x10(%r15) movq %r14, %rdi movq %r15, %rsi callq 0x7d9f6 testl %eax, %eax je 0x78518 incq 0x40(%rsp) decq %r13 movq %r13, 0x10(%rsp) leaq 0x58(%rsp), %r15 movq %r15, %rdi callq 0x7500e leaq 0x1(%r12), %rdi shrq %rdi callq 0x7508e movq %rax, %r14 leaq (%rax,%rax), %rcx xorl %ebx, %ebx movq %r12, %rax xorl %edx, %edx divq %rcx movq %rax, %rbp addq %r14, %r12 leaq (%r12,%rax,2), %rax addq $0x22, %rax movq %rax, 0x8(%rsp) incq %rbp movq 0x18(%rsp), %rax movq %rax, (%r15) andl $0x0, 0x8(%r15) leaq 0x80(%rsp), %rcx movq %rax, (%rcx) andl $0x0, 0x8(%rcx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movq %rax, 0x10(%rcx) movups %xmm0, 0x18(%rcx) leaq 0x30(%rsp), %rdi pushq $-0x1 popq %rdx movq %rdi, %rsi movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF xorl %r8d, %r8d callq 0x74f2a testq %r14, %r14 movq %r14, 0x20(%rsp) cmovgq %r14, %rbx movq 0x8(%rsp), %r15 subq $0x1, %rbx jb 0x78633 leaq 0x58(%rsp), %r13 movq %r13, %rdi movq %rbp, %r12 leaq 0x30(%rsp), %rbp movq %rbp, %rsi pushq $0x1 popq %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x74f2a leaq 0x80(%rsp), %r14 movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx pushq $0x6 popq %rcx callq 0x755e5 movq %r13, %rdi movq %r14, %rsi pushq $0x1 popq %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x74f2a movq %rbp, %rdi movq %rbp, %rsi movq %r12, %rbp movq %r13, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x758a2 jmp 0x785c6 leaq 0xd0(%rsp), %r14 movq 0x18(%rsp), %rcx movq %rcx, (%r14) andl $0x0, 0x8(%r14) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r14) leaq 0xa8(%rsp), %rbx movq %rcx, (%rbx) andl $0x0, 0x8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) movq %rax, 0x10(%rbx) movups %xmm0, 0x18(%rbx) leaq 0x30(%rsp), %r15 pushq $0x2 popq %rdx movq %r14, %rdi movq %r15, %rsi movq 0x8(%rsp), %r12 movq %r12, %rcx xorl %r8d, %r8d callq 0x74f2a movq %r14, %rdi movq %r15, %rsi movq %r14, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x758a2 movq %rbx, %rdi movq %r14, %rsi movq %r14, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x74959 movq 0x28(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x73106 leaq 0x58(%rsp), %r14 pushq $0x1 popq %r13 leaq 0x80(%rsp), %r15 movq 0x8(%rsp), %r12 testq %rbp, %rbp jle 0x78746 movq %r14, %rdi movq %r13, %rsi callq 0x73106 leaq 0x1(,%rbp,2), %rsi movq %r15, %rdi callq 0x73106 movq %r14, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x758a2 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x757f9 movq %rbx, %rdi movq %rbx, %rsi leaq 0xa8(%rsp), %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x74959 decq %rbp jmp 0x786e0 pushq $0x1 popq %rdx movq %rbx, %rdi movq %rbx, %rsi movq 0x8(%rsp), %r15 movq %r15, %rcx xorl %r8d, %r8d callq 0x74f2a leaq 0xd0(%rsp), %r14 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x74959 movq %r14, %rdi callq 0x7500e leaq 0xa8(%rsp), %rdi callq 0x7500e leaq 0x80(%rsp), %rdi callq 0x7500e leaq 0x58(%rsp), %rdi callq 0x7500e movq 0x20(%rsp), %rsi incq %rsi pushq $0x1 popq %rcx movq %rbx, %rdi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF callq 0x74b92 leaq 0x30(%rsp), %r14 pushq $0x6 popq %rdx movq %r14, %rdi movq %r15, %rsi callq 0x77b15 movq %r14, %rdi movq %r14, %rsi movq 0x10(%rsp), %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x75b57 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x757f9 movq %r14, %rdi callq 0x7500e pushq $0x10 popq %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_log_internal: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r12, rdx mov [rsp+128h+var_100], rdi mov rbx, [rdi] lea r14, [rsp+128h+var_F8] mov [r14], rbx and dword ptr [r14+8], 0 mov rbp, 8000000000000000h mov [r14+10h], rbp xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 mov rdi, r14 call bf_set mov r13, [r14+10h] and qword ptr [r14+10h], 0 lea r15, [rsp+128h+var_D0] mov [rsp+128h+var_110], rbx mov [r15], rbx and dword ptr [r15+8], 0 mov [r15+10h], rbp xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov esi, 0AAAAAAAAh mov rdi, r15 call bf_set_ui and qword ptr [r15+10h], 0 mov rdi, r14 mov rsi, r15 call bf_cmp_lt_0 test eax, eax jz short loc_78518 inc [rsp+128h+var_E8] dec r13 loc_78518: mov [rsp+128h+var_118], r13 lea r15, [rsp+128h+var_D0] mov rdi, r15 call bf_delete_0 lea rdi, [r12+1] shr rdi, 1 call bf_isqrt mov r14, rax lea rcx, [rax+rax] xor ebx, ebx mov rax, r12 xor edx, edx div rcx mov rbp, rax add r12, r14 lea rax, [r12+rax*2] add rax, 22h ; '"' mov [rsp+128h+var_120], rax inc rbp mov rax, [rsp+128h+var_110] mov [r15], rax and dword ptr [r15+8], 0 lea rcx, [rsp+128h+var_A8] mov [rcx], rax and dword ptr [rcx+8], 0 mov rax, 8000000000000000h mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov [rcx+10h], rax movups xmmword ptr [rcx+18h], xmm0 lea rdi, [rsp+128h+var_F8] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rdi mov rcx, 3FFFFFFFFFFFFFFFh xor r8d, r8d call bf_add_si test r14, r14 mov [rsp+128h+var_108], r14 cmovg rbx, r14 mov r15, [rsp+128h+var_120] loc_785C6: sub rbx, 1 jb short loc_78633 lea r13, [rsp+128h+var_D0] mov rdi, r13 mov r12, rbp lea rbp, [rsp+128h+var_F8] mov rsi, rbp push 1 pop rdx mov rcx, r15 xor r8d, r8d call bf_add_si lea r14, [rsp+128h+var_A8] mov rdi, r14 mov rsi, r13 mov rdx, r15 push 6 pop rcx call bf_sqrt mov rdi, r13 mov rsi, r14 push 1 pop rdx mov rcx, r15 xor r8d, r8d call bf_add_si mov rdi, rbp mov rsi, rbp mov rbp, r12 mov rdx, r13 mov rcx, r15 xor r8d, r8d call bf_div jmp short loc_785C6 loc_78633: lea r14, [rsp+128h+var_58] mov rcx, [rsp+128h+var_110] mov [r14], rcx and dword ptr [r14+8], 0 mov rax, 8000000000000000h mov [r14+10h], rax lea rbx, [rsp+128h+var_80] mov [rbx], rcx and dword ptr [rbx+8], 0 xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 mov [rbx+10h], rax movups xmmword ptr [rbx+18h], xmm0 lea r15, [rsp+128h+var_F8] push 2 pop rdx mov rdi, r14 mov rsi, r15 mov r12, [rsp+128h+var_120] mov rcx, r12 xor r8d, r8d call bf_add_si mov rdi, r14 mov rsi, r15 mov rdx, r14 mov rcx, r12 xor r8d, r8d call bf_div mov rdi, rbx mov rsi, r14 mov rdx, r14 mov rcx, r12 xor r8d, r8d call bf_mul mov rbx, [rsp+128h+var_100] mov rdi, rbx xor esi, esi call bf_set_ui lea r14, [rsp+128h+var_D0] push 1 pop r13 lea r15, [rsp+128h+var_A8] mov r12, [rsp+128h+var_120] loc_786E0: test rbp, rbp jle short loc_78746 mov rdi, r14 mov rsi, r13 call bf_set_ui lea rsi, ds:1[rbp*2] mov rdi, r15 call bf_set_ui mov rdi, r14 mov rsi, r14 mov rdx, r15 mov rcx, r12 xor r8d, r8d call bf_div mov rdi, rbx mov rsi, rbx mov rdx, r14 mov rcx, r12 xor r8d, r8d call bf_add mov rdi, rbx mov rsi, rbx lea rdx, [rsp+128h+var_80] mov rcx, r12 xor r8d, r8d call bf_mul dec rbp jmp short loc_786E0 loc_78746: push 1 pop rdx mov rdi, rbx mov rsi, rbx mov r15, [rsp+128h+var_120] mov rcx, r15 xor r8d, r8d call bf_add_si lea r14, [rsp+128h+var_58] mov rdi, rbx mov rsi, rbx mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_mul mov rdi, r14 call bf_delete_0 lea rdi, [rsp+128h+var_80] call bf_delete_0 lea rdi, [rsp+128h+var_A8] call bf_delete_0 lea rdi, [rsp+128h+var_D0] call bf_delete_0 mov rsi, [rsp+128h+var_108] inc rsi push 1 pop rcx mov rdi, rbx mov rdx, 3FFFFFFFFFFFFFFFh call bf_mul_2exp lea r14, [rsp+128h+var_F8] push 6 pop rdx mov rdi, r14 mov rsi, r15 call bf_const_log2 mov rdi, r14 mov rsi, r14 mov rdx, [rsp+128h+var_118] mov rcx, r15 xor r8d, r8d call bf_mul_si mov rdi, rbx mov rsi, rbx mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_add mov rdi, r14 call bf_delete_0 push 10h pop rax add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_log_internal(long long *a1, long long a2, unsigned long long a3) { long long v4; // rbx signed long long v5; // r13 signed long long v6; // r14 signed long long v7; // rbx unsigned long long v8; // rbp long long v9; // rbp long long v12; // [rsp+8h] [rbp-120h] long long v13; // [rsp+18h] [rbp-110h] __int128 v14; // [rsp+30h] [rbp-F8h] BYREF unsigned long long v15; // [rsp+40h] [rbp-E8h] __int128 v16; // [rsp+48h] [rbp-E0h] __int128 v17; // [rsp+58h] [rbp-D0h] BYREF unsigned long long v18; // [rsp+68h] [rbp-C0h] __int128 v19; // [rsp+70h] [rbp-B8h] __int128 v20; // [rsp+80h] [rbp-A8h] BYREF unsigned long long v21; // [rsp+90h] [rbp-98h] __int128 v22; // [rsp+98h] [rbp-90h] long long v23; // [rsp+A8h] [rbp-80h] BYREF int v24; // [rsp+B0h] [rbp-78h] unsigned long long v25; // [rsp+B8h] [rbp-70h] __int128 v26; // [rsp+C0h] [rbp-68h] __int128 v27; // [rsp+D0h] [rbp-58h] BYREF unsigned long long v28; // [rsp+E0h] [rbp-48h] __int128 v29; // [rsp+E8h] [rbp-40h] *(_QWORD *)&v14 = *a1; v4 = v14; DWORD2(v14) = 0; v15 = 0x8000000000000000LL; v16 = 0LL; bf_set((long long)&v14, a2); v5 = v15; v15 = 0LL; v13 = v4; *(_QWORD *)&v17 = v4; DWORD2(v17) = 0; v18 = 0x8000000000000000LL; v19 = 0LL; bf_set_ui((long long)&v17, 0xAAAAAAAAuLL); v18 = 0LL; if ( (unsigned int)bf_cmp_lt_0(&v14, &v17) ) { ++v15; --v5; } bf_delete_0((long long *)&v17); v6 = bf_isqrt((a3 + 1) >> 1); v7 = 0LL; v8 = a3 / (2 * v6); v12 = v6 + a3 + 2 * v8 + 34; v9 = v8 + 1; *(_QWORD *)&v17 = v13; DWORD2(v17) = 0; *(_QWORD *)&v20 = v13; DWORD2(v20) = 0; v18 = 0x8000000000000000LL; v19 = 0LL; v21 = 0x8000000000000000LL; v22 = 0LL; bf_add_si((long long *)&v14, (long long)&v14, -1LL, 0x3FFFFFFFFFFFFFFFLL, 0); if ( v6 > 0 ) v7 = v6; while ( v7-- != 0 ) { bf_add_si((long long *)&v17, (long long)&v14, 1LL, v12, 0); bf_sqrt((long long)&v20, (long long)&v17, v12, 6u); bf_add_si((long long *)&v17, (long long)&v20, 1LL, v12, 0); bf_div(&v14, &v14, &v17, v12, 0LL); } *(_QWORD *)&v27 = v13; DWORD2(v27) = 0; v28 = 0x8000000000000000LL; v23 = v13; v24 = 0; v29 = 0LL; v25 = 0x8000000000000000LL; v26 = 0LL; bf_add_si((long long *)&v27, (long long)&v14, 2LL, v12, 0); bf_div(&v27, &v14, &v27, v12, 0LL); bf_mul(&v23, (long long *)&v27, (long long *)&v27, v12, 0); bf_set_ui((long long)a1, 0LL); while ( v9 > 0 ) { bf_set_ui((long long)&v17, 1uLL); bf_set_ui((long long)&v20, 2 * v9 + 1); bf_div(&v17, &v17, &v20, v12, 0LL); bf_add((long long)a1, (long long)a1, (long long)&v17, v12, 0LL); bf_mul(a1, a1, &v23, v12, 0); --v9; } bf_add_si(a1, (long long)a1, 1LL, v12, 0); bf_mul(a1, a1, (long long *)&v27, v12, 0); bf_delete_0((long long *)&v27); bf_delete_0(&v23); bf_delete_0((long long *)&v20); bf_delete_0((long long *)&v17); bf_mul_2exp((long long)a1, v6 + 1, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_const_log2(&v14, v12, 6LL); bf_mul_si((long long *)&v14, (long long *)&v14, v5, v12, 0); bf_add((long long)a1, (long long)a1, (long long)&v14, v12, 0LL); bf_delete_0((long long *)&v14); return 16LL; }
bf_log_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R12,RDX MOV qword ptr [RSP + 0x28],RDI MOV RBX,qword ptr [RDI] LEA R14,[RSP + 0x30] MOV qword ptr [R14],RBX AND dword ptr [R14 + 0x8],0x0 MOV RBP,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 MOV RDI,R14 CALL 0x00173216 MOV R13,qword ptr [R14 + 0x10] AND qword ptr [R14 + 0x10],0x0 LEA R15,[RSP + 0x58] MOV qword ptr [RSP + 0x18],RBX MOV qword ptr [R15],RBX AND dword ptr [R15 + 0x8],0x0 MOV qword ptr [R15 + 0x10],RBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV ESI,0xaaaaaaaa MOV RDI,R15 CALL 0x00173106 AND qword ptr [R15 + 0x10],0x0 MOV RDI,R14 MOV RSI,R15 CALL 0x0017d9f6 TEST EAX,EAX JZ 0x00178518 INC qword ptr [RSP + 0x40] DEC R13 LAB_00178518: MOV qword ptr [RSP + 0x10],R13 LEA R15,[RSP + 0x58] MOV RDI,R15 CALL 0x0017500e LEA RDI,[R12 + 0x1] SHR RDI,0x1 CALL 0x0017508e MOV R14,RAX LEA RCX,[RAX + RAX*0x1] XOR EBX,EBX MOV RAX,R12 XOR EDX,EDX DIV RCX MOV RBP,RAX ADD R12,R14 LEA RAX,[R12 + RAX*0x2] ADD RAX,0x22 MOV qword ptr [RSP + 0x8],RAX INC RBP MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [R15],RAX AND dword ptr [R15 + 0x8],0x0 LEA RCX,[RSP + 0x80] MOV qword ptr [RCX],RAX AND dword ptr [RCX + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV qword ptr [RCX + 0x10],RAX MOVUPS xmmword ptr [RCX + 0x18],XMM0 LEA RDI,[RSP + 0x30] PUSH -0x1 POP RDX MOV RSI,RDI MOV RCX,0x3fffffffffffffff XOR R8D,R8D CALL 0x00174f2a TEST R14,R14 MOV qword ptr [RSP + 0x20],R14 CMOVG RBX,R14 MOV R15,qword ptr [RSP + 0x8] LAB_001785c6: SUB RBX,0x1 JC 0x00178633 LEA R13,[RSP + 0x58] MOV RDI,R13 MOV R12,RBP LEA RBP,[RSP + 0x30] MOV RSI,RBP PUSH 0x1 POP RDX MOV RCX,R15 XOR R8D,R8D CALL 0x00174f2a LEA R14,[RSP + 0x80] MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 PUSH 0x6 POP RCX CALL 0x001755e5 MOV RDI,R13 MOV RSI,R14 PUSH 0x1 POP RDX MOV RCX,R15 XOR R8D,R8D CALL 0x00174f2a MOV RDI,RBP MOV RSI,RBP MOV RBP,R12 MOV RDX,R13 MOV RCX,R15 XOR R8D,R8D CALL 0x001758a2 JMP 0x001785c6 LAB_00178633: LEA R14,[RSP + 0xd0] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [R14],RCX AND dword ptr [R14 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RAX LEA RBX,[RSP + 0xa8] MOV qword ptr [RBX],RCX AND dword ptr [RBX + 0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 MOV qword ptr [RBX + 0x10],RAX MOVUPS xmmword ptr [RBX + 0x18],XMM0 LEA R15,[RSP + 0x30] PUSH 0x2 POP RDX MOV RDI,R14 MOV RSI,R15 MOV R12,qword ptr [RSP + 0x8] MOV RCX,R12 XOR R8D,R8D CALL 0x00174f2a MOV RDI,R14 MOV RSI,R15 MOV RDX,R14 MOV RCX,R12 XOR R8D,R8D CALL 0x001758a2 MOV RDI,RBX MOV RSI,R14 MOV RDX,R14 MOV RCX,R12 XOR R8D,R8D CALL 0x00174959 MOV RBX,qword ptr [RSP + 0x28] MOV RDI,RBX XOR ESI,ESI CALL 0x00173106 LEA R14,[RSP + 0x58] PUSH 0x1 POP R13 LEA R15,[RSP + 0x80] MOV R12,qword ptr [RSP + 0x8] LAB_001786e0: TEST RBP,RBP JLE 0x00178746 MOV RDI,R14 MOV RSI,R13 CALL 0x00173106 LEA RSI,[0x1 + RBP*0x2] MOV RDI,R15 CALL 0x00173106 MOV RDI,R14 MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 XOR R8D,R8D CALL 0x001758a2 MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R12 XOR R8D,R8D CALL 0x001757f9 MOV RDI,RBX MOV RSI,RBX LEA RDX,[RSP + 0xa8] MOV RCX,R12 XOR R8D,R8D CALL 0x00174959 DEC RBP JMP 0x001786e0 LAB_00178746: PUSH 0x1 POP RDX MOV RDI,RBX MOV RSI,RBX MOV R15,qword ptr [RSP + 0x8] MOV RCX,R15 XOR R8D,R8D CALL 0x00174f2a LEA R14,[RSP + 0xd0] MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x00174959 MOV RDI,R14 CALL 0x0017500e LEA RDI,[RSP + 0xa8] CALL 0x0017500e LEA RDI,[RSP + 0x80] CALL 0x0017500e LEA RDI,[RSP + 0x58] CALL 0x0017500e MOV RSI,qword ptr [RSP + 0x20] INC RSI PUSH 0x1 POP RCX MOV RDI,RBX MOV RDX,0x3fffffffffffffff CALL 0x00174b92 LEA R14,[RSP + 0x30] PUSH 0x6 POP RDX MOV RDI,R14 MOV RSI,R15 CALL 0x00177b15 MOV RDI,R14 MOV RSI,R14 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,R15 XOR R8D,R8D CALL 0x00175b57 MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x001757f9 MOV RDI,R14 CALL 0x0017500e PUSH 0x10 POP RAX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 bf_log_internal(int8 *param_1,int8 param_2,ulong param_3) { int8 uVar1; int iVar2; long lVar3; ulong uVar4; long lVar5; long lVar6; long lVar7; long lVar8; int8 local_f8; int4 local_f0; long local_e8; int8 local_e0; int8 uStack_d8; int8 local_d0; int4 local_c8; int8 local_c0; int8 local_b8; int8 uStack_b0; int8 local_a8; int4 local_a0; int8 local_98; int8 local_90; int8 uStack_88; int8 local_80; int4 local_78; int8 local_70; int8 local_68; int8 uStack_60; int8 local_58; int4 local_50; int8 local_48; int8 local_40; int8 uStack_38; uVar1 = *param_1; local_f0 = 0; local_e8 = -0x8000000000000000; local_e0 = 0; uStack_d8 = 0; local_f8 = uVar1; bf_set(&local_f8); lVar8 = local_e8; local_e8 = 0; local_c8 = 0; local_c0 = 0x8000000000000000; local_b8 = 0; uStack_b0 = 0; local_d0 = uVar1; bf_set_ui(&local_d0,0xaaaaaaaa); local_c0 = 0; iVar2 = bf_cmp_lt(&local_f8,&local_d0); if (iVar2 != 0) { local_e8 = local_e8 + 1; lVar8 = lVar8 + -1; } bf_delete(&local_d0); lVar3 = bf_isqrt(param_3 + 1 >> 1); uVar4 = param_3 / (ulong)(lVar3 * 2); lVar5 = param_3 + lVar3 + uVar4 * 2 + 0x22; lVar7 = uVar4 + 1; local_c8 = 0; local_a0 = 0; local_c0 = 0x8000000000000000; local_b8 = 0; uStack_b0 = 0; local_98 = 0x8000000000000000; local_90 = 0; uStack_88 = 0; local_d0 = uVar1; local_a8 = uVar1; bf_add_si(&local_f8,&local_f8,0xffffffffffffffff,0x3fffffffffffffff,0); lVar6 = 0; if (0 < lVar3) { lVar6 = lVar3; } while (lVar6 != 0) { bf_add_si(&local_d0,&local_f8,1,lVar5); bf_sqrt(&local_a8,&local_d0,lVar5,6); bf_add_si(&local_d0,&local_a8,1,lVar5); bf_div(&local_f8,&local_f8,&local_d0,lVar5); lVar6 = lVar6 + -1; } local_50 = 0; local_48 = 0x8000000000000000; local_78 = 0; local_40 = 0; uStack_38 = 0; local_70 = 0x8000000000000000; local_68 = 0; uStack_60 = 0; local_80 = uVar1; local_58 = uVar1; bf_add_si(&local_58,&local_f8,2,lVar5,0); bf_div(&local_58,&local_f8,&local_58,lVar5,0); bf_mul(&local_80,&local_58,&local_58,lVar5,0); bf_set_ui(param_1,0); for (; 0 < lVar7; lVar7 = lVar7 + -1) { bf_set_ui(&local_d0,1); bf_set_ui(&local_a8,lVar7 * 2 + 1); bf_div(&local_d0,&local_d0,&local_a8,lVar5); bf_add(param_1,param_1,&local_d0,lVar5); bf_mul(param_1,param_1,&local_80,lVar5); } bf_add_si(param_1,param_1,1,lVar5,0); bf_mul(param_1,param_1,&local_58,lVar5,0); bf_delete(&local_58); bf_delete(&local_80); bf_delete(&local_a8); bf_delete(&local_d0); bf_mul_2exp(param_1,lVar3 + 1,0x3fffffffffffffff,1); bf_const_log2(&local_f8,lVar5,6); bf_mul_si(&local_f8,&local_f8,lVar8,lVar5,0); bf_add(param_1,param_1,&local_f8,lVar5,0); bf_delete(&local_f8); return 0x10; }
1,292
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O2
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1e0, %rsp # imm = 0x1E0 movq %rsi, %r14 movq %rdi, %rbx leaq 0x9f4f6(%rip), %rax # 0xcff90 movb (%rax), %al testb %al, %al je 0x30ba0 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) leaq 0x9f4b8(%rip), %rdx # 0xcff70 leaq 0x60(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x303c4 movq %rsp, %r14 leaq 0x60(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x3ad60 movq (%r14), %r12 movq 0x8(%r14), %r14 movq %r15, %rdi callq 0x28432 cmpq %r14, %r12 je 0x30bf5 andq $0x0, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi pushq $0x8 popq %rdx callq 0x20b00 leaq 0x30(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 pushq $0x2c popq %rbp leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x20c60 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x30b71 movq %r12, %rdi movq %r15, %rsi callq 0x27a35 movq %rbx, %rdi movq %r12, %rsi callq 0x6d408 movq %r12, %rdi callq 0x20d88 jmp 0x30b36 leaq 0x20(%rsp), %rdi callq 0x20d88 leaq 0x60(%rsp), %rdi callq 0x20350 movq %rsp, %rdi callq 0x28432 movq %rbx, %rax addq $0x1e0, %rsp # imm = 0x1E0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x9f3e9(%rip), %rdi # 0xcff90 callq 0x20c00 testl %eax, %eax je 0x30aa4 leaq 0x9f3b5(%rip), %rdi # 0xcff70 leaq 0x5fa91(%rip), %rsi # 0x90653 pushq $0x10 popq %rdx callq 0x3031e leaq -0x84d(%rip), %rdi # 0x30384 leaq 0x9f398(%rip), %rsi # 0xcff70 leaq 0x9eae9(%rip), %rdx # 0xcf6c8 callq 0x205f0 leaq 0x9f3a5(%rip), %rdi # 0xcff90 callq 0x20470 jmp 0x30aa4 pushq $0x10 popq %rdi callq 0x20380 movq %rax, %rbx leaq 0x5fa7e(%rip), %rsi # 0x90685 movq %rax, %rdi callq 0x20270 movq 0x9e3da(%rip), %rsi # 0xceff0 movq 0x9e353(%rip), %rdx # 0xcef70 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x9f361(%rip), %rdi # 0xcff90 callq 0x20460 jmp 0x30c87 jmp 0x30c4a movq %rax, %r14 movq %rbx, %rdi callq 0x20510 jmp 0x30c7f movq %rax, %r14 jmp 0x30c77 movq %rax, %r14 jmp 0x30c7f movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0x20d88 jmp 0x30c63 jmp 0x30c60 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x20d88 leaq 0x60(%rsp), %rdi callq 0x20350 movq %rbx, %rdi callq 0x28432 movq %rsp, %rdi callq 0x28432 movq %r14, %rdi callq 0x20ba0
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r12 push rbx sub rsp, 1E0h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_30BA0 loc_30AA4: xorps xmm0, xmm0 movaps [rsp+208h+var_208], xmm0 and [rsp+208h+var_1F8], 0 lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rdi, [rsp+208h+var_1A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov r14, rsp lea r15, [rsp+208h+var_1A8] mov rdi, r14 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE14_M_move_assignEOS7_St17integral_constantIbLb1EE; std::vector<std::string>::_M_move_assign(std::vector<std::string>&&,std::integral_constant<bool,true>) mov r12, [r14] mov r14, [r14+8] mov rdi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r12, r14 jz loc_30BF5 and qword ptr [rbx+10h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rsi, qword ptr [rsp+208h+var_208] add rsi, 20h ; ' ' lea rdi, [rsp+208h+var_1A8] push 8 pop rdx call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+208h+var_1D8] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r14, [rsp+208h+var_1A8] lea r15, [rsp+208h+var_1E8] push 2Ch ; ',' pop rbp lea r12, [rsp+208h+var_1C8] loc_30B36: mov rdi, r14 mov rsi, r15 mov edx, ebp call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_30B71 mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_30B36 loc_30B71: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+208h+var_1A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_30BA0: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_30AA4 lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_30AA4 loc_30BF5: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_30C87 jmp short loc_30C4A mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_30C7F mov r14, rax jmp short loc_30C77 loc_30C4A: mov r14, rax jmp short loc_30C7F mov r14, rax lea rdi, [rsp+208h+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_30C63 jmp short $+2 loc_30C60: mov r14, rax loc_30C63: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+208h+var_1A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_30C77: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_30C7F: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_30C87: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { __int128 v2; // kr00_16 _QWORD *v3; // rax std::runtime_error *exception; // rbx __int128 v6; // [rsp+0h] [rbp-208h] BYREF long long v7; // [rsp+10h] [rbp-1F8h] _QWORD v8[2]; // [rsp+20h] [rbp-1E8h] BYREF char v9; // [rsp+30h] [rbp-1D8h] BYREF _QWORD v10[4]; // [rsp+40h] [rbp-1C8h] BYREF _BYTE v11[424]; // [rsp+60h] [rbp-1A8h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } v6 = 0LL; v7 = 0LL; minja::Parser::consumeTokenGroups( (long long)v11, a2, (int)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); std::vector<std::string>::_M_move_assign(&v6, v11); v2 = v6; std::vector<std::string>::~vector((long long)v11); if ( (_QWORD)v2 == *((_QWORD *)&v2 + 1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; std::istringstream::basic_istringstream(v11, v6 + 32, 8LL); v8[0] = &v9; v8[1] = 0LL; v9 = 0; while ( 1 ) { v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v11, v8, 44LL); if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v10, (long long)v8); std::vector<std::string>::emplace_back<std::string>(a1, v10); std::string::~string(v10); } std::string::~string(v8); std::istringstream::~istringstream(v11); std::vector<std::string>::~vector((long long)&v6); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1e0 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x1cff90] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00130ba0 LAB_00130aa4: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00130ab1: LEA RDX,[0x1cff70] LEA RDI,[RSP + 0x60] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x001303c4 MOV R14,RSP LEA R15,[RSP + 0x60] MOV RDI,R14 MOV RSI,R15 CALL 0x0013ad60 MOV R12,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x00128432 CMP R12,R14 JZ 0x00130bf5 AND qword ptr [RBX + 0x10],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_00130b06: LEA RDI,[RSP + 0x60] PUSH 0x8 POP RDX CALL 0x00120b00 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] PUSH 0x2c POP RBP LEA R12,[RSP + 0x40] LAB_00130b36: MOV RDI,R14 MOV RSI,R15 MOV EDX,EBP CALL 0x00120c60 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x00130b71 LAB_00130b51: MOV RDI,R12 MOV RSI,R15 CALL 0x00127a35 LAB_00130b5c: MOV RDI,RBX MOV RSI,R12 CALL 0x0016d408 MOV RDI,R12 CALL 0x00120d88 JMP 0x00130b36 LAB_00130b71: LEA RDI,[RSP + 0x20] CALL 0x00120d88 LEA RDI,[RSP + 0x60] CALL 0x00120350 MOV RDI,RSP CALL 0x00128432 MOV RAX,RBX ADD RSP,0x1e0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00130ba0: LEA RDI,[0x1cff90] CALL 0x00120c00 TEST EAX,EAX JZ 0x00130aa4 LAB_00130bb4: LEA RDI,[0x1cff70] LEA RSI,[0x190653] PUSH 0x10 POP RDX CALL 0x0013031e LAB_00130bca: LEA RDI,[0x130384] LEA RSI,[0x1cff70] LEA RDX,[0x1cf6c8] CALL 0x001205f0 LEA RDI,[0x1cff90] CALL 0x00120470 JMP 0x00130aa4 LAB_00130bf5: PUSH 0x10 POP RDI CALL 0x00120380 MOV RBX,RAX LAB_00130c00: LEA RSI,[0x190685] MOV RDI,RAX CALL 0x00120270 LAB_00130c0f: MOV RSI,qword ptr [0x001ceff0] MOV RDX,qword ptr [0x001cef70] MOV RDI,RBX CALL 0x00120b30
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { long lVar1; long lVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; long local_208; long lStack_200; int8 local_1f8; int1 *local_1e8; int8 local_1e0; int1 local_1d8 [16]; minja local_1c8 [32]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_1a8 [384]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 00130bb4 to 00130bc9 has its CatchHandler @ 00130c25 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_208 = 0; lStack_200 = 0; local_1f8 = 0; /* try { // try from 00130ab1 to 00130ac7 has its CatchHandler @ 00130c4a */ consumeTokenGroups(local_1a8); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_move_assign (&local_208,local_1a8); lVar2 = lStack_200; lVar1 = local_208; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_1a8); if (lVar1 != lVar2) { *(int8 *)(in_RDI + 0x10) = 0; *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; /* try { // try from 00130b06 to 00130b12 has its CatchHandler @ 00130c45 */ std::__cxx11::istringstream::istringstream((istringstream *)local_1a8,local_208 + 0x20,8); local_1e8 = local_1d8; local_1e0 = 0; local_1d8[0] = 0; while( true ) { /* try { // try from 00130b36 to 00130b42 has its CatchHandler @ 00130c60 */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_1a8,(string *)&local_1e8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 00130b51 to 00130b5b has its CatchHandler @ 00130c5e */ strip(local_1c8,(string *)&local_1e8); /* try { // try from 00130b5c to 00130b66 has its CatchHandler @ 00130c4f */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1c8); std::__cxx11::string::~string((string *)local_1c8); } std::__cxx11::string::~string((string *)&local_1e8); std::__cxx11::istringstream::~istringstream((istringstream *)local_1a8); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_208); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00130c00 to 00130c0e has its CatchHandler @ 00130c38 */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 00130c0f to 00130c24 has its CatchHandler @ 00130c36 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001ceff0,PTR__runtime_error_001cef70); }
1,293
uf_space_endspace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace_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; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } else decode_bytes(rec,bit_buff,to,end); } }
O3
c
uf_space_endspace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl 0x4(%rsi), %eax testl %eax, %eax je 0x841cd movl (%r15), %r12d decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jb 0x84242 testl %eax, %eax jne 0x841ea movq %r15, %rdi callq 0x8365d movl $0x1f, 0x4(%r15) movl (%r15), %r12d testl %r12d, %r12d jns 0x84255 movl $0x1f, %eax jmp 0x841f6 movq %r15, %rdi callq 0x8365d movl $0x1f, 0x4(%r15) movl (%r15), %r12d movl $0x1f, %eax testl %r12d, %r12d js 0x84242 decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jae 0x84255 movq %r13, %rdx movl 0x1c(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0x84274 subl %eax, %r13d movl %eax, %eax leaq 0x5ee2c(%rip), %rcx # 0xe3040 andl (%rcx,%rax,4), %r12d movl %r13d, %ecx shll %cl, %r12d movq %r15, %rdi callq 0x8365d movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r12d jmp 0x84289 subq %r14, %rbx movq %r14, %rdi movl $0x20, %esi movq %rbx, %rdx jmp 0x842d8 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x83f4e movl %ecx, 0x4(%r15) shrl %cl, %r12d movl 0x1c(%rdx), %eax leaq 0x5edbb(%rip), %rcx # 0xe3040 andl (%rcx,%rax,4), %r12d movl %r12d, %r13d leaq (%r14,%r13), %rax cmpq %rbx, %rax jbe 0x842ac movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r12 negq %r12 cmpq %rbx, %rax je 0x842ca leaq (%rbx,%r12), %rcx movq -0x30(%rbp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x83f4e addq %r12, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292a0
uf_space_endspace_selected_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r13, rdi mov eax, [rsi+4] test eax, eax jz short loc_841CD mov r12d, [r15] dec eax mov [r15+4], eax bt r12d, eax jb loc_84242 test eax, eax jnz short loc_841EA mov rdi, r15 call fill_buffer_0 mov dword ptr [r15+4], 1Fh mov r12d, [r15] test r12d, r12d jns loc_84255 mov eax, 1Fh jmp short loc_841F6 loc_841CD: mov rdi, r15 call fill_buffer_0 mov dword ptr [r15+4], 1Fh mov r12d, [r15] mov eax, 1Fh test r12d, r12d js short loc_84242 loc_841EA: dec eax mov [r15+4], eax bt r12d, eax jnb short loc_84255 loc_841F6: mov rdx, r13 mov r13d, [r13+1Ch] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_84274 sub r13d, eax mov eax, eax lea rcx, mask_0 and r12d, [rcx+rax*4] mov ecx, r13d shl r12d, cl mov rdi, r15 call fill_buffer_0 mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add r12d, eax jmp short loc_84289 loc_84242: sub rbx, r14 mov rdi, r14 mov esi, 20h ; ' ' mov rdx, rbx jmp loc_842D8 loc_84255: mov rdi, r13 mov rsi, r15 mov rdx, r14 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes_0 loc_84274: mov [r15+4], ecx shr r12d, cl mov eax, [rdx+1Ch] lea rcx, mask_0 and r12d, [rcx+rax*4] loc_84289: mov r13d, r12d lea rax, [r14+r13] cmp rax, rbx jbe short loc_842AC mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_842AC: mov r12, r13 neg r12 cmp rax, rbx jz short loc_842CA lea rcx, [rbx+r12] mov rdi, [rbp+var_30] mov rsi, r15 mov rdx, r14 call decode_bytes_0 loc_842CA: add rbx, r12 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 loc_842D8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
_BYTE * uf_space_endspace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { unsigned int v6; // eax unsigned int v7; // r12d unsigned int v8; // eax unsigned int v9; // eax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r12d unsigned int v14; // r12d _BYTE *result; // rax v6 = a2[1]; if ( !v6 ) { fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) == 0 ) { LABEL_7: v9 = v8 - 1; a2[1] = v9; if ( _bittest((const int *)&v7, v9) ) goto LABEL_8; return decode_bytes_0(a1, (long long)a2, a3, a4); } return (_BYTE *)memset(a3, 32LL, a4 - a3); } v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return (_BYTE *)memset(a3, 32LL, a4 - a3); if ( v8 ) goto LABEL_7; fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; if ( (*a2 & 0x80000000) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); v9 = 31; LABEL_8: v10 = *(_DWORD *)(a1 + 28); v11 = v9 - v10; if ( v9 >= v10 ) { a2[1] = v11; v14 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v11); } else { v12 = v10 - v9; v13 = (mask_0[v9] & v7) << v12; fill_buffer_0((long long)a2); a2[1] = 32 - v12; v14 = (*a2 >> -(char)v12) + v13; } result = &a3[v14]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-v14]); return (_BYTE *)memset(&a4[-v14], 32LL, v14); } else { a2[10] = 1; } return result; }
uf_space_endspace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R13,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x001841cd MOV R12D,dword ptr [R15] DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JC 0x00184242 TEST EAX,EAX JNZ 0x001841ea MOV RDI,R15 CALL 0x0018365d MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] TEST R12D,R12D JNS 0x00184255 MOV EAX,0x1f JMP 0x001841f6 LAB_001841cd: MOV RDI,R15 CALL 0x0018365d MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] MOV EAX,0x1f TEST R12D,R12D JS 0x00184242 LAB_001841ea: DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JNC 0x00184255 LAB_001841f6: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x1c] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x00184274 SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e3040] AND R12D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R12D,CL MOV RDI,R15 CALL 0x0018365d MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R12D,EAX JMP 0x00184289 LAB_00184242: SUB RBX,R14 MOV RDI,R14 MOV ESI,0x20 MOV RDX,RBX JMP 0x001842d8 LAB_00184255: MOV RDI,R13 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00183f4e LAB_00184274: MOV dword ptr [R15 + 0x4],ECX SHR R12D,CL MOV EAX,dword ptr [RDX + 0x1c] LEA RCX,[0x1e3040] AND R12D,dword ptr [RCX + RAX*0x4] LAB_00184289: MOV R13D,R12D LEA RAX,[R14 + R13*0x1] CMP RAX,RBX JBE 0x001842ac MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001842ac: MOV R12,R13 NEG R12 CMP RAX,RBX JZ 0x001842ca LEA RCX,[RBX + R12*0x1] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,R14 CALL 0x00183f4e LAB_001842ca: ADD RBX,R12 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 LAB_001842d8: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292a0
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; size_t __n; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; uVar3 = 0x1f; if ((int)uVar5 < 0) goto LAB_00184242; LAB_001841ea: uVar3 = uVar3 - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) { LAB_00184255: decode_bytes(param_1,param_2,param_3,param_4); return; } } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) { LAB_00184242: __n = param_4 - (long)param_3; goto LAB_001842d8; } if (uVar3 != 0) goto LAB_001841ea; fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; if (-1 < (int)uVar5) goto LAB_00184255; uVar3 = 0x1f; } uVar1 = *(uint *)(param_1 + 0x1c); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } __n = (size_t)uVar5; if (param_4 < (long)param_3 + __n) { param_2[10] = 1; return; } if ((long)param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } param_3 = (void *)(param_4 + -__n); LAB_001842d8: memset(param_3,0x20,__n); return; }
1,294
js_thisBooleanValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisBooleanValue(JSContext *ctx, JSValue this_val) { if (JS_VALUE_GET_TAG(this_val) == JS_TAG_BOOL) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_BOOLEAN) { if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_BOOL) return p->u.object_data; } } return JS_ThrowTypeError(ctx, "not a boolean"); }
O1
c
js_thisBooleanValue: pushq %rbx subq $0x10, %rsp movq %rsi, (%rsp) cmpl $-0x1, %edx je 0x7a852 cmpl $0x1, %edx jne 0x7a874 movq %rsi, %rbx movq %rsi, 0x8(%rsp) cmpl $-0x9, %edx jb 0x7a889 movq 0x8(%rsp), %rax incl (%rax) jmp 0x7a889 movq (%rsp), %rcx movb $0x1, %al cmpw $0x6, 0x6(%rcx) jne 0x7a870 movq 0x38(%rcx), %rdx cmpl $0x1, %edx jne 0x7a870 movq 0x30(%rcx), %rbx xorl %eax, %eax jmp 0x7a870 testb %al, %al je 0x7a889 leaq 0x2779f(%rip), %rsi # 0xa201a xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 movl $0x6, %edx movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
js_thisBooleanValue: push rbx sub rsp, 10h mov [rsp+18h+var_18], rsi cmp edx, 0FFFFFFFFh jz short loc_7A852 cmp edx, 1 jnz short loc_7A874 mov rbx, rsi mov [rsp+18h+var_10], rsi cmp edx, 0FFFFFFF7h jb short loc_7A889 mov rax, [rsp+18h+var_10] inc dword ptr [rax] jmp short loc_7A889 loc_7A852: mov rcx, [rsp+18h+var_18] mov al, 1 cmp word ptr [rcx+6], 6 jnz short loc_7A870 mov rdx, [rcx+38h] cmp edx, 1 jnz short loc_7A870 mov rbx, [rcx+30h] xor eax, eax jmp short $+2 loc_7A870: test al, al jz short loc_7A889 loc_7A874: lea rsi, aNotABoolean; "not a boolean" xor ebx, ebx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_7A889: mov rax, rbx add rsp, 10h pop rbx retn
long long js_thisBooleanValue( 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; // rbx char v15; // al if ( (_DWORD)a3 != -1 ) { if ( (_DWORD)a3 == 1 ) return a2; LABEL_8: v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a boolean", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a2); return v14; } a4 = a2; v15 = 1; if ( *(_WORD *)(a2 + 6) == 6 ) { a3 = *(_QWORD *)(a2 + 56); if ( (_DWORD)a3 == 1 ) { v14 = *(_QWORD *)(a2 + 48); v15 = 0; } } if ( v15 ) goto LABEL_8; return v14; }
js_thisBooleanValue: PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP],RSI CMP EDX,-0x1 JZ 0x0017a852 CMP EDX,0x1 JNZ 0x0017a874 MOV RBX,RSI MOV qword ptr [RSP + 0x8],RSI CMP EDX,-0x9 JC 0x0017a889 MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] JMP 0x0017a889 LAB_0017a852: MOV RCX,qword ptr [RSP] MOV AL,0x1 CMP word ptr [RCX + 0x6],0x6 JNZ 0x0017a870 MOV RDX,qword ptr [RCX + 0x38] CMP EDX,0x1 JNZ 0x0017a870 MOV RBX,qword ptr [RCX + 0x30] XOR EAX,EAX JMP 0x0017a870 LAB_0017a870: TEST AL,AL JZ 0x0017a889 LAB_0017a874: LEA RSI,[0x1a201a] XOR EBX,EBX XOR EAX,EAX CALL 0x00122567 MOV EDX,0x6 LAB_0017a889: MOV RAX,RBX ADD RSP,0x10 POP RBX RET
/* WARNING: Removing unreachable block (ram,0x0017a849) */ int1 [16] js_thisBooleanValue(int8 param_1,long param_2,int8 param_3) { bool bVar1; long unaff_RBX; int1 auVar2 [16]; if ((int)param_3 == -1) { bVar1 = true; if ((*(short *)(param_2 + 6) == 6) && (param_3 = *(int8 *)(param_2 + 0x38), (int)param_3 == 1)) { unaff_RBX = *(long *)(param_2 + 0x30); bVar1 = false; } param_2 = unaff_RBX; if (!bVar1) goto LAB_0017a889; } else if ((int)param_3 == 1) goto LAB_0017a889; JS_ThrowTypeError(param_1,"not a boolean"); param_3 = 6; param_2 = 0; LAB_0017a889: auVar2._8_8_ = param_3; auVar2._0_8_ = param_2; return auVar2; }
1,295
js_thisBooleanValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisBooleanValue(JSContext *ctx, JSValue this_val) { if (JS_VALUE_GET_TAG(this_val) == JS_TAG_BOOL) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_BOOLEAN) { if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_BOOL) return p->u.object_data; } } return JS_ThrowTypeError(ctx, "not a boolean"); }
O3
c
js_thisBooleanValue: pushq %rbx movq %rsi, %rbx cmpl $0x1, %edx je 0x7d1b9 cmpl $-0x1, %edx jne 0x7d1a4 cmpw $0x6, 0x6(%rbx) jne 0x7d1a4 movq 0x38(%rbx), %rdx cmpl $0x1, %edx jne 0x7d1a4 movq 0x30(%rbx), %rbx jmp 0x7d1b9 leaq 0x27e19(%rip), %rsi # 0xa4fc4 xorl %ebx, %ebx xorl %eax, %eax callq 0x22d8b movl $0x6, %edx movq %rbx, %rax popq %rbx retq
js_thisBooleanValue: push rbx mov rbx, rsi cmp edx, 1 jz short loc_7D1B9 cmp edx, 0FFFFFFFFh jnz short loc_7D1A4 cmp word ptr [rbx+6], 6 jnz short loc_7D1A4 mov rdx, [rbx+38h] cmp edx, 1 jnz short loc_7D1A4 mov rbx, [rbx+30h] jmp short loc_7D1B9 loc_7D1A4: lea rsi, aNotABoolean; "not a boolean" xor ebx, ebx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_7D1B9: mov rax, rbx pop rbx retn
long long js_thisBooleanValue( 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; // rbx char v16; // [rsp+0h] [rbp-8h] v14 = a2; if ( (_DWORD)a3 != 1 ) { if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 6 && (a3 = *(_QWORD *)(a2 + 56), (_DWORD)a3 == 1) ) { return *(_QWORD *)(a2 + 48); } else { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a boolean", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); } } return v14; }
js_thisBooleanValue: PUSH RBX MOV RBX,RSI CMP EDX,0x1 JZ 0x0017d1b9 CMP EDX,-0x1 JNZ 0x0017d1a4 CMP word ptr [RBX + 0x6],0x6 JNZ 0x0017d1a4 MOV RDX,qword ptr [RBX + 0x38] CMP EDX,0x1 JNZ 0x0017d1a4 MOV RBX,qword ptr [RBX + 0x30] JMP 0x0017d1b9 LAB_0017d1a4: LEA RSI,[0x1a4fc4] XOR EBX,EBX XOR EAX,EAX CALL 0x00122d8b MOV EDX,0x6 LAB_0017d1b9: MOV RAX,RBX POP RBX RET
int1 [16] js_thisBooleanValue(int8 param_1,long param_2,int8 param_3) { int1 auVar1 [16]; if ((int)param_3 != 1) { if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 6)) && (param_3 = *(int8 *)(param_2 + 0x38), (int)param_3 == 1)) { param_2 = *(long *)(param_2 + 0x30); } else { param_2 = 0; JS_ThrowTypeError(param_1,"not a boolean"); param_3 = 6; } } auVar1._8_8_ = param_3; auVar1._0_8_ = param_2; return auVar1; }
1,296
get_date_string
bluesky950520[P]quickjs/quickjs.c
static JSValue get_date_string(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _string(obj, fmt, part) char buf[64]; double fields[9]; int res, fmt, part, pos; int y, mon, d, h, m, s, ms, wd, tz; fmt = (magic >> 4) & 0x0F; part = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, fmt & 1, 0); if (res < 0) return JS_EXCEPTION; if (!res) { if (fmt == 2) return JS_ThrowRangeError(ctx, "Date value is NaN"); else return js_new_string8(ctx, "Invalid Date"); } y = fields[0]; mon = fields[1]; d = fields[2]; h = fields[3]; m = fields[4]; s = fields[5]; ms = fields[6]; wd = fields[7]; tz = fields[8]; pos = 0; if (part & 1) { /* date part */ switch(fmt) { case 0: pos += snprintf(buf + pos, sizeof(buf) - pos, "%.3s, %02d %.3s %0*d ", day_names + wd * 3, d, month_names + mon * 3, 4 + (y < 0), y); break; case 1: pos += snprintf(buf + pos, sizeof(buf) - pos, "%.3s %.3s %02d %0*d", day_names + wd * 3, month_names + mon * 3, d, 4 + (y < 0), y); if (part == 3) { buf[pos++] = ' '; } break; case 2: if (y >= 0 && y <= 9999) { pos += snprintf(buf + pos, sizeof(buf) - pos, "%04d", y); } else { pos += snprintf(buf + pos, sizeof(buf) - pos, "%+07d", y); } pos += snprintf(buf + pos, sizeof(buf) - pos, "-%02d-%02dT", mon + 1, d); break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d/%02d/%0*d", mon + 1, d, 4 + (y < 0), y); if (part == 3) { buf[pos++] = ','; buf[pos++] = ' '; } break; } } if (part & 2) { /* time part */ switch(fmt) { case 0: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d GMT", h, m, s); break; case 1: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d GMT", h, m, s); if (tz < 0) { buf[pos++] = '-'; tz = -tz; } else { buf[pos++] = '+'; } /* tz is >= 0, can use % */ pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d%02d", tz / 60, tz % 60); /* XXX: tack the time zone code? */ break; case 2: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d.%03dZ", h, m, s, ms); break; case 3: pos += snprintf(buf + pos, sizeof(buf) - pos, "%02d:%02d:%02d %cM", (h + 11) % 12 + 1, m, s, (h < 12) ? 'A' : 'P'); break; } } if (!pos) { // XXX: should throw exception? return JS_AtomToString(ctx, JS_ATOM_empty_string); } return js_new_string8_len(ctx, buf, pos); }
O1
c
get_date_string: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %r9d, %ebx movq %rdi, %rbp movl %r9d, %r8d shrl $0x4, %r8d movl %r8d, %r12d andl $0xf, %r12d movl %r9d, %r13d andl $0xf, %r13d andl $0x1, %r8d leaq 0x80(%rsp), %rcx xorl %r14d, %r14d xorl %r9d, %r9d callq 0x5aac5 movl $0x6, %r15d testl %eax, %eax js 0x5a085 je 0x5a06b movq %rbp, 0x38(%rsp) cvttsd2si 0x98(%rsp), %r9d cvttsd2si 0xa0(%rsp), %r8d cvttsd2si 0xa8(%rsp), %r14d cvttsd2si 0xb0(%rsp), %edx cvttsd2si 0xc0(%rsp), %r15d xorl %ebp, %ebp movl %r12d, %esi testb $0x1, %bl je 0x5a1de cmpl $0x3, %r12d ja 0x5a1de movl %edx, 0x14(%rsp) movl %r15d, 0x18(%rsp) movq %r9, 0x28(%rsp) movl %r8d, 0x1c(%rsp) cvttsd2si 0x80(%rsp), %ecx cvttsd2si 0x88(%rsp), %r15d cvttsd2si 0x90(%rsp), %r10d cvttsd2si 0xb8(%rsp), %eax leaq 0x4700c(%rip), %rdx # 0xa1014 movq %rsi, 0x20(%rsp) movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi leal (%rax,%rax,2), %eax movslq %eax, %rdx leaq 0x487cd(%rip), %rax # 0xa27f0 addq %rdx, %rax leal (%r15,%r15,2), %edx movslq %edx, %rdx leaq 0x487dc(%rip), %r9 # 0xa2810 addq %rdx, %r9 movl %ecx, %edx shrl $0x1f, %edx orl $0x4, %edx movl %ecx, 0x8(%rsp) movl %edx, (%rsp) leaq 0x4a889(%rip), %rdx # 0xa48d6 leaq 0x40(%rsp), %rdi movl $0x40, %esi movq %rax, %rcx movl %r10d, %r8d xorl %eax, %eax callq 0xe300 movl %eax, %ebp jmp 0x5a1c6 cmpl $0x2, %r12d jne 0x5a08c leaq 0x4a83f(%rip), %rsi # 0xa48b7 xorl %r14d, %r14d movq %rbp, %rdi xorl %eax, %eax callq 0x24b39 xorl %ebx, %ebx jmp 0x5a374 leaq 0x4a836(%rip), %rsi # 0xa48c9 movq %rbp, %rdi movl $0xc, %edx callq 0x24239 movq %rax, %r14 movq %rdx, %r15 movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 jmp 0x5a34e cmpl $0x2710, %ecx # imm = 0x2710 leaq 0x4a83e(%rip), %rax # 0xa4900 leaq 0x4a83c(%rip), %rdx # 0xa4905 cmovbq %rax, %rdx leaq 0x40(%rsp), %rdi movl %r14d, 0x34(%rsp) movl $0x40, %r14d movl $0x40, %esi xorl %eax, %eax movl %r10d, %r13d callq 0xe300 movslq %eax, %rbp leaq (%rsp,%rbp), %rdi addq $0x40, %rdi subq %rbp, %r14 incl %r15d leaq 0x4a807(%rip), %rdx # 0xa490b movq %r14, %rsi movl 0x34(%rsp), %r14d movl %r15d, %ecx movl %r13d, %r8d xorl %eax, %eax callq 0xe300 addl %eax, %ebp jmp 0x5a1c6 incl %r15d movl %ecx, %r9d shrl $0x1f, %r9d orl $0x4, %r9d movl %ecx, (%rsp) leaq 0x4a7df(%rip), %rdx # 0xa4917 leaq 0x40(%rsp), %rdi movl $0x40, %esi movl %r15d, %ecx movl %r10d, %r8d xorl %eax, %eax callq 0xe300 movl %eax, %ebp cmpl $0x3, %r13d jne 0x5a1c6 movslq %ebp, %rax movw $0x202c, 0x40(%rsp,%rax) # imm = 0x202C addl $0x2, %ebp jmp 0x5a1c6 leal (%rax,%rax,2), %eax movslq %eax, %rdx leaq 0x4867d(%rip), %rax # 0xa27f0 addq %rdx, %rax leal (%r15,%r15,2), %edx movslq %edx, %rdx leaq 0x4868c(%rip), %r8 # 0xa2810 addq %rdx, %r8 movl %ecx, %edx shrl $0x1f, %edx orl $0x4, %edx movl %ecx, 0x8(%rsp) movl %edx, (%rsp) leaq 0x4a74f(%rip), %rdx # 0xa48ec leaq 0x40(%rsp), %rdi movl $0x40, %esi movq %rax, %rcx movl %r10d, %r9d xorl %eax, %eax callq 0xe300 movl %eax, %ebp cmpl $0x3, %r13d jne 0x5a1c6 movslq %ebp, %rax incl %ebp movb $0x20, 0x40(%rsp,%rax) movl 0x1c(%rsp), %r8d movq 0x28(%rsp), %r9 movl 0x18(%rsp), %r15d movl 0x14(%rsp), %edx movq 0x20(%rsp), %rsi testb $0x2, %bl je 0x5a329 cmpl $0x3, %r12d ja 0x5a329 leaq 0x46e2c(%rip), %rax # 0xa1024 movslq (%rax,%rsi,4), %rcx addq %rax, %rcx jmpq *%rcx movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leaq 0x4a70b(%rip), %rdx # 0xa4926 jmp 0x5a23a movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi movl %edx, (%rsp) leaq 0x4a708(%rip), %rdx # 0xa4942 movl %r9d, %ecx jmp 0x5a296 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leal 0xb(%r9), %eax cltq imulq $0x2aaaaaab, %rax, %rax # imm = 0x2AAAAAAB movq %rax, %rcx shrq $0x3f, %rcx shrq $0x21, %rax addl %ecx, %eax shll $0x2, %eax leal (%rax,%rax,2), %eax negl %eax leal (%r9,%rax), %ecx addl $0xc, %ecx cmpl $0xc, %r9d movl $0x41, %eax movl $0x50, %edx cmovll %eax, %edx movl %edx, (%rsp) leaq 0x4a6c1(%rip), %rdx # 0xa4957 movl %r14d, %r9d xorl %eax, %eax callq 0xe300 addl %ebp, %eax movl %eax, %ebp jmp 0x5a329 movslq %ebp, %rax leaq (%rsp,%rax), %rdi addq $0x40, %rdi movl $0x40, %esi subq %rax, %rsi leaq 0x4a663(%rip), %rdx # 0xa4926 movl %r9d, %ecx movl %r14d, %r9d xorl %eax, %eax callq 0xe300 addl %ebp, %eax movslq %eax, %rbx testl %r15d, %r15d js 0x5a2e1 movb $0x2b, 0x40(%rsp,%rbx) jmp 0x5a2e9 movb $0x2d, 0x40(%rsp,%rbx) negl %r15d leaq 0x40(%rsp), %rax leaq (%rbx,%rax), %rdi incq %rdi movl $0x3f, %esi subq %rbx, %rsi movl %r15d, %eax movl $0x88888889, %ecx # imm = 0x88888889 imulq %rax, %rcx shrq $0x25, %rcx imull $0x3c, %ecx, %eax subl %eax, %r15d leaq 0x4a61f(%rip), %rdx # 0xa4939 movl %r15d, %r8d xorl %eax, %eax callq 0xe300 leal (%rbx,%rax), %ebp incl %ebp movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 testl %ebp, %ebp je 0x5a353 leaq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdi movl %ebp, %edx callq 0x24239 movq %rax, %r14 movq %rdx, %r15 andq %rax, %rbx jmp 0x5a374 movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r14 incl (%r14) andq %r14, %rbx movq $-0x7, %r15 movl %r14d, %eax orq %rbx, %rax movq %r15, %rdx addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
get_date_string: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov ebx, r9d mov rbp, rdi mov r8d, r9d shr r8d, 4 mov r12d, r8d and r12d, 0Fh mov r13d, r9d and r13d, 0Fh and r8d, 1 lea rcx, [rsp+0F8h+var_78] xor r14d, r14d xor r9d, r9d call get_date_fields mov r15d, 6 test eax, eax js loc_5A085 jz loc_5A06B mov [rsp+0F8h+var_C0], rbp cvttsd2si r9d, [rsp+0F8h+var_60] cvttsd2si r8d, [rsp+0F8h+var_58] cvttsd2si r14d, [rsp+0F8h+var_50] cvttsd2si edx, [rsp+0F8h+var_48] cvttsd2si r15d, [rsp+0F8h+var_38] xor ebp, ebp mov esi, r12d test bl, 1 jz def_5A014; jumptable 000000000005A014 default case cmp r12d, 3; switch 4 cases ja def_5A014; jumptable 000000000005A014 default case mov [rsp+0F8h+var_E4], edx mov [rsp+0F8h+var_E0], r15d mov [rsp+0F8h+var_D0], r9 mov [rsp+0F8h+var_DC], r8d cvttsd2si ecx, [rsp+0F8h+var_78] cvttsd2si r15d, [rsp+0F8h+var_70] cvttsd2si r10d, [rsp+0F8h+var_68] cvttsd2si eax, [rsp+0F8h+var_40] lea rdx, jpt_5A014 mov [rsp+0F8h+var_D8], rsi movsxd rsi, ds:(jpt_5A014 - 0A1014h)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_5A016: lea eax, [rax+rax*2]; jumptable 000000000005A014 case 0 movsxd rdx, eax lea rax, day_names; "SunMonTueWedThuFriSat" add rax, rdx lea edx, [r15+r15*2] movsxd rdx, edx lea r9, month_names; "JanFebMarAprMayJunJulAugSepOctNovDec" add r9, rdx mov edx, ecx shr edx, 1Fh or edx, 4 mov [rsp+0F8h+var_F0], ecx mov [rsp+0F8h+var_F8], edx lea rdx, a3s02d3s0D; "%.3s, %02d %.3s %0*d " lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov rcx, rax mov r8d, r10d xor eax, eax call _snprintf mov ebp, eax jmp loc_5A1C6 loc_5A06B: cmp r12d, 2 jnz short loc_5A08C lea rsi, aDateValueIsNan; "Date value is NaN" xor r14d, r14d mov rdi, rbp xor eax, eax call JS_ThrowRangeError loc_5A085: xor ebx, ebx jmp loc_5A374 loc_5A08C: lea rsi, aInvalidDate; "Invalid Date" mov rdi, rbp mov edx, 0Ch call js_new_string8_len mov r14, rax mov r15, rdx mov rbx, 0FFFFFFFF00000000h jmp loc_5A34E loc_5A0B5: cmp ecx, 2710h; jumptable 000000000005A014 case 2 lea rax, a04d; "%04d" lea rdx, a07d; "%+07d" cmovb rdx, rax lea rdi, [rsp+0F8h+var_B8] mov [rsp+0F8h+var_C4], r14d mov r14d, 40h ; '@' mov esi, 40h ; '@' xor eax, eax mov r13d, r10d call _snprintf movsxd rbp, eax lea rdi, [rsp+rbp+0F8h+var_F8] add rdi, 40h ; '@' sub r14, rbp inc r15d lea rdx, a02d02dt; "-%02d-%02dT" mov rsi, r14 mov r14d, [rsp+0F8h+var_C4] mov ecx, r15d mov r8d, r13d xor eax, eax call _snprintf add ebp, eax jmp loc_5A1C6 loc_5A120: inc r15d; jumptable 000000000005A014 case 3 mov r9d, ecx shr r9d, 1Fh or r9d, 4 mov [rsp+0F8h+var_F8], ecx lea rdx, a02d02d0D; "%02d/%02d/%0*d" lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov ecx, r15d mov r8d, r10d xor eax, eax call _snprintf mov ebp, eax cmp r13d, 3 jnz short loc_5A1C6 movsxd rax, ebp mov [rsp+rax+0F8h+var_B8], 202Ch add ebp, 2 jmp short loc_5A1C6 loc_5A166: lea eax, [rax+rax*2]; jumptable 000000000005A014 case 1 movsxd rdx, eax lea rax, day_names; "SunMonTueWedThuFriSat" add rax, rdx lea edx, [r15+r15*2] movsxd rdx, edx lea r8, month_names; "JanFebMarAprMayJunJulAugSepOctNovDec" add r8, rdx mov edx, ecx shr edx, 1Fh or edx, 4 mov [rsp+0F8h+var_F0], ecx mov [rsp+0F8h+var_F8], edx lea rdx, a3s3s02d0D; "%.3s %.3s %02d %0*d" lea rdi, [rsp+0F8h+var_B8] mov esi, 40h ; '@' mov rcx, rax mov r9d, r10d xor eax, eax call _snprintf mov ebp, eax cmp r13d, 3 jnz short loc_5A1C6 movsxd rax, ebp inc ebp mov byte ptr [rsp+rax+0F8h+var_B8], 20h ; ' ' loc_5A1C6: mov r8d, [rsp+0F8h+var_DC] mov r9, [rsp+0F8h+var_D0] mov r15d, [rsp+0F8h+var_E0] mov edx, [rsp+0F8h+var_E4] mov rsi, [rsp+0F8h+var_D8] def_5A014: test bl, 2; jumptable 000000000005A014 default case jz def_5A1FF; jumptable 000000000005A1FF default case cmp r12d, 3; switch 4 cases ja def_5A1FF; jumptable 000000000005A1FF default case lea rax, jpt_5A1FF movsxd rcx, ds:(jpt_5A1FF - 0A1024h)[rax+rsi*4] add rcx, rax jmp rcx; switch jump loc_5A201: movsxd rax, ebp; jumptable 000000000005A1FF case 0 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea rdx, a02d02d02dGmt; "%02d:%02d:%02d GMT" jmp short loc_5A23A loc_5A21D: movsxd rax, ebp; jumptable 000000000005A1FF case 2 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax mov [rsp+0F8h+var_F8], edx lea rdx, a02d02d02d03dz; "%02d:%02d:%02d.%03dZ" loc_5A23A: mov ecx, r9d jmp short loc_5A296 loc_5A23F: movsxd rax, ebp; jumptable 000000000005A1FF case 3 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea eax, [r9+0Bh] cdqe imul rax, 2AAAAAABh mov rcx, rax shr rcx, 3Fh shr rax, 21h add eax, ecx shl eax, 2 lea eax, [rax+rax*2] neg eax lea ecx, [r9+rax] add ecx, 0Ch cmp r9d, 0Ch mov eax, 41h ; 'A' mov edx, 50h ; 'P' cmovl edx, eax mov [rsp+0F8h+var_F8], edx lea rdx, a02d02d02dCm; "%02d:%02d:%02d %cM" loc_5A296: mov r9d, r14d xor eax, eax call _snprintf add eax, ebp mov ebp, eax jmp def_5A1FF; jumptable 000000000005A1FF default case loc_5A2A9: movsxd rax, ebp; jumptable 000000000005A1FF case 1 lea rdi, [rsp+rax+0F8h+var_F8] add rdi, 40h ; '@' mov esi, 40h ; '@' sub rsi, rax lea rdx, a02d02d02dGmt; "%02d:%02d:%02d GMT" mov ecx, r9d mov r9d, r14d xor eax, eax call _snprintf add eax, ebp movsxd rbx, eax test r15d, r15d js short loc_5A2E1 mov byte ptr [rsp+rbx+0F8h+var_B8], 2Bh ; '+' jmp short loc_5A2E9 loc_5A2E1: mov byte ptr [rsp+rbx+0F8h+var_B8], 2Dh ; '-' neg r15d loc_5A2E9: lea rax, [rsp+0F8h+var_B8] lea rdi, [rbx+rax] inc rdi mov esi, 3Fh ; '?' sub rsi, rbx mov eax, r15d mov ecx, 88888889h imul rcx, rax shr rcx, 25h imul eax, ecx, 3Ch ; '<' sub r15d, eax lea rdx, a02d02d; "%02d%02d" mov r8d, r15d xor eax, eax call _snprintf lea ebp, [rbx+rax] inc ebp def_5A1FF: mov rbx, 0FFFFFFFF00000000h; jumptable 000000000005A1FF default case test ebp, ebp jz short loc_5A353 lea rsi, [rsp+0F8h+var_B8] mov rdi, [rsp+0F8h+var_C0] mov edx, ebp call js_new_string8_len mov r14, rax mov r15, rdx loc_5A34E: and rbx, rax jmp short loc_5A374 loc_5A353: mov rax, [rsp+0F8h+var_C0] mov rax, [rax+18h] mov rax, [rax+68h] mov r14, [rax+178h] inc dword ptr [r14] and rbx, r14 mov r15, 0FFFFFFFFFFFFFFF9h loc_5A374: mov eax, r14d or rax, rbx mov rdx, r15 add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long get_date_string( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, unsigned int a14) { char v14; // bl int v15; // r12d int v16; // r13d unsigned long long v17; // r14 int date_fields; // eax 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; // r9 long long v26; // r8 unsigned int v27; // r14d int v28; // edx int v29; // r15d signed int v30; // ebp long long v31; // rcx int v32; // r10d int v33; // eax unsigned long long v34; // rbx long long v35; // rax const char *v36; // rdx int v37; // r13d int v38; // ebp long long v39; // rax char *v40; // rdi long long v41; // rsi const char *v42; // rdx long long v43; // rcx int v44; // edx int v45; // eax long long v47; // [rsp+0h] [rbp-F8h] int v48; // [rsp+14h] [rbp-E4h] int v49; // [rsp+18h] [rbp-E0h] unsigned int v50; // [rsp+1Ch] [rbp-DCh] int v51; // [rsp+28h] [rbp-D0h] _BYTE v53[64]; // [rsp+40h] [rbp-B8h] BYREF double v54[2]; // [rsp+80h] [rbp-78h] BYREF double v55; // [rsp+90h] [rbp-68h] double v56; // [rsp+98h] [rbp-60h] double v57; // [rsp+A0h] [rbp-58h] double v58; // [rsp+A8h] [rbp-50h] double v59; // [rsp+B0h] [rbp-48h] double v60; // [rsp+B8h] [rbp-40h] double v61; // [rsp+C0h] [rbp-38h] v14 = a14; v15 = (unsigned __int8)a14 >> 4; v16 = a14 & 0xF; LODWORD(v17) = 0; date_fields = get_date_fields(a1, a2, a3, v54, (a14 >> 4) & 1, 0LL); if ( date_fields >= 0 ) { if ( date_fields ) { v25 = (unsigned int)(int)v56; v26 = (unsigned int)(int)v57; v27 = (int)v58; v28 = (int)v59; v29 = (int)v61; v30 = 0; if ( (v14 & 1) != 0 ) { v48 = (int)v59; v49 = (int)v61; v51 = (int)v56; v50 = (int)v57; v31 = (unsigned int)(int)v54[0]; v29 = (int)v54[1]; v32 = (int)v55; v33 = (int)v60; switch ( v15 ) { case 0: v30 = snprintf( v53, 64LL, "%.3s, %02d %.3s %0*d ", &day_names[3 * v33], v32, &month_names[3 * v29], ((unsigned int)v31 >> 31) | 4, v31); goto LABEL_17; case 1: v30 = snprintf( v53, 64LL, "%.3s %.3s %02d %0*d", &day_names[3 * v33], &month_names[3 * v29], v32, ((unsigned int)v31 >> 31) | 4, v31); if ( v16 == 3 ) { v39 = v30++; v53[v39] = 32; } goto LABEL_17; case 2: v36 = "%+07d"; if ( (unsigned int)v31 < 0x2710 ) v36 = "%04d"; v37 = (int)v55; v38 = snprintf(v53, 64LL, v36, v31, v26, v25); v30 = snprintf(&v53[v38], 64LL - v38, "-%02d-%02dT", v29 + 1, v37) + v38; goto LABEL_17; case 3: v30 = snprintf(v53, 64LL, "%02d/%02d/%0*d", v29 + 1, v32, ((unsigned int)v31 >> 31) | 4, v31); if ( v16 == 3 ) { *(_WORD *)&v53[v30] = 8236; v30 += 2; } LABEL_17: v26 = v50; LODWORD(v25) = v51; v29 = v49; v28 = v48; break; default: break; } } if ( (v14 & 2) != 0 ) { switch ( v15 ) { case 0: v40 = &v53[v30]; v41 = 64LL - v30; v42 = "%02d:%02d:%02d GMT"; goto LABEL_22; case 1: v45 = v30 + snprintf(&v53[v30], 64LL - v30, "%02d:%02d:%02d GMT", v25, v26, v27); if ( v29 < 0 ) { v53[v45] = 45; v29 = -v29; } else { v53[v45] = 43; } v30 = v45 + snprintf(&v53[v45 + 1], 63LL - v45, "%02d%02d", v29 / 0x3Cu, v29 % 0x3Cu) + 1; break; case 2: v40 = &v53[v30]; v41 = 64LL - v30; LODWORD(v47) = v28; v42 = "%02d:%02d:%02d.%03dZ"; LABEL_22: v43 = (unsigned int)v25; goto LABEL_26; case 3: v40 = &v53[v30]; v41 = 64LL - v30; v43 = (unsigned int)(v25 - 12 * (((int)v25 + 11) / 12) + 12); v44 = 80; if ( (int)v25 < 12 ) v44 = 65; LODWORD(v47) = v44; v42 = "%02d:%02d:%02d %cM"; LABEL_26: v30 += snprintf(v40, v41, v42, v43, v26, v27, v47); break; default: break; } } if ( !v30 ) { v17 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*(_DWORD *)v17; v34 = v17 & 0xFFFFFFFF00000000LL; return v34 | (unsigned int)v17; } v35 = js_new_string8_len(a1, (long long)v53, v30); LODWORD(v17) = v35; goto LABEL_33; } if ( v15 != 2 ) { v35 = js_new_string8_len(a1, (long long)"Invalid Date", 0xCu); LODWORD(v17) = v35; LABEL_33: v34 = v35 & 0xFFFFFFFF00000000LL; return v34 | (unsigned int)v17; } LODWORD(v17) = 0; JS_ThrowRangeError(a1, (long long)"Date value is NaN", v19, v20, v21, v22, a4, a5, a6, a7, v23, v24, a10, a11, v47); } v34 = 0LL; return v34 | (unsigned int)v17; }
get_date_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV EBX,R9D MOV RBP,RDI MOV R8D,R9D SHR R8D,0x4 MOV R12D,R8D AND R12D,0xf MOV R13D,R9D AND R13D,0xf AND R8D,0x1 LEA RCX,[RSP + 0x80] XOR R14D,R14D XOR R9D,R9D CALL 0x0015aac5 MOV R15D,0x6 TEST EAX,EAX JS 0x0015a085 JZ 0x0015a06b MOV qword ptr [RSP + 0x38],RBP CVTTSD2SI R9D,qword ptr [RSP + 0x98] CVTTSD2SI R8D,qword ptr [RSP + 0xa0] CVTTSD2SI R14D,qword ptr [RSP + 0xa8] CVTTSD2SI EDX,qword ptr [RSP + 0xb0] CVTTSD2SI R15D,qword ptr [RSP + 0xc0] XOR EBP,EBP MOV ESI,R12D TEST BL,0x1 JZ 0x0015a1de CMP R12D,0x3 JA 0x0015a1de MOV dword ptr [RSP + 0x14],EDX MOV dword ptr [RSP + 0x18],R15D MOV qword ptr [RSP + 0x28],R9 MOV dword ptr [RSP + 0x1c],R8D CVTTSD2SI ECX,qword ptr [RSP + 0x80] CVTTSD2SI R15D,qword ptr [RSP + 0x88] CVTTSD2SI R10D,qword ptr [RSP + 0x90] CVTTSD2SI EAX,qword ptr [RSP + 0xb8] LEA RDX,[0x1a1014] MOV qword ptr [RSP + 0x20],RSI MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_0: LEA EAX,[RAX + RAX*0x2] MOVSXD RDX,EAX LEA RAX,[0x1a27f0] ADD RAX,RDX LEA EDX,[R15 + R15*0x2] MOVSXD RDX,EDX LEA R9,[0x1a2810] ADD R9,RDX MOV EDX,ECX SHR EDX,0x1f OR EDX,0x4 MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EDX LEA RDX,[0x1a48d6] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV RCX,RAX MOV R8D,R10D XOR EAX,EAX CALL 0x0010e300 MOV EBP,EAX JMP 0x0015a1c6 LAB_0015a06b: CMP R12D,0x2 JNZ 0x0015a08c LEA RSI,[0x1a48b7] XOR R14D,R14D MOV RDI,RBP XOR EAX,EAX CALL 0x00124b39 LAB_0015a085: XOR EBX,EBX JMP 0x0015a374 LAB_0015a08c: LEA RSI,[0x1a48c9] MOV RDI,RBP MOV EDX,0xc CALL 0x00124239 MOV R14,RAX MOV R15,RDX MOV RBX,-0x100000000 JMP 0x0015a34e caseD_2: CMP ECX,0x2710 LEA RAX,[0x1a4900] LEA RDX,[0x1a4905] CMOVC RDX,RAX LEA RDI,[RSP + 0x40] MOV dword ptr [RSP + 0x34],R14D MOV R14D,0x40 MOV ESI,0x40 XOR EAX,EAX MOV R13D,R10D CALL 0x0010e300 MOVSXD RBP,EAX LEA RDI,[RSP + RBP*0x1] ADD RDI,0x40 SUB R14,RBP INC R15D LEA RDX,[0x1a490b] MOV RSI,R14 MOV R14D,dword ptr [RSP + 0x34] MOV ECX,R15D MOV R8D,R13D XOR EAX,EAX CALL 0x0010e300 ADD EBP,EAX JMP 0x0015a1c6 caseD_3: INC R15D MOV R9D,ECX SHR R9D,0x1f OR R9D,0x4 MOV dword ptr [RSP],ECX LEA RDX,[0x1a4917] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV ECX,R15D MOV R8D,R10D XOR EAX,EAX CALL 0x0010e300 MOV EBP,EAX CMP R13D,0x3 JNZ 0x0015a1c6 MOVSXD RAX,EBP MOV word ptr [RSP + RAX*0x1 + 0x40],0x202c ADD EBP,0x2 JMP 0x0015a1c6 caseD_1: LEA EAX,[RAX + RAX*0x2] MOVSXD RDX,EAX LEA RAX,[0x1a27f0] ADD RAX,RDX LEA EDX,[R15 + R15*0x2] MOVSXD RDX,EDX LEA R8,[0x1a2810] ADD R8,RDX MOV EDX,ECX SHR EDX,0x1f OR EDX,0x4 MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EDX LEA RDX,[0x1a48ec] LEA RDI,[RSP + 0x40] MOV ESI,0x40 MOV RCX,RAX MOV R9D,R10D XOR EAX,EAX CALL 0x0010e300 MOV EBP,EAX CMP R13D,0x3 JNZ 0x0015a1c6 MOVSXD RAX,EBP INC EBP MOV byte ptr [RSP + RAX*0x1 + 0x40],0x20 LAB_0015a1c6: MOV R8D,dword ptr [RSP + 0x1c] MOV R9,qword ptr [RSP + 0x28] MOV R15D,dword ptr [RSP + 0x18] MOV EDX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RSP + 0x20] LAB_0015a1de: TEST BL,0x2 JZ 0x0015a329 CMP R12D,0x3 JA 0x0015a329 LEA RAX,[0x1a1024] MOVSXD RCX,dword ptr [RAX + RSI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_0: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA RDX,[0x1a4926] JMP 0x0015a23a caseD_2: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX MOV dword ptr [RSP],EDX LEA RDX,[0x1a4942] LAB_0015a23a: MOV ECX,R9D JMP 0x0015a296 caseD_3: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA EAX,[R9 + 0xb] CDQE IMUL RAX,RAX,0x2aaaaaab MOV RCX,RAX SHR RCX,0x3f SHR RAX,0x21 ADD EAX,ECX SHL EAX,0x2 LEA EAX,[RAX + RAX*0x2] NEG EAX LEA ECX,[R9 + RAX*0x1] ADD ECX,0xc CMP R9D,0xc MOV EAX,0x41 MOV EDX,0x50 CMOVL EDX,EAX MOV dword ptr [RSP],EDX LEA RDX,[0x1a4957] LAB_0015a296: MOV R9D,R14D XOR EAX,EAX CALL 0x0010e300 ADD EAX,EBP MOV EBP,EAX JMP 0x0015a329 caseD_1: MOVSXD RAX,EBP LEA RDI,[RSP + RAX*0x1] ADD RDI,0x40 MOV ESI,0x40 SUB RSI,RAX LEA RDX,[0x1a4926] MOV ECX,R9D MOV R9D,R14D XOR EAX,EAX CALL 0x0010e300 ADD EAX,EBP MOVSXD RBX,EAX TEST R15D,R15D JS 0x0015a2e1 MOV byte ptr [RSP + RBX*0x1 + 0x40],0x2b JMP 0x0015a2e9 LAB_0015a2e1: MOV byte ptr [RSP + RBX*0x1 + 0x40],0x2d NEG R15D LAB_0015a2e9: LEA RAX,[RSP + 0x40] LEA RDI,[RBX + RAX*0x1] INC RDI MOV ESI,0x3f SUB RSI,RBX MOV EAX,R15D MOV ECX,0x88888889 IMUL RCX,RAX SHR RCX,0x25 IMUL EAX,ECX,0x3c SUB R15D,EAX LEA RDX,[0x1a4939] MOV R8D,R15D XOR EAX,EAX CALL 0x0010e300 LEA EBP,[RBX + RAX*0x1] INC EBP default: MOV RBX,-0x100000000 TEST EBP,EBP JZ 0x0015a353 LEA RSI,[RSP + 0x40] MOV RDI,qword ptr [RSP + 0x38] MOV EDX,EBP CALL 0x00124239 MOV R14,RAX MOV R15,RDX LAB_0015a34e: AND RBX,RAX JMP 0x0015a374 LAB_0015a353: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R14,qword ptr [RAX + 0x178] INC dword ptr [R14] AND RBX,R14 MOV R15,-0x7 LAB_0015a374: MOV EAX,R14D OR RAX,RBX MOV RDX,R15 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] get_date_string(long param_1) { int *piVar1; int iVar2; int iVar3; long lVar4; uint uVar5; char *pcVar6; ulong uVar7; int4 uVar8; uint in_R9D; uint uVar9; uint uVar10; uint uVar11; uint uVar12; int iVar13; int1 auVar14 [16]; int1 auVar15 [16]; char local_b8 [64]; double local_78; double local_70; double local_68; double local_60; double local_58; double local_50; double local_40; double local_38; uVar11 = in_R9D >> 4 & 0xf; uVar8 = 0; iVar2 = get_date_fields(); if (iVar2 < 0) { LAB_0015a085: auVar14 = ZEXT816(6) << 0x40; uVar7 = 0; goto LAB_0015a374; } if (iVar2 == 0) { if (uVar11 == 2) { JS_ThrowRangeError(param_1,"Date value is NaN"); goto LAB_0015a085; } auVar14 = js_new_string8_len(param_1,"Invalid Date",0xc); goto LAB_0015a34e; } uVar9 = (uint)local_60; uVar7 = CONCAT44(uVar8,(int)local_58); uVar12 = (uint)local_38; iVar2 = 0; if (((in_R9D & 1) != 0) && (iVar2 = 0, uVar11 < 4)) { uVar5 = (uint)local_78; iVar13 = (int)local_70; uVar10 = (uint)local_68; switch(uVar11) { case 0: iVar2 = snprintf(local_b8,0x40,"%.3s, %02d %.3s %0*d ", "SunMonTueWedThuFriSat" + (int)local_40 * 3,(ulong)uVar10, "JanFebMarAprMayJunJulAugSepOctNovDec" + iVar13 * 3,uVar5 >> 0x1f | 4,uVar5); break; case 1: iVar2 = snprintf(local_b8,0x40,"%.3s %.3s %02d %0*d", "SunMonTueWedThuFriSat" + (int)local_40 * 3, "JanFebMarAprMayJunJulAugSepOctNovDec" + iVar13 * 3,(ulong)uVar10, uVar5 >> 0x1f | 4,uVar5); if ((in_R9D & 0xf) == 3) { lVar4 = (long)iVar2; iVar2 = iVar2 + 1; local_b8[lVar4] = ' '; } break; case 2: pcVar6 = "%+07d"; if (uVar5 < 10000) { pcVar6 = "%04d"; } iVar2 = snprintf(local_b8,0x40,pcVar6); iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,"-%02d-%02dT",(ulong)(iVar13 + 1), (ulong)uVar10); iVar2 = iVar2 + iVar13; break; case 3: iVar2 = snprintf(local_b8,0x40,"%02d/%02d/%0*d",(ulong)(iVar13 + 1),(ulong)uVar10, (ulong)(uVar5 >> 0x1f | 4),uVar5); if ((in_R9D & 0xf) == 3) { (local_b8 + iVar2)[0] = ','; (local_b8 + iVar2)[1] = ' '; iVar2 = iVar2 + 2; } } uVar7 = (ulong)(uint)(int)local_58; } if ((in_R9D & 2) == 0) goto switchD_0015a1ff_default; switch(uVar11) { case 0: pcVar6 = "%02d:%02d:%02d GMT"; break; case 1: iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,"%02d:%02d:%02d GMT",uVar9,uVar7, (ulong)(uint)(int)local_50); lVar4 = (long)(iVar13 + iVar2); if ((int)uVar12 < 0) { local_b8[lVar4] = '-'; uVar12 = -uVar12; } else { local_b8[lVar4] = '+'; } iVar3 = snprintf(local_b8 + lVar4 + 1,0x3f - lVar4,"%02d%02d",(ulong)uVar12 / 0x3c, (ulong)(uVar12 % 0x3c)); iVar2 = iVar13 + iVar2 + iVar3 + 1; goto switchD_0015a1ff_default; case 2: pcVar6 = "%02d:%02d:%02d.%03dZ"; break; case 3: iVar13 = (int)(uVar9 + 0xb) >> 0x1f; uVar9 = uVar9 + (((uint)((int)(uVar9 + 0xb) / 6 + iVar13) >> 1) - iVar13) * -0xc + 0xc; pcVar6 = "%02d:%02d:%02d %cM"; break; default: goto switchD_0015a1ff_default; } iVar13 = snprintf(local_b8 + iVar2,0x40 - (long)iVar2,pcVar6,(ulong)uVar9,uVar7, (ulong)(uint)(int)local_50); iVar2 = iVar13 + iVar2; switchD_0015a1ff_default: if (iVar2 == 0) { piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar1 = *piVar1 + 1; uVar7 = (ulong)piVar1 & 0xffffffff00000000; auVar14._8_8_ = 0xfffffffffffffff9; auVar14._0_8_ = piVar1; } else { auVar14 = js_new_string8_len(param_1,local_b8,iVar2); LAB_0015a34e: uVar7 = auVar14._0_8_ & 0xffffffff00000000; } LAB_0015a374: auVar15._0_8_ = auVar14._0_8_ & 0xffffffff | uVar7; auVar15._8_8_ = auVar14._8_8_; return auVar15; }
1,297
PVG_FT_Stroker_New
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c
PVG_FT_Error PVG_FT_Stroker_New(PVG_FT_Stroker* astroker) { PVG_FT_Error error = 0; /* assigned in PVG_FT_NEW */ PVG_FT_Stroker stroker = NULL; stroker = (PVG_FT_StrokerRec*)calloc(1, sizeof(PVG_FT_StrokerRec)); if (stroker) { ft_stroke_border_init(&stroker->borders[0]); ft_stroke_border_init(&stroker->borders[1]); } *astroker = stroker; return error; }
O1
c
PVG_FT_Stroker_New: pushq %rbx movq %rdi, %rbx movl $0x1, %edi movl $0xc0, %esi callq 0x3130 testq %rax, %rax je 0x1cf17 xorps %xmm0, %xmm0 movups %xmm0, 0x70(%rax) xorl %ecx, %ecx movq %rcx, 0x80(%rax) movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl %edx, 0x8c(%rax) movb %cl, 0x90(%rax) movups %xmm0, 0x98(%rax) movq %rcx, 0xa8(%rax) movl %edx, 0xb4(%rax) movb %cl, 0xb8(%rax) movq %rax, (%rbx) xorl %eax, %eax popq %rbx retq
PVG_FT_Stroker_New: push rbx mov rbx, rdi mov edi, 1 mov esi, 0C0h call _calloc test rax, rax jz short loc_1CF17 xorps xmm0, xmm0 movups xmmword ptr [rax+70h], xmm0 xor ecx, ecx mov [rax+80h], rcx mov edx, 0FFFFFFFFh mov [rax+8Ch], edx mov [rax+90h], cl movups xmmword ptr [rax+98h], xmm0 mov [rax+0A8h], rcx mov [rax+0B4h], edx mov [rax+0B8h], cl loc_1CF17: mov [rbx], rax xor eax, eax pop rbx retn
long long PVG_FT_Stroker_New(long long *a1) { long long v1; // rax v1 = calloc(1LL, 192LL); if ( v1 ) { *(_OWORD *)(v1 + 112) = 0LL; *(_QWORD *)(v1 + 128) = 0LL; *(_DWORD *)(v1 + 140) = -1; *(_BYTE *)(v1 + 144) = 0; *(_OWORD *)(v1 + 152) = 0LL; *(_QWORD *)(v1 + 168) = 0LL; *(_DWORD *)(v1 + 180) = -1; *(_BYTE *)(v1 + 184) = 0; } *a1 = v1; return 0LL; }
PVG_FT_Stroker_New: PUSH RBX MOV RBX,RDI MOV EDI,0x1 MOV ESI,0xc0 CALL 0x00103130 TEST RAX,RAX JZ 0x0011cf17 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x70],XMM0 XOR ECX,ECX MOV qword ptr [RAX + 0x80],RCX MOV EDX,0xffffffff MOV dword ptr [RAX + 0x8c],EDX MOV byte ptr [RAX + 0x90],CL MOVUPS xmmword ptr [RAX + 0x98],XMM0 MOV qword ptr [RAX + 0xa8],RCX MOV dword ptr [RAX + 0xb4],EDX MOV byte ptr [RAX + 0xb8],CL LAB_0011cf17: MOV qword ptr [RBX],RAX XOR EAX,EAX POP RBX RET
int8 PVG_FT_Stroker_New(int8 *param_1) { void *pvVar1; pvVar1 = calloc(1,0xc0); if (pvVar1 != (void *)0x0) { *(int8 *)((long)pvVar1 + 0x70) = 0; *(int8 *)((long)pvVar1 + 0x78) = 0; *(int8 *)((long)pvVar1 + 0x80) = 0; *(int4 *)((long)pvVar1 + 0x8c) = 0xffffffff; *(int1 *)((long)pvVar1 + 0x90) = 0; *(int8 *)((long)pvVar1 + 0x98) = 0; *(int8 *)((long)pvVar1 + 0xa0) = 0; *(int8 *)((long)pvVar1 + 0xa8) = 0; *(int4 *)((long)pvVar1 + 0xb4) = 0xffffffff; *(int1 *)((long)pvVar1 + 0xb8) = 0; } *param_1 = pvVar1; return 0; }
1,298
rlp_add_item
corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c
INTERNAL void rlp_add_item(buffer_t* buf, bytes_t data) { if (data.len == 1 && data.data[0] < 0x80) { } else if (data.len < 56) buffer_add_bytes(buf, 1, data.len + 0x80); else encode_length(buf, data.len, 0x80); buffer_append(buf, data); }
O0
c
rlp_add_item: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %esi, -0x10(%rbp) movq %rdx, -0x8(%rbp) movq %rdi, -0x18(%rbp) cmpl $0x1, -0x10(%rbp) jne 0x366e9 movq -0x8(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x366e9 jmp 0x3671d cmpl $0x38, -0x10(%rbp) jae 0x3670a movq -0x18(%rbp), %rdi movl -0x10(%rbp), %edx addl $0x80, %edx movl $0x1, %esi movb $0x0, %al callq 0x9ea10 jmp 0x3671b movq -0x18(%rbp), %rdi movl -0x10(%rbp), %esi movl $0x80, %edx callq 0x36740 jmp 0x3671d movq -0x18(%rbp), %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rdx callq 0x9e080 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rlp_add_item: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], esi mov [rbp+var_8], rdx mov [rbp+var_18], rdi cmp [rbp+var_10], 1 jnz short loc_366E9 mov rax, [rbp+var_8] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_366E9 jmp short loc_3671D loc_366E9: cmp [rbp+var_10], 38h ; '8' jnb short loc_3670A mov rdi, [rbp+var_18] mov edx, [rbp+var_10] add edx, 80h mov esi, 1 mov al, 0 call buffer_add_bytes jmp short loc_3671B loc_3670A: mov rdi, [rbp+var_18] mov esi, [rbp+var_10] mov edx, 80h call encode_length loc_3671B: jmp short $+2 loc_3671D: mov rdi, [rbp+var_18] mov esi, [rbp+var_10] mov rdx, [rbp+var_8] call buffer_append add rsp, 20h pop rbp retn
long long rlp_add_item(long long a1, unsigned int a2, unsigned __int8 *a3, int a4, int a5, int a6) { if ( a2 != 1 || *a3 >= 0x80u ) { if ( a2 >= 0x38 ) encode_length(a1, a2, 128LL); else buffer_add_bytes(a1, 1, a2 + 128, a4, a5, a6); } return buffer_append(a1, a2, a3); }
rlp_add_item: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x10],ESI MOV qword ptr [RBP + -0x8],RDX MOV qword ptr [RBP + -0x18],RDI CMP dword ptr [RBP + -0x10],0x1 JNZ 0x001366e9 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x001366e9 JMP 0x0013671d LAB_001366e9: CMP dword ptr [RBP + -0x10],0x38 JNC 0x0013670a MOV RDI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x10] ADD EDX,0x80 MOV ESI,0x1 MOV AL,0x0 CALL 0x0019ea10 JMP 0x0013671b LAB_0013670a: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x10] MOV EDX,0x80 CALL 0x00136740 LAB_0013671b: JMP 0x0013671d LAB_0013671d: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] CALL 0x0019e080 ADD RSP,0x20 POP RBP RET
void rlp_add_item(int8 param_1,uint param_2,byte *param_3) { if ((param_2 != 1) || (0x7f < *param_3)) { if (param_2 < 0x38) { buffer_add_bytes(param_1,1,param_2 + 0x80); } else { encode_length(param_1,param_2,0x80); } } buffer_append(param_1,param_2,param_3); return; }
1,299
rlp_add_item
corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c
INTERNAL void rlp_add_item(buffer_t* buf, bytes_t data) { if (data.len == 1 && data.data[0] < 0x80) { } else if (data.len < 56) buffer_add_bytes(buf, 1, data.len + 0x80); else encode_length(buf, data.len, 0x80); buffer_append(buf, data); }
O2
c
rlp_add_item: pushq %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r14 cmpl $0x1, %esi jne 0x2e051 cmpb $0x0, (%rbx) jns 0x2e07c jmp 0x2e056 cmpl $0x37, %ebp ja 0x2e06d movl %ebp, %edx orl $0x80, %edx pushq $0x1 popq %rsi movq %r14, %rdi xorl %eax, %eax callq 0x4b611 jmp 0x2e07c movq %r14, %rdi movl %ebp, %esi movl $0x80, %edx callq 0x2e08d movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x4b08b
rlp_add_item: push rbp push r14 push rbx mov rbx, rdx mov ebp, esi mov r14, rdi cmp esi, 1 jnz short loc_2E051 cmp byte ptr [rbx], 0 jns short loc_2E07C jmp short loc_2E056 loc_2E051: cmp ebp, 37h ; '7' ja short loc_2E06D loc_2E056: mov edx, ebp or edx, 80h push 1 pop rsi mov rdi, r14 xor eax, eax call buffer_add_bytes jmp short loc_2E07C loc_2E06D: mov rdi, r14 mov esi, ebp mov edx, 80h call encode_length loc_2E07C: mov rdi, r14 mov esi, ebp mov rdx, rbx pop rbx pop r14 pop rbp jmp buffer_append
long long rlp_add_item(long long a1, unsigned int a2, char *a3, int a4, int a5, int a6) { if ( a2 != 1 ) { if ( a2 > 0x37 ) { encode_length(a1, a2, 128LL); return buffer_append(a1, a2, a3); } goto LABEL_5; } if ( *a3 < 0 ) LABEL_5: buffer_add_bytes(a1, 1, a2 | 0x80, a4, a5, a6); return buffer_append(a1, a2, a3); }
rlp_add_item: PUSH RBP PUSH R14 PUSH RBX MOV RBX,RDX MOV EBP,ESI MOV R14,RDI CMP ESI,0x1 JNZ 0x0012e051 CMP byte ptr [RBX],0x0 JNS 0x0012e07c JMP 0x0012e056 LAB_0012e051: CMP EBP,0x37 JA 0x0012e06d LAB_0012e056: MOV EDX,EBP OR EDX,0x80 PUSH 0x1 POP RSI MOV RDI,R14 XOR EAX,EAX CALL 0x0014b611 JMP 0x0012e07c LAB_0012e06d: MOV RDI,R14 MOV ESI,EBP MOV EDX,0x80 CALL 0x0012e08d LAB_0012e07c: MOV RDI,R14 MOV ESI,EBP MOV RDX,RBX POP RBX POP R14 POP RBP JMP 0x0014b08b
void rlp_add_item(int8 param_1,uint param_2,char *param_3) { if (param_2 == 1) { if (-1 < *param_3) goto LAB_0012e07c; } else if (0x37 < param_2) { encode_length(param_1,param_2,0x80); goto LAB_0012e07c; } buffer_add_bytes(param_1,1,param_2 | 0x80); LAB_0012e07c: buffer_append(param_1,param_2,param_3); return; }